Merge branch 'master' into staging
[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, 2020 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;;
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 kerberos)
116 #:use-module (gnu packages libevent)
117 #:use-module (gnu packages libffi)
118 #:use-module (gnu packages linux)
119 #:use-module (gnu packages llvm)
120 #:use-module (gnu packages man)
121 #:use-module (gnu packages maths)
122 #:use-module (gnu packages monitoring)
123 #:use-module (gnu packages multiprecision)
124 #:use-module (gnu packages networking)
125 #:use-module (gnu packages ncurses)
126 #:use-module (gnu packages openstack)
127 #:use-module (gnu packages pcre)
128 #:use-module (gnu packages perl)
129 #:use-module (gnu packages pkg-config)
130 #:use-module (gnu packages python)
131 #:use-module (gnu packages python-check)
132 #:use-module (gnu packages python-compression)
133 #:use-module (gnu packages python-crypto)
134 #:use-module (gnu packages python-science)
135 #:use-module (gnu packages python-web)
136 #:use-module (gnu packages qt)
137 #:use-module (gnu packages readline)
138 #:use-module (gnu packages sdl)
139 #:use-module (gnu packages search)
140 #:use-module (gnu packages shells)
141 #:use-module (gnu packages sphinx)
142 #:use-module (gnu packages ssh)
143 #:use-module (gnu packages terminals)
144 #:use-module (gnu packages tex)
145 #:use-module (gnu packages texinfo)
146 #:use-module (gnu packages time)
147 #:use-module (gnu packages tls)
148 #:use-module (gnu packages version-control)
149 #:use-module (gnu packages video)
150 #:use-module (gnu packages web)
151 #:use-module (gnu packages base)
152 #:use-module (gnu packages xml)
153 #:use-module (gnu packages xorg)
154 #:use-module (gnu packages xdisorg)
155 #:use-module (gnu packages tcl)
156 #:use-module (gnu packages bdw-gc)
157 #:use-module (gnu packages serialization)
158 #:use-module (guix packages)
159 #:use-module (guix download)
160 #:use-module (guix git-download)
161 #:use-module (guix hg-download)
162 #:use-module (guix utils)
163 #:use-module (guix build-system gnu)
164 #:use-module (guix build-system cmake)
165 #:use-module (guix build-system python)
166 #:use-module (guix build-system trivial)
167 #:use-module (srfi srfi-1)
168 #:use-module (srfi srfi-26))
169
170 (define-public python-psutil
171 (package
172 (name "python-psutil")
173 (version "5.6.5")
174 (source
175 (origin
176 (method url-fetch)
177 (uri (pypi-uri "psutil" version))
178 (sha256
179 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
180 (build-system python-build-system)
181 (arguments
182 ;; FIXME: some tests does not return and times out.
183 '(#:tests? #f))
184 (home-page "https://www.github.com/giampaolo/psutil")
185 (synopsis "Library for retrieving information on running processes")
186 (description
187 "psutil (Python system and process utilities) is a library for retrieving
188 information on running processes and system utilization (CPU, memory, disks,
189 network) in Python. It is useful mainly for system monitoring, profiling and
190 limiting process resources and management of running processes. It implements
191 many functionalities offered by command line tools such as: ps, top, lsof,
192 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
193 pidof, tty, taskset, pmap.")
194 (properties `((python2-variant . ,(delay python2-psutil))))
195 (license license:bsd-3)))
196
197 (define-public python2-psutil
198 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
199 (package
200 (inherit base)
201 (propagated-inputs
202 `(("python2-enum34" ,python2-enum34) ;optional
203 ,@(package-propagated-inputs base))))))
204
205 (define-public python-shapely
206 (package
207 (name "python-shapely")
208 (version "1.6.4.post2")
209 (source
210 (origin
211 (method url-fetch)
212 (uri (pypi-uri "Shapely" version))
213 (sha256
214 (base32
215 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
216 (build-system python-build-system)
217 (native-inputs
218 `(("python-cython" ,python-cython)
219 ("python-matplotlib" ,python-matplotlib)
220 ("python-pytest" ,python-pytest)
221 ("python-pytest-cov" ,python-pytest-cov)))
222 (inputs
223 `(("geos" ,geos)))
224 (propagated-inputs
225 `(("python-numpy" ,python-numpy)))
226 (arguments
227 `(#:phases
228 (modify-phases %standard-phases
229 (add-after 'unpack 'patch-geos-path
230 (lambda* (#:key inputs #:allow-other-keys)
231 (let ((geos (assoc-ref inputs "geos"))
232 (glibc (assoc-ref inputs ,(if (%current-target-system)
233 "cross-libc" "libc"))))
234 (substitute* "shapely/geos.py"
235 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
236 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
237 geos "/lib/libgeos_c.so'])"))
238 (("free = load_dll\\('c'\\)\\.free")
239 (string-append "free = load_dll('c', fallbacks=['"
240 glibc "/lib/libc.so.6']).free"))))
241 #t)))))
242 (home-page "https://github.com/Toblerity/Shapely")
243 (synopsis "Library for the manipulation and analysis of geometric objects")
244 (description "Shapely is a Python package for manipulation and analysis of
245 planar geometric objects. It is based on the @code{GEOS} library.")
246 (license license:bsd-3)))
247
248 (define-public python-shortuuid
249 (package
250 (name "python-shortuuid")
251 (version "0.5.0")
252 (source
253 (origin
254 (method url-fetch)
255 (uri (pypi-uri "shortuuid" version))
256 (sha256
257 (base32
258 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
259 (build-system python-build-system)
260 (native-inputs
261 `(("python-pep8" ,python-pep8)))
262 (home-page "https://github.com/skorokithakis/shortuuid")
263 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
264 (description
265 "@code{shortuuid} is a Python library for generating concise, unambiguous
266 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
267 module and then similar looking characters are removed.")
268 (license license:bsd-3)))
269
270 (define-public python-logwrap
271 (package
272 (name "python-logwrap")
273 (version "3.2.1")
274 (source
275 (origin
276 (method url-fetch)
277 (uri (pypi-uri "logwrap" version ".zip"))
278 (sha256
279 (base32
280 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
281 (build-system python-build-system)
282 (propagated-inputs
283 `(("python-six" ,python-six)
284 ("python-typing" ,python-typing)))
285 (native-inputs
286 `(("unzip" ,unzip)
287 ("python-cython" ,python-cython)
288 ("python-pytest" ,python-pytest)
289 ("python-pytest-cov" ,python-pytest-cov)
290 ("python-pytest-runner" ,python-pytest-runner)))
291 (home-page "https://github.com/penguinolog/logwrap")
292 (synopsis "Decorator for logging function arguments")
293 (description "This package provides a decorator to log function arguments
294 and function call return values in a human-readable way.")
295 (license license:asl2.0)))
296
297 (define-public python2-shapely
298 (package-with-python2 python-shapely))
299
300 (define-public python-clyent
301 (package
302 (name "python-clyent")
303 (version "1.2.1")
304 (source
305 (origin
306 (method url-fetch)
307 (uri (pypi-uri "clyent" version))
308 (sha256
309 (base32
310 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
311 (build-system python-build-system)
312 (native-inputs
313 `(("python-mock" ,python-mock)))
314 (home-page "https://github.com/binstar/clyent")
315 (synopsis "Command line client library")
316 (description "Clyent is a Python command line utiliy library. It is used
317 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
318 (license license:bsd-3)))
319
320 (define-public python2-clyent
321 (package-with-python2 python-clyent))
322
323 (define-public python-babel
324 (package
325 (name "python-babel")
326 (version "2.7.0")
327 (source
328 (origin
329 (method url-fetch)
330 (uri (pypi-uri "Babel" version))
331 (sha256
332 (base32
333 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
334 (build-system python-build-system)
335 (native-inputs
336 `(("python-freezegun" ,python-freezegun)
337 ("python-pytest" ,python-pytest)))
338 (propagated-inputs
339 `(("python-pytz" ,python-pytz)))
340 (arguments
341 `(#:phases (modify-phases %standard-phases
342 (replace 'check
343 (lambda _
344 (invoke "pytest" "-vv" "-k"
345 (string-append
346 ;; XXX: These tests fail when using Pytest 4.x and
347 ;; Babel 2.6.0. Try removing this for later versions.
348 "not test_no_inherit_metazone_marker_never_in_output"
349 " and not test_smoke_dates"
350 " and not test_smoke_numbers")))))))
351 (home-page "http://babel.pocoo.org/")
352 (synopsis
353 "Tools for internationalizing Python applications")
354 (description
355 "Babel is composed of two major parts:
356 - tools to build and work with gettext message catalogs
357 - a Python interface to the CLDR (Common Locale Data Repository), providing
358 access to various locale display names, localized number and date formatting,
359 etc. ")
360 (license license:bsd-3)))
361
362 (define-public python2-babel
363 (package-with-python2 python-babel))
364
365 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
366 (define-public python2-babel-2.6
367 (package
368 (inherit python2-babel)
369 (version "2.6.0")
370 (source (origin
371 (method url-fetch)
372 (uri (pypi-uri "Babel" version))
373 (sha256
374 (base32
375 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
376
377 (define-public python2-backport-ssl-match-hostname
378 (package
379 (name "python2-backport-ssl-match-hostname")
380 (version "3.5.0.1")
381 (source
382 (origin
383 (method url-fetch)
384 (uri (pypi-uri "backports.ssl_match_hostname" version))
385 (sha256
386 (base32
387 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
388 (build-system python-build-system)
389 (arguments
390 `(#:python ,python-2
391 #:tests? #f)) ; no test target
392 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
393 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
394 (description
395 "This backport brings the ssl.match_hostname() function to users of
396 earlier versions of Python. The function checks the hostname in the
397 certificate returned by the server to which a connection has been established,
398 and verifies that it matches the intended target hostname.")
399 (license license:psfl)))
400
401 (define-public python-boolean.py
402 (package
403 (name "python-boolean.py")
404 (version "3.6")
405 (source
406 (origin
407 ;; There's no source tarball on PyPI.
408 (method git-fetch)
409 (uri (git-reference
410 (url "https://github.com/bastikr/boolean.py")
411 (commit (string-append "v" version))))
412 (file-name (git-file-name name version))
413 (sha256
414 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
415 (build-system python-build-system)
416 (home-page "https://github.com/bastikr/boolean.py")
417 (synopsis "Boolean algebra in one Python module")
418 (description
419 "This is a small Python library that implements boolean algebra.
420 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
421 @code{Symbol} class that can take on one of these two values. Calculations
422 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
423 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
424 Expressions are constructed from parsed strings or directly in Python.")
425 (license license:bsd-2)))
426
427 (define-public python-hdf4
428 (package
429 (name "python-hdf4")
430 (version "0.9")
431 (source
432 (origin
433 (method url-fetch)
434 (uri (pypi-uri name version))
435 (sha256
436 (base32
437 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
438 (build-system python-build-system)
439 (native-inputs `(("nose" ,python-nose)))
440 (propagated-inputs `(("numpy" ,python-numpy)))
441 (inputs
442 `(("hdf4" ,hdf4)
443 ("libjpeg" ,libjpeg)
444 ("zlib" ,zlib)))
445 (arguments
446 `(#:phases
447 (modify-phases %standard-phases
448 (replace 'check
449 (lambda _
450 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
451 ;; on to import numpy. Somehow this works on their CI system.
452 ;; Let's just manage PYTHONPATH here instead.
453 (substitute* "runexamples.sh"
454 (("export PYTHONPATH=.*") ""))
455 (setenv "PYTHONPATH"
456 (string-append (getcwd) ":"
457 (getenv "PYTHONPATH")))
458 (invoke "./runexamples.sh")
459 (invoke "nosetests" "-v"))))))
460 (home-page "https://github.com/fhs/python-hdf4")
461 (synopsis "Python interface to the NCSA HDF4 library")
462 (description
463 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
464 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
465 NetCDF files can also be read and modified. Python-HDF4 is a fork of
466 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
467 (license license:expat)))
468
469 (define-public python2-hdf4
470 (package-with-python2 python-hdf4))
471
472 (define-public python-h5py
473 (package
474 (name "python-h5py")
475 (version "2.8.0")
476 (source
477 (origin
478 (method url-fetch)
479 (uri (pypi-uri "h5py" version))
480 (sha256
481 (base32
482 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
483 (build-system python-build-system)
484 (arguments
485 `(#:tests? #f ; no test target
486 #:phases
487 (modify-phases %standard-phases
488 (add-after 'unpack 'fix-hdf5-paths
489 (lambda* (#:key inputs #:allow-other-keys)
490 (let ((prefix (assoc-ref inputs "hdf5")))
491 (substitute* "setup_build.py"
492 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
493 (string-append "['" prefix "/lib" "']"))
494 (("'/opt/local/include', '/usr/local/include'")
495 (string-append "'" prefix "/include" "'")))
496 (substitute* "setup_configure.py"
497 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
498 (string-append "['" prefix "/lib" "']")))
499 #t))))))
500 (propagated-inputs
501 `(("python-six" ,python-six)
502 ("python-numpy" ,python-numpy)))
503 (inputs
504 `(("hdf5" ,hdf5)))
505 (native-inputs
506 `(("python-cython" ,python-cython)
507 ("python-pkgconfig" ,python-pkgconfig)))
508 (home-page "http://www.h5py.org/")
509 (synopsis "Read and write HDF5 files from Python")
510 (description
511 "The h5py package provides both a high- and low-level interface to the
512 HDF5 library from Python. The low-level interface is intended to be a
513 complete wrapping of the HDF5 API, while the high-level component supports
514 access to HDF5 files, datasets and groups using established Python and NumPy
515 concepts.")
516 (license license:bsd-3)))
517
518 (define-public python2-h5py
519 (package-with-python2 python-h5py))
520
521 (define-public python-sh
522 (package
523 (name "python-sh")
524 (version "1.12.14")
525 (source
526 (origin
527 (method url-fetch)
528 (uri (pypi-uri "sh" version))
529 (sha256
530 (base32
531 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
532 (build-system python-build-system)
533 (arguments
534 '(#:phases
535 (modify-phases %standard-phases
536 (replace 'check
537 (lambda _
538 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
539 (setenv "HOME" "/tmp")
540 (invoke "python" "sh.py" "test"))))))
541 (native-inputs
542 `(("python-coverage" ,python-coverage)))
543 (home-page "https://github.com/amoffat/sh")
544 (synopsis "Python subprocess replacement")
545 (description "This package provides a replacement for Python's
546 @code{subprocess} feature.")
547 (license license:expat)))
548
549 (define-public python2-sh
550 (package-with-python2 python-sh))
551
552 (define-public python-cftime
553 (package
554 (name "python-cftime")
555 (version "1.0.4.2")
556 (source
557 (origin
558 (method url-fetch)
559 (uri (pypi-uri "cftime" version))
560 (sha256
561 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
562 (build-system python-build-system)
563 (propagated-inputs
564 `(("python-numpy" ,python-numpy)))
565 (native-inputs
566 `(("python-coveralls" ,python-coveralls)
567 ("python-cython" ,python-cython)
568 ("python-pytest-cov" ,python-pytest-cov)))
569 (home-page "https://github.com/Unidata/cftime")
570 (synopsis "Library for time handling")
571 (description
572 "This package provides time-handling functionality that used to be part
573 of the netcdf4 package before.")
574 ;; This package claims to include code under the GPLv3 but is released
575 ;; under ISC.
576 (license (list license:isc license:gpl3+))))
577
578 (define-public python-netcdf4
579 (package
580 (name "python-netcdf4")
581 (version "1.4.2")
582 (source
583 (origin
584 (method url-fetch)
585 (uri (pypi-uri "netCDF4" version))
586 (sha256
587 (base32
588 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
589 (build-system python-build-system)
590 (arguments
591 '(#:phases
592 (modify-phases %standard-phases
593 (add-after 'unpack 'configure-locations
594 (lambda* (#:key inputs #:allow-other-keys)
595 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
596 #t)))))
597 (native-inputs
598 `(("python-cython" ,python-cython)))
599 (propagated-inputs
600 `(("python-numpy" ,python-numpy)
601 ("python-cftime" ,python-cftime)))
602 (inputs
603 `(("netcdf" ,netcdf)
604 ("hdf4" ,hdf4)
605 ("hdf5" ,hdf5)))
606 (home-page "https://github.com/Unidata/netcdf4-python")
607 (synopsis "Python/numpy interface to the netCDF library")
608 (description "Netcdf4-python is a Python interface to the netCDF C
609 library. netCDF version 4 has many features not found in earlier
610 versions of the library and is implemented on top of HDF5. This module
611 can read and write files in both the new netCDF 4 and the old netCDF 3
612 format, and can create files that are readable by HDF5 clients. The
613 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
614 to users of that module.")
615 ;; The software is mainly ISC, but includes some files covered
616 ;; by the Expat license.
617 (license (list license:isc license:expat))))
618
619 (define-public python2-netcdf4
620 (package-with-python2 python-netcdf4))
621
622 (define-public python-license-expression
623 (package
624 (name "python-license-expression")
625 (version "0.999")
626 (source
627 (origin
628 (method url-fetch)
629 (uri (pypi-uri "license-expression" version))
630 (sha256
631 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
632 (build-system python-build-system)
633 (propagated-inputs
634 `(("python-boolean.py" ,python-boolean.py)))
635 (home-page "https://github.com/nexB/license-expression")
636 (synopsis "Apply boolean logic to license expressions")
637 (description
638 "This Python module defines a tiny language to evaluate and compare
639 license expressions using boolean logic. Logical combinations of licenses can
640 be tested for equality, containment, and equivalence. They can be normalised
641 and simplified. It supports SPDX license expressions as well as other naming
642 conventions and aliases in the same expression.")
643 (license license:gpl2+)))
644
645 (define-public python-lockfile
646 (package
647 (name "python-lockfile")
648 (version "0.12.2")
649 (source
650 (origin
651 (method url-fetch)
652 (uri (pypi-uri "lockfile" version))
653 (sha256
654 (base32
655 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
656 (build-system python-build-system)
657 (arguments '(#:test-target "check"))
658 (native-inputs
659 `(("python-pbr" ,python-pbr)))
660 (home-page "https://launchpad.net/pylockfile")
661 (synopsis "Platform-independent file locking module")
662 (description
663 "The lockfile package exports a LockFile class which provides a simple
664 API for locking files.")
665 (license license:expat)))
666
667 (define-public python2-lockfile
668 (package-with-python2 python-lockfile))
669
670 (define-public python-semantic-version
671 (package
672 (name "python-semantic-version")
673 (version "2.6.0")
674 (source
675 (origin
676 (method url-fetch)
677 (uri (pypi-uri "semantic_version" version))
678 (sha256
679 (base32
680 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
681 (build-system python-build-system)
682 (arguments
683 `(#:tests? #f)) ; PyPI tarball lacks tests
684 (home-page "https://github.com/rbarrois/python-semanticversion")
685 (synopsis "Semantic versioning module for Python")
686 (description
687 "The @code{semantic_version} class is a small library for handling
688 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
689
690 It can compare versions, generate a new version that represents a bump in one of
691 the version levels, and check whether any given string is a proper semantic
692 version identifier.")
693 (license license:bsd-3)))
694
695 (define-public python2-semantic-version
696 (package-with-python2 python-semantic-version))
697
698 (define-public python-serpent
699 (package
700 (name "python-serpent")
701 (version "1.28")
702 (source
703 (origin
704 (method url-fetch)
705 (uri (pypi-uri "serpent" version))
706 (sha256
707 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
708 (build-system python-build-system)
709 (native-inputs
710 `(("python-attrs" ,python-attrs)
711 ("python-pytz" ,python-pytz)))
712 (home-page "https://github.com/irmen/Serpent")
713 (synopsis "Serializer for literal Python expressions")
714 (description
715 "Serpent provides @code{ast.literal_eval()}-compatible object tree
716 serialization. It serializes an object tree into bytes (an utf-8 encoded
717 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
718 to rebuild the original object tree.
719
720 Because only safe literals are encoded, it is safe to send serpent data to
721 other machines, such as over the network.")
722 (license license:expat)))
723
724 (define-public python-setuptools
725 (package
726 (name "python-setuptools")
727 (version "41.0.1")
728 (source
729 (origin
730 (method url-fetch)
731 (uri (pypi-uri "setuptools" version ".zip"))
732 (sha256
733 (base32
734 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
735 (modules '((guix build utils)))
736 (snippet
737 '(begin
738 ;; Remove included binaries which are used to build self-extracting
739 ;; installers for Windows.
740 ;; TODO: Find some way to build them ourself so we can include them.
741 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
742 #t))))
743 (build-system python-build-system)
744 ;; FIXME: Tests require pytest, which itself relies on setuptools.
745 ;; One could bootstrap with an internal untested setuptools.
746 (arguments
747 `(#:tests? #f))
748 (home-page "https://pypi.python.org/pypi/setuptools")
749 (synopsis
750 "Library designed to facilitate packaging Python projects")
751 (description
752 "Setuptools is a fully-featured, stable library designed to facilitate
753 packaging Python projects, where packaging includes:
754 Python package and module definitions,
755 distribution package metadata,
756 test hooks,
757 project installation,
758 platform-specific details,
759 Python 3 support.")
760 ;; TODO: setuptools now bundles the following libraries:
761 ;; packaging, pyparsing, six and appdirs. How to unbundle?
762 (license (list license:psfl ; setuptools itself
763 license:expat ; six, appdirs, pyparsing
764 license:asl2.0 ; packaging is dual ASL2/BSD-2
765 license:bsd-2))))
766
767 (define-public python2-setuptools
768 (package-with-python2 python-setuptools))
769
770 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
771 (define-public python-setuptools-for-tensorflow
772 (hidden-package
773 (package
774 (inherit python-setuptools)
775 (version "39.1.0")
776 (source (origin
777 (inherit (package-source python-setuptools))
778 (uri (pypi-uri "setuptools" version ".zip"))
779 (sha256
780 (base32
781 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
782
783 (define-public python-uniseg
784 (package
785 (name "python-uniseg")
786 (version "0.7.1")
787 (source
788 (origin
789 (method url-fetch)
790 (uri (pypi-uri "uniseg" version ".zip"))
791 (sha256
792 (base32
793 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
794 (build-system python-build-system)
795 (arguments
796 '(#:tests? #f)) ; The test suite requires network access.
797 (native-inputs
798 `(("unzip" ,unzip)))
799 (home-page
800 "https://bitbucket.org/emptypage/uniseg-python")
801 (synopsis
802 "Python library to determine Unicode text segmentations")
803 (description
804 "Uniseg is a Python package used to determine Unicode text segmentations.
805 Supported segmentations include:
806 @enumerate
807 @item @dfn{Code point} (any value in the Unicode codespace)
808 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
809 multiple Unicode code points, e.g. \"G\" + acute-accent)
810 @item Word break
811 @item Sentence break
812 @item Line break
813 @end enumerate")
814 (license license:expat)))
815
816 (define-public python2-uniseg
817 (package-with-python2 python-uniseg))
818
819 (define-public python-humanfriendly
820 (package
821 (name "python-humanfriendly")
822 (version "4.4.1")
823 (source
824 (origin
825 (method url-fetch)
826 (uri (pypi-uri "humanfriendly" version))
827 (sha256
828 (base32
829 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
830 (build-system python-build-system)
831 (arguments
832 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
833 #:tests? #f))
834 (propagated-inputs
835 `(("python-monotonic" ,python-monotonic)))
836 (home-page "https://humanfriendly.readthedocs.io")
837 (synopsis "Human-friendly input and output in Python")
838 (description
839 "The functions and classes in @code{humanfriendly} can be used to make
840 text interfaces more user-friendly. It includes tools to parse and format
841 numbers, file sizes, and timespans, timers for long-running operations, menus
842 to allow the user to choose from a list of options, and terminal interaction
843 helpers.")
844 (license license:expat)))
845
846 (define-public python2-humanfriendly
847 (package-with-python2 python-humanfriendly))
848
849 (define-public python-capturer
850 (package
851 (name "python-capturer")
852 (version "2.4")
853 (source
854 (origin
855 (method url-fetch)
856 (uri (pypi-uri "capturer" version))
857 (sha256
858 (base32
859 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
860 (build-system python-build-system)
861 (arguments
862 `(#:tests? #f))
863 (propagated-inputs
864 `(("python-humanfriendly" ,python-humanfriendly)))
865 (home-page "https://capturer.readthedocs.io")
866 (synopsis "Capture stdout and stderr streams of the current process")
867 (description
868 "The capturer package makes it easy to capture the stdout and stderr
869 streams of the current process and subprocesses. Output can be relayed
870 to the terminal in real time but is also available to the Python program
871 for additional processing.")
872 (license license:expat)))
873
874 (define-public python2-capturer
875 (package-with-python2 python-capturer))
876
877 (define-public python-case
878 (package
879 (name "python-case")
880 (version "1.5.3")
881 (source
882 (origin
883 (method url-fetch)
884 (uri (pypi-uri "case" version))
885 (sha256
886 (base32
887 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
888 (build-system python-build-system)
889 (propagated-inputs
890 `(("python-mock" ,python-mock)
891 ("python-nose" ,python-nose)
892 ("python-six" ,python-six)
893 ("python-unittest2" ,python-unittest2)))
894 (native-inputs
895 `(("python-coverage" ,python-coverage)))
896 (home-page "https://github.com/celery/case")
897 (synopsis "Unittest utilities and convenience methods")
898 (description
899 "The @code{case} package provides utilities on top of unittest, including
900 some helpful Python 2 compatibility convenience methods.")
901 (license license:bsd-3)))
902
903 (define-public python-verboselogs
904 (package
905 (name "python-verboselogs")
906 (version "1.7")
907 (source
908 (origin
909 (method url-fetch)
910 (uri (pypi-uri "verboselogs" version))
911 (sha256
912 (base32
913 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
914 (build-system python-build-system)
915 (arguments
916 `(#:phases
917 (modify-phases %standard-phases
918 (replace 'check
919 (lambda _
920 ;; Do not run pylint plugin test, as astroid is an old
921 ;; unsupported version.
922 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
923 "verboselogs/tests.py"))))))
924 (native-inputs
925 `(("python-mock" ,python-mock)
926 ("python-pytest" ,python-pytest)))
927 (home-page "https://verboselogs.readthedocs.io")
928 (synopsis "Verbose logging level for Python's logging module")
929 (description
930 "The @code{verboselogs} package extends Python's @code{logging} module to
931 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
932 (license license:expat)))
933
934 (define-public python2-verboselogs
935 (package-with-python2 python-verboselogs))
936
937 (define-public python-coloredlogs
938 (package
939 (name "python-coloredlogs")
940 (version "10.0")
941 (source
942 (origin
943 (method url-fetch)
944 (uri (pypi-uri "coloredlogs" version))
945 (sha256
946 (base32
947 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
948 (build-system python-build-system)
949 (arguments
950 `(;Tests require some updated modules
951 #:tests? #f))
952 (propagated-inputs
953 `(("python-capturer" ,python-capturer)))
954 (home-page "https://coloredlogs.readthedocs.io")
955 (synopsis "Colored stream handler for Python's logging module")
956 (description
957 "The @code{coloredlogs} package enables colored terminal output for
958 Python's logging module. The @code{ColoredFormatter} class inherits from
959 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
960 messages in color.")
961 (license license:expat)))
962
963 (define-public python2-coloredlogs
964 (package-with-python2 python-coloredlogs))
965
966 (define-public python-editorconfig
967 (package
968 (name "python-editorconfig")
969 (version "0.12.2")
970 (source
971 (origin
972 (method url-fetch)
973 (uri (pypi-uri "EditorConfig" version))
974 (sha256
975 (base32
976 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
977 (build-system python-build-system)
978 (home-page "https://editorconfig.org/")
979 (synopsis "EditorConfig bindings for python")
980 (description "The EditorConfig project consists of a file format for
981 defining coding styles and a collection of text editor plugins that enable
982 editors to read the file format and adhere to defined styles. EditorConfig
983 files are easily readable and they work nicely with version control systems.")
984 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
985 (license (list license:bsd-2 license:psfl))))
986
987 (define-public python-et-xmlfile
988 (package
989 (name "python-et-xmlfile")
990 (version "1.0.1")
991 (source
992 (origin
993 (method url-fetch)
994 (uri (pypi-uri "et_xmlfile" version))
995 (sha256
996 (base32
997 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
998 (build-system python-build-system)
999 (arguments
1000 `(#:phases (modify-phases %standard-phases
1001 (replace 'check
1002 (lambda _
1003 (invoke "pytest"))))))
1004 (native-inputs
1005 `(("python-pytest" ,python-pytest)
1006 ("python-lxml" ,python-lxml))) ;used for the tests
1007 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1008 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1009 (description "This Python library is based upon the @code{xmlfile} module
1010 from @code{lxml}. It aims to provide a low memory, compatible implementation
1011 of @code{xmlfile}.")
1012 (license license:expat)))
1013
1014 (define-public python2-et-xmlfile
1015 (package-with-python2 python-et-xmlfile))
1016
1017 (define-public python-openpyxl
1018 (package
1019 (name "python-openpyxl")
1020 (version "2.6.2")
1021 (source
1022 (origin
1023 ;; We use the upstream repository, as the tests are not included in the
1024 ;; PyPI releases.
1025 (method hg-fetch)
1026 (uri (hg-reference
1027 (url "https://bitbucket.org/openpyxl/openpyxl")
1028 (changeset version)))
1029 (file-name (string-append name "-" version "-checkout"))
1030 (sha256
1031 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1032 (build-system python-build-system)
1033 (arguments
1034 `(#:phases (modify-phases %standard-phases
1035 (replace 'check
1036 (lambda _
1037 (invoke "pytest"))))))
1038 (native-inputs
1039 ;; For the test suite.
1040 `(("python-lxml" ,python-lxml)
1041 ("python-pillow" ,python-pillow)
1042 ("python-pytest" ,python-pytest)))
1043 (propagated-inputs
1044 `(("python-et-xmlfile" ,python-et-xmlfile)
1045 ("python-jdcal" ,python-jdcal)))
1046 (home-page "https://openpyxl.readthedocs.io")
1047 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1048 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1049 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1050 standard.")
1051 (license license:expat)))
1052
1053 (define-public python-eventlet
1054 (package
1055 (name "python-eventlet")
1056 (version "0.25.1")
1057 (source
1058 (origin
1059 (method url-fetch)
1060 (uri (pypi-uri "eventlet" version))
1061 (sha256
1062 (base32
1063 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1064 (build-system python-build-system)
1065 (propagated-inputs
1066 `(("python-greenlet" ,python-greenlet)))
1067 (arguments
1068 ;; TODO: Requires unpackaged 'enum-compat'.
1069 '(#:tests? #f))
1070 (home-page "https://eventlet.net")
1071 (synopsis "Concurrent networking library for Python")
1072 (description
1073 "Eventlet is a concurrent networking library for Python that
1074 allows you to change how you run your code, not how you write it.
1075 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1076 Coroutines ensure that the developer uses a blocking style of programming
1077 that is similar to threading, but provide the benefits of non-blocking I/O.
1078 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1079 from the Python interpreter, or as a small part of a larger application.")
1080 (license license:expat)))
1081
1082 (define-public python2-eventlet
1083 (let ((base (package-with-python2
1084 (strip-python2-variant python-eventlet))))
1085 (package (inherit base)
1086 (propagated-inputs
1087 `(("python2-enum34" ,python2-enum34)
1088 ,@(package-propagated-inputs base))))))
1089
1090 (define-public python-six
1091 (package
1092 (name "python-six")
1093 (version "1.12.0")
1094 (source
1095 (origin
1096 (method url-fetch)
1097 (uri (pypi-uri "six" version))
1098 (sha256
1099 (base32
1100 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1101 (build-system python-build-system)
1102 (arguments
1103 `(#:phases
1104 (modify-phases %standard-phases
1105 (replace 'check
1106 (lambda _
1107 (invoke "py.test" "-v"))))))
1108 (native-inputs
1109 `(("python-py" ,python-py)
1110 ("python-pytest" ,python-pytest-bootstrap)))
1111 (home-page "https://pypi.python.org/pypi/six/")
1112 (synopsis "Python 2 and 3 compatibility utilities")
1113 (description
1114 "Six is a Python 2 and 3 compatibility library. It provides utility
1115 functions for smoothing over the differences between the Python versions with
1116 the goal of writing Python code that is compatible on both Python versions.
1117 Six supports every Python version since 2.5. It is contained in only one
1118 Python file, so it can be easily copied into your project.")
1119 (license license:x11)))
1120
1121 (define-public python2-six
1122 (package-with-python2 python-six))
1123
1124 (define-public python-six-bootstrap
1125 (package
1126 (inherit python-six)
1127 (name "python-six-bootstrap")
1128 (native-inputs `())
1129 (arguments `(#:tests? #f))))
1130
1131 (define-public python2-six-bootstrap
1132 (package-with-python2 python-six-bootstrap))
1133
1134 (define-public python-schedule
1135 (package
1136 (name "python-schedule")
1137 (version "0.4.3")
1138 (source
1139 (origin
1140 (method url-fetch)
1141 (uri (pypi-uri "schedule" version))
1142 (sha256
1143 (base32
1144 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1145 (build-system python-build-system)
1146 (native-inputs
1147 `(("python-pytest" ,python-pytest)
1148 ("python-mock" ,python-mock)))
1149 (home-page "https://github.com/dbader/schedule")
1150 (synopsis "Schedule periodic function calls in Python")
1151 (description
1152 "Schedule is an in-process scheduler for periodic jobs that uses the
1153 builder pattern for configuration. Schedule lets you run Python functions (or
1154 any other callable) periodically at pre-determined intervals using a simple,
1155 human-friendly syntax.")
1156 (license license:expat)))
1157
1158 (define-public python2-schedule
1159 (package-with-python2 python-schedule))
1160
1161 (define-public python2-mechanize
1162 (package
1163 (name "python2-mechanize")
1164 (version "0.2.5")
1165 (source
1166 (origin
1167 (method url-fetch)
1168 (uri (pypi-uri "mechanize" version))
1169 (sha256
1170 (base32
1171 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1172 (build-system python-build-system)
1173 (arguments
1174 `(#:python ,python-2 ; apparently incompatible with Python 3
1175 #:tests? #f))
1176 ;; test fails with message
1177 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1178 ;; (python-3.3.2) or
1179 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1180 ;; (python-2.7.5).
1181 ;; The source code is from March 2011 and probably not up-to-date
1182 ;; with respect to python unit tests.
1183 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1184 (synopsis
1185 "Stateful programmatic web browsing in Python")
1186 (description
1187 "Mechanize implements stateful programmatic web browsing in Python,
1188 after Andy Lester’s Perl module WWW::Mechanize.")
1189 (license (license:non-copyleft
1190 "file://COPYING"
1191 "See COPYING in the distribution."))))
1192
1193
1194 (define-public python-simplejson
1195 (package
1196 (name "python-simplejson")
1197 (version "3.14.0")
1198 (source
1199 (origin
1200 (method url-fetch)
1201 (uri (pypi-uri "simplejson" version))
1202 (sha256
1203 (base32
1204 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1205 (build-system python-build-system)
1206 (home-page "http://simplejson.readthedocs.org/en/latest/")
1207 (synopsis
1208 "Json library for Python")
1209 (description
1210 "JSON (JavaScript Object Notation) is a subset of JavaScript
1211 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1212 format.
1213
1214 Simplejson exposes an API familiar to users of the standard library marshal
1215 and pickle modules. It is the externally maintained version of the json
1216 library contained in Python 2.6, but maintains compatibility with Python 2.5
1217 and (currently) has significant performance advantages, even without using
1218 the optional C extension for speedups. Simplejson is also supported on
1219 Python 3.3+.")
1220 (license license:x11)))
1221
1222 (define-public python2-simplejson
1223 (package-with-python2 python-simplejson))
1224
1225
1226 (define-public python-pyicu
1227 (package
1228 (name "python-pyicu")
1229 (version "2.3.1")
1230 (source
1231 (origin
1232 (method url-fetch)
1233 (uri (pypi-uri "PyICU" version))
1234 (sha256
1235 (base32
1236 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1237 (build-system python-build-system)
1238 (inputs
1239 `(("icu4c" ,icu4c)))
1240 (native-inputs
1241 `(("python-pytest" ,python-pytest)
1242 ("python-six" ,python-six)))
1243 (home-page "https://github.com/ovalhub/pyicu")
1244 (synopsis "Python extension wrapping the ICU C++ API")
1245 (description
1246 "PyICU is a python extension wrapping the ICU C++ API.")
1247 (properties `((python2-variant . ,(delay python2-pyicu))))
1248 (license license:x11)))
1249
1250 (define-public python2-pyicu
1251 (let ((base (package-with-python2
1252 (strip-python2-variant python-pyicu))))
1253 (package
1254 (inherit base)
1255 (arguments
1256 `(,@(package-arguments base)
1257 #:phases
1258 (modify-phases %standard-phases
1259 (add-before 'check 'delete-failing-test
1260 (λ _
1261 ;; XXX: This fails due to Unicode issues unique to Python 2,
1262 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1263 (delete-file "test/test_Script.py")
1264 #t))))))))
1265
1266 (define-public python2-dogtail
1267 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1268 ;; spaces in indentation" with Python 3.
1269 (package
1270 (name "python2-dogtail")
1271 (version "0.9.9")
1272 (source (origin
1273 (method url-fetch)
1274 (uri (pypi-uri "dogtail" version))
1275 (sha256
1276 (base32
1277 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1278 (build-system python-build-system)
1279 (arguments `(#:python ,python-2
1280 #:tests? #f)) ; invalid command "test"
1281 ;; Currently no offical homepage.
1282 (home-page "https://pypi.python.org/pypi/dogtail/")
1283 (synopsis "GUI test tool and automation framework written in Python")
1284 (description
1285 "Dogtail is a GUI test tool and automation framework written in Python.
1286 It uses Accessibility (a11y) technologies to communicate with desktop
1287 applications. dogtail scripts are written in Python and executed like any
1288 other Python program.")
1289 (license license:gpl2+)))
1290
1291 (define-public python-empy
1292 (package
1293 (name "python-empy")
1294 (version "3.3.3")
1295 (source (origin
1296 (method url-fetch)
1297 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1298 version ".tar.gz"))
1299 (sha256
1300 (base32
1301 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1302 (build-system python-build-system)
1303 (arguments
1304 `(#:tests? #f)) ; python2 only
1305 (home-page "http://www.alcyone.com/software/empy/")
1306 (synopsis "Templating system for Python")
1307 (description
1308 "EmPy is a system for embedding Python expressions and statements in
1309 template text; it takes an EmPy source file, processes it, and produces
1310 output. This is accomplished via expansions, which are special signals to the
1311 EmPy system and are set off by a special prefix (by default the at sign, @@).
1312 EmPy can expand arbitrary Python expressions and statements in this way, as
1313 well as a variety of special forms. Textual data not explicitly delimited in
1314 this way is sent unaffected to the output, allowing Python to be used in
1315 effect as a markup language. Also supported are callbacks via hooks,
1316 recording and playback via diversions, and dynamic, chainable filters. The
1317 system is highly configurable via command line options and embedded
1318 commands.")
1319 (license license:lgpl2.1+)))
1320
1321 (define-public python2-empy
1322 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1323 (package
1324 (inherit base)
1325 (arguments `(,@(package-arguments base)
1326 #:tests? #t)))))
1327
1328 (define-public python2-element-tree
1329 (package
1330 (name "python2-element-tree")
1331 (version "1.2.6")
1332 (source (origin
1333 (method url-fetch)
1334 (uri (string-append
1335 "http://effbot.org/media/downloads/elementtree-"
1336 version "-20050316.tar.gz"))
1337 (sha256
1338 (base32
1339 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1340 (build-system python-build-system)
1341 (arguments
1342 `(#:python ,python-2 ; seems to be part of Python 3
1343 #:tests? #f)) ; no 'test' sub-command
1344 (synopsis "Toolkit for XML processing in Python")
1345 (description
1346 "ElementTree is a Python library supporting lightweight XML processing.")
1347 (home-page "http://effbot.org/zone/element-index.htm")
1348 (license (license:x11-style
1349 "http://docs.python.org/2/license.html"
1350 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1351
1352 (define-public python2-pybugz
1353 (package
1354 (name "python2-pybugz")
1355 (version "0.6.11")
1356 (source (origin
1357 (method url-fetch)
1358 (uri (string-append
1359 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1360 version ".tar.gz"))
1361 (sha256
1362 (base32
1363 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1364 (patches (search-patches "pybugz-stty.patch"
1365 "pybugz-encode-error.patch"))))
1366 (build-system python-build-system)
1367 (arguments
1368 `(#:python ,python-2 ; SyntaxError with Python 3
1369 #:tests? #f)) ; no 'test' sub-command
1370 (propagated-inputs
1371 `(("element-tree" ,python2-element-tree)))
1372 (synopsis "Python and command-line interface to Bugzilla")
1373 (description
1374 "PyBugz is a Python library and command-line tool to query the Bugzilla
1375 bug tracking system. It is meant as an aid to speed up interaction with the
1376 bug tracker.")
1377 (home-page "http://www.liquidx.net/pybugz/")
1378 (license license:gpl2)))
1379
1380 (define-public python2-enum
1381 (package
1382 (name "python2-enum")
1383 (version "0.4.6")
1384 (source (origin
1385 (method url-fetch)
1386 (uri (pypi-uri "enum" version))
1387 (sha256
1388 (base32
1389 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1390 (build-system python-build-system)
1391 (arguments
1392 `(#:python ,python-2))
1393 (home-page "http://pypi.python.org/pypi/enum/")
1394 (synopsis "Robust enumerated type support in Python")
1395 (description
1396 "This provides a module for robust enumerations in Python. It has
1397 been superseded by the Python standard library and is provided only for
1398 compatibility.")
1399 ;; Choice of either license.
1400 (license (list license:gpl3+ license:psfl))))
1401
1402 (define-public python-enum34
1403 (package
1404 (name "python-enum34")
1405 (version "1.1.6")
1406 (source
1407 (origin
1408 (method url-fetch)
1409 (uri (pypi-uri "enum34" version))
1410 (sha256
1411 (base32
1412 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1413 (build-system python-build-system)
1414 (home-page "https://pypi.python.org/pypi/enum34")
1415 (synopsis "Backported Python 3.4 Enum")
1416 (description
1417 "Enum34 is the new Python stdlib enum module available in Python 3.4
1418 backported for previous versions of Python from 2.4 to 3.3.")
1419 (license license:bsd-3)))
1420
1421 (define-public python2-enum34
1422 (package-with-python2 python-enum34))
1423
1424 (define-public python-parse-type
1425 (package
1426 (name "python-parse-type")
1427 (version "0.4.2")
1428 (source
1429 (origin
1430 (method url-fetch)
1431 (uri (pypi-uri "parse_type" version))
1432 (sha256
1433 (base32
1434 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1435 (build-system python-build-system)
1436 (propagated-inputs
1437 `(("python-six" ,python-six)
1438 ("python-parse" ,python-parse)))
1439 (native-inputs
1440 `(("python-pytest" ,python-pytest)
1441 ("python-pytest-runner" ,python-pytest-runner)))
1442 (home-page "https://github.com/jenisys/parse_type")
1443 (synopsis "Extended parse module")
1444 (description
1445 "Parse_type extends the python parse module.")
1446 (properties
1447 `((python2-variant . ,(delay python2-parse-type))))
1448 (license license:bsd-3)))
1449
1450 (define-public python2-parse-type
1451 (let ((base (package-with-python2
1452 (strip-python2-variant python-parse-type))))
1453 (package (inherit base)
1454 (propagated-inputs
1455 `(("python2-enum34" ,python2-enum34)
1456 ,@(package-propagated-inputs base))))))
1457
1458 (define-public python-parse
1459 (package
1460 (name "python-parse")
1461 (version "1.8.4")
1462 (source
1463 (origin
1464 (method url-fetch)
1465 (uri (pypi-uri "parse" version))
1466 (sha256
1467 (base32
1468 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1469 (build-system python-build-system)
1470 (arguments
1471 `(#:phases
1472 (modify-phases %standard-phases
1473 (replace 'check
1474 (lambda _ (invoke "python" "test_parse.py"))))))
1475 (home-page "https://github.com/r1chardj0n3s/parse")
1476 (synopsis "Parse strings")
1477 (description
1478 "Parse strings using a specification based on the Python @code{format()}
1479 syntax.")
1480 (license license:x11)))
1481
1482 (define-public python-polib
1483 (package
1484 (name "python-polib")
1485 (version "1.0.8")
1486 (source (origin
1487 (method url-fetch)
1488 (uri (pypi-uri "polib" version))
1489 (sha256
1490 (base32
1491 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1492 (build-system python-build-system)
1493 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1494 (synopsis "Manipulate, create and modify gettext files")
1495 (description "Polib can manipulate any gettext format (po, pot and mo)
1496 files. It can be used to create po files from scratch or to modify
1497 existing ones.")
1498 (license license:expat)))
1499
1500 (define-public python2-polib
1501 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1502 (package
1503 (inherit base)
1504 (arguments `(,@(package-arguments base)
1505 ;; Tests don't work with python2.
1506 #:tests? #f)))))
1507
1508 (define-public python-poyo
1509 (package
1510 (name "python-poyo")
1511 (version "0.5.0")
1512 (source
1513 (origin
1514 (method url-fetch)
1515 (uri (pypi-uri "poyo" version))
1516 (sha256
1517 (base32
1518 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1519 (build-system python-build-system)
1520 (home-page "https://github.com/hackebrot/poyo")
1521 (synopsis "Lightweight YAML Parser for Python")
1522 (description
1523 "This package provides a lightweight YAML Parser for Python. It supports
1524 only a chosen subset of the YAML format that is required to parse cookiecutter
1525 user configuration files. It does not have support for serializing into YAML
1526 and is not compatible with JSON.")
1527 (license license:expat)))
1528
1529 (define-public scons
1530 (package
1531 (name "scons")
1532 (version "3.0.4")
1533 (source (origin
1534 (method git-fetch)
1535 (uri (git-reference
1536 (url "https://github.com/SCons/scons.git")
1537 (commit version)))
1538 (file-name (git-file-name name version))
1539 (sha256
1540 (base32
1541 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1542 (build-system python-build-system)
1543 (arguments
1544 `(#:use-setuptools? #f ; still relies on distutils
1545 #:tests? #f ; no 'python setup.py test' command
1546 #:phases
1547 (modify-phases %standard-phases
1548 (add-before 'build 'bootstrap
1549 (lambda _
1550 (substitute* "src/engine/SCons/compat/__init__.py"
1551 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1552 "sys.modules[new] = __import__(old)"))
1553 (substitute* "src/engine/SCons/Platform/__init__.py"
1554 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1555 "mod = __import__(full_name)"))
1556 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1557 (chdir "build/scons")
1558 #t)))))
1559 (home-page "http://scons.org/")
1560 (synopsis "Software construction tool written in Python")
1561 (description
1562 "SCons is a software construction tool. Think of SCons as an improved,
1563 cross-platform substitute for the classic Make utility with integrated
1564 functionality similar to autoconf/automake and compiler caches such as ccache.
1565 In short, SCons is an easier, more reliable and faster way to build
1566 software.")
1567 (license license:x11)))
1568
1569 (define-public scons-python2
1570 (package
1571 (inherit (package-with-python2 scons))
1572 (name "scons-python2")))
1573
1574 (define-public python-extras
1575 (package
1576 (name "python-extras")
1577 (version "1.0.0")
1578 (source
1579 (origin
1580 (method url-fetch)
1581 (uri (pypi-uri "extras" version))
1582 (sha256
1583 (base32
1584 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1585 (build-system python-build-system)
1586 (arguments
1587 ;; FIXME: Circular dependency on testtools.
1588 '(#:tests? #f))
1589 (home-page "https://github.com/testing-cabal/extras")
1590 (synopsis "Useful extensions to the Python standard library")
1591 (description
1592 "Extras is a set of extensions to the Python standard library.")
1593 (license license:expat)))
1594
1595 (define-public python2-extras
1596 (package-with-python2 python-extras))
1597
1598 (define-public python-mimeparse
1599 (package
1600 (name "python-mimeparse")
1601 (version "1.6.0")
1602 (source
1603 (origin
1604 (method url-fetch)
1605 (uri (pypi-uri "python-mimeparse" version))
1606 (sha256
1607 (base32
1608 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1609 (build-system python-build-system)
1610 (arguments
1611 '(#:phases
1612 (modify-phases %standard-phases
1613 (replace 'check
1614 (lambda _
1615 (invoke "./mimeparse_test.py"))))))
1616 (home-page
1617 "https://github.com/dbtsai/python-mimeparse")
1618 (synopsis "Python library for parsing MIME types")
1619 (description
1620 "Mimeparse provides basic functions for parsing MIME type names and
1621 matching them against a list of media-ranges.")
1622 (license license:expat)))
1623
1624 (define-public python2-mimeparse
1625 (package-with-python2 python-mimeparse))
1626
1627 (define-public python-miniboa
1628 (package
1629 (name "python-miniboa")
1630 (version "1.0.7")
1631 (source
1632 (origin
1633 (method url-fetch)
1634 (uri (pypi-uri "miniboa" version))
1635 (sha256
1636 (base32
1637 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1638 (build-system python-build-system)
1639 (home-page "https://github.com/shmup/miniboa")
1640 (synopsis "Simple, single-threaded Telnet server")
1641 (description
1642 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1643 server.")
1644 (license license:asl2.0)))
1645
1646 (define-public python2-miniboa
1647 (package-with-python2 python-miniboa))
1648
1649 (define-public python-pafy
1650 (package
1651 (name "python-pafy")
1652 (version "0.5.3.1")
1653 (source
1654 (origin
1655 (method url-fetch)
1656 (uri (pypi-uri "pafy" version))
1657 (sha256
1658 (base32
1659 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1660 (build-system python-build-system)
1661 (arguments
1662 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1663 (propagated-inputs
1664 ;; Youtube-dl is a python package which is imported in the file
1665 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1666 `(("youtube-dl" ,youtube-dl)))
1667 (home-page "https://np1.github.io/pafy/")
1668 (synopsis "Retrieve YouTube content and metadata")
1669 (description
1670 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1671 (license license:lgpl3+)))
1672
1673 (define-public python2-funcsigs
1674 (package
1675 (name "python2-funcsigs")
1676 (version "1.0.2")
1677 (source (origin
1678 (method url-fetch)
1679 (uri (pypi-uri "funcsigs" version))
1680 (sha256
1681 (base32
1682 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1683 (build-system python-build-system)
1684 (arguments
1685 `(#:python ,python-2))
1686 (native-inputs
1687 `(("python2-unittest2" ,python2-unittest2)))
1688 (home-page "http://funcsigs.readthedocs.org")
1689 (synopsis "Python function signatures from PEP362")
1690 (description
1691 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1692 (license license:asl2.0)))
1693
1694 (define-public python2-funcsigs-bootstrap
1695 (package
1696 (inherit python2-funcsigs)
1697 (name "python2-funcsigs-bootstrap")
1698 (native-inputs `())
1699 (arguments
1700 `(#:tests? #f
1701 ,@(package-arguments python2-funcsigs)))))
1702
1703 (define-public python-py
1704 (package
1705 (name "python-py")
1706 (version "1.8.0")
1707 (source
1708 (origin
1709 (method url-fetch)
1710 (uri (pypi-uri "py" version))
1711 (sha256
1712 (base32
1713 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1714 (build-system python-build-system)
1715 (arguments
1716 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1717 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1718 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1719 ;; Is this module globally installed?"
1720 '(#:tests? #f))
1721 (native-inputs
1722 `(("python-setuptools-scm" ,python-setuptools-scm)))
1723 (home-page "https://github.com/pytest-dev/py")
1724 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1725 (description
1726 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1727 code introspection, and logging.")
1728 (license license:expat)))
1729
1730 (define-public python2-py
1731 (package-with-python2 python-py))
1732
1733 ;; Recent versions of python-fixtures and python-testrepository need
1734 ;; python-pbr for packaging, which itself needs these two packages for
1735 ;; testing.
1736 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1737 ;; same source, just without any test dependencies and with tests disabled.
1738 ;; python-pbr-minmal is then used to package python-fixtures and
1739 ;; python-testrepository.
1740 ;; Strictly speaking we currently could remove the test-requirements from the
1741 ;; normal python-pbr package (and save this package) since test are disabled
1742 ;; there anyway. But this may change in future.
1743 (define-public python-pbr-minimal
1744 (package
1745 (name "python-pbr-minimal")
1746 (version "3.0.1")
1747 (source
1748 (origin
1749 (method url-fetch)
1750 (uri (pypi-uri "pbr" version))
1751 (sha256
1752 (base32
1753 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1754 (build-system python-build-system)
1755 (arguments
1756 `(#:tests? #f))
1757 (home-page "http://docs.openstack.org/developer/pbr/")
1758 (synopsis "Minimal build of python-pbr used for bootstrapping")
1759 (description
1760 "Used only for bootstrapping python2-pbr, you should not need this.")
1761 (license license:asl2.0)))
1762
1763 (define-public python2-pbr-minimal
1764 (package-with-python2 python-pbr-minimal))
1765
1766 (define-public python-pbr
1767 (package
1768 (inherit python-pbr-minimal)
1769 (name "python-pbr")
1770 (arguments
1771 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1772 (propagated-inputs
1773 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1774 (native-inputs
1775 `(("python-fixtures" ,python-fixtures-bootstrap)
1776 ;; discover, coverage, hacking, subunit
1777 ("python-mock" ,python-mock)
1778 ("python-six" ,python-six)
1779 ("python-sphinx" ,python-sphinx)
1780 ("python-testrepository" ,python-testrepository-bootstrap)
1781 ("python-testresources" ,python-testresources-bootstrap)
1782 ("python-testscenarios" ,python-testscenarios-bootstrap)
1783 ("python-testtools" ,python-testtools-bootstrap)
1784 ("python-virtualenv" ,python-virtualenv)))
1785 (synopsis "Enhance the default behavior of Python’s setuptools")
1786 (description
1787 "Python Build Reasonableness (PBR) is a library that injects some useful
1788 and sensible default behaviors into your setuptools run. It will set
1789 versions, process requirements files and generate AUTHORS and ChangeLog file
1790 from git information.
1791 ")))
1792
1793 (define-public python2-pbr
1794 (package-with-python2 python-pbr))
1795
1796 (define-public python-pyrsistent
1797 (package
1798 (name "python-pyrsistent")
1799 (version "0.14.11")
1800 (home-page "https://github.com/tobgu/pyrsistent")
1801 (source (origin
1802 (method url-fetch)
1803 (uri (pypi-uri "pyrsistent" version))
1804 (sha256
1805 (base32
1806 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1807 (build-system python-build-system)
1808 (native-inputs
1809 `(("python-hypothesis" ,python-hypothesis)
1810 ("python-pytest" ,python-pytest)
1811 ("python-pytest-runner" ,python-pytest-runner)))
1812 (propagated-inputs
1813 `(("python-six" ,python-six)))
1814 (synopsis "Persistent data structures for Python")
1815 (description
1816 "Pyrsistent is a number of persistent collections (by some referred to as
1817 functional data structures). Persistent in the sense that they are immutable.
1818
1819 All methods on a data structure that would normally mutate it instead return a
1820 new copy of the structure containing the requested updates. The original
1821 structure is left untouched.")
1822 (license license:expat)))
1823
1824 (define-public python2-pyrsistent
1825 (package-with-python2 python-pyrsistent))
1826
1827 (define-public python-exif-read
1828 (package
1829 (name "python-exif-read")
1830 (version "2.1.2")
1831 (source (origin
1832 (method url-fetch)
1833 (uri (pypi-uri "ExifRead" version))
1834 (sha256
1835 (base32
1836 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1837 (build-system python-build-system)
1838 (arguments `(#:tests? #f)) ; no tests
1839 (home-page "https://github.com/ianare/exif-py")
1840 (synopsis "Python library to extract EXIF data from image files")
1841 (description
1842 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1843 files.")
1844 (license license:bsd-3)))
1845
1846 (define-public python2-exif-read
1847 (package-with-python2 python-exif-read))
1848
1849 (define-public python-pyld
1850 (package
1851 (name "python-pyld")
1852 (version "1.0.5")
1853 (source (origin
1854 (method url-fetch)
1855 (uri (pypi-uri "PyLD" version))
1856 (sha256
1857 (base32
1858 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1859 (build-system python-build-system)
1860 (home-page "https://github.com/digitalbazaar/pyld")
1861 (synopsis "Python implementation of the JSON-LD specification")
1862 (description
1863 "PyLD is an implementation of the JSON-LD specification.")
1864 (license license:bsd-3)))
1865
1866 (define-public python2-pyld
1867 (package-with-python2 python-pyld))
1868
1869 (define-public python-click
1870 (package
1871 (name "python-click")
1872 (version "7.0")
1873 (source
1874 (origin
1875 (method url-fetch)
1876 (uri (pypi-uri "click" version))
1877 (sha256
1878 (base32
1879 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1880 (build-system python-build-system)
1881 (arguments
1882 `(#:phases
1883 (modify-phases %standard-phases
1884 (add-after 'unpack 'fix-paths
1885 (lambda* (#:key inputs #:allow-other-keys)
1886 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1887 "cross-libc" "libc"))))
1888 (substitute* "click/_unicodefun.py"
1889 (("'locale'")
1890 (string-append "'" glibc "/bin/locale'"))))
1891 #t))
1892 (replace 'check
1893 (lambda _
1894 (invoke "python" "-m" "pytest"))))))
1895 (native-inputs
1896 `(("python-pytest" ,python-pytest)))
1897 (home-page "https://palletsprojects.com/p/click/")
1898 (synopsis "Command line library for Python")
1899 (description
1900 "Click is a Python package for creating command line interfaces in a
1901 composable way with as little code as necessary. Its name stands for
1902 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1903 with sensible defaults out of the box.")
1904 (license license:bsd-3)))
1905
1906 (define-public python2-click
1907 (package-with-python2 python-click))
1908
1909 (define-public python-wheel
1910 (package
1911 (name "python-wheel")
1912 (version "0.33.6")
1913 (source
1914 (origin
1915 (method url-fetch)
1916 (uri (pypi-uri "wheel" version))
1917 (sha256
1918 (base32
1919 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
1920 (build-system python-build-system)
1921 (arguments
1922 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
1923 ;; fails to find the newly-built bdist_wheel library, even though it is
1924 ;; available on PYTHONPATH. What search path is consulted by setup.py?
1925 '(#:tests? #f))
1926 (home-page "https://bitbucket.org/pypa/wheel/")
1927 (synopsis "Format for built Python packages")
1928 (description
1929 "A wheel is a ZIP-format archive with a specially formatted filename and
1930 the @code{.whl} extension. It is designed to contain all the files for a PEP
1931 376 compatible install in a way that is very close to the on-disk format. Many
1932 packages will be properly installed with only the @code{Unpack} step and the
1933 unpacked archive preserves enough information to @code{Spread} (copy data and
1934 scripts to their final locations) at any later time. Wheel files can be
1935 installed with a newer @code{pip} or with wheel's own command line utility.")
1936 (license license:expat)))
1937
1938 (define-public python2-wheel
1939 (package-with-python2 python-wheel))
1940
1941 (define-public python-vcversioner
1942 (package
1943 (name "python-vcversioner")
1944 (version "2.16.0.0")
1945 (source
1946 (origin
1947 (method url-fetch)
1948 (uri (pypi-uri "vcversioner" version))
1949 (sha256
1950 (base32
1951 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1952 (build-system python-build-system)
1953 (synopsis "Python library for version number discovery")
1954 (description "Vcversioner is a Python library that inspects tagging
1955 information in a variety of version control systems in order to discover
1956 version numbers.")
1957 (home-page "https://github.com/habnabit/vcversioner")
1958 (license license:isc)))
1959
1960 (define-public python2-vcversioner
1961 (package-with-python2 python-vcversioner))
1962
1963 (define-public python-jdcal
1964 (package
1965 (name "python-jdcal")
1966 (version "1.4")
1967 (source
1968 (origin
1969 (method url-fetch)
1970 (uri (pypi-uri "jdcal" version))
1971 (sha256
1972 (base32
1973 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1974 (build-system python-build-system)
1975 (arguments
1976 `(#:phases (modify-phases %standard-phases
1977 (replace 'check
1978 (lambda _
1979 (invoke "pytest"))))))
1980 (native-inputs
1981 `(("python-pytest" ,python-pytest)))
1982 (home-page "https://github.com/phn/jdcal")
1983 (synopsis "Functions to convert between Julian dates Gregorian dates")
1984 (description "This Python library provides functions for converting
1985 between Julian dates and Gregorian dates.")
1986 (license license:bsd-2)))
1987
1988 (define-public python2-jdcal
1989 (package-with-python2 python-jdcal))
1990
1991 (define-public python-jsonschema
1992 (package
1993 (name "python-jsonschema")
1994 (version "3.0.1")
1995 (source (origin
1996 (method url-fetch)
1997 (uri (pypi-uri "jsonschema" version))
1998 (sha256
1999 (base32
2000 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2001 (build-system python-build-system)
2002 (arguments
2003 '(#:phases
2004 (modify-phases %standard-phases
2005 (replace 'check
2006 (lambda _
2007 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2008 (invoke "trial" "jsonschema"))))))
2009 (native-inputs
2010 `(("python-setuptools_scm" ,python-setuptools-scm)
2011 ("python-twisted" ,python-twisted)))
2012 (propagated-inputs
2013 `(("python-attrs" ,python-attrs)
2014 ("python-pyrsistent" ,python-pyrsistent)
2015 ("python-six" ,python-six)))
2016 (home-page "https://github.com/Julian/jsonschema")
2017 (synopsis "Implementation of JSON Schema for Python")
2018 (description
2019 "Jsonschema is an implementation of JSON Schema for Python.")
2020 (license license:expat)
2021 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2022
2023 (define-public python2-jsonschema
2024 (let ((jsonschema (package-with-python2
2025 (strip-python2-variant python-jsonschema))))
2026 (package (inherit jsonschema)
2027 (propagated-inputs
2028 `(("python2-functools32" ,python2-functools32)
2029 ,@(package-propagated-inputs jsonschema))))))
2030
2031 ;; This old version is still required by docker-compose as of 1.24.0.
2032 (define-public python-jsonschema-2.6
2033 (package
2034 (name "python-jsonschema")
2035 (version "2.6.0")
2036 (source (origin
2037 (method url-fetch)
2038 (uri (pypi-uri "jsonschema" version))
2039 (sha256
2040 (base32
2041 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2042 (build-system python-build-system)
2043 (arguments
2044 '(#:phases
2045 (modify-phases %standard-phases
2046 (replace 'check (lambda _ (invoke "nosetests"))))))
2047 (native-inputs
2048 `(("python-nose" ,python-nose)
2049 ("python-vcversioner" ,python-vcversioner)))
2050 (home-page "https://github.com/Julian/jsonschema")
2051 (synopsis "Implementation of JSON Schema for Python")
2052 (description
2053 "Jsonschema is an implementation of JSON Schema for Python.")
2054 (license license:expat)
2055 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2056
2057 (define-public python-schema
2058 (package
2059 (name "python-schema")
2060 (version "0.6.6")
2061 (source
2062 (origin
2063 (method url-fetch)
2064 (uri (pypi-uri "schema" version))
2065 (sha256
2066 (base32
2067 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2068 (build-system python-build-system)
2069 (native-inputs
2070 `(("python-pytest" ,python-pytest)))
2071 (home-page "https://github.com/keleshev/schema")
2072 (synopsis "Simple data validation library")
2073 (description
2074 "@code{python-schema} is a library for validating Python data
2075 structures, such as those obtained from config-files, forms, external
2076 services or command-line parsing, converted from JSON/YAML (or
2077 something else) to Python data-types.")
2078 (license license:psfl)))
2079
2080 (define-public python2-schema
2081 (package-with-python2 python-schema))
2082
2083 (define-public python-schema-0.5
2084 (package (inherit python-schema)
2085 (version "0.5.0")
2086 (source
2087 (origin
2088 (method url-fetch)
2089 (uri (pypi-uri "schema" version))
2090 (sha256
2091 (base32
2092 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2093
2094 (define-public python2-schema-0.5
2095 (package-with-python2 python-schema-0.5))
2096
2097 (define-public python-kitchen
2098 (package
2099 (name "python-kitchen")
2100 (version "1.2.5")
2101 (source
2102 (origin
2103 (method url-fetch)
2104 (uri (pypi-uri "kitchen" version))
2105 (sha256
2106 (base32
2107 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2108 (build-system python-build-system)
2109 (propagated-inputs
2110 `(("python-chardet" ,python-chardet)))
2111 (home-page "https://github.com/fedora-infra/kitchen")
2112 (synopsis "Python API for snippets")
2113 (description "@code{kitchen} module provides a python API for all sorts of
2114 little useful snippets of code that everybody ends up writing for their projects
2115 but never seem big enough to build an independent release. Use kitchen and stop
2116 cutting and pasting that code over and over.")
2117 (license (list license:lgpl2.1+
2118 ;; subprocess.py, test_subprocess.py,
2119 ;; kitchen/pycompat25/defaultdict.py:
2120 license:psfl))))
2121
2122 (define-public python2-kitchen
2123 (package-with-python2 python-kitchen))
2124
2125 (define-public python-unidecode
2126 (package
2127 (name "python-unidecode")
2128 (version "1.1.1")
2129 (source (origin
2130 (method url-fetch)
2131 (uri (pypi-uri "Unidecode" version))
2132 (sha256
2133 (base32
2134 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2135 (build-system python-build-system)
2136 (home-page "https://pypi.python.org/pypi/Unidecode")
2137 (synopsis "ASCII transliterations of Unicode text")
2138 (description
2139 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2140 useful when integrating with legacy code that doesn't support Unicode, or for
2141 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2142 machine identifiers from human-readable Unicode strings that should still be
2143 somewhat intelligible.")
2144 (license license:gpl2+)))
2145
2146 (define-public python2-unidecode
2147 (package-with-python2 python-unidecode))
2148
2149 (define-public python-pyjwt
2150 (package
2151 (name "python-pyjwt")
2152 (version "1.7.1")
2153 (source
2154 (origin
2155 (method url-fetch)
2156 (uri (pypi-uri "PyJWT" version))
2157 (sha256
2158 (base32
2159 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2160 (modules '((guix build utils)))
2161 (snippet
2162 '(begin
2163 (for-each delete-file-recursively
2164 (find-files "." "\\.pyc$"))
2165 #t))))
2166 (build-system python-build-system)
2167 (native-inputs
2168 `(("python-pytest" ,python-pytest)
2169 ("python-pytest-cov" ,python-pytest-cov)
2170 ("python-pytest-runner" ,python-pytest-runner)))
2171 (home-page "https://github.com/progrium/pyjwt")
2172 (synopsis "JSON Web Token implementation in Python")
2173 (description
2174 "PyJWT is a JSON Web Token implementation written in Python.")
2175 (license license:expat)))
2176
2177 (define-public python2-pyjwt
2178 (package-with-python2 python-pyjwt))
2179
2180 (define-public python-pykka
2181 (package
2182 (name "python-pykka")
2183 (version "1.2.1")
2184 (source
2185 (origin
2186 (method url-fetch)
2187 (uri (pypi-uri "Pykka" version))
2188 (sha256
2189 (base32
2190 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2191 (build-system python-build-system)
2192 (native-inputs
2193 `(("python-mock" ,python-mock)
2194 ("python-nose" ,python-nose)
2195 ("python-gevent" ,python-gevent)
2196 ("python-eventlet" ,python-eventlet)))
2197 (home-page "https://www.pykka.org/")
2198 (synopsis "Pykka is a Python implementation of the actor model")
2199 (description
2200 "Pykka is a Python implementation of the actor model.
2201 The actor model introduces some simple rules to control the sharing
2202 of state and cooperation between execution units, which makes it
2203 easier to build concurrent applications.")
2204 (license license:asl2.0)))
2205
2206 (define-public python2-pykka
2207 (package-with-python2 python-pykka))
2208
2209 (define-public python-pymsgbox
2210 (package
2211 (name "python-pymsgbox")
2212 (version "1.0.6")
2213 (source
2214 (origin
2215 (method git-fetch)
2216 (uri (git-reference
2217 ;; LICENSE.txt is not present on pypi
2218 (url "https://github.com/asweigart/PyMsgBox")
2219 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2220 (file-name (git-file-name name version))
2221 (sha256
2222 (base32
2223 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2224 (arguments
2225 ;; Circular dependency to run tests:
2226 ;; Tests need pyautogui, which depends on pymsgbox.
2227 '(#:tests? #f))
2228 (build-system python-build-system)
2229 (home-page "https://github.com/asweigart/PyMsgBox")
2230 (synopsis "Python module for JavaScript-like message boxes")
2231 (description
2232 "PyMsgBox is a simple, cross-platform, pure Python module for
2233 JavaScript-like message boxes. Types of dialog boxes include:
2234 @enumerate
2235 @item alert
2236 @item confirm
2237 @item prompt
2238 @item password
2239 @end enumerate
2240 ")
2241 (license license:bsd-3)))
2242
2243 (define-public python-pympler
2244 (package
2245 (name "python-pympler")
2246 (home-page "https://pythonhosted.org/Pympler/")
2247 (version "0.7")
2248 (source (origin
2249 (method url-fetch)
2250 (uri (pypi-uri "Pympler" version))
2251 (sha256
2252 (base32
2253 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2254 (build-system python-build-system)
2255 (arguments
2256 `(#:phases (modify-phases %standard-phases
2257 (delete 'check)
2258 (add-after 'install 'check
2259 (lambda* (#:key inputs outputs #:allow-other-keys)
2260 (add-installed-pythonpath inputs outputs)
2261 (invoke "python" "setup.py" "test"))))))
2262 (synopsis "Measure, monitor and analyze memory behavior")
2263 (description
2264 "Pympler is a development tool to measure, monitor and analyze
2265 the memory behavior of Python objects in a running Python application.
2266
2267 By pympling a Python application, detailed insight in the size and the
2268 lifetime of Python objects can be obtained. Undesirable or unexpected
2269 runtime behavior like memory bloat and other @samp{pymples} can easily
2270 be identified.
2271
2272 A web profiling frontend exposes process statistics, garbage
2273 visualisation and class tracker statistics.")
2274 (license license:asl2.0)))
2275
2276 (define-public python2-pympler
2277 (package-with-python2 python-pympler))
2278
2279 (define-public python-itsdangerous
2280 (package
2281 (name "python-itsdangerous")
2282 (version "1.1.0")
2283 (source
2284 (origin
2285 (method url-fetch)
2286 (uri (pypi-uri "itsdangerous" version))
2287 (sha256
2288 (base32
2289 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2290 (build-system python-build-system)
2291 (home-page "https://palletsprojects.com/p/itsdangerous/")
2292 (synopsis "Python library for passing data to/from untrusted environments")
2293 (description
2294 "Itsdangerous provides various helpers to pass trusted data to untrusted
2295 environments and back.")
2296 (license license:bsd-3)))
2297
2298 (define-public python2-itsdangerous
2299 (package-with-python2 python-itsdangerous))
2300
2301 (define-public python-pyyaml
2302 (package
2303 (name "python-pyyaml")
2304 (version "3.13")
2305 (source
2306 (origin
2307 (method url-fetch)
2308 (uri (pypi-uri "PyYAML" version))
2309 (sha256
2310 (base32
2311 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2312 (build-system python-build-system)
2313 (inputs
2314 `(("libyaml" ,libyaml)))
2315 (home-page "http://pyyaml.org/wiki/PyYAML")
2316 (synopsis "YAML parser and emitter for Python")
2317 (description
2318 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2319 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2320 API, and sensible error messages. PyYAML supports standard YAML tags and
2321 provides Python-specific tags that allow to represent an arbitrary Python
2322 object.")
2323 (license license:expat)))
2324
2325 (define-public python2-pyyaml
2326 (package-with-python2 python-pyyaml))
2327
2328 (define-public python-vine
2329 (package
2330 (name "python-vine")
2331 (version "1.1.4")
2332 (source
2333 (origin
2334 (method url-fetch)
2335 (uri (pypi-uri "vine" version))
2336 (sha256
2337 (base32
2338 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2339 (build-system python-build-system)
2340 (native-inputs
2341 `(("python-pytest" ,python-pytest)
2342 ("python-case" ,python-case)))
2343 (home-page "https://github.com/celery/vine")
2344 (synopsis "Promises for Python")
2345 (description
2346 "@code{vine} provides a special implementation of promises in that it can
2347 be used both for \"promise of a value\" and lazy evaluation. The biggest
2348 upside for this is that everything in a promise can also be a promise,
2349 e.g. filters, callbacks and errbacks can all be promises.")
2350 (license license:bsd-3)))
2351
2352 (define-public python-virtualenv
2353 (package
2354 (name "python-virtualenv")
2355 (version "16.1.0")
2356 (source
2357 (origin
2358 (method url-fetch)
2359 (uri (pypi-uri "virtualenv" version))
2360 (sha256
2361 (base32
2362 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2363 (build-system python-build-system)
2364 (arguments
2365 `(#:phases
2366 (modify-phases %standard-phases
2367 (add-before 'check 'disable-failing-test
2368 (lambda _
2369 ;; Disable failing test. See upstream bug report
2370 ;; https://github.com/pypa/virtualenv/issues/957
2371 (substitute* "tests/test_virtualenv.py"
2372 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2373 #t)))))
2374 (native-inputs
2375 `(("python-mock" ,python-mock)
2376 ("python-pytest" ,python-pytest)))
2377 (home-page "https://virtualenv.pypa.io/")
2378 (synopsis "Virtual Python environment builder")
2379 (description
2380 "Virtualenv is a tool to create isolated Python environments.")
2381 (license license:expat)))
2382
2383 (define-public python2-virtualenv
2384 (package-with-python2 python-virtualenv))
2385
2386 (define-public python-markupsafe
2387 (package
2388 (name "python-markupsafe")
2389 (version "1.1.1")
2390 (source
2391 (origin
2392 (method url-fetch)
2393 (uri (pypi-uri "MarkupSafe" version))
2394 (sha256
2395 (base32
2396 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2397 (build-system python-build-system)
2398 (arguments
2399 `(#:modules ((ice-9 ftw)
2400 (srfi srfi-1)
2401 (srfi srfi-26)
2402 (guix build utils)
2403 (guix build python-build-system))
2404 #:phases (modify-phases %standard-phases
2405 (replace 'check
2406 (lambda _
2407 (let ((cwd (getcwd))
2408 (libdir (find (cut string-prefix? "lib." <>)
2409 (scandir "build"))))
2410 (setenv "PYTHONPATH"
2411 (string-append cwd "/build/" libdir ":"
2412 (getenv "PYTHONPATH")))
2413 (invoke "pytest" "-vv")))))))
2414 (native-inputs
2415 `(("python-pytest" ,python-pytest)))
2416 (home-page "https://github.com/mitsuhiko/markupsafe")
2417 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2418 (description
2419 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2420 for Python.")
2421 (license license:bsd-3)))
2422
2423 (define-public python2-markupsafe
2424 (package-with-python2 python-markupsafe))
2425
2426 (define-public python-jinja2
2427 (package
2428 (name "python-jinja2")
2429 (version "2.10.1")
2430 (source
2431 (origin
2432 (method url-fetch)
2433 (uri (pypi-uri "Jinja2" version))
2434 (sha256
2435 (base32
2436 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2437 (build-system python-build-system)
2438 (propagated-inputs
2439 `(("python-markupsafe" ,python-markupsafe)))
2440 (home-page "http://jinja.pocoo.org/")
2441 (synopsis "Python template engine")
2442 (description
2443 "Jinja2 is a small but fast and easy to use stand-alone template engine
2444 written in pure Python.")
2445 (license license:bsd-3)))
2446
2447 (define-public python2-jinja2
2448 (package-with-python2 python-jinja2))
2449
2450 (define-public python-jinja2-time
2451 (package
2452 (name "python-jinja2-time")
2453 (version "0.2.0")
2454 (source
2455 (origin
2456 (method url-fetch)
2457 (uri (pypi-uri "jinja2-time" version))
2458 (sha256
2459 (base32
2460 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2461 (build-system python-build-system)
2462 (propagated-inputs
2463 `(("python-arrow" ,python-arrow)
2464 ("python-jinja2" ,python-jinja2)))
2465 (home-page
2466 "https://github.com/hackebrot/jinja2-time")
2467 (synopsis "Jinja2 Extension for Dates and Times")
2468 (description
2469 "This package provides an extension for the template engine Jinja2. It
2470 adds a 'now' tag providing a convenient access to the arrow.now() API from
2471 templates. A format string can be provided to control the output.")
2472 (license license:expat)))
2473
2474 (define-public python-pystache
2475 (package
2476 (name "python-pystache")
2477 (version "0.5.4")
2478 (source (origin
2479 (method url-fetch)
2480 (uri (pypi-uri "pystache" version))
2481 (sha256
2482 (base32
2483 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2484 (build-system python-build-system)
2485 (arguments
2486 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2487 (home-page "http://defunkt.io/pystache/")
2488 (synopsis "Python logic-less template engine")
2489 (description
2490 "Pystache is a Python implementation of the framework agnostic,
2491 logic-free templating system Mustache.")
2492 (license license:expat)
2493 (properties `((python2-variant . ,(delay python2-pystache))))))
2494
2495 (define-public python2-pystache
2496 (package (inherit (package-with-python2
2497 (strip-python2-variant python-pystache)))
2498 (arguments
2499 `(#:python ,python-2
2500 #:phases
2501 (modify-phases %standard-phases
2502 (replace 'check
2503 (lambda _
2504 (invoke "python" "test_pystache.py"))))))))
2505
2506 (define-public python-joblib
2507 (package
2508 (name "python-joblib")
2509 (version "0.13.0")
2510 (source (origin
2511 (method url-fetch)
2512 (uri (pypi-uri "joblib" version))
2513 (sha256
2514 (base32
2515 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2516 (build-system python-build-system)
2517 (arguments
2518 `(#:phases
2519 (modify-phases %standard-phases
2520 (replace 'check
2521 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2522 (native-inputs
2523 `(("python-pytest" ,python-pytest)))
2524 (home-page "https://joblib.readthedocs.io/")
2525 (synopsis "Using Python functions as pipeline jobs")
2526 (description
2527 "Joblib is a set of tools to provide lightweight pipelining in Python.
2528 In particular, joblib offers: transparent disk-caching of the output values
2529 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2530 logging and tracing of the execution.")
2531 (license license:bsd-3)))
2532
2533 (define-public python2-joblib
2534 (package-with-python2 python-joblib))
2535
2536 (define-public python-daemon
2537 (package
2538 (name "python-daemon")
2539 (version "2.2.3")
2540 (source
2541 (origin
2542 (method url-fetch)
2543 (uri (pypi-uri "python-daemon" version))
2544 (sha256
2545 (base32
2546 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2547 (build-system python-build-system)
2548 (arguments
2549 `(#:phases
2550 (modify-phases %standard-phases
2551 (add-before 'check 'disable-tests
2552 (lambda _
2553 ;; FIXME: Determine why test fails
2554 (substitute* "test/test_daemon.py"
2555 (("test_detaches_process_context")
2556 "skip_test_detaches_process_context"))
2557 #t)))))
2558 (propagated-inputs
2559 `(("python-lockfile" ,python-lockfile)))
2560 (native-inputs
2561 `(("python-unittest2" ,python-unittest2)
2562 ("python-testtools" ,python-testtools)
2563 ("python-testscenarios" ,python-testscenarios)
2564 ("python-mock" ,python-mock)
2565 ("python-docutils" ,python-docutils)))
2566 (home-page "https://pagure.io/python-daemon/")
2567 (synopsis "Python library for making a Unix daemon process")
2568 (description "Python-daemon is a library that assists a Python program to
2569 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2570
2571 This library provides a @code{DaemonContext} class that manages the following
2572 important tasks for becoming a daemon process:
2573 @enumerate
2574 @item Detach the process into its own process group.
2575 @item Set process environment appropriate for running inside a chroot.
2576 @item Renounce suid and sgid privileges.
2577 @item Close all open file descriptors.
2578 @item Change the working directory, uid, gid, and umask.
2579 @item Set appropriate signal handlers.
2580 @item Open new file descriptors for stdin, stdout, and stderr.
2581 @item Manage a specified PID lock file.
2582 @item Register cleanup functions for at-exit processing.
2583 @end enumerate")
2584 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2585 (license (list license:asl2.0 license:gpl3+))))
2586
2587 (define-public python-anytree
2588 (package
2589 (name "python-anytree")
2590 (version "2.8.0")
2591 (source (origin
2592 (method url-fetch)
2593 (uri (pypi-uri "anytree" version))
2594 (sha256
2595 (base32
2596 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2597 (build-system python-build-system)
2598 (propagated-inputs
2599 `(("python-six" ,python-six)))
2600 (native-inputs
2601 `(;; For tests.
2602 ("graphviz" ,graphviz) ;for 'dot'
2603 ("python-nose" ,python-nose)))
2604 (home-page "https://github.com/c0fec0de/anytree")
2605 (synopsis "Lightweight tree data library")
2606 (description
2607 "@code{anytree} is a simple, lightweight, and extensible tree data
2608 structure for Python.")
2609 (license license:asl2.0)))
2610
2611 (define-public python-docutils
2612 (package
2613 (name "python-docutils")
2614 (version "0.14")
2615 (source
2616 (origin
2617 (method url-fetch)
2618 (uri (pypi-uri "docutils" version))
2619 (sha256
2620 (base32
2621 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2622 (build-system python-build-system)
2623 (arguments
2624 '(#:tests? #f)) ; no setup.py test command
2625 (home-page "http://docutils.sourceforge.net/")
2626 (synopsis "Python Documentation Utilities")
2627 (description
2628 "Docutils is a modular system for processing documentation into useful
2629 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2630 reStructuredText.")
2631 ;; Most of the source code is public domain, but some source files are
2632 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2633 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2634
2635 (define-public python2-docutils
2636 (package-with-python2 python-docutils))
2637
2638 (define-public python-pygments
2639 (package
2640 (name "python-pygments")
2641 (version "2.5.2")
2642 (source
2643 (origin
2644 (method url-fetch)
2645 (uri (pypi-uri "Pygments" version))
2646 (sha256
2647 (base32
2648 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
2649 (build-system python-build-system)
2650 (arguments
2651 ;; FIXME: Tests require sphinx, which depends on this.
2652 '(#:tests? #f))
2653 (home-page "http://pygments.org/")
2654 (synopsis "Syntax highlighting")
2655 (description
2656 "Pygments is a syntax highlighting package written in Python.")
2657 (license license:bsd-2)))
2658
2659 (define-public python2-pygments
2660 (package-with-python2 python-pygments))
2661
2662 (define-public python-bumpversion
2663 (package
2664 (name "python-bumpversion")
2665 (version "0.5.3")
2666 (source
2667 (origin
2668 (method url-fetch)
2669 (uri (pypi-uri "bumpversion" version))
2670 (sha256
2671 (base32
2672 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2673 (build-system python-build-system)
2674 (home-page "https://github.com/peritus/bumpversion")
2675 (synopsis "Tool to bump software version")
2676 (description "This tool provides a command-line interface (CLI) to bump a
2677 software version simply.")
2678 (license license:expat)))
2679
2680 (define-public python-deprecated
2681 (package
2682 (name "python-deprecated")
2683 (version "1.2.5")
2684 (source
2685 (origin
2686 (method git-fetch)
2687 (uri (git-reference
2688 (url "https://github.com/tantale/deprecated.git")
2689 (commit (string-append "v" version))))
2690 (file-name (git-file-name name version))
2691 (sha256
2692 (base32
2693 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2694 (build-system python-build-system)
2695 (arguments
2696 `(#:phases (modify-phases %standard-phases
2697 (replace 'check
2698 (lambda _
2699 (invoke "pytest"))))))
2700 (propagated-inputs
2701 `(("python-wrapt" ,python-wrapt)))
2702 (native-inputs
2703 `(("python-bumpversion" ,python-bumpversion)
2704 ("python-pytest" ,python-pytest)
2705 ("python-pytest-cov" ,python-pytest-cov)
2706 ("python-sphinx" ,python-sphinx)
2707 ("python-tox" ,python-tox)))
2708 (home-page "https://github.com/tantale/deprecated")
2709 (synopsis "Python decorator to deprecate classes, functions or methods")
2710 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2711 to deprecate classes, functions or methods.")
2712 (license license:expat)))
2713
2714 (define-public python-pygithub
2715 (package
2716 (name "python-pygithub")
2717 (version "1.43.8")
2718 (source
2719 ;; We fetch from the Git repo because there are no tests in the PyPI
2720 ;; archive.
2721 (origin
2722 (method git-fetch)
2723 (uri (git-reference
2724 (url "https://github.com/PyGithub/PyGithub.git")
2725 (commit (string-append "v" version))))
2726 (file-name (git-file-name name version))
2727 (sha256
2728 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2729 (build-system python-build-system)
2730 (arguments
2731 `(#:phases (modify-phases %standard-phases
2732 ;; Some tests rely on the network.
2733 (add-after 'unpack 'disable-failing-tests
2734 (lambda _
2735 (substitute* "tests/Issue142.py"
2736 (("testDecodeJson") "disabled_testDecodeJson"))
2737 #t))
2738 (add-before 'check 'prepare-for-tests
2739 (lambda _
2740 (for-each (lambda (f)
2741 (chmod f #o666))
2742 (find-files "./tests"))
2743 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2744 (setenv "PYTHONPATH"
2745 (string-append "./tests:" (getenv "PYTHONPATH")))
2746 #t)))))
2747 (propagated-inputs
2748 `(("python-deprecated" ,python-deprecated)
2749 ("python-pyjwt" ,python-pyjwt)
2750 ("python-requests" ,python-requests)))
2751 (native-inputs `(("python-httpretty" ,python-httpretty)))
2752 (home-page "https://pygithub.readthedocs.io/en/latest/")
2753 (synopsis "Python library for the GitHub API")
2754 (description "This library allows managing GitHub resources such as
2755 repositories, user profiles, and organizations in your Python applications,
2756 using version 3 of the GitHub application programming interface (API).")
2757 (license license:lgpl3+)))
2758
2759 (define-public python-rellu
2760 (package
2761 (name "python-rellu")
2762 (version "0.7")
2763 (source
2764 (origin
2765 (method url-fetch)
2766 (uri (pypi-uri "rellu" version))
2767 (sha256
2768 (base32
2769 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2770 (build-system python-build-system)
2771 (propagated-inputs
2772 `(("python-invoke" ,python-invoke)
2773 ("python-pygithub" ,python-pygithub)))
2774 (home-page "https://github.com/robotframework/rellu")
2775 (synopsis "Utilities to create PyPI releases")
2776 (description "This collection of utilities contains tooling and templates
2777 to assist in creating releases on GitHub and publishing them on PyPI. It is
2778 designed to be used by Robot Framework and tools and libraries in its
2779 ecosystem, but can naturally be used also by other projects.")
2780 (license license:asl2.0)))
2781
2782 (define-public python-robotframework
2783 (package
2784 (name "python-robotframework")
2785 (version "3.1.2")
2786 ;; There are no tests in the PyPI archive.
2787 (source
2788 (origin
2789 (method git-fetch)
2790 (uri (git-reference
2791 (url "https://github.com/robotframework/robotframework.git")
2792 (commit (string-append "v" version))))
2793 (file-name (git-file-name name version))
2794 (sha256
2795 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2796 (patches (search-patches
2797 "python-robotframework-honor-source-date-epoch.patch"))))
2798 (build-system python-build-system)
2799 (arguments
2800 `(#:phases (modify-phases %standard-phases
2801 (add-before 'build 'build-and-install-doc
2802 (lambda* (#:key outputs #:allow-other-keys)
2803 (let* ((doc-output (assoc-ref outputs "doc"))
2804 (doc (string-append doc-output "/share/"
2805 ,name "-" ,version "/")))
2806 (invoke "invoke" "library-docs" "all")
2807 (mkdir-p doc)
2808 (copy-recursively "doc/libraries"
2809 (string-append doc "/libraries"))
2810 #t)))
2811 (replace 'check
2812 (lambda _
2813 (invoke "python" "utest/run.py"))))))
2814 (native-inputs
2815 `(("python-invoke" ,python-invoke)
2816 ("python-rellu" ,python-rellu)
2817 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2818 (outputs '("out" "doc"))
2819 (home-page "https://robotframework.org")
2820 (synopsis "Generic automation framework")
2821 (description "Robot Framework is a generic automation framework for
2822 acceptance testing, acceptance test driven development (ATDD), and robotic
2823 process automation (RPA).")
2824 (license license:asl2.0)))
2825
2826 (define-public python-robotframework-lint
2827 ;; There is no properly tagged release; the commit below seems to correspond
2828 ;; to the 0.9 stable release available from PyPI. The tests are not
2829 ;; included in the PyPI archive, so we fetch the sources from the upstream
2830 ;; Git repo.
2831 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2832 (revision "1"))
2833 (package
2834 (name "python-robotframework-lint")
2835 (version (git-version "0.9.0" revision commit))
2836 (source
2837 (origin
2838 (method git-fetch)
2839 (uri (git-reference
2840 (url "https://github.com/boakley/robotframework-lint.git")
2841 (commit commit)))
2842 (file-name (git-file-name name version))
2843 (sha256
2844 (base32
2845 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2846 (build-system python-build-system)
2847 (arguments
2848 `(#:phases
2849 (modify-phases %standard-phases
2850 (replace 'check
2851 (lambda _
2852 (invoke "python" "-m" "robot" "-A"
2853 "tests/conf/default.args" "tests"))))))
2854 (propagated-inputs
2855 `(("python-robotframework" ,python-robotframework)))
2856 (home-page "https://github.com/boakley/robotframework-lint/")
2857 (synopsis "Static analysis tool (linter) for Robot Framework")
2858 (description "This package provides the @code{rflint} command-line
2859 utility, a static analysis tool (linter) for Robot Framework source files.")
2860 (license license:asl2.0))))
2861
2862 (define-public python-robotframework-sshlibrary
2863 (package
2864 (name "python-robotframework-sshlibrary")
2865 (version "3.3.0")
2866 ;; There are no tests in the PyPI archive.
2867 (source
2868 (origin
2869 (method git-fetch)
2870 (uri (git-reference
2871 (url "https://github.com/robotframework/SSHLibrary.git")
2872 (commit (string-append "v" version))))
2873 (file-name (git-file-name name version))
2874 (sha256
2875 (base32
2876 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2877 (build-system python-build-system)
2878 (arguments
2879 `(#:phases
2880 (modify-phases %standard-phases
2881 (add-before 'build 'build-and-install-doc
2882 (lambda* (#:key outputs #:allow-other-keys)
2883 (let* ((doc-output (assoc-ref outputs "doc"))
2884 (doc (string-append doc-output "/share/"
2885 ,name "-" ,version "/")))
2886 (invoke "chmod" "-R" "+w" "docs")
2887 (invoke "invoke" "kw-docs" "project-docs")
2888 (mkdir-p doc)
2889 (for-each delete-file (find-files "docs" "\\.rst"))
2890 (copy-recursively "docs" doc)
2891 #t)))
2892 (replace 'check
2893 (lambda _
2894 ;; Some tests require an SSH server; we remove them.
2895 (delete-file "utest/test_client_api.py")
2896 (delete-file "utest/test_scp.py")
2897 (invoke "python" "utest/run.py"))))))
2898 (propagated-inputs
2899 `(("python-robotframework" ,python-robotframework)
2900 ("python-paramiko" ,python-paramiko)
2901 ("python-scp" ,python-scp)))
2902 (native-inputs
2903 `(("openssh" ,openssh)
2904 ("which" ,which)
2905 ;; To generate the documentation
2906 ("python-docutils" ,python-docutils)
2907 ("python-invoke" ,python-invoke)
2908 ("python-pygments" ,python-pygments)
2909 ("python-rellu" ,python-rellu)))
2910 (outputs '("out" "doc"))
2911 (home-page "https://github.com/robotframework/SSHLibrary")
2912 (synopsis "Robot Framework library for SSH and SFTP")
2913 (description "SSHLibrary is a Robot Framework library providing support
2914 for SSH and SFTP. It has the following main usages:
2915 @itemize @bullet
2916 @item Executing commands on the remote machine, either blocking or non-blocking.
2917 @item Writing and reading in an interactive shell.
2918 @item Transferring files and directories over SFTP.
2919 @item Ensuring that files and directories exist on the remote machine.
2920 @end itemize")
2921 (license license:asl2.0)))
2922
2923 (define-public python-scp
2924 (package
2925 (name "python-scp")
2926 (version "0.13.2")
2927 (source
2928 (origin
2929 (method url-fetch)
2930 (uri (pypi-uri "scp" version))
2931 (sha256
2932 (base32
2933 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2934 (build-system python-build-system)
2935 (arguments
2936 '(#:tests? #f)) ;tests require an SSH server
2937 (propagated-inputs
2938 `(("python-paramiko" ,python-paramiko)))
2939 (home-page "https://github.com/jbardin/scp.py")
2940 (synopsis "SCP protocol module for Python and Paramiko")
2941 (description "The scp module extends the Paramiko library to send and
2942 receive files via the SCP1 protocol, as implemented by the OpenSSH
2943 @command{scp} program.")
2944 (license license:gpl2+)))
2945
2946 (define-public python-rst.linker
2947 (package
2948 (name "python-rst.linker")
2949 (version "1.11")
2950 (source
2951 (origin
2952 (method url-fetch)
2953 (uri (pypi-uri "rst.linker" version))
2954 (sha256
2955 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
2956 (build-system python-build-system)
2957 (propagated-inputs
2958 `(("python-dateutil" ,python-dateutil)
2959 ("python-six" ,python-six)))
2960 (native-inputs
2961 `(("python-setuptools-scm" ,python-setuptools-scm)))
2962 ;; Test would require path.py, which would introduce a cyclic dependence.
2963 (arguments `(#:tests? #f))
2964 ;; Note: As of version 1.7 the documentation is not worth building.
2965 (home-page "https://github.com/jaraco/rst.linker")
2966 (synopsis "Sphinx plugin to add links and timestamps")
2967 (description "rst.linker allows to automatically replace text by a
2968 reStructuredText external reference or timestamps. It's primary purpose is to
2969 augment the changelog, but it can be used for other documents, too.")
2970 (license license:expat)))
2971
2972 (define-public python2-rst.linker
2973 (package-with-python2 python-rst.linker))
2974
2975 (define-public python-feedgenerator
2976 (package
2977 (name "python-feedgenerator")
2978 (version "1.9")
2979 (source
2980 (origin
2981 (method url-fetch)
2982 (uri (pypi-uri "feedgenerator" version))
2983 (sha256
2984 (base32
2985 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2986 (modules '((guix build utils)))
2987 (snippet
2988 '(begin
2989 ;; Remove pre-compiled .pyc files from source.
2990 (for-each delete-file-recursively
2991 (find-files "." "__pycache__" #:directories? #t))
2992 (for-each delete-file (find-files "." "\\.pyc$"))
2993 #t))))
2994 (build-system python-build-system)
2995 (propagated-inputs
2996 `(("python-pytz" ,python-pytz)
2997 ("python-six" ,python-six)))
2998 (home-page "https://github.com/getpelican/feedgenerator")
2999 (synopsis
3000 "Standalone version of Django's Atom/RSS feed generator")
3001 (description
3002 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3003 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3004 (license license:bsd-3)))
3005
3006 (define-public python2-feedgenerator
3007 (package-with-python2 python-feedgenerator))
3008
3009 (define-public python-toml
3010 (package
3011 (name "python-toml")
3012 (version "0.9.4")
3013 (source
3014 (origin
3015 (method url-fetch)
3016 (uri (pypi-uri "toml" version))
3017 (sha256
3018 (base32
3019 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3020 (build-system python-build-system)
3021 (arguments
3022 `(#:tests? #f)) ;no tests suite in release
3023 (home-page "https://github.com/uiri/toml")
3024 (synopsis "Library for TOML")
3025 (description
3026 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3027 Language (TOML) configuration files.")
3028 (license license:expat)))
3029
3030 (define-public python-jsonrpc-server
3031 (package
3032 (name "python-jsonrpc-server")
3033 (version "0.3.2")
3034 (source
3035 (origin
3036 (method url-fetch)
3037 (uri (pypi-uri "python-jsonrpc-server" version))
3038 (sha256
3039 (base32
3040 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3041 (build-system python-build-system)
3042 (propagated-inputs
3043 `(("python-future" ,python-future)
3044 ("python-mock" ,python-mock)
3045 ("python-pytest" ,python-pytest)
3046 ("python-ujson" ,python-ujson)))
3047 (home-page
3048 "https://github.com/palantir/python-jsonrpc-server")
3049 (synopsis "JSON RPC 2.0 server library")
3050 (description
3051 "This package provides a JSON RPC 2.0 server library for Python.")
3052 (license license:expat)))
3053
3054 (define-public python-pydocstyle
3055 (package
3056 (name "python-pydocstyle")
3057 (version "3.0.0")
3058 (source
3059 (origin
3060 (method url-fetch)
3061 (uri (pypi-uri "pydocstyle" version))
3062 (sha256
3063 (base32
3064 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3065 (build-system python-build-system)
3066 (propagated-inputs
3067 `(("python-six" ,python-six)
3068 ("python-snowballstemmer" ,python-snowballstemmer)))
3069 (home-page
3070 "https://github.com/PyCQA/pydocstyle/")
3071 (synopsis "Python docstring style checker")
3072 (description
3073 "This package provides a style checker for the Python Language
3074 Server (PLS).")
3075 (license license:expat)))
3076
3077 (define-public python-language-server
3078 (package
3079 (name "python-language-server")
3080 (version "0.31.6")
3081 (source
3082 (origin
3083 (method url-fetch)
3084 (uri (pypi-uri "python-language-server" version))
3085 (sha256
3086 (base32
3087 "0cqrffd5272p2hifa35rf1h1g6dss741jmjkwa43jninifmbz0df"))))
3088 (build-system python-build-system)
3089 (propagated-inputs
3090 `(("python-pluggy" ,python-pluggy)
3091 ("python-jsonrpc-server" ,python-jsonrpc-server)
3092 ("python-jedi" ,python-jedi)
3093 ("python-yapf" ,python-yapf)
3094 ("python-pyflakes" ,python-pyflakes)
3095 ("python-pydocstyle" ,python-pydocstyle)
3096 ("python-pycodestyle" ,python-pycodestyle)
3097 ("python-mccabe" ,python-mccabe)
3098 ("python-rope" ,python-rope)
3099 ("python-autopep8" ,python-autopep8)
3100 ("python-flake8" ,python-flake8)
3101 ("python-pylint" ,python-pylint)))
3102 (home-page "https://github.com/palantir/python-language-server")
3103 (synopsis "Python implementation of the Language Server Protocol")
3104 (description
3105 "The Python Language Server (pyls) is an implementation of the Python 3
3106 language specification for the Language Server Protocol (LSP). This tool is
3107 used in text editing environments to provide a complete and integrated
3108 feature-set for programming Python effectively.")
3109 (license license:expat)))
3110
3111 (define-public python-black
3112 (package
3113 (name "python-black")
3114 (version "18.6b4")
3115 (source
3116 (origin
3117 (method url-fetch)
3118 (uri (pypi-uri "black" version))
3119 (sha256
3120 (base32
3121 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3122 (build-system python-build-system)
3123 (arguments
3124 `(#:phases
3125 (modify-phases %standard-phases
3126 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3127 (lambda _
3128 (let ((python3 (which "python3")))
3129 (substitute* '("tests/data/fmtonoff.py"
3130 "tests/data/string_prefixes.py"
3131 "tests/data/function.py")
3132 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3133 (string-append "#!" python3 (if (string? minor-version)
3134 minor-version
3135 ""))))))))))
3136 (propagated-inputs
3137 `(("python-click" ,python-click)
3138 ("python-attrs" ,python-attrs)
3139 ("python-appdirs" ,python-appdirs)
3140 ("python-toml" ,python-toml)))
3141 (home-page "https://github.com/ambv/black")
3142 (synopsis "The uncompromising code formatter")
3143 (description "Black is the uncompromising Python code formatter.")
3144 (license license:expat)))
3145
3146 (define-public python-blinker
3147 (package
3148 (name "python-blinker")
3149 (version "1.4")
3150 (source
3151 (origin
3152 (method url-fetch)
3153 (uri (pypi-uri "blinker" version))
3154 (sha256
3155 (base32
3156 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3157 (build-system python-build-system)
3158 (home-page "http://pythonhosted.org/blinker/")
3159 (synopsis "Fast, simple object-to-object and broadcast signaling")
3160 (description
3161 "Blinker provides a fast dispatching system that allows any number of
3162 interested parties to subscribe to events, or \"signals\".")
3163 (license license:expat)))
3164
3165 (define-public python2-blinker
3166 (package-with-python2 python-blinker))
3167
3168 (define-public pelican
3169 (package
3170 (name "pelican")
3171 (version "4.2.0")
3172 (source
3173 (origin
3174 (method url-fetch)
3175 (uri (pypi-uri "pelican" version))
3176 (sha256
3177 (base32
3178 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3179 (build-system python-build-system)
3180 (propagated-inputs
3181 `(("python-blinker" ,python-blinker)
3182 ("python-dateutil" ,python-dateutil)
3183 ("python-docutils" ,python-docutils)
3184 ("python-feedgenerator" ,python-feedgenerator)
3185 ("python-jinja2" ,python-jinja2)
3186 ("python-markdown" ,python-markdown)
3187 ("python-pygments" ,python-pygments)
3188 ("python-pytz" ,python-pytz)
3189 ("python-six" ,python-six)
3190 ("python-unidecode" ,python-unidecode)))
3191 (home-page "https://getpelican.com/")
3192 (arguments
3193 `(;; XXX Requires a lot more packages to do unit tests :P
3194 #:tests? #f))
3195 (synopsis "Python-based static site publishing system")
3196 (description
3197 "Pelican is a tool to generate a static blog from reStructuredText,
3198 Markdown input files, and more. Pelican uses Jinja2 for templating
3199 and is very extensible.")
3200 (license license:agpl3+)))
3201
3202 (define-public mallard-ducktype
3203 (package
3204 (name "mallard-ducktype")
3205 (version "1.0.2")
3206 (source
3207 (origin
3208 (method git-fetch)
3209 ;; git-reference because tests are not included in pypi source tarball
3210 ;; https://issues.guix.gnu.org/issue/36755#2
3211 (uri (git-reference
3212 (url "https://github.com/projectmallard/mallard-ducktype.git")
3213 (commit version)))
3214 (file-name (git-file-name name version))
3215 (sha256
3216 (base32
3217 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3218 (build-system python-build-system)
3219 (arguments
3220 '(#:phases
3221 (modify-phases %standard-phases
3222 (replace 'check
3223 (lambda _
3224 (with-directory-excursion "tests"
3225 (invoke "sh" "runtests")))))))
3226 (home-page "http://projectmallard.org")
3227 (synopsis "Convert Ducktype to Mallard documentation markup")
3228 (description
3229 "Ducktype is a lightweight syntax that can represent all the semantics
3230 of the Mallard XML documentation system. Ducktype files can be converted to
3231 Mallard using the @command{ducktype} tool. The yelp-tools package
3232 provides additional functionality on the produced Mallard documents.")
3233 (license license:expat)))
3234
3235 (define-public python-cython
3236 (package
3237 (name "python-cython")
3238 (version "0.29.13")
3239 (source
3240 (origin
3241 (method url-fetch)
3242 (uri (pypi-uri "Cython" version))
3243 (sha256
3244 (base32
3245 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3246 (build-system python-build-system)
3247 ;; we need the full python package and not just the python-wrapper
3248 ;; because we need libpython3.3m.so
3249 (inputs
3250 `(("python" ,python)))
3251 (arguments
3252 `(#:phases
3253 (modify-phases %standard-phases
3254 (add-before 'check 'set-HOME
3255 ;; some tests require access to "$HOME/.cython"
3256 (lambda _ (setenv "HOME" "/tmp") #t))
3257
3258 ;; FIXME: These tests started failing on armhf after the 0.28 update
3259 ;; (commit c69d11c5930), both with an error such as this:
3260 ;; compiling (cpp) and running dictcomp ...
3261 ;; === C/C++ compiler error output: ===
3262 ;; ‘
3263 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3264 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3265 ,@(if (target-arm32?)
3266 `((add-before 'check 'disable-failing-tests
3267 (lambda _
3268 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3269 (for-each (lambda (test)
3270 (format disabled-tests "~a\n" test))
3271 '("memslice" "dictcomp"))
3272 (close-port disabled-tests)))))
3273 '())
3274
3275 (replace 'check
3276 (lambda _
3277 ;; Disable compiler optimizations to greatly reduce the running
3278 ;; time of the test suite.
3279 (setenv "CFLAGS" "-O0")
3280
3281 (invoke "python" "runtests.py" "-vv"
3282 "-j" (number->string (parallel-job-count))))))))
3283 (home-page "https://cython.org/")
3284 (synopsis "C extensions for Python")
3285 (description "Cython is an optimising static compiler for both the Python
3286 programming language and the extended Cython programming language. It makes
3287 writing C extensions for Python as easy as Python itself.")
3288 (license license:asl2.0)
3289 (properties `((python2-variant . ,(delay python2-cython))))))
3290
3291 (define-public python2-cython
3292 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3293 (package
3294 (inherit base)
3295 (name "python2-cython")
3296 (inputs
3297 `(("python-2" ,python-2))) ;this is not automatically changed
3298 (arguments
3299 (substitute-keyword-arguments (package-arguments base)
3300 ((#:phases phases)
3301 `(modify-phases ,phases
3302 (add-before 'check 'adjust-test_embed
3303 (lambda _
3304 (substitute* "runtests.py"
3305 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3306 ;; so it can give the right -L flag to GCC when embedding static
3307 ;; builds of Python. It is unaware that the Python "config"
3308 ;; directory (where the static library lives) was renamed in
3309 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3310 ;; which works fine, because that is where the shared library is.
3311 ;;
3312 ;; It also appears to be unaware that the Makefile in Demos/embed
3313 ;; already unconditionally pass the static library location to GCC,
3314 ;; after checking sysconfig.get_config_var('LIBPL).
3315 ;;
3316 ;; The effect is that the linker is unable to resolve libexpat
3317 ;; symbols when building for Python 2, because neither the Python 2
3318 ;; shared library nor Expat is available. To fix it, we can either
3319 ;; add Expat as an input and make it visible to the linker, or just
3320 ;; prevent it from overriding the Python shared library location.
3321 ;; The end result is identical, so we take the easy route.
3322 ((" or libname not in os\\.listdir\\(libdir\\)")
3323 ""))
3324 #t)))))))))
3325
3326 ;; The RPython toolchain currently does not support Python 3.
3327 (define-public python2-rpython
3328 (package
3329 (name "python2-rpython")
3330 (version "0.2.1")
3331 (source
3332 (origin
3333 (method url-fetch)
3334 (uri (pypi-uri "rpython" version))
3335 (sha256
3336 (base32
3337 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3338 (build-system python-build-system)
3339 (arguments `(#:python ,python-2))
3340 (native-inputs
3341 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3342 (home-page "https://rpython.readthedocs.org")
3343 (synopsis "Framework for implementing interpreters and virtual machines")
3344 (description "RPython is a translation and support framework for
3345 producing implementations of dynamic languages, emphasizing a clean separation
3346 between language specification and implementation aspects.")
3347 (license license:expat)))
3348
3349 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3350 ;; python-scipy still build, as these three packages are often used together.
3351 (define-public python-numpy
3352 (package
3353 (name "python-numpy")
3354 (version "1.17.3")
3355 (source
3356 (origin
3357 (method url-fetch)
3358 (uri (string-append
3359 "https://github.com/numpy/numpy/releases/download/v"
3360 version "/numpy-" version ".tar.gz"))
3361 (sha256
3362 (base32
3363 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3364 (build-system python-build-system)
3365 (inputs
3366 `(("openblas" ,openblas)
3367 ("lapack" ,lapack)))
3368 (native-inputs
3369 `(("python-cython" ,python-cython)
3370 ("python-pytest" ,python-pytest)
3371 ("gfortran" ,gfortran)))
3372 (arguments
3373 `(#:phases
3374 (modify-phases %standard-phases
3375 (add-before 'build 'configure-blas-lapack
3376 (lambda* (#:key inputs #:allow-other-keys)
3377 (call-with-output-file "site.cfg"
3378 (lambda (port)
3379 (format port
3380 "[openblas]
3381 libraries = openblas
3382 library_dirs = ~a/lib
3383 include_dirs = ~a/include
3384
3385 # backslash-n to make emacs happy
3386 \n[lapack]
3387 lapack_libs = lapack
3388 library_dirs = ~a/lib
3389 include_dirs = ~a/include
3390 "
3391 (assoc-ref inputs "openblas")
3392 (assoc-ref inputs "openblas")
3393 (assoc-ref inputs "lapack")
3394 (assoc-ref inputs "lapack"))))
3395 #t))
3396 (add-before 'build 'fix-executable-paths
3397 (lambda* (#:key inputs #:allow-other-keys)
3398 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3399 ;; instead of /bin/sh.
3400 (substitute* "numpy/distutils/exec_command.py"
3401 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3402 (string-append match-start (assoc-ref inputs "bash") match-end)))
3403 ;; Use "gcc" executable, not "cc".
3404 (substitute* "numpy/distutils/system_info.py"
3405 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3406 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3407 #t))
3408 ;; Tests can only be run after the library has been installed and not
3409 ;; within the source directory.
3410 (delete 'check)
3411 (add-after 'install 'check
3412 (lambda* (#:key outputs inputs #:allow-other-keys)
3413 ;; Make installed package available for running the tests
3414 (add-installed-pythonpath inputs outputs)
3415 ;; Make sure "f2py" etc is found.
3416 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3417 ":" (getenv "PATH")))
3418 (with-directory-excursion "/tmp"
3419 (invoke "python" "-c"
3420 "import numpy; numpy.test(verbose=2)")))))))
3421 (home-page "http://www.numpy.org/")
3422 (synopsis "Fundamental package for scientific computing with Python")
3423 (description "NumPy is the fundamental package for scientific computing
3424 with Python. It contains among other things: a powerful N-dimensional array
3425 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3426 and Fortran code, useful linear algebra, Fourier transform, and random number
3427 capabilities.")
3428 (properties `((python2-variant . ,(delay python2-numpy))))
3429 (license license:bsd-3)))
3430
3431 ;; Numpy 1.16.x are the last versions that support Python 2.
3432 (define-public python2-numpy
3433 (let ((numpy (package-with-python2
3434 (strip-python2-variant python-numpy))))
3435 (package/inherit
3436 numpy
3437 (version "1.16.5")
3438 (source (origin
3439 (method url-fetch)
3440 (uri (string-append
3441 "https://github.com/numpy/numpy/releases/download/v"
3442 version "/numpy-" version ".tar.gz"))
3443 (sha256
3444 (base32
3445 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3446
3447 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3448 ;; interest only for legacy code going back to NumPy's predecessor
3449 ;; Numeric.
3450 (define-public python2-numpy-1.8
3451 (package (inherit python2-numpy)
3452 (version "1.8.2")
3453 (source
3454 (origin
3455 (method git-fetch)
3456 (uri (git-reference
3457 (url "https://github.com/numpy/numpy")
3458 (commit (string-append "v" version))))
3459 (file-name (git-file-name "numpy" version))
3460 (sha256
3461 (base32
3462 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
3463 (arguments
3464 (substitute-keyword-arguments (package-arguments python2-numpy)
3465 ((#:phases phases)
3466 `(modify-phases ,phases
3467 (replace 'configure-blas-lapack
3468 (lambda* (#:key inputs #:allow-other-keys)
3469 (call-with-output-file "site.cfg"
3470 (lambda (port)
3471 (format port
3472 "[openblas]
3473 libraries = openblas,lapack
3474 library_dirs = ~a/lib:~a/lib
3475 include_dirs = ~a/include:~a/include
3476 "
3477 (assoc-ref inputs "openblas")
3478 (assoc-ref inputs "lapack")
3479 (assoc-ref inputs "openblas")
3480 (assoc-ref inputs "lapack"))))
3481 #t))))))
3482 (native-inputs
3483 `(("python2-nose" ,python2-nose)))
3484 (description "NumPy is the fundamental package for scientific computing
3485 with Python. It contains among other things: a powerful N-dimensional array
3486 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3487 and Fortran code, useful linear algebra, Fourier transform, and random number
3488 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3489 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3490 Numeric.")
3491 (license license:bsd-3)))
3492
3493 (define-public python-munch
3494 (package
3495 (name "python-munch")
3496 (version "2.0.4")
3497 (source
3498 (origin
3499 (method url-fetch)
3500 (uri (pypi-uri "munch" version))
3501 (sha256
3502 (base32
3503 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3504 (build-system python-build-system)
3505 (home-page "https://github.com/Infinidat/munch")
3506 (synopsis "Dot-accessible dictionary")
3507 (description "Munch is a dot-accessible dictionary similar to JavaScript
3508 objects.")
3509 (license license:expat)))
3510
3511 (define-public python2-munch
3512 (package-with-python2 python-munch))
3513
3514 (define-public python-colormath
3515 (package
3516 (name "python-colormath")
3517 (version "3.0.0")
3518 (source
3519 (origin
3520 (method url-fetch)
3521 (uri (pypi-uri "colormath" version))
3522 (sha256
3523 (base32
3524 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3525 (build-system python-build-system)
3526 (propagated-inputs
3527 `(("python-networkx" ,python-networkx)
3528 ("python-numpy" ,python-numpy)))
3529 (home-page "https://github.com/gtaylor/python-colormath")
3530 (synopsis "Color math and conversion library")
3531 (description
3532 "This is a Python library for color math and conversions.")
3533 (license license:bsd-3)))
3534
3535 (define-public python2-colormath
3536 (package-with-python2 python-colormath))
3537
3538 (define-public python-spectra
3539 (package
3540 (name "python-spectra")
3541 (version "0.0.11")
3542 (source
3543 (origin
3544 (method url-fetch)
3545 (uri (pypi-uri "spectra" version))
3546 (sha256
3547 (base32
3548 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3549 (build-system python-build-system)
3550 (arguments
3551 `(#:phases
3552 (modify-phases %standard-phases
3553 (replace 'check
3554 (lambda _ (invoke "nosetests" "-v"))))))
3555 (propagated-inputs
3556 `(("python-colormath" ,python-colormath)))
3557 (native-inputs
3558 `(("python-nose" ,python-nose)))
3559 (home-page "https://github.com/jsvine/spectra")
3560 (synopsis "Color scales and color conversion")
3561 (description
3562 "This package provides a Python library intended to make color math,
3563 color scales, and color space conversion easy. It has support for:
3564
3565 @enumerate
3566 @item Color scales
3567 @item Color ranges
3568 @item Color blending
3569 @item Brightening/darkening colors
3570 @item Saturating/desaturating colors
3571 @item Conversion to/from multiple color spaces.
3572 @end enumerate\n")
3573 (license license:expat)))
3574
3575 (define-public python2-spectra
3576 (package-with-python2 python-spectra))
3577
3578 (define-public python-numpy-documentation
3579 (package
3580 (name "python-numpy-documentation")
3581 (version (package-version python-numpy))
3582 (source (package-source python-numpy))
3583 (build-system python-build-system)
3584 (native-inputs
3585 `(("python-matplotlib" ,python-matplotlib)
3586 ("python-numpy" ,python-numpy)
3587 ("pkg-config" ,pkg-config)
3588 ("python-sphinx" ,python-sphinx)
3589 ("python-numpydoc" ,python-numpydoc)
3590 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3591 texlive-fonts-ec
3592 texlive-generic-ifxetex
3593 texlive-generic-pdftex
3594 texlive-amsfonts
3595 texlive-latex-capt-of
3596 texlive-latex-cmap
3597 texlive-latex-environ
3598 texlive-latex-eqparbox
3599 texlive-latex-etoolbox
3600 texlive-latex-expdlist
3601 texlive-latex-fancyhdr
3602 texlive-latex-fancyvrb
3603 texlive-latex-fncychap
3604 texlive-latex-float
3605 texlive-latex-framed
3606 texlive-latex-geometry
3607 texlive-latex-graphics
3608 texlive-latex-hyperref
3609 texlive-latex-mdwtools
3610 texlive-latex-multirow
3611 texlive-latex-needspace
3612 texlive-latex-oberdiek
3613 texlive-latex-parskip
3614 texlive-latex-preview
3615 texlive-latex-tabulary
3616 texlive-latex-threeparttable
3617 texlive-latex-titlesec
3618 texlive-latex-trimspaces
3619 texlive-latex-ucs
3620 texlive-latex-upquote
3621 texlive-latex-url
3622 texlive-latex-varwidth
3623 texlive-latex-wrapfig)))
3624 ("texinfo" ,texinfo)
3625 ("perl" ,perl)
3626 ("scipy-sphinx-theme"
3627 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3628 (method git-fetch)
3629 (uri (git-reference
3630 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3631 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3632 (sha256
3633 (base32
3634 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3635 ,@(package-native-inputs python-numpy)))
3636 (arguments
3637 `(#:tests? #f ; we're only generating the documentation
3638 #:phases
3639 (modify-phases %standard-phases
3640 (delete 'build)
3641 (replace 'install
3642 (lambda* (#:key inputs outputs #:allow-other-keys)
3643 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3644 (doc (string-append
3645 data "/doc/" ,name "-"
3646 ,(package-version python-numpy)))
3647 (info-reader (string-append data "/info"))
3648 (html (string-append doc "/html"))
3649 (scipy-sphinx-theme "scipy-sphinx-theme")
3650 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3651 (pyver ,(string-append "PYVER=")))
3652
3653 ;; FIXME: this is needed to for texlive-union to generate
3654 ;; fonts, which are not found.
3655 (setenv "HOME" "/tmp")
3656
3657 (with-directory-excursion "doc"
3658 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3659 (mkdir-p html)
3660 (invoke "make" "html" pyver)
3661 (invoke "make" "latex" "PAPER=a4" pyver)
3662 (invoke "make" "-C" "build/latex"
3663 "all-pdf" "PAPER=a4" pyver)
3664 ;; FIXME: Generation of the info file fails.
3665 ;; (invoke "make" "info" pyver)
3666 ;; (mkdir-p info)
3667 ;; (copy-file "build/texinfo/numpy.info"
3668 ;; (string-append info "/numpy.info"))
3669 (for-each (lambda (file)
3670 (copy-file (string-append "build/latex" file)
3671 (string-append doc file)))
3672 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3673 (with-directory-excursion "build/html"
3674 (for-each (lambda (file)
3675 (let* ((dir (dirname file))
3676 (tgt-dir (string-append html "/" dir)))
3677 (unless (equal? "." dir)
3678 (mkdir-p tgt-dir))
3679 (install-file file html)))
3680 (find-files "." ".*")))))
3681 #t)))))
3682 (home-page (package-home-page python-numpy))
3683 (synopsis "Documentation for the python-numpy package")
3684 (description (package-description python-numpy))
3685 (license (package-license python-numpy))))
3686
3687 (define-public python2-numpy-documentation
3688 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3689 (package
3690 (inherit numpy-documentation)
3691 (native-inputs `(("python2-functools32" ,python2-functools32)
3692 ,@(package-native-inputs numpy-documentation))))))
3693
3694 (define-public python-pygit2
3695 (package
3696 (name "python-pygit2")
3697 (version "0.28.2")
3698 (source
3699 (origin
3700 (method url-fetch)
3701 (uri (pypi-uri "pygit2" version))
3702 (sha256
3703 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3704 (build-system python-build-system)
3705 (arguments
3706 '(#:tests? #f)) ; tests don't run correctly in our environment
3707 (propagated-inputs
3708 `(("python-six" ,python-six)
3709 ("python-cffi" ,python-cffi)
3710 ("libgit2" ,libgit2)
3711 ("python-tox" ,python-tox)))
3712 (native-inputs
3713 `(("python-pytest" ,python-pytest)))
3714 (home-page "https://github.com/libgit2/pygit2")
3715 (synopsis "Python bindings for libgit2")
3716 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3717 library, libgit2 implements Git plumbing.")
3718 ;; GPL2.0 only, with linking exception.
3719 (license license:gpl2)))
3720
3721 (define-public python2-pygit2
3722 (package-with-python2 python-pygit2))
3723
3724 (define-public python-pyparsing
3725 (package
3726 (name "python-pyparsing")
3727 (version "2.3.1")
3728 (source
3729 (origin
3730 (method url-fetch)
3731 (uri (pypi-uri "pyparsing" version))
3732 (sha256
3733 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3734 (build-system python-build-system)
3735 (outputs '("out" "doc"))
3736 (arguments
3737 `(#:tests? #f ; no test target
3738 #:phases
3739 (modify-phases %standard-phases
3740 (add-after 'install 'install-doc
3741 (lambda* (#:key outputs #:allow-other-keys)
3742 (let* ((doc (string-append (assoc-ref outputs "doc")
3743 "/share/doc/" ,name "-" ,version))
3744 (html-doc (string-append doc "/html"))
3745 (examples (string-append doc "/examples")))
3746 (mkdir-p html-doc)
3747 (mkdir-p examples)
3748 (for-each
3749 (lambda (dir tgt)
3750 (map (lambda (file)
3751 (install-file file tgt))
3752 (find-files dir ".*")))
3753 (list "docs" "htmldoc" "examples")
3754 (list doc html-doc examples))
3755 #t))))))
3756 (home-page "https://github.com/pyparsing/pyparsing")
3757 (synopsis "Python parsing class library")
3758 (description
3759 "The pyparsing module is an alternative approach to creating and
3760 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3761 of regular expressions. The pyparsing module provides a library of classes
3762 that client code uses to construct the grammar directly in Python code.")
3763 (license license:expat)))
3764
3765 (define-public python2-pyparsing
3766 (package-with-python2 python-pyparsing))
3767
3768 (define-public python-numpydoc
3769 (package
3770 (name "python-numpydoc")
3771 (version "0.8.0")
3772 (source
3773 (origin
3774 (method url-fetch)
3775 (uri (pypi-uri "numpydoc" version))
3776 (sha256
3777 (base32
3778 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3779 (build-system python-build-system)
3780 (propagated-inputs
3781 `(("python-sphinx" ,python-sphinx)))
3782 (native-inputs
3783 `(("python-nose" ,python-nose)))
3784 (home-page "https://pypi.python.org/pypi/numpydoc")
3785 (synopsis
3786 "Numpy's Sphinx extensions")
3787 (description
3788 "Sphinx extension to support docstrings in Numpy format.")
3789 (license license:bsd-2)))
3790
3791 (define-public python2-numpydoc
3792 (package-with-python2 python-numpydoc))
3793
3794 (define-public python-numexpr
3795 (package
3796 (name "python-numexpr")
3797 (version "2.6.5")
3798 (source
3799 (origin
3800 (method url-fetch)
3801 (uri (pypi-uri "numexpr" version))
3802 (sha256
3803 (base32
3804 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3805 (build-system python-build-system)
3806 (arguments `(#:tests? #f)) ; no tests included
3807 (propagated-inputs
3808 `(("python-numpy" ,python-numpy)))
3809 (home-page "https://github.com/pydata/numexpr")
3810 (synopsis "Fast numerical expression evaluator for NumPy")
3811 (description
3812 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3813 expressions that operate on arrays are accelerated and use less memory than
3814 doing the same calculation in Python. In addition, its multi-threaded
3815 capabilities can make use of all your cores, which may accelerate
3816 computations, most specially if they are not memory-bounded (e.g. those using
3817 transcendental functions).")
3818 (license license:expat)))
3819
3820 (define-public python2-numexpr
3821 (package-with-python2 python-numexpr))
3822
3823 (define-public python-cycler
3824 (package
3825 (name "python-cycler")
3826 (version "0.10.0")
3827 (source (origin
3828 (method url-fetch)
3829 (uri (pypi-uri "cycler" version))
3830 (sha256
3831 (base32
3832 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3833 (build-system python-build-system)
3834 (arguments
3835 ;; XXX: The current version requires 'coveralls' which we don't have.
3836 ;; Enable this for the next release which uses 'python-pytest'.
3837 '(#:tests? #f))
3838 (propagated-inputs
3839 `(("python-six" ,python-six)))
3840 (home-page "http://matplotlib.org/cycler/")
3841 (synopsis "Composable keyword argument iterator")
3842 (description
3843 "When using @code{matplotlib} and plotting more than one line, it is
3844 common to want to be able to want to be able to cycle over one or more artist
3845 styles; but the plotting logic can quickly become involved.
3846 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3847 @code{Cycler} class was developed.")
3848 (license license:bsd-3)))
3849
3850 (define-public python2-cycler
3851 (package-with-python2 python-cycler))
3852
3853 (define-public python-colorspacious
3854 (package
3855 (name "python-colorspacious")
3856 (version "1.1.2")
3857 (source
3858 (origin
3859 (method git-fetch)
3860 (uri (git-reference
3861 (url "https://github.com/njsmith/colorspacious.git")
3862 (commit (string-append "v" version))))
3863 (file-name (git-file-name name version))
3864 (sha256
3865 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3866 (build-system python-build-system)
3867 (propagated-inputs
3868 `(("python-numpy" ,python-numpy)))
3869 (native-inputs
3870 `(("python-nose" ,python-nose)))
3871 (arguments
3872 `(#:phases
3873 (modify-phases %standard-phases
3874 (replace 'check
3875 (lambda _
3876 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3877 (home-page "https://github.com/njsmith/colorspacious")
3878 (synopsis "Python library for colorspace conversions")
3879 (description "@code{colorspacious} is a Python library that lets you
3880 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3881 (license license:expat)))
3882
3883 (define-public python2-colorspacious
3884 (package-with-python2 python-colorspacious))
3885
3886 (define-public python-matplotlib
3887 (package
3888 (name "python-matplotlib")
3889 (version "3.1.2")
3890 (source
3891 (origin
3892 (method url-fetch)
3893 (uri (pypi-uri "matplotlib" version))
3894 (sha256
3895 (base32
3896 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
3897 (build-system python-build-system)
3898 (propagated-inputs ; the following packages are all needed at run time
3899 `(("python-cycler" ,python-cycler)
3900 ("python-kiwisolver" ,python-kiwisolver)
3901 ("python-pyparsing" ,python-pyparsing)
3902 ("python-pygobject" ,python-pygobject)
3903 ("gobject-introspection" ,gobject-introspection)
3904 ("python-tkinter" ,python "tk")
3905 ("python-dateutil" ,python-dateutil)
3906 ("python-numpy" ,python-numpy)
3907 ("python-pillow" ,python-pillow)
3908 ("python-pytz" ,python-pytz)
3909 ("python-six" ,python-six)
3910 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3911 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3912 ;; object. For this reason we need to import both libraries.
3913 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3914 ("python-pycairo" ,python-pycairo)
3915 ("python-cairocffi" ,python-cairocffi)))
3916 (inputs
3917 `(("libpng" ,libpng)
3918 ("imagemagick" ,imagemagick)
3919 ("freetype" ,freetype)
3920 ("cairo" ,cairo)
3921 ("glib" ,glib)
3922 ;; FIXME: Add backends when available.
3923 ;("python-wxpython" ,python-wxpython)
3924 ("tcl" ,tcl)
3925 ("tk" ,tk)))
3926 (native-inputs
3927 `(("pkg-config" ,pkg-config)
3928 ("python-pytest" ,python-pytest)
3929 ("python-mock" ,python-mock)
3930 ("unzip" ,unzip)
3931 ("jquery-ui"
3932 ,(origin
3933 (method url-fetch)
3934 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3935 (sha256
3936 (base32
3937 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3938 (arguments
3939 `(#:phases
3940 (modify-phases %standard-phases
3941 ;; XXX We disable all image comparison tests because we're using a
3942 ;; newer version of FreeType than matplotlib expects. This leads to
3943 ;; minor differences throughout the tests.
3944 (add-after 'unpack 'fix-and-disable-failing-tests
3945 (lambda _
3946 (substitute* (append (find-files "lib/matplotlib/tests/"
3947 "test_.*\\.py$")
3948 (find-files "lib/mpl_toolkits/tests"
3949 "test_.*\\.py$"))
3950 (("^from matplotlib" match)
3951 (string-append "import pytest\n" match))
3952 (("( *)@image_comparison" match indent)
3953 (string-append indent
3954 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3955 match)))
3956 (substitute* "lib/matplotlib/tests/test_animation.py"
3957 (("/bin/sh") (which "sh")))
3958 (for-each delete-file
3959 ;; test_normal_axes, test_get_tightbbox_polar
3960 '("lib/matplotlib/tests/test_axes.py"
3961 ;; We don't use the webagg backend and this test forces it.
3962 "lib/matplotlib/tests/test_backend_webagg.py"
3963 ;; test_outward_ticks
3964 "lib/matplotlib/tests/test_tightlayout.py"
3965 ;; test_hidden_axes fails with minor extent
3966 ;; differences, possibly due to the use of a
3967 ;; different version of FreeType.
3968 "lib/matplotlib/tests/test_constrainedlayout.py"
3969 ;; Fontconfig returns no fonts.
3970 "lib/matplotlib/tests/test_font_manager.py"))
3971 #t))
3972 (add-before 'install 'install-jquery-ui
3973 (lambda* (#:key outputs inputs #:allow-other-keys)
3974 (let ((dir (string-append (assoc-ref outputs "out")
3975 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3976 (mkdir-p dir)
3977 (invoke "unzip"
3978 (assoc-ref inputs "jquery-ui")
3979 "-d" dir))
3980 #t))
3981 (replace 'check
3982 (lambda* (#:key outputs inputs #:allow-other-keys)
3983 (add-installed-pythonpath inputs outputs)
3984 (invoke "python" "tests.py" "-v"
3985 "-m" "not network and not webagg")))
3986 (add-before 'build 'configure-environment
3987 (lambda* (#:key outputs inputs #:allow-other-keys)
3988 (let ((cairo (assoc-ref inputs "cairo")))
3989 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3990 ;; has not effect.
3991 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3992 (setenv "HOME" (getcwd))
3993 (call-with-output-file "setup.cfg"
3994 (lambda (port)
3995 (format port "[directories]~%
3996 basedirlist = ~a,~a~%
3997 [packages]~%
3998 tests = True~%"
3999 (assoc-ref inputs "tcl")
4000 (assoc-ref inputs "tk")))))
4001 #t)))))
4002 (home-page "https://matplotlib.org/")
4003 (synopsis "2D plotting library for Python")
4004 (description
4005 "Matplotlib is a Python 2D plotting library which produces publication
4006 quality figures in a variety of hardcopy formats and interactive environments
4007 across platforms. Matplotlib can be used in Python scripts, the python and
4008 ipython shell, web application servers, and six graphical user interface
4009 toolkits.")
4010 (license license:psfl)
4011 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4012
4013 (define-public python2-matplotlib
4014 (let ((matplotlib (package-with-python2
4015 (strip-python2-variant python-matplotlib))))
4016 (package (inherit matplotlib)
4017 (version "2.2.4")
4018 (source
4019 (origin
4020 (method url-fetch)
4021 (uri (pypi-uri "matplotlib" version))
4022 (sha256
4023 (base32
4024 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4025 (arguments
4026 (substitute-keyword-arguments (package-arguments matplotlib)
4027 ((#:phases phases)
4028 `(modify-phases ,phases
4029 (replace 'install-jquery-ui
4030 (lambda* (#:key outputs inputs #:allow-other-keys)
4031 (let ((dir (string-append (assoc-ref outputs "out")
4032 "/lib/python2.7/site-packages/"
4033 "matplotlib/backends/web_backend/")))
4034 (mkdir-p dir)
4035 (invoke "unzip"
4036 (assoc-ref inputs "jquery-ui")
4037 "-d" dir))
4038 #t))
4039 (delete 'fix-and-disable-failing-tests)
4040 (delete 'check))))) ; These tests weren't run the the past.
4041 ;; Make sure to use special packages for Python 2 instead
4042 ;; of those automatically rewritten by package-with-python2.
4043 (propagated-inputs
4044 `(("python2-pycairo" ,python2-pycairo)
4045 ("python2-backports-functools-lru-cache"
4046 ,python2-backports-functools-lru-cache)
4047 ("python2-functools32" ,python2-functools32)
4048 ("python2-pygobject-2" ,python2-pygobject-2)
4049 ("python2-subprocess32" ,python2-subprocess32)
4050 ("python2-tkinter" ,python-2 "tk")
4051 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4052 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4053
4054 (define-public python-matplotlib-documentation
4055 (package
4056 (name "python-matplotlib-documentation")
4057 (version (package-version python-matplotlib))
4058 (source (package-source python-matplotlib))
4059 (build-system python-build-system)
4060 (native-inputs
4061 `(("python-matplotlib" ,python-matplotlib)
4062 ("python-colorspacious" ,python-colorspacious)
4063 ("python-sphinx" ,python-sphinx)
4064 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4065 ("python-sphinx-gallery" ,python-sphinx-gallery)
4066 ("python-numpydoc" ,python-numpydoc)
4067 ("python-ipython" ,python-ipython)
4068 ("python-ipykernel" ,python-ipykernel)
4069 ("python-mock" ,python-mock)
4070 ("graphviz" ,graphviz)
4071 ("texlive" ,(texlive-union (list texlive-amsfonts
4072 texlive-latex-amsmath
4073 texlive-latex-enumitem
4074 texlive-latex-expdlist
4075 texlive-latex-geometry
4076 texlive-latex-preview
4077 texlive-latex-type1cm
4078 texlive-latex-ucs
4079
4080 texlive-generic-pdftex
4081
4082 texlive-fonts-ec
4083 texlive-fonts-adobe-times
4084 texlive-fonts-txfonts)))
4085 ("texinfo" ,texinfo)
4086 ,@(package-native-inputs python-matplotlib)))
4087 (arguments
4088 `(#:tests? #f ; we're only generating documentation
4089 #:phases
4090 (modify-phases %standard-phases
4091 ;; The tests in python-matplotlib are run after the install phase, so
4092 ;; we need to delete the extra phase here.
4093 (delete 'check)
4094 (replace 'build
4095 (lambda _
4096 (chdir "doc")
4097 (setenv "PYTHONPATH"
4098 (string-append (getenv "PYTHONPATH")
4099 ":" (getcwd) "/../examples/units"))
4100 (substitute* "conf.py"
4101 ;; Don't use git.
4102 (("^SHA = check_output.*")
4103 (string-append "SHA = \"" ,version "\"\n"))
4104 ;; Don't fetch intersphinx files from the Internet
4105 (("^explicit_order_folders" m)
4106 (string-append "intersphinx_mapping = {}\n" m))
4107 (("'sphinx.ext.intersphinx',") "")
4108 ;; Disable URL embedding which requires internet access.
4109 (("'https://docs.scipy.org/doc/numpy'") "None")
4110 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4111 (invoke "make"
4112 "SPHINXBUILD=sphinx-build"
4113 "SPHINXOPTS=" ; don't abort on warnings
4114 "html" "texinfo")))
4115 (replace 'install
4116 (lambda* (#:key inputs outputs #:allow-other-keys)
4117 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4118 (doc (string-append data "/doc/python-matplotlib-" ,version))
4119 (info (string-append data "/info"))
4120 (html (string-append doc "/html")))
4121 (mkdir-p html)
4122 (mkdir-p info)
4123 (copy-recursively "build/html" html)
4124 (symlink (string-append html "/_images")
4125 (string-append info "/matplotlib-figures"))
4126 (with-directory-excursion "build/texinfo"
4127 (substitute* "matplotlib.texi"
4128 (("@image\\{([^,]*)" all file)
4129 (string-append "@image{matplotlib-figures/" file)))
4130 (symlink (string-append html "/_images")
4131 "./matplotlib-figures")
4132 (invoke "makeinfo" "--no-split"
4133 "-o" "matplotlib.info" "matplotlib.texi"))
4134 (install-file "build/texinfo/matplotlib.info" info))
4135 #t)))))
4136 (home-page (package-home-page python-matplotlib))
4137 (synopsis "Documentation for the python-matplotlib package")
4138 (description (package-description python-matplotlib))
4139 (license (package-license python-matplotlib))))
4140
4141 (define-public python2-matplotlib-documentation
4142 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4143 (package
4144 (inherit parent)
4145 (native-inputs
4146 (alist-delete "python-sphinx-copybutton"
4147 (package-native-inputs parent))))))
4148
4149 (define-public python-matplotlib-venn
4150 (package
4151 (name "python-matplotlib-venn")
4152 (version "0.11.5")
4153 (source
4154 (origin
4155 (method url-fetch)
4156 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4157 (sha256
4158 (base32
4159 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4160 (build-system python-build-system)
4161 (arguments '(#:tests? #f)) ; tests are not included
4162 (propagated-inputs
4163 `(("python-matplotlib" ,python-matplotlib)
4164 ("python-numpy" ,python-numpy)
4165 ("python-scipy" ,python-scipy)))
4166 (native-inputs
4167 `(("unzip" ,unzip)))
4168 (home-page "https://github.com/konstantint/matplotlib-venn")
4169 (synopsis "Plot area-proportional Venn diagrams")
4170 (description
4171 "This package provides tools for plotting area-proportional two- and
4172 three-way Venn diagrams in @code{matplotlib}.")
4173 (license license:expat)))
4174
4175 (define-public python2-pysnptools
4176 (package
4177 (name "python2-pysnptools")
4178 (version "0.3.13")
4179 (source
4180 (origin
4181 (method url-fetch)
4182 (uri (pypi-uri "pysnptools" version))
4183 (sha256
4184 (base32
4185 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4186 (build-system python-build-system)
4187 (arguments
4188 `(#:python ,python-2 ; only Python 2.7 is supported
4189 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4190 (propagated-inputs
4191 `(("python2-numpy" ,python2-numpy)
4192 ("python2-scipy" ,python2-scipy)
4193 ("python2-pandas" ,python2-pandas)))
4194 (native-inputs
4195 `(("python2-cython" ,python2-cython)))
4196 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4197 (synopsis "Library for reading and manipulating genetic data")
4198 (description
4199 "PySnpTools is a library for reading and manipulating genetic data. It
4200 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4201 those files. It can also efficiently manipulate ranges of integers using set
4202 operators such as union, intersection, and difference.")
4203 (license license:asl2.0)))
4204
4205 (define-public python-socksipy-branch
4206 (package
4207 (name "python-socksipy-branch")
4208 (version "1.01")
4209 (source
4210 (origin
4211 (method url-fetch)
4212 (uri (pypi-uri "SocksiPy-branch" version))
4213 (sha256
4214 (base32
4215 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4216 (build-system python-build-system)
4217 (arguments
4218 `(#:tests? #f)) ; There are no tests
4219 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4220 (synopsis "Python SOCKS module")
4221 (description
4222 "SocksiPy - A Python SOCKS client module. It provides a
4223 socket-like interface that supports connections to any TCP
4224 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4225 The original version was developed by Dan Haim, this is a
4226 branch created by Mario Vilas to address some open issues,
4227 as the original project seems to have been abandoned circa 2007.")
4228 (license license:bsd-3)))
4229
4230 (define-public python2-socksipy-branch
4231 (package-with-python2 python-socksipy-branch))
4232
4233 (define-public python-socksipychain
4234 (package
4235 (name "python-socksipychain")
4236 (version "2.1.0")
4237 (source
4238 (origin
4239 (method git-fetch)
4240 (uri (git-reference
4241 (url "https://github.com/pagekite/PySocksipyChain.git")
4242 (commit (string-append "v" version))))
4243 (file-name (git-file-name name version))
4244 (sha256
4245 (base32
4246 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4247 (build-system python-build-system)
4248 (arguments
4249 `(#:tests? #f)) ; Tests try to access the network.
4250 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4251 (synopsis "Python SOCKS module with chained proxies support")
4252 (description
4253 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4254 adds support for arbitrary chaining of proxy servers and various modes of
4255 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4256 a simple netcat replacement with chaining support.")
4257 (license license:bsd-3)))
4258
4259 (define-public python-pycodestyle
4260 (package
4261 (name "python-pycodestyle")
4262 (version "2.5.0")
4263 (source
4264 (origin
4265 (method url-fetch)
4266 (uri (pypi-uri "pycodestyle" version))
4267 (sha256
4268 (base32
4269 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4270 (build-system python-build-system)
4271 (home-page "https://pycodestyle.readthedocs.io/")
4272 (synopsis "Python style guide checker")
4273 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4274 Python code against some of the style conventions in
4275 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4276 (license license:expat)))
4277
4278 (define-public python2-pycodestyle
4279 (package-with-python2 python-pycodestyle))
4280
4281 (define-public python-multidict
4282 (package
4283 (name "python-multidict")
4284 (version "4.2.0")
4285 (source
4286 (origin
4287 (method url-fetch)
4288 (uri (pypi-uri "multidict" version))
4289 (sha256
4290 (base32
4291 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4292 (build-system python-build-system)
4293 (native-inputs
4294 `(("python-pytest" ,python-pytest)
4295 ("python-pytest-runner" ,python-pytest-runner)))
4296 (home-page "https://github.com/aio-libs/multidict/")
4297 (synopsis "Multidict implementation")
4298 (description "Multidict is dict-like collection of key-value pairs
4299 where key might be occurred more than once in the container.")
4300 (license license:asl2.0)))
4301
4302 (define-public python-orderedmultidict
4303 (package
4304 (name "python-orderedmultidict")
4305 (version "0.7.11")
4306 (source
4307 (origin
4308 (method url-fetch)
4309 (uri (pypi-uri "orderedmultidict" version))
4310 (sha256
4311 (base32
4312 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4313 (build-system python-build-system)
4314 (arguments
4315 `(#:phases
4316 (modify-phases %standard-phases
4317 (add-after 'unpack 'fix-tests
4318 (lambda _
4319 ;; The package uses nosetest for running the tests.
4320 ;; Adding this initfile allows to run the test suite
4321 ;; without requiring nosetest.
4322 (with-output-to-file "tests/__init__.py" newline)
4323 #t)))))
4324 (propagated-inputs
4325 `(("python-six" ,python-six)))
4326 (native-inputs
4327 `(("python-pycodestyle" ,python-pycodestyle)))
4328 (home-page "https://github.com/gruns/orderedmultidict")
4329 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4330 (description "This package contains a library for ordered multivalue
4331 dictionaries. A multivalue dictionary is a dictionary that can store
4332 multiple values for the same key. An ordered multivalue dictionary is a
4333 multivalue dictionary that retains the order of insertions and deletions.")
4334 (license license:unlicense)))
4335
4336 (define-public python2-orderedmultidict
4337 (package-with-python2 python-orderedmultidict))
4338
4339 (define-public python-autopep8
4340 (package
4341 (name "python-autopep8")
4342 (version "1.3.5")
4343 (source
4344 (origin
4345 (method url-fetch)
4346 (uri (pypi-uri "autopep8" version))
4347 (sha256
4348 (base32
4349 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4350 (build-system python-build-system)
4351 (propagated-inputs
4352 `(("python-pycodestyle" ,python-pycodestyle)))
4353 (home-page "https://github.com/hhatto/autopep8")
4354 (synopsis "Format Python code according to the PEP 8 style guide")
4355 (description
4356 "@code{autopep8} automatically formats Python code to conform to
4357 the PEP 8 style guide. It uses the pycodestyle utility to determine
4358 what parts of the code needs to be formatted. @code{autopep8} is
4359 capable of fixing most of the formatting issues that can be reported
4360 by pycodestyle.")
4361 (license (license:non-copyleft
4362 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4363
4364 (define-public python2-autopep8
4365 (package-with-python2 python-autopep8))
4366
4367 (define-public python-distutils-extra
4368 (package
4369 (name "python-distutils-extra")
4370 (version "2.38")
4371 (source
4372 (origin
4373 (method url-fetch)
4374 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4375 version "/+download/python-distutils-extra-"
4376 version ".tar.gz"))
4377 (sha256
4378 (base32
4379 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4380 (build-system python-build-system)
4381 (home-page "https://launchpad.net/python-distutils-extra/")
4382 (synopsis "Enhancements to Python's distutils")
4383 (description
4384 "The python-distutils-extra module enables you to easily integrate
4385 gettext support, themed icons, and scrollkeeper-based documentation into
4386 Python's distutils.")
4387 (license license:gpl2)))
4388
4389 (define-public python2-distutils-extra
4390 (package-with-python2 python-distutils-extra))
4391
4392 (define-public python2-elib.intl
4393 (package
4394 (name "python2-elib.intl")
4395 (version "0.0.3")
4396 (source
4397 (origin
4398 ;; This project doesn't tag releases or publish tarballs, so we take
4399 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4400 (method git-fetch)
4401 (uri (git-reference
4402 (url "https://github.com/dieterv/elib.intl.git")
4403 (commit "d09997cfef")))
4404 (file-name (string-append name "-" version "-checkout"))
4405 (sha256
4406 (base32
4407 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4408 (build-system python-build-system)
4409 (arguments
4410 ;; incompatible with Python 3 (exception syntax)
4411 `(#:python ,python-2
4412 #:tests? #f))
4413 (home-page "https://github.com/dieterv/elib.intl")
4414 (synopsis "Enhanced internationalization for Python")
4415 (description
4416 "The elib.intl module provides enhanced internationalization (I18N)
4417 services for your Python modules and applications.")
4418 (license license:lgpl3+)))
4419
4420 (define-public python-olefile
4421 (package
4422 (name "python-olefile")
4423 (version "0.46")
4424 (source
4425 (origin
4426 (method url-fetch)
4427 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4428 "download/v" version "/olefile-" version ".tar.gz"))
4429 (file-name (string-append name "-" version ".tar.gz"))
4430 (sha256
4431 (base32
4432 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4433 (build-system python-build-system)
4434 (home-page "https://www.decalage.info/python/olefileio")
4435 (synopsis "Read and write Microsoft OLE2 files.")
4436 (description
4437 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4438 Storage or Compound Document, Microsoft Office). It is an improved version of
4439 the OleFileIO module from PIL, the Python Image Library.")
4440 (license license:bsd-3)))
4441
4442 (define-public python2-olefile
4443 (package-with-python2 python-olefile))
4444
4445 (define-public python-pillow
4446 (package
4447 (name "python-pillow")
4448 (version "6.2.1")
4449 (source
4450 (origin
4451 (method url-fetch)
4452 (uri (pypi-uri "Pillow" version))
4453 (sha256
4454 (base32
4455 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4456 (build-system python-build-system)
4457 (native-inputs
4458 `(("python-pytest" ,python-pytest)))
4459 (inputs
4460 `(("freetype" ,freetype)
4461 ("lcms" ,lcms)
4462 ("libjpeg" ,libjpeg)
4463 ("libtiff" ,libtiff)
4464 ("libwebp" ,libwebp)
4465 ("openjpeg" ,openjpeg)
4466 ("zlib" ,zlib)))
4467 (propagated-inputs
4468 `(("python-olefile" ,python-olefile)))
4469 (arguments
4470 `(#:phases
4471 (modify-phases %standard-phases
4472 (add-after 'unpack 'patch-ldconfig
4473 (lambda _
4474 (substitute* "setup.py"
4475 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4476 (replace 'check
4477 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4478 (if tests?
4479 (begin
4480 (setenv "HOME" (getcwd))
4481 ;; Make installed package available for running the tests.
4482 (add-installed-pythonpath inputs outputs)
4483 (invoke "python" "selftest.py" "--installed")
4484 (invoke "python" "-m" "pytest" "-vv"))
4485 #t))))))
4486 (home-page "https://python-pillow.org")
4487 (synopsis "Fork of the Python Imaging Library")
4488 (description
4489 "The Python Imaging Library adds image processing capabilities to your
4490 Python interpreter. This library provides extensive file format support, an
4491 efficient internal representation, and fairly powerful image processing
4492 capabilities. The core image library is designed for fast access to data
4493 stored in a few basic pixel formats. It should provide a solid foundation for
4494 a general image processing tool.")
4495 (license (license:x11-style
4496 "http://www.pythonware.com/products/pil/license.htm"
4497 "The PIL Software License"))))
4498
4499 (define-public python2-pillow
4500 (package-with-python2 python-pillow))
4501
4502 (define-public python-pycparser
4503 (package
4504 (name "python-pycparser")
4505 (version "2.19")
4506 (source
4507 (origin
4508 (method url-fetch)
4509 (uri (pypi-uri "pycparser" version))
4510 (sha256
4511 (base32
4512 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4513 (outputs '("out" "doc"))
4514 (build-system python-build-system)
4515 (native-inputs
4516 `(("pkg-config" ,pkg-config)))
4517 (arguments
4518 `(#:phases
4519 (modify-phases %standard-phases
4520 (replace 'check
4521 (lambda _
4522 (with-directory-excursion "tests"
4523 (invoke "python" "all_tests.py"))
4524 #t))
4525 (add-after 'install 'install-doc
4526 (lambda* (#:key outputs #:allow-other-keys)
4527 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4528 (doc (string-append data "/doc/" ,name "-" ,version))
4529 (examples (string-append doc "/examples")))
4530 (mkdir-p examples)
4531 (for-each (lambda (file)
4532 (copy-file (string-append "." file)
4533 (string-append doc file)))
4534 '("/README.rst" "/CHANGES" "/LICENSE"))
4535 (copy-recursively "examples" examples)
4536 #t))))))
4537 (home-page "https://github.com/eliben/pycparser")
4538 (synopsis "C parser in Python")
4539 (description
4540 "Pycparser is a complete parser of the C language, written in pure Python
4541 using the PLY parsing library. It parses C code into an AST and can serve as
4542 a front-end for C compilers or analysis tools.")
4543 (license license:bsd-3)))
4544
4545 (define-public python2-pycparser
4546 (package-with-python2 python-pycparser))
4547
4548 (define-public python-pywavelets
4549 (package
4550 (name "python-pywavelets")
4551 (version "1.0.1")
4552 (home-page "https://github.com/PyWavelets/pywt")
4553 (source (origin
4554 (method url-fetch)
4555 (uri (pypi-uri "PyWavelets" version))
4556 (sha256
4557 (base32
4558 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4559 (build-system python-build-system)
4560 (arguments
4561 '(#:modules ((ice-9 ftw)
4562 (srfi srfi-1)
4563 (srfi srfi-26)
4564 (guix build utils)
4565 (guix build python-build-system))
4566 #:phases (modify-phases %standard-phases
4567 (replace 'check
4568 (lambda _
4569 (let ((cwd (getcwd))
4570 (libdir (find (cut string-prefix? "lib." <>)
4571 (scandir "build"))))
4572 (with-directory-excursion (string-append cwd "/build/" libdir)
4573 (invoke "nosetests" "-v" "."))))))))
4574 (native-inputs
4575 `(("python-matplotlib" ,python-matplotlib) ;for tests
4576 ("python-nose" ,python-nose)))
4577 (propagated-inputs
4578 `(("python-numpy" ,python-numpy)))
4579 (synopsis "Wavelet transforms in Python")
4580 (description
4581 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4582 mathematical basis functions that are localized in both time and frequency.
4583 Wavelet transforms are time-frequency transforms employing wavelets. They are
4584 similar to Fourier transforms, the difference being that Fourier transforms are
4585 localized only in frequency instead of in time and frequency.")
4586 (license license:expat)))
4587
4588 (define-public python2-pywavelets
4589 (package-with-python2 python-pywavelets))
4590
4591 (define-public python-xcffib
4592 (package
4593 (name "python-xcffib")
4594 (version "0.6.0")
4595 (source
4596 (origin
4597 (method url-fetch)
4598 (uri (pypi-uri "xcffib" version))
4599 (sha256
4600 (base32
4601 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4602 (build-system python-build-system)
4603 (inputs
4604 `(("libxcb" ,libxcb)))
4605 (propagated-inputs
4606 `(("python-cffi" ,python-cffi) ; used at run time
4607 ("python-six" ,python-six)))
4608 (arguments
4609 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4610 #:tests? #f
4611 #:phases
4612 (modify-phases %standard-phases
4613 (add-after 'unpack 'fix-libxcb-path
4614 (lambda* (#:key inputs #:allow-other-keys)
4615 (let ((libxcb (assoc-ref inputs "libxcb")))
4616 (substitute* '("xcffib/__init__.py")
4617 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4618 #t)))
4619 (add-after 'install 'install-doc
4620 (lambda* (#:key outputs #:allow-other-keys)
4621 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4622 "/doc/" ,name "-" ,version)))
4623 (mkdir-p doc)
4624 (copy-file "README.md"
4625 (string-append doc "/README.md"))
4626 #t))))))
4627 (home-page "https://github.com/tych0/xcffib")
4628 (synopsis "XCB Python bindings")
4629 (description
4630 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4631 support for Python 3 and PyPy. It is based on cffi.")
4632 (license license:expat)))
4633
4634 (define-public python2-xcffib
4635 (package-with-python2 python-xcffib))
4636
4637 (define-public python-cairocffi
4638 (package
4639 (name "python-cairocffi")
4640 (version "0.9.0")
4641 (source
4642 (origin
4643 (method url-fetch)
4644 (uri (pypi-uri "cairocffi" version))
4645 (sha256
4646 (base32
4647 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4648 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4649 (build-system python-build-system)
4650 (outputs '("out" "doc"))
4651 (inputs
4652 `(("glib" ,glib)
4653 ("gtk+" ,gtk+)
4654 ("gdk-pixbuf" ,gdk-pixbuf)
4655 ("cairo" ,cairo)
4656 ("pango" ,pango)))
4657 (native-inputs
4658 `(("pkg-config" ,pkg-config)
4659 ("python-pytest" ,python-pytest)
4660 ("python-pytest-cov" ,python-pytest-cov)
4661 ("python-pytest-runner" ,python-pytest-runner)
4662 ("python-sphinx" ,python-sphinx)
4663 ("python-docutils" ,python-docutils)))
4664 (propagated-inputs
4665 `(("python-xcffib" ,python-xcffib))) ; used at run time
4666 (arguments
4667 `(#:phases
4668 (modify-phases %standard-phases
4669 (add-after 'unpack 'patch-paths
4670 (lambda* (#:key inputs outputs #:allow-other-keys)
4671 (substitute* (find-files "." "\\.py$")
4672 (("dlopen\\(ffi, 'cairo'")
4673 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4674 "/lib/libcairo.so.2'"))
4675 (("dlopen\\(ffi, 'gdk-3'")
4676 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4677 "/lib/libgtk-3.so.0'"))
4678 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4679 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4680 "/lib/libgdk_pixbuf-2.0.so.0'"))
4681 (("dlopen\\(ffi, 'glib-2.0'")
4682 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4683 "/lib/libglib-2.0.so.0'"))
4684 (("dlopen\\(ffi, 'gobject-2.0'")
4685 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4686 "/lib/libgobject-2.0.so.0'"))
4687 (("dlopen\\(ffi, 'pangocairo-1.0'")
4688 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4689 "/lib/libpangocairo-1.0.so.0'"))
4690 (("dlopen\\(ffi, 'pango-1.0'")
4691 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4692 "/lib/libpango-1.0.so.0'")))
4693 #t))
4694 (add-after 'install 'install-doc
4695 (lambda* (#:key inputs outputs #:allow-other-keys)
4696 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4697 (doc (string-append data "/doc/" ,name "-" ,version))
4698 (html (string-append doc "/html")))
4699 (setenv "LD_LIBRARY_PATH"
4700 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4701 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4702 (setenv "LANG" "en_US.UTF-8")
4703 (mkdir-p html)
4704 (for-each (lambda (file)
4705 (copy-file (string-append "." file)
4706 (string-append doc file)))
4707 '("/README.rst" "/CHANGES" "/LICENSE"))
4708 (system* "python" "setup.py" "build_sphinx")
4709 (copy-recursively "docs/_build/html" html)
4710 #t))))))
4711 (home-page "https://github.com/Kozea/cairocffi")
4712 (synopsis "Python bindings and object-oriented API for Cairo")
4713 (description
4714 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4715 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4716 graphics library with support for multiple backends including image buffers,
4717 PNG, PostScript, PDF, and SVG file output.")
4718 (license license:bsd-3)))
4719
4720 (define-public python2-cairocffi
4721 (package-with-python2 python-cairocffi))
4722
4723 (define-public python-decorator
4724 (package
4725 (name "python-decorator")
4726 (version "4.3.0")
4727 (source
4728 (origin
4729 (method url-fetch)
4730 (uri (pypi-uri "decorator" version))
4731 (sha256
4732 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4733 (build-system python-build-system)
4734 (home-page "https://pypi.python.org/pypi/decorator/")
4735 (synopsis "Python module to simplify usage of decorators")
4736 (description
4737 "The aim of the decorator module is to simplify the usage of decorators
4738 for the average programmer, and to popularize decorators usage giving examples
4739 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4740 etc. The core of this module is a decorator factory.")
4741 (license license:expat)))
4742
4743 (define-public python2-decorator
4744 (package-with-python2 python-decorator))
4745
4746 (define-public python-drmaa
4747 (package
4748 (name "python-drmaa")
4749 (version "0.7.7")
4750 (source
4751 (origin
4752 (method url-fetch)
4753 (uri (pypi-uri "drmaa" version))
4754 (sha256
4755 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4756 (build-system python-build-system)
4757 ;; The test suite requires libdrmaa which is provided by the cluster
4758 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4759 ;; should be set to the path of the libdrmaa library.
4760 (arguments '(#:tests? #f))
4761 (native-inputs
4762 `(("python-nose" ,python-nose)))
4763 (home-page "https://pypi.python.org/pypi/drmaa")
4764 (synopsis "Python bindings for the DRMAA library")
4765 (description
4766 "A Python package for Distributed Resource Management (DRM) job
4767 submission and control. This package is an implementation of the DRMAA 1.0
4768 Python language binding specification.")
4769 (license license:bsd-3)))
4770
4771 (define-public python2-drmaa
4772 (package-with-python2 python-drmaa))
4773
4774 (define-public python-grako
4775 (package
4776 (name "python-grako")
4777 (version "3.99.9")
4778 (source
4779 (origin
4780 (method url-fetch)
4781 (uri
4782 (pypi-uri "grako" version ".zip"))
4783 (sha256
4784 (base32
4785 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4786 (build-system python-build-system)
4787 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4788 (native-inputs
4789 `(("unzip" ,unzip)
4790 ("python-pytest" ,python-pytest)
4791 ("python-pytest-runner" ,python-pytest-runner)))
4792 (home-page "https://bitbucket.org/neogeny/grako")
4793 (synopsis "EBNF parser generator")
4794 (description
4795 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4796 memoizing PEG/Packrat parser in Python.")
4797 (license license:bsd-3)))
4798
4799 (define-public python2-grako
4800 (package-with-python2 python-grako))
4801
4802 (define-public python-gridmap
4803 (package
4804 (name "python-gridmap")
4805 (version "0.13.0")
4806 (source
4807 (origin
4808 (method git-fetch)
4809 (uri (git-reference
4810 (url "https://github.com/pygridtools/gridmap.git")
4811 (commit (string-append "v" version))))
4812 (file-name (git-file-name name version))
4813 (sha256
4814 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4815 (build-system python-build-system)
4816 (arguments
4817 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4818 (propagated-inputs
4819 `(("python-psutil" ,python-psutil)
4820 ("python-drmaa" ,python-drmaa)
4821 ("python-pyzmq" ,python-pyzmq)))
4822 (home-page "https://github.com/pygridtools/gridmap")
4823 (synopsis "Create jobs on a cluster directly from Python")
4824 (description
4825 "Gridmap is a Python package to allow you to easily create jobs on the
4826 cluster directly from Python. You can directly map Python functions onto the
4827 cluster without needing to write any wrapper code yourself.")
4828 (license license:gpl3+)))
4829
4830 (define-public python2-gridmap
4831 (package-with-python2 python-gridmap))
4832
4833 (define-public python-honcho
4834 (package
4835 (name "python-honcho")
4836 (version "1.0.1")
4837 (source
4838 (origin
4839 (method git-fetch)
4840 (uri (git-reference
4841 (url "https://github.com/nickstenning/honcho.git")
4842 (commit (string-append "v" version))))
4843 (file-name (git-file-name name version))
4844 (sha256
4845 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4846 (build-system python-build-system)
4847 (native-inputs
4848 `(("python-pytest" ,python-pytest)
4849 ("python-mock" ,python-mock)
4850 ("python-tox" ,python-tox)
4851 ("which" ,which))) ;for tests
4852 (propagated-inputs
4853 `(("python-jinja2" ,python-jinja2)))
4854 (arguments
4855 `(#:phases
4856 (modify-phases %standard-phases
4857 (delete 'check)
4858 (add-after 'install 'check
4859 (lambda* (#:key outputs inputs #:allow-other-keys)
4860 ;; fix honcho path in testsuite
4861 (substitute* "tests/conftest.py"
4862 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4863 "/bin/honcho" "'")))
4864 ;; It's easier to run tests after install.
4865 ;; Make installed package available for running the tests
4866 (add-installed-pythonpath inputs outputs)
4867 (invoke "py.test" "-v"))))))
4868 (home-page "https://github.com/nickstenning/honcho")
4869 (synopsis "Manage Procfile-based applications")
4870 (description
4871 "A Procfile is a file which describes how to run an application
4872 consisting of several processes. honcho starts all listed processes.
4873 The output of all running processes is collected by honcho and
4874 displayed.")
4875 (license license:expat)))
4876
4877 (define-public python2-honcho
4878 (package-with-python2 python-honcho))
4879
4880 (define-public python-pexpect
4881 (package
4882 (name "python-pexpect")
4883 (version "4.6.0")
4884 (source
4885 (origin
4886 (method url-fetch)
4887 (uri (pypi-uri "pexpect" version))
4888 (sha256
4889 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4890 (build-system python-build-system)
4891 (arguments
4892 `(#:phases
4893 (modify-phases %standard-phases
4894 (add-before 'check 'prepare-tests
4895 (lambda _
4896 (substitute* (find-files "tests")
4897 (("/bin/ls") (which "ls"))
4898 (("/bin/echo") (which "echo"))
4899 (("/bin/which") (which "which"))
4900 ;; Many tests try to use the /bin directory which
4901 ;; is not present in the build environment.
4902 ;; Use one that's non-empty and unlikely to change.
4903 (("/bin'") "/dev'"))
4904 ;; XXX: Socket connection test gets "Connection reset by peer".
4905 ;; Why does it not work? Delete for now.
4906 (delete-file "tests/test_socket.py")
4907 #t))
4908 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4909 (native-inputs
4910 `(("python-nose" ,python-nose)
4911 ("python-pytest" ,python-pytest)
4912 ("man-db" ,man-db)
4913 ("which" ,which)
4914 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4915 (propagated-inputs
4916 `(("python-ptyprocess" ,python-ptyprocess)))
4917 (home-page "http://pexpect.readthedocs.org/")
4918 (synopsis "Controlling interactive console applications")
4919 (description
4920 "Pexpect is a pure Python module for spawning child applications;
4921 controlling them; and responding to expected patterns in their output.
4922 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4923 child application and control it as if a human were typing commands.")
4924 (license license:isc)))
4925
4926 (define-public python2-pexpect
4927 (package-with-python2 python-pexpect))
4928
4929 (define-public python-setuptools-scm
4930 (package
4931 (name "python-setuptools-scm")
4932 (version "3.2.0")
4933 (source (origin
4934 (method url-fetch)
4935 (uri (pypi-uri "setuptools_scm" version))
4936 (sha256
4937 (base32
4938 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4939 (build-system python-build-system)
4940 (home-page "https://github.com/pypa/setuptools_scm/")
4941 (synopsis "Manage Python package versions in SCM metadata")
4942 (description
4943 "Setuptools_scm handles managing your Python package versions in
4944 @dfn{software configuration management} (SCM) metadata instead of declaring
4945 them as the version argument or in a SCM managed file.")
4946 (license license:expat)))
4947
4948 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
4949 (define-public python-setuptools-scm-3.3
4950 (package
4951 (inherit python-setuptools-scm)
4952 (version "3.3.3")
4953 (source (origin
4954 (method url-fetch)
4955 (uri (pypi-uri "setuptools_scm" version))
4956 (sha256
4957 (base32
4958 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4959
4960 (define-public python2-setuptools-scm
4961 (package-with-python2 python-setuptools-scm))
4962
4963 (define-public python-pathlib2
4964 (package
4965 (name "python-pathlib2")
4966 (version "2.3.3")
4967 (source
4968 (origin
4969 (method url-fetch)
4970 (uri (pypi-uri "pathlib2" version))
4971 (sha256
4972 (base32
4973 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4974 (build-system python-build-system)
4975 (propagated-inputs
4976 `(("python-scandir" ,python-scandir)
4977 ("python-six" ,python-six)))
4978 (home-page "https://pypi.python.org/pypi/pathlib2/")
4979 (synopsis "Object-oriented file system paths")
4980 (description "The goal of pathlib2 is to provide a backport of the
4981 standard @code{pathlib} module which tracks the standard library module, so
4982 all the newest features of the standard @code{pathlib} can be used also on
4983 older Python versions.")
4984 (license license:expat)))
4985
4986 (define-public python2-importlib-resources
4987 (package
4988 (name "python2-importlib-resources")
4989 (version "1.0.2")
4990 (source (origin
4991 (method url-fetch)
4992 (uri (pypi-uri "importlib_resources" version))
4993 (sha256
4994 (base32
4995 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
4996 (build-system python-build-system)
4997 (arguments
4998 `(#:python ,python-2))
4999 (native-inputs
5000 `(("python-wheel" ,python2-wheel)))
5001 (propagated-inputs
5002 `(("python-pathlib2" ,python2-pathlib2)
5003 ("python-typing" ,python2-typing)))
5004 (home-page "https://gitlab.com/python-devs/importlib_resources")
5005 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5006 (description
5007 "This package provides an implementation of @code{importlib.resources}
5008 for older versions of Python.")
5009 (license license:asl2.0)))
5010
5011 (define-public python-importlib-metadata
5012 (package
5013 (name "python-importlib-metadata")
5014 (version "1.4.0")
5015 (source
5016 (origin
5017 (method url-fetch)
5018 (uri (pypi-uri "importlib_metadata" version))
5019 (sha256
5020 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
5021 (build-system python-build-system)
5022 (propagated-inputs
5023 `(("python-zipp" ,python-zipp)))
5024 (native-inputs
5025 `(("python-setuptools-scm" ,python-setuptools-scm)
5026 ("python-packaging" ,python-packaging)))
5027 (home-page "https://importlib-metadata.readthedocs.io/")
5028 (synopsis "Read metadata from Python packages")
5029 (description
5030 "@code{importlib_metadata} is a library which provides an API for
5031 accessing an installed Python package's metadata, such as its entry points or
5032 its top-level name. This functionality intends to replace most uses of
5033 @code{pkg_resources} entry point API and metadata API. Along with
5034 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5035 need to use the older and less efficient @code{pkg_resources} package.")
5036 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
5037 (license license:asl2.0)))
5038
5039 (define-public python2-importlib-metadata
5040 (let ((base (package-with-python2 (strip-python2-variant
5041 python-importlib-metadata))))
5042 (package/inherit
5043 base
5044 (name "python2-importlib-metadata")
5045 (propagated-inputs
5046 `(("python-configparser" ,python2-configparser)
5047 ("python-contextlib2" ,python2-contextlib2)
5048 ("python-importlib-resources" ,python2-importlib-resources)
5049 ("python-pathlib2" ,python2-pathlib2)
5050 ,@(package-propagated-inputs base))))))
5051
5052 (define-public python-jaraco-packaging
5053 (package
5054 (name "python-jaraco-packaging")
5055 (version "6.1")
5056 (source
5057 (origin
5058 (method url-fetch)
5059 (uri (pypi-uri "jaraco.packaging" version))
5060 (sha256
5061 (base32
5062 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5063 (build-system python-build-system)
5064 (propagated-inputs
5065 `(("python-pytest" ,python-pytest)
5066 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5067 ("python-pytest-flake8" ,python-pytest-flake8)
5068 ("python-rst.linker" ,python-rst.linker)
5069 ("python-setuptools" ,python-setuptools)
5070 ("python-setuptools-scm" ,python-setuptools-scm)
5071 ("python-six" ,python-six)
5072 ("python-sphinx" ,python-sphinx)))
5073 (home-page "https://github.com/jaraco/jaraco.packaging")
5074 (synopsis "Tools to supplement packaging Python releases")
5075 (description
5076 "This package provides various tools to supplement packaging Python
5077 releases.")
5078 (license license:expat)))
5079
5080 (define-public python-pathpy
5081 (package
5082 (name "python-pathpy")
5083 (version "11.5.1")
5084 (source
5085 (origin
5086 (method url-fetch)
5087 (uri (pypi-uri "path.py" version))
5088 (sha256
5089 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5090 (outputs '("out" "doc"))
5091 (build-system python-build-system)
5092 (propagated-inputs
5093 `(("python-appdirs" ,python-appdirs)
5094 ("python-importlib-metadata" ,python-importlib-metadata)))
5095 (native-inputs
5096 `(("python-setuptools-scm" ,python-setuptools-scm)
5097 ("python-sphinx" ,python-sphinx)
5098 ("python-rst.linker" ,python-rst.linker)
5099 ("python-pytest" ,python-pytest)
5100 ("python-pytest-runner" ,python-pytest-runner)
5101 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5102 (arguments
5103 `(#:phases
5104 (modify-phases %standard-phases
5105 (add-after 'build 'build-doc
5106 (lambda _
5107 (setenv "LANG" "en_US.UTF-8")
5108 (invoke "python" "setup.py" "build_sphinx")))
5109 (add-after 'install 'install-doc
5110 (lambda* (#:key outputs #:allow-other-keys)
5111 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5112 (doc (string-append data "/doc/" ,name "-" ,version))
5113 (html (string-append doc "/html")))
5114 (mkdir-p html)
5115 (for-each (lambda (file)
5116 (copy-file file (string-append doc "/" file)))
5117 '("README.rst" "CHANGES.rst"))
5118 (copy-recursively "build/sphinx/html" html)
5119 #t)))
5120 (replace 'check
5121 (lambda _
5122 ;; The import time test aborts if an import takes longer than
5123 ;; 100ms. It may very well take a little longer than that.
5124 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5125 (home-page "https://github.com/jaraco/path.py")
5126 (synopsis "Python module wrapper for built-in os.path")
5127 (description
5128 "@code{path.py} implements path objects as first-class entities, allowing
5129 common operations on files to be invoked on those path objects directly.")
5130 (license license:expat)))
5131
5132 (define-public python2-pathpy
5133 (package-with-python2 python-pathpy))
5134
5135 (define-public python-simplegeneric
5136 (package
5137 (name "python-simplegeneric")
5138 (version "0.8.1")
5139 (source
5140 (origin
5141 (method url-fetch)
5142 (uri (pypi-uri "simplegeneric" version ".zip"))
5143 (sha256
5144 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5145 (build-system python-build-system)
5146 (native-inputs
5147 `(("unzip" ,unzip)))
5148 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5149 (synopsis "Python module for simple generic functions")
5150 (description
5151 "The simplegeneric module lets you define simple single-dispatch generic
5152 functions, akin to Python’s built-in generic functions like @code{len()},
5153 @code{iter()} and so on. However, instead of using specially-named methods,
5154 these generic functions use simple lookup tables, akin to those used by
5155 e.g. @code{pickle.dump()} and other generic functions found in the Python
5156 standard library.")
5157 (license license:zpl2.1)))
5158
5159 (define-public python2-simplegeneric
5160 (package-with-python2 python-simplegeneric))
5161
5162 (define-public python-ipython-genutils
5163 ;; TODO: This package is retired, check if can be removed, see description.
5164 (package
5165 (name "python-ipython-genutils")
5166 (version "0.1.0")
5167 (source
5168 (origin
5169 (method url-fetch)
5170 (uri (pypi-uri "ipython_genutils" version))
5171 (sha256
5172 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5173 (build-system python-build-system)
5174 (arguments `(#:tests? #f)) ; no tests
5175 (home-page "https://ipython.org")
5176 (synopsis "Vestigial utilities from IPython")
5177 (description
5178 "This package provides retired utilities from IPython. No packages
5179 outside IPython/Jupyter should depend on it.
5180
5181 This package shouldn't exist. It contains some common utilities shared by
5182 Jupyter and IPython projects during The Big Split. As soon as possible, those
5183 packages will remove their dependency on this, and this package will go
5184 away.")
5185 (license license:bsd-3)))
5186
5187 (define-public python2-ipython-genutils
5188 (package-with-python2 python-ipython-genutils))
5189
5190 (define-public python-traitlets
5191 (package
5192 (name "python-traitlets")
5193 (version "4.3.3")
5194 (source
5195 (origin
5196 (method url-fetch)
5197 (uri (pypi-uri "traitlets" version))
5198 (sha256
5199 (base32
5200 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5201 (build-system python-build-system)
5202 (arguments
5203 `(#:phases
5204 (modify-phases %standard-phases
5205 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5206 (propagated-inputs
5207 `(("python-ipython-genutils" ,python-ipython-genutils)
5208 ("python-decorator" ,python-decorator)))
5209 (native-inputs
5210 `(("python-pytest" ,python-pytest)))
5211 (properties `((python2-variant . ,(delay python2-traitlets))))
5212 (home-page "https://ipython.org")
5213 (synopsis "Configuration system for Python applications")
5214 (description
5215 "Traitlets is a framework that lets Python classes have attributes with
5216 type checking, dynamically calculated default values, and ‘on change’
5217 callbacks. The package also includes a mechanism to use traitlets for
5218 configuration, loading values from files or from command line arguments. This
5219 is a distinct layer on top of traitlets, so you can use traitlets in your code
5220 without using the configuration machinery.")
5221 (license license:bsd-3)))
5222
5223 (define-public python2-traitlets
5224 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5225 (package
5226 (inherit traitlets)
5227 (propagated-inputs
5228 `(("python2-enum34" ,python2-enum34)
5229 ,@(package-propagated-inputs traitlets))))))
5230
5231 (define-public python-jupyter-core
5232 (package
5233 (name "python-jupyter-core")
5234 (version "4.4.0")
5235 (source
5236 (origin
5237 (method url-fetch)
5238 (uri (string-append (pypi-uri "jupyter_core" version)))
5239 (sha256
5240 (base32
5241 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5242 (build-system python-build-system)
5243 ;; FIXME: not sure how to run the tests
5244 (arguments `(#:tests? #f))
5245 (propagated-inputs
5246 `(("python-traitlets" ,python-traitlets)))
5247 (home-page "http://jupyter.org/")
5248 (synopsis "Jupyter base package")
5249 (description
5250 "Jupyter core is the base package on which Jupyter projects rely.")
5251 (license license:bsd-3)))
5252
5253 (define-public python2-jupyter-core
5254 (package-with-python2 python-jupyter-core))
5255
5256 (define-public python-jupyter-client
5257 (package
5258 (name "python-jupyter-client")
5259 (version "5.2.4")
5260 (source
5261 (origin
5262 (method url-fetch)
5263 (uri (pypi-uri "jupyter_client" version))
5264 (sha256
5265 (base32
5266 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5267 (build-system python-build-system)
5268 ;; Tests fail because of missing native python kernel which I assume is
5269 ;; provided by the ipython package, which we cannot use because it would
5270 ;; cause a dependency cycle.
5271 (arguments
5272 `(#:tests? #f
5273
5274 #:phases (modify-phases %standard-phases
5275 (add-after 'unpack 'set-tool-file-names
5276 (lambda* (#:key inputs #:allow-other-keys)
5277 (let ((iproute (assoc-ref inputs "iproute")))
5278 (substitute* "jupyter_client/localinterfaces.py"
5279 (("'ip'")
5280 (string-append "'" iproute "/sbin/ip'")))
5281 #t))))))
5282 (inputs
5283 `(("iproute" ,iproute)))
5284 (propagated-inputs
5285 `(("python-pyzmq" ,python-pyzmq)
5286 ("python-traitlets" ,python-traitlets)
5287 ("python-jupyter-core" ,python-jupyter-core)))
5288 (home-page "http://jupyter.org/")
5289 (synopsis "Jupyter protocol implementation and client libraries")
5290 (description
5291 "The @code{jupyter_client} package contains the reference implementation
5292 of the Jupyter protocol. It also provides client and kernel management APIs
5293 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5294 installing @code{kernelspec}s for use with Jupyter frontends.")
5295 (license license:bsd-3)))
5296
5297 (define-public python2-jupyter-client
5298 (package-with-python2 python-jupyter-client))
5299
5300 (define-public python-ipykernel
5301 (package
5302 (name "python-ipykernel")
5303 (version "5.1.3")
5304 (source
5305 (origin
5306 (method url-fetch)
5307 (uri (pypi-uri "ipykernel" version))
5308 (sha256
5309 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5310 (build-system python-build-system)
5311 (arguments
5312 `(#:phases
5313 (modify-phases %standard-phases
5314 (replace 'check
5315 (lambda _
5316 (setenv "HOME" "/tmp")
5317 (invoke "pytest" "-v")
5318 #t))
5319 (add-after 'install 'set-python-file-name
5320 (lambda* (#:key outputs #:allow-other-keys)
5321 ;; Record the absolute file name of the 'python' executable in
5322 ;; 'kernel.json'.
5323 (let ((out (assoc-ref outputs "out")))
5324 (substitute* (string-append out "/share/jupyter"
5325 "/kernels/python3/kernel.json")
5326 (("\"python\"")
5327 (string-append "\"" (which "python") "\"")))
5328 #t))))))
5329 (propagated-inputs
5330 `(("python-ipython" ,python-ipython)
5331 ;; imported at runtime during connect
5332 ("python-jupyter-client" ,python-jupyter-client)))
5333 (native-inputs
5334 `(("python-flaky" ,python-flaky)
5335 ("python-nose" ,python-nose)
5336 ("python-pytest" ,python-pytest)))
5337 (home-page "https://ipython.org")
5338 (synopsis "IPython Kernel for Jupyter")
5339 (description
5340 "This package provides the IPython kernel for Jupyter.")
5341 (license license:bsd-3)))
5342
5343 ;; Version 5.1.1 and above no longer support Python 2.
5344 (define-public python2-ipykernel
5345 (package
5346 (name "python2-ipykernel")
5347 (version "5.1.0")
5348 (source
5349 (origin
5350 (method url-fetch)
5351 (uri (pypi-uri "ipykernel" version))
5352 (sha256
5353 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5354 (build-system python-build-system)
5355 (arguments
5356 `(#:python ,python-2
5357 #:phases
5358 (modify-phases %standard-phases
5359 (replace 'check
5360 (lambda _
5361 (setenv "HOME" "/tmp")
5362 (invoke "pytest" "-v")
5363 #t)))))
5364 (propagated-inputs
5365 `(("python2-ipython" ,python2-ipython)
5366 ;; imported at runtime during connect
5367 ("python2-jupyter-client" ,python2-jupyter-client)))
5368 (native-inputs
5369 `(("python2-pytest" ,python2-pytest)
5370 ("python2-nose" ,python2-nose)))
5371 (home-page "https://ipython.org")
5372 (synopsis "IPython Kernel for Jupyter")
5373 (description
5374 "This package provides the IPython kernel for Jupyter.")
5375 (license license:bsd-3)))
5376
5377 (define-public python-pari-jupyter
5378 (package
5379 (name "python-pari-jupyter")
5380 (version "1.3.2")
5381 (source
5382 (origin
5383 (method url-fetch)
5384 (uri (pypi-uri "pari_jupyter" version))
5385 (sha256
5386 (base32
5387 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5388 (build-system python-build-system)
5389 (propagated-inputs
5390 `(("python-ipykernel" ,python-ipykernel)))
5391 (inputs
5392 `(("pari-gp" ,pari-gp)
5393 ("readline" ,readline)))
5394 (arguments
5395 `(#:tests? #f)) ; no test suite
5396 (home-page
5397 "https://github.com/jdemeyer/pari_jupyter")
5398 (synopsis "A Jupyter kernel for PARI/GP")
5399 (description "The package provides a PARI/GP kernel for Jupyter.")
5400 (license license:gpl3+)))
5401
5402 (define-public python-backcall
5403 (package
5404 (name "python-backcall")
5405 (version "0.1.0")
5406 (source
5407 (origin
5408 (method url-fetch)
5409 (uri (pypi-uri "backcall" version))
5410 (sha256
5411 (base32
5412 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5413 (build-system python-build-system)
5414 (home-page "https://github.com/takluyver/backcall/")
5415 (synopsis "Specifications for callback functions passed in to an API")
5416 (description
5417 "If your code lets other people supply callback functions, it's important
5418 to specify the function signature you expect, and check that functions support
5419 that. Adding extra parameters later would break other peoples code unless
5420 you're careful. The @code{backcall} package provides a way of specifying the
5421 callback signature using a prototype function.")
5422 (license license:bsd-3)))
5423
5424 ;; This is the latest release of the LTS version of ipython with support for
5425 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5426 ;; dropped support for Python 2.7.
5427 (define-public python2-ipython
5428 (package
5429 (name "python2-ipython")
5430 (version "5.8.0")
5431 (source
5432 (origin
5433 (method url-fetch)
5434 (uri (pypi-uri "ipython" version ".tar.gz"))
5435 (sha256
5436 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5437 (build-system python-build-system)
5438 (propagated-inputs
5439 `(("python2-backports-shutil-get-terminal-size"
5440 ,python2-backports-shutil-get-terminal-size)
5441 ("python2-pathlib2" ,python2-pathlib2)
5442 ("python2-pyzmq" ,python2-pyzmq)
5443 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5444 ("python2-terminado" ,python2-terminado)
5445 ("python2-matplotlib" ,python2-matplotlib)
5446 ("python2-numpy" ,python2-numpy)
5447 ("python2-numpydoc" ,python2-numpydoc)
5448 ("python2-jinja2" ,python2-jinja2)
5449 ("python2-mistune" ,python2-mistune)
5450 ("python2-pexpect" ,python2-pexpect)
5451 ("python2-pickleshare" ,python2-pickleshare)
5452 ("python2-simplegeneric" ,python2-simplegeneric)
5453 ("python2-jsonschema" ,python2-jsonschema)
5454 ("python2-traitlets" ,python2-traitlets)
5455 ("python2-nbformat" ,python2-nbformat)
5456 ("python2-pygments" ,python2-pygments)))
5457 (inputs
5458 `(("readline" ,readline)
5459 ("which" ,which)))
5460 (native-inputs
5461 `(("graphviz" ,graphviz)
5462 ("pkg-config" ,pkg-config)
5463 ("python2-requests" ,python2-requests) ;; for tests
5464 ("python2-testpath" ,python2-testpath)
5465 ("python2-mock" ,python2-mock)
5466 ("python2-nose" ,python2-nose)))
5467 (arguments
5468 `(#:python ,python-2
5469 #:phases
5470 (modify-phases %standard-phases
5471 (add-before 'check 'delete-broken-tests
5472 (lambda* (#:key inputs #:allow-other-keys)
5473 ;; These tests throw errors for unknown reasons.
5474 (delete-file "IPython/core/tests/test_profile.py")
5475 (delete-file "IPython/core/tests/test_interactiveshell.py")
5476 (delete-file "IPython/core/tests/test_magic.py")
5477 #t)))))
5478 (home-page "https://ipython.org")
5479 (synopsis "IPython is a tool for interactive computing in Python")
5480 (description
5481 "IPython provides a rich architecture for interactive computing with:
5482 Powerful interactive shells, a browser-based notebook, support for interactive
5483 data visualization, embeddable interpreters and tools for parallel
5484 computing.")
5485 (license license:bsd-3)))
5486
5487 (define-public python-ipython
5488 (package
5489 (name "python-ipython")
5490 (version "7.9.0")
5491 (source
5492 (origin
5493 (method url-fetch)
5494 (uri (pypi-uri "ipython" version ".tar.gz"))
5495 (sha256
5496 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5497 (build-system python-build-system)
5498 (propagated-inputs
5499 `(("python-backcall" ,python-backcall)
5500 ("python-pyzmq" ,python-pyzmq)
5501 ("python-prompt-toolkit" ,python-prompt-toolkit)
5502 ("python-terminado" ,python-terminado)
5503 ("python-matplotlib" ,python-matplotlib)
5504 ("python-numpy" ,python-numpy)
5505 ("python-numpydoc" ,python-numpydoc)
5506 ("python-jedi" ,python-jedi)
5507 ("python-jinja2" ,python-jinja2)
5508 ("python-mistune" ,python-mistune)
5509 ("python-pexpect" ,python-pexpect)
5510 ("python-pickleshare" ,python-pickleshare)
5511 ("python-simplegeneric" ,python-simplegeneric)
5512 ("python-jsonschema" ,python-jsonschema)
5513 ("python-traitlets" ,python-traitlets)
5514 ("python-nbformat" ,python-nbformat)
5515 ("python-pygments" ,python-pygments)))
5516 (inputs
5517 `(("readline" ,readline)
5518 ("which" ,which)))
5519 (native-inputs
5520 `(("graphviz" ,graphviz)
5521 ("pkg-config" ,pkg-config)
5522 ("python-requests" ,python-requests) ;; for tests
5523 ("python-testpath" ,python-testpath)
5524 ("python-nose" ,python-nose)))
5525 (arguments
5526 `(#:phases
5527 (modify-phases %standard-phases
5528 (add-after 'unpack 'make-docs-reproducible
5529 (lambda _
5530 (substitute* "IPython/sphinxext/ipython_directive.py"
5531 ((".*import datetime") "")
5532 ((".*datetime.datetime.now\\(\\)") "")
5533 (("%timeit") "# %timeit"))
5534 #t))
5535 ;; Tests can only be run after the library has been installed and not
5536 ;; within the source directory.
5537 (delete 'check)
5538 (add-after 'install 'check
5539 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5540 (if tests?
5541 (begin
5542 ;; Make installed package available for running the tests
5543 (add-installed-pythonpath inputs outputs)
5544 (setenv "HOME" "/tmp/") ;; required by a test
5545 ;; We only test the core because one of the other tests
5546 ;; tries to import ipykernel.
5547 (invoke "python" "IPython/testing/iptest.py"
5548 "-v" "IPython/core/tests"))
5549 #t)))
5550 (add-before 'check 'fix-tests
5551 (lambda* (#:key inputs #:allow-other-keys)
5552 (substitute* "./IPython/utils/_process_posix.py"
5553 (("/usr/bin/env', 'which") (which "which")))
5554 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5555 (("#!/usr/bin/env python")
5556 (string-append "#!" (which "python"))))
5557 ;; This test introduces a circular dependency on ipykernel
5558 ;; (which depends on ipython).
5559 (delete-file "IPython/core/tests/test_display.py")
5560 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5561 (delete-file "IPython/core/tests/test_interactiveshell.py")
5562 #t)))))
5563 (home-page "https://ipython.org")
5564 (synopsis "IPython is a tool for interactive computing in Python")
5565 (description
5566 "IPython provides a rich architecture for interactive computing with:
5567 Powerful interactive shells, a browser-based notebook, support for interactive
5568 data visualization, embeddable interpreters and tools for parallel
5569 computing.")
5570 (license license:bsd-3)))
5571
5572 (define-public python-ipython-documentation
5573 (package
5574 (inherit python-ipython)
5575 (name "python-ipython-documentation")
5576 (version (package-version python-ipython))
5577 (arguments
5578 `(#:phases
5579 (modify-phases %standard-phases
5580 (delete 'build)
5581 (delete 'check)
5582 (replace 'install
5583 (lambda* (#:key outputs #:allow-other-keys)
5584 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5585 (doc (string-append data "/doc/" ,name "-" ,version))
5586 (html (string-append doc "/html"))
5587 (man1 (string-append data "/man/man1"))
5588 (info (string-append data "/info"))
5589 (examples (string-append doc "/examples"))
5590 (python-arg (string-append "PYTHON=" (which "python"))))
5591 (setenv "LANG" "en_US.utf8")
5592 (with-directory-excursion "docs"
5593 ;; FIXME: pdf fails to build
5594 ;;(system* "make" "pdf" "PAPER=a4")
5595 (system* "make" python-arg "html")
5596 ;; FIXME: the generated texi file contains ^@^@, which trips
5597 ;; up the parser.
5598 ;; (system* "make" python-arg "info")
5599 )
5600 (copy-recursively "docs/man" man1)
5601 (copy-recursively "examples" examples)
5602 (copy-recursively "docs/build/html" html)
5603 ;; (copy-file "docs/build/latex/ipython.pdf"
5604 ;; (string-append doc "/ipython.pdf"))
5605 (mkdir-p info)
5606 ;; (copy-file "docs/build/texinfo/ipython.info"
5607 ;; (string-append info "/ipython.info"))
5608 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5609 #t)))))
5610 (inputs
5611 `(("python-ipython" ,python-ipython)
5612 ("python-ipykernel" ,python-ipykernel)))
5613 (native-inputs
5614 `(("python-sphinx" ,python-sphinx)
5615 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5616 ;; FIXME: It's possible that a smaller union would work just as well.
5617 ("texlive" ,(texlive-union (list texlive-amsfonts
5618 texlive-fonts-ec
5619 texlive-generic-ifxetex
5620 texlive-generic-pdftex
5621 texlive-latex-capt-of
5622 texlive-latex-cmap
5623 texlive-latex-environ
5624 texlive-latex-eqparbox
5625 texlive-latex-etoolbox
5626 texlive-latex-expdlist
5627 texlive-latex-fancyhdr
5628 texlive-latex-fancyvrb
5629 texlive-latex-fncychap
5630 texlive-latex-float
5631 texlive-latex-framed
5632 texlive-latex-geometry
5633 texlive-latex-graphics
5634 texlive-latex-hyperref
5635 texlive-latex-mdwtools
5636 texlive-latex-multirow
5637 texlive-latex-needspace
5638 texlive-latex-oberdiek
5639 texlive-latex-parskip
5640 texlive-latex-preview
5641 texlive-latex-tabulary
5642 texlive-latex-threeparttable
5643 texlive-latex-titlesec
5644 texlive-latex-trimspaces
5645 texlive-latex-ucs
5646 texlive-latex-upquote
5647 texlive-latex-url
5648 texlive-latex-varwidth
5649 texlive-latex-wrapfig)))
5650 ("texinfo" ,texinfo)))))
5651
5652 (define-public python-urwid
5653 (package
5654 (name "python-urwid")
5655 (version "2.0.1")
5656 (source
5657 (origin
5658 (method url-fetch)
5659 (uri (pypi-uri "urwid" version))
5660 (sha256
5661 (base32
5662 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5663 (build-system python-build-system)
5664 (home-page "http://urwid.org")
5665 (synopsis "Console user interface library for Python")
5666 (description
5667 "Urwid is a curses-based UI/widget library for Python. It includes many
5668 features useful for text console applications.")
5669 (license license:lgpl2.1+)))
5670
5671 (define-public python2-urwid
5672 (package-with-python2 python-urwid))
5673
5674 (define-public python-urwidtrees
5675 (package
5676 (name "python-urwidtrees")
5677 (version "1.0.2")
5678 (source
5679 (origin
5680 (method git-fetch)
5681 ;; package author intends on distributing via github rather than pypi:
5682 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5683 (uri (git-reference
5684 (url "https://github.com/pazz/urwidtrees")
5685 (commit version)))
5686 (file-name (git-file-name name version))
5687 (sha256
5688 (base32
5689 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
5690 (build-system python-build-system)
5691 (arguments
5692 '(#:use-setuptools? #f
5693 #:tests? #f)) ; no tests
5694 (propagated-inputs `(("python-urwid" ,python-urwid)))
5695 (home-page "https://github.com/pazz/urwidtrees")
5696 (synopsis "Tree widgets for urwid")
5697 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5698 toolkit. Use it to build trees of widgets.")
5699 (license license:gpl3+)))
5700
5701 (define-public python2-urwidtrees
5702 (package-with-python2 python-urwidtrees))
5703
5704 (define-public python-ua-parser
5705 (package
5706 (name "python-ua-parser")
5707 (version "0.8.0")
5708 (source
5709 (origin
5710 (method url-fetch)
5711 (uri (pypi-uri "ua-parser" version))
5712 (sha256
5713 (base32
5714 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5715 (build-system python-build-system)
5716 (arguments
5717 `(#:tests? #f)) ;no test suite in release
5718 (native-inputs
5719 `(("python-pyyaml" ,python-pyyaml)))
5720 (home-page "https://github.com/ua-parser/uap-python")
5721 (synopsis "User agent parser")
5722 (description
5723 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5724 (license license:asl2.0)))
5725
5726 (define-public python2-ua-parser
5727 (package-with-python2 python-ua-parser))
5728
5729 (define-public python-user-agents
5730 (package
5731 (name "python-user-agents")
5732 (version "1.1.0")
5733 (source
5734 (origin
5735 (method url-fetch)
5736 (uri (pypi-uri "user-agents" version))
5737 (sha256
5738 (base32
5739 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5740 (build-system python-build-system)
5741 (arguments
5742 `(#:tests? #f)) ;missing devices.json test file in release
5743 (propagated-inputs
5744 `(("python-ua-parser" ,python-ua-parser)))
5745 (home-page "https://github.com/selwin/python-user-agents")
5746 (synopsis "User Agent strings parsing library")
5747 (description
5748 "A library to identify devices (phones, tablets) and their capabilities by
5749 parsing (browser/HTTP) user agent strings.")
5750 (license license:expat)))
5751
5752 (define-public python2-user-agents
5753 (package-with-python2 python-user-agents))
5754
5755 (define-public python-dbus
5756 (package
5757 (name "python-dbus")
5758 (version "1.2.14")
5759 (source
5760 (origin
5761 (method url-fetch)
5762 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5763 "dbus-python-" version ".tar.gz"))
5764 (sha256
5765 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5766 (build-system gnu-build-system)
5767 (native-inputs
5768 `(("pkg-config" ,pkg-config)))
5769 (inputs
5770 `(("python" ,python-wrapper)
5771 ("dbus-glib" ,dbus-glib)))
5772 (synopsis "Python bindings for D-bus")
5773 (description "python-dbus provides bindings for libdbus, the reference
5774 implementation of D-Bus.")
5775 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5776 (license license:expat)))
5777
5778 (define-public python2-dbus
5779 (package (inherit python-dbus)
5780 (name "python2-dbus")
5781 (inputs `(("python" ,python-2)
5782 ,@(alist-delete "python"
5783 (package-inputs python-dbus)
5784 equal?)))))
5785
5786 (define-public python-notify2
5787 (package
5788 (name "python-notify2")
5789 (version "0.3.1")
5790 (source
5791 (origin
5792 (method url-fetch)
5793 (uri (pypi-uri "notify2" version))
5794 (sha256
5795 (base32
5796 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5797 (build-system python-build-system)
5798 (arguments `(#:tests? #f)) ; tests depend on system state
5799 (native-inputs
5800 `(("python-dbus" ,python-dbus)))
5801 (home-page "https://bitbucket.org/takluyver/pynotify2")
5802 (synopsis "Python interface to D-Bus notifications")
5803 (description
5804 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5805 It is a reimplementation of pynotify in pure Python, and an alternative to
5806 the GObject Introspection bindings to libnotify for non-GTK applications.")
5807 (license (list license:bsd-2
5808 license:lgpl2.1+))))
5809
5810 (define-public python2-notify2
5811 (package-with-python2 python-notify2))
5812
5813 ;; beautifulsoup4 has a totally different namespace than 3.x,
5814 ;; and pypi seems to put it under its own name, so I guess we should too
5815 (define-public python-beautifulsoup4
5816 (package
5817 (name "python-beautifulsoup4")
5818 (version "4.7.1")
5819 (source
5820 (origin
5821 (method url-fetch)
5822 (uri (pypi-uri "beautifulsoup4" version))
5823 (sha256
5824 (base32
5825 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5826 (build-system python-build-system)
5827 (arguments
5828 `(#:phases
5829 (modify-phases %standard-phases
5830 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5831 ;; must use this conversion script when building with Python 3. The
5832 ;; conversion script also runs the tests.
5833 ;; For more information, see the file 'convert-py3k' in the source
5834 ;; distribution.
5835 (replace 'check
5836 (lambda _ (invoke "./convert-py3k"))))))
5837 (propagated-inputs
5838 `(("python-soupsieve" ,python-soupsieve)))
5839 (home-page
5840 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5841 (synopsis
5842 "Python screen-scraping library")
5843 (description
5844 "Beautiful Soup is a Python library designed for rapidly setting up
5845 screen-scraping projects. It offers Pythonic idioms for navigating,
5846 searching, and modifying a parse tree, providing a toolkit for
5847 dissecting a document and extracting what you need. It automatically
5848 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5849 (license license:expat)
5850 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5851
5852 (define-public python2-beautifulsoup4
5853 (package
5854 (inherit (package-with-python2
5855 (strip-python2-variant python-beautifulsoup4)))
5856 (arguments `(#:python ,python-2))))
5857
5858 (define-public python-soupsieve
5859 (package
5860 (name "python-soupsieve")
5861 (version "1.9.5")
5862 (source
5863 (origin
5864 (method url-fetch)
5865 (uri (pypi-uri "soupsieve" version))
5866 (sha256
5867 (base32
5868 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
5869 (build-system python-build-system)
5870 (arguments `(#:tests? #f))
5871 ;;XXX: 2 tests fail currently despite claming they were to be
5872 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5873 ;;don't want to create a circular dependency.
5874 (home-page "https://github.com/facelessuser/soupsieve")
5875 (synopsis "CSS selector library")
5876 (description
5877 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5878 Soup 4. It aims to provide selecting, matching, and filtering using modern
5879 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5880 specifications up through the latest CSS level 4 drafts and beyond (though
5881 some are not yet implemented).")
5882 (properties `((python2-variant . ,(delay python2-soupsieve))))
5883 (license license:expat)))
5884
5885 (define-public python2-soupsieve
5886 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5887 (package
5888 (inherit base)
5889 (propagated-inputs
5890 `(("python2-backports-functools-lru-cache"
5891 ,python2-backports-functools-lru-cache)
5892 ,@(package-propagated-inputs base))))))
5893
5894 (define-public python-netifaces
5895 (package
5896 (name "python-netifaces")
5897 (version "0.10.7")
5898 (source
5899 (origin
5900 (method url-fetch)
5901 (uri (pypi-uri "netifaces" version))
5902 (sha256
5903 (base32
5904 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5905 (build-system python-build-system)
5906 (home-page "https://github.com/al45tair/netifaces")
5907 (synopsis
5908 "Python module for portable network interface information")
5909 (description
5910 "Netifaces is a Python module providing information on network
5911 interfaces in an easy and portable manner.")
5912 (license license:expat)))
5913
5914 (define-public python2-netifaces
5915 (package-with-python2 python-netifaces))
5916
5917 (define-public python-networkx
5918 (package
5919 (name "python-networkx")
5920 (version "2.2")
5921 (source
5922 (origin
5923 (method url-fetch)
5924 (uri (pypi-uri "networkx" version ".zip"))
5925 (sha256
5926 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5927 (build-system python-build-system)
5928 ;; python-decorator is needed at runtime.
5929 (propagated-inputs
5930 `(("python-decorator" ,python-decorator)))
5931 (native-inputs
5932 `(("python-nose" ,python-nose)
5933 ("unzip" ,unzip)))
5934 (home-page "https://networkx.github.io/")
5935 (synopsis "Python module for creating and manipulating graphs and networks")
5936 (description
5937 "NetworkX is a Python package for the creation, manipulation, and study
5938 of the structure, dynamics, and functions of complex networks.")
5939 (license license:bsd-3)))
5940
5941 (define-public python2-networkx
5942 (package-with-python2 python-networkx))
5943
5944 (define-public python-datrie
5945 (package
5946 (name "python-datrie")
5947 (version "0.8")
5948 (source
5949 (origin
5950 (method url-fetch)
5951 (uri (pypi-uri "datrie" version))
5952 (sha256
5953 (base32
5954 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5955 (build-system python-build-system)
5956 (native-inputs
5957 `(("python-cython" ,python-cython)
5958 ("python-hypothesis" ,python-hypothesis)
5959 ("python-pytest" ,python-pytest)
5960 ("python-pytest-runner" ,python-pytest-runner)))
5961 (home-page "https://github.com/kmike/datrie")
5962 (synopsis "Fast, efficiently stored trie for Python")
5963 (description
5964 "This package provides a fast, efficiently stored trie implementation for
5965 Python.")
5966 (license license:lgpl2.1+)))
5967
5968 (define-public snakemake
5969 (package
5970 (name "snakemake")
5971 (version "5.7.1")
5972 (source
5973 (origin
5974 (method url-fetch)
5975 (uri (pypi-uri "snakemake" version))
5976 (sha256
5977 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
5978 (build-system python-build-system)
5979 (arguments
5980 ;; TODO: Package missing test dependencies.
5981 '(#:tests? #f
5982 #:phases
5983 (modify-phases %standard-phases
5984 ;; For cluster execution Snakemake will call Python. Since there is
5985 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5986 ;; this by calling the snakemake wrapper instead.
5987 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5988 (lambda* (#:key outputs #:allow-other-keys)
5989 (substitute* "snakemake/executors.py"
5990 (("\\{sys.executable\\} -m snakemake")
5991 (string-append (assoc-ref outputs "out")
5992 "/bin/snakemake")))
5993 #t)))))
5994 (propagated-inputs
5995 `(("python-appdirs" ,python-appdirs)
5996 ("python-configargparse" ,python-configargparse)
5997 ("python-datrie" ,python-datrie)
5998 ("python-docutils" ,python-docutils)
5999 ("python-gitpython" ,python-gitpython)
6000 ("python-jinja2" ,python-jinja2)
6001 ("python-jsonschema" ,python-jsonschema)
6002 ("python-networkx" ,python-networkx)
6003 ("python-psutil" ,python-psutil)
6004 ("python-pyyaml" ,python-pyyaml)
6005 ("python-ratelimiter" ,python-ratelimiter)
6006 ("python-requests" ,python-requests)
6007 ("python-wrapt" ,python-wrapt)))
6008 (home-page "https://snakemake.readthedocs.io")
6009 (synopsis "Python-based execution environment for make-like workflows")
6010 (description
6011 "Snakemake aims to reduce the complexity of creating workflows by
6012 providing a clean and modern domain specific specification language (DSL) in
6013 Python style, together with a fast and comfortable execution environment.")
6014 (license license:expat)))
6015
6016 (define-public python-pyqrcode
6017 (package
6018 (name "python-pyqrcode")
6019 (version "1.2.1")
6020 (source
6021 (origin
6022 (method url-fetch)
6023 (uri (pypi-uri "PyQRCode" version))
6024 (sha256
6025 (base32
6026 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6027 (build-system python-build-system)
6028 (home-page
6029 "https://github.com/mnooner256/pyqrcode")
6030 (synopsis "QR code generator")
6031 (description
6032 "Pyqrcode is a QR code generator written purely in Python with
6033 SVG, EPS, PNG and terminal output.")
6034 (license license:bsd-3)))
6035
6036 (define-public python-seaborn
6037 (package
6038 (name "python-seaborn")
6039 (version "0.9.0")
6040 (source
6041 (origin
6042 (method url-fetch)
6043 (uri (pypi-uri "seaborn" version))
6044 (sha256
6045 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6046 (patches
6047 (list (origin
6048 (method url-fetch)
6049 ;; This has already been merged, but there is no new
6050 ;; release including this patch. It fixes problems
6051 ;; with axis rotation that would lead to test
6052 ;; failures.
6053 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6054 (sha256
6055 (base32
6056 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6057 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6058 (build-system python-build-system)
6059 (arguments
6060 `(#:phases
6061 (modify-phases %standard-phases
6062 (add-before 'check 'start-xserver
6063 (lambda* (#:key inputs #:allow-other-keys)
6064 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6065 ;; There must be a running X server and make check doesn't
6066 ;; start one. Therefore we must do it.
6067 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6068 (setenv "DISPLAY" ":1")
6069 #t)))
6070 (add-after 'unpack 'fix-tests
6071 (lambda _
6072 ;; test_cbar_ticks fails probably because of matplotlib's
6073 ;; expectation of using an older version of FreeType.
6074 (delete-file "seaborn/tests/test_matrix.py")
6075 #t))
6076 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6077 (propagated-inputs
6078 `(("python-pandas" ,python-pandas)
6079 ("python-matplotlib" ,python-matplotlib)
6080 ("python-numpy" ,python-numpy)
6081 ("python-scipy" ,python-scipy)))
6082 (native-inputs
6083 `(("python-pytest" ,python-pytest)
6084 ("xorg-server" ,xorg-server-for-tests)))
6085 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6086 (synopsis "Statistical data visualization")
6087 (description
6088 "Seaborn is a library for making attractive and informative statistical
6089 graphics in Python. It is built on top of matplotlib and tightly integrated
6090 with the PyData stack, including support for numpy and pandas data structures
6091 and statistical routines from scipy and statsmodels.")
6092 (license license:bsd-3)))
6093
6094 (define-public python2-seaborn
6095 (package-with-python2 python-seaborn))
6096
6097 (define-public python-mpmath
6098 (package
6099 (name "python-mpmath")
6100 (version "0.19")
6101 (source (origin
6102 (method url-fetch)
6103 (uri (string-append "http://mpmath.org/files/mpmath-"
6104 version ".tar.gz"))
6105 (sha256
6106 (base32
6107 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6108 (build-system python-build-system)
6109 (arguments
6110 '(#:phases
6111 (modify-phases %standard-phases
6112 (replace 'check
6113 (lambda _
6114 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6115 (home-page "http://mpmath.org")
6116 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6117 (description
6118 "@code{mpmath} can be used as an arbitrary-precision substitute for
6119 Python's float/complex types and math/cmath modules, but also does much
6120 more advanced mathematics.")
6121 (license license:bsd-3)))
6122
6123 (define-public python2-mpmath
6124 (package-with-python2 python-mpmath))
6125
6126 (define-public python-bigfloat
6127 (package
6128 (name "python-bigfloat")
6129 (version "0.3.0")
6130 (source
6131 (origin
6132 (method url-fetch)
6133 (uri (pypi-uri "bigfloat" version))
6134 (sha256
6135 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6136 (build-system python-build-system)
6137 (inputs
6138 `(("mpfr" ,mpfr)))
6139 (home-page "https://github.com/mdickinson/bigfloat")
6140 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6141 (description
6142 "This package provides a Python interface to the MPFR library for
6143 multiprecision arithmetic.")
6144 (license license:lgpl3+)))
6145
6146 (define-public python2-bigfloat
6147 (package-with-python2 python-bigfloat))
6148
6149 (define-public python-sympy
6150 (package
6151 (name "python-sympy")
6152 (version "1.1.1")
6153 (source
6154 (origin
6155 (method url-fetch)
6156 (uri (string-append
6157 "https://github.com/sympy/sympy/releases/download/sympy-"
6158 version "/sympy-" version ".tar.gz"))
6159 (sha256
6160 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6161 (build-system python-build-system)
6162 (arguments
6163 `(#:phases
6164 (modify-phases %standard-phases
6165 ;; Run the core tests after installation. By default it would run
6166 ;; *all* tests, which take a very long time to complete and are known
6167 ;; to be flaky.
6168 (delete 'check)
6169 (add-after 'install 'check
6170 (lambda* (#:key outputs #:allow-other-keys)
6171 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6172 #t)))))
6173 (propagated-inputs
6174 `(("python-mpmath" ,python-mpmath)))
6175 (home-page "http://www.sympy.org/")
6176 (synopsis "Python library for symbolic mathematics")
6177 (description
6178 "SymPy is a Python library for symbolic mathematics. It aims to become a
6179 full-featured computer algebra system (CAS) while keeping the code as simple
6180 as possible in order to be comprehensible and easily extensible.")
6181 (license license:bsd-3)))
6182
6183 (define-public python2-sympy
6184 (package
6185 (inherit (package-with-python2 python-sympy))
6186 (arguments
6187 `(#:phases
6188 (modify-phases %standard-phases
6189 ;; Run the core tests after installation. By default it would run
6190 ;; *all* tests, which take a very long time to complete and are known
6191 ;; to be flaky.
6192 (delete 'check)
6193 (add-after 'install 'check
6194 (lambda* (#:key outputs #:allow-other-keys)
6195 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6196 #t)))))))
6197
6198 (define-public python-q
6199 (package
6200 (name "python-q")
6201 (version "2.6")
6202 (source
6203 (origin
6204 (method url-fetch)
6205 (uri (pypi-uri "q" version))
6206 (sha256
6207 (base32
6208 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6209 (build-system python-build-system)
6210 (home-page "https://github.com/zestyping/q")
6211 (synopsis "Quick-and-dirty debugging output for tired programmers")
6212 (description
6213 "q is a Python module for \"print\" style of debugging Python code. It
6214 provides convenient short API for print out of values, tracebacks, and
6215 falling into the Python interpreter.")
6216 (license license:asl2.0)))
6217
6218 (define-public python2-q
6219 (package-with-python2 python-q))
6220
6221 (define-public python2-xlib
6222 (package
6223 (name "python2-xlib")
6224 (version "0.14")
6225 (source (origin
6226 (method url-fetch)
6227 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6228 "/" version "/"
6229 "python-xlib-" version ".tar.gz"))
6230 (sha256
6231 (base32
6232 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6233 (build-system python-build-system)
6234 (arguments
6235 `(#:python ,python-2 ;Python 2 only
6236 #:tests? #f)) ;no tests
6237 (home-page "http://python-xlib.sourceforge.net/")
6238 (synopsis "Python X11 client library")
6239 (description
6240 "The Python X Library is intended to be a fully functional X client
6241 library for Python programs. It is useful to implement low-level X clients.
6242 It is written entirely in Python.")
6243 (license license:gpl2+)))
6244
6245 (define-public python-singledispatch
6246 (package
6247 (name "python-singledispatch")
6248 (version "3.4.0.3")
6249 (source
6250 (origin
6251 (method url-fetch)
6252 (uri (pypi-uri "singledispatch" version))
6253 (sha256
6254 (base32
6255 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6256 (build-system python-build-system)
6257 (native-inputs
6258 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6259 (home-page
6260 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6261 (synopsis "Backport of singledispatch feature from Python 3.4")
6262 (description
6263 "This library brings functools.singledispatch from Python 3.4 to Python
6264 2.6-3.3.")
6265 (license license:expat)))
6266
6267 (define-public python2-singledispatch
6268 (package-with-python2 python-singledispatch))
6269
6270 ;; the python- version can be removed with python-3.5
6271 (define-public python-backports-abc
6272 (package
6273 (name "python-backports-abc")
6274 (version "0.5")
6275 (source
6276 (origin
6277 (method url-fetch)
6278 (uri (pypi-uri "backports_abc" version))
6279 (sha256
6280 (base32
6281 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6282 (build-system python-build-system)
6283 (home-page "https://github.com/cython/backports_abc")
6284 (synopsis "Backport of additions to the 'collections.abc' module")
6285 (description
6286 "Python-backports-abc provides a backport of additions to the
6287 @code{collections.abc} module in Python-3.5.")
6288 (license license:psfl)))
6289
6290 (define-public python2-backports-abc
6291 (package-with-python2 python-backports-abc))
6292
6293 (define-public python-backports-csv
6294 (package
6295 (name "python-backports-csv")
6296 (version "1.0.5")
6297 (source
6298 (origin
6299 (method url-fetch)
6300 (uri (pypi-uri "backports.csv" version))
6301 (sha256
6302 (base32
6303 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6304 (build-system python-build-system)
6305 (home-page "https://github.com/ryanhiebert/backports.csv")
6306 (synopsis "Backport of Python 3's csv module for Python 2")
6307 (description
6308 "Provides a backport of Python 3's @code{csv} module for parsing
6309 comma separated values. The API of the @code{csv} module in Python 2
6310 is drastically different from the @code{csv} module in Python 3.
6311 This is due, for the most part, to the difference between str in
6312 Python 2 and Python 3.")
6313 (license license:psfl)))
6314
6315 (define-public python2-backports-csv
6316 (package-with-python2 python-backports-csv))
6317
6318 (define-public python2-backports-shutil-get-terminal-size
6319 (package
6320 (name "python2-backports-shutil-get-terminal-size")
6321 (version "1.0.0")
6322 (source
6323 (origin
6324 (method url-fetch)
6325 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6326 (sha256
6327 (base32
6328 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6329 (build-system python-build-system)
6330 (arguments
6331 `(#:python ,python-2
6332 #:phases
6333 (modify-phases %standard-phases
6334 (replace 'check
6335 (lambda _
6336 (invoke "py.test" "-v"))))))
6337 (native-inputs
6338 `(("python2-pytest" ,python2-pytest)))
6339 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6340 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6341 (description
6342 "This package provides a backport of the @code{get_terminal_size
6343 function} from Python 3.3's @code{shutil}.
6344 Unlike the original version it is written in pure Python rather than C,
6345 so it might be a tiny bit slower.")
6346 (license license:expat)))
6347
6348 (define-public python-waf
6349 (package
6350 (name "python-waf")
6351 (version "2.0.19")
6352 (source (origin
6353 (method url-fetch)
6354 (uri (string-append "https://waf.io/"
6355 "waf-" version ".tar.bz2"))
6356 (sha256
6357 (base32
6358 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
6359 (build-system python-build-system)
6360 (arguments
6361 '(#:phases
6362 (modify-phases %standard-phases
6363 (replace 'build
6364 (lambda _
6365 ;; XXX: Find a way to add all extra tools.
6366 (let ((tools '("gccdeps"
6367 "clang_compilation_database")))
6368 (invoke "python" "waf-light" "configure" "build"
6369 (string-append "--tools="
6370 (string-join tools ","))))))
6371 (replace 'check
6372 (lambda _
6373 (invoke "python" "waf" "--version")))
6374 (replace 'install
6375 (lambda* (#:key outputs #:allow-other-keys)
6376 (let ((out (assoc-ref outputs "out")))
6377 (install-file "waf" (string-append out "/bin")))
6378 #t))
6379 ;; waf breaks when it is wrapped.
6380 (delete 'wrap))))
6381 (home-page "https://waf.io/")
6382 (synopsis "Python-based build system")
6383 (description
6384 "Waf is a Python-based framework for configuring, compiling and installing
6385 applications.")
6386 (license license:bsd-3)))
6387
6388 (define-public python2-waf
6389 (package-with-python2 python-waf))
6390
6391 (define-public python-pyzmq
6392 (package
6393 (name "python-pyzmq")
6394 (version "17.1.2")
6395 (source
6396 (origin
6397 (method url-fetch)
6398 (uri (pypi-uri "pyzmq" version))
6399 (sha256
6400 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6401 (build-system python-build-system)
6402 (arguments
6403 `(#:configure-flags
6404 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6405 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6406 ;; --inplace' for 'python setup.py test' to work.
6407 #:tests? #f))
6408 (inputs
6409 `(("zeromq" ,zeromq)))
6410 (native-inputs
6411 `(("pkg-config" ,pkg-config)
6412 ("python-nose" ,python-nose)))
6413 (home-page "https://github.com/zeromq/pyzmq")
6414 (synopsis "Python bindings for 0MQ")
6415 (description
6416 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6417 (license license:bsd-4)))
6418
6419 (define-public python2-pyzmq
6420 (package-with-python2 python-pyzmq))
6421
6422 (define-public python-pep8
6423 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6424 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6425 ;; some dependents' test suites, and nothing more.
6426 (package
6427 (name "python-pep8")
6428 (version "1.7.0")
6429 (source
6430 (origin
6431 (method url-fetch)
6432 (uri (pypi-uri "pep8" version))
6433 (sha256
6434 (base32
6435 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6436 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6437 (build-system python-build-system)
6438 (home-page "https://pep8.readthedocs.org/")
6439 (synopsis "Python style guide checker")
6440 (description
6441 "This tools checks Python code against some of the style conventions in
6442 PEP 8.")
6443 (license license:expat)))
6444
6445 (define-public python2-pep8
6446 (package-with-python2 python-pep8))
6447
6448 (define-public python-pyflakes
6449 (package
6450 (name "python-pyflakes")
6451 (version "2.1.1")
6452 (source
6453 (origin
6454 (method url-fetch)
6455 (uri (pypi-uri "pyflakes" version))
6456 (sha256
6457 (base32
6458 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6459 (build-system python-build-system)
6460 (home-page
6461 "https://github.com/pyflakes/pyflakes")
6462 (synopsis "Passive checker of Python programs")
6463 (description
6464 "Pyflakes statically checks Python source code for common errors.")
6465 (license license:expat)))
6466
6467 (define-public python2-pyflakes
6468 (package-with-python2 python-pyflakes))
6469
6470 (define-public python-mccabe
6471 (package
6472 (name "python-mccabe")
6473 (version "0.6.1")
6474 (source
6475 (origin
6476 (method url-fetch)
6477 (uri (pypi-uri "mccabe" version))
6478 (sha256
6479 (base32
6480 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6481 (build-system python-build-system)
6482 (native-inputs
6483 `(("python-pytest" ,python-pytest-bootstrap)
6484 ("python-pytest-runner" ,python-pytest-runner)))
6485 (home-page "https://github.com/flintwork/mccabe")
6486 (synopsis "McCabe checker, plugin for flake8")
6487 (description
6488 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6489 complexity of Python source code.")
6490 (license license:expat)))
6491
6492 (define-public python2-mccabe
6493 (package-with-python2 python-mccabe))
6494
6495 (define-public python-mccabe-0.2.1
6496 (package (inherit python-mccabe)
6497 (version "0.2.1")
6498 (source
6499 (origin
6500 (method url-fetch)
6501 (uri (pypi-uri "mccabe" version))
6502 (sha256
6503 (base32
6504 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6505
6506 (define-public python2-mccabe-0.2.1
6507 (package-with-python2 python-mccabe-0.2.1))
6508
6509 ;; Flake8 2.4.1 requires an older version of pep8.
6510 ;; This should be removed ASAP.
6511 (define-public python-pep8-1.5.7
6512 (package (inherit python-pep8)
6513 (version "1.5.7")
6514 (source
6515 (origin
6516 (method url-fetch)
6517 (uri (pypi-uri "pep8" version))
6518 (sha256
6519 (base32
6520 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6521 (arguments
6522 ;; XXX Tests not compatible with Python 3.5.
6523 '(#:tests? #f))))
6524
6525 (define-public python2-pep8-1.5.7
6526 (package-with-python2 python-pep8-1.5.7))
6527
6528 ;; Flake8 2.4.1 requires an older version of pyflakes.
6529 ;; This should be removed ASAP.
6530 (define-public python-pyflakes-0.8.1
6531 (package (inherit python-pyflakes)
6532 (version "0.8.1")
6533 (source
6534 (origin
6535 (method url-fetch)
6536 (uri (pypi-uri "pyflakes" version))
6537 (sha256
6538 (base32
6539 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6540 (arguments
6541 ;; XXX Tests not compatible with Python 3.5.
6542 '(#:tests? #f))))
6543
6544 (define-public python2-pyflakes-0.8.1
6545 (package-with-python2 python-pyflakes-0.8.1))
6546
6547 (define-public python-flake8
6548 (package
6549 (name "python-flake8")
6550 (version "3.7.7")
6551 (source (origin
6552 (method url-fetch)
6553 (uri (pypi-uri "flake8" version))
6554 (sha256
6555 (base32
6556 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6557 (build-system python-build-system)
6558 (arguments
6559 `(#:phases
6560 (modify-phases %standard-phases
6561 (delete 'check)
6562 (add-after 'install 'check
6563 (lambda* (#:key inputs outputs #:allow-other-keys)
6564 (add-installed-pythonpath inputs outputs)
6565 (invoke "pytest" "-v")
6566 #t)))))
6567 (propagated-inputs
6568 `(("python-pycodestyle" ,python-pycodestyle)
6569 ("python-entrypoints" ,python-entrypoints)
6570 ("python-pyflakes" ,python-pyflakes)
6571 ("python-mccabe" ,python-mccabe)))
6572 (native-inputs
6573 `(("python-mock" ,python-mock)
6574 ("python-pytest" ,python-pytest-bootstrap)
6575 ("python-pytest-runner" ,python-pytest-runner)))
6576 (home-page "https://gitlab.com/pycqa/flake8")
6577 (synopsis
6578 "The modular source code checker: pep8, pyflakes and co")
6579 (description
6580 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6581 (properties `((python2-variant . ,(delay python2-flake8))))
6582 (license license:expat)))
6583
6584 (define-public python2-flake8
6585 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6586 (package (inherit base)
6587 (propagated-inputs
6588 `(("python2-configparser" ,python2-configparser)
6589 ("python2-enum34" ,python2-enum34)
6590 ("python2-typing" ,python2-typing)
6591 ,@(package-propagated-inputs base))))))
6592
6593 ;; python-hacking requires flake8 <2.6.0.
6594 (define-public python-flake8-2.5
6595 (package
6596 (inherit python-flake8)
6597 (version "2.5.5")
6598 (source (origin
6599 (method url-fetch)
6600 (uri (pypi-uri "flake8" version))
6601 (sha256
6602 (base32
6603 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6604 (propagated-inputs
6605 `(("python-pep8" ,python-pep8)
6606 ,@(package-propagated-inputs python-flake8)))
6607 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6608
6609 (define-public python2-flake8-2.5
6610 (package
6611 (inherit python2-flake8)
6612 (version (package-version python-flake8-2.5))
6613 (source (origin
6614 (inherit (package-source python-flake8-2.5))))
6615 (propagated-inputs
6616 `(("python2-pep8" ,python2-pep8)
6617 ,@(package-propagated-inputs python2-flake8)))))
6618
6619 (define-public python-flake8-polyfill
6620 (package
6621 (name "python-flake8-polyfill")
6622 (version "1.0.2")
6623 (source
6624 (origin
6625 (method url-fetch)
6626 (uri (pypi-uri "flake8-polyfill" version))
6627 (sha256
6628 (base32
6629 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6630 (build-system python-build-system)
6631 (arguments
6632 '(#:phases
6633 (modify-phases %standard-phases
6634 (replace 'check
6635 (lambda _
6636 ;; Be compatible with Pytest 4:
6637 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6638 (substitute* "setup.cfg"
6639 (("\\[pytest\\]")
6640 "[tool:pytest]"))
6641
6642 (setenv "PYTHONPATH"
6643 (string-append (getcwd) "/build/lib:"
6644 (getenv "PYTHONPATH")))
6645 (invoke "py.test" "-v"))))))
6646 (native-inputs
6647 `(("python-flake8" ,python-flake8)
6648 ("python-mock" ,python-mock)
6649 ("python-pep8" ,python-pep8)
6650 ("python-pycodestyle" ,python-pycodestyle)
6651 ("python-pytest" ,python-pytest)))
6652 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6653 (synopsis "Polyfill package for Flake8 plugins")
6654 (description
6655 "This package that provides some compatibility helpers for Flake8
6656 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6657 (license license:expat)))
6658
6659 (define-public python2-flake8-polyfill
6660 (package-with-python2 python-flake8-polyfill))
6661
6662 (define-public python-mistune
6663 (package
6664 (name "python-mistune")
6665 (version "0.8.4")
6666 (source
6667 (origin
6668 (method url-fetch)
6669 (uri (pypi-uri "mistune" version))
6670 (sha256
6671 (base32
6672 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6673 (build-system python-build-system)
6674 (native-inputs
6675 `(("python-nose" ,python-nose)
6676 ("python-cython" ,python-cython)))
6677 (home-page "https://github.com/lepture/mistune")
6678 (synopsis "Markdown parser in pure Python")
6679 (description "This package provides a fast markdown parser in pure
6680 Python.")
6681 (license license:bsd-3)))
6682
6683 (define-public python2-mistune
6684 (package-with-python2 python-mistune))
6685
6686 (define-public python-markdown
6687 (package
6688 (name "python-markdown")
6689 (version "3.1.1")
6690 (source
6691 (origin
6692 (method url-fetch)
6693 (uri (pypi-uri "Markdown" version))
6694 (sha256
6695 (base32
6696 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6697 (build-system python-build-system)
6698 (native-inputs
6699 `(("python-nose" ,python-nose)
6700 ("python-pyyaml" ,python-pyyaml)))
6701 (home-page "https://python-markdown.github.io/")
6702 (synopsis "Python implementation of Markdown")
6703 (description
6704 "This package provides a Python implementation of John Gruber's
6705 Markdown. The library features international input, various Markdown
6706 extensions, and several HTML output formats. A command line wrapper
6707 markdown_py is also provided to convert Markdown files to HTML.")
6708 (license license:bsd-3)))
6709
6710 (define-public python2-markdown
6711 (package-with-python2 python-markdown))
6712
6713 (define-public python-ptyprocess
6714 (package
6715 (name "python-ptyprocess")
6716 (version "0.5.2")
6717 (source
6718 (origin
6719 (method url-fetch)
6720 (uri (pypi-uri "ptyprocess" version))
6721 (sha256
6722 (base32
6723 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6724 (build-system python-build-system)
6725 (native-inputs
6726 `(("python-nose" ,python-nose)))
6727 (arguments
6728 `(#:phases
6729 (modify-phases %standard-phases
6730 (replace 'check
6731 (lambda _ (invoke "nosetests"))))))
6732 (home-page "https://github.com/pexpect/ptyprocess")
6733 (synopsis "Run a subprocess in a pseudo terminal")
6734 (description
6735 "This package provides a Python library used to launch a subprocess in a
6736 pseudo terminal (pty), and interact with both the process and its pty.")
6737 (license license:isc)))
6738
6739 (define-public python2-ptyprocess
6740 (package-with-python2 python-ptyprocess))
6741
6742 (define-public python-cram
6743 (package
6744 (name "python-cram")
6745 (version "0.7")
6746 (home-page "https://bitheap.org/cram/")
6747 (source (origin
6748 (method url-fetch)
6749 (uri (list (string-append home-page "cram-"
6750 version ".tar.gz")
6751 (pypi-uri "cram" version)))
6752 (sha256
6753 (base32
6754 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6755 (arguments
6756 '(#:phases
6757 (modify-phases %standard-phases
6758 (add-after 'unpack 'patch-source
6759 (lambda _
6760 (substitute* (find-files "cram" ".*\\.py$")
6761 ;; Replace default shell path.
6762 (("/bin/sh") (which "sh")))
6763 (substitute* (find-files "tests" ".*\\.t$")
6764 (("md5") "md5sum")
6765 (("/bin/bash") (which "bash"))
6766 (("/bin/sh") (which "sh")))
6767 (substitute* "cram/_test.py"
6768 ;; This hack works around a bug triggered by substituting
6769 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6770 ;; "cram -h", which breaks the output at 80 characters. This
6771 ;; causes the line showing the default shell to break into two
6772 ;; lines, but the test expects a single line...
6773 (("env\\['COLUMNS'\\] = '80'")
6774 "env['COLUMNS'] = '160'"))
6775
6776 (substitute* "Makefile"
6777 ;; Recent versions of python-coverage have caused the test
6778 ;; coverage to decrease (as of version 0.7). Allow that.
6779 (("--fail-under=100")
6780 "--fail-under=90"))
6781
6782 #t))
6783 (replace 'check
6784 ;; The test phase uses the built library and executable.
6785 (lambda* (#:key inputs outputs #:allow-other-keys)
6786 (add-installed-pythonpath inputs outputs)
6787 (setenv "PATH" (string-append (getenv "PATH") ":"
6788 (assoc-ref outputs "out") "/bin"))
6789 (invoke "make" "test"))))))
6790 (build-system python-build-system)
6791 (native-inputs
6792 `(("python-coverage" ,python-coverage)
6793 ("which" ,which)))
6794 (synopsis "Simple testing framework for command line applications")
6795 (description
6796 "Cram is a functional testing framework for command line applications.
6797 Cram tests look like snippets of interactive shell sessions. Cram runs each
6798 command and compares the command output in the test with the command’s actual
6799 output.")
6800 (license license:gpl2+)))
6801
6802 (define-public python2-cram
6803 (package-with-python2 python-cram))
6804
6805 (define-public python-straight-plugin
6806 (package
6807 (name "python-straight-plugin")
6808 (version "1.4.1")
6809 (source
6810 (origin
6811 (method url-fetch)
6812 (uri (pypi-uri "straight.plugin" version))
6813 (sha256
6814 (base32
6815 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6816 (build-system python-build-system)
6817 (home-page "https://github.com/ironfroggy/straight.plugin")
6818 (synopsis "Simple namespaced plugin facility")
6819 (description "Straight Plugin provides a type of plugin you can create from
6820 almost any existing Python modules, and an easy way for outside developers to
6821 add functionality and customization to your projects with their own plugins.")
6822 (license license:expat)))
6823
6824 (define-public python2-straight-plugin
6825 (package-with-python2 python-straight-plugin))
6826
6827 (define-public python-fonttools
6828 (package
6829 (name "python-fonttools")
6830 (version "3.38.0")
6831 (source (origin
6832 (method url-fetch)
6833 (uri (pypi-uri "fonttools" version ".zip"))
6834 (sha256
6835 (base32
6836 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6837 (build-system python-build-system)
6838 (native-inputs
6839 `(("unzip" ,unzip)
6840 ("python-pytest" ,python-pytest)
6841 ("python-pytest-runner" ,python-pytest-runner)))
6842 (home-page "https://github.com/fonttools/fonttools")
6843 (synopsis "Tools to manipulate font files")
6844 (description
6845 "FontTools/TTX is a library to manipulate font files from Python. It
6846 supports reading and writing of TrueType/OpenType fonts, reading and writing
6847 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6848 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6849 from an XML-based format.")
6850 (license license:expat)))
6851
6852 (define-public python2-fonttools
6853 (package-with-python2 python-fonttools))
6854
6855 (define-public python-ly
6856 (package
6857 (name "python-ly")
6858 (version "0.9.5")
6859 (source
6860 (origin
6861 (method url-fetch)
6862 (uri (pypi-uri name version))
6863 (sha256
6864 (base32
6865 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6866 (build-system python-build-system)
6867 (arguments
6868 ;; FIXME: Some tests need network access.
6869 '(#:tests? #f))
6870 (synopsis "Tool and library for manipulating LilyPond files")
6871 (description "This package provides a Python library to parse, manipulate
6872 or create documents in LilyPond format. A command line program ly is also
6873 provided that can be used to do various manipulations with LilyPond files.")
6874 (home-page "https://pypi.python.org/pypi/python-ly")
6875 (license license:gpl2+)))
6876
6877 (define-public python-appdirs
6878 (package
6879 (name "python-appdirs")
6880 (version "1.4.3")
6881 (source
6882 (origin
6883 (method url-fetch)
6884 (uri (pypi-uri "appdirs" version))
6885 (sha256
6886 (base32
6887 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6888 (build-system python-build-system)
6889 (home-page "https://github.com/ActiveState/appdirs")
6890 (synopsis
6891 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6892 (description
6893 "This module provides a portable way of finding out where user data
6894 should be stored on various operating systems.")
6895 (license license:expat)))
6896
6897 (define-public python2-appdirs
6898 (package-with-python2 python-appdirs))
6899
6900 (define-public python-llfuse
6901 (package
6902 (name "python-llfuse")
6903 (version "1.3.5")
6904 (source (origin
6905 (method url-fetch)
6906 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6907 (sha256
6908 (base32
6909 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6910 (build-system python-build-system)
6911 (inputs
6912 `(("fuse" ,fuse)
6913 ("attr" ,attr)))
6914 (native-inputs
6915 `(("pkg-config" ,pkg-config)))
6916 (synopsis "Python bindings for FUSE")
6917 (description
6918 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6919 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6920 (license license:lgpl2.0+)
6921 (properties `((python2-variant . ,(delay python2-llfuse))))))
6922
6923 (define-public python2-llfuse
6924 (package (inherit (package-with-python2
6925 (strip-python2-variant python-llfuse)))
6926 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6927
6928 ;; For attic-0.16
6929 (define-public python-llfuse-0.41
6930 (package (inherit python-llfuse)
6931 (version "0.41.1")
6932 (source (origin
6933 (method url-fetch)
6934 (uri (string-append
6935 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6936 "llfuse-" version ".tar.bz2"))
6937 (sha256
6938 (base32
6939 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6940 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6941 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6942 (license (list license:expat license:lgpl2.0+))))
6943
6944 (define-public python-msgpack
6945 (package
6946 (name "python-msgpack")
6947 (version "0.5.6")
6948 (source (origin
6949 (method url-fetch)
6950 (uri (pypi-uri "msgpack" version))
6951 (sha256
6952 (base32
6953 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6954 (build-system python-build-system)
6955 (arguments
6956 `(#:modules ((guix build utils)
6957 (guix build python-build-system)
6958 (ice-9 ftw)
6959 (srfi srfi-1)
6960 (srfi srfi-26))
6961 #:phases
6962 (modify-phases %standard-phases
6963 (replace 'check
6964 (lambda _
6965 (let ((cwd (getcwd)))
6966 (setenv "PYTHONPATH"
6967 (string-append cwd "/build/"
6968 (find (cut string-prefix? "lib" <>)
6969 (scandir (string-append cwd "/build")))
6970 ":"
6971 (getenv "PYTHONPATH")))
6972 (invoke "pytest" "-v" "test")))))))
6973 (native-inputs
6974 `(("python-pytest" ,python-pytest)))
6975 (synopsis "MessagePack (de)serializer")
6976 (description "MessagePack is a fast, compact binary serialization format,
6977 suitable for similar data to JSON. This package provides CPython bindings for
6978 reading and writing MessagePack data.")
6979 (home-page "https://pypi.python.org/pypi/msgpack/")
6980 (license license:asl2.0)))
6981
6982 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6983 ;; release 0.5. Some packages like borg still call it by the old name for now.
6984 ;; <https://bugs.gnu.org/30662>
6985 (define-public python-msgpack-transitional
6986 (package
6987 (inherit python-msgpack)
6988 (name "python-msgpack-transitional")
6989 (arguments
6990 (substitute-keyword-arguments (package-arguments python-msgpack)
6991 ((#:phases phases)
6992 `(modify-phases ,phases
6993 (add-after 'unpack 'configure-transitional
6994 (lambda _
6995 ;; Keep using the old name.
6996 (substitute* "setup.py"
6997 (("TRANSITIONAL = False")
6998 "TRANSITIONAL = 1"))
6999 #t))))))))
7000
7001 (define-public python2-msgpack
7002 (package-with-python2 python-msgpack))
7003
7004 (define-public python-netaddr
7005 (package
7006 (name "python-netaddr")
7007 (version "0.7.19")
7008 (source
7009 (origin
7010 (method url-fetch)
7011 (uri (pypi-uri "netaddr" version))
7012 (sha256
7013 (base32
7014 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7015 (build-system python-build-system)
7016 (arguments `(#:tests? #f)) ;; No tests.
7017 (home-page "https://github.com/drkjam/netaddr/")
7018 (synopsis "Pythonic manipulation of network addresses")
7019 (description
7020 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7021 and MAC network addresses.")
7022 (license license:bsd-3)))
7023
7024 (define-public python2-netaddr
7025 (package-with-python2 python-netaddr))
7026
7027 (define-public python2-pyroute2
7028 (package
7029 (name "python2-pyroute2")
7030 (version "0.5.6")
7031 (source
7032 (origin
7033 (method url-fetch)
7034 (uri (pypi-uri "pyroute2" version))
7035 (sha256
7036 (base32
7037 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7038 (build-system python-build-system)
7039 (arguments
7040 `(#:python ,python-2)) ;Python 3.x is not supported
7041 (home-page "https://github.com/svinota/pyroute2")
7042 (synopsis "Python netlink library")
7043 (description
7044 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7045 Supported netlink families and protocols include:
7046 @itemize
7047 @item rtnl, network settings - addresses, routes, traffic controls
7048 @item nfnetlink - netfilter API: ipset, nftables, ...
7049 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7050 @item devlink - manage and monitor devlink-enabled hardware
7051 @item generic - generic netlink families
7052 @itemize
7053 @item nl80211 - wireless functions API (basic support)
7054 @item taskstats - extended process statistics
7055 @item acpi_events - ACPI events monitoring
7056 @item thermal_events - thermal events monitoring
7057 @item VFS_DQUOT - disk quota events monitoring
7058 @end itemize
7059 @end itemize")
7060 (license license:gpl2+)))
7061
7062 (define-public python-wrapt
7063 (package
7064 (name "python-wrapt")
7065 (version "1.11.2")
7066 (source
7067 (origin
7068 (method url-fetch)
7069 (uri (pypi-uri "wrapt" version))
7070 (sha256
7071 (base32
7072 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7073 (build-system python-build-system)
7074 (arguments
7075 ;; Tests are not included in the tarball, they are only available in the
7076 ;; git repository.
7077 `(#:tests? #f))
7078 (home-page "https://github.com/GrahamDumpleton/wrapt")
7079 (synopsis "Module for decorators, wrappers and monkey patching")
7080 (description
7081 "The aim of the wrapt module is to provide a transparent object proxy for
7082 Python, which can be used as the basis for the construction of function
7083 wrappers and decorator functions.")
7084 (license license:bsd-2)))
7085
7086 (define-public python2-wrapt
7087 (package-with-python2 python-wrapt))
7088
7089 (define-public python-xlrd
7090 (package
7091 (name "python-xlrd")
7092 (version "1.2.0")
7093 (source (origin
7094 (method url-fetch)
7095 (uri (pypi-uri "xlrd" version))
7096 (sha256
7097 (base32
7098 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7099 (build-system python-build-system)
7100 (arguments
7101 `(#:phases
7102 (modify-phases %standard-phases
7103 ;; Some tests depend on writing a temporary file to the user's home
7104 ;; directory.
7105 (add-after 'unpack 'fix-tests
7106 (lambda _
7107 (delete-file "tests/test_open_workbook.py")
7108 #t)))))
7109 (home-page "http://www.python-excel.org/")
7110 (synopsis "Library for extracting data from Excel files")
7111 (description "This package provides a library to extract data from
7112 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7113 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7114 Unicode-aware. It is not intended as an end-user tool.")
7115 (license license:bsd-3)))
7116
7117 (define-public python2-xlrd
7118 (package-with-python2 python-xlrd))
7119
7120 (define-public python-prettytable
7121 (package
7122 (name "python-prettytable")
7123 (version "0.7.2")
7124 (source
7125 (origin
7126 (method url-fetch)
7127 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7128 (sha256
7129 (base32
7130 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7131 (build-system python-build-system)
7132 (home-page "http://code.google.com/p/prettytable/")
7133 (synopsis "Display tabular data in an ASCII table format")
7134 (description
7135 "A library designed to represent tabular data in visually appealing ASCII
7136 tables. PrettyTable allows for selection of which columns are to be printed,
7137 independent alignment of columns (left or right justified or centred) and
7138 printing of sub-tables by specifying a row range.")
7139 (license license:bsd-3)))
7140
7141 (define-public python2-prettytable
7142 (package-with-python2 python-prettytable))
7143
7144 (define-public python-tables
7145 (package
7146 (name "python-tables")
7147 (version "3.4.4")
7148 (source
7149 (origin
7150 (method url-fetch)
7151 (uri (pypi-uri "tables" version))
7152 (sha256
7153 (base32
7154 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7155 (modules '((guix build utils)))
7156 (snippet
7157 '(begin
7158 ;; Remove pre-compiled .pyc files from source.
7159 (for-each delete-file-recursively
7160 (find-files "." "__pycache__" #:directories? #t))
7161 (for-each delete-file (find-files "." "\\.pyc$"))
7162 #t))))
7163 (build-system python-build-system)
7164 (arguments
7165 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7166 ;; or "check", so we must override the build and check phases.
7167 #:phases
7168 (modify-phases %standard-phases
7169 (add-after 'unpack 'use-gcc
7170 (lambda _
7171 (substitute* "setup.py"
7172 (("compiler = new_compiler\\(\\)" line)
7173 (string-append line
7174 "\ncompiler.set_executables(compiler='gcc',"
7175 "compiler_so='gcc',"
7176 "linker_exe='gcc',"
7177 "linker_so='gcc -shared')")))
7178 #t))
7179 (replace 'build
7180 (lambda* (#:key inputs #:allow-other-keys)
7181 (invoke "python" "setup.py" "build"
7182 (string-append "--hdf5="
7183 (assoc-ref inputs "hdf5")))))
7184 (replace 'check
7185 (lambda* (#:key inputs #:allow-other-keys)
7186 (invoke "python" "setup.py" "check"
7187 (string-append "--hdf5="
7188 (assoc-ref inputs "hdf5"))))))))
7189 (propagated-inputs
7190 `(("python-numexpr" ,python-numexpr)
7191 ("python-numpy" ,python-numpy)))
7192 (native-inputs
7193 `(("python-cython" ,python-cython)
7194 ("pkg-config" ,pkg-config)))
7195 (inputs
7196 `(("hdf5" ,hdf5)
7197 ("bzip2" ,bzip2)
7198 ("zlib" ,zlib)))
7199 (home-page "http://www.pytables.org/")
7200 (synopsis "Hierarchical datasets for Python")
7201 (description "PyTables is a package for managing hierarchical datasets and
7202 designed to efficiently cope with extremely large amounts of data.")
7203 (license license:bsd-3)))
7204
7205 (define-public python2-tables
7206 (package-with-python2 python-tables))
7207
7208 (define-public python-pyasn1
7209 (package
7210 (name "python-pyasn1")
7211 (version "0.4.3")
7212 (source
7213 (origin
7214 (method url-fetch)
7215 (uri (pypi-uri "pyasn1" version))
7216 (sha256
7217 (base32
7218 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7219 (build-system python-build-system)
7220 (home-page "http://pyasn1.sourceforge.net/")
7221 (synopsis "ASN.1 types and codecs")
7222 (description
7223 "This is an implementation of ASN.1 types and codecs in Python. It is
7224 suitable for a wide range of protocols based on the ASN.1 specification.")
7225 (license license:bsd-2)))
7226
7227 (define-public python2-pyasn1
7228 (package-with-python2 python-pyasn1))
7229
7230 (define-public python-pyasn1-modules
7231 (package
7232 (name "python-pyasn1-modules")
7233 (version "0.2.2")
7234 (source
7235 (origin
7236 (method url-fetch)
7237 (uri (pypi-uri "pyasn1-modules" version))
7238 (sha256
7239 (base32
7240 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7241 (build-system python-build-system)
7242 (propagated-inputs
7243 `(("python-pyasn1" ,python-pyasn1)))
7244 (home-page "https://sourceforge.net/projects/pyasn1/")
7245 (synopsis "ASN.1 codec implementations")
7246 (description
7247 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7248 implementations of ASN.1-based codecs and protocols.")
7249 (license license:bsd-3)))
7250
7251 (define-public python2-pyasn1-modules
7252 (package-with-python2 python-pyasn1-modules))
7253
7254 (define-public python-ipaddress
7255 (package
7256 (name "python-ipaddress")
7257 (version "1.0.22")
7258 (source (origin
7259 (method url-fetch)
7260 (uri (pypi-uri "ipaddress" version))
7261 (sha256
7262 (base32
7263 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7264 (build-system python-build-system)
7265 (home-page "https://github.com/phihag/ipaddress")
7266 (synopsis "IP address manipulation library")
7267 (description
7268 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7269 in Python. This library is used to create, poke at, and manipulate IPv4 and
7270 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7271 module to older versions of Python.")
7272 (license license:psfl)))
7273
7274 (define-public python2-ipaddress
7275 (package-with-python2 python-ipaddress))
7276
7277 (define-public python2-ipaddr
7278 (package
7279 (name "python2-ipaddr")
7280 (version "2.1.11")
7281 (source
7282 (origin
7283 (method url-fetch)
7284 (uri (pypi-uri "ipaddr" version))
7285 (sha256
7286 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7287 (build-system python-build-system)
7288 (arguments
7289 `(#:python ,python-2 ;version 2 only
7290 #:phases
7291 (modify-phases %standard-phases
7292 (replace 'check
7293 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7294 (home-page "https://github.com/google/ipaddr-py")
7295 (synopsis "IP address manipulation library")
7296 (description
7297 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7298 IPv6 addresses and networks.
7299
7300 For new implementations you may prefer to use the standard module
7301 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7302 versions of Python.")
7303 (license license:asl2.0)))
7304
7305 (define-public python-idna
7306 (package
7307 (name "python-idna")
7308 (version "2.8")
7309 (source
7310 (origin
7311 (method url-fetch)
7312 (uri (pypi-uri "idna" version))
7313 (sha256
7314 (base32
7315 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7316 (build-system python-build-system)
7317 (home-page "https://github.com/kjd/idna")
7318 (synopsis "Internationalized domain names in applications")
7319 (description
7320 "This is a library to support the Internationalised Domain Names in
7321 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7322 protocol is often referred to as “IDNA2008” and can produce different results
7323 from the earlier standard from 2003. The library is also intended to act as a
7324 suitable drop-in replacement for the “encodings.idna” module that comes with
7325 the Python standard library but currently only supports the older 2003
7326 specification.")
7327 (license license:bsd-4)))
7328
7329 (define-public python-idna-2.7
7330 (package (inherit python-idna)
7331 (version "2.7")
7332 (source (origin
7333 (method url-fetch)
7334 (uri (pypi-uri "idna" version))
7335 (sha256
7336 (base32
7337 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7338
7339
7340 (define-public python2-idna
7341 (package-with-python2 python-idna))
7342
7343 (define-public python-idna-ssl
7344 (package
7345 (name "python-idna-ssl")
7346 (version "1.0.1")
7347 (source
7348 (origin
7349 (method url-fetch)
7350 (uri (pypi-uri "idna-ssl" version))
7351 (sha256
7352 (base32
7353 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7354 (build-system python-build-system)
7355 (arguments
7356 `(#:tests? #f)) ;circular dependency with python-aiohttp
7357 (home-page "https://github.com/aio-libs/idna-ssl")
7358 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7359 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7360 domains support.")
7361 (license license:expat)))
7362
7363 (define-public python-pretend
7364 (package
7365 (name "python-pretend")
7366 (version "1.0.9")
7367 (source
7368 (origin
7369 (method url-fetch)
7370 (uri (pypi-uri "pretend" version))
7371 (sha256
7372 (base32
7373 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7374 (build-system python-build-system)
7375 (home-page "https://github.com/alex/pretend")
7376 (synopsis "Library for stubbing in Python")
7377 (description
7378 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7379 technique for writing tests. You may hear the term mixed up with mocks,
7380 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7381 responses, rather than doing any computation.")
7382 (license license:bsd-3)))
7383
7384 (define-public python2-pretend
7385 (package-with-python2 python-pretend))
7386
7387 (define-public python-pip
7388 (package
7389 (name "python-pip")
7390 (version "19.2.1")
7391 (source
7392 (origin
7393 (method url-fetch)
7394 (uri (pypi-uri "pip" version))
7395 (sha256
7396 (base32
7397 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7398 (build-system python-build-system)
7399 (arguments
7400 '(#:tests? #f)) ; there are no tests in the pypi archive.
7401 (home-page "https://pip.pypa.io/")
7402 (synopsis "Package manager for Python software")
7403 (description
7404 "Pip is a package manager for Python software, that finds packages on the
7405 Python Package Index (PyPI).")
7406 (license license:expat)))
7407
7408 (define-public python2-pip
7409 (package-with-python2 python-pip))
7410
7411 (define-public python-tlsh
7412 (package
7413 (name "python-tlsh")
7414 (version "3.4.5")
7415 (home-page "https://github.com/trendmicro/tlsh")
7416 (source
7417 (origin
7418 (method git-fetch)
7419 (uri (git-reference
7420 (url "https://github.com/trendmicro/tlsh.git")
7421 (commit (string-append "v" version))))
7422 (file-name (git-file-name name version))
7423 (sha256
7424 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7425 (build-system cmake-build-system)
7426 (arguments
7427 '(#:out-of-source? #f
7428 #:phases (modify-phases %standard-phases
7429 (replace
7430 'install
7431 (lambda* (#:key outputs #:allow-other-keys)
7432 ;; Build and install the Python bindings. The underlying
7433 ;; C++ library is apparently not meant to be installed.
7434 (let ((out (assoc-ref outputs "out")))
7435 (with-directory-excursion "py_ext"
7436 (and (system* "python" "setup.py" "build")
7437 (system* "python" "setup.py" "install"
7438 (string-append "--prefix=" out))))))))))
7439 (inputs `(("python" ,python-wrapper))) ;for the bindings
7440 (synopsis "Fuzzy matching library for Python")
7441 (description
7442 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7443 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7444 value which can be used for similarity comparisons. Similar objects have
7445 similar hash values, which allows for the detection of similar objects by
7446 comparing their hash values. The byte stream should have a sufficient amount
7447 of complexity; for example, a byte stream of identical bytes will not generate
7448 a hash value.")
7449 (license license:asl2.0)))
7450
7451 (define-public python2-tlsh
7452 (package
7453 (inherit python-tlsh)
7454 (name "python2-tlsh")
7455 (inputs `(("python" ,python-2)))))
7456
7457 (define-public python-termcolor
7458 (package
7459 (name "python-termcolor")
7460 (version "1.1.0")
7461 (source
7462 (origin
7463 (method url-fetch)
7464 (uri (pypi-uri "termcolor" version))
7465 (sha256
7466 (base32
7467 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7468 (build-system python-build-system)
7469 (arguments
7470 ;; There are no tests.
7471 `(#:tests? #f))
7472 (home-page "https://pypi.python.org/pypi/termcolor")
7473 (synopsis "ANSII Color formatting for terminal output")
7474 (description
7475 "This package provides ANSII Color formatting for output in terminals.")
7476 (license license:expat)))
7477
7478 (define-public python2-termcolor
7479 (package-with-python2 python-termcolor))
7480
7481 (define-public python-libarchive-c
7482 (package
7483 (name "python-libarchive-c")
7484 (version "2.8")
7485 (source (origin
7486 (method url-fetch)
7487 (uri (pypi-uri "libarchive-c" version))
7488 (sha256
7489 (base32
7490 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7491 (build-system python-build-system)
7492 (arguments
7493 '(#:phases (modify-phases %standard-phases
7494 (add-before
7495 'build 'reference-libarchive
7496 (lambda* (#:key inputs #:allow-other-keys)
7497 ;; Retain the absolute file name of libarchive.so.
7498 (let ((libarchive (assoc-ref inputs "libarchive")))
7499 (substitute* "libarchive/ffi.py"
7500 (("find_library\\('archive'\\)")
7501 (string-append "'" libarchive
7502 "/lib/libarchive.so'"))))))
7503 (replace 'check
7504 (lambda _ (invoke "pytest" "-vv"))))))
7505 (native-inputs
7506 `(("python-mock" ,python-mock)
7507 ("python-pytest" ,python-pytest)))
7508 (inputs
7509 `(("libarchive" ,libarchive)))
7510 (home-page "https://github.com/Changaco/python-libarchive-c")
7511 (synopsis "Python interface to libarchive")
7512 (description
7513 "This package provides Python bindings to libarchive, a C library to
7514 access possibly compressed archives in many different formats. It uses
7515 Python's @code{ctypes} foreign function interface (FFI).")
7516 (license license:lgpl2.0+)))
7517
7518 (define-public python2-libarchive-c
7519 (package-with-python2 python-libarchive-c))
7520
7521 (define-public python-file
7522 (package
7523 (inherit file)
7524 (name "python-file")
7525 (build-system python-build-system)
7526 (arguments
7527 '(#:tests? #f ;no tests
7528 #:configure-flags '("--single-version-externally-managed" "--root=/")
7529 #:phases (modify-phases %standard-phases
7530 (add-before 'build 'change-directory
7531 (lambda _
7532 (chdir "python")
7533 #t))
7534 (add-before 'build 'set-library-file-name
7535 (lambda* (#:key inputs #:allow-other-keys)
7536 (let ((file (assoc-ref inputs "file")))
7537 (substitute* "magic.py"
7538 (("find_library\\('magic'\\)")
7539 (string-append "'" file "/lib/libmagic.so'")))
7540 #t))))))
7541 (inputs `(("file" ,file)))
7542 (native-inputs (if (%current-target-system)
7543 `(("self" ,this-package))
7544 '()))
7545 (synopsis "Python bindings to the libmagic file type guesser. Note that
7546 this module and the python-magic module both provide a \"magic.py\" file;
7547 these two modules, which are different and were developed separately, both
7548 serve the same purpose: provide Python bindings for libmagic.")))
7549
7550 (define-public python2-file
7551 (package-with-python2 python-file))
7552
7553 (define-public python-debian
7554 (package
7555 (name "python-debian")
7556 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7557 (version "0.1.36")
7558 (source
7559 (origin
7560 ;; Use git-fetch, as pypi doesn't include test suite.
7561 (method git-fetch)
7562 (uri (git-reference
7563 (url home-page)
7564 (commit version)))
7565 (file-name (git-file-name name version))
7566 (sha256
7567 (base32
7568 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7569 (build-system python-build-system)
7570 (arguments
7571 `(#:phases (modify-phases %standard-phases
7572 (add-after 'unpack 'remove-debian-specific-tests
7573 ;; python-apt, apt and dpkg are not yet available in guix,
7574 ;; and these tests heavily depend on them.
7575 (lambda _
7576 (delete-file "lib/debian/tests/test_deb822.py")
7577 (delete-file "lib/debian/tests/test_debfile.py")
7578 #t)))))
7579 (propagated-inputs
7580 `(("python-six" ,python-six)
7581 ("python-chardet" ,python-chardet)))
7582 (synopsis "Debian package related modules")
7583 (description
7584 ;; XXX: Use @enumerate instead of @itemize to work around
7585 ;; <http://bugs.gnu.org/21772>.
7586 "This package provides Python modules that abstract many formats of
7587 Debian-related files, such as:
7588
7589 @enumerate
7590 @item Debtags information;
7591 @item @file{debian/changelog} files;
7592 @item packages files, pdiffs;
7593 @item control files of single or multiple RFC822-style paragraphs---e.g.
7594 @file{debian/control}, @file{.changes}, @file{.dsc};
7595 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7596 contained files and meta-information.
7597 @end enumerate\n")
7598
7599 ;; Modules are either GPLv2+ or GPLv3+.
7600 (license license:gpl3+)))
7601
7602 (define-public python2-debian
7603 (package-with-python2 python-debian))
7604
7605 (define-public python-nbformat
7606 (package
7607 (name "python-nbformat")
7608 (version "4.4.0")
7609 (source
7610 (origin
7611 (method url-fetch)
7612 (uri (pypi-uri "nbformat" version))
7613 (sha256
7614 (base32
7615 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7616 (build-system python-build-system)
7617 (arguments `(#:tests? #f)) ; no test target
7618 (propagated-inputs
7619 `(("python-ipython-genutils" ,python-ipython-genutils)
7620 ("python-jsonschema" ,python-jsonschema)
7621 ("python-jupyter-core" ,python-jupyter-core)
7622 ("python-traitlets" ,python-traitlets)))
7623 (home-page "http://jupyter.org")
7624 (synopsis "Jupyter Notebook format")
7625 (description "This package provides the reference implementation of the
7626 Jupyter Notebook format and Python APIs for working with notebooks.")
7627 (license license:bsd-3)))
7628
7629 (define-public python2-nbformat
7630 (package-with-python2 python-nbformat))
7631
7632 (define-public python-bleach
7633 (package
7634 (name "python-bleach")
7635 (version "3.1.0")
7636 (source
7637 (origin
7638 (method url-fetch)
7639 (uri (pypi-uri "bleach" version))
7640 (sha256
7641 (base32
7642 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7643 (build-system python-build-system)
7644 (propagated-inputs
7645 `(("python-webencodings" ,python-webencodings)
7646 ("python-six" ,python-six)))
7647 (native-inputs
7648 `(("python-pytest" ,python-pytest)
7649 ("python-pytest-runner" ,python-pytest-runner-2)))
7650 (home-page "https://github.com/jsocol/bleach")
7651 (synopsis "Whitelist-based HTML-sanitizing tool")
7652 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7653 (license license:asl2.0)))
7654
7655 (define-public python2-bleach
7656 (package-with-python2 python-bleach))
7657
7658 (define-public python-entrypoints
7659 (package
7660 (name "python-entrypoints")
7661 (version "0.3")
7662 (source
7663 (origin
7664 (method url-fetch)
7665 (uri (pypi-uri "entrypoints" version))
7666 (sha256
7667 (base32
7668 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7669 (build-system python-build-system)
7670 ;; The package does not come with a setup.py file, so we have to generate
7671 ;; one ourselves.
7672 (arguments
7673 `(#:tests? #f
7674 #:phases
7675 (modify-phases %standard-phases
7676 (add-after 'unpack 'create-setup.py
7677 (lambda _
7678 (call-with-output-file "setup.py"
7679 (lambda (port)
7680 (format port "\
7681 from setuptools import setup
7682 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7683 " ,version))))))))
7684 (home-page "https://github.com/takluyver/entrypoints")
7685 (synopsis "Discover and load entry points from installed Python packages")
7686 (description "Entry points are a way for Python packages to advertise
7687 objects with some common interface. The most common examples are
7688 @code{console_scripts} entry points, which define shell commands by
7689 identifying a Python function to run. The @code{entrypoints} module contains
7690 functions to find and load entry points.")
7691 (license license:expat)))
7692
7693 (define-public python2-entrypoints
7694 (package-with-python2 python-entrypoints))
7695
7696 (define-public python-nbconvert
7697 (package
7698 (name "python-nbconvert")
7699 (version "5.0.0b1")
7700 (source
7701 (origin
7702 (method url-fetch)
7703 (uri (pypi-uri "nbconvert" version))
7704 (sha256
7705 (base32
7706 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7707 (build-system python-build-system)
7708 (arguments
7709 `(;; The "bdist_egg" target is disabled by default, causing the installation
7710 ;; to fail.
7711 #:configure-flags (list "bdist_egg")
7712 ;; FIXME: 5 failures, 40 errors.
7713 #:tests? #f))
7714 ;; #:phases
7715 ;; (modify-phases %standard-phases
7716 ;; (replace 'check
7717 ;; (lambda _
7718 ;; (zero? (system* "py.test" "-v")))))
7719 (native-inputs
7720 `(("python-pytest" ,python-pytest)))
7721 (propagated-inputs
7722 `(("python-bleach" ,python-bleach)
7723 ("python-entrypoints" ,python-entrypoints)
7724 ("python-jinja2" ,python-jinja2)
7725 ("python-jupyter-core" ,python-jupyter-core)
7726 ("python-mistune" ,python-mistune)
7727 ("python-nbformat" ,python-nbformat)
7728 ("python-pygments" ,python-pygments)
7729 ("python-traitlets" ,python-traitlets)))
7730 (home-page "http://jupyter.org")
7731 (synopsis "Converting Jupyter Notebooks")
7732 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7733 notebooks to various other formats via Jinja templates. It allows you to
7734 convert an @code{.ipynb} notebook file into various static formats including:
7735
7736 @enumerate
7737 @item HTML
7738 @item LaTeX
7739 @item PDF
7740 @item Reveal JS
7741 @item Markdown (md)
7742 @item ReStructured Text (rst)
7743 @item executable script
7744 @end enumerate\n")
7745 (license license:bsd-3)))
7746
7747 (define-public python2-nbconvert
7748 (package-with-python2 python-nbconvert))
7749
7750 (define-public python-notebook
7751 (package
7752 (name "python-notebook")
7753 (version "5.7.4")
7754 (source (origin
7755 (method url-fetch)
7756 (uri (pypi-uri "notebook" version))
7757 (sha256
7758 (base32
7759 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7760 (build-system python-build-system)
7761 (arguments
7762 `(#:phases
7763 (modify-phases %standard-phases
7764 (replace 'check
7765 (lambda _
7766 ;; These tests require a browser
7767 (delete-file-recursively "notebook/tests/selenium")
7768 ;; Some tests need HOME
7769 (setenv "HOME" "/tmp")
7770 ;; This file contains "warningfilters", which are not supported
7771 ;; by this version of nose.
7772 (delete-file "setup.cfg")
7773 (with-directory-excursion "/tmp"
7774 (invoke "nosetests" "-v"))
7775 #t)))))
7776 (propagated-inputs
7777 `(("python-jupyter-core" ,python-jupyter-core)
7778 ("python-nbformat" ,python-nbformat)
7779 ("python-nbconvert" ,python-nbconvert)
7780 ("python-prometheus-client" ,python-prometheus-client)
7781 ("python-send2trash" ,python-send2trash)
7782 ("python-terminado" ,python-terminado)))
7783 (native-inputs
7784 `(("python-nose" ,python-nose)
7785 ("python-sphinx" ,python-sphinx)
7786 ("python-requests" ,python-requests)))
7787 (home-page "http://jupyter.org/")
7788 (synopsis "Web-based notebook environment for interactive computing")
7789 (description
7790 "The Jupyter HTML notebook is a web-based notebook environment for
7791 interactive computing.")
7792 (properties `((python2-variant . ,(delay python2-notebook))))
7793 (license license:bsd-3)))
7794
7795 (define-public python2-notebook
7796 (let ((base (package-with-python2
7797 (strip-python2-variant python-notebook))))
7798 (package (inherit base)
7799 (native-inputs
7800 `(("python2-mock" ,python2-mock)
7801 ,@(package-native-inputs base)))
7802 (arguments
7803 (substitute-keyword-arguments (package-arguments base)
7804 ((#:phases phases)
7805 `(modify-phases ,phases
7806 (add-before 'check 'disable-test-case
7807 ;; The test requires network access to localhost. Curiously it
7808 ;; fails with Python 2 only. Simply make the test-case return
7809 ;; immediately.
7810 (lambda _
7811 (substitute*
7812 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7813 (("formats = self.nbconvert_api") "return #")))))))))))
7814
7815 (define-public python-widgetsnbextension
7816 (package
7817 (name "python-widgetsnbextension")
7818 (version "3.4.2")
7819 (source
7820 (origin
7821 (method url-fetch)
7822 (uri (pypi-uri "widgetsnbextension" version))
7823 (sha256
7824 (base32
7825 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7826 (build-system python-build-system)
7827 (propagated-inputs
7828 `(("python-ipykernel" ,python-ipykernel)
7829 ("python-notebook" ,python-notebook)))
7830 (native-inputs
7831 `(("python-certifi" ,python-certifi)
7832 ("python-nose" ,python-nose)))
7833 (home-page "https://ipython.org")
7834 (synopsis "IPython HTML widgets for Jupyter")
7835 (description "This package provides interactive HTML widgets for Jupyter
7836 notebooks.")
7837 (license license:bsd-3)))
7838
7839 (define-public python2-widgetsnbextension
7840 (package-with-python2 python-widgetsnbextension))
7841
7842 (define-public python-ipywidgets
7843 (package
7844 (name "python-ipywidgets")
7845 (version "5.2.2")
7846 (source
7847 (origin
7848 (method url-fetch)
7849 (uri (pypi-uri "ipywidgets" version))
7850 (sha256
7851 (base32
7852 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7853 (build-system python-build-system)
7854 (propagated-inputs
7855 `(("python-ipython" ,python-ipython)
7856 ("python-traitlets" ,python-traitlets)
7857 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7858 (native-inputs
7859 `(("python-nose" ,python-nose)
7860 ("python-pytest" ,python-pytest)))
7861 (home-page "https://ipython.org")
7862 (synopsis "IPython HTML widgets for Jupyter")
7863 (description "Ipywidgets are interactive HTML widgets for Jupyter
7864 notebooks and the IPython kernel. Notebooks come alive when interactive
7865 widgets are used. Users gain control of their data and can visualize changes
7866 in the data.")
7867 (license license:bsd-3)))
7868
7869 (define-public python2-ipywidgets
7870 (package-with-python2 python-ipywidgets))
7871
7872 (define-public python-jupyter-console
7873 (package
7874 (name "python-jupyter-console")
7875 (version "6.0.0")
7876 (source
7877 (origin
7878 (method url-fetch)
7879 (uri (pypi-uri "jupyter_console" version))
7880 (sha256
7881 (base32
7882 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7883 (build-system python-build-system)
7884 (propagated-inputs
7885 `(("python-ipykernel" ,python-ipykernel)
7886 ("python-jupyter-client" ,python-jupyter-client)
7887 ("python-prompt-toolkit" ,python-prompt-toolkit)
7888 ("python-pygments" ,python-pygments)))
7889 (native-inputs
7890 `(("python-nose" ,python-nose)))
7891 (home-page "https://jupyter.org")
7892 (synopsis "Jupyter terminal console")
7893 (description "This package provides a terminal-based console frontend for
7894 Jupyter kernels. It also allows for console-based interaction with non-Python
7895 Jupyter kernels such as IJulia and IRKernel.")
7896 (license license:bsd-3)))
7897
7898 (define-public python2-jupyter-console
7899 (package
7900 (name "python2-jupyter-console")
7901 (version "5.2.0")
7902 (source
7903 (origin
7904 (method url-fetch)
7905 (uri (pypi-uri "jupyter_console" version))
7906 (sha256
7907 (base32
7908 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7909 (build-system python-build-system)
7910 ;; Tests only run in an TTY.
7911 (arguments `(#:tests? #f))
7912 (propagated-inputs
7913 `(("python2-ipykernel" ,python2-ipykernel)
7914 ("python2-jupyter-client" ,python2-jupyter-client)
7915 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7916 ("python2-pygments" ,python2-pygments)))
7917 (native-inputs
7918 `(("python2-nose" ,python2-nose)))
7919 (home-page "https://jupyter.org")
7920 (synopsis "Jupyter terminal console")
7921 (description "This package provides a terminal-based console frontend for
7922 Jupyter kernels. It also allows for console-based interaction with non-Python
7923 Jupyter kernels such as IJulia and IRKernel.")
7924 (license license:bsd-3)))
7925
7926 ;; The python-ipython and python-jupyter-console require each other. To get
7927 ;; the functionality in both packages working, strip down the
7928 ;; python-jupyter-console package when using it as an input to python-ipython.
7929 (define python-jupyter-console-minimal
7930 (package
7931 (inherit python-jupyter-console)
7932 (name "python-jupyter-console-minimal")
7933 (arguments
7934 (substitute-keyword-arguments
7935 (package-arguments python-jupyter-console)
7936 ((#:phases phases)
7937 `(modify-phases ,phases
7938 (add-after 'install 'delete-bin
7939 (lambda* (#:key outputs #:allow-other-keys)
7940 ;; Delete the bin files, to avoid conflicts in profiles
7941 ;; where python-ipython and python-jupyter-console are
7942 ;; both present.
7943 (delete-file-recursively
7944 (string-append
7945 (assoc-ref outputs "out") "/bin"))))))))
7946 ;; Remove the python-ipython propagated input, to avoid the cycle
7947 (propagated-inputs
7948 (alist-delete
7949 "python-ipython"
7950 (package-propagated-inputs python-jupyter-console)))))
7951
7952 (define-public python-qtconsole
7953 (package
7954 (name "python-qtconsole")
7955 (version "4.4.3")
7956 (source
7957 (origin
7958 (method url-fetch)
7959 (uri (pypi-uri "qtconsole" version))
7960 (sha256
7961 (base32
7962 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7963 (build-system python-build-system)
7964 (arguments
7965 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7966 ;; but we only have the LTS version 5.x. This means that there might be
7967 ;; runtime errors, but since this is a dependency of the Jupyter package,
7968 ;; and Jupyter can be used without the qtconsole we can overlook this for
7969 ;; now.
7970 `(#:tests? #f
7971 #:phases
7972 (modify-phases %standard-phases
7973 (add-before 'check 'pre-check
7974 (lambda _
7975 (setenv "QT_QPA_PLATFORM" "offscreen")
7976 #t)))))
7977 (propagated-inputs
7978 `(("python-ipykernel" ,python-ipykernel)
7979 ("python-ipython" ,python-ipython)))
7980 (native-inputs
7981 `(("python-pytest" ,python-pytest)))
7982 (home-page "http://jupyter.org")
7983 (synopsis "Jupyter Qt console")
7984 (description "This package provides a Qt-based console for Jupyter with
7985 support for rich media output.")
7986 (license license:bsd-3)))
7987
7988 (define-public python-jsbeautifier
7989 (package
7990 (name "python-jsbeautifier")
7991 (version "1.10.2")
7992 (home-page "https://github.com/beautify-web/js-beautify")
7993 (source (origin
7994 (method git-fetch)
7995 (uri (git-reference
7996 (url home-page)
7997 (commit (string-append "v" version))))
7998 (file-name (git-file-name name version))
7999 (sha256
8000 (base32
8001 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8002 (build-system python-build-system)
8003 (arguments
8004 `(#:phases (modify-phases %standard-phases
8005 (add-after 'unpack 'chdir
8006 (lambda _
8007 ;; The upstream Git repository contains all the code,
8008 ;; but this package only builds the python code.
8009 (chdir "python")
8010 #t))
8011 (add-after 'unpack 'patch-python-six-requirements
8012 (lambda _
8013 (substitute* "python/setup.py"
8014 (("six>=1.12.0")
8015 "six>=1.11.0"))
8016 #t)))))
8017 (propagated-inputs
8018 `(("python-editorconfig" ,python-editorconfig)
8019 ("python-six" ,python-six)))
8020 (native-inputs
8021 `(("python-pytest" ,python-pytest)))
8022 (synopsis "JavaScript unobfuscator and beautifier")
8023 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8024 popular online obfuscators.")
8025 (license license:expat)))
8026
8027 (define-public jupyter
8028 (package
8029 (name "jupyter")
8030 (version "1.0.0")
8031 (source
8032 (origin
8033 (method url-fetch)
8034 (uri (pypi-uri "jupyter" version))
8035 (sha256
8036 (base32
8037 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8038 (build-system python-build-system)
8039 (arguments '(#:tests? #f)) ; there are none.
8040 (propagated-inputs
8041 `(("python-ipykernel" ,python-ipykernel)
8042 ("python-ipywidgets" ,python-ipywidgets)
8043 ("python-jupyter-console" ,python-jupyter-console)
8044 ("python-nbconvert" ,python-nbconvert)
8045 ("python-notebook" ,python-notebook)
8046 ("python-qtconsole" ,python-qtconsole)))
8047 (native-search-paths
8048 (list (search-path-specification
8049 (variable "JUPYTER_PATH")
8050 (files '("share/jupyter")))))
8051 (home-page "https://jupyter.org")
8052 (synopsis "Web application for interactive documents")
8053 (description
8054 "The Jupyter Notebook is a web application that allows you to create and
8055 share documents that contain live code, equations, visualizations and
8056 explanatory text. Uses include: data cleaning and transformation, numerical
8057 simulation, statistical modeling, machine learning and much more.")
8058 (license license:bsd-3)))
8059
8060 (define-public python-chardet
8061 (package
8062 (name "python-chardet")
8063 (version "3.0.4")
8064 (source
8065 (origin
8066 (method url-fetch)
8067 (uri (pypi-uri "chardet" version))
8068 (sha256
8069 (base32
8070 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8071 (native-inputs
8072 `(("python-hypothesis" ,python-hypothesis)
8073 ("python-pytest" ,python-pytest)
8074 ("python-pytest-runner" ,python-pytest-runner)))
8075 (build-system python-build-system)
8076 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8077 (arguments `(#:tests? #f))
8078 (home-page "https://github.com/chardet/chardet")
8079 (synopsis "Universal encoding detector for Python 2 and 3")
8080 (description
8081 "This package provides @code{chardet}, a Python module that can
8082 automatically detect a wide range of file encodings.")
8083 (license license:lgpl2.1+)))
8084
8085 (define-public python2-chardet
8086 (package-with-python2 python-chardet))
8087
8088 (define-public python-docopt
8089 (package
8090 (name "python-docopt")
8091 (version "0.6.2")
8092 (source
8093 (origin
8094 (method git-fetch)
8095 ;; The release on PyPI does not include tests.
8096 (uri (git-reference
8097 (url "https://github.com/docopt/docopt")
8098 (commit version)))
8099 (file-name (git-file-name name version))
8100 (sha256
8101 (base32
8102 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
8103 (build-system python-build-system)
8104 (native-inputs
8105 `(("python-pytest" ,python-pytest)))
8106 (arguments
8107 `(#:phases
8108 (modify-phases %standard-phases
8109 (replace 'check
8110 (lambda _ (invoke "py.test"))))))
8111 (home-page "http://docopt.org")
8112 (synopsis "Command-line interface description language for Python")
8113 (description "This library allows the user to define a command-line
8114 interface from a program's help message rather than specifying it
8115 programmatically with command-line parsers like @code{getopt} and
8116 @code{argparse}.")
8117 (license license:expat)))
8118
8119 (define-public python2-docopt
8120 (package-with-python2 python-docopt))
8121
8122 (define-public python-pythondialog
8123 (package
8124 (name "python-pythondialog")
8125 (version "3.4.0")
8126 (source
8127 (origin
8128 (method url-fetch)
8129 (uri (pypi-uri "pythondialog" version))
8130 (sha256
8131 (base32
8132 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8133 (build-system python-build-system)
8134 (arguments
8135 `(#:phases
8136 (modify-phases %standard-phases
8137 (add-after 'unpack 'patch-path
8138 (lambda* (#:key inputs #:allow-other-keys)
8139 (let* ((dialog (assoc-ref inputs "dialog")))
8140 ;; Since this library really wants to grovel the search path, we
8141 ;; must hardcode dialog's store path into it.
8142 (substitute* "dialog.py"
8143 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8144 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8145 #t))))
8146 #:tests? #f)) ; no test suite
8147 (propagated-inputs
8148 `(("dialog" ,dialog)))
8149 (home-page "http://pythondialog.sourceforge.net/")
8150 (synopsis "Python interface to the UNIX dialog utility")
8151 (description "A Python wrapper for the dialog utility. Its purpose is to
8152 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8153 This allows one to make simple text-mode user interfaces on Unix-like systems")
8154 (license license:lgpl2.1)
8155 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8156
8157 (define-public python2-pythondialog
8158 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8159 (package
8160 (inherit base)
8161 (version (package-version python-pythondialog))
8162 (source (origin
8163 (method url-fetch)
8164 (uri (pypi-uri "python2-pythondialog" version))
8165 (sha256
8166 (base32
8167 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8168
8169 (define-public python-configobj
8170 (package
8171 (name "python-configobj")
8172 (version "5.0.6")
8173 (source (origin
8174 (method url-fetch)
8175 (uri (pypi-uri "configobj" version))
8176 (sha256
8177 (base32
8178 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8179 ;; Patch setup.py so it looks for python-setuptools, which is
8180 ;; required to parse the keyword 'install_requires' in setup.py.
8181 (patches (search-patches "python-configobj-setuptools.patch"))))
8182 (build-system python-build-system)
8183 (propagated-inputs
8184 `(("python-six" ,python-six)))
8185 (synopsis "Config file reading, writing and validation")
8186 (description "ConfigObj is a simple but powerful config file reader and
8187 writer: an ini file round tripper. Its main feature is that it is very easy to
8188 use, with a straightforward programmer’s interface and a simple syntax for
8189 config files.")
8190 (home-page "https://github.com/DiffSK/configobj")
8191 (license license:bsd-3)))
8192
8193 (define-public python2-configobj
8194 (package-with-python2 python-configobj))
8195
8196 (define-public python-configargparse
8197 (package
8198 (name "python-configargparse")
8199 (version "0.14.0")
8200 (source (origin
8201 (method url-fetch)
8202 (uri (pypi-uri "ConfigArgParse" version))
8203 (sha256
8204 (base32
8205 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8206 (build-system python-build-system)
8207 (native-inputs
8208 `(("python-pyyaml" ,python-pyyaml)))
8209 (arguments
8210 `(#:phases
8211 (modify-phases %standard-phases
8212 (replace 'check
8213 (lambda _
8214 ;; Bypass setuptools-shim because one test relies on "setup.py"
8215 ;; being the first argument passed to the python call.
8216 ;;
8217 ;; NOTE: Many tests do not run because they rely on Python's
8218 ;; built-in test.test_argparse, but we remove the unit tests from
8219 ;; our Python installation.
8220 (invoke "python" "setup.py" "test"))))))
8221 (synopsis "Replacement for argparse")
8222 (description "A drop-in replacement for argparse that allows options to also
8223 be set via config files and/or environment variables.")
8224 (home-page "https://github.com/bw2/ConfigArgParse")
8225 (license license:expat)))
8226
8227 (define-public python2-configargparse
8228 (package-with-python2 python-configargparse))
8229
8230 (define-public python-argparse-manpage
8231 (package
8232 (name "python-argparse-manpage")
8233 (version "1.1")
8234 (source
8235 (origin
8236 (method url-fetch)
8237 (uri (pypi-uri "argparse-manpage" version))
8238 (sha256
8239 (base32
8240 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8241 (build-system python-build-system)
8242 (home-page "https://github.com/praiskup/argparse-manpage")
8243 (synopsis "Build manual page from Python's ArgumentParser object")
8244 (description
8245 "This package provides tools to build manual pages from Python's
8246 @code{ArgumentParser} object.")
8247 (license license:asl2.0)))
8248
8249 (define-public python-contextlib2
8250 (package
8251 (name "python-contextlib2")
8252 (version "0.5.5")
8253 (source
8254 (origin
8255 (method url-fetch)
8256 (uri (pypi-uri "contextlib2" version))
8257 (sha256
8258 (base32
8259 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8260 (build-system python-build-system)
8261 (home-page "http://contextlib2.readthedocs.org/")
8262 (synopsis "Tools for decorators and context managers")
8263 (description "This module is primarily a backport of the Python
8264 3.2 contextlib to earlier Python versions. Like contextlib, it
8265 provides utilities for common tasks involving decorators and context
8266 managers. It also contains additional features that are not part of
8267 the standard library.")
8268 (properties `((python2-variant . ,(delay python2-contextlib2))))
8269 (license license:psfl)))
8270
8271 (define-public python2-contextlib2
8272 (let ((base (package-with-python2
8273 (strip-python2-variant python-contextlib2))))
8274 (package
8275 (inherit base)
8276 (arguments
8277 (substitute-keyword-arguments (package-arguments base)
8278 ((#:phases phases)
8279 `(modify-phases ,phases
8280 (replace 'check
8281 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8282 (native-inputs
8283 `(("python2-unittest2" ,python2-unittest2))))))
8284
8285 (define-public python-texttable
8286 (package
8287 (name "python-texttable")
8288 (version "0.9.1")
8289 (source
8290 (origin
8291 (method url-fetch)
8292 (uri (pypi-uri "texttable" version))
8293 (sha256
8294 (base32
8295 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8296 (build-system python-build-system)
8297 (arguments '(#:tests? #f)) ; no tests
8298 (home-page "https://github.com/foutaise/texttable/")
8299 (synopsis "Python module for creating simple ASCII tables")
8300 (description "Texttable is a Python module for creating simple ASCII
8301 tables.")
8302 (license license:lgpl2.1+)))
8303
8304 (define-public python2-texttable
8305 (package-with-python2 python-texttable))
8306
8307 (define-public python-atomicwrites
8308 (package
8309 (name "python-atomicwrites")
8310 (version "1.3.0")
8311 (source (origin
8312 (method url-fetch)
8313 (uri (pypi-uri "atomicwrites" version))
8314 (sha256
8315 (base32
8316 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8317 (build-system python-build-system)
8318 (synopsis "Atomic file writes in Python")
8319 (description "Library for atomic file writes using platform dependent tools
8320 for atomic file system operations.")
8321 (home-page "https://github.com/untitaker/python-atomicwrites")
8322 (license license:expat)))
8323
8324 (define-public python2-atomicwrites
8325 (package-with-python2 python-atomicwrites))
8326
8327 (define-public python-click-threading
8328 (package
8329 (name "python-click-threading")
8330 (version "0.4.4")
8331 (source (origin
8332 (method url-fetch)
8333 (uri (pypi-uri "click-threading" version))
8334 (sha256
8335 (base32
8336 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8337 (build-system python-build-system)
8338 (propagated-inputs
8339 `(("python-click" ,python-click)))
8340 (synopsis "Utilities for multithreading in Click")
8341 (description "This package provides utilities for multithreading in Click
8342 applications.")
8343 (home-page "https://github.com/click-contrib/click-threading")
8344 (license license:expat)))
8345
8346 (define-public python-click-log
8347 (package
8348 (name "python-click-log")
8349 (version "0.3.2")
8350 (source (origin
8351 (method url-fetch)
8352 (uri (pypi-uri "click-log" version))
8353 (sha256
8354 (base32
8355 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8356 (build-system python-build-system)
8357 (propagated-inputs
8358 `(("python-click" ,python-click)))
8359 (synopsis "Logging for click applications")
8360 (description "This package provides a Python library for logging Click
8361 applications.")
8362 (home-page "https://github.com/click-contrib/click-log")
8363 (license license:expat)))
8364
8365 (define-public python-apipkg
8366 (package
8367 (name "python-apipkg")
8368 (version "1.4")
8369 (source (origin
8370 (method url-fetch)
8371 (uri (pypi-uri "apipkg" version))
8372 (sha256
8373 (base32
8374 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8375 (build-system python-build-system)
8376 (native-inputs
8377 `(("python-pytest" ,python-pytest)))
8378 (synopsis "Namespace control and lazy-import mechanism")
8379 (description "With apipkg you can control the exported namespace of a Python
8380 package and greatly reduce the number of imports for your users. It is a small
8381 pure Python module that works on virtually all Python versions.")
8382 (home-page "https://github.com/pytest-dev/apipkg")
8383 (license license:expat)))
8384
8385 (define-public python2-apipkg
8386 (package-with-python2 python-apipkg))
8387
8388 (define-public python-execnet
8389 (package
8390 (name "python-execnet")
8391 (version "1.4.1")
8392 (source (origin
8393 (method url-fetch)
8394 (uri (pypi-uri "execnet" version))
8395 (sha256
8396 (base32
8397 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8398 (build-system python-build-system)
8399 (arguments
8400 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8401 ;; The two test failures are caused by the lack of an `ssh` executable.
8402 ;; The test suite can be run with pytest after the 'install' phase.
8403 #:tests? #f))
8404 (native-inputs
8405 `(("python-pytest" ,python-pytest)
8406 ("python-setuptools-scm" ,python-setuptools-scm)))
8407 (propagated-inputs
8408 `(("python-apipkg" ,python-apipkg)))
8409 (synopsis "Rapid multi-Python deployment")
8410 (description "Execnet provides a share-nothing model with
8411 channel-send/receive communication for distributing execution across many
8412 Python interpreters across version, platform and network barriers. It has a
8413 minimal and fast API targeting the following uses:
8414 @enumerate
8415 @item distribute tasks to (many) local or remote CPUs
8416 @item write and deploy hybrid multi-process applications
8417 @item write scripts to administer multiple environments
8418 @end enumerate")
8419 (home-page "http://codespeak.net/execnet/")
8420 (license license:expat)))
8421
8422 (define-public python2-execnet
8423 (package-with-python2 python-execnet))
8424
8425 (define-public python-icalendar
8426 (package
8427 (name "python-icalendar")
8428 (version "4.0.4")
8429 (source (origin
8430 (method url-fetch)
8431 (uri (pypi-uri "icalendar" version))
8432 (sha256
8433 (base32
8434 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8435 (build-system python-build-system)
8436 (propagated-inputs
8437 `(("python-dateutil" ,python-dateutil)
8438 ("python-pytz" ,python-pytz)))
8439 (synopsis "Python library for parsing iCalendar files")
8440 (description "The icalendar package is a parser/generator of iCalendar
8441 files for use with Python.")
8442 (home-page "https://github.com/collective/icalendar")
8443 (license license:bsd-2)))
8444
8445 (define-public python-args
8446 (package
8447 (name "python-args")
8448 (version "0.1.0")
8449 (source (origin
8450 (method url-fetch)
8451 (uri (pypi-uri "args" version))
8452 (sha256
8453 (base32
8454 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8455 (build-system python-build-system)
8456 (home-page "https://github.com/kennethreitz/args")
8457 (synopsis "Command-line argument parser")
8458 (description
8459 "This library provides a Python module to parse command-line arguments.")
8460 (license license:bsd-3)))
8461
8462 (define-public python2-args
8463 (package-with-python2 python-args))
8464
8465 (define-public python-clint
8466 (package
8467 (name "python-clint")
8468 (version "0.5.1")
8469 (source (origin
8470 (method url-fetch)
8471 (uri (pypi-uri "clint" version))
8472 (sha256
8473 (base32
8474 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8475 (build-system python-build-system)
8476 (arguments
8477 '(#:phases
8478 (modify-phases %standard-phases
8479 (replace 'check
8480 (lambda _ (invoke "py.test" "-v"))))))
8481 (native-inputs
8482 `(("python-pytest" ,python-pytest)))
8483 (propagated-inputs
8484 `(("python-args" ,python-args)))
8485 (home-page "https://github.com/kennethreitz/clint")
8486 (synopsis "Command-line interface tools")
8487 (description
8488 "Clint is a Python module filled with a set of tools for developing
8489 command-line applications, including tools for colored and indented
8490 output, progress bar display, and pipes.")
8491 (license license:isc)))
8492
8493 (define-public python2-clint
8494 (package-with-python2 python-clint))
8495
8496 (define-public python-rply
8497 (package
8498 (name "python-rply")
8499 (version "0.7.5")
8500 (source (origin
8501 (method url-fetch)
8502 (uri (pypi-uri "rply" version))
8503 (sha256
8504 (base32
8505 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8506 (build-system python-build-system)
8507 (propagated-inputs
8508 `(("python-appdirs" ,python-appdirs)))
8509 (home-page "https://github.com/alex/rply")
8510 (synopsis "Parser generator for Python")
8511 (description
8512 "This package provides a pure Python based parser generator, that also
8513 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8514 with a new public API, and RPython support.")
8515 (license license:bsd-3)))
8516
8517 (define-public python2-rply
8518 (package-with-python2 python-rply))
8519
8520 (define-public python-hy
8521 (package
8522 (name "python-hy")
8523 (version "0.17.0")
8524 (source (origin
8525 (method url-fetch)
8526 (uri (pypi-uri "hy" version))
8527 (sha256
8528 (base32
8529 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
8530 (build-system python-build-system)
8531 (arguments
8532 '(#:phases
8533 (modify-phases %standard-phases
8534 (add-before 'install 'set-HOME
8535 (lambda _
8536 (setenv "HOME" "/tmp")))
8537 (replace 'check
8538 (lambda _
8539 ;; Tests require write access to HOME.
8540 (setenv "HOME" "/tmp")
8541 (invoke "nosetests"))))))
8542 (native-inputs
8543 `(("python-coverage" ,python-coverage)
8544 ("python-nose" ,python-nose)))
8545 (propagated-inputs
8546 `(("python-astor" ,python-astor)
8547 ("python-clint" ,python-clint)
8548 ("python-rply" ,python-rply)
8549 ("python-fastentrypoints"
8550 ,python-fastentrypoints)
8551 ("python-funcparserlib"
8552 ,python-funcparserlib)))
8553 (home-page "http://hylang.org/")
8554 (synopsis "Lisp frontend to Python")
8555 (description
8556 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8557 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8558 Python at your fingertips, in Lisp form.")
8559 (license license:expat)))
8560
8561 (define-public python2-hy
8562 (package-with-python2 python-hy))
8563
8564 (define-public python2-functools32
8565 (package
8566 (name "python2-functools32")
8567 (version "3.2.3-2")
8568 (source
8569 (origin
8570 (method url-fetch)
8571 (uri (pypi-uri "functools32" version))
8572 (sha256
8573 (base32
8574 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8575 (build-system python-build-system)
8576 (arguments
8577 `(#:python ,python-2
8578 #:tests? #f)) ; no test target
8579 (home-page "https://github.com/MiCHiLU/python-functools32")
8580 (synopsis
8581 "Backport of the functools module from Python 3.2.3")
8582 (description
8583 "This package is a backport of the @code{functools} module from Python
8584 3.2.3 for use with older versions of Python and PyPy.")
8585 (license license:expat)))
8586
8587 (define-public python2-subprocess32
8588 (package
8589 (name "python2-subprocess32")
8590 (version "3.2.7")
8591 (source (origin
8592 (method url-fetch)
8593 (uri (pypi-uri "subprocess32" version))
8594 (sha256
8595 (base32
8596 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8597 (patches
8598 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8599 (build-system python-build-system)
8600 (arguments
8601 `(#:python ,python-2
8602 ;; The test suite fails with Python > 2.7.13:
8603 ;; import test.support
8604 ;; ImportError: No module named support
8605 #:tests? #f
8606 #:phases
8607 (modify-phases %standard-phases
8608 (add-after 'unpack 'patch-/bin/sh
8609 (lambda _
8610 (substitute* '("subprocess32.py"
8611 "test_subprocess32.py")
8612 (("/bin/sh") (which "sh")))
8613 #t)))))
8614 (home-page "https://github.com/google/python-subprocess32")
8615 (synopsis "Backport of the subprocess module from Python 3.2")
8616 (description
8617 "This is a backport of the @code{subprocess} standard library module
8618 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8619 new features. On POSIX systems it is guaranteed to be reliable when used
8620 in threaded applications. It includes timeout support from Python 3.3 but
8621 otherwise matches 3.2’s API.")
8622 (license license:psfl)))
8623
8624 (define-public python2-futures
8625 (package
8626 (name "python2-futures")
8627 (version "3.2.0")
8628 (source
8629 (origin
8630 (method url-fetch)
8631 (uri (pypi-uri "futures" version))
8632 (sha256
8633 (base32
8634 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8635 (build-system python-build-system)
8636 (arguments
8637 `(#:python ,python-2
8638 #:phases
8639 (modify-phases %standard-phases
8640 (replace 'check
8641 (lambda _
8642 (invoke "python" "test_futures.py")
8643 #t)))))
8644 (home-page "https://github.com/agronholm/pythonfutures")
8645 (synopsis
8646 "Backport of the concurrent.futures package from Python 3.2")
8647 (description
8648 "The concurrent.futures module provides a high-level interface for
8649 asynchronously executing callables. This package backports the
8650 concurrent.futures package from Python 3.2")
8651 (license license:bsd-3)))
8652
8653 (define-public python-promise
8654 (package
8655 (name "python-promise")
8656 (version "0.4.2")
8657 (source
8658 (origin
8659 (method url-fetch)
8660 (uri (pypi-uri "promise" version))
8661 (sha256
8662 (base32
8663 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8664 (build-system python-build-system)
8665 ;; Tests wants python-futures, which is a python2 only program, and
8666 ;; can't be found by python-promise at test time.
8667 (arguments `(#:tests? #f))
8668 (home-page "https://github.com/syrusakbary/promise")
8669 (synopsis "Promises/A+ implementation for Python")
8670 (description
8671 "Promises/A+ implementation for Python")
8672 (properties `((python2-variant . ,(delay python2-promise))))
8673 (license license:expat)))
8674
8675 (define-public python2-promise
8676 (let ((promise (package-with-python2
8677 (strip-python2-variant python-promise))))
8678 (package (inherit promise)
8679 (arguments (substitute-keyword-arguments (package-arguments promise)
8680 ((#:tests? _) #t)))
8681 (native-inputs
8682 `(("python2-futures" ,python2-futures)
8683 ("python2-pytest" ,python2-pytest)
8684 ,@(package-native-inputs promise))))))
8685
8686 (define-public python-progressbar33
8687 (package
8688 (name "python-progressbar33")
8689 (version "2.4")
8690 (source
8691 (origin
8692 (method url-fetch)
8693 (uri (pypi-uri "progressbar33" version))
8694 (sha256
8695 (base32
8696 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8697 (build-system python-build-system)
8698 (home-page "http://github.com/germangh/python-progressbar")
8699 (synopsis "Text progress bar library for Python")
8700 (description
8701 "This package provides a text progress bar library for Python. This
8702 version only differs from the original @code{progressbar} package in that it
8703 uses relative package imports instead of absolute imports, which is necessary
8704 for the module to work under Python 3.3.")
8705 ;; Either or both of these licenses may be selected.
8706 (license (list license:lgpl2.1+ license:bsd-3))))
8707
8708 (define-public python-colorama
8709 (package
8710 (name "python-colorama")
8711 (version "0.3.9")
8712 (source
8713 (origin
8714 (method url-fetch)
8715 (uri (pypi-uri "colorama" version))
8716 (sha256
8717 (base32
8718 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8719 (build-system python-build-system)
8720 (synopsis "Colored terminal text rendering for Python")
8721 (description "Colorama is a Python library for rendering colored terminal
8722 text.")
8723 (home-page "https://pypi.python.org/pypi/colorama")
8724 (license license:bsd-3)))
8725
8726 (define-public python2-colorama
8727 (package-with-python2 python-colorama))
8728
8729 (define-public python-rsa
8730 (package
8731 (name "python-rsa")
8732 (version "3.4.2")
8733 (source
8734 (origin
8735 (method url-fetch)
8736 (uri (pypi-uri "rsa" version))
8737 (sha256
8738 (base32
8739 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8740 (build-system python-build-system)
8741 (propagated-inputs
8742 `(("python-pyasn1" ,python-pyasn1)))
8743 (synopsis "Pure-Python RSA implementation")
8744 (description "Python-RSA is a pure-Python RSA implementation. It supports
8745 encryption and decryption, signing and verifying signatures, and key
8746 generation according to PKCS#1 version 1.5. It can be used as a Python
8747 library as well as on the command line.")
8748 (home-page "https://stuvel.eu/rsa")
8749 (license license:asl2.0)))
8750
8751 (define-public python2-rsa
8752 (package-with-python2 python-rsa))
8753
8754 (define-public python-pluggy
8755 (package
8756 (name "python-pluggy")
8757 (version "0.11.0")
8758 (source
8759 (origin
8760 (method url-fetch)
8761 (uri (pypi-uri "pluggy" version))
8762 (sha256
8763 (base32
8764 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8765 (build-system python-build-system)
8766 (native-inputs
8767 `(("python-setuptools-scm" ,python-setuptools-scm)))
8768 (synopsis "Plugin and hook calling mechanism for Python")
8769 (description "Pluggy is an extraction of the plugin manager as used by
8770 Pytest but stripped of Pytest specific details.")
8771 (home-page "https://pypi.python.org/pypi/pluggy")
8772 (license license:expat)))
8773
8774 (define-public python2-pluggy
8775 (package-with-python2 python-pluggy))
8776
8777 (define-public python-tox
8778 (package
8779 (name "python-tox")
8780 (version "2.8.1")
8781 (source
8782 (origin
8783 (method url-fetch)
8784 (uri (pypi-uri "tox" version))
8785 (sha256
8786 (base32
8787 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8788 (build-system python-build-system)
8789 (arguments
8790 ;; FIXME: Tests require pytest-timeout, which itself requires
8791 ;; pytest>=2.8.0 for installation.
8792 '(#:tests? #f))
8793 (propagated-inputs
8794 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8795 ("python-py" ,python-py)
8796 ("python-virtualenv" ,python-virtualenv)))
8797 (native-inputs
8798 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8799 ("python-pytest" ,python-pytest) ; >= 2.3.5
8800 ("python-setuptools-scm" ,python-setuptools-scm)))
8801 (home-page "http://tox.testrun.org/")
8802 (synopsis "Virtualenv-based automation of test activities")
8803 (description "Tox is a generic virtualenv management and test command line
8804 tool. It can be used to check that a package installs correctly with
8805 different Python versions and interpreters, or run tests in each type of
8806 supported environment, or act as a frontend to continuous integration
8807 servers.")
8808 (license license:expat)))
8809
8810 (define-public python2-tox
8811 (package-with-python2 python-tox))
8812
8813 (define-public python-jmespath
8814 (package
8815 (name "python-jmespath")
8816 (version "0.9.4")
8817 (source
8818 (origin
8819 (method url-fetch)
8820 (uri (pypi-uri "jmespath" version))
8821 (sha256
8822 (base32
8823 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
8824 (build-system python-build-system)
8825 (native-inputs
8826 `(("python-nose" ,python-nose)))
8827 (synopsis "JSON Matching Expressions")
8828 (description "JMESPath (pronounced “james path”) is a Python library that
8829 allows one to declaratively specify how to extract elements from a JSON
8830 document.")
8831 (home-page "https://github.com/jmespath/jmespath.py")
8832 (license license:expat)))
8833
8834 (define-public python2-jmespath
8835 (package-with-python2 python-jmespath))
8836
8837 (define-public python-botocore
8838 (package
8839 (name "python-botocore")
8840 (version "1.12.149")
8841 (source
8842 (origin
8843 (method url-fetch)
8844 (uri (pypi-uri "botocore" version))
8845 (sha256
8846 (base32
8847 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8848 (build-system python-build-system)
8849 (arguments
8850 ;; FIXME: Many tests are failing.
8851 '(#:tests? #f))
8852 (propagated-inputs
8853 `(("python-dateutil" ,python-dateutil)
8854 ("python-docutils" ,python-docutils)
8855 ("python-jmespath" ,python-jmespath)))
8856 (native-inputs
8857 `(("python-mock" ,python-mock)
8858 ("python-nose" ,python-nose)
8859 ("behave" ,behave)
8860 ("python-tox" ,python-tox)
8861 ("python-urllib3" ,python-urllib3)
8862 ("python-wheel" ,python-wheel)))
8863 (home-page "https://github.com/boto/botocore")
8864 (synopsis "Low-level interface to AWS")
8865 (description "Botocore is a Python library that provides a low-level
8866 interface to the Amazon Web Services (AWS) API.")
8867 (license license:asl2.0)))
8868
8869 (define-public python2-botocore
8870 (package-with-python2 python-botocore))
8871
8872 (define-public python-xdo
8873 (package
8874 (name "python-xdo")
8875 (version "0.3")
8876 (source (origin
8877 (method url-fetch)
8878 (uri (string-append
8879 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8880 "python-xdo_" version ".orig.tar.gz"))
8881 (sha256
8882 (base32
8883 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8884 (build-system python-build-system)
8885 (arguments
8886 '(#:phases
8887 (modify-phases %standard-phases
8888 (add-before 'install 'patch-libxdo-path
8889 ;; Hardcode the path of dynamically loaded libxdo library.
8890 (lambda* (#:key inputs #:allow-other-keys)
8891 (let ((libxdo (string-append
8892 (assoc-ref inputs "xdotool")
8893 "/lib/libxdo.so")))
8894 (substitute* "xdo/_xdo.py"
8895 (("find_library\\(\"xdo\"\\)")
8896 (simple-format #f "\"~a\"" libxdo)))
8897 #t))))
8898 #:tests? #f)) ; no tests provided
8899 (propagated-inputs
8900 `(("python-six" ,python-six)))
8901 (inputs
8902 `(("xdotool" ,xdotool)
8903 ("libX11" ,libx11)))
8904 (home-page "https://tracker.debian.org/pkg/python-xdo")
8905 (synopsis "Python library for simulating X11 keyboard/mouse input")
8906 (description "Provides bindings to libxdo for manipulating X11 via simulated
8907 input. (Note that this is mostly a legacy library; you may wish to look at
8908 python-xdo for newer bindings.)")
8909 (license license:bsd-3)))
8910
8911 (define-public python2-xdo
8912 (package-with-python2 python-xdo))
8913
8914 (define-public python-mako
8915 (package
8916 (name "python-mako")
8917 (version "1.1.0")
8918 (source
8919 (origin
8920 (method url-fetch)
8921 (uri (pypi-uri "Mako" version))
8922 (sha256
8923 (base32
8924 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8925 (build-system python-build-system)
8926 (arguments
8927 `(#:phases (modify-phases %standard-phases
8928 (replace 'check
8929 (lambda _
8930 (invoke "pytest" "-vv"))))))
8931 (propagated-inputs
8932 `(("python-markupsafe" ,python-markupsafe)))
8933 (native-inputs
8934 `(("python-mock" ,python-mock)
8935 ("python-pytest" ,python-pytest)))
8936 (home-page "https://www.makotemplates.org/")
8937 (synopsis "Templating language for Python")
8938 (description "Mako is a templating language for Python that compiles
8939 templates into Python modules.")
8940 (license license:expat)))
8941
8942 (define-public python2-mako
8943 (package-with-python2 python-mako))
8944
8945 (define-public python-waitress
8946 (package
8947 (name "python-waitress")
8948 (version "1.1.0")
8949 (source
8950 (origin
8951 (method url-fetch)
8952 (uri (pypi-uri "waitress" version))
8953 (patches (search-patches "python-waitress-fix-tests.patch"))
8954 (sha256
8955 (base32
8956 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8957 (build-system python-build-system)
8958 (home-page "https://github.com/Pylons/waitress")
8959 (synopsis "Waitress WSGI server")
8960 (description "Waitress is meant to be a production-quality pure-Python WSGI
8961 server with very acceptable performance.")
8962 (license license:zpl2.1)))
8963
8964 (define-public python2-waitress
8965 (package-with-python2 python-waitress))
8966
8967 (define-public python-whichcraft
8968 (package
8969 (name "python-whichcraft")
8970 (version "0.6.1")
8971 (source
8972 (origin
8973 (method url-fetch)
8974 (uri (pypi-uri "whichcraft" version))
8975 (sha256
8976 (base32
8977 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8978 (build-system python-build-system)
8979 (native-inputs
8980 `(("python-pytest" ,python-pytest)))
8981 (home-page "https://github.com/pydanny/whichcraft")
8982 (synopsis "Cross-platform cross-python shutil.which functionality")
8983 (description
8984 "This package provides a shim of the shutil.which function that's
8985 designed to work across multiple versions of Python.")
8986 (license license:bsd-3)))
8987
8988 (define-public python-cookiecutter
8989 (package
8990 (name "python-cookiecutter")
8991 (version "1.6.0")
8992 (source
8993 (origin
8994 (method url-fetch)
8995 (uri (pypi-uri "cookiecutter" version))
8996 (sha256
8997 (base32
8998 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
8999 (build-system python-build-system)
9000 (native-inputs
9001 `(("python-freezegun" ,python-freezegun)
9002 ("python-pytest" ,python-pytest)
9003 ("python-pytest-catchlog" ,python-pytest-catchlog)
9004 ("python-pytest-cov" ,python-pytest-cov)
9005 ("python-pytest-mock" ,python-pytest-mock)))
9006 (propagated-inputs
9007 `(("python-binaryornot" ,python-binaryornot)
9008 ("python-click" ,python-click)
9009 ("python-future" ,python-future)
9010 ("python-jinja2" ,python-jinja2)
9011 ("python-jinja2-time" ,python-jinja2-time)
9012 ("python-poyo" ,python-poyo)
9013 ("python-requests" ,python-requests)
9014 ("python-whichcraft" ,python-whichcraft)))
9015 (home-page "https://github.com/audreyr/cookiecutter")
9016 (synopsis
9017 "Command-line utility that creates projects from project templates")
9018 (description
9019 "This package provides a command-line utility that creates projects from
9020 project templates, e.g. creating a Python package project from a Python package
9021 project template.")
9022 (license license:bsd-3)))
9023
9024 (define-public python-pyquery
9025 (package
9026 (name "python-pyquery")
9027 (version "1.2.17")
9028 (source
9029 (origin
9030 (method url-fetch)
9031 (uri (pypi-uri "pyquery" version))
9032 (sha256
9033 (base32
9034 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9035 (build-system python-build-system)
9036 (native-inputs
9037 `(("python-webob" ,python-webob)
9038 ("python-webtest" ,python-webtest)))
9039 (propagated-inputs
9040 `(("python-lxml" ,python-lxml)
9041 ("python-cssselect" ,python-cssselect)))
9042 (home-page "https://github.com/gawel/pyquery")
9043 (synopsis "Make jQuery-like queries on xml documents")
9044 (description "pyquery allows you to make jQuery queries on xml documents.
9045 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9046 fast xml and html manipulation.")
9047 (license license:bsd-3)))
9048
9049 (define-public python-anyjson
9050 (package
9051 (name "python-anyjson")
9052 (version "0.3.3")
9053 (source
9054 (origin
9055 (method url-fetch)
9056 (uri (pypi-uri "anyjson" version))
9057 (sha256
9058 (base32
9059 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9060 (build-system python-build-system)
9061 (arguments
9062 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9063 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9064 ;; whatever) so this transformation needs to be done before the tests
9065 ;; can be run. Maybe we could add a build step to transform beforehand
9066 ;; but it could be annoying/difficult.
9067 ;; We can enable tests for the Python 2 version, though, and do below.
9068 #:tests? #f))
9069 (home-page "https://bitbucket.org/runeh/anyjson/")
9070 (synopsis
9071 "Wraps best available JSON implementation in a common interface")
9072 (description
9073 "Anyjson loads whichever is the fastest JSON module installed
9074 and provides a uniform API regardless of which JSON implementation is used.")
9075 (license license:bsd-3)
9076 (properties `((python2-variant . ,(delay python2-anyjson))))))
9077
9078 (define-public python2-anyjson
9079 (let ((anyjson (package-with-python2
9080 (strip-python2-variant python-anyjson))))
9081 (package
9082 (inherit anyjson)
9083 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9084 #:tests? #t
9085 ,@(package-arguments anyjson)))
9086 (native-inputs `(("python2-nose" ,python2-nose))))))
9087
9088 (define-public python-amqp
9089 (package
9090 (name "python-amqp")
9091 (version "2.3.2")
9092 (source
9093 (origin
9094 (method url-fetch)
9095 (uri (pypi-uri "amqp" version))
9096 (sha256
9097 (base32
9098 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9099 (build-system python-build-system)
9100 (native-inputs
9101 `(("python-case" ,python-case)
9102 ("python-pytest-sugar" ,python-pytest-sugar)
9103 ("python-mock" ,python-mock)))
9104 (propagated-inputs
9105 `(("python-vine" ,python-vine)))
9106 (home-page "https://github.com/celery/py-amqp")
9107 (synopsis
9108 "Low-level AMQP client for Python (fork of amqplib)")
9109 (description
9110 "This is a fork of amqplib which was originally written by Barry Pederson.
9111 It is maintained by the Celery project, and used by kombu as a pure python
9112 alternative when librabbitmq is not available.")
9113 (license license:lgpl2.1+)
9114 (properties `((python2-variant . ,(delay python2-amqp))))))
9115
9116 (define-public python2-amqp
9117 (let ((amqp (package-with-python2
9118 (strip-python2-variant python-amqp))))
9119 (package
9120 (inherit amqp)
9121 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9122 ;; unmaintained. Weirdly, does not do this on the python 3
9123 ;; version?
9124 #:tests? #f
9125 ,@(package-arguments amqp))))))
9126
9127 (define-public python-txamqp
9128 (package
9129 (name "python-txamqp")
9130 (version "0.8.2")
9131 (source
9132 (origin
9133 (method url-fetch)
9134 (uri (pypi-uri "txAMQP" version))
9135 (sha256
9136 (base32
9137 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9138 (build-system python-build-system)
9139 (propagated-inputs
9140 `(("python-six" ,python-six)
9141 ("python-twisted" ,python-twisted)))
9142 (home-page "https://github.com/txamqp/txamqp")
9143 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9144 (description
9145 "This package provides a Python library for communicating with AMQP peers
9146 and brokers using the asynchronous networking framework Twisted. It contains
9147 all the necessary code to connect, send and receive messages to/from an
9148 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9149 also includes support for using Thrift RPC over AMQP in Twisted
9150 applications.")
9151 (license license:asl2.0)))
9152
9153 (define-public python2-txamqp
9154 (package-with-python2 python-txamqp))
9155
9156 (define-public python-kombu
9157 (package
9158 (name "python-kombu")
9159 (version "4.2.2")
9160 (source
9161 (origin
9162 (method url-fetch)
9163 (uri (pypi-uri "kombu" version))
9164 (sha256
9165 (base32
9166 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9167 (build-system python-build-system)
9168 (native-inputs
9169 `(("python-mock" ,python-mock)
9170 ("python-case" ,python-case)
9171 ("python-pyro4" ,python-pyro4)
9172 ("python-pytest-sugar" ,python-pytest-sugar)
9173 ("python-pytz" ,python-pytz)))
9174 (propagated-inputs
9175 `(("python-anyjson" ,python-anyjson)
9176 ("python-amqp" ,python-amqp)
9177 ("python-redis" ,python-redis)))
9178 (home-page "https://kombu.readthedocs.io")
9179 (synopsis "Message passing library for Python")
9180 (description "The aim of Kombu is to make messaging in Python as easy as
9181 possible by providing an idiomatic high-level interface for the AMQ protocol,
9182 and also provide proven and tested solutions to common messaging problems.
9183 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9184 message orientation, queuing, routing, reliability and security, for which the
9185 RabbitMQ messaging server is the most popular implementation.")
9186 (license license:bsd-3)
9187 (properties `((python2-variant . ,(delay python2-kombu))))))
9188
9189 (define-public python2-kombu
9190 (let ((kombu (package-with-python2
9191 (strip-python2-variant python-kombu))))
9192 (package
9193 (inherit kombu)
9194 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9195 ;; It works fine on the python3 variant.
9196 #:tests? #f
9197 ,@(package-arguments kombu)))
9198 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9199 ,@(package-native-inputs kombu))))))
9200
9201 (define-public python-billiard
9202 (package
9203 (name "python-billiard")
9204 (version "3.5.0.5")
9205 (source
9206 (origin
9207 (method url-fetch)
9208 (uri (pypi-uri "billiard" version))
9209 (sha256
9210 (base32
9211 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9212 (build-system python-build-system)
9213 (native-inputs
9214 `(("python-case" ,python-case)
9215 ("python-pytest" ,python-pytest)))
9216 (home-page "https://github.com/celery/billiard")
9217 (synopsis
9218 "Python multiprocessing fork with improvements and bugfixes")
9219 (description
9220 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9221 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9222 pyprocessing package. This standalone variant is intended to be compatible with
9223 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9224 (license license:bsd-3)
9225 (properties `((python2-variant . ,(delay python2-billiard))))))
9226
9227 (define-public python2-billiard
9228 (let ((billiard (package-with-python2
9229 (strip-python2-variant python-billiard))))
9230 (package
9231 (inherit billiard)
9232 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9233 ("python2-mock" ,python2-mock)
9234 ,@(package-native-inputs billiard))))))
9235
9236 (define-public python-celery
9237 (package
9238 (name "python-celery")
9239 (version "4.2.1")
9240 (source
9241 (origin
9242 (method url-fetch)
9243 (uri (pypi-uri "celery" version))
9244 (sha256
9245 (base32
9246 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9247 (build-system python-build-system)
9248 (arguments
9249 '(;; TODO The tests fail with Python 3.7
9250 ;; https://github.com/celery/celery/issues/4849
9251 #:tests? #f
9252 #:phases
9253 (modify-phases %standard-phases
9254 (add-after 'unpack 'patch-requirements
9255 (lambda _
9256 (substitute* "requirements/test.txt"
9257 (("pytest>=3\\.0,<3\\.3")
9258 "pytest>=3.0"))
9259 #t)))))
9260 (native-inputs
9261 `(("python-case" ,python-case)
9262 ("python-pytest" ,python-pytest)))
9263 (propagated-inputs
9264 `(("python-pytz" ,python-pytz)
9265 ("python-billiard" ,python-billiard)
9266 ("python-kombu" ,python-kombu)))
9267 (home-page "https://celeryproject.org")
9268 (synopsis "Distributed Task Queue")
9269 (description "Celery is an asynchronous task queue/job queue based on
9270 distributed message passing. It is focused on real-time operation, but
9271 supports scheduling as well. The execution units, called tasks, are executed
9272 concurrently on a single or more worker servers using multiprocessing,
9273 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9274 synchronously (wait until ready).")
9275 (license license:bsd-3)
9276 (properties `((python2-variant . ,(delay python2-celery))))))
9277
9278 (define-public python2-celery
9279 (let ((celery (package-with-python2
9280 (strip-python2-variant python-celery))))
9281 (package
9282 (inherit celery)
9283 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9284 ("python2-mock" ,python2-mock)
9285 ,@(package-native-inputs celery))))))
9286
9287 (define-public python-translitcodec
9288 (package
9289 (name "python-translitcodec")
9290 (version "0.4.0")
9291 (source
9292 (origin
9293 (method url-fetch)
9294 (uri (pypi-uri "translitcodec" version))
9295 (sha256
9296 (base32
9297 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9298 (build-system python-build-system)
9299 (arguments
9300 `(#:tests? #f)) ; no tests provided
9301 (home-page
9302 "https://github.com/claudep/translitcodec")
9303 (synopsis
9304 "Unicode to 8-bit charset transliteration codec")
9305 (description
9306 "This package contains codecs for transliterating ISO 10646 texts into
9307 best-effort representations using smaller coded character sets (ASCII,
9308 ISO 8859, etc.).")
9309 (license license:expat)))
9310
9311 (define-public python2-translitcodec
9312 (package-with-python2 python-translitcodec))
9313
9314 (define-public python-editor
9315 (package
9316 (name "python-editor")
9317 (version "0.5")
9318 (source
9319 (origin
9320 (method url-fetch)
9321 (uri (pypi-uri "python-editor" version))
9322 (sha256
9323 (base32
9324 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9325 (build-system python-build-system)
9326 (home-page
9327 "https://github.com/fmoo/python-editor")
9328 (synopsis
9329 "Programmatically open an editor, capture the result")
9330 (description
9331 "python-editor is a library that provides the editor module for
9332 programmatically interfacing with your system's $EDITOR.")
9333 (license license:asl2.0)))
9334
9335 (define-public python2-editor
9336 (package-with-python2 python-editor))
9337
9338 (define-public python-vobject
9339 (package
9340 (name "python-vobject")
9341 (version "0.9.5")
9342 (source (origin
9343 (method url-fetch)
9344 (uri (pypi-uri "vobject" version))
9345 (sha256
9346 (base32
9347 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9348 (build-system python-build-system)
9349 (arguments
9350 '(;; The test suite relies on some non-portable Windows interfaces.
9351 #:tests? #f))
9352 (propagated-inputs
9353 `(("python-dateutil" ,python-dateutil)
9354 ("python-pyicu" ,python-pyicu)))
9355 (synopsis "Parse and generate vCard and vCalendar files")
9356 (description "Vobject is intended to be a full featured Python package for
9357 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9358 are supported and well tested. vCard 3.0 files are supported, and all data
9359 should be imported, but only a few components are understood in a sophisticated
9360 way.")
9361 (home-page "http://eventable.github.io/vobject/")
9362 (license license:asl2.0)))
9363
9364 (define-public python2-vobject
9365 (package-with-python2 python-vobject))
9366
9367 (define-public python-munkres
9368 (package
9369 (name "python-munkres")
9370 (version "1.0.8")
9371 (source (origin
9372 (method url-fetch)
9373 (uri (pypi-uri "munkres" version))
9374 (sha256
9375 (base32
9376 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9377 (build-system python-build-system)
9378 (arguments
9379 '(#:tests? #f)) ; no test suite
9380 (home-page "http://software.clapper.org/munkres/")
9381 (synopsis "Implementation of the Munkres algorithm")
9382 (description "The Munkres module provides an implementation of the Munkres
9383 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9384 useful for solving the Assignment Problem.")
9385 (license license:bsd-3)))
9386
9387 (define-public python2-munkres
9388 (package-with-python2 python-munkres))
9389
9390 (define-public python-whoosh
9391 (package
9392 (name "python-whoosh")
9393 (version "2.7.4")
9394 (source
9395 (origin
9396 (method url-fetch)
9397 (uri (pypi-uri "Whoosh" version))
9398 (sha256
9399 (base32
9400 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9401 (build-system python-build-system)
9402 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9403 (native-inputs
9404 `(("python-pytest" ,python-pytest)))
9405 (home-page "https://bitbucket.org/mchaput/whoosh")
9406 (synopsis "Full text indexing, search, and spell checking library")
9407 (description
9408 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9409 checking library.")
9410 (license license:bsd-2)))
9411
9412 (define-public python2-whoosh
9413 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9414 (package (inherit whoosh)
9415 (propagated-inputs
9416 `(("python2-backport-ssl-match-hostname"
9417 ,python2-backport-ssl-match-hostname)
9418 ,@(package-propagated-inputs whoosh))))))
9419
9420 (define-public python-pathlib
9421 (package
9422 (name "python-pathlib")
9423 (version "1.0.1")
9424 (source (origin
9425 (method url-fetch)
9426 (uri (pypi-uri "pathlib" version))
9427 (sha256
9428 (base32
9429 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9430 (build-system python-build-system)
9431 ;; The tests depend on the internal "test" module, which does not provide
9432 ;; a stable interface.
9433 (arguments `(#:tests? #f))
9434 (home-page "https://pathlib.readthedocs.org/")
9435 (synopsis "Object-oriented file system paths")
9436 (description "Pathlib offers a set of classes to handle file system paths.
9437 It offers the following advantages over using string objects:
9438
9439 @enumerate
9440 @item No more cumbersome use of os and os.path functions. Everything can
9441 be done easily through operators, attribute accesses, and method calls.
9442 @item Embodies the semantics of different path types. For example,
9443 comparing Windows paths ignores casing.
9444 @item Well-defined semantics, eliminating any inconsistencies or
9445 ambiguities (forward vs. backward slashes, etc.).
9446 @end enumerate
9447
9448 Note: In Python 3.4, pathlib is now part of the standard library. For other
9449 Python versions please consider python-pathlib2 instead, which tracks the
9450 standard library module. This module (python-pathlib) isn't maintained
9451 anymore.")
9452 (license license:expat)))
9453
9454 (define-public python2-pathlib
9455 (package-with-python2 python-pathlib))
9456
9457 (define-public python2-pathlib2
9458 (package
9459 (name "python2-pathlib2")
9460 (version "2.3.3")
9461 (source (origin
9462 (method url-fetch)
9463 (uri (pypi-uri "pathlib2" version))
9464 (sha256
9465 (base32
9466 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9467 (build-system python-build-system)
9468 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9469 ;; version is 3.4 which already includes this package as part of the
9470 ;; standard library.
9471 (arguments
9472 `(#:python ,python-2))
9473 (propagated-inputs
9474 `(("python2-scandir" ,python2-scandir)
9475 ("python2-six" ,python2-six)))
9476 (home-page "https://pypi.python.org/pypi/pathlib2/")
9477 (synopsis "Object-oriented file system paths - backport of standard
9478 pathlib module")
9479 (description "The goal of pathlib2 is to provide a backport of standard
9480 pathlib module which tracks the standard library module, so all the newest
9481 features of the standard pathlib can be used also on older Python versions.
9482
9483 Pathlib offers a set of classes to handle file system paths. It offers the
9484 following advantages over using string objects:
9485
9486 @enumerate
9487 @item No more cumbersome use of os and os.path functions. Everything can
9488 be done easily through operators, attribute accesses, and method calls.
9489 @item Embodies the semantics of different path types. For example,
9490 comparing Windows paths ignores casing.
9491 @item Well-defined semantics, eliminating any inconsistencies or
9492 ambiguities (forward vs. backward slashes, etc.).
9493 @end enumerate")
9494 (license license:expat)))
9495
9496 (define-public python2-pathlib2-bootstrap
9497 (hidden-package
9498 (package
9499 (inherit python2-pathlib2)
9500 (name "python2-pathlib2-bootstrap")
9501 (propagated-inputs
9502 `(("python2-scandir" ,python2-scandir)
9503 ("python2-six" ,python2-six-bootstrap))))))
9504
9505 (define-public python-jellyfish
9506 (package
9507 (name "python-jellyfish")
9508 (version "0.5.6")
9509 (source (origin
9510 (method url-fetch)
9511 (uri (pypi-uri "jellyfish" version))
9512 (sha256
9513 (base32
9514 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9515 (build-system python-build-system)
9516 (native-inputs
9517 `(("python-pytest" ,python-pytest)))
9518 (home-page "https://github.com/jamesturk/jellyfish")
9519 (synopsis "Approximate and phonetic matching of strings")
9520 (description "Jellyfish uses a variety of string comparison and phonetic
9521 encoding algorithms to do fuzzy string matching.")
9522 (license license:bsd-2)
9523 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9524
9525 (define-public python2-jellyfish
9526 (let ((jellyfish (package-with-python2
9527 (strip-python2-variant python-jellyfish))))
9528 (package (inherit jellyfish)
9529 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9530 ,@(package-native-inputs jellyfish))))))
9531
9532 (define-public python2-unicodecsv
9533 (package
9534 (name "python2-unicodecsv")
9535 (version "0.14.1")
9536 (source (origin
9537 (method git-fetch)
9538 ;; The test suite is not included in the PyPi release.
9539 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9540 (uri (git-reference
9541 (url "https://github.com/jdunck/python-unicodecsv")
9542 (commit version)))
9543 (file-name (git-file-name name version))
9544 (sha256
9545 (base32
9546 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
9547 (build-system python-build-system)
9548 (arguments
9549 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9550 #:python ,python-2))
9551 (native-inputs
9552 `(("python2-unittest2" ,python2-unittest2)))
9553 (home-page "https://github.com/jdunck/python-unicodecsv")
9554 (synopsis "Unicode CSV module for Python 2")
9555 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9556 module, adding support for Unicode strings.")
9557 (license license:bsd-2)))
9558
9559 (define-public python-rarfile
9560 (package
9561 (name "python-rarfile")
9562 (version "2.8")
9563 (source (origin
9564 (method url-fetch)
9565 (uri (pypi-uri "rarfile" version))
9566 (sha256
9567 (base32
9568 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9569 (build-system python-build-system)
9570 (arguments
9571 '(#:phases
9572 (modify-phases %standard-phases
9573 (replace 'check
9574 ;; Many tests fail, but the installation proceeds.
9575 (lambda _ (invoke "make" "-C" "test" "test"))))))
9576 (native-inputs
9577 `(("which" ,which))) ; required for tests
9578 (propagated-inputs
9579 `(("libarchive" ,libarchive)))
9580 (home-page "https://github.com/markokr/rarfile")
9581 (synopsis "RAR archive reader for Python")
9582 (description "This is Python module for RAR archive reading. The interface
9583 is made as zipfile like as possible.")
9584 (license license:isc)))
9585
9586 (define-public python2-rarfile
9587 (package-with-python2 python-rarfile))
9588
9589 (define-public python-magic
9590 (package
9591 (name "python-magic")
9592 (version "0.4.15")
9593 (source
9594 (origin
9595 (method url-fetch)
9596 (uri (pypi-uri "python-magic" version))
9597 (sha256
9598 (base32
9599 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9600 (file-name (string-append name "-" version "-checkout"))))
9601 (build-system python-build-system)
9602 (arguments
9603 ;; The tests are unreliable, so don't run them. The tests fail
9604 ;; under Python3 because they were written for Python2 and
9605 ;; contain import statements that do not work in Python3. One of
9606 ;; the tests fails under Python2 because its assertions are
9607 ;; overly stringent; it relies on comparing output strings which
9608 ;; are brittle and can change depending on the version of
9609 ;; libmagic being used and the system on which the test is
9610 ;; running. In my case, under GuixSD 0.10.0, only one test
9611 ;; failed, and it seems to have failed only because the version
9612 ;; of libmagic that is packaged in Guix outputs a slightly
9613 ;; different (but not wrong) string than the one that the test
9614 ;; expected.
9615 '(#:tests? #f
9616 #:phases (modify-phases %standard-phases
9617 ;; Replace a specific method call with a hard-coded
9618 ;; path to the necessary libmagic.so file in the
9619 ;; store. If we don't do this, then the method call
9620 ;; will fail to find the libmagic.so file, which in
9621 ;; turn will cause any application using
9622 ;; python-magic to fail.
9623 (add-before 'build 'hard-code-path-to-libmagic
9624 (lambda* (#:key inputs #:allow-other-keys)
9625 (let ((file (assoc-ref inputs "file")))
9626 (substitute* "magic.py"
9627 (("ctypes.util.find_library\\('magic'\\)")
9628 (string-append "'" file "/lib/libmagic.so'")))
9629 #t)))
9630 (add-before 'install 'disable-egg-compression
9631 (lambda _
9632 (let ((port (open-file "setup.cfg" "a")))
9633 (display "\n[easy_install]\nzip_ok = 0\n"
9634 port)
9635 (close-port port)
9636 #t))))))
9637 (inputs
9638 ;; python-magic needs to be able to find libmagic.so.
9639 `(("file" ,file)))
9640 (home-page
9641 "https://github.com/ahupp/python-magic")
9642 (synopsis
9643 "File type identification using libmagic")
9644 (description
9645 "This module uses ctypes to access the libmagic file type
9646 identification library. It makes use of the local magic database and
9647 supports both textual and MIME-type output. Note that this module and
9648 the python-file module both provide a \"magic.py\" file; these two
9649 modules, which are different and were developed separately, both serve
9650 the same purpose: to provide Python bindings for libmagic.")
9651 (license license:expat)))
9652
9653 (define-public python2-magic
9654 (package-with-python2 python-magic))
9655
9656 (define-public python2-s3cmd
9657 (package
9658 (name "python2-s3cmd")
9659 (version "1.6.1")
9660 (source
9661 (origin
9662 (method url-fetch)
9663 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9664 "s3cmd-" version ".tar.gz"))
9665 (sha256
9666 (base32
9667 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9668 (build-system python-build-system)
9669 (arguments
9670 ;; s3cmd is written for python2 only and contains no tests.
9671 `(#:python ,python-2
9672 #:tests? #f))
9673 (propagated-inputs
9674 `(("python2-dateutil" ,python2-dateutil)
9675 ;; The python-file package also provides a magic.py module.
9676 ;; This is an unfortunate state of affairs; however, s3cmd
9677 ;; fails to install if it cannot find specifically the
9678 ;; python-magic package. Thus we include it, instead of using
9679 ;; python-file. Ironically, s3cmd sometimes works better
9680 ;; without libmagic bindings at all:
9681 ;; https://github.com/s3tools/s3cmd/issues/198
9682 ("python2-magic" ,python2-magic)))
9683 (home-page "http://s3tools.org/s3cmd")
9684 (synopsis "Command line tool for S3-compatible storage services")
9685 (description
9686 "S3cmd is a command line tool for uploading, retrieving and managing data
9687 in storage services that are compatible with the Amazon Simple Storage
9688 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9689 GnuPG encryption, and more. It also supports management of Amazon's
9690 CloudFront content delivery network.")
9691 (license license:gpl2+)))
9692
9693 (define-public python-pkgconfig
9694 (package
9695 (name "python-pkgconfig")
9696 (version "1.3.1")
9697 (source
9698 (origin
9699 (method url-fetch)
9700 (uri (pypi-uri "pkgconfig" version))
9701 (sha256
9702 (base32
9703 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9704 (build-system python-build-system)
9705 (native-inputs
9706 `(("python-nose" ,python-nose)))
9707 (inputs
9708 `(("pkg-config" ,pkg-config)))
9709 (arguments
9710 `(#:phases
9711 (modify-phases %standard-phases
9712 (add-before 'build 'patch
9713 ;; Hard-code the path to pkg-config.
9714 (lambda _
9715 (substitute* "pkgconfig/pkgconfig.py"
9716 (("cmd = 'pkg-config")
9717 (string-append "cmd = '" (which "pkg-config"))))
9718 #t))
9719 (replace 'check
9720 (lambda _
9721 (invoke "nosetests" "test.py"))))))
9722 (home-page "https://github.com/matze/pkgconfig")
9723 (synopsis "Python interface for pkg-config")
9724 (description "This module provides a Python interface to pkg-config. It
9725 can be used to find all pkg-config packages, check if a package exists,
9726 check if a package meets certain version requirements, query CFLAGS and
9727 LDFLAGS and parse the output to build extensions with setup.py.")
9728 (license license:expat)))
9729
9730 (define-public python2-pkgconfig
9731 (package-with-python2 python-pkgconfig))
9732
9733 (define-public python-bz2file
9734 (package
9735 (name "python-bz2file")
9736 (version "0.98")
9737 (source
9738 (origin
9739 (method url-fetch)
9740 (uri (pypi-uri "bz2file" version))
9741 (sha256
9742 (base32
9743 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9744 (build-system python-build-system)
9745 (arguments
9746 `(#:tests? #f)) ; Tests use deprecated python modules.
9747 (home-page "https://github.com/nvawda/bz2file")
9748 (synopsis "Read and write bzip2-compressed files")
9749 (description
9750 "Bz2file is a Python library for reading and writing bzip2-compressed
9751 files. It contains a drop-in replacement for the I/O interface in the
9752 standard library's @code{bz2} module, including features from the latest
9753 development version of CPython that are not available in older releases.")
9754 (license license:asl2.0)))
9755
9756 (define-public python2-bz2file
9757 (package-with-python2 python-bz2file))
9758
9759 (define-public python-future
9760 (package
9761 (name "python-future")
9762 (version "0.17.1")
9763 (source
9764 (origin
9765 (method url-fetch)
9766 (uri (pypi-uri "future" version))
9767 (sha256
9768 (base32
9769 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9770 (build-system python-build-system)
9771 ;; Many tests connect to the network or are otherwise flawed.
9772 ;; https://github.com/PythonCharmers/python-future/issues/210
9773 (arguments
9774 `(#:tests? #f))
9775 (home-page "http://python-future.org")
9776 (synopsis "Single-source support for Python 3 and 2")
9777 (description
9778 "@code{python-future} is the missing compatibility layer between Python 2 and
9779 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9780 to support both Python 2 and Python 3 with minimal overhead.")
9781 (license license:expat)))
9782
9783 (define-public python2-future
9784 (package-with-python2 python-future))
9785
9786 (define-public python-cysignals
9787 (package
9788 (name "python-cysignals")
9789 (version "1.9.0")
9790 (source
9791 (origin
9792 (method url-fetch)
9793 (uri (pypi-uri "cysignals" version))
9794 (sha256
9795 (base32
9796 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9797 (build-system python-build-system)
9798 (native-inputs
9799 `(("python-cython" ,python-cython)
9800 ("python-sphinx" ,python-sphinx)))
9801 (inputs
9802 `(("pari-gp" ,pari-gp)))
9803 (arguments
9804 `(#:modules ((guix build python-build-system)
9805 ((guix build gnu-build-system) #:prefix gnu:)
9806 (guix build utils))
9807 ;; FIXME: Tests are executed after installation and currently fail
9808 ;; when not installing into standard locations; the author is working
9809 ;; on a fix.
9810 #:tests? #f
9811 #:phases
9812 (modify-phases %standard-phases
9813 (add-before
9814 'build 'configure
9815 (assoc-ref gnu:%standard-phases 'configure)))))
9816 (home-page
9817 "https://github.com/sagemath/cysignals")
9818 (synopsis
9819 "Handling of interrupts and signals for Cython")
9820 (description
9821 "The cysignals package provides mechanisms to handle interrupts (and
9822 other signals and errors) in Cython code, using two related approaches,
9823 for mixed Cython/Python code or external C libraries and pure Cython code,
9824 respectively.")
9825 (license license:lgpl3+)))
9826
9827 (define-public python2-cysignals
9828 (package-with-python2 python-cysignals))
9829
9830 (define-public python2-shedskin
9831 (package
9832 (name "python2-shedskin")
9833 (version "0.9.4")
9834 (source
9835 (origin
9836 (method url-fetch)
9837 (uri (string-append "https://github.com/shedskin/shedskin/"
9838 "releases/download/v" version
9839 "/shedskin-" version ".tgz"))
9840 (sha256
9841 (base32
9842 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9843 (build-system python-build-system)
9844 (arguments
9845 `(#:python ,python-2
9846 #:phases (modify-phases %standard-phases
9847 (add-after 'unpack 'fix-resulting-include-libs
9848 (lambda* (#:key inputs #:allow-other-keys)
9849 (let ((libgc (assoc-ref inputs "libgc"))
9850 (pcre (assoc-ref inputs "pcre")))
9851 (substitute* "shedskin/makefile.py"
9852 (("variable == 'CCFLAGS':[ ]*")
9853 (string-append "variable == 'CCFLAGS':\n"
9854 " line += ' -I " pcre "/include"
9855 " -I " libgc "/include'"))
9856 (("variable == 'LFLAGS':[ ]*")
9857 (string-append "variable == 'LFLAGS':\n"
9858 " line += ' -L" pcre "/lib"
9859 " -L " libgc "/lib'")))
9860 #t))))))
9861 (inputs `(("pcre" ,pcre)
9862 ("libgc" ,libgc)))
9863 (home-page "https://shedskin.github.io/")
9864 (synopsis "Experimental Python-2 to C++ Compiler")
9865 (description (string-append "This is an experimental compiler for a subset of
9866 Python. It generates C++ code and a Makefile."))
9867 (license (list license:gpl3 license:bsd-3 license:expat))))
9868
9869 (define-public python2-rope
9870 (package
9871 (name "python2-rope")
9872 (version "0.11.0")
9873 (source
9874 (origin
9875 (method url-fetch)
9876 (uri (pypi-uri "rope" version))
9877 (sha256
9878 (base32
9879 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9880 (arguments
9881 ;; Rope has only partial python3 support, see `python-rope'
9882 `(#:python ,python-2))
9883 (build-system python-build-system)
9884 (native-inputs
9885 `(("python2-unittest2" ,python2-unittest2)))
9886 (home-page "https://github.com/python-rope/rope")
9887 (synopsis "Refactoring library for Python")
9888 (description "Rope is a refactoring library for Python. It facilitates
9889 the renaming, moving and extracting of attributes, functions, modules, fields
9890 and parameters in Python 2 source code. These refactorings can also be applied
9891 to occurrences in strings and comments.")
9892 (license license:gpl2)))
9893
9894 (define-public python-rope
9895 (package
9896 (inherit python2-rope)
9897 (name "python-rope")
9898 (arguments `(#:python ,python-wrapper
9899 ;; XXX: Only partial python3 support, results in some failing
9900 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9901 #:tests? #f))
9902 (properties `((python2-variant . ,(delay python2-rope))))))
9903
9904 (define-public python-py3status
9905 (package
9906 (name "python-py3status")
9907 (version "3.21")
9908 (source
9909 (origin
9910 (method url-fetch)
9911 (uri (pypi-uri "py3status" version))
9912 (sha256
9913 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
9914 (build-system python-build-system)
9915 (inputs
9916 `(("file" ,file)))
9917 (arguments
9918 '(#:phases
9919 (modify-phases %standard-phases
9920 ;; 'file' is used for detection of configuration file encoding
9921 ;; let's make link the dependency to particular input
9922 (add-before 'build 'patch-file-path
9923 (lambda* (#:key inputs #:allow-other-keys)
9924 (let ((file-path (assoc-ref inputs "file")))
9925 (substitute* "py3status/parse_config.py"
9926 (("\\[\"file\", \"-b\"")
9927 (string-append "['" file-path "/bin/file', '-b'")))
9928 #t))))
9929 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9930 (home-page "https://github.com/ultrabug/py3status")
9931 (synopsis "Extensible i3status wrapper written in Python")
9932 (description "py3status is an i3status wrapper which extends i3status
9933 functionality in a modular way, allowing you to extend your panel with your
9934 own code, responding to click events and updating clock every second.")
9935 (license license:bsd-3)))
9936
9937 (define-public python-tblib
9938 (package
9939 (name "python-tblib")
9940 (version "1.3.2")
9941 (source (origin
9942 (method url-fetch)
9943 (uri (pypi-uri "tblib" version))
9944 (sha256 (base32
9945 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9946 (build-system python-build-system)
9947 (arguments
9948 `(#:phases
9949 (modify-phases %standard-phases
9950 (add-before 'check 'adjust-tests
9951 (lambda _
9952 (when (which "python3")
9953 ;; Adjust the example output to match that of Python 3.7:
9954 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9955 (substitute* "README.rst"
9956 (("Exception\\('fail',") "Exception('fail'"))
9957 #t)))
9958 (replace 'check
9959 (lambda _
9960 ;; Upstream runs tests after installation and the package itself
9961 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9962 ;; found.
9963 (setenv "PYTHONPATH"
9964 (string-append (getcwd) "/build/lib:"
9965 (getenv "PYTHONPATH")))
9966 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9967 (native-inputs
9968 `(("python-pytest" ,python-pytest)
9969 ("python-six" ,python-six)))
9970 (home-page "https://github.com/ionelmc/python-tblib")
9971 (synopsis "Traceback serialization library")
9972 (description
9973 "Traceback serialization allows you to:
9974
9975 @enumerate
9976 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9977 different processes. This allows better error handling when running code over
9978 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9979
9980 @item Parse traceback strings and raise with the parsed tracebacks.
9981 @end enumerate\n")
9982 (license license:bsd-3)))
9983
9984 (define-public python2-tblib
9985 (package-with-python2 python-tblib))
9986
9987 (define-public python-greenlet
9988 (package
9989 (name "python-greenlet")
9990 (version "0.4.15")
9991 (source (origin
9992 (method url-fetch)
9993 (uri (pypi-uri "greenlet" version))
9994 (sha256
9995 (base32
9996 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9997 (build-system python-build-system)
9998 (home-page "https://greenlet.readthedocs.io/")
9999 (synopsis "Lightweight in-process concurrent programming")
10000 (description
10001 "Greenlet package is a spin-off of Stackless, a version of CPython
10002 that supports micro-threads called \"tasklets\". Tasklets run
10003 pseudo-concurrently (typically in a single or a few OS-level threads) and
10004 are synchronized with data exchanges on \"channels\".")
10005 (license (list license:psfl license:expat))))
10006
10007 (define-public python2-greenlet
10008 (package-with-python2 python-greenlet))
10009
10010 (define-public python-objgraph
10011 (package
10012 (name "python-objgraph")
10013 (version "3.4.1")
10014 (source
10015 (origin
10016 (method url-fetch)
10017 (uri (pypi-uri "objgraph" version))
10018 (sha256
10019 (base32
10020 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
10021 (build-system python-build-system)
10022 (propagated-inputs
10023 `(("python-graphviz" ,python-graphviz)))
10024 (native-inputs
10025 `(("python-mock" ,python-mock)
10026 ("graphviz" ,graphviz)))
10027 (home-page "https://mg.pov.lt/objgraph/")
10028 (synopsis "Draw Python object reference graphs with graphviz")
10029 (description
10030 "This package provides tools to draw Python object reference graphs with
10031 graphviz.")
10032 (license license:expat)))
10033
10034 (define-public python2-objgraph
10035 (package-with-python2 python-objgraph))
10036
10037 (define-public python-gevent
10038 (package
10039 (name "python-gevent")
10040 (version "1.3.7")
10041 (source (origin
10042 (method url-fetch)
10043 (uri (pypi-uri "gevent" version))
10044 (sha256
10045 (base32
10046 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10047 (modules '((guix build utils)))
10048 (snippet
10049 '(begin
10050 ;; unbunding libev and c-ares
10051 (delete-file-recursively "deps")
10052 #t))))
10053 (build-system python-build-system)
10054 (arguments
10055 `(#:modules ((ice-9 ftw)
10056 (ice-9 match)
10057 (srfi srfi-26)
10058 (guix build utils)
10059 (guix build python-build-system))
10060 #:phases (modify-phases %standard-phases
10061 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10062 (lambda _
10063 (substitute* "src/gevent/subprocess.py"
10064 (("/bin/sh") (which "sh")))
10065 (for-each (lambda (file)
10066 (substitute* file
10067 (("/bin/sh") (which "sh"))
10068 (("/bin/true") (which "true"))))
10069 (find-files "src/greentest" "\\.py$"))
10070 #t))
10071 (add-before 'build 'do-not-use-bundled-sources
10072 (lambda* (#:key inputs #:allow-other-keys)
10073 (setenv "CONFIG_SHELL" (which "bash"))
10074 (setenv "LIBEV_EMBED" "false")
10075 (setenv "CARES_EMBED" "false")
10076 (setenv "EMBED" "false")
10077
10078 ;; Prevent building bundled libev.
10079 (substitute* "setup.py"
10080 (("run_make=_BUILDING")
10081 "run_make=False"))
10082
10083 (let ((greenlet (string-append
10084 (assoc-ref inputs "python-greenlet")
10085 "/include")))
10086 (match (scandir greenlet
10087 (lambda (item)
10088 (string-prefix? "python" item)))
10089 ((python)
10090 (setenv "C_INCLUDE_PATH"
10091 (string-append greenlet "/" python)))))
10092 #t))
10093 (add-before 'check 'skip-timer-test
10094 (lambda _
10095 ;; XXX: Skip 'TestTimerResolution', which appears to be
10096 ;; unreliable.
10097 (substitute* "src/greentest/test__core_timer.py"
10098 (("not greentest.RUNNING_ON_CI") "False"))
10099 #t))
10100 (replace 'check
10101 (lambda _
10102 ;; Make sure the build directory is on PYTHONPATH.
10103 (setenv "PYTHONPATH"
10104 (string-append
10105 (getenv "PYTHONPATH") ":"
10106 (getcwd) "/build/"
10107 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10108 (with-directory-excursion "src/greentest"
10109 ;; XXX: Many tests require network access. Instead we only
10110 ;; run known-good tests. Unfortunately we cannot use
10111 ;; recursion here since this directory also contains
10112 ;; Python-version-specific subfolders.
10113 (apply invoke "python" "testrunner.py" "--config"
10114 "known_failures.py"
10115 (scandir "." (cut regexp-exec
10116 (make-regexp "test_+(subprocess|core)")
10117 <>)))))))))
10118 (propagated-inputs
10119 `(("python-greenlet" ,python-greenlet)
10120 ("python-objgraph" ,python-objgraph)))
10121 (native-inputs
10122 `(("python-six" ,python-six)))
10123 (inputs
10124 `(("c-ares" ,c-ares)
10125 ("libev" ,libev)))
10126 (home-page "http://www.gevent.org/")
10127 (synopsis "Coroutine-based network library")
10128 (description
10129 "gevent is a coroutine-based Python networking library that uses greenlet
10130 to provide a high-level synchronous API on top of the libev event loop.")
10131 (license license:expat)
10132 (properties `((python2-variant . ,(delay python2-gevent))))))
10133
10134 (define-public python2-gevent
10135 (let ((base (package-with-python2
10136 (strip-python2-variant python-gevent))))
10137 (package
10138 (inherit base)
10139 (native-inputs `(,@(package-native-inputs python-gevent)
10140 ("python-mock" ,python2-mock))))))
10141
10142 (define-public python-fastimport
10143 (package
10144 (name "python-fastimport")
10145 (version "0.9.6")
10146 (source
10147 (origin
10148 (method url-fetch)
10149 (uri (pypi-uri "fastimport" version))
10150 (sha256
10151 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10152 (build-system python-build-system)
10153 (home-page "https://github.com/jelmer/python-fastimport")
10154 (synopsis "VCS fastimport parser and generator in Python")
10155 (description "This package provides a parser for and generator of the Git
10156 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10157 format.")
10158 (license license:gpl2+)))
10159
10160 (define-public python2-fastimport
10161 (package-with-python2 python-fastimport))
10162
10163 (define-public python-twisted
10164 (package
10165 (name "python-twisted")
10166 (version "19.7.0")
10167 (source (origin
10168 (method url-fetch)
10169 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10170 (sha256
10171 (base32
10172 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10173 (build-system python-build-system)
10174 (arguments
10175 '(#:tests? #f)) ; FIXME: some tests fail
10176 (propagated-inputs
10177 `(("python-zope-interface" ,python-zope-interface)
10178 ("python-pyhamcrest" ,python-pyhamcrest)
10179 ("python-incremental" ,python-incremental)
10180 ("python-hyperlink" ,python-hyperlink)
10181 ("python-constantly" ,python-constantly)
10182 ("python-automat" ,python-automat)))
10183 (home-page "https://twistedmatrix.com/")
10184 (synopsis "Asynchronous networking framework written in Python")
10185 (description
10186 "Twisted is an extensible framework for Python programming, with special
10187 focus on event-based network programming and multiprotocol integration.")
10188 (license license:expat)))
10189
10190 (define-public python2-twisted
10191 (package-with-python2 python-twisted))
10192
10193 (define-public python-pika
10194 (package
10195 (name "python-pika")
10196 (version "0.12.0")
10197 (source
10198 (origin
10199 (method url-fetch)
10200 (uri (pypi-uri "pika" version))
10201 (sha256
10202 (base32
10203 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10204 (build-system python-build-system)
10205 (native-inputs
10206 `(("python-pyev" ,python-pyev)
10207 ("python-tornado" ,python-tornado)
10208 ("python-twisted" ,python-twisted)))
10209 (home-page "https://pika.readthedocs.org")
10210 (synopsis "Pure Python AMQP Client Library")
10211 (description
10212 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10213 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10214 network support library.")
10215 (license license:bsd-3)))
10216
10217 (define-public python2-pika
10218 (package-with-python2 python-pika))
10219
10220 (define-public python-ply
10221 (package
10222 (name "python-ply")
10223 (version "3.10")
10224 (source
10225 (origin
10226 (method url-fetch)
10227 (uri (pypi-uri "ply" version))
10228 (sha256
10229 (base32
10230 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10231 (build-system python-build-system)
10232 (home-page "http://www.dabeaz.com/ply/")
10233 (synopsis "Python Lex & Yacc")
10234 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10235 It uses LR parsing and does extensive error checking.")
10236 (license license:bsd-3)))
10237
10238 (define-public python2-ply
10239 (package-with-python2 python-ply))
10240
10241 (define-public python-tabulate
10242 (package
10243 (name "python-tabulate")
10244 (version "0.7.7")
10245 (source (origin
10246 (method url-fetch)
10247 (uri (pypi-uri "tabulate" version))
10248 (sha256
10249 (base32
10250 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10251 (build-system python-build-system)
10252 (arguments
10253 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10254 ;; and the latest release is not tagged in the upstream repository.
10255 '(#:tests? #f))
10256 (home-page "https://bitbucket.org/astanin/python-tabulate")
10257 (synopsis "Pretty-print tabular data")
10258 (description
10259 "Tabulate is a library and command-line utility to pretty-print tabular
10260 data in Python.")
10261 (license license:expat)))
10262
10263 (define-public python2-tabulate
10264 (package-with-python2 python-tabulate))
10265
10266 (define-public python-kazoo
10267 (package
10268 (name "python-kazoo")
10269 (version "2.4.0")
10270 (source
10271 (origin
10272 (method url-fetch)
10273 (uri (pypi-uri "kazoo" version))
10274 (sha256
10275 (base32
10276 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10277 (build-system python-build-system)
10278 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10279 (propagated-inputs
10280 `(("python-six" ,python-six)))
10281 (home-page "https://kazoo.readthedocs.org")
10282 (synopsis "High-level Zookeeper client library")
10283 (description
10284 "Kazoo is a Python client library for the Apache Zookeeper distributed
10285 application service. It is designed to be easy to use and to avoid common
10286 programming errors.")
10287 (license license:asl2.0)))
10288
10289 (define-public python2-kazoo
10290 (package-with-python2 python-kazoo))
10291
10292 (define-public python-pykafka
10293 (package
10294 (name "python-pykafka")
10295 (version "2.4.0")
10296 (source (origin
10297 (method url-fetch)
10298 (uri (pypi-uri "pykafka" version))
10299 (sha256
10300 (base32
10301 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10302 (build-system python-build-system)
10303 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10304 (propagated-inputs
10305 `(("python-gevent" ,python-gevent)
10306 ("python-kazoo" ,python-kazoo)
10307 ("python-tabulate" ,python-tabulate)))
10308 (inputs
10309 `(("librdkafka" ,librdkafka)))
10310 (home-page "https://pykafka.readthedocs.io/")
10311 (synopsis "Apache Kafka client for Python")
10312 (description
10313 "PyKafka is a client for the Apache Kafka distributed messaging system.
10314 It includes Python implementations of Kafka producers and consumers, which
10315 are optionally backed by a C extension built on librdkafka.")
10316 (license license:asl2.0)))
10317
10318 (define-public python2-pykafka
10319 (package-with-python2 python-pykafka))
10320
10321 (define-public python-wcwidth
10322 (package
10323 (name "python-wcwidth")
10324 (version "0.1.8")
10325 (source (origin
10326 (method url-fetch)
10327 (uri (pypi-uri "wcwidth" version))
10328 (sha256
10329 (base32
10330 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
10331 (build-system python-build-system)
10332 (home-page "https://github.com/jquast/wcwidth")
10333 (synopsis "Measure number of terminal column cells of wide-character codes")
10334 (description "Wcwidth measures the number of terminal column cells of
10335 wide-character codes. It is useful for those implementing a terminal emulator,
10336 or programs that carefully produce output to be interpreted by one. It is a
10337 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10338 specified in POSIX.1-2001 and POSIX.1-2008.")
10339 (license license:expat)))
10340
10341 (define-public python2-wcwidth
10342 (package-with-python2 python-wcwidth))
10343
10344 (define-public python2-jsonrpclib
10345 (package
10346 (name "python2-jsonrpclib")
10347 (version "0.1.7")
10348 (source (origin
10349 (method url-fetch)
10350 (uri (pypi-uri "jsonrpclib" version))
10351 (sha256
10352 (base32
10353 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10354 (build-system python-build-system)
10355 (arguments
10356 `(#:tests? #f
10357 #:python ,python-2))
10358 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10359 (synopsis "Implementation of JSON-RPC specification for Python")
10360 (description
10361 "This library is an implementation of the JSON-RPC specification.
10362 It supports both the original 1.0 specification, as well as the
10363 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10364 etc.")
10365 (license license:asl2.0)))
10366
10367 (define-public python-chai
10368 (package
10369 (name "python-chai")
10370 (version "1.1.2")
10371 (source (origin
10372 (method url-fetch)
10373 (uri (pypi-uri "chai" version))
10374 (sha256
10375 (base32
10376 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10377 (build-system python-build-system)
10378 (home-page "https://github.com/agoragames/chai")
10379 (synopsis "Mocking framework for Python")
10380 (description
10381 "Chai provides an api for mocking, stubbing and spying your python
10382 objects, patterned after the Mocha library for Ruby.")
10383 (license license:bsd-3)))
10384
10385 (define-public python2-chai
10386 (package-with-python2 python-chai))
10387
10388 (define-public python-inflection
10389 (package
10390 (name "python-inflection")
10391 (version "0.3.1")
10392 (source
10393 (origin (method url-fetch)
10394 (uri (pypi-uri "inflection" version))
10395 (sha256
10396 (base32
10397 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10398 (build-system python-build-system)
10399 (native-inputs
10400 `(("python-pytest" ,python-pytest)))
10401 (home-page "https://github.com/jpvanhal/inflection")
10402 (synopsis "Python string transformation library")
10403 (description
10404 "Inflection is a string transformation library. It singularizes
10405 and pluralizes English words, and transforms strings from CamelCase to
10406 underscored string.")
10407 (license license:expat)))
10408
10409 (define-public python2-inflection
10410 (package-with-python2 python-inflection))
10411
10412 (define-public python-pylev
10413 (package
10414 (name "python-pylev")
10415 (version "1.3.0")
10416 (source (origin
10417 (method url-fetch)
10418 (uri (pypi-uri "pylev" version))
10419 (sha256
10420 (base32
10421 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10422 (build-system python-build-system)
10423 (home-page "https://github.com/toastdriven/pylev")
10424 (synopsis "Levenshtein distance implementation in Python")
10425 (description "Pure Python Levenshtein implementation, based off the
10426 Wikipedia code samples at
10427 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10428 (license license:bsd-3)))
10429
10430 (define-public python2-pylev
10431 (package-with-python2 python-pylev))
10432
10433 (define-public python-cleo
10434 (package
10435 (name "python-cleo")
10436 (version "0.6.8")
10437 (source (origin
10438 (method url-fetch)
10439 (uri (pypi-uri "cleo" version))
10440 (sha256
10441 (base32
10442 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
10443 (build-system python-build-system)
10444 (native-inputs
10445 `( ;; For testing
10446 ("python-mock" ,python-mock)
10447 ("python-pytest-mock" ,python-pytest-mock)
10448 ("python-pytest" ,python-pytest)))
10449 (propagated-inputs
10450 `(("python-backpack" ,python-backpack)
10451 ("python-pastel" ,python-pastel)
10452 ("python-pylev" ,python-pylev)))
10453 (home-page "https://github.com/sdispater/cleo")
10454 (synopsis "Command-line arguments library for Python")
10455 (description
10456 "Cleo allows you to create command-line commands with signature in
10457 docstring and colored output.")
10458 (license license:expat)))
10459
10460 (define-public python2-cleo
10461 (package-with-python2 python-cleo))
10462
10463 (define-public python-tomlkit
10464 (package
10465 (name "python-tomlkit")
10466 (version "0.5.7")
10467 (source
10468 (origin
10469 (method url-fetch)
10470 (uri (pypi-uri "tomlkit" version))
10471 (sha256
10472 (base32
10473 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10474 (build-system python-build-system)
10475 (native-inputs
10476 `(("python-pytest" ,python-pytest)))
10477 (home-page
10478 "https://github.com/sdispater/tomlkit")
10479 (synopsis "Style preserving TOML library")
10480 (description
10481 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10482 preserves all comments, indentations, whitespace and internal element ordering,
10483 and makes them accessible and editable via an intuitive API. It can also
10484 create new TOML documents from scratch using the provided helpers. Part of the
10485 implementation as been adapted, improved and fixed from Molten.")
10486 (license license:expat)))
10487
10488 (define-public python-shellingham
10489 (package
10490 (name "python-shellingham")
10491 (version "1.3.1")
10492 (source
10493 (origin
10494 (method url-fetch)
10495 (uri (pypi-uri "shellingham" version))
10496 (sha256
10497 (base32
10498 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10499 (build-system python-build-system)
10500 (home-page
10501 "https://github.com/sarugaku/shellingham")
10502 (synopsis "Tool to detect surrounding shell")
10503 (description
10504 "Shellingham detects what shell the current Python executable is
10505 running in.")
10506 (license license:isc)))
10507
10508 (define-public python-memcached
10509 (package
10510 (name "python-memcached")
10511 (version "1.59")
10512 (source
10513 (origin
10514 (method url-fetch)
10515 (uri (pypi-uri "python-memcached" version))
10516 (sha256
10517 (base32
10518 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10519 (build-system python-build-system)
10520 (propagated-inputs `(("python-six" ,python-six)))
10521 (home-page
10522 "https://github.com/linsomniac/python-memcached")
10523 (synopsis "Pure python memcached client")
10524 (description
10525 "This software is a pure Python interface to the memcached memory cache
10526 daemon. It is the client side software which allows storing values in one or
10527 more, possibly remote, memcached servers.")
10528 (license license:psfl)))
10529
10530 (define-public python-clikit
10531 (package
10532 (name "python-clikit")
10533 (version "0.2.4")
10534 (source
10535 (origin
10536 (method url-fetch)
10537 (uri (pypi-uri "clikit" version))
10538 (sha256
10539 (base32
10540 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10541 (build-system python-build-system)
10542 (propagated-inputs
10543 `(("python-pastel" ,python-pastel)
10544 ("python-pylev" ,python-pylev)))
10545 (home-page "https://github.com/sdispater/clikit")
10546 (synopsis "Group of utilities to build command line interfaces")
10547 (description
10548 "CliKit is a group of utilities to build testable command line
10549 interfaces.")
10550 (license license:expat)))
10551
10552 (define-public python-msgpack-python
10553 (package
10554 (name "python-msgpack-python")
10555 (version "0.5.6")
10556 (source
10557 (origin
10558 (method url-fetch)
10559 (uri (pypi-uri "msgpack-python" version))
10560 (sha256
10561 (base32
10562 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10563 (build-system python-build-system)
10564 (home-page "http://msgpack.org/")
10565 (synopsis "Package to deserialize messages in MessagePack binary format")
10566 (description
10567 "MessagePack is an efficient binary serialization format. It lets you
10568 exchange data among multiple languages like JSON. But it's faster and
10569 smaller. Small integers are encoded into a single byte, and typical short
10570 strings require only one extra byte in addition to the strings themselves.")
10571 (license license:asl2.0)))
10572
10573 (define-public python-cachy
10574 (package
10575 (name "python-cachy")
10576 (version "0.2.0")
10577 (source
10578 (origin
10579 (method url-fetch)
10580 (uri (pypi-uri "cachy" version))
10581 (sha256
10582 (base32
10583 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10584 (build-system python-build-system)
10585 (native-inputs
10586 `(("python-fakeredis" ,python-fakeredis)
10587 ("python-flexmock" ,python-flexmock)
10588 ("python-pytest" ,python-pytest)))
10589 (propagated-inputs
10590 `(("python-memcached" ,python-memcached)
10591 ("python-msgpack-python" ,python-msgpack-python)
10592 ("python-redis" ,python-redis)))
10593 (home-page "https://github.com/sdispater/cachy")
10594 (synopsis "Simple yet effective caching library")
10595 (description
10596 "Cachy provides a simple yet effective caching library. A simple but
10597 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10598 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10599 (license license:expat)))
10600
10601 (define-public poetry
10602 (package
10603 (name "poetry")
10604 (version "0.12.17")
10605 ;; Poetry can only be built from source with poetry.
10606 (source
10607 (origin
10608 (method url-fetch)
10609 (uri (pypi-uri "poetry" version))
10610 (sha256
10611 (base32
10612 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10613 (build-system python-build-system)
10614 (arguments
10615 `(#:tests? #f ;; Pypi does not have tests.
10616 #:phases
10617 (modify-phases %standard-phases
10618 (replace 'build
10619 (lambda _
10620 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10621 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10622 "setup.py")
10623 #t)))))
10624 (propagated-inputs
10625 `(("python-cachecontrol" ,python-cachecontrol)
10626 ("python-cachy" ,python-cachy)
10627 ("python-cleo" ,python-cleo)
10628 ("python-glob2" ,python-glob2)
10629 ("python-html5lib" ,python-html5lib)
10630 ("python-jsonschema" ,python-jsonschema)
10631 ("python-msgpack" ,python-msgpack)
10632 ("python-pkginfo" ,python-pkginfo)
10633 ("python-pyparsing" ,python-pyparsing)
10634 ("python-pyrsistent" ,python-pyrsistent)
10635 ("python-requests" ,python-requests)
10636 ("python-requests-toolbelt" ,python-requests-toolbelt)
10637 ("python-shellingham" ,python-shellingham)
10638 ("python-tomlkit" ,python-tomlkit)
10639 ("python-virtualenv" ,python-virtualenv)))
10640 (home-page "https://poetry.eustace.io/")
10641 (synopsis "Python dependency management and packaging made easy")
10642 (description "Poetry is a tool for dependency management and packaging
10643 in Python. It allows you to declare the libraries your project depends on and
10644 it will manage (install/update) them for you.")
10645 (license license:expat)))
10646
10647 (define-public python-lazy-object-proxy
10648 (package
10649 (name "python-lazy-object-proxy")
10650 (version "1.4.3")
10651 (source (origin
10652 (method url-fetch)
10653 (uri (pypi-uri "lazy-object-proxy" version))
10654 (sha256
10655 (base32
10656 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10657 (native-inputs
10658 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10659 (build-system python-build-system)
10660 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10661 (synopsis "Lazy object proxy for python")
10662 (description
10663 "Lazy object proxy is an object that wraps a callable but defers the call
10664 until the object is actually required, and caches the result of said call.")
10665 (license license:bsd-2)))
10666
10667 (define-public python2-lazy-object-proxy
10668 (package-with-python2 python-lazy-object-proxy))
10669
10670 (define-public python-dnspython
10671 (package
10672 (name "python-dnspython")
10673 (version "1.15.0")
10674 (source (origin
10675 (method url-fetch)
10676 (uri (string-append "http://www.dnspython.org/kits/"
10677 version "/dnspython-" version ".tar.gz"))
10678 (sha256
10679 (base32
10680 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10681 (build-system python-build-system)
10682 (arguments '(#:tests? #f)) ; XXX: requires internet access
10683 (home-page "http://www.dnspython.org")
10684 (synopsis "DNS toolkit for Python")
10685 (description
10686 "dnspython is a DNS toolkit for Python. It supports almost all record
10687 types. It can be used for queries, zone transfers, and dynamic updates.
10688 It supports TSIG authenticated messages and EDNS0.")
10689 (license license:expat)))
10690
10691 (define-public python2-dnspython
10692 (package-with-python2 python-dnspython))
10693
10694 (define-public python-email-validator
10695 (package
10696 (name "python-email-validator")
10697 (version "1.0.2")
10698 (source
10699 (origin (method url-fetch)
10700 (uri (pypi-uri "email_validator" version))
10701 (sha256
10702 (base32
10703 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10704 (build-system python-build-system)
10705 (arguments
10706 '(#:phases
10707 (modify-phases %standard-phases
10708 (add-before 'build 'use-dnspython
10709 (lambda _
10710 (substitute* "setup.py"
10711 (("dnspython3") "dnspython"))
10712 #t)))))
10713 (propagated-inputs
10714 `(("python-dnspython" ,python-dnspython)
10715 ("python-idna" ,python-idna)))
10716 (home-page "https://github.com/JoshData/python-email-validator")
10717 (synopsis "Email address validation library for Python")
10718 (description
10719 "This library validates email address syntax and deliverability.")
10720 (license license:cc0)))
10721
10722 (define-public python2-email-validator
10723 (package-with-python2 python-email-validator))
10724
10725 (define-public python-ukpostcodeparser
10726 (package
10727 (name "python-ukpostcodeparser")
10728 (version "1.0.3")
10729 (source (origin
10730 (method url-fetch)
10731 (uri (pypi-uri "UkPostcodeParser" version))
10732 (sha256
10733 (base32
10734 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10735 (build-system python-build-system)
10736 (home-page "https://github.com/hamstah/ukpostcodeparser")
10737 (synopsis "UK Postcode parser for Python")
10738 (description
10739 "This library provides the @code{parse_uk_postcode} function for
10740 parsing UK postcodes.")
10741 (license license:expat)))
10742
10743 (define-public python2-ukpostcodeparser
10744 (package-with-python2 python-ukpostcodeparser))
10745
10746 (define-public python-faker
10747 (package
10748 (name "python-faker")
10749 (version "0.7.9")
10750 (source (origin
10751 (method url-fetch)
10752 (uri (pypi-uri "Faker" version))
10753 (sha256
10754 (base32
10755 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10756 (patches
10757 (search-patches "python-faker-fix-build-32bit.patch"))
10758 (modules '((guix build utils)))
10759 (snippet
10760 '(begin
10761 (for-each delete-file (find-files "." "\\.pyc$"))
10762 #t))))
10763 (build-system python-build-system)
10764 (arguments
10765 '(#:phases
10766 (modify-phases %standard-phases
10767 (replace 'check
10768 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10769 (native-inputs
10770 `(;; For testing
10771 ("python-email-validator" ,python-email-validator)
10772 ("python-mock" ,python-mock)
10773 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10774 (propagated-inputs
10775 `(("python-dateutil" ,python-dateutil)
10776 ("python-six" ,python-six)))
10777 (home-page "https://github.com/joke2k/faker")
10778 (synopsis "Python package that generates fake data")
10779 (description
10780 "Faker is a Python package that generates fake data such as names,
10781 addresses, and phone numbers.")
10782 (license license:expat)
10783 (properties `((python2-variant . ,(delay python2-faker))))))
10784
10785 (define-public python2-faker
10786 (let ((base (package-with-python2 (strip-python2-variant
10787 python-faker))))
10788 (package
10789 (inherit base)
10790 (propagated-inputs
10791 `(("python2-ipaddress" ,python2-ipaddress)
10792 ,@(package-propagated-inputs base))))))
10793
10794 (define-public python-pyaml
10795 (package
10796 (name "python-pyaml")
10797 (version "18.11.0")
10798 (source (origin
10799 (method url-fetch)
10800 (uri (pypi-uri "pyaml" version))
10801 (sha256
10802 (base32
10803 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10804 (build-system python-build-system)
10805 (native-inputs
10806 `(("python-unidecode" ,python-unidecode)))
10807 (propagated-inputs
10808 `(("python-pyyaml" ,python-pyyaml)))
10809 (home-page "https://github.com/mk-fg/pretty-yaml")
10810 (synopsis "YAML pretty-print library for Python")
10811 (description
10812 "pyaml is a PyYAML based python module to produce pretty and readable
10813 YAML-serialized data.")
10814 (license license:wtfpl2)))
10815
10816 (define-public python2-pyaml
10817 (package-with-python2 python-pyaml))
10818
10819 (define-public python-backpack
10820 (package
10821 (name "python-backpack")
10822 (version "0.1")
10823 (source
10824 (origin
10825 (method url-fetch)
10826 (uri (pypi-uri "backpack" version))
10827 (sha256
10828 (base32
10829 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10830 (build-system python-build-system)
10831 (native-inputs
10832 `(("python-pytest" ,python-pytest)
10833 ("python-nose" ,python-nose)))
10834 (propagated-inputs
10835 `(("python-simplejson" ,python-simplejson)))
10836 (home-page "https://github.com/sdispater/backpack")
10837 (synopsis "Utilities for working with Python collections")
10838 (description "Backpack provides some useful utilities for working with
10839 collections of data.")
10840 (license license:expat)))
10841
10842 (define-public python2-backpack
10843 (package-with-python2 python-backpack))
10844
10845 (define-public python-prompt-toolkit
10846 (package
10847 (name "python-prompt-toolkit")
10848 (version "2.0.7")
10849 (source
10850 (origin
10851 (method url-fetch)
10852 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10853 (sha256
10854 (base32
10855 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10856 (build-system python-build-system)
10857 (arguments
10858 `(#:phases
10859 (modify-phases %standard-phases
10860 (delete 'check)
10861 (add-after 'install 'post-install-check
10862 (lambda* (#:key inputs outputs #:allow-other-keys)
10863 ;; HOME is needed for the test
10864 ;; "test_pathcompleter_can_expanduser".
10865 (setenv "HOME" "/tmp")
10866 (add-installed-pythonpath inputs outputs)
10867 (invoke "py.test"))))))
10868 (propagated-inputs
10869 `(("python-wcwidth" ,python-wcwidth)
10870 ("python-six" ,python-six)
10871 ("python-pygments" ,python-pygments)))
10872 (native-inputs
10873 `(("python-pytest" ,python-pytest)))
10874 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10875 (synopsis "Library for building command line interfaces in Python")
10876 (description
10877 "Prompt-Toolkit is a library for building interactive command line
10878 interfaces in Python. It's like GNU Readline but it also features syntax
10879 highlighting while typing, out-of-the-box multi-line input editing, advanced
10880 code completion, incremental search, support for Chinese double-width
10881 characters, mouse support, and auto suggestions.")
10882 (license license:bsd-3)))
10883
10884 (define-public python2-prompt-toolkit
10885 (package-with-python2 python-prompt-toolkit))
10886
10887 (define-public python-prompt-toolkit-1
10888 (package (inherit python-prompt-toolkit)
10889 (version "1.0.15")
10890 (source
10891 (origin
10892 (method url-fetch)
10893 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10894 (sha256
10895 (base32
10896 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10897
10898 (define-public python2-prompt-toolkit-1
10899 (package-with-python2 python-prompt-toolkit-1))
10900
10901 (define-public python-jedi
10902 (package
10903 (name "python-jedi")
10904 (version "0.15.1")
10905 (source
10906 (origin
10907 (method url-fetch)
10908 (uri (pypi-uri "jedi" version))
10909 (sha256
10910 (base32
10911 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10912 (build-system python-build-system)
10913 (arguments
10914 `(#:phases
10915 (modify-phases %standard-phases
10916 (add-after 'unpack 'disable-file-completion-test
10917 ;; A single parameterized test currently fail (see:
10918 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10919 (lambda _
10920 (substitute* "test/test_api/test_completion.py"
10921 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10922 #t))
10923 (replace 'check
10924 (lambda _
10925 (setenv "HOME" "/tmp")
10926 (invoke "python" "-m" "pytest"))))))
10927 (native-inputs
10928 `(("python-pytest" ,python-pytest)
10929 ("python-docopt" ,python-docopt)))
10930 (propagated-inputs
10931 `(("python-parso" ,python-parso)))
10932 (home-page "https://github.com/davidhalter/jedi")
10933 (synopsis "Autocompletion and static analysis library for Python")
10934 (description
10935 "Jedi is a static analysis tool for Python that can be used in Integrated
10936 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10937 on a deeper level than many other static analysis frameworks for Python.
10938
10939 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10940 well.")
10941 (license license:expat)))
10942
10943 (define-public python2-jedi
10944 (package-with-python2 python-jedi))
10945
10946 (define-public ptpython
10947 (package
10948 (name "ptpython")
10949 (version "0.34")
10950 (source (origin
10951 (method url-fetch)
10952 (uri (pypi-uri "ptpython" version))
10953 (sha256
10954 (base32
10955 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10956 (build-system python-build-system)
10957 (arguments
10958 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10959 (propagated-inputs
10960 `(("python-docopt" ,python-docopt)
10961 ("python-jedi" ,python-jedi)
10962 ("python-prompt-toolkit" ,python-prompt-toolkit)
10963 ("python-pygments" ,python-pygments)))
10964 (home-page "https://github.com/jonathanslenders/ptpython")
10965 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10966 (description
10967 "ptpython is a Python read-eval-print loop with IDE-like features.
10968 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10969 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10970 etc.")
10971 (license license:bsd-3)
10972 (properties `((python2-variant . ,(delay ptpython-2))))))
10973
10974 (define-public ptpython-2
10975 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10976 (package
10977 (inherit base)
10978 (name "ptpython2"))))
10979
10980 (define-public python-stem
10981 (package
10982 (name "python-stem")
10983 (version "1.7.1")
10984 (source
10985 (origin
10986 (method url-fetch)
10987 (uri (pypi-uri "stem" version))
10988 (sha256
10989 (base32
10990 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10991 (build-system python-build-system)
10992 (arguments
10993 `(#:phases
10994 (modify-phases %standard-phases
10995 (replace 'check
10996 (lambda _
10997 (invoke "./run_tests.py" "--unit")
10998 #t)))))
10999 (native-inputs
11000 `(("python-mock" ,python-mock)
11001 ("python-pycodestyle" ,python-pycodestyle)
11002 ("python-pyflakes" ,python-pyflakes)))
11003 (home-page "https://stem.torproject.org/")
11004 (synopsis
11005 "Python controller library that allows applications to interact with Tor")
11006 (description
11007 "Stem is a Python controller library for Tor. With it you can use Tor's
11008 control protocol to script against the Tor process and read descriptor data
11009 relays publish about themselves.")
11010 (license license:lgpl3)))
11011
11012 (define-public python2-stem
11013 (package-with-python2 python-stem))
11014
11015 (define-public python-pyserial
11016 (package
11017 (name "python-pyserial")
11018 (version "3.4")
11019 (source
11020 (origin
11021 (method url-fetch)
11022 (uri (pypi-uri "pyserial" version))
11023 (sha256
11024 (base32
11025 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
11026 (build-system python-build-system)
11027 (arguments
11028 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11029 ;; #:phases
11030 ;; (modify-phases %standard-phases
11031 ;; (replace 'check
11032 ;; (lambda _
11033 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11034 (home-page
11035 "https://github.com/pyserial/pyserial")
11036 (synopsis "Python Serial Port Bindings")
11037 (description "@code{pyserial} provide serial port bindings for Python. It
11038 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11039 and/or Xon/Xoff. The port is accessed in RAW mode.")
11040 (license license:bsd-3)))
11041
11042 (define-public python2-pyserial
11043 (package-with-python2 python-pyserial))
11044
11045 (define-public python-kivy
11046 (package
11047 (name "python-kivy")
11048 (version "1.10.1")
11049 (source
11050 (origin
11051 (method url-fetch)
11052 (uri (pypi-uri "Kivy" version))
11053 (file-name (string-append name "-" version ".tar.gz"))
11054 (sha256
11055 (base32
11056 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11057 (build-system python-build-system)
11058 (arguments
11059 `(#:tests? #f ; Tests require many optional packages
11060 #:phases
11061 (modify-phases %standard-phases
11062 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11063 (lambda* (#:key inputs #:allow-other-keys)
11064 (setenv "KIVY_SDL2_PATH"
11065 (string-append (assoc-ref inputs "sdl-union")
11066 "/include/SDL2"))
11067 #t)))))
11068 (native-inputs
11069 `(("git" ,git)
11070 ("pkg-config" ,pkg-config)
11071 ("python-cython" ,python-cython)))
11072 (inputs
11073 `(("gstreamer" ,gstreamer)
11074 ("mesa" ,mesa)
11075 ("sdl-union"
11076 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11077 (home-page "http://kivy.org")
11078 (synopsis
11079 "Multitouch application framework")
11080 (description
11081 "A software library for rapid development of
11082 hardware-accelerated multitouch applications.")
11083 (license license:expat)))
11084
11085 (define-public python2-kivy
11086 (package-with-python2 python-kivy))
11087
11088 (define-public python-kivy-next
11089 (deprecated-package "python-kivy-next" python-kivy))
11090
11091 (define-public python2-kivy-next
11092 (deprecated-package "python2-kivy-next" python2-kivy))
11093
11094 (define-public python-binaryornot
11095 (package
11096 (name "python-binaryornot")
11097 (version "0.4.4")
11098 (source (origin
11099 (method url-fetch)
11100 (uri (pypi-uri "binaryornot" version))
11101 (sha256
11102 (base32
11103 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11104 (build-system python-build-system)
11105 (arguments
11106 `(#:phases
11107 (modify-phases %standard-phases
11108 (add-after 'unpack 'patch-tests
11109 (lambda _
11110 ;; TypeError: binary() got an unexpected keyword argument
11111 ;; 'average_size'.
11112 (substitute* "tests/test_check.py"
11113 (("average_size=512") ""))
11114 #t)))))
11115 (propagated-inputs
11116 `(("python-chardet" ,python-chardet)
11117 ("python-hypothesis" ,python-hypothesis)))
11118 (home-page "https://github.com/audreyr/binaryornot")
11119 (synopsis "Package to check if a file is binary or text")
11120 (description "Ultra-lightweight pure Python package to check if a file is
11121 binary or text.")
11122 (license license:bsd-3)
11123 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11124
11125 (define-public python2-binaryornot
11126 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11127 (package (inherit base)
11128 (propagated-inputs
11129 `(("python2-enum34" ,python2-enum34)
11130 ,@(package-propagated-inputs base))))))
11131
11132 (define-public python-binwalk
11133 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11134 (revision "0"))
11135 (package
11136 (name "python-binwalk")
11137 (version (git-version "2.1.1" revision commit))
11138 (source
11139 (origin
11140 (method git-fetch)
11141 (uri (git-reference
11142 (url "https://github.com/ReFirmLabs/binwalk")
11143 (commit commit)))
11144 (file-name (git-file-name name version))
11145 (sha256
11146 (base32
11147 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11148 (build-system python-build-system)
11149 (arguments
11150 `(#:phases
11151 (modify-phases %standard-phases
11152 (add-before 'check 'set-pythonpath
11153 (lambda _
11154 (setenv "PYTHONPATH"
11155 (string-append
11156 (getcwd) "/src/"
11157 ":" (getenv "PYTHONPATH")))
11158 (setenv "HOME" "")
11159 #t)))))
11160 (native-inputs
11161 `(("python-coverage" ,python-coverage)
11162 ("python-nose" ,python-nose)))
11163 (home-page "https://github.com/ReFirmLabs/binwalk")
11164 (synopsis "Firmware analysis tool")
11165 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11166 (license license:expat))))
11167
11168 (define-public python-nltk
11169 (package
11170 (name "python-nltk")
11171 (version "3.2.1")
11172 (source (origin
11173 (method url-fetch)
11174 (uri (pypi-uri "nltk" version))
11175 (sha256
11176 (base32
11177 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11178 (build-system python-build-system)
11179 (arguments
11180 '(;; The tests require some extra resources to be downloaded.
11181 ;; TODO Try packaging these resources.
11182 #:tests? #f))
11183 (home-page "http://nltk.org/")
11184 (synopsis "Natural Language Toolkit")
11185 (description "It provides interfaces to over 50 corpora and lexical
11186 resources such as WordNet, along with a suite of text processing libraries
11187 for classification, tokenization, stemming, tagging, parsing, and semantic
11188 reasoning, wrappers for natural language processing libraries.")
11189 (license license:asl2.0)))
11190
11191 (define-public python2-nltk
11192 (package-with-python2 python-nltk))
11193
11194 (define-public python-pymongo
11195 (package
11196 (name "python-pymongo")
11197 (version "3.7.2")
11198 (source (origin
11199 (method url-fetch)
11200 (uri (pypi-uri "pymongo" version))
11201 (sha256
11202 (base32
11203 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11204 (build-system python-build-system)
11205 (propagated-inputs
11206 `(("python-certifi" ,python-certifi)))
11207 (home-page "https://github.com/mongodb/mongo-python-driver")
11208 (synopsis "Python driver for MongoDB")
11209 (description "Python driver for MongoDB.")
11210 (license license:asl2.0)))
11211
11212 (define-public python2-pymongo
11213 (package-with-python2 python-pymongo))
11214
11215 (define-public python-consul
11216 (package
11217 (name "python-consul")
11218 (version "0.6.1")
11219 (source
11220 (origin
11221 (method url-fetch)
11222 (uri (pypi-uri "python-consul" version))
11223 (sha256
11224 (base32
11225 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11226 (build-system python-build-system)
11227 (arguments
11228 '(#:tests? #f)) ; The tests are not distributed
11229 (propagated-inputs
11230 `(("python-requests" ,python-requests)
11231 ("python-six" ,python-six)))
11232 (home-page "https://github.com/cablehead/python-consul")
11233 (synopsis "Python client for Consul")
11234 (description
11235 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11236 discovery, monitoring and configuration.")
11237 (license license:expat)))
11238
11239 (define-public python2-consul
11240 (package-with-python2 python-consul))
11241
11242 (define-public python-schematics
11243 (package
11244 (name "python-schematics")
11245 (version "1.1.1")
11246 (source
11247 (origin
11248 (method git-fetch)
11249 (uri (git-reference
11250 (url "https://github.com/schematics/schematics.git")
11251 (commit (string-append "v" version))))
11252 (file-name (git-file-name name version))
11253 (sha256
11254 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11255 (build-system python-build-system)
11256 (propagated-inputs
11257 `(("python-six" ,python-six)))
11258 (arguments
11259 ;; The tests require a bunch of not very nice packages with fixed
11260 ;; version requirements (e.g. python-coveralls).
11261 `(#:tests? #f))
11262 (home-page "https://github.com/schematics/schematics")
11263 (synopsis "Python Data Structures for Humans")
11264 (description "Python Data Structures for Humans.")
11265 (license license:bsd-3)))
11266
11267 (define-public python2-schematics
11268 (package-with-python2 python-schematics))
11269
11270 (define-public python-odfpy
11271 (package
11272 (name "python-odfpy")
11273 (version "1.3.3")
11274 (source (origin
11275 (method url-fetch)
11276 (uri (pypi-uri "odfpy" version))
11277 (sha256
11278 (base32
11279 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11280 (arguments
11281 `(#:modules ((srfi srfi-1)
11282 (guix build python-build-system)
11283 (guix build utils))
11284 #:phases
11285 (modify-phases %standard-phases
11286 (replace 'check
11287 ;; The test runner invokes python2 and python3 for test*.py.
11288 ;; To avoid having both in inputs, we replicate it here.
11289 (lambda _
11290 (for-each (lambda (test-file) (invoke "python" test-file))
11291 (find-files "tests" "^test.*\\.py$"))
11292 #t)))))
11293 (build-system python-build-system)
11294 (home-page "https://github.com/eea/odfpy")
11295 (synopsis "Python API and tools to manipulate OpenDocument files")
11296 (description "Collection of libraries and utility programs written in
11297 Python to manipulate OpenDocument 1.2 files.")
11298 (license
11299 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11300 ;; number of files with other licenses.
11301 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11302
11303 (define-public python2-odfpy
11304 (package-with-python2 python-odfpy))
11305
11306 (define-public python-natsort
11307 (package
11308 (name "python-natsort")
11309 (version "5.4.1")
11310 (source (origin
11311 (method url-fetch)
11312 (uri (pypi-uri "natsort" version))
11313 (sha256
11314 (base32
11315 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11316 (build-system python-build-system)
11317 (arguments
11318 `(#:modules ((guix build utils)
11319 (guix build python-build-system)
11320 (srfi srfi-1)
11321 (srfi srfi-26)
11322 (ice-9 ftw))
11323 #:phases
11324 (modify-phases %standard-phases
11325 (add-before 'check 'set-cachedir
11326 ;; Tests require write access to $HOME by default
11327 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11328 (replace 'check
11329 (lambda _
11330 (let ((cwd (getcwd)))
11331 (setenv "PYTHONPATH"
11332 (string-append
11333 cwd "/build/"
11334 (find (cut string-prefix? "lib" <>)
11335 (scandir (string-append cwd "/build")))
11336 ":"
11337 (getenv "PYTHONPATH")))
11338 (invoke "pytest" "-v")))))))
11339 (native-inputs
11340 `(("python-hypothesis" ,python-hypothesis)
11341 ("python-pytest-cov" ,python-pytest-cov)
11342 ("python-pytest-mock" ,python-pytest-mock)
11343 ("python-pytest" ,python-pytest)))
11344 (propagated-inputs ; TODO: Add python-fastnumbers.
11345 `(("python-pyicu" ,python-pyicu)))
11346 (home-page "https://github.com/SethMMorton/natsort")
11347 (synopsis "Natural sorting for python and shell")
11348 (description
11349 "Natsort lets you apply natural sorting on lists instead of
11350 lexicographical. If you use the built-in @code{sorted} method in python
11351 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11352 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11353 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11354 identifies numbers and sorts them separately from strings. It can also sort
11355 version numbers, real numbers, mixed types and more, and comes with a shell
11356 command @command{natsort} that exposes this functionality in the command line.")
11357 (license license:expat)
11358 (properties `((python2-variant . ,(delay python2-natsort))))))
11359
11360 (define-public python2-natsort
11361 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11362 (package (inherit base)
11363 (native-inputs
11364 `(("python2-pathlib" ,python2-pathlib)
11365 ,@(package-native-inputs base))))))
11366
11367 (define-public python-glances
11368 (package
11369 (name "python-glances")
11370 (version "3.1.2")
11371 (source
11372 (origin
11373 (method url-fetch)
11374 (uri (pypi-uri "Glances" version))
11375 (sha256
11376 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
11377 (modules '((guix build utils)))
11378 (snippet
11379 '(begin
11380 ;; Glances phones PyPI for weekly update checks by default.
11381 ;; Disable these. The user can re-enable them if desired.
11382 (substitute* "glances/outdated.py"
11383 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11384 (string-append indentation
11385 "self.args.disable_check_update = True\n"
11386 line)))
11387 #t))))
11388 (build-system python-build-system)
11389 (propagated-inputs
11390 `(("python-future" ,python-future)
11391 ("python-psutil" ,python-psutil)))
11392 (home-page "https://github.com/nicolargo/glances")
11393 (synopsis "Cross-platform curses-based monitoring tool")
11394 (description
11395 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11396 Glances uses the PsUtil library to get information from your system. It
11397 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11398 (license license:lgpl3+)))
11399
11400 (define-public python2-glances
11401 (package-with-python2 python-glances))
11402
11403 (define-public python-graphql-core
11404 (package
11405 (name "python-graphql-core")
11406 (version "0.5.3")
11407 (source
11408 (origin
11409 (method url-fetch)
11410 (uri (pypi-uri "graphql-core" version))
11411 (sha256
11412 (base32
11413 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11414 (build-system python-build-system)
11415 (arguments
11416 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11417 #:phases
11418 (modify-phases %standard-phases
11419 (add-after 'unpack 'patch-hardcoded-version
11420 (lambda _ (substitute*
11421 "setup.py"
11422 (("'gevent==1.1rc1'") "'gevent'"))
11423 #t)))))
11424 (native-inputs
11425 `(("python-gevent" ,python-gevent)
11426 ("python-mock" ,python-mock)
11427 ("python-pytest-mock" ,python-pytest-mock)))
11428 (propagated-inputs
11429 `(("python-promise" ,python-promise)
11430 ("python-six" ,python-six)))
11431 (home-page "https://github.com/graphql-python/graphql-core")
11432 (synopsis "GraphQL implementation for Python")
11433 (description
11434 "GraphQL implementation for Python. GraphQL is a data query language and
11435 runtime designed and used to request and deliver data to mobile and web apps.
11436 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11437 to Python.")
11438 (license license:expat)))
11439
11440 (define-public python2-graphql-core
11441 (package-with-python2 python-graphql-core))
11442
11443 (define-public python-graphql-relay
11444 (package
11445 (name "python-graphql-relay")
11446 (version "0.4.5")
11447 (source
11448 (origin
11449 (method url-fetch)
11450 (uri (pypi-uri "graphql-relay" version))
11451 (sha256
11452 (base32
11453 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11454 (build-system python-build-system)
11455 (arguments
11456 '(#:tests? #f)) ; The tests are not distributed
11457 (propagated-inputs
11458 `(("python-graphql-core" ,python-graphql-core)
11459 ("python-promise" ,python-promise)
11460 ("python-six" ,python-six)))
11461 (home-page "https://github.com/graphql-python/graphql-relay-py")
11462 (synopsis "Relay implementation for Python")
11463 (description
11464 "This is a library to allow the easy creation of Relay-compliant servers
11465 using the GraphQL Python reference implementation of a GraphQL server. It
11466 should be noted that the code is a exact port of the original
11467 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11468 from Facebook.")
11469 (license license:expat)))
11470
11471 (define-public python2-graphql-relay
11472 (package-with-python2 python-graphql-relay))
11473
11474 (define-public python-graphene
11475 (package
11476 (name "python-graphene")
11477 (version "0.10.2")
11478 (source
11479 (origin
11480 (method url-fetch)
11481 (uri (pypi-uri "graphene" version))
11482 (sha256
11483 (base32
11484 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11485 (build-system python-build-system)
11486 (propagated-inputs
11487 `(("python-graphql-core" ,python-graphql-core)
11488 ("python-graphql-relay" ,python-graphql-relay)
11489 ("python-iso8601" ,python-iso8601)
11490 ("python-promise" ,python-promise)
11491 ("python-six" ,python-six)))
11492 (arguments
11493 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11494 (home-page "http://graphene-python.org/")
11495 (synopsis "GraphQL Framework for Python")
11496 (description
11497 "Graphene is a Python library for building GraphQL schemas/types.
11498 A GraphQL schema describes your data model, and provides a GraphQL server
11499 with an associated set of resolve methods that know how to fetch data.")
11500 (properties `((python2-variant . ,(delay python2-graphene))))
11501 (license license:expat)))
11502
11503 (define-public python2-graphene
11504 (let ((base (package-with-python2
11505 (strip-python2-variant python-graphene))))
11506 (package (inherit base)
11507 (native-inputs
11508 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11509 ,@(package-native-inputs base))))))
11510
11511 (define-public python-nautilus
11512 (package
11513 (name "python-nautilus")
11514 (version "0.4.9")
11515 (source
11516 (origin
11517 (method url-fetch)
11518 (uri (pypi-uri "nautilus" version))
11519 (sha256
11520 (base32
11521 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11522 (build-system python-build-system)
11523 (arguments `(#:tests? #f)) ; fails to import test modules
11524 (propagated-inputs
11525 `(("python-bcrypt" ,python-bcrypt)
11526 ("python-click" ,python-click)
11527 ("python-consul" ,python-consul)
11528 ("python-graphene" ,python-graphene)
11529 ("python-jinja2" ,python-jinja2)
11530 ("python-peewee" ,python-peewee)
11531 ("python-pika" ,python-pika)
11532 ("python-tornado" ,python-tornado)
11533 ("python-wtforms" ,python-wtforms)))
11534 (native-inputs
11535 `(("python-nose2" ,python-nose2)))
11536 (home-page "https://github.com/AlecAivazis/nautilus")
11537 (synopsis "Library for creating microservice applications")
11538 (description
11539 "Nautilus is a framework for flux based microservices that looks to
11540 provide extendible implementations of common aspects of a cloud so that you can
11541 focus on building massively scalable web applications.")
11542 (license license:expat)))
11543
11544 (define-public python-snowballstemmer
11545 (package
11546 (name "python-snowballstemmer")
11547 (version "1.2.1")
11548 (source (origin
11549 (method url-fetch)
11550 (uri (pypi-uri "snowballstemmer" version))
11551 (sha256
11552 (base32
11553 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11554 (build-system python-build-system)
11555 (arguments
11556 `(;; No tests exist
11557 #:tests? #f))
11558 (home-page "https://github.com/shibukawa/snowball_py")
11559 (synopsis "Snowball stemming library collection for Python")
11560 (description "This package provides 16 word stemmer algorithms generated
11561 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11562 English stemmer.")
11563 (license license:bsd-3)))
11564
11565 (define-public python2-snowballstemmer
11566 (package-with-python2 python-snowballstemmer))
11567
11568 (define-public python-setproctitle
11569 (package
11570 (name "python-setproctitle")
11571 (version "1.1.10")
11572 (source
11573 (origin
11574 (method url-fetch)
11575 (uri (pypi-uri "setproctitle" version))
11576 (sha256
11577 (base32
11578 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11579 (build-system python-build-system)
11580 (arguments
11581 '(#:phases
11582 (modify-phases %standard-phases
11583 (add-before 'check 'patch-Makefile
11584 ;; Stricly this is only required for the python2 variant.
11585 ;; But adding a phase in an inherited package seems to be
11586 ;; cumbersum. So we patch even for python3.
11587 (lambda _
11588 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11589 (when nose
11590 (substitute* "Makefile"
11591 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11592 (string-append nose "/bin/nosetests "))))
11593 #t)))
11594 (replace 'check
11595 (lambda _
11596 (setenv "PYTHON" (or (which "python3") (which "python")))
11597 (setenv "PYCONFIG" (or (which "python3-config")
11598 (which "python-config")))
11599 (setenv "CC" "gcc")
11600 ;; No need to extend PYTHONPATH to find the built package, since
11601 ;; the Makefile will build anyway
11602 (invoke "make" "check"))))))
11603 (native-inputs
11604 `(("procps" ,procps))) ; required for tests
11605 (home-page
11606 "https://github.com/dvarrazzo/py-setproctitle")
11607 (synopsis
11608 "Setproctitle implementation for Python to customize the process title")
11609 (description "The library allows a process to change its title (as displayed
11610 by system tools such as ps and top).
11611
11612 Changing the title is mostly useful in multi-process systems, for
11613 example when a master process is forked: changing the children's title
11614 allows to identify the task each process is busy with. The technique
11615 is used by PostgreSQL and the OpenSSH Server for example.")
11616 (license license:bsd-3)
11617 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11618
11619 (define-public python2-setproctitle
11620 (let ((base (package-with-python2
11621 (strip-python2-variant python-setproctitle))))
11622 (package
11623 (inherit base)
11624 (native-inputs `(("python2-nose" ,python2-nose)
11625 ,@(package-native-inputs base))))))
11626
11627 (define-public python-validictory
11628 (package
11629 (name "python-validictory")
11630 (version "1.0.1")
11631 (source
11632 (origin
11633 (method url-fetch)
11634 (uri (pypi-uri "validictory" version))
11635 (sha256
11636 (base32
11637 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11638 (build-system python-build-system)
11639 (arguments
11640 '(#:phases
11641 (modify-phases %standard-phases
11642 (add-after 'unpack 'bootstrap
11643 ;; Move the tests out of the package directory to avoid
11644 ;; packaging them.
11645 (lambda* _
11646 (rename-file "validictory/tests" "tests")
11647 (delete-file "tests/__init__.py")))
11648 (replace 'check
11649 (lambda _
11650 ;; Extend PYTHONPATH so the built package will be found.
11651 (setenv "PYTHONPATH"
11652 (string-append (getcwd) "/build/lib:"
11653 (getenv "PYTHONPATH")))
11654 (invoke "py.test" "-vv" ))))))
11655 (native-inputs
11656 `(("python-pytest" ,python-pytest)))
11657 (home-page
11658 "https://github.com/jamesturk/validictory")
11659 (synopsis "General purpose Python data validator")
11660 (description "It allows validation of arbitrary Python data structures.
11661
11662 The schema format is based on the JSON Schema
11663 proposal (http://json-schema.org), so combined with json the library is also
11664 useful as a validator for JSON data.")
11665 (license license:expat)))
11666
11667 (define-public python2-validictory
11668 (package-with-python2 python-validictory))
11669
11670 (define-public python-pyelftools
11671 (package
11672 (name "python-pyelftools")
11673 (version "0.25")
11674 (source
11675 (origin
11676 (method url-fetch)
11677 (uri (pypi-uri "pyelftools" version))
11678 (sha256
11679 (base32
11680 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11681 (build-system python-build-system)
11682 (arguments
11683 `(#:phases
11684 (modify-phases %standard-phases
11685 (add-before 'check 'set-pythonpath
11686 (lambda _
11687 (setenv "PYTHONPATH"
11688 (string-append
11689 (getcwd) "/test/"
11690 ":" (getenv "PYTHONPATH")))
11691 #t)))))
11692 (home-page
11693 "https://github.com/eliben/pyelftools")
11694 (synopsis
11695 "Analyze binary and library file information")
11696 (description "This Python library provides interfaces for parsing and
11697 analyzing two binary and library file formats; the Executable and Linking
11698 Format (ELF), and debugging information in the Debugging With Attributed
11699 Record Format (DWARF).")
11700 (license license:public-domain)))
11701
11702 (define-public python-pyev
11703 (package
11704 (name "python-pyev")
11705 (version "0.9.0")
11706 (source
11707 (origin
11708 (method url-fetch)
11709 (uri (pypi-uri "pyev" version))
11710 (sha256
11711 (base32
11712 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11713 (build-system python-build-system)
11714 (arguments
11715 `(#:tests? #f ; no test suite
11716 #:phases
11717 (modify-phases %standard-phases
11718 (add-after 'unpack 'patch
11719 (lambda* (#:key inputs #:allow-other-keys)
11720 (let ((libev (string-append (assoc-ref inputs "libev")
11721 "/lib/libev.so.4")))
11722 (substitute* "setup.py"
11723 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11724 (string-append "libev_dll_name = \"" libev "\"")))))))))
11725 (inputs
11726 `(("libev" ,libev)))
11727 (home-page "http://pythonhosted.org/pyev/")
11728 (synopsis "Python libev interface")
11729 (description "Pyev provides a Python interface to libev.")
11730 (license license:gpl3)))
11731
11732 (define-public python2-pyev
11733 (package-with-python2 python-pyev))
11734
11735 (define-public python-imagesize
11736 (package
11737 (name "python-imagesize")
11738 (version "1.1.0")
11739 (source
11740 (origin
11741 (method url-fetch)
11742 (uri (pypi-uri "imagesize" version))
11743 (sha256
11744 (base32
11745 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11746 (build-system python-build-system)
11747 (home-page "https://github.com/shibukawa/imagesize_py")
11748 (synopsis "Gets image size of files in various formats in Python")
11749 (description
11750 "This package allows determination of image size from
11751 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11752 (license license:expat)))
11753
11754 (define-public python2-imagesize
11755 (package-with-python2 python-imagesize))
11756
11757 (define-public python-termstyle
11758 (package
11759 (name "python-termstyle")
11760 (version "0.1.11")
11761 (source
11762 (origin
11763 (method url-fetch)
11764 (uri (pypi-uri "termstyle" version))
11765 (sha256
11766 (base32
11767 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11768 (build-system python-build-system)
11769 (arguments
11770 '(#:phases
11771 (modify-phases %standard-phases
11772 (replace 'check
11773 (lambda _
11774 (invoke "python" "test3.py"))))))
11775 (home-page "https://github.com/gfxmonk/termstyle")
11776 (synopsis "Console text coloring for Python")
11777 (description "This package provides console text coloring for Python.")
11778 (license license:bsd-3)))
11779
11780 (define-public python-argcomplete
11781 (package
11782 (name "python-argcomplete")
11783 (version "1.10.3")
11784 (source
11785 (origin
11786 (method url-fetch)
11787 (uri (pypi-uri "argcomplete" version))
11788 (sha256
11789 (base32
11790 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
11791 (build-system python-build-system)
11792 (arguments
11793 `(#:phases
11794 (modify-phases %standard-phases
11795 (add-after 'unpack 'embed-tool-references
11796 (lambda _
11797 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11798 ((" grep")
11799 (string-append " " (which "grep")))
11800 ((" egrep")
11801 (string-append " " (which "egrep")))
11802 (("elif which")
11803 (string-append "elif " (which "which")))
11804 (("\\$\\(which")
11805 (string-append "$(" (which "which"))))
11806 #t)))))
11807 (inputs
11808 `(("grep" ,grep)
11809 ("which" ,which)))
11810 (native-inputs
11811 `(("python-coverage" ,python-coverage)
11812 ("python-flake8" ,python-flake8)
11813 ("python-pexpect" ,python-pexpect)
11814 ("python-wheel" ,python-wheel)
11815 ("tcsh" ,tcsh)
11816 ("fish" ,fish)
11817 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11818 (home-page "https://github.com/kislyuk/argcomplete")
11819 (synopsis "Shell tab completion for Python argparse")
11820 (description "argcomplete provides extensible command line tab completion
11821 of arguments and options for Python scripts using @code{argparse}. It's
11822 particularly useful for programs with many options or sub-parsers that can
11823 dynamically suggest completions; for example, when browsing resources over the
11824 network.")
11825 (license license:asl2.0)))
11826
11827 (define-public python2-argcomplete
11828 (package-with-python2 python-argcomplete))
11829
11830 (define-public python-xopen
11831 (package
11832 (name "python-xopen")
11833 (version "0.5.0")
11834 (source
11835 (origin
11836 (method url-fetch)
11837 (uri (pypi-uri "xopen" version))
11838 (sha256
11839 (base32
11840 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11841 (build-system python-build-system)
11842 (propagated-inputs
11843 `(("python-setuptools-scm" ,python-setuptools-scm)))
11844 (home-page "https://github.com/marcelm/xopen/")
11845 (synopsis "Open compressed files transparently")
11846 (description "This module provides an @code{xopen} function that works like
11847 Python's built-in @code{open} function, but can also deal with compressed files.
11848 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11849 recognized by their file extensions. The focus is on being as efficient as
11850 possible on all supported Python versions.")
11851 (license license:expat)))
11852
11853 (define-public python2-xopen
11854 (let ((base (package-with-python2
11855 (strip-python2-variant python-xopen))))
11856 (package
11857 (inherit base)
11858 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11859 ,@(package-propagated-inputs base))))))
11860
11861 (define-public python-cheetah
11862 (package
11863 (name "python-cheetah")
11864 (version "3.1.0")
11865 (source
11866 (origin
11867 (method url-fetch)
11868 (uri (pypi-uri "Cheetah3" version))
11869 (sha256
11870 (base32
11871 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11872 (build-system python-build-system)
11873 (arguments
11874 `(#:modules ((guix build utils)
11875 (guix build python-build-system)
11876 (ice-9 ftw)
11877 (srfi srfi-1)
11878 (srfi srfi-26))
11879 #:phases (modify-phases %standard-phases
11880 (add-after 'unpack 'use-absolute-python
11881 (lambda _
11882 (substitute* "Cheetah/CheetahWrapper.py"
11883 (("#!/usr/bin/env python")
11884 (string-append "#!" (which "python"))))
11885 #t))
11886 (replace 'check
11887 (lambda _
11888 (let ((cwd (getcwd)))
11889 (setenv "PYTHONPATH"
11890 (string-append
11891 cwd "/build/"
11892 (find (cut string-prefix? "lib" <>)
11893 (scandir (string-append cwd "/build")))
11894 ":" (getenv "PYTHONPATH")))
11895 (setenv "PATH"
11896 (string-append (getenv "PATH")
11897 ":" cwd "/bin"))
11898 (setenv "TMPDIR" "/tmp")
11899
11900 (substitute* "Cheetah/Tests/Test.py"
11901 (("unittest.TextTestRunner\\(\\)")
11902 "unittest.TextTestRunner(verbosity=2)"))
11903
11904 (invoke "python" "Cheetah/Tests/Test.py")))))))
11905 (propagated-inputs
11906 `(("python-markdown" ,python-markdown))) ;optional
11907 (home-page "http://cheetahtemplate.org/")
11908 (synopsis "Template engine")
11909 (description "Cheetah is a text-based template engine and Python code
11910 generator.
11911
11912 Cheetah can be used as a standalone templating utility or referenced as
11913 a library from other Python applications. It has many potential uses,
11914 but web developers looking for a viable alternative to ASP, JSP, PHP and
11915 PSP are expected to be its principle user group.
11916
11917 Features:
11918 @enumerate
11919 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11920 text-based format.
11921 @item Cleanly separates content, graphic design, and program code.
11922 @item Blends the power and flexibility of Python with a simple template language
11923 that non-programmers can understand.
11924 @item Gives template writers full access to any Python data structure, module,
11925 function, object, or method in their templates.
11926 @item Makes code reuse easy by providing an object-orientated interface to
11927 templates that is accessible from Python code or other Cheetah templates.
11928 One template can subclass another and selectively reimplement sections of it.
11929 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11930 improve the performance of a dynamic website.
11931 @item Compiles templates into optimized, yet readable, Python code.
11932 @end enumerate")
11933 (license (license:x11-style "file://LICENSE"))))
11934
11935 (define-public python2-cheetah
11936 (package-with-python2 python-cheetah))
11937
11938 (define-public python-dulwich
11939 (package
11940 (name "python-dulwich")
11941 (version "0.18.6")
11942 (source
11943 (origin
11944 (method url-fetch)
11945 (uri (list (string-append "https://www.dulwich.io/releases/"
11946 "dulwich-" version ".tar.gz")
11947 (pypi-uri "dulwich" version)))
11948 (sha256
11949 (base32
11950 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11951 (build-system python-build-system)
11952 (arguments
11953 `(#:phases
11954 (modify-phases %standard-phases
11955 (add-before 'check 'fix-tests
11956 (lambda* (#:key inputs #:allow-other-keys)
11957 ;; The tests use Popen with a custom environment which doesn't
11958 ;; include PATH.
11959 (substitute* "dulwich/tests/compat/utils.py"
11960 (("'git'") (string-append "'"
11961 (which "git")
11962 "'")))
11963 (substitute* '("dulwich/tests/test_repository.py"
11964 "dulwich/tests/test_hooks.py")
11965 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11966 (setenv "TEST_RUNNER" "unittest")
11967 (setenv "PYTHONHASHSEED" "random")
11968 #t)))))
11969 (propagated-inputs
11970 `(("python-fastimport" ,python-fastimport)))
11971 (native-inputs
11972 `(("python-mock" ,python-mock)
11973 ("python-geventhttpclient" ,python-geventhttpclient)
11974 ("git" ,git)))
11975 (home-page "https://www.dulwich.io/")
11976 (synopsis "Git implementation in Python")
11977 (description "Dulwich is an implementation of the Git file formats and
11978 protocols written in pure Python.")
11979 ;; Can be used with either license.
11980 (license (list license:asl2.0 license:gpl2+))))
11981
11982 (define-public python2-dulwich
11983 (package-with-python2 python-dulwich))
11984
11985 (define-public python-pbkdf2
11986 (package
11987 (name "python-pbkdf2")
11988 (version "1.3")
11989 (source
11990 (origin
11991 (method url-fetch)
11992 (uri (pypi-uri "pbkdf2" version))
11993 (sha256
11994 (base32
11995 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11996 (build-system python-build-system)
11997 (arguments
11998 '(#:phases
11999 (modify-phases %standard-phases
12000 (replace 'check
12001 (lambda _
12002 (setenv "PYTHONPATH"
12003 (string-append (getcwd) "/build/lib:"
12004 (getenv "PYTHONPATH")))
12005 (invoke "python" "test/test_pbkdf2.py"))))))
12006 (propagated-inputs
12007 `(("python-pycrypto" ,python-pycrypto))) ; optional
12008 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12009 (synopsis "Password-based key derivation")
12010 (description "This module implements the password-based key derivation
12011 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12012
12013 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12014 is part of the RSA Public Key Cryptography Standards series. The provided
12015 implementation takes a password or a passphrase and a salt value (and
12016 optionally a iteration count, a digest module, and a MAC module) and provides
12017 a file-like object from which an arbitrarly-sized key can be read.")
12018 (license license:expat)))
12019
12020 (define-public python2-pbkdf2
12021 (package-with-python2 python-pbkdf2))
12022
12023 (define-public python-qrcode
12024 (package
12025 (name "python-qrcode")
12026 (version "6.1")
12027 (source
12028 (origin
12029 (method url-fetch)
12030 (uri (pypi-uri "qrcode" version))
12031 (sha256
12032 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12033 (build-system python-build-system)
12034 (arguments
12035 ;; FIXME: Tests require packaging 'pymaging'.
12036 '(#:tests? #f))
12037 (propagated-inputs
12038 `(("python-lxml" ,python-lxml) ; for SVG output
12039 ("python-pillow" ,python-pillow) ; for PNG output
12040 ("python-six" ,python-six)))
12041 (home-page "https://github.com/lincolnloop/python-qrcode")
12042 (synopsis "QR Code image generator")
12043 (description "This package provides a pure Python QR Code generator
12044 module. It uses the Python Imaging Library (PIL) to allow for the generation
12045 of QR Codes.
12046
12047 In addition this package provides a command line tool to generate QR codes and
12048 either write these QR codes to a file or do the output as ascii art at the
12049 console.")
12050 (license license:bsd-3)))
12051
12052 (define-public python2-qrcode
12053 (package-with-python2 python-qrcode))
12054
12055 (define-public python-rst2ansi
12056 (package
12057 (name "python-rst2ansi")
12058 (version "0.1.5")
12059 (source
12060 (origin
12061 (method url-fetch)
12062 (uri (pypi-uri "rst2ansi" version))
12063 (sha256
12064 (base32
12065 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12066 (build-system python-build-system)
12067 (propagated-inputs
12068 `(("python-docutils" ,python-docutils)))
12069 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12070 (synopsis "Convert RST to ANSI-decorated console output")
12071 (description
12072 "Python module dedicated to rendering RST (reStructuredText) documents
12073 to ansi-escaped strings suitable for display in a terminal.")
12074 (license license:expat)))
12075
12076 (define-public python-ansi2html
12077 (package
12078 (name "python-ansi2html")
12079 (version "1.2.0")
12080 (source
12081 (origin
12082 (method url-fetch)
12083 (uri (pypi-uri "ansi2html" version))
12084 (sha256
12085 (base32
12086 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12087 (build-system python-build-system)
12088 (native-inputs
12089 `(("python-mock" ,python-mock)
12090 ("python-nose" ,python-nose)))
12091 (propagated-inputs
12092 `(("python-six" ,python-six)))
12093 (home-page "https://github.com/ralphbean/ansi2html")
12094 (synopsis "Convert ANSI-decorated console output to HTML")
12095 (description
12096 "@command{ansi2html} is a Python library and command line utility for
12097 convering text with ANSI color codes to HTML or LaTeX.")
12098 (license license:gpl3+)))
12099
12100 (define-public python2-ansi2html
12101 (package-with-python2 python-ansi2html))
12102
12103 (define-public python-ddt
12104 (package
12105 (name "python-ddt")
12106 (version "1.1.3")
12107 (source
12108 (origin
12109 (method url-fetch)
12110 (uri (pypi-uri "ddt" version))
12111 (sha256
12112 (base32
12113 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12114 (build-system python-build-system)
12115 (native-inputs
12116 `(("python-mock" ,python-mock)
12117 ("python-nose" ,python-nose)))
12118 (propagated-inputs
12119 `(("python-six" ,python-six)
12120 ("python-pyyaml" ,python-pyyaml)))
12121 (home-page "https://github.com/txels/ddt")
12122 (synopsis "Data-Driven Tests")
12123 (description
12124 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12125 running it with different test data, and make it appear as multiple test
12126 cases.")
12127 (license license:expat)))
12128
12129 (define-public python2-ddt
12130 (package-with-python2 python-ddt))
12131
12132 (define-public python-pycountry
12133 (package
12134 (name "python-pycountry")
12135 (version "18.5.26")
12136 (source
12137 (origin
12138 (method url-fetch)
12139 (uri (pypi-uri "pycountry" version))
12140 (sha256
12141 (base32
12142 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12143 (build-system python-build-system)
12144 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12145 (synopsis "ISO databases for languages, countries, currencies, etc.")
12146 (description
12147 "@code{pycountry} provides the ISO databases for the standards:
12148 @enumerate
12149 @item 639-3 (Languages)
12150 @item 3166 (Countries)
12151 @item 3166-3 (Deleted Countries)
12152 @item 3166-2 (Subdivisions of countries)
12153 @item 4217 (Currencies)
12154 @item 15924 (Scripts)
12155 @end enumerate
12156 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12157 through a Python API.")
12158 (license license:lgpl2.1+)))
12159
12160 (define-public python2-pycountry
12161 (package-with-python2 python-pycountry))
12162
12163 (define-public python-pycosat
12164 (package
12165 (name "python-pycosat")
12166 (version "0.6.1")
12167 (source
12168 (origin
12169 (method url-fetch)
12170 (uri (pypi-uri "pycosat" version))
12171 (sha256
12172 (base32
12173 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12174 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12175 (build-system python-build-system)
12176 (home-page "https://github.com/ContinuumIO/pycosat")
12177 (synopsis "Bindings to picosat (a SAT solver)")
12178 (description
12179 "This package provides efficient Python bindings to @code{picosat} on
12180 the C level. When importing pycosat, the @code{picosat} solver becomes part
12181 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12182 Problem} (SAT) solver.")
12183 (license license:expat)))
12184
12185 (define-public python2-pycosat
12186 (package-with-python2 python-pycosat))
12187
12188 (define-public python2-ruamel.ordereddict
12189 (package
12190 (name "python2-ruamel.ordereddict")
12191 (version "0.4.9")
12192 (source
12193 (origin
12194 (method url-fetch)
12195 (uri (pypi-uri "ruamel.ordereddict" version))
12196 (sha256
12197 (base32
12198 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12199 (build-system python-build-system)
12200 (arguments
12201 `(#:python ,python-2
12202 #:phases
12203 (modify-phases %standard-phases
12204 (delete 'check)
12205 (add-after 'install 'check
12206 (lambda* (#:key inputs outputs #:allow-other-keys)
12207 (add-installed-pythonpath inputs outputs)
12208 (invoke "python" "test/testordereddict.py"))))))
12209 (home-page "https://bitbucket.org/ruamel/ordereddict")
12210 (synopsis "Version of dict that keeps keys in insertion order")
12211 (description
12212 "This is an implementation of an ordered dictionary with @dfn{Key
12213 Insertion Order} (KIO: updates of values do not affect the position of the
12214 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12215 removed and put at the back). The standard library module @code{OrderedDict},
12216 implemented later, implements a subset of @code{ordereddict} functionality.
12217 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12218 Order} (KSO, no sorting function can be specified, but a transform can be
12219 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12220 (license license:expat)))
12221
12222 (define-public python-pypeg2
12223 (package
12224 (name "python-pypeg2")
12225 (version "2.15.2")
12226 (source
12227 (origin
12228 (method url-fetch)
12229 (uri (pypi-uri "pyPEG2" version))
12230 (sha256
12231 (base32
12232 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12233 (build-system python-build-system)
12234 (propagated-inputs `(("python-lxml" ,python-lxml)))
12235 (arguments
12236 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12237 '(#:tests? #f))
12238 (home-page "https://fdik.org/pyPEG/")
12239 (synopsis "Parsering Expression Grammars in Python")
12240 (description "PyPEG is an intrinsic parser interpreter framework for
12241 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12242 parse many formal languages.")
12243 (license license:gpl2)))
12244
12245 (define-public python-incremental
12246 (package
12247 (name "python-incremental")
12248 (version "17.5.0")
12249 (source
12250 (origin
12251 (method url-fetch)
12252 (uri (pypi-uri "incremental" version))
12253 (sha256
12254 (base32
12255 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12256 (build-system python-build-system)
12257 (home-page "https://github.com/hawkowl/incremental")
12258 (synopsis "Library for versioning Python projects")
12259 (description "Incremental is a small library that versions your Python
12260 projects.")
12261 (license license:expat)))
12262
12263 (define-public python2-incremental
12264 (package-with-python2 python-incremental))
12265
12266 (define-public python-invoke
12267 (package
12268 (name "python-invoke")
12269 (home-page "http://www.pyinvoke.org/")
12270 (version "1.3.0")
12271 (source (origin
12272 (method url-fetch)
12273 (uri (pypi-uri "invoke" version))
12274 (sha256
12275 (base32
12276 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12277 (build-system python-build-system)
12278 (arguments
12279 ;; XXX: Requires many dependencies that are not yet in Guix.
12280 `(#:tests? #f))
12281 (synopsis "Pythonic task execution")
12282 (description
12283 "Invoke is a Python task execution tool and library, drawing inspiration
12284 from various sources to arrive at a powerful and clean feature set. It is
12285 evolved from the Fabric project, but focuses on local and abstract concerns
12286 instead of servers and network commands.")
12287 (license license:bsd-3)))
12288
12289 (define-public python2-invoke
12290 (package-with-python2 python-invoke))
12291
12292 (define-public python-automat
12293 (package
12294 (name "python-automat")
12295 (version "0.7.0")
12296 (source (origin
12297 (method url-fetch)
12298 (uri (pypi-uri "Automat" version))
12299 (sha256
12300 (base32
12301 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12302 (build-system python-build-system)
12303 ;; We disable the tests because they require python-twisted, while
12304 ;; python-twisted depends on python-automat. Twisted is optional, but the
12305 ;; tests fail if it is not available. Also see
12306 ;; <https://github.com/glyph/automat/issues/71>.
12307 (arguments '(#:tests? #f))
12308 (native-inputs
12309 `(("python-m2r" ,python-m2r)
12310 ("python-setuptools-scm" ,python-setuptools-scm)
12311 ("python-graphviz" ,python-graphviz)))
12312 (propagated-inputs
12313 `(("python-six" ,python-six)
12314 ("python-attrs" ,python-attrs)))
12315 (home-page "https://github.com/glyph/Automat")
12316 (synopsis "Self-service finite-state machines")
12317 (description "Automat is a library for concise, idiomatic Python
12318 expression of finite-state automata (particularly deterministic finite-state
12319 transducers).")
12320 (license license:expat)))
12321
12322 (define-public python2-automat
12323 (package-with-python2 python-automat))
12324
12325 (define-public python-m2r
12326 (package
12327 (name "python-m2r")
12328 (version "0.2.1")
12329 (source (origin
12330 (method url-fetch)
12331 (uri (pypi-uri "m2r" version))
12332 (sha256
12333 (base32
12334 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12335 (build-system python-build-system)
12336 (propagated-inputs
12337 `(("python-docutils" ,python-docutils)
12338 ("python-mistune" ,python-mistune)))
12339 (native-inputs
12340 `(("python-pygments" ,python-pygments)
12341 ("python-mock" ,python-mock)))
12342 (home-page "https://github.com/miyakogi/m2r")
12343 (synopsis "Markdown to reStructuredText converter")
12344 (description "M2R converts a markdown file including reST markups to valid
12345 reST format.")
12346 (license license:expat)))
12347
12348 (define-public python2-m2r
12349 (package-with-python2 python-m2r))
12350
12351 (define-public python-constantly
12352 (package
12353 (name "python-constantly")
12354 (version "15.1.0")
12355 (source (origin
12356 (method url-fetch)
12357 (uri (pypi-uri "constantly" version))
12358 (sha256
12359 (base32
12360 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12361 (build-system python-build-system)
12362 (home-page "https://github.com/twisted/constantly")
12363 (synopsis "Symbolic constants in Python")
12364 (description "Constantly is a Python library that provides symbolic
12365 constant support. It includes collections and constants with text, numeric,
12366 and bit flag values.")
12367 (license license:expat)))
12368
12369 (define-public python2-constantly
12370 (package-with-python2 python-constantly))
12371
12372 (define-public python-attrs
12373 (package
12374 (name "python-attrs")
12375 (version "19.1.0")
12376 (source (origin
12377 (method url-fetch)
12378 (uri (pypi-uri "attrs" version))
12379 (sha256
12380 (base32
12381 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12382 (build-system python-build-system)
12383 (arguments
12384 `(#:modules ((guix build utils)
12385 (guix build python-build-system)
12386 (ice-9 ftw)
12387 (srfi srfi-1)
12388 (srfi srfi-26))
12389 #:phases (modify-phases %standard-phases
12390 (replace 'check
12391 (lambda _
12392 (let ((cwd (getcwd)))
12393 (setenv "PYTHONPATH"
12394 (string-append
12395 cwd "/build/"
12396 (find (cut string-prefix? "lib" <>)
12397 (scandir (string-append cwd "/build")))
12398 ":"
12399 (getenv "PYTHONPATH")))
12400 (invoke "python" "-m" "pytest")))))))
12401 (native-inputs
12402 `(("python-coverage" ,python-coverage)
12403 ("python-hypothesis" ,python-hypothesis)
12404 ("python-pympler" ,python-pympler)
12405 ("python-pytest" ,python-pytest)
12406 ("python-six" ,python-six)
12407 ("python-sphinx" ,python-sphinx)
12408 ("python-zope-interface" ,python-zope-interface)))
12409 (home-page "https://github.com/python-attrs/attrs/")
12410 (synopsis "Attributes without boilerplate")
12411 (description "@code{attrs} is a Python package with class decorators that
12412 ease the chores of implementing the most common attribute-related object
12413 protocols.")
12414 (license license:expat)))
12415
12416 (define-public python2-attrs
12417 (package-with-python2 python-attrs))
12418
12419 (define-public python-attrs-bootstrap
12420 (package
12421 (inherit python-attrs)
12422 (name "python-attrs-bootstrap")
12423 (native-inputs `())
12424 (arguments `(#:tests? #f))))
12425
12426 (define-public python2-attrs-bootstrap
12427 (package-with-python2 python-attrs-bootstrap))
12428
12429 (define-public python2-cliapp
12430 (package
12431 (name "python2-cliapp")
12432 (version "1.20180812.1")
12433 (source
12434 (origin
12435 (method url-fetch)
12436 (uri (string-append
12437 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12438 version ".tar.gz"))
12439 (sha256
12440 (base32
12441 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12442 (build-system python-build-system)
12443 (arguments
12444 `(#:python ,python-2
12445 #:phases
12446 (modify-phases %standard-phases
12447 ;; check phase needs to be run before the build phase. If not,
12448 ;; coverage-test-runner looks for tests for the built source files,
12449 ;; and fails.
12450 (delete 'check)
12451 (add-before 'build 'check
12452 (lambda _
12453 ;; Disable python3 tests
12454 (substitute* "check"
12455 (("python3") "# python3"))
12456 (invoke "./check"))))))
12457 (native-inputs
12458 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12459 ("python2-pep8" ,python2-pep8)))
12460 (propagated-inputs
12461 `(("python2-pyaml" ,python2-pyaml)))
12462 (home-page "https://liw.fi/cliapp/")
12463 (synopsis "Python framework for command line programs")
12464 (description "@code{python2-cliapp} is a python framework for
12465 command line programs. It contains the typical stuff such programs
12466 need to do, such as parsing the command line for options, and
12467 iterating over input files.")
12468 (license license:gpl2+)))
12469
12470 (define-public python2-ttystatus
12471 (package
12472 (name "python2-ttystatus")
12473 (version "0.36")
12474 (source
12475 (origin
12476 (method url-fetch)
12477 (uri (string-append
12478 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12479 version ".tar.gz"))
12480 (sha256
12481 (base32
12482 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12483 (build-system python-build-system)
12484 (native-inputs
12485 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12486 ("python2-pep8" ,python2-pep8)))
12487 (arguments
12488 `(#:python ,python-2
12489 #:phases
12490 (modify-phases %standard-phases
12491 ;; check phase needs to be run before the build phase. If not,
12492 ;; coverage-test-runner looks for tests for the built source files,
12493 ;; and fails.
12494 (delete 'check)
12495 (add-before 'build 'check
12496 (lambda _ (invoke "make" "check"))))))
12497 (home-page "https://liw.fi/ttystatus/")
12498 (synopsis "Python library for showing progress reporting and
12499 status updates on terminals")
12500 (description "@code{python2-ttystatus} is a python library for
12501 showing progress reporting and status updates on terminals, for
12502 command line programs. Output is automatically adapted to the width
12503 of the terminal: truncated if it does not fit, and resized if the
12504 terminal size changes.")
12505 (license license:gpl3+)))
12506
12507 (define-public python2-tracing
12508 (package
12509 (name "python2-tracing")
12510 (version "0.10")
12511 (source
12512 (origin
12513 (method url-fetch)
12514 (uri (string-append
12515 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12516 version ".tar.gz"))
12517 (sha256
12518 (base32
12519 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12520 (build-system python-build-system)
12521 (arguments
12522 `(#:python ,python-2))
12523 (home-page "https://liw.fi/tracing/")
12524 (synopsis "Python debug logging helper")
12525 (description "@code{python2-tracing} is a python library for
12526 logging debug messages. It provides a way to turn debugging messages
12527 on and off, based on the filename they occur in. It is much faster
12528 than using @code{logging.Filter} to accomplish the same thing, which
12529 matters when code is run in production mode. The actual logging still
12530 happens using the @code{logging} library.")
12531 (license license:gpl3+)))
12532
12533 (define-public python2-larch
12534 (package
12535 (name "python2-larch")
12536 (version "1.20151025")
12537 (source
12538 (origin
12539 (method url-fetch)
12540 (uri (string-append
12541 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12542 version ".tar.gz"))
12543 (patches (search-patches
12544 "python2-larch-coverage-4.0a6-compatibility.patch"))
12545 (sha256
12546 (base32
12547 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12548 (build-system python-build-system)
12549 (arguments
12550 `(#:python ,python-2
12551 #:phases
12552 (modify-phases %standard-phases
12553 ;; check phase needs to be run before the build phase. If not,
12554 ;; coverage-test-runner looks for tests for the built source files,
12555 ;; and fails.
12556 (delete 'check)
12557 (add-before 'build 'check
12558 (lambda _ (invoke "make" "check"))))))
12559 (native-inputs
12560 `(("cmdtest" ,cmdtest)
12561 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12562 (propagated-inputs
12563 `(("python2-tracing" ,python2-tracing)))
12564 (home-page "https://liw.fi/larch/")
12565 (synopsis "Python copy-on-write B-tree library")
12566 (description "@code{python2-larch} is an implementation of
12567 particular kind of B-tree, based on research by Ohad Rodeh. See
12568 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12569 on the data structure.
12570
12571 The distinctive feature of this B-tree is that a node is never
12572 (conceptually) modified. Instead, all updates are done by
12573 copy-on-write. This makes it easy to clone a tree, and modify only the
12574 clone, while other processes access the original tree.")
12575 (license license:gpl3+)))
12576
12577 (define-public python-astroid
12578 (package
12579 (name "python-astroid")
12580 (version "2.3.3")
12581 (source
12582 (origin
12583 (method url-fetch)
12584 (uri (pypi-uri "astroid" version))
12585 (sha256
12586 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12587 (build-system python-build-system)
12588 (propagated-inputs
12589 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12590 ("python-six" ,python-six)
12591 ("python-typed-ast" ,python-typed-ast)
12592 ("python-wrapt" ,python-wrapt)))
12593 (native-inputs
12594 `(("python-dateutil" ,python-dateutil)
12595 ("python-nose" ,python-nose)
12596 ("python-pytest" ,python-pytest)
12597 ("python-pytest-runner" ,python-pytest-runner)))
12598 (arguments
12599 `(#:phases
12600 (modify-phases %standard-phases
12601 (add-after 'unpack 'remove-spurious-test
12602 (lambda _
12603 ;; This can be removed after upgrading from python-3.7
12604 ;; https://github.com/PyCQA/astroid/issues/593
12605 ;; https://bugs.python.org/issue34056
12606 (delete-file "astroid/tests/unittest_modutils.py")
12607 #t))
12608 (replace 'check
12609 (lambda _
12610 (invoke "pytest" "astroid"))))))
12611 (home-page "https://github.com/PyCQA/astroid")
12612 (synopsis "Common base representation of python source code for pylint and
12613 other projects")
12614 (description "@code{python-astroid} provides a common base representation
12615 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12616
12617 It provides a compatible representation which comes from the _ast module. It
12618 rebuilds the tree generated by the builtin _ast module by recursively walking
12619 down the AST and building an extended ast. The new node classes have
12620 additional methods and attributes for different usages. They include some
12621 support for static inference and local name scopes. Furthermore, astroid
12622 builds partial trees by inspecting living objects.")
12623 (license license:lgpl2.1+)
12624 (properties `((python2-variant . ,(delay python2-astroid))))))
12625
12626 (define-public python2-astroid
12627 (let ((base (package-with-python2
12628 (strip-python2-variant python-astroid))))
12629 (package (inherit base)
12630 ;; Version 2.x removes python2 support.
12631 (version "1.6.5")
12632 (source
12633 (origin
12634 (method url-fetch)
12635 (uri (pypi-uri "astroid" version))
12636 (sha256
12637 (base32
12638 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12639 (arguments
12640 (substitute-keyword-arguments (package-arguments base)
12641 ((#:phases phases)
12642 `(modify-phases ,phases
12643 (add-after 'unpack 'remove-spurious-test
12644 (lambda _
12645 ;; https://github.com/PyCQA/astroid/issues/276
12646 (delete-file "astroid/tests/unittest_brain.py")
12647 #t))
12648 (replace 'check
12649 (lambda _
12650 (invoke"python" "-m" "unittest" "discover"
12651 "-p" "unittest*.py")))))))
12652 (native-inputs `())
12653 (propagated-inputs
12654 `(("python2-backports-functools-lru-cache"
12655 ,python2-backports-functools-lru-cache)
12656 ("python2-enum34" ,python2-enum34)
12657 ("python2-singledispatch" ,python2-singledispatch)
12658 ,@(alist-delete "python-typed-ast"
12659 (package-propagated-inputs base)))))))
12660
12661 (define-public python-isort
12662 (package
12663 (name "python-isort")
12664 (version "4.3.4")
12665 (source
12666 (origin
12667 (method git-fetch)
12668 (uri (git-reference
12669 ;; Tests pass only from the Github sources
12670 (url "https://github.com/timothycrosley/isort")
12671 (commit version)))
12672 (file-name (git-file-name name version))
12673 (sha256
12674 (base32
12675 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12676 (build-system python-build-system)
12677 (native-inputs
12678 `(("python-mock" ,python-mock)
12679 ("python-pytest" ,python-pytest)))
12680 (home-page "https://github.com/timothycrosley/isort")
12681 (synopsis "Python utility/library to sort python imports")
12682 (description "@code{python-isort} is a python utility/library to sort
12683 imports alphabetically, and automatically separated into sections. It
12684 provides a command line utility, a python library and plugins for various
12685 editors.")
12686 (license license:expat)
12687 (properties `((python2-variant . ,(delay python2-isort))))))
12688
12689 (define-public python2-isort
12690 (let ((base (package-with-python2
12691 (strip-python2-variant python-isort))))
12692 (package (inherit base)
12693 (native-inputs
12694 `(("python2-futures" ,python2-futures)
12695 ,@(package-native-inputs base))))))
12696
12697 (define-public python2-backports-functools-lru-cache
12698 (package
12699 (name "python2-backports-functools-lru-cache")
12700 (version "1.5")
12701 (source
12702 (origin
12703 (method url-fetch)
12704 ;; only the pypi tarballs contain the necessary metadata
12705 (uri (pypi-uri "backports.functools_lru_cache" version))
12706 (sha256
12707 (base32
12708 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12709 (build-system python-build-system)
12710 (native-inputs
12711 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12712 (arguments
12713 `(#:python ,python-2))
12714 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12715 (synopsis "Backport of functools.lru_cache from Python 3.3")
12716 (description "@code{python2-backports-functools-lru-cache} is a backport
12717 of @code{functools.lru_cache} from python 3.3.")
12718 (license license:expat)))
12719
12720 (define-public python-configparser
12721 (package
12722 (name "python-configparser")
12723 (version "3.7.1")
12724 (source
12725 (origin
12726 (method url-fetch)
12727 (uri (pypi-uri "configparser" version))
12728 (sha256
12729 (base32
12730 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12731 (build-system python-build-system)
12732 (home-page "https://github.com/jaraco/configparser/")
12733 (synopsis "Backport of configparser from python 3.5")
12734 (description "@code{python-configparser} is a backport of
12735 @code{configparser} from Python 3.5 so that it can be used directly
12736 in other versions.")
12737 (license license:expat)))
12738
12739 (define-public python2-configparser
12740 (package-with-python2 python-configparser))
12741
12742 (define-public python-mando
12743 (package
12744 (name "python-mando")
12745 (version "0.6.4")
12746 (source (origin
12747 (method url-fetch)
12748 (uri (pypi-uri "mando" version))
12749 (sha256
12750 (base32
12751 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12752 (build-system python-build-system)
12753 (propagated-inputs
12754 `(("python-rst2ansi" ,python-rst2ansi)
12755 ("python-six" ,python-six)))
12756 (native-inputs
12757 `(("python-pytest" ,python-pytest)))
12758 (home-page "https://mando.readthedocs.org/")
12759 (synopsis
12760 "Wrapper around argparse, allowing creation of complete CLI applications")
12761 (description
12762 "This package is a wrapper around argparse, allowing you to write complete CLI
12763 applications in seconds while maintaining all the flexibility.")
12764 (license license:expat)))
12765
12766 (define-public python2-mando
12767 (package-with-python2 python-mando))
12768
12769 (define-public python2-argparse
12770 (package
12771 (name "python2-argparse")
12772 (version "1.4.0")
12773 (source
12774 (origin
12775 (method url-fetch)
12776 (uri (pypi-uri "argparse" version))
12777 (sha256
12778 (base32
12779 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12780 (build-system python-build-system)
12781 (arguments
12782 `(#:python ,python-2))
12783 (home-page "https://github.com/ThomasWaldmann/argparse/")
12784 (synopsis "Python command-line parsing library")
12785 (description
12786 "This package is mostly for people who want to have @code{argparse} on
12787 older Pythons because it was not part of the standard library back then.")
12788 (license license:psfl)))
12789
12790 (define-public python-fudge
12791 (package
12792 (name "python-fudge")
12793 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12794 ;; package, which is currently the only use of this package.
12795 (version "0.9.6")
12796 (source
12797 (origin
12798 (method url-fetch)
12799 (uri (pypi-uri "fudge" version))
12800 (sha256
12801 (base32
12802 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12803 (build-system python-build-system)
12804 (arguments
12805 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12806 (home-page "https://github.com/fudge-py/fudge")
12807 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12808 (description
12809 "Fudge is a Python module for using fake objects (mocks and stubs) to
12810 test real ones.
12811
12812 In readable Python code, you declare the methods available on your fake object
12813 and how they should be called. Then you inject that into your application and
12814 start testing. This declarative approach means you don’t have to record and
12815 playback actions and you don’t have to inspect your fakes after running code.
12816 If the fake object was used incorrectly then you’ll see an informative
12817 exception message with a traceback that points to the culprit.")
12818 (license license:expat)))
12819
12820 (define-public python2-fudge
12821 (package-with-python2 python-fudge))
12822
12823 (define-public python-mwclient
12824 (package
12825 (name "python-mwclient")
12826 (version "0.10.0")
12827 (source
12828 (origin
12829 (method git-fetch)
12830 ;; The PyPI version wouldn't contain tests.
12831 (uri (git-reference
12832 (url "https://github.com/mwclient/mwclient")
12833 (commit (string-append "v" version))))
12834 (file-name (git-file-name name version))
12835 (sha256
12836 (base32
12837 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
12838 (build-system python-build-system)
12839 (propagated-inputs
12840 `(("python-requests-oauthlib" ,python-requests-oauthlib)
12841 ("python-six" ,python-six)))
12842 (native-inputs
12843 `(("python-mock" ,python-mock)
12844 ("python-pytest" ,python-pytest)
12845 ("python-pytest-cov" ,python-pytest-cov)
12846 ("python-pytest-runner" ,python-pytest-runner)
12847 ("python-responses" ,python-responses)))
12848 (home-page "https://github.com/btongminh/mwclient")
12849 (synopsis "MediaWiki API client")
12850 (description "This package provides a MediaWiki API client.")
12851 (license license:expat)))
12852
12853 (define-public python2-mwclient
12854 (package-with-python2 python-mwclient))
12855
12856 (define-public python-utils
12857 (package
12858 (name "python-utils")
12859 (version "2.1.0")
12860 (source (origin
12861 (method url-fetch)
12862 (uri (pypi-uri "python-utils" version))
12863 (sha256
12864 (base32
12865 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12866 (build-system python-build-system)
12867 (native-inputs
12868 `(("pytest-runner" ,python-pytest-runner)
12869 ("pytest" ,python-pytest)
12870 ("six" ,python-six)))
12871 (home-page "https://github.com/WoLpH/python-utils")
12872 (synopsis "Convenient utilities not included with the standard Python install")
12873 (description
12874 "Python Utils is a collection of small Python functions and classes which
12875 make common patterns shorter and easier.")
12876 (license license:bsd-2)))
12877
12878 (define-public python2-utils
12879 (package-with-python2 python-utils))
12880
12881 (define-public python-diff-match-patch
12882 (package
12883 (name "python-diff-match-patch")
12884 (version "20121119")
12885 (source
12886 (origin
12887 (method url-fetch)
12888 (uri (pypi-uri "diff-match-patch" version))
12889 (sha256
12890 (base32
12891 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12892 (build-system python-build-system)
12893 (home-page "https://code.google.com/p/google-diff-match-patch")
12894 (synopsis "Synchronize plain text")
12895 (description "Diff Match and Patch libraries offer robust algorithms to
12896 perform the operations required for synchronizing plain text.")
12897 (license license:asl2.0)))
12898
12899 (define-public python2-diff-match-patch
12900 (package-with-python2 python-diff-match-patch))
12901
12902 (define-public python-dirsync
12903 (package
12904 (name "python-dirsync")
12905 (version "2.2.3")
12906 (source
12907 (origin
12908 (method url-fetch)
12909 (uri (pypi-uri "dirsync" version))
12910 (sha256
12911 (base32
12912 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12913 (build-system python-build-system)
12914 (propagated-inputs
12915 `(("six" ,python-six)))
12916 (home-page "https://bitbucket.org/tkhyn/dirsync")
12917 (synopsis "Advanced directory tree synchronisation tool")
12918 (description "Advanced directory tree synchronisation tool.")
12919 (license license:expat)))
12920
12921 (define-public python2-dirsync
12922 (package-with-python2 python-dirsync))
12923
12924 (define-public python-levenshtein
12925 (package
12926 (name "python-levenshtein")
12927 (version "0.12.0")
12928 (source
12929 (origin
12930 (method url-fetch)
12931 (uri (pypi-uri "python-Levenshtein" version))
12932 (sha256
12933 (base32
12934 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12935 (build-system python-build-system)
12936 (home-page "https://github.com/ztane/python-Levenshtein")
12937 (synopsis "Fast computation of Levenshtein distance and string similarity")
12938 (description
12939 "The Levenshtein Python C extension module contains functions for fast computation of
12940 @enumerate
12941 @item Levenshtein (edit) distance, and edit operations
12942 @item string similarity
12943 @item approximate median strings, and generally string averaging
12944 @item string sequence and set similarity
12945 @end enumerate
12946 It supports both normal and Unicode strings.")
12947 (license license:gpl2+)))
12948
12949 (define-public python2-levenshtein
12950 (package-with-python2 python-levenshtein))
12951
12952 (define-public python-scandir
12953 (package
12954 (name "python-scandir")
12955 (version "1.9.0")
12956 (source
12957 (origin
12958 (method url-fetch)
12959 (uri (pypi-uri "scandir" version))
12960 (sha256
12961 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12962 (build-system python-build-system)
12963 (arguments
12964 `(#:phases (modify-phases %standard-phases
12965 (replace 'check
12966 (lambda _
12967 (invoke "python" "test/run_tests.py"))))))
12968 (home-page "https://github.com/benhoyt/scandir")
12969 (synopsis "Directory iteration function")
12970 (description
12971 "Directory iteration function like os.listdir(), except that instead of
12972 returning a list of bare filenames, it yields DirEntry objects that include
12973 file type and stat information along with the name. Using scandir() increases
12974 the speed of os.walk() by 2-20 times (depending on the platform and file
12975 system) by avoiding unnecessary calls to os.stat() in most cases.
12976
12977 This package is part of the Python standard library since version 3.5.")
12978 (license license:bsd-3)))
12979
12980 (define-public python2-scandir
12981 (package-with-python2 python-scandir))
12982
12983 (define-public python2-stemming
12984 (package
12985 (name "python2-stemming")
12986 (version "1.0.1")
12987 (source
12988 (origin
12989 (method url-fetch)
12990 (uri (pypi-uri "stemming" version))
12991 (sha256
12992 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12993 (build-system python-build-system)
12994 (arguments
12995 `(#:python ,python-2))
12996 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12997 (synopsis "Python implementations of various stemming algorithms")
12998 (description
12999 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13000 stemming algorithms for English. These implementations are straightforward and
13001 efficient, unlike some Python versions of the same algorithms available on the
13002 Web. This package is an extraction of the stemming code included in the Whoosh
13003 search engine.")
13004 (license license:public-domain)))
13005
13006 (define-public python-factory-boy
13007 (package
13008 (name "python-factory-boy")
13009 (version "2.8.1")
13010 (source
13011 (origin
13012 (method url-fetch)
13013 (uri (pypi-uri "factory_boy" version))
13014 (sha256
13015 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13016 (build-system python-build-system)
13017 (arguments
13018 ;; Tests are not included in the tarball.
13019 `(#:tests? #f))
13020 (propagated-inputs
13021 `(("faker" ,python-faker)))
13022 (home-page "https://github.com/benhoyt/scandir")
13023 (synopsis "Versatile test fixtures replacement")
13024 (description
13025 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13026
13027 As a fixtures replacement tool, it aims to replace static, hard to maintain
13028 fixtures with easy-to-use factories for complex object.
13029
13030 Instead of building an exhaustive test setup with every possible combination
13031 of corner cases, factory_boy allows you to use objects customized for the
13032 current test, while only declaring the test-specific fields")
13033 (license license:expat)))
13034
13035 (define-public python2-factory-boy
13036 (package-with-python2 python-factory-boy))
13037
13038 (define-public python-translate-toolkit
13039 (package
13040 (name "python-translate-toolkit")
13041 (version "2.1.0")
13042 (source
13043 (origin
13044 (method url-fetch)
13045 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13046 (sha256
13047 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13048 (build-system python-build-system)
13049 (native-inputs
13050 `(("python-pytest" ,python-pytest)
13051 ("python-sphinx" ,python-sphinx)))
13052 (propagated-inputs
13053 `(("python-babel" ,python-babel)
13054 ("python-beautifulsoup4" ,python-beautifulsoup4)
13055 ("python-chardet" ,python-chardet)
13056 ("python-diff-match-patch" ,python-diff-match-patch)
13057 ("python-levenshtein" ,python-levenshtein)
13058 ("python-lxml" ,python-lxml)
13059 ("python-six" ,python-six)
13060 ("python-vobject" ,python-vobject)
13061 ("python-pyyaml" ,python-pyyaml)))
13062 (arguments
13063 ;; TODO: tests are not run, because they end with
13064 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13065 ;; 'parse_funcs'
13066 ;; during test setup.
13067 `(#:tests? #f))
13068 (home-page "https://toolkit.translatehouse.org")
13069 (synopsis "Tools and API for translation and localization engineering")
13070 (description
13071 "Tools and API for translation and localization engineering. It contains
13072 several utilities, as well as an API for building localization tools.")
13073 (license license:gpl2+)))
13074
13075 (define-public python2-translate-toolkit
13076 (package-with-python2 python-translate-toolkit))
13077
13078 (define-public python-packaging
13079 (package
13080 (name "python-packaging")
13081 (version "20.0")
13082 (source
13083 (origin
13084 (method url-fetch)
13085 (uri (pypi-uri "packaging" version))
13086 ;; XXX: The URL in the patch file is wrong, it should be
13087 ;; <https://github.com/pypa/packaging/pull/256>.
13088 (patches (search-patches "python-packaging-test-arch.patch"))
13089 (sha256
13090 (base32
13091 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
13092 (build-system python-build-system)
13093 (arguments
13094 `(#:phases (modify-phases %standard-phases
13095 (replace 'check
13096 (lambda _ (invoke "py.test" "-vv"))))))
13097 (native-inputs
13098 `(("python-pretend" ,python-pretend)
13099 ("python-pytest" ,python-pytest)))
13100 (propagated-inputs
13101 `(("python-pyparsing" ,python-pyparsing)
13102 ("python-six" ,python-six)))
13103 (home-page "https://github.com/pypa/packaging")
13104 (synopsis "Core utilities for Python packages")
13105 (description "Packaging is a Python module for dealing with Python packages.
13106 It offers an interface for working with package versions, names, and dependency
13107 information.")
13108 ;; From 'LICENSE': This software is made available under the terms of
13109 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13110 ;; Contributions to this software is made under the terms of *both* these
13111 ;; licenses.
13112 (license (list license:asl2.0 license:bsd-2))))
13113
13114 (define-public python2-packaging
13115 (package-with-python2 python-packaging))
13116
13117 (define-public python-relatorio
13118 (package
13119 (name "python-relatorio")
13120 (version "0.8.0")
13121 (source
13122 (origin
13123 (method url-fetch)
13124 (uri (pypi-uri "relatorio" version))
13125 (sha256
13126 (base32
13127 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13128 (build-system python-build-system)
13129 (propagated-inputs
13130 `(("python-lxml" ,python-lxml)
13131 ("python-genshi" ,python-genshi)))
13132 (native-inputs
13133 `(("python-magic" ,python-magic)))
13134 (home-page "https://relatorio.tryton.org/")
13135 (synopsis "Templating library able to output ODT and PDF files")
13136 (description "Relatorio is a templating library which provides a way to
13137 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13138 for more filetypes can be easily added by creating plugins for them.")
13139 (license license:gpl3+)))
13140
13141 (define-public python2-relatorio
13142 (package-with-python2 python-relatorio))
13143
13144 (define-public python-radon
13145 (package
13146 (name "python-radon")
13147 (version "2.2.0")
13148 (source
13149 (origin
13150 (method url-fetch)
13151 (uri (pypi-uri "radon" version))
13152 (sha256
13153 (base32
13154 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13155 (build-system python-build-system)
13156 (arguments
13157 `(#:phases (modify-phases %standard-phases
13158 (replace 'check
13159 (lambda _
13160 (invoke "python" "radon/tests/run.py"))))))
13161 (propagated-inputs
13162 `(("python-colorama" ,python-colorama)
13163 ("python-flake8-polyfill" ,python-flake8-polyfill)
13164 ("python-mando" ,python-mando)))
13165 (native-inputs
13166 `(("python-pytest" ,python-pytest)
13167 ("python-pytest-mock" ,python-pytest-mock)))
13168 (home-page "https://radon.readthedocs.org/")
13169 (synopsis "Code Metrics in Python")
13170 (description "Radon is a Python tool which computes various code metrics.
13171 Supported metrics are:
13172 @itemize @bullet
13173 @item raw metrics: SLOC, comment lines, blank lines, &c.
13174 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13175 @item Halstead metrics (all of them)
13176 @item the Maintainability Index (a Visual Studio metric)
13177 @end itemize")
13178 (license license:expat)))
13179
13180 (define-public python2-radon
13181 (package-with-python2 python-radon))
13182
13183 (define-public python-sure
13184 (package
13185 (name "python-sure")
13186 (version "1.4.11")
13187 (source
13188 (origin
13189 (method url-fetch)
13190 (uri (pypi-uri "sure" version))
13191 (sha256
13192 (base32
13193 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13194 (build-system python-build-system)
13195 (propagated-inputs
13196 `(("python-mock" ,python-mock)
13197 ("python-six" ,python-six)))
13198 (native-inputs
13199 `(("python-nose" ,python-nose)))
13200 (home-page "https://github.com/gabrielfalcao/sure")
13201 (synopsis "Automated testing library in python for python")
13202 (description
13203 "Sure is a python library that leverages a DSL for writing assertions.
13204 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13205 (license license:gpl3+)))
13206
13207 (define-public python2-sure
13208 (package-with-python2 python-sure))
13209
13210 (define-public python2-couleur
13211 ;; This package does not seem to support python3 at all, hence,
13212 ;; only the python2 variant definition is provided.
13213 (package
13214 (name "python2-couleur")
13215 (version "0.6.2")
13216 (source
13217 (origin
13218 (method url-fetch)
13219 (uri (pypi-uri "couleur" version))
13220 (sha256
13221 (base32
13222 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13223 (build-system python-build-system)
13224 (arguments
13225 `(#:python ,python-2))
13226 (home-page "https://github.com/gabrielfalcao/couleur")
13227 (synopsis
13228 "ANSI terminal tool for python, colored shell and other handy fancy features")
13229 (description
13230 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13231 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13232 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13233 ;; https://github.com/gabrielfalcao/couleur/issues/11
13234 (license license:lgpl3+)))
13235
13236 (define-public python-misaka
13237 (package
13238 (name "python-misaka")
13239 (version "2.1.1")
13240 (source
13241 (origin
13242 (method url-fetch)
13243 (uri (pypi-uri "misaka" version))
13244 (sha256
13245 (base32
13246 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13247 (build-system python-build-system)
13248 (arguments
13249 `(;; Line 37 of setup.py calls self.run_command('develop')
13250 ;; in the 'check' phase. This command seems to be trying
13251 ;; to write to
13252 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13253 ;; for which it does not have the permission to write.
13254 #:tests? #f))
13255 (propagated-inputs
13256 `(("python-cffi" ,python-cffi)))
13257 (home-page "https://github.com/FSX/misaka")
13258 (synopsis "Python binding for Hoedown")
13259 (description
13260 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13261 library written in C. It features a fast HTML renderer and functionality to make custom
13262 renderers (e.g. man pages or LaTeX).")
13263 (license license:expat)))
13264
13265 (define-public python2-misaka
13266 (package-with-python2 python-misaka))
13267
13268 (define-public python2-steadymark
13269 ;; This is forced into being a python2 only variant
13270 ;; due to its dependence on couleur that has no support
13271 ;; for python3
13272 (package
13273 (name "python2-steadymark")
13274 (version "0.7.3")
13275 (source
13276 (origin
13277 (method url-fetch)
13278 (uri (pypi-uri "steadymark" version))
13279 (sha256
13280 (base32
13281 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13282 (build-system python-build-system)
13283 (native-inputs
13284 `(("python-couleur" ,python2-couleur)
13285 ("python-sure" ,python2-sure)
13286 ("python-misaka" ,python2-misaka)))
13287 (arguments
13288 `(#:python ,python-2
13289 #:phases
13290 (modify-phases %standard-phases
13291 (add-before 'build 'patch-setup-py
13292 (lambda _
13293 ;; Update requirements from dependency==version
13294 ;; to dependency>=version
13295 (substitute* "setup.py"
13296 (("==") ">="))
13297 #t)))))
13298 (home-page "https://github.com/gabrielfalcao/steadymark")
13299 (synopsis "Markdown-based test runner for python")
13300 (description
13301 "@code{Steadymark} allows documentation to be written in github-flavoured
13302 markdown. The documentation may contain snippets of code surrounded by python
13303 code blocks and @code{Steadymark} will find these snippets and run them, making
13304 sure that there are no old malfunctional examples in the documentation examples.")
13305 (license license:expat)))
13306
13307 (define-public python-jsonpointer
13308 (package
13309 (name "python-jsonpointer")
13310 (version "1.10")
13311 (source
13312 (origin
13313 (method url-fetch)
13314 (uri (pypi-uri "jsonpointer" version))
13315 (sha256
13316 (base32
13317 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13318 (build-system python-build-system)
13319 (home-page "https://github.com/stefankoegl/python-json-pointer")
13320 (synopsis "Identify specific nodes in a JSON document")
13321 (description "@code{jsonpointer} allows you to access specific nodes
13322 by path in a JSON document (see RFC 6901).")
13323 (license license:bsd-3)))
13324
13325 (define-public python2-jsonpointer
13326 (package-with-python2 python-jsonpointer))
13327
13328 (define-public python-jsonpatch
13329 (package
13330 (name "python-jsonpatch")
13331 (version "1.16")
13332 (source
13333 (origin
13334 (method git-fetch)
13335 ;; pypi version lacks tests.js
13336 (uri (git-reference
13337 (url "https://github.com/stefankoegl/python-json-patch")
13338 (commit (string-append "v" version))))
13339 (file-name (git-file-name name version))
13340 (sha256
13341 (base32
13342 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
13343 (build-system python-build-system)
13344 (native-inputs
13345 `(("python-jsonpointer" ,python-jsonpointer)))
13346 (home-page "https://github.com/stefankoegl/python-json-patch")
13347 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13348 (description "@code{jsonpatch} is a library and program that allows
13349 applying JSON Patches according to RFC 6902.")
13350 (license license:bsd-3)))
13351
13352 (define-public python2-jsonpatch
13353 (package-with-python2 python-jsonpatch))
13354
13355 (define-public python-jsonpatch-0.4
13356 (package (inherit python-jsonpatch)
13357 (name "python-jsonpatch")
13358 (version "0.4")
13359 (source
13360 (origin
13361 (method git-fetch)
13362 (uri (git-reference
13363 (url "https://github.com/stefankoegl/python-json-patch")
13364 (commit (string-append "v" version))))
13365 (file-name (git-file-name name version))
13366 (sha256
13367 (base32
13368 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
13369
13370 (define-public python2-jsonpatch-0.4
13371 (package-with-python2 python-jsonpatch-0.4))
13372
13373 (define-public python-rfc3986
13374 (package
13375 (name "python-rfc3986")
13376 (version "1.1.0")
13377 (source (origin
13378 (method url-fetch)
13379 (uri (pypi-uri "rfc3986" version))
13380 (sha256
13381 (base32
13382 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13383 (build-system python-build-system)
13384 (arguments
13385 `(#:modules ((guix build utils)
13386 (guix build python-build-system)
13387 (ice-9 ftw)
13388 (srfi srfi-1)
13389 (srfi srfi-26))
13390 #:phases
13391 (modify-phases %standard-phases
13392 (replace 'check
13393 (lambda _
13394 (let ((cwd (getcwd)))
13395 (setenv "PYTHONPATH"
13396 (string-append cwd "/build/"
13397 (find (cut string-prefix? "lib" <>)
13398 (scandir (string-append cwd "/build")))
13399 ":"
13400 (getenv "PYTHONPATH")))
13401 (invoke "pytest" "-v")))))))
13402 (native-inputs
13403 `(("python-pytest" ,python-pytest)))
13404 (home-page "https://rfc3986.readthedocs.io/")
13405 (synopsis "Parse and validate URI references")
13406 (description
13407 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13408 validation and authority parsing. This module also supports RFC@tie{}6874
13409 which adds support for zone identifiers to IPv6 addresses.")
13410 (license license:asl2.0)))
13411
13412 (define-public python2-rfc3986
13413 (package-with-python2 python-rfc3986))
13414
13415 (define-public python-rfc3987
13416 (package
13417 (name "python-rfc3987")
13418 (version "1.3.7")
13419 (source
13420 (origin
13421 (method url-fetch)
13422 (uri (pypi-uri "rfc3987" version))
13423 (sha256
13424 (base32
13425 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13426 (build-system python-build-system)
13427 (home-page "https://pypi.python.org/pypi/rfc3987")
13428 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13429 (description "@code{rfc3987} provides routines for parsing and
13430 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13431 (license license:gpl3+)))
13432
13433 (define-public python2-rfc3987
13434 (package-with-python2 python-rfc3987))
13435
13436 (define-public python-validate-email
13437 (package
13438 (name "python-validate-email")
13439 (version "1.3")
13440 (source
13441 (origin
13442 (method url-fetch)
13443 (uri (pypi-uri "validate_email" version))
13444 (sha256
13445 (base32
13446 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13447 (build-system python-build-system)
13448 (home-page "https://github.com/syrusakbary/validate_email")
13449 (synopsis "Verifies if an email address is valid and really exists")
13450 (description "@code{validate_email} can be used to verify if an email
13451 address is valid and really exists.")
13452 (license license:lgpl3+)))
13453
13454 (define-public python2-validate-email
13455 (package-with-python2 python-validate-email))
13456
13457 (define-public python-flex
13458 (package
13459 (name "python-flex")
13460 (version "6.10.0")
13461 (source
13462 (origin
13463 (method url-fetch)
13464 (uri (pypi-uri "flex" version))
13465 (sha256
13466 (base32
13467 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13468 (build-system python-build-system)
13469 (propagated-inputs
13470 `(("python-click" ,python-click)
13471 ("python-iso8601" ,python-iso8601)
13472 ("python-jsonpointer" ,python-jsonpointer)
13473 ("python-pyyaml" ,python-pyyaml)
13474 ("python-requests" ,python-requests)
13475 ("python-rfc3987" ,python-rfc3987)
13476 ("python-six" ,python-six)
13477 ("python-validate-email" ,python-validate-email)))
13478 (home-page "https://github.com/pipermerriam/flex")
13479 (synopsis "Validates Swagger schemata")
13480 (description "@code{flex} can be used to validate Swagger schemata.")
13481 (license license:bsd-3)))
13482
13483 (define-public python2-flex
13484 (package-with-python2 python-flex))
13485
13486 (define-public python-marshmallow
13487 (package
13488 (name "python-marshmallow")
13489 (version "3.0.0b14")
13490 (source
13491 (origin
13492 (method url-fetch)
13493 (uri (pypi-uri "marshmallow" version))
13494 (sha256
13495 (base32
13496 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13497 (build-system python-build-system)
13498 (propagated-inputs
13499 `(("python-dateutil" ,python-dateutil)
13500 ("python-simplejson" ,python-simplejson)))
13501 (native-inputs
13502 `(("python-pytest" ,python-pytest)
13503 ("python-pytz" ,python-pytz)))
13504 (home-page "https://github.com/marshmallow-code/marshmallow")
13505 (synopsis "Convert complex datatypes to and from native
13506 Python datatypes.")
13507 (description "@code{marshmallow} provides a library for converting
13508 complex datatypes to and from native Python datatypes.")
13509 (license license:expat)))
13510
13511 (define-public python2-marshmallow
13512 (package-with-python2 python-marshmallow))
13513
13514 (define-public python-apispec
13515 (package
13516 (name "python-apispec")
13517 (version "0.25.3")
13518 (source
13519 (origin
13520 (method url-fetch)
13521 (uri (pypi-uri "apispec" version))
13522 (sha256
13523 (base32
13524 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13525 (build-system python-build-system)
13526 (propagated-inputs
13527 `(("python-pyyaml" ,python-pyyaml)))
13528 (native-inputs
13529 `(("python-pytest" ,python-pytest)
13530 ("python-flask" ,python-flask)
13531 ("python-marshmallow" ,python-marshmallow)
13532 ("python-tornado" ,python-tornado)
13533 ("python-bottle" ,python-bottle)
13534 ("python-mock" ,python-mock)))
13535 (home-page "https://github.com/marshmallow-code/apispec")
13536 (synopsis "Swagger 2.0 API specification generator")
13537 (description "@code{python-apispec} is a pluggable API specification
13538 generator. Currently supports the OpenAPI specification (f.k.a.
13539 Swagger 2.0).")
13540 (license license:expat)))
13541
13542 (define-public python2-apispec
13543 (package-with-python2 python-apispec))
13544
13545 (define-public python-flasgger
13546 (package
13547 (name "python-flasgger")
13548 (version "0.6.3")
13549 (source
13550 (origin
13551 (method git-fetch)
13552 (uri (git-reference
13553 (url "https://github.com/rochacbruno/flasgger.git")
13554 (commit version)))
13555 (file-name (git-file-name name version))
13556 (sha256
13557 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13558 (build-system python-build-system)
13559 (arguments
13560 `(#:phases
13561 (modify-phases %standard-phases
13562 (replace 'check
13563 (lambda* (#:key inputs outputs #:allow-other-keys)
13564 (substitute* "Makefile"
13565 (("flake8 flasgger --ignore=F403")
13566 "flake8 flasgger --ignore=E731,F403"))
13567 (setenv "PYTHONPATH" (string-append (getcwd)
13568 ":"
13569 (getenv "PYTHONPATH")))
13570 (invoke "py.test"))))))
13571 (propagated-inputs
13572 `(("python-flask" ,python-flask)
13573 ("python-pyyaml" ,python-pyyaml)
13574 ("python-jsonschema" ,python-jsonschema)
13575 ("python-mistune" ,python-mistune)
13576 ("python-six" ,python-six)))
13577 (native-inputs
13578 `(("python-decorator" ,python-decorator)
13579 ("python-flake8" ,python-flake8)
13580 ("python-flask-restful" ,python-flask-restful)
13581 ("python-flex" ,python-flex)
13582 ("python-pytest" ,python-pytest)
13583 ("python-pytest-cov" ,python-pytest-cov)
13584 ("python-marshmallow" ,python-marshmallow)
13585 ("python-apispec" ,python-apispec)))
13586 (home-page "https://github.com/rochacbruno/flasgger/")
13587 (synopsis "Extract Swagger specs from your Flask project")
13588 (description "@code{python-flasgger} allows extracting Swagger specs
13589 from your Flask project. It is a fork of Flask-Swagger.")
13590 (license license:expat)))
13591
13592 (define-public python2-flasgger
13593 (package-with-python2 python-flasgger))
13594
13595 (define-public python-swagger-spec-validator
13596 (package
13597 (name "python-swagger-spec-validator")
13598 (version "2.4.3")
13599 (source
13600 (origin
13601 (method url-fetch)
13602 (uri (pypi-uri "swagger-spec-validator" version))
13603 (sha256
13604 (base32
13605 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13606 (build-system python-build-system)
13607 (propagated-inputs
13608 `(("python-jsonschema" ,python-jsonschema)
13609 ("python-pyyaml" ,python-pyyaml)
13610 ("python-six" ,python-six)))
13611 (home-page
13612 "https://github.com/Yelp/swagger_spec_validator")
13613 (synopsis "Validation of Swagger specifications")
13614 (description "@code{swagger_spec_validator} provides a library for
13615 validating Swagger API specifications.")
13616 (license license:asl2.0)))
13617
13618 (define-public python2-swagger-spec-validator
13619 (package-with-python2 python-swagger-spec-validator))
13620
13621 (define-public python-apache-libcloud
13622 (package
13623 (name "python-apache-libcloud")
13624 (version "2.4.0")
13625 (source
13626 (origin
13627 (method url-fetch)
13628 (uri (pypi-uri "apache-libcloud" version))
13629 (sha256
13630 (base32
13631 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13632 (build-system python-build-system)
13633 (arguments
13634 `(#:phases
13635 (modify-phases %standard-phases
13636 (add-after 'unpack 'patch-ssh
13637 (lambda* (#:key inputs #:allow-other-keys)
13638 (substitute* "libcloud/compute/ssh.py"
13639 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13640 "/bin/ssh" "'")))
13641 #t))
13642 (add-after 'unpack 'patch-tests
13643 (lambda _
13644 (substitute* "./libcloud/test/test_file_fixtures.py"
13645 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13646 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13647 return (httplib.OK,
13648 \"1234abcd\",
13649 {\"test\": \"value\"},
13650 httplib.responses[httplib.OK])
13651 def _ascii"))
13652 (substitute* "libcloud/test/compute/test_ssh_client.py"
13653 (("class ShellOutSSHClientTests")
13654 "@unittest.skip(\"Guix container doesn't have ssh service\")
13655 class ShellOutSSHClientTests")
13656 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13657 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13658 (("'.xF0', '.x90', '.x8D', '.x88'")
13659 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13660 #t))
13661 (add-before 'check 'copy-secret
13662 (lambda _
13663 (copy-file "libcloud/test/secrets.py-dist"
13664 "libcloud/test/secrets.py")
13665 #t)))))
13666 (inputs
13667 `(("openssh" ,openssh)))
13668 (propagated-inputs
13669 `(("python-paramiko" ,python-paramiko)
13670 ("python-requests" ,python-requests)))
13671 (native-inputs
13672 `(("python-lockfile" ,python-lockfile)
13673 ("python-mock" ,python-mock)
13674 ("python-pytest" ,python-pytest)
13675 ("python-pytest-runner" ,python-pytest-runner)
13676 ("python-requests-mock" ,python-requests-mock)))
13677 (home-page "https://libcloud.apache.org/")
13678 (synopsis "Unified Cloud API")
13679 (description "@code{libcloud} is a Python library for interacting with
13680 many of the popular cloud service providers using a unified API.")
13681 (license license:asl2.0)))
13682
13683 (define-public python2-apache-libcloud
13684 (package-with-python2 python-apache-libcloud))
13685
13686 (define-public python-smmap2
13687 (package
13688 (name "python-smmap2")
13689 (version "2.0.5")
13690 (source
13691 (origin
13692 (method url-fetch)
13693 (uri (pypi-uri "smmap2" version))
13694 (sha256
13695 (base32 "16k03pcnxd3lgzwgbd7nl4jwzm1wmahirvd09kljnzvy96hgza99"))))
13696 (build-system python-build-system)
13697 (native-inputs
13698 `(("python-nosexcover" ,python-nosexcover)))
13699 (home-page "https://github.com/Byron/smmap")
13700 (synopsis "Python sliding window memory map manager")
13701 (description "@code{smmap2} is a pure Python implementation of a sliding
13702 window memory map manager.")
13703 (license license:bsd-3)))
13704
13705 (define-public python2-smmap2
13706 (package-with-python2 python-smmap2))
13707
13708 (define-public python-regex
13709 (package
13710 (name "python-regex")
13711 (version "2019.04.14")
13712 (source (origin
13713 (method url-fetch)
13714 (uri (pypi-uri "regex" version))
13715 (sha256
13716 (base32
13717 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13718 ;; TODO: Fix and enable regex_test.py tests that complain about the
13719 ;; test.support module not existing.
13720 (build-system python-build-system)
13721 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13722 (synopsis "Alternative regular expression module")
13723 (description "This regular expression implementation is backwards-
13724 compatible with the standard @code{re} module, but offers additional
13725 functionality like full case-folding for case-insensitive matches in Unicode.")
13726 (license license:psfl)))
13727
13728 (define-public python2-regex
13729 (package-with-python2 python-regex))
13730
13731 (define-public python2-pyopengl
13732 (package
13733 (name "python2-pyopengl")
13734 (version "3.1.0")
13735 (source
13736 (origin
13737 (method url-fetch)
13738 (uri (pypi-uri "PyOpenGL" version))
13739 (sha256
13740 (base32
13741 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13742 (arguments
13743 `(#:python ,python-2))
13744 (build-system python-build-system)
13745 (home-page "http://pyopengl.sourceforge.net")
13746 (synopsis "Standard OpenGL bindings for Python")
13747 (description
13748 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13749 related APIs. The binding is created using the standard @code{ctypes}
13750 library.")
13751 (license license:bsd-3)))
13752
13753 (define-public python2-pyopengl-accelerate
13754 (package
13755 (inherit python2-pyopengl)
13756 (name "python2-pyopengl-accelerate")
13757 (version "3.1.0")
13758 (source
13759 (origin
13760 (method url-fetch)
13761 (uri (pypi-uri "PyOpenGL-accelerate" version))
13762 (sha256
13763 (base32
13764 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13765 (synopsis "Acceleration code for PyOpenGL")
13766 (description
13767 "This is the Cython-coded accelerator module for PyOpenGL.")))
13768
13769 (define-public python-rencode
13770 (package
13771 (name "python-rencode")
13772 (version "1.0.5")
13773 (source
13774 (origin
13775 (method url-fetch)
13776 (uri (pypi-uri "rencode" version))
13777 (sha256
13778 (base32
13779 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13780 (build-system python-build-system)
13781 (arguments
13782 `(#:phases
13783 (modify-phases %standard-phases
13784 (add-before 'check 'delete-bogus-test
13785 ;; This test requires /home/aresch/Downloads, which is not provided by
13786 ;; the build environment.
13787 (lambda _
13788 (delete-file "rencode/t.py")
13789 #t)))))
13790 (native-inputs `(("pkg-config" ,pkg-config)
13791 ("python-cython" ,python-cython)))
13792 (home-page "https://github.com/aresch/rencode")
13793 (synopsis "Serialization of heterogeneous data structures")
13794 (description
13795 "The @code{rencode} module is a data structure serialization library,
13796 similar to @code{bencode} from the BitTorrent project. For complex,
13797 heterogeneous data structures with many small elements, r-encoding stake up
13798 significantly less space than b-encodings. This version of rencode is a
13799 complete rewrite in Cython to attempt to increase the performance over the
13800 pure Python module.")
13801 (license license:bsd-3)))
13802
13803 (define-public python2-rencode
13804 (package-with-python2 python-rencode))
13805
13806 (define-public python-xenon
13807 (package
13808 (name "python-xenon")
13809 (version "0.5.4")
13810 (source
13811 (origin
13812 (method url-fetch)
13813 (uri (pypi-uri "xenon" version))
13814 (sha256
13815 (base32
13816 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13817 (build-system python-build-system)
13818 (native-inputs
13819 `(("python-pyyaml" ,python-pyyaml)
13820 ("python-radon" ,python-radon)
13821 ("python-requests" ,python-requests)
13822 ("python-flake8" ,python-flake8)
13823 ("python-tox" ,python-tox)))
13824 (arguments
13825 `(#:phases
13826 (modify-phases %standard-phases
13827 (add-before 'build 'patch-test-requirements
13828 (lambda _
13829 ;; Remove httpretty dependency for tests.
13830 (substitute* "setup.py"
13831 (("httpretty") ""))
13832 #t)))))
13833 (home-page "https://xenon.readthedocs.org/")
13834 (synopsis "Monitor code metrics for Python on your CI server")
13835 (description
13836 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13837 Ideally, @code{xenon} is run every time code is committed. Through command
13838 line options, various thresholds can be set for the complexity of code. It
13839 will fail (i.e. it will exit with a non-zero exit code) when any of these
13840 requirements is not met.")
13841 (license license:expat)))
13842
13843 (define-public python2-xenon
13844 (package-with-python2 python-xenon))
13845
13846 (define-public python-pysocks
13847 (package
13848 (name "python-pysocks")
13849 (version "1.7.0")
13850 (source
13851 (origin
13852 (method url-fetch)
13853 (uri (pypi-uri "PySocks" version))
13854 (sha256
13855 (base32
13856 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13857 (build-system python-build-system)
13858 (arguments `(#:tests? #f))
13859 (home-page "https://github.com/Anorov/PySocks")
13860 (synopsis "SOCKS client module")
13861 (description "@code{pysocks} is an updated and semi-actively maintained
13862 version of @code{SocksiPy} with bug fixes and extra features.")
13863 (license license:bsd-3)))
13864
13865 (define-public python2-pysocks
13866 (package-with-python2 python-pysocks))
13867
13868 (define-public python-pydiff
13869 (package
13870 (name "python-pydiff")
13871 (version "0.2")
13872 (source
13873 (origin
13874 (method url-fetch)
13875 (uri (pypi-uri "pydiff" version))
13876 (sha256
13877 (base32
13878 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13879 (build-system python-build-system)
13880 (home-page "https://github.com/myint/pydiff")
13881 (synopsis "Library to diff two Python files at the bytecode level")
13882 (description
13883 "@code{pydiff} makes it easy to look for actual code changes while
13884 ignoring formatting changes.")
13885 (license license:expat)))
13886
13887 (define-public python2-pydiff
13888 (package-with-python2 python-pydiff))
13889
13890 (define-public python-tqdm
13891 (package
13892 (name "python-tqdm")
13893 (version "4.19.6")
13894 (source
13895 (origin
13896 (method url-fetch)
13897 (uri (pypi-uri "tqdm" version))
13898 (sha256
13899 (base32
13900 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13901 (build-system python-build-system)
13902 (native-inputs
13903 `(("python-flake8" ,python-flake8)
13904 ("python-nose" ,python-nose)
13905 ("python-coverage" ,python-coverage)))
13906 (home-page "https://github.com/tqdm/tqdm")
13907 (synopsis "Fast, extensible progress meter")
13908 (description
13909 "Make loops show a progress bar on the console by just wrapping any
13910 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13911 design and layout.")
13912 (license (list license:mpl2.0 license:expat))
13913 (properties `((python2-variant . ,(delay python2-tqdm))))))
13914
13915 (define-public python2-tqdm
13916 (let ((tqdm (package-with-python2
13917 (strip-python2-variant python-tqdm))))
13918 (package (inherit tqdm)
13919 (native-inputs `(("python2-functools32" ,python2-functools32)
13920 ,@(package-native-inputs tqdm))))))
13921
13922 (define-public python-pkginfo
13923 (package
13924 (name "python-pkginfo")
13925 (version "1.4.2")
13926 (source
13927 (origin
13928 (method url-fetch)
13929 (uri (pypi-uri "pkginfo" version))
13930 (sha256
13931 (base32
13932 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13933 (build-system python-build-system)
13934 (arguments
13935 ;; The tests are broken upstream.
13936 '(#:tests? #f))
13937 (home-page
13938 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13939 (synopsis
13940 "Query metadatdata from sdists, bdists, and installed packages")
13941 (description
13942 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13943 source distriubtion (an sdist) or a binary distribution (e.g., created by
13944 running bdist_egg). It can also query the EGG-INFO directory of an installed
13945 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13946 created by running @code{python setup.py develop}).")
13947 (license license:expat)))
13948
13949 (define-public python2-pkginfo
13950 (package-with-python2 python-pkginfo))
13951
13952 (define-public python-twine
13953 (package
13954 (name "python-twine")
13955 (version "1.9.1")
13956 (source
13957 (origin
13958 (method url-fetch)
13959 (uri (pypi-uri "twine" version))
13960 (sha256
13961 (base32
13962 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13963 (build-system python-build-system)
13964 (propagated-inputs
13965 `(("python-tqdm" ,python-tqdm)
13966 ("python-pkginfo" ,python-pkginfo)
13967 ("python-requests" ,python-requests)
13968 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13969 (home-page "https://github.com/pypa/twine")
13970 (synopsis "Collection of utilities for interacting with PyPI")
13971 (description
13972 "@code{twine} currently supports registering projects and uploading
13973 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13974 their files and supports any packaging format (including wheels).")
13975 (license license:asl2.0)))
13976
13977 (define-public python2-twine
13978 (package-with-python2 python-twine))
13979
13980 (define-public python-linecache2
13981 (package
13982 (name "python-linecache2")
13983 (version "1.0.0")
13984 (source
13985 (origin
13986 (method url-fetch)
13987 (uri (pypi-uri "linecache2" version))
13988 (sha256
13989 (base32
13990 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13991 (build-system python-build-system)
13992 (arguments
13993 `(;; The tests depend on unittest2, and our version is a bit too old.
13994 #:tests? #f))
13995 (native-inputs
13996 `(("python-pbr" ,python-pbr-minimal)))
13997 (home-page
13998 "https://github.com/testing-cabal/linecache2")
13999 (synopsis "Backports of the linecache module")
14000 (description
14001 "The linecache module allows one to get any line from any file, while
14002 attempting to optimize internally, using a cache, the common case where many
14003 lines are read from a single file.")
14004 (license license:psfl)))
14005
14006 (define-public python2-linecache2
14007 (package-with-python2 python-linecache2))
14008
14009 (define-public python-traceback2
14010 (package
14011 (name "python-traceback2")
14012 (version "1.4.0")
14013 (source
14014 (origin
14015 (method url-fetch)
14016 (uri (pypi-uri "traceback2" version))
14017 (sha256
14018 (base32
14019 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14020 (build-system python-build-system)
14021 (arguments
14022 `(;; python-traceback2 and python-unittest2 depend on one another.
14023 #:tests? #f))
14024 (native-inputs
14025 `(("python-pbr" ,python-pbr-minimal)))
14026 (propagated-inputs
14027 `(("python-linecache2" ,python-linecache2)))
14028 (home-page
14029 "https://github.com/testing-cabal/traceback2")
14030 (synopsis "Backports of the traceback module")
14031 (description
14032 "This module provides a standard interface to extract, format and print
14033 stack traces of Python programs. It exactly mimics the behavior of the Python
14034 interpreter when it prints a stack trace.")
14035 (license license:psfl)))
14036
14037 (define-public python2-traceback2
14038 (package-with-python2 python-traceback2))
14039
14040 (define-public python-ratelimiter
14041 (package
14042 (name "python-ratelimiter")
14043 (version "1.2.0")
14044 (source
14045 (origin
14046 (method url-fetch)
14047 (uri (pypi-uri "ratelimiter" version))
14048 (sha256
14049 (base32
14050 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14051 (build-system python-build-system)
14052 (arguments
14053 '(#:tests? #f)) ; There are no tests in the pypi archive.
14054 (home-page "https://github.com/RazerM/ratelimiter")
14055 (synopsis "Simple rate limiting object")
14056 (description
14057 "The @code{ratelimiter} module ensures that an operation will not be
14058 executed more than a given number of times during a given period.")
14059 (license license:asl2.0)))
14060
14061 (define-public python2-ratelimiter
14062 (package-with-python2 python-ratelimiter))
14063
14064 (define-public python-dukpy
14065 (package
14066 (name "python-dukpy")
14067 (version "0.3")
14068 (source
14069 (origin
14070 (method git-fetch)
14071 (uri (git-reference
14072 (url "https://github.com/kovidgoyal/dukpy.git")
14073 (commit (string-append "v" version))))
14074 (file-name (git-file-name name version))
14075 (sha256
14076 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14077 (build-system python-build-system)
14078 (home-page "https://github.com/kovidgoyal/dukpy")
14079 (synopsis "Run JavaScript in python")
14080 (description
14081 "dukpy is a JavaScript runtime environment for Python using the duktape
14082 embeddable JavaScript engine.")
14083 ;; Dukpy is licensed under MIT like the embedded duktape library,
14084 ;; with 'errors.c' as GPL3.
14085 (license (list license:expat license:gpl3))))
14086
14087 (define-public python2-dukpy
14088 (package-with-python2 python-dukpy))
14089
14090 (define-public python-jsonrpclib-pelix
14091 (package
14092 (name "python-jsonrpclib-pelix")
14093 (version "0.3.2")
14094 (source
14095 (origin
14096 (method url-fetch)
14097 (uri (pypi-uri "jsonrpclib-pelix" version))
14098 (sha256
14099 (base32
14100 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14101 (build-system python-build-system)
14102 (arguments
14103 `(#:tests? #f)) ; no tests in PyPI tarball
14104 (home-page "https://github.com/tcalmant/jsonrpclib/")
14105 (synopsis "JSON-RPC 2.0 client library for Python")
14106 (description
14107 "This library implements the JSON-RPC v2.0
14108 specification (backwards-compatible) as a client library for Python. This
14109 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14110 services.")
14111 (license license:asl2.0)))
14112
14113 (define-public python2-jsonrpclib-pelix
14114 (package-with-python2 python-jsonrpclib-pelix))
14115
14116 (define-public python-setuptools-scm-git-archive
14117 (package
14118 (name "python-setuptools-scm-git-archive")
14119 (version "1.0")
14120 (source
14121 (origin
14122 (method url-fetch)
14123 (uri (pypi-uri "setuptools_scm_git_archive" version))
14124 (sha256
14125 (base32
14126 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14127 (build-system python-build-system)
14128 (native-inputs
14129 `(("python-pytest" ,python-pytest)))
14130 (propagated-inputs
14131 `(("python-setuptools-scm" ,python-setuptools-scm)))
14132 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14133 (synopsis "Setuptools_scm plugin for git archives")
14134 (description
14135 "The setuptools_scm_git_archive package is a plugin to
14136 setuptools_scm, which supports obtaining versions from git archives that
14137 belong to tagged versions.")
14138 (license license:expat)))
14139
14140 (define-public python2-setuptools-scm-git-archive
14141 (package-with-python2 python-setuptools-scm-git-archive))
14142
14143 (define-public python-setuptools-git
14144 (package
14145 (name "python-setuptools-git")
14146 (version "1.2")
14147 (source
14148 (origin
14149 (method url-fetch)
14150 (uri (pypi-uri "setuptools-git" version))
14151 (sha256
14152 (base32
14153 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14154 (build-system python-build-system)
14155 (arguments
14156 `(#:phases
14157 (modify-phases %standard-phases
14158 ;; This is needed for tests.
14159 (add-after 'unpack 'configure-git
14160 (lambda _
14161 (setenv "HOME" "/tmp")
14162 (invoke "git" "config" "--global" "user.email" "guix")
14163 (invoke "git" "config" "--global" "user.name" "guix")
14164 #t)))))
14165 (native-inputs
14166 `(("git" ,git-minimal)))
14167 (home-page "https://github.com/msabramo/setuptools-git")
14168 (synopsis "Setuptools revision control system plugin for Git")
14169 (description
14170 "This package provides a plugin for Setuptools for revision control with
14171 Git.")
14172 (license license:bsd-3)))
14173
14174 (define-public python-pyclipper
14175 (package
14176 (name "python-pyclipper")
14177 (version "1.1.0.post3")
14178 (source
14179 (origin
14180 (method url-fetch)
14181 (uri (pypi-uri "pyclipper" version ".zip"))
14182 (sha256
14183 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14184 (modules '((guix build utils)))
14185 (snippet
14186 '(begin
14187 ;; This file is generated by Cython.
14188 (delete-file "pyclipper/pyclipper.cpp") #t))))
14189 (build-system python-build-system)
14190 (arguments
14191 `(#:phases
14192 (modify-phases %standard-phases
14193 (add-before 'build 'cythonize-sources
14194 (lambda _
14195 (with-directory-excursion "pyclipper"
14196 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14197 (propagated-inputs
14198 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14199 (native-inputs
14200 `(("python-cython" ,python-cython)
14201 ("python-pytest" ,python-pytest)
14202 ("python-pytest-runner" ,python-pytest-runner)
14203 ("python-unittest2" ,python-unittest2)
14204 ("unzip" ,unzip)))
14205 (home-page "https://github.com/greginvm/pyclipper")
14206 (synopsis "Wrapper for Angus Johnson's Clipper library")
14207 (description
14208 "Pyclipper is a Cython wrapper for the C++ translation of the
14209 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14210 (license license:expat)))
14211
14212 (define-public python2-pyclipper
14213 (package-with-python2 python-pyclipper))
14214
14215 (define-public python2-booleanoperations
14216 (package
14217 (name "python2-booleanoperations")
14218 (version "0.7.1")
14219 (source
14220 (origin
14221 (method url-fetch)
14222 (uri (pypi-uri "booleanOperations" version ".zip"))
14223 (sha256
14224 (base32
14225 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14226 (build-system python-build-system)
14227 (arguments
14228 `(#:python ,python-2))
14229 (native-inputs
14230 `(("unzip" ,unzip)
14231 ("python2-pytest" ,python2-pytest)
14232 ("python2-pytest-runner" ,python2-pytest-runner)))
14233 (propagated-inputs
14234 `(("python-fonttools" ,python2-fonttools)
14235 ("python-pyclipper" ,python2-pyclipper)
14236 ("python-ufolib" ,python2-ufolib)))
14237 (home-page "https://github.com/typemytype/booleanOperations")
14238 (synopsis "Boolean operations on paths")
14239 (description
14240 "BooleanOperations provides a Python library that enables
14241 boolean operations on paths.")
14242 (license license:expat)))
14243
14244 (define-public python-tempdir
14245 (package
14246 (name "python-tempdir")
14247 (version "0.7.1")
14248 (source
14249 (origin
14250 (method url-fetch)
14251 (uri (pypi-uri "tempdir" version))
14252 (sha256
14253 (base32
14254 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14255 (build-system python-build-system)
14256 (home-page "https://pypi.org/project/tempdir/")
14257 (arguments
14258 ;; the package has no tests
14259 '(#:tests? #f))
14260 (synopsis "Python library for managing temporary directories")
14261 (description
14262 "This library manages temporary directories that are automatically
14263 deleted with all their contents when they are no longer needed. It is
14264 particularly convenient for use in tests.")
14265 (license license:expat)))
14266
14267 (define-public python2-tempdir
14268 (package-with-python2 python-tempdir))
14269
14270 (define-public python-activepapers
14271 (package
14272 (name "python-activepapers")
14273 (version "0.2.2")
14274 (source
14275 (origin
14276 (method url-fetch)
14277 (uri (pypi-uri "ActivePapers.Py" version))
14278 (sha256
14279 (base32
14280 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14281 (build-system python-build-system)
14282 (arguments
14283 `(#:modules ((ice-9 ftw)
14284 (srfi srfi-1)
14285 (guix build utils)
14286 (guix build python-build-system))
14287
14288 #:phases
14289 (modify-phases %standard-phases
14290 (add-after 'unpack 'delete-python2-code
14291 (lambda _
14292 (for-each delete-file
14293 '("lib/activepapers/builtins2.py"
14294 "lib/activepapers/standardlib2.py"
14295 "lib/activepapers/utility2.py"))))
14296 (replace 'check
14297 (lambda _
14298 ;; Deactivate the test cases that download files
14299 (setenv "NO_NETWORK_ACCESS" "1")
14300 ;; For some strange reason, some tests fail if nosetests runs all
14301 ;; test modules in a single execution. They pass if each test
14302 ;; module is run individually.
14303 (for-each (lambda (filename)
14304 (invoke "nosetests"
14305 (string-append "tests/" filename)))
14306 (scandir "tests"
14307 (lambda (filename)
14308 (string-suffix? ".py" filename)))))))))
14309 (native-inputs
14310 `(("python-tempdir" ,python-tempdir)
14311 ("python-nose" ,python-nose)))
14312 (propagated-inputs
14313 `(("python-h5py" ,python-h5py)))
14314 (home-page "http://www.activepapers.org/")
14315 (synopsis "Executable papers for scientific computing")
14316 (description
14317 "ActivePapers is a tool for working with executable papers, which
14318 combine data, code, and documentation in single-file packages,
14319 suitable for publication as supplementary material or on repositories
14320 such as figshare or Zenodo.")
14321 (properties `((python2-variant . ,(delay python2-activepapers))))
14322 (license license:bsd-3)))
14323
14324 (define-public python2-activepapers
14325 (let ((base (package-with-python2
14326 (strip-python2-variant python-activepapers))))
14327 (package
14328 (inherit base)
14329 (arguments
14330 (substitute-keyword-arguments (package-arguments base)
14331 ((#:phases phases)
14332 `(modify-phases ,phases
14333 (delete 'delete-python2-code)
14334 (add-after 'unpack 'delete-python3-code
14335 (lambda _
14336 (for-each delete-file
14337 '("lib/activepapers/builtins3.py"
14338 "lib/activepapers/standardlib3.py"
14339 "lib/activepapers/utility3.py")))))))))))
14340
14341 (define-public python-semver
14342 (package
14343 (name "python-semver")
14344 (version "2.9.0")
14345 (source
14346 (origin
14347 (method url-fetch)
14348 (uri (pypi-uri "semver" version))
14349 (sha256
14350 (base32
14351 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14352 (build-system python-build-system)
14353 (native-inputs
14354 `(("python-tox" ,python-tox)
14355 ("python-virtualenv" ,python-virtualenv)))
14356 (home-page "https://github.com/k-bx/python-semver")
14357 (synopsis "Python helper for Semantic Versioning")
14358 (description "This package provides a Python library for
14359 @url{Semantic Versioning, http://semver.org/}.")
14360 (license license:bsd-3)))
14361
14362 (define-public python2-semver
14363 (package-with-python2 python-semver))
14364
14365 (define-public python-pyro4
14366 (package
14367 (name "python-pyro4")
14368 (version "4.77")
14369 (source
14370 (origin
14371 (method url-fetch)
14372 (uri (pypi-uri "Pyro4" version))
14373 (sha256
14374 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14375 (build-system python-build-system)
14376 (arguments
14377 '(#:tests? #f)) ;FIXME: Some tests require network access.
14378 (native-inputs
14379 `(("python-cloudpickle" ,python-cloudpickle)
14380 ("python-dill" ,python-dill)
14381 ("python-msgpack" ,python-msgpack)))
14382 (propagated-inputs
14383 `(("python-serpent" ,python-serpent)))
14384 (home-page "https://pyro4.readthedocs.io")
14385 (synopsis "Distributed object middleware for Python")
14386 (description
14387 "Pyro enables you to build applications in which objects can talk to each
14388 other over the network. You can just use normal Python method calls to call
14389 objects on other machines, also known as remote procedure calls (RPC).")
14390 (license license:expat)))
14391
14392 (define-public python2-pyro
14393 (package
14394 (name "python2-pyro")
14395 (version "3.16")
14396 (source
14397 (origin
14398 (method url-fetch)
14399 (uri (pypi-uri "Pyro" version))
14400 (file-name (string-append "Pyro-" version ".tar.gz"))
14401 (sha256
14402 (base32
14403 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14404 (build-system python-build-system)
14405 (arguments
14406 ;; Pyro is not compatible with Python 3
14407 `(#:python ,python-2
14408 ;; Pyro has no test cases for automatic execution
14409 #:tests? #f))
14410 (home-page "http://pythonhosted.org/Pyro/")
14411 (synopsis "Distributed object manager for Python")
14412 (description "Pyro is a Distributed Object Technology system
14413 written in Python that is designed to be easy to use. It resembles
14414 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14415 which is a system and language independent Distributed Object Technology
14416 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14417 longer maintained. New projects should use Pyro4 instead, which
14418 is the new Pyro version that is actively developed.")
14419 (license license:expat)))
14420
14421 (define-public python2-scientific
14422 (package
14423 (name "python2-scientific")
14424 (version "2.9.4")
14425 (source
14426 (origin
14427 (method git-fetch)
14428 (uri (git-reference
14429 (url "https://github.com/khinsen/ScientificPython")
14430 (commit (string-append "rel" version))))
14431 (file-name (git-file-name name version))
14432 (sha256
14433 (base32
14434 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
14435 (build-system python-build-system)
14436 (inputs
14437 `(("netcdf" ,netcdf)))
14438 (propagated-inputs
14439 `(("python-numpy" ,python2-numpy-1.8)
14440 ("python-pyro" ,python2-pyro)))
14441 (arguments
14442 ;; ScientificPython is not compatible with Python 3
14443 `(#:python ,python-2
14444 #:tests? #f ; No test suite
14445 #:phases
14446 (modify-phases %standard-phases
14447 (replace 'build
14448 (lambda* (#:key inputs #:allow-other-keys)
14449 (invoke "python" "setup.py" "build"
14450 (string-append "--netcdf_prefix="
14451 (assoc-ref inputs "netcdf"))))))))
14452 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
14453 (synopsis "Python modules for scientific computing")
14454 (description "ScientificPython is a collection of Python modules that are
14455 useful for scientific computing. Most modules are rather general (Geometry,
14456 physical units, automatic derivatives, ...) whereas others are more
14457 domain-specific (e.g. netCDF and PDB support). The library is currently
14458 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14459 (license license:cecill-c)))
14460
14461 (define-public python2-mmtk
14462 (package
14463 (name "python2-mmtk")
14464 (version "2.7.12")
14465 (source
14466 (origin
14467 (method git-fetch)
14468 (uri (git-reference
14469 (url "https://github.com/khinsen/MMTK")
14470 (commit (string-append "rel" version))))
14471 (file-name (git-file-name name version))
14472 (sha256
14473 (base32
14474 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
14475 (build-system python-build-system)
14476 (native-inputs
14477 `(("netcdf" ,netcdf)))
14478 (propagated-inputs
14479 `(("python-scientific" ,python2-scientific)
14480 ("python-tkinter" ,python-2 "tk")))
14481 (arguments
14482 `(#:python ,python-2
14483 #:tests? #f
14484 #:phases
14485 (modify-phases %standard-phases
14486 (add-before 'build 'includes-from-scientific
14487 (lambda* (#:key inputs #:allow-other-keys)
14488 (mkdir-p "Include/Scientific")
14489 (copy-recursively
14490 (string-append
14491 (assoc-ref inputs "python-scientific")
14492 "/include/python2.7/Scientific")
14493 "Include/Scientific"))))))
14494 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14495 (synopsis "Python library for molecular simulation")
14496 (description "MMTK is a library for molecular simulations with an emphasis
14497 on biomolecules. It provides widely used methods such as Molecular Dynamics
14498 and normal mode analysis, but also basic routines for implementing new methods
14499 for simulation and analysis. The library is currently not actively maintained
14500 and works only with Python 2 and NumPy < 1.9.")
14501 (license license:cecill-c)))
14502
14503 (define-public python-phonenumbers
14504 (package
14505 (name "python-phonenumbers")
14506 (version "8.9.1")
14507 (source
14508 (origin
14509 (method url-fetch)
14510 (uri (pypi-uri "phonenumbers" version))
14511 (sha256
14512 (base32
14513 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14514 (build-system python-build-system)
14515 (home-page
14516 "https://github.com/daviddrysdale/python-phonenumbers")
14517 (synopsis
14518 "Python library for dealing with international phone numbers")
14519 (description
14520 "This package provides a Python port of Google's libphonenumber library.")
14521 (license license:asl2.0)))
14522
14523 (define-public python2-phonenumbers
14524 (package-with-python2 python-phonenumbers))
14525
14526 (define-public python-send2trash
14527 (package
14528 (name "python-send2trash")
14529 (version "1.5.0")
14530 (source
14531 (origin (method git-fetch)
14532 ;; Source tarball on PyPI doesn't include tests.
14533 (uri (git-reference
14534 (url "https://github.com/hsoft/send2trash.git")
14535 (commit version)))
14536 (file-name (git-file-name name version))
14537 (sha256
14538 (base32
14539 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14540 (build-system python-build-system)
14541 (arguments
14542 '(#:phases
14543 (modify-phases %standard-phases
14544 (add-before 'check 'pre-check
14545 (lambda _
14546 (mkdir-p "/tmp/foo")
14547 (setenv "HOME" "/tmp/foo")
14548 #t)))))
14549 (home-page "https://github.com/hsoft/send2trash")
14550 (synopsis "Send files to the user's @file{~/Trash} directory")
14551 (description "This package provides a Python library to send files to the
14552 user's @file{~/Trash} directory.")
14553 (properties `((python2-variant . ,(delay python2-send2trash))))
14554 (license license:bsd-3)))
14555
14556 (define-public python2-send2trash
14557 (package
14558 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14559 (arguments
14560 (substitute-keyword-arguments (package-arguments python-send2trash)
14561 ((#:phases phases)
14562 `(modify-phases ,phases
14563 (add-before 'check 'setenv
14564 (lambda _
14565 (setenv "PYTHONPATH"
14566 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14567 #t))))))))
14568
14569 (define-public python-yapf
14570 (package
14571 (name "python-yapf")
14572 (version "0.29.0")
14573 (source
14574 (origin
14575 (method url-fetch)
14576 (uri (pypi-uri "yapf" version))
14577 (sha256
14578 (base32
14579 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
14580 (build-system python-build-system)
14581 (home-page "https://github.com/google/yapf")
14582 (synopsis "Formatter for Python code")
14583 (description "YAPF is a formatter for Python code. It's based off of
14584 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14585 takes the code and reformats it to the best formatting that conforms to the
14586 style guide, even if the original code didn't violate the style guide.")
14587 (license license:asl2.0)))
14588
14589 (define-public python2-yapf
14590 (package-with-python2 python-yapf))
14591
14592 (define-public python-gyp
14593 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14594 (revision "0"))
14595 (package
14596 (name "python-gyp")
14597 ;; Google does not release versions,
14598 ;; based on second most recent commit date.
14599 (version (git-version "0.0.0" revision commit))
14600 (source
14601 (origin
14602 ;; Google does not release tarballs,
14603 ;; git checkout is needed.
14604 (method git-fetch)
14605 (uri (git-reference
14606 (url "https://chromium.googlesource.com/external/gyp")
14607 (commit commit)))
14608 (file-name (git-file-name name version))
14609 (sha256
14610 (base32
14611 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14612 (build-system python-build-system)
14613 (home-page "https://gyp.gsrc.io/")
14614 (synopsis "GYP is a Meta-Build system")
14615 (description
14616 "GYP builds build systems for large, cross platform applications.
14617 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14618 files, and Makefiles.")
14619 (license license:bsd-3))))
14620
14621 (define-public python2-gyp
14622 (package-with-python2 python-gyp))
14623
14624 (define-public python-whatever
14625 (package
14626 (name "python-whatever")
14627 (version "0.6")
14628 (source
14629 (origin
14630 (method git-fetch)
14631 (uri (git-reference
14632 (url "https://github.com/Suor/whatever")
14633 (commit version)))
14634 (file-name (git-file-name name version))
14635 (sha256
14636 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
14637 (build-system python-build-system)
14638 (arguments
14639 `(#:phases
14640 (modify-phases %standard-phases
14641 (replace 'check
14642 (lambda _
14643 (invoke "py.test"))))))
14644 (native-inputs
14645 `(("python-pytest" ,python-pytest)))
14646 (home-page "http://github.com/Suor/whatever")
14647 (synopsis "Make anonymous functions by partial application of operators")
14648 (description "@code{whatever} provides an easy way to make anonymous
14649 functions by partial application of operators.")
14650 (license license:bsd-3)))
14651
14652 (define-public python2-whatever
14653 (package-with-python2 python-whatever))
14654
14655 (define-public python-funcy
14656 (package
14657 (name "python-funcy")
14658 (version "1.11")
14659 (source
14660 (origin
14661 (method git-fetch)
14662 (uri (git-reference
14663 (url "https://github.com/Suor/funcy.git")
14664 (commit version)))
14665 (sha256
14666 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14667 (file-name (git-file-name name version))))
14668 (build-system python-build-system)
14669 (arguments
14670 `(#:phases
14671 (modify-phases %standard-phases
14672 (replace 'check
14673 (lambda _
14674 (invoke "py.test"))))))
14675 (native-inputs
14676 `(("python-pytest" ,python-pytest)
14677 ("python-whatever" ,python-whatever)))
14678 (home-page "http://github.com/Suor/funcy")
14679 (synopsis "Functional tools")
14680 (description "@code{funcy} is a library that provides functional tools.
14681 Examples are:
14682 @enumerate
14683 @item merge - Merges collections of the same type
14684 @item walk - Type-preserving map
14685 @item select - Selects a part of a collection
14686 @item take - Takes the first n items of a collection
14687 @item first - Takes the first item of a collection
14688 @item remove - Predicated-removes items of a collection
14689 @item concat - Concatenates two collections
14690 @item flatten - Flattens a collection with subcollections
14691 @item distinct - Returns only distinct items
14692 @item split - Predicated-splits a collection
14693 @item split_at - Splits a collection at a given item
14694 @item group_by - Groups items by group
14695 @item pairwise - Pairs off adjacent items
14696 @item partial - Partially-applies a function
14697 @item curry - Curries a function
14698 @item compose - Composes functions
14699 @item complement - Complements a predicate
14700 @item all_fn - \"all\" with predicate
14701 @end enumerate")
14702 (license license:bsd-3)))
14703
14704 (define-public python2-funcy
14705 (package-with-python2 python-funcy))
14706
14707 (define-public python-isoweek
14708 (package
14709 (name "python-isoweek")
14710 (version "1.3.3")
14711 (source
14712 (origin
14713 (method url-fetch)
14714 (uri (pypi-uri "isoweek" version))
14715 (sha256
14716 (base32
14717 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14718 (build-system python-build-system)
14719 (home-page "https://github.com/gisle/isoweek")
14720 (synopsis "Objects representing a week")
14721 (description "The @code{isoweek} module provide the class Week that
14722 implements the week definition of ISO 8601. This standard also defines
14723 a notation for identifying weeks; yyyyWww (where the W is a literal).
14724 Week instances stringify to this form.")
14725 (license license:bsd-3)))
14726
14727 (define-public python2-isoweek
14728 (package-with-python2 python-isoweek))
14729
14730 (define-public python-tokenize-rt
14731 (package
14732 (name "python-tokenize-rt")
14733 (version "2.0.1")
14734 (source
14735 (origin
14736 (method url-fetch)
14737 (uri (pypi-uri "tokenize-rt" version))
14738 (sha256
14739 (base32
14740 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14741 (build-system python-build-system)
14742 (home-page "https://github.com/asottile/tokenize-rt")
14743 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14744 (description
14745 "This Python library is a wrapper around @code{tokenize} from the Python
14746 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14747 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14748 and @code{tokens_to_src} to roundtrip.")
14749 (license license:expat)))
14750
14751 (define-public python-future-fstrings
14752 (package
14753 (name "python-future-fstrings")
14754 (version "0.4.1")
14755 (source
14756 (origin
14757 (method url-fetch)
14758 (uri (pypi-uri "future_fstrings" version))
14759 (sha256
14760 (base32
14761 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14762 (build-system python-build-system)
14763 (propagated-inputs
14764 `(("python-tokenize-rt" ,python-tokenize-rt)))
14765 (home-page "https://github.com/asottile/future-fstrings")
14766 (synopsis "Backport of fstrings to Python < 3.6")
14767 (description
14768 "This package provides a UTF-8 compatible encoding
14769 @code{future_fstrings}, which performs source manipulation. It decodes the
14770 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14771 @code{f} strings.")
14772 (license license:expat)))
14773
14774 (define-public python-typed-ast
14775 (package
14776 (name "python-typed-ast")
14777 (version "1.4.0")
14778 (source
14779 (origin
14780 (method git-fetch)
14781 (uri (git-reference
14782 (url "https://github.com/python/typed_ast.git")
14783 (commit version)))
14784 (sha256
14785 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14786 (file-name (git-file-name name version))))
14787 (build-system python-build-system)
14788 (arguments
14789 `(#:modules ((guix build utils)
14790 (guix build python-build-system)
14791 (ice-9 ftw)
14792 (srfi srfi-1)
14793 (srfi srfi-26))
14794 #:phases
14795 (modify-phases %standard-phases
14796 (replace 'check
14797 (lambda _
14798 (let ((cwd (getcwd)))
14799 (setenv "PYTHONPATH"
14800 (string-append cwd "/build/"
14801 (find (cut string-prefix? "lib" <>)
14802 (scandir (string-append cwd "/build")))
14803 ":"
14804 (getenv "PYTHONPATH"))))
14805 (invoke "pytest")
14806 #t)))))
14807 (native-inputs `(("python-pytest" ,python-pytest)))
14808 (home-page "https://github.com/python/typed_ast")
14809 (synopsis "Fork of Python @code{ast} modules with type comment support")
14810 (description "This package provides a parser similar to the standard
14811 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14812 include PEP 484 type comments and are independent of the version of Python
14813 under which they are run. The @code{typed_ast} parsers produce the standard
14814 Python AST (plus type comments), and are both fast and correct, as they are
14815 based on the CPython 2.7 and 3.7 parsers.")
14816 ;; See the file "LICENSE" for the details.
14817 (license (list license:psfl
14818 license:asl2.0
14819 license:expat)))) ;ast27/Parser/spark.py
14820
14821 (define-public python-typing
14822 (package
14823 (name "python-typing")
14824 (version "3.6.6")
14825 (source
14826 (origin
14827 (method url-fetch)
14828 (uri (pypi-uri "typing" version))
14829 (sha256
14830 (base32
14831 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14832 (build-system python-build-system)
14833 (home-page "https://docs.python.org/3/library/typing.html")
14834 (synopsis "Type hints for Python")
14835 (description "This is a backport of the standard library @code{typing}
14836 module to Python versions older than 3.5. Typing defines a standard notation
14837 for Python function and variable type annotations. The notation can be used
14838 for documenting code in a concise, standard format, and it has been designed
14839 to also be used by static and runtime type checkers, static analyzers, IDEs
14840 and other tools.")
14841 (license license:psfl)))
14842
14843 (define-public python2-typing
14844 (package-with-python2 python-typing))
14845
14846 (define-public python-typing-extensions
14847 (package
14848 (name "python-typing-extensions")
14849 (version "3.7.2")
14850 (source
14851 (origin
14852 (method url-fetch)
14853 (uri (pypi-uri "typing_extensions" version))
14854 (sha256
14855 (base32
14856 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14857 (build-system python-build-system)
14858 (home-page
14859 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14860 (synopsis "Experimental type hints for Python")
14861 (description
14862 "The typing_extensions module contains additional @code{typing} hints not
14863 yet present in the of the @code{typing} standard library.
14864 Included are implementations of:
14865 @enumerate
14866 @item ClassVar
14867 @item ContextManager
14868 @item Counter
14869 @item DefaultDict
14870 @item Deque
14871 @item NewType
14872 @item NoReturn
14873 @item overload
14874 @item Protocol
14875 @item runtime
14876 @item Text
14877 @item Type
14878 @item TYPE_CHECKING
14879 @item AsyncGenerator
14880 @end enumerate\n")
14881 (license license:psfl)))
14882
14883 (define-public bpython
14884 (package
14885 (name "bpython")
14886 (version "0.18")
14887 (source
14888 (origin
14889 (method url-fetch)
14890 (uri (pypi-uri "bpython" version))
14891 (sha256
14892 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
14893 (build-system python-build-system)
14894 (arguments
14895 `(#:phases
14896 (modify-phases %standard-phases
14897 (add-after 'unpack 'remove-failing-test
14898 (lambda _
14899 ;; Remove failing test. FIXME: make it pass
14900 (delete-file "bpython/test/test_args.py")
14901 #t))
14902 (add-after 'wrap 'add-aliases
14903 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14904 (lambda* (#:key outputs #:allow-other-keys)
14905 (let ((out (assoc-ref outputs "out")))
14906 (for-each
14907 (lambda (old new)
14908 (symlink old (string-append out "/bin/" new)))
14909 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14910 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14911 #t)))))
14912 (propagated-inputs
14913 `(("python-pygments" ,python-pygments)
14914 ("python-requests" ,python-requests)
14915 ("python-babel" ,python-babel) ; optional, for internationalization
14916 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14917 ("python-greenlet" ,python-greenlet)
14918 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14919 ("python-six" ,python-six)))
14920 (native-inputs
14921 `(("python-sphinx" ,python-sphinx)
14922 ("python-mock" ,python-mock)))
14923 (home-page "https://bpython-interpreter.org/")
14924 (synopsis "Fancy interface to the Python interpreter")
14925 (description "Bpython is a fancy interface to the Python
14926 interpreter. bpython's main features are
14927
14928 @enumerate
14929 @item in-line syntax highlighting,
14930 @item readline-like autocomplete with suggestions displayed as you type,
14931 @item expected parameter list for any Python function,
14932 @item \"rewind\" function to pop the last line of code from memory and
14933 re-evaluate,
14934 @item send the code you've entered off to a pastebin,
14935 @item save the code you've entered to a file, and
14936 @item auto-indentation.
14937 @end enumerate")
14938 (license license:expat)))
14939
14940 (define-public bpython2
14941 (let ((base (package-with-python2
14942 (strip-python2-variant bpython))))
14943 (package (inherit base)
14944 (name "bpython2")
14945 (arguments
14946 `(#:python ,python-2
14947 #:phases
14948 (modify-phases %standard-phases
14949 (add-after 'unpack 'remove-failing-test
14950 (lambda _
14951 ;; Remove failing test. FIXME: make it pass
14952 (delete-file "bpython/test/test_args.py")
14953 ;; Disable failing test-cases (renaming inhibits they are
14954 ;; discovered)
14955 (substitute* "bpython/test/test_curtsies_repl.py"
14956 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14957 (string-append a "xxx_off_" b))
14958 (("^(\\s*def )(test_complex\\W)" _ a b)
14959 (string-append a "xxx_off_" b)))
14960 #t))
14961 (add-before 'build 'rename-scripts
14962 ;; rename the scripts to bypthon2, bpdb2, etc.
14963 (lambda _
14964 (substitute* "setup.py"
14965 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14966 (string-append name "2" rest "\n"))
14967 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14968 (string-append name "2" (or sub "") rest "\n")))
14969 #t))))))))
14970
14971 (define-public python-pyinotify
14972 (package
14973 (name "python-pyinotify")
14974 (version "0.9.6")
14975 (source (origin
14976 (method url-fetch)
14977 (uri (pypi-uri "pyinotify" version))
14978 (sha256
14979 (base32
14980 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14981 (build-system python-build-system)
14982 (arguments `(#:tests? #f)) ;no tests
14983 (home-page "https://github.com/seb-m/pyinotify")
14984 (synopsis "Python library for monitoring inotify events")
14985 (description
14986 "@code{pyinotify} provides a Python interface for monitoring
14987 file system events on Linux.")
14988 (license license:expat)))
14989
14990 (define-public python2-pyinotify
14991 (package-with-python2 python-pyinotify))
14992
14993 ;; Ada parser uses this version.
14994 (define-public python2-quex-0.67.3
14995 (package
14996 (name "python2-quex")
14997 (version "0.67.3")
14998 (source
14999 (origin
15000 (method url-fetch)
15001 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15002 (version-major+minor version)
15003 "/quex-" version ".zip"))
15004 (sha256
15005 (base32
15006 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15007 (build-system python-build-system)
15008 (native-inputs
15009 `(("unzip" ,unzip)))
15010 (arguments
15011 `(#:python ,python-2
15012 #:tests? #f
15013 #:phases
15014 (modify-phases %standard-phases
15015 (delete 'configure)
15016 (delete 'build)
15017 (replace 'install
15018 (lambda* (#:key outputs #:allow-other-keys)
15019 (let* ((out (assoc-ref outputs "out"))
15020 (share/quex (string-append out "/share/quex"))
15021 (bin (string-append out "/bin")))
15022 (copy-recursively "." share/quex)
15023 (mkdir-p bin)
15024 (symlink (string-append share/quex "/quex-exe.py")
15025 (string-append bin "/quex"))
15026 #t))))))
15027 (native-search-paths
15028 (list (search-path-specification
15029 (variable "QUEX_PATH")
15030 (files '("share/quex")))))
15031 (home-page "http://quex.sourceforge.net/")
15032 (synopsis "Lexical analyzer generator in Python")
15033 (description "@code{quex} is a lexical analyzer generator in Python.")
15034 (license license:lgpl2.1+))) ; Non-military
15035
15036 (define-public python2-quex
15037 (package (inherit python2-quex-0.67.3)
15038 (name "python2-quex")
15039 (version "0.68.1")
15040 (source
15041 (origin
15042 (method url-fetch)
15043 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15044 (sha256
15045 (base32
15046 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15047 (file-name (string-append name "-" version ".tar.gz"))))))
15048
15049 (define-public python-more-itertools
15050 (package
15051 (name "python-more-itertools")
15052 (version "7.1.0")
15053 (source
15054 (origin
15055 (method url-fetch)
15056 (uri (pypi-uri "more-itertools" version))
15057 (sha256
15058 (base32
15059 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15060 (build-system python-build-system)
15061 (home-page "https://github.com/erikrose/more-itertools")
15062 (synopsis "More routines for operating on iterables, beyond itertools")
15063 (description "Python's built-in @code{itertools} module implements a
15064 number of iterator building blocks inspired by constructs from APL, Haskell,
15065 and SML. @code{more-itertools} includes additional building blocks for
15066 working with iterables.")
15067 (properties `((python2-variant . ,(delay python2-more-itertools))))
15068 (license license:expat)))
15069
15070 ;; The 5.x series are the last versions supporting Python 2.7.
15071 (define-public python2-more-itertools
15072 (package
15073 (inherit python-more-itertools)
15074 (name "python2-more-itertools")
15075 (version "5.0.0")
15076 (source (origin
15077 (method url-fetch)
15078 (uri (pypi-uri "more-itertools" version))
15079 (sha256
15080 (base32
15081 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15082 (arguments
15083 `(#:python ,python2-minimal))
15084 (propagated-inputs
15085 `(("python2-six" ,python2-six-bootstrap)))))
15086
15087 (define-public python-latexcodec
15088 (package
15089 (name "python-latexcodec")
15090 (version "1.0.7")
15091 (source
15092 (origin
15093 (method url-fetch)
15094 (uri (pypi-uri "latexcodec" version))
15095 (sha256
15096 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15097 (build-system python-build-system)
15098 (inputs
15099 `(("python-six" ,python-six)))
15100 (home-page "https://readthedocs.org/projects/latexcodec/")
15101 (synopsis "Work with LaTeX code in Python")
15102 (description "Lexer and codec to work with LaTeX code in Python.")
15103 (license license:expat)))
15104
15105 (define-public python-pybtex
15106 (package
15107 (name "python-pybtex")
15108 (version "0.22.2")
15109 (source
15110 (origin
15111 (method url-fetch)
15112 (uri (pypi-uri "pybtex" version))
15113 (sha256
15114 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15115 (build-system python-build-system)
15116 (native-inputs
15117 `(("python-nose" ,python-nose)))
15118 (inputs
15119 `(("python-latexcodec" ,python-latexcodec)
15120 ("python-pyyaml" ,python-pyyaml)
15121 ("python-six" ,python-six)))
15122 (arguments
15123 `(#:test-target "nosetests"))
15124 (home-page "https://pybtex.org/")
15125 (synopsis "BibTeX-compatible bibliography processor")
15126 (description "Pybtex is a BibTeX-compatible bibliography processor written
15127 in Python. You can simply type pybtex instead of bibtex.")
15128 (license license:expat)))
15129
15130 (define-public python-onetimepass
15131 (package
15132 (name "python-onetimepass")
15133 (version "1.0.1")
15134 (source
15135 (origin
15136 (method url-fetch)
15137 (uri (pypi-uri "onetimepass" version))
15138 (sha256
15139 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15140 (build-system python-build-system)
15141 (propagated-inputs `(("python-six" ,python-six)))
15142 (home-page "https://github.com/tadeck/onetimepass/")
15143 (synopsis "One-time password library")
15144 (description "Python one-time password library for HMAC-based (HOTP) and
15145 time-based (TOTP) passwords.")
15146 (license license:expat)))
15147
15148 (define-public python-parso
15149 (package
15150 (name "python-parso")
15151 (version "0.5.1")
15152 (source
15153 (origin
15154 (method url-fetch)
15155 (uri (pypi-uri "parso" version))
15156 (sha256
15157 (base32
15158 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15159 (native-inputs
15160 `(("python-pytest" ,python-pytest)))
15161 (build-system python-build-system)
15162 (arguments
15163 `(#:phases (modify-phases %standard-phases
15164 (replace 'check
15165 (lambda _ (invoke "pytest" "-vv"))))))
15166 (home-page "https://github.com/davidhalter/parso")
15167 (synopsis "Python Parser")
15168 (description "Parso is a Python parser that supports error recovery and
15169 round-trip parsing for different Python versions (in multiple Python versions).
15170 Parso is also able to list multiple syntax errors in your Python file.")
15171 (license license:expat)))
15172
15173 (define-public python2-parso
15174 (package-with-python2 python-parso))
15175
15176 (define-public python-async-generator
15177 (package
15178 (name "python-async-generator")
15179 (version "1.10")
15180 (source
15181 (origin
15182 (method url-fetch)
15183 (uri (pypi-uri "async_generator" version))
15184 (sha256
15185 (base32
15186 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15187 (build-system python-build-system)
15188 (native-inputs
15189 `(("python-pytest" ,python-pytest)))
15190 (home-page "https://github.com/python-trio/async_generator")
15191 (synopsis "Async generators and context managers for Python 3.5+")
15192 (description "@code{async_generator} back-ports Python 3.6's native async
15193 generators and Python 3.7's context managers into Python 3.5.")
15194 ;; Dual licensed.
15195 (license (list license:expat license:asl2.0))))
15196
15197 (define-public python-async-timeout
15198 (package
15199 (name "python-async-timeout")
15200 (version "3.0.1")
15201 (source
15202 (origin
15203 (method url-fetch)
15204 (uri (pypi-uri "async-timeout" version))
15205 (sha256
15206 (base32
15207 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15208 (build-system python-build-system)
15209 (home-page "https://github.com/aio-libs/async_timeout/")
15210 (synopsis "Timeout context manager for asyncio programs")
15211 (description "@code{async-timeout} provides a timeout timeout context
15212 manager compatible with @code{asyncio}.")
15213 (license license:asl2.0)))
15214
15215 (define-public python-glob2
15216 (package
15217 (name "python-glob2")
15218 (version "0.7")
15219 (source
15220 (origin
15221 (method git-fetch)
15222 (uri (git-reference
15223 (url "https://github.com/miracle2k/python-glob2.git")
15224 (commit (string-append "v" version))))
15225 (file-name (git-file-name name version))
15226 (sha256
15227 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15228 (build-system python-build-system)
15229 (home-page "https://github.com/miracle2k/python-glob2/")
15230 (synopsis "Extended Version of the python buildin glob module")
15231 (description "This is an extended version of the Python
15232 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15233 adds:
15234
15235 @itemize
15236 @item The ability to capture the text matched by glob patterns, and return
15237 those matches alongside the file names.
15238 @item A recursive @code{**} globbing syntax, akin for example to the
15239 @code{globstar} option of Bash.
15240 @item The ability to replace the file system functions used, in order to glob
15241 on virtual file systems.
15242 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15243 @end itemize
15244
15245 Glob2 currently based on the glob code from Python 3.3.1.")
15246 (license license:bsd-2)))
15247
15248 (define-public python2-glob2
15249 (package-with-python2 python-glob2))
15250
15251 (define-public python-gipc
15252 (package
15253 (name "python-gipc")
15254 (version "0.6.0")
15255 (source
15256 (origin
15257 (method url-fetch)
15258 (uri (pypi-uri "gipc" version ".zip"))
15259 (sha256
15260 (base32
15261 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15262 (build-system python-build-system)
15263 (native-inputs
15264 `(("unzip" ,unzip)))
15265 (propagated-inputs
15266 `(("python-gevent" ,python-gevent)))
15267 (home-page "http://gehrcke.de/gipc")
15268 (synopsis "Child process management in the context of gevent")
15269 (description "Usage of Python's multiprocessing package in a
15270 gevent-powered application may raise problems. With @code{gipc},
15271 process-based child processes can safely be created anywhere within a
15272 gevent-powered application.")
15273 (license license:expat)))
15274
15275 (define-public python2-gipc
15276 (package-with-python2 python-gipc))
15277
15278 (define-public python-fusepy
15279 (package
15280 (name "python-fusepy")
15281 (version "2.0.4")
15282 (source
15283 (origin
15284 (method url-fetch)
15285 (uri (pypi-uri "fusepy" version))
15286 (sha256
15287 (base32
15288 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15289 (build-system python-build-system)
15290 (arguments
15291 `(#:phases
15292 (modify-phases %standard-phases
15293 (add-before 'build 'set-library-file-name
15294 (lambda* (#:key inputs #:allow-other-keys)
15295 (let ((fuse (assoc-ref inputs "fuse")))
15296 (substitute* "fuse.py"
15297 (("find_library\\('fuse'\\)")
15298 (string-append "'" fuse "/lib/libfuse.so'")))
15299 #t))))))
15300 (propagated-inputs
15301 `(("fuse" ,fuse)))
15302 (home-page "https://github.com/fusepy/fusepy")
15303 (synopsis "Simple ctypes bindings for FUSE")
15304 (description "Python module that provides a simple interface to FUSE and
15305 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15306 (license license:isc)))
15307
15308 (define-public python2-fusepy
15309 (package-with-python2 python-fusepy))
15310
15311 (define-public python2-gdrivefs
15312 (package
15313 (name "python2-gdrivefs")
15314 (version "0.14.9")
15315 (source
15316 (origin
15317 (method url-fetch)
15318 (uri (pypi-uri "gdrivefs" version))
15319 (sha256
15320 (base32
15321 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15322 (build-system python-build-system)
15323 (arguments
15324 `(#:python ,python-2
15325 #:phases
15326 (modify-phases %standard-phases
15327 (add-before 'build 'patch-setup-py
15328 (lambda _
15329 ;; Update requirements from dependency==version
15330 ;; to dependency>=version
15331 (substitute* "gdrivefs/resources/requirements.txt"
15332 (("==") ">="))
15333 #t)))))
15334 (native-inputs
15335 `(("python2-gipc" ,python2-gipc)
15336 ("python2-gevent" ,python2-gevent)
15337 ("python2-greenlet" ,python2-greenlet)
15338 ("python2-httplib2" ,python2-httplib2)
15339 ("python2-uritemplate" ,python2-uritemplate)
15340 ("python2-oauth2client" ,python2-oauth2client)
15341 ("python2-six" ,python2-six)))
15342 (propagated-inputs
15343 `(("python2-dateutil" ,python2-dateutil)
15344 ("python2-fusepy" ,python2-fusepy)
15345 ("python2-google-api-client" ,python2-google-api-client)))
15346 (home-page "https://github.com/dsoprea/GDriveFS")
15347 (synopsis "Mount Google Drive as a local file system")
15348 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15349 under Python 2.7.")
15350 (license license:gpl2)))
15351
15352 (define-public pybind11
15353 (package
15354 (name "pybind11")
15355 (version "2.3.0")
15356 (source (origin
15357 (method git-fetch)
15358 (uri (git-reference
15359 (url "https://github.com/pybind/pybind11.git")
15360 (commit (string-append "v" version))))
15361 (sha256
15362 (base32
15363 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15364 (file-name (git-file-name name version))))
15365 (build-system cmake-build-system)
15366 (native-inputs
15367 `(("python" ,python)
15368 ("python-pytest" ,python-pytest)))
15369 (arguments
15370 `(#:test-target "check"))
15371 (home-page "https://github.com/pybind/pybind11/")
15372 (synopsis "Seamless operability between C++11 and Python")
15373 (description "pybind11 is a lightweight header-only library that exposes
15374 C++ types in Python and vice versa, mainly to create Python bindings of
15375 existing C++ code. Its goals and syntax are similar to the excellent
15376 Boost.Python library by David Abrahams: to minimize boilerplate code in
15377 traditional extension modules by inferring type information using compile-time
15378 introspection.")
15379 (license license:expat)))
15380
15381 (define-public python-fasteners
15382 (package
15383 (name "python-fasteners")
15384 (version "0.14.1")
15385 (source
15386 (origin
15387 (method url-fetch)
15388 (uri (pypi-uri "fasteners" version))
15389 (sha256
15390 (base32
15391 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15392 (build-system python-build-system)
15393 (propagated-inputs
15394 `(("python-monotonic" ,python-monotonic)
15395 ("python-six" ,python-six)
15396 ("python-testtools" ,python-testtools)))
15397 (home-page "https://github.com/harlowja/fasteners")
15398 (synopsis "Python package that provides useful locks")
15399 (description
15400 "This package provides a Python program that provides following locks:
15401
15402 @itemize
15403 @item Locking decorator
15404 @item Reader-writer locks
15405 @item Inter-process locks
15406 @item Generic helpers
15407 @end itemize\n")
15408 (properties `((python2-variant . ,(delay python2-fasteners))))
15409 (license license:asl2.0)))
15410
15411 (define-public python2-fasteners
15412 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15413 (package
15414 (inherit base)
15415 (propagated-inputs
15416 `(("python2-futures" ,python2-futures)
15417 ,@(package-propagated-inputs base))))))
15418
15419 (define-public python-requests-file
15420 (package
15421 (name "python-requests-file")
15422 (version "1.4.3")
15423 (source
15424 (origin
15425 (method url-fetch)
15426 (uri (pypi-uri "requests-file" version))
15427 (sha256
15428 (base32
15429 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15430 (build-system python-build-system)
15431 (propagated-inputs
15432 `(("python-requests" ,python-requests)
15433 ("python-six" ,python-six)))
15434 (home-page
15435 "https://github.com/dashea/requests-file")
15436 (synopsis "File transport adapter for Requests")
15437 (description
15438 "Requests-File is a transport adapter for use with the Requests Python
15439 library to allow local file system access via @code{file://} URLs.")
15440 (license license:asl2.0)))
15441
15442 (define-public python2-requests-file
15443 (package-with-python2 python-requests-file))
15444
15445 (define-public python-tldextract
15446 (package
15447 (name "python-tldextract")
15448 (version "2.2.0")
15449 (source
15450 (origin
15451 (method url-fetch)
15452 (uri (pypi-uri "tldextract" version))
15453 (sha256
15454 (base32
15455 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15456 (build-system python-build-system)
15457 (native-inputs
15458 `(("python-pytest" ,python-pytest)
15459 ("python-responses" ,python-responses)))
15460 (propagated-inputs
15461 `(("python-idna" ,python-idna)
15462 ("python-requests" ,python-requests)
15463 ("python-requests-file" ,python-requests-file)))
15464 (home-page
15465 "https://github.com/john-kurkowski/tldextract")
15466 (synopsis
15467 "Separate the TLD from the registered domain and subdomains of a URL")
15468 (description
15469 "TLDExtract accurately separates the TLD from the registered domain and
15470 subdomains of a URL, using the Public Suffix List. By default, this includes
15471 the public ICANN TLDs and their exceptions. It can optionally support the
15472 Public Suffix List's private domains as well.")
15473 (license license:bsd-3)))
15474
15475 (define-public python2-tldextract
15476 (package-with-python2 python-tldextract))
15477
15478 (define-public python-pynamecheap
15479 (package
15480 (name "python-pynamecheap")
15481 (version "0.0.3")
15482 (source
15483 (origin
15484 (method url-fetch)
15485 (uri (pypi-uri "PyNamecheap" version))
15486 (sha256
15487 (base32
15488 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15489 (build-system python-build-system)
15490 (propagated-inputs
15491 `(("python-requests" ,python-requests)))
15492 (home-page
15493 "https://github.com/Bemmu/PyNamecheap")
15494 (synopsis
15495 "Namecheap API client in Python")
15496 (description
15497 "PyNamecheap is a Namecheap API client in Python.")
15498 (license license:expat)))
15499
15500 (define-public python2-pynamecheap
15501 (package-with-python2 python-pynamecheap))
15502
15503 (define-public python-dns-lexicon
15504 (package
15505 (name "python-dns-lexicon")
15506 (version "2.4.0")
15507 (source
15508 (origin
15509 (method url-fetch)
15510 (uri (pypi-uri "dns-lexicon" version))
15511 (sha256
15512 (base32
15513 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15514 (build-system python-build-system)
15515 (arguments
15516 `(#:tests? #f)) ;requires internet access
15517 (propagated-inputs
15518 `(("python-future" ,python-future)
15519 ("python-pynamecheap" ,python-pynamecheap)
15520 ("python-requests" ,python-requests)
15521 ("python-tldextract" ,python-tldextract)
15522 ("python-urllib3" ,python-urllib3)))
15523 (home-page "https://github.com/AnalogJ/lexicon")
15524 (synopsis
15525 "Manipulate DNS records on various DNS providers")
15526 (description
15527 "Lexicon provides a way to manipulate DNS records on multiple DNS
15528 providers in a standardized way. It has a CLI but it can also be used as a
15529 Python library. It was designed to be used in automation, specifically with
15530 Let's Encrypt.")
15531 (license license:expat)))
15532
15533 (define-public python2-dns-lexicon
15534 (package-with-python2 python-dns-lexicon))
15535
15536 (define-public python-commandlines
15537 (package
15538 (name "python-commandlines")
15539 (version "0.4.1")
15540 (source
15541 (origin
15542 (method url-fetch)
15543 (uri (pypi-uri "commandlines" version))
15544 (sha256
15545 (base32
15546 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15547 (build-system python-build-system)
15548 (home-page "https://github.com/chrissimpkins/commandlines")
15549 (synopsis "Command line argument to object parsing library")
15550 (description
15551 "@code{Commandlines} is a Python library for command line application
15552 development that supports command line argument parsing, command string
15553 validation testing and application logic.")
15554 (license license:expat)))
15555
15556 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15557 ;; python-numba. They have a very unflexible relationship.
15558 (define-public python-numba
15559 (package
15560 (name "python-numba")
15561 (version "0.46.0")
15562 (source
15563 (origin
15564 (method url-fetch)
15565 (uri (pypi-uri "numba" version))
15566 (sha256
15567 (base32
15568 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
15569 (build-system python-build-system)
15570 (arguments
15571 `(#:modules ((guix build utils)
15572 (guix build python-build-system)
15573 (ice-9 ftw)
15574 (srfi srfi-1)
15575 (srfi srfi-26))
15576 #:phases
15577 (modify-phases %standard-phases
15578 (add-after 'unpack 'disable-proprietary-features
15579 (lambda _
15580 (setenv "NUMBA_DISABLE_HSA" "1")
15581 (setenv "NUMBA_DISABLE_CUDA" "1")
15582 #t))
15583 (add-after 'unpack 'remove-failing-tests
15584 (lambda _
15585 ;; FIXME: These tests fail for unknown reasons:
15586 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15587 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15588 (substitute* "numba/tests/test_dispatcher.py"
15589 (("def test(_non_writable_pycache)" _ m)
15590 (string-append "def guix_skip" m))
15591 (("def test(_non_creatable_pycache)" _ m)
15592 (string-append "def guix_skip" m))
15593 (("def test(_frozen)" _ m)
15594 (string-append "def guix_skip" m)))
15595
15596 ;; These tests fail because we don't run the tests from the build
15597 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15598 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
15599 (substitute* "numba/tests/test_pycc.py"
15600 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15601 (string-append "def guix_skip" m)))
15602
15603 ;; These tests fail because our version of Python does not have
15604 ;; a recognizable front-end for the Numba distribution to use
15605 ;; to check against.
15606 (substitute* "numba/tests/test_entrypoints.py"
15607 (("def test(_init_entrypoint)" _ m)
15608 (string-append "def guix_skip" m)))
15609 (substitute* "numba/tests/test_jitclasses.py"
15610 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15611 (string-append "def guix_skip" m)))
15612 #t))
15613 (replace 'check
15614 (lambda _
15615 (let ((cwd (getcwd)))
15616 (setenv "PYTHONPATH"
15617 (string-append cwd "/build/"
15618 (find (cut string-prefix? "lib" <>)
15619 (scandir (string-append cwd "/build")))
15620 ":"
15621 (getenv "PYTHONPATH")))
15622 ;; Something is wrong with the PYTHONPATH when running the
15623 ;; tests from the build directory, as it complains about not being
15624 ;; able to import certain modules.
15625 (with-directory-excursion "/tmp"
15626 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15627 #t)))))
15628 (propagated-inputs
15629 `(("python-llvmlite" ,python-llvmlite)
15630 ("python-numpy" ,python-numpy)
15631 ("python-singledispatch" ,python-singledispatch)))
15632 ;; Needed for tests.
15633 (inputs
15634 `(("python-jinja2" ,python-jinja2)
15635 ("python-pygments" ,python-pygments)))
15636 (home-page "https://numba.pydata.org")
15637 (synopsis "Compile Python code using LLVM")
15638 (description "Numba gives you the power to speed up your applications with
15639 high performance functions written directly in Python. With a few
15640 annotations, array-oriented and math-heavy Python code can be just-in-time
15641 compiled to native machine instructions, similar in performance to C, C++ and
15642 Fortran, without having to switch languages or Python interpreters.
15643
15644 Numba works by generating optimized machine code using the LLVM compiler
15645 infrastructure at import time, runtime, or statically (using the included pycc
15646 tool).")
15647 (license license:bsd-3)))
15648
15649 (define-public python-anndata
15650 (package
15651 (name "python-anndata")
15652 (version "0.6.18")
15653 (source
15654 (origin
15655 (method url-fetch)
15656 (uri (pypi-uri "anndata" version))
15657 (sha256
15658 (base32
15659 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15660 (build-system python-build-system)
15661 (propagated-inputs
15662 `(("python-h5py" ,python-h5py)
15663 ("python-natsort" ,python-natsort)
15664 ("python-pandas" ,python-pandas)
15665 ("python-scipy" ,python-scipy)))
15666 (home-page "https://github.com/theislab/anndata")
15667 (synopsis "Annotated data for data analysis pipelines")
15668 (description "Anndata is a package for simple (functional) high-level APIs
15669 for data analysis pipelines. In this context, it provides an efficient,
15670 scalable way of keeping track of data together with learned annotations and
15671 reduces the code overhead typically encountered when using a mostly
15672 object-oriented library such as @code{scikit-learn}.")
15673 (license license:bsd-3)))
15674
15675 (define-public python-dill
15676 (package
15677 (name "python-dill")
15678 (version "0.3.1.1")
15679 (source
15680 (origin
15681 (method url-fetch)
15682 (uri (pypi-uri "dill" version))
15683 (sha256
15684 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
15685 (build-system python-build-system)
15686 (arguments
15687 `(#:phases
15688 (modify-phases %standard-phases
15689 (replace 'check
15690 (lambda _
15691 (with-directory-excursion "/tmp"
15692 (invoke "nosetests" "-v"))
15693 #t)))))
15694 (native-inputs
15695 `(("python-nose" ,python-nose)))
15696 (home-page "https://pypi.org/project/dill/")
15697 (synopsis "Serialize all of Python")
15698 (description "Dill extends Python's @code{pickle} module for serializing
15699 and de-serializing Python objects to the majority of the built-in Python
15700 types. Dill provides the user the same interface as the @code{pickle} module,
15701 and also includes some additional features. In addition to pickling Python
15702 objects, @code{dill} provides the ability to save the state of an interpreter
15703 session in a single command. Hence, it would be feasible to save a
15704 interpreter session, close the interpreter, ship the pickled file to another
15705 computer, open a new interpreter, unpickle the session and thus continue from
15706 the saved state of the original interpreter session.")
15707 (license license:bsd-3)))
15708
15709 (define-public python-multiprocess
15710 (package
15711 (name "python-multiprocess")
15712 (version "0.70.9")
15713 (source
15714 (origin
15715 (method url-fetch)
15716 (uri (pypi-uri "multiprocess" version))
15717 (sha256
15718 (base32
15719 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
15720 (build-system python-build-system)
15721 (arguments
15722 `(#:phases
15723 (modify-phases %standard-phases
15724 (add-after 'unpack 'disable-broken-tests
15725 (lambda _
15726 ;; This test is broken as there is no keyboard interrupt.
15727 (substitute* "py3.7/multiprocess/tests/__init__.py"
15728 (("^(.*)def test_wait_result"
15729 line indent)
15730 (string-append indent
15731 "@unittest.skip(\"Disabled by Guix\")\n"
15732 line)))
15733 #t))
15734 ;; Tests must be run after installation.
15735 (delete 'check)
15736 (add-after 'install 'check
15737 (lambda* (#:key inputs outputs #:allow-other-keys)
15738 (add-installed-pythonpath inputs outputs)
15739 (invoke "python" "-m" "multiprocess.tests")
15740 #t)))))
15741 (propagated-inputs
15742 `(("python-dill" ,python-dill)))
15743 (home-page "https://pypi.org/project/multiprocess/")
15744 (synopsis "Multiprocessing and multithreading in Python")
15745 (description
15746 "This package is a fork of the multiprocessing Python package, a package
15747 which supports the spawning of processes using the API of the standard
15748 library's @code{threading} module.")
15749 (license license:bsd-3)))
15750
15751 (define-public python-toolz
15752 (package
15753 (name "python-toolz")
15754 (version "0.9.0")
15755 (source
15756 (origin
15757 (method url-fetch)
15758 (uri (pypi-uri "toolz" version))
15759 (sha256
15760 (base32
15761 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15762 (build-system python-build-system)
15763 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15764 ;; unregistered loader type"
15765 (arguments '(#:tests? #f))
15766 (home-page "https://github.com/pytoolz/toolz/")
15767 (synopsis "List processing tools and functional utilities")
15768 (description
15769 "This package provides a set of utility functions for iterators,
15770 functions, and dictionaries.")
15771 (license license:bsd-3)))
15772
15773 (define-public python2-toolz
15774 (package-with-python2 python-toolz))
15775
15776 (define-public python-cytoolz
15777 (package
15778 (name "python-cytoolz")
15779 (version "0.9.0.1")
15780 (source
15781 (origin
15782 (method url-fetch)
15783 (uri (pypi-uri "cytoolz" version))
15784 (sha256
15785 (base32
15786 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15787 (build-system python-build-system)
15788 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15789 ;; 'exceptions'"
15790 (arguments '(#:tests? #f))
15791 (propagated-inputs
15792 `(("python-toolz" ,python-toolz)))
15793 (native-inputs
15794 `(("python-cython" ,python-cython)))
15795 (home-page "https://github.com/pytoolz/cytoolz")
15796 (synopsis "High performance functional utilities")
15797 (description
15798 "The cytoolz package implements the same API as provided by toolz. The
15799 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15800 that is accessible to other projects developed in Cython.")
15801 (license license:bsd-3)))
15802
15803 (define-public python-sortedcontainers
15804 (package
15805 (name "python-sortedcontainers")
15806 (version "2.1.0")
15807 (source
15808 (origin
15809 (method url-fetch)
15810 (uri (pypi-uri "sortedcontainers" version))
15811 (sha256
15812 (base32
15813 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
15814 (build-system python-build-system)
15815 (native-inputs
15816 `(("python-tox" ,python-tox)))
15817 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15818 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15819 (description
15820 "This package provides a sorted collections library, written in
15821 pure-Python.")
15822 (license license:asl2.0)))
15823
15824 (define-public python-cloudpickle
15825 (package
15826 (name "python-cloudpickle")
15827 (version "0.6.1")
15828 (source
15829 (origin
15830 (method url-fetch)
15831 (uri (pypi-uri "cloudpickle" version))
15832 (sha256
15833 (base32
15834 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15835 (build-system python-build-system)
15836 ;; FIXME: there are 5 errors in 122 tests:
15837 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15838 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15839 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15840 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15841 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15842 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15843 (arguments '(#:tests? #f))
15844 (native-inputs
15845 `(("python-pytest" ,python-pytest)
15846 ("python-mock" ,python-mock)
15847 ("python-tornado" ,python-tornado)))
15848 (home-page "https://github.com/cloudpipe/cloudpickle")
15849 (synopsis "Extended pickling support for Python objects")
15850 (description
15851 "Cloudpickle makes it possible to serialize Python constructs not
15852 supported by the default pickle module from the Python standard library. It
15853 is especially useful for cluster computing where Python expressions are
15854 shipped over the network to execute on remote hosts, possibly close to the
15855 data.")
15856 (license license:bsd-3)))
15857
15858 (define-public python2-cloudpickle
15859 (package-with-python2 python-cloudpickle))
15860
15861 (define-public python-locket
15862 (package
15863 (name "python-locket")
15864 (version "0.2.0")
15865 (source
15866 (origin
15867 (method url-fetch)
15868 (uri (pypi-uri "locket" version))
15869 (sha256
15870 (base32
15871 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15872 (build-system python-build-system)
15873 (home-page "https://github.com/mwilliamson/locket.py")
15874 (synopsis "File-based locks for Python")
15875 (description
15876 "Locket implements a lock that can be used by multiple processes provided
15877 they use the same path.")
15878 (license license:bsd-2)))
15879
15880 (define-public python2-locket
15881 (package-with-python2 python-locket))
15882
15883 (define-public python-blosc
15884 (package
15885 (name "python-blosc")
15886 (version "1.5.1")
15887 (source
15888 (origin
15889 (method url-fetch)
15890 (uri (pypi-uri "blosc" version))
15891 (sha256
15892 (base32
15893 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15894 (build-system python-build-system)
15895 ;; FIXME: all tests pass, but then this error is printed:
15896 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15897 (arguments '(#:tests? #f))
15898 (propagated-inputs
15899 `(("python-numpy" ,python-numpy)))
15900 (home-page "https://github.com/blosc/python-blosc")
15901 (synopsis "Python wrapper for the Blosc data compressor library")
15902 (description "Blosc is a high performance compressor optimized for binary
15903 data. It has been designed to transmit data to the processor cache faster
15904 than the traditional, non-compressed, direct memory fetch approach via a
15905 @code{memcpy()} system call.
15906
15907 Blosc works well for compressing numerical arrays that contains data with
15908 relatively low entropy, like sparse data, time series, grids with
15909 regular-spaced values, etc.
15910
15911 This Python package wraps the Blosc library.")
15912 (license license:bsd-3)))
15913
15914 (define-public python2-blosc
15915 (package-with-python2 python-blosc))
15916
15917 (define-public python-partd
15918 (package
15919 (name "python-partd")
15920 (version "0.3.9")
15921 (source
15922 (origin
15923 (method url-fetch)
15924 (uri (pypi-uri "partd" version))
15925 (sha256
15926 (base32
15927 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15928 (build-system python-build-system)
15929 (propagated-inputs
15930 `(("python-blosc" ,python-blosc)
15931 ("python-locket" ,python-locket)
15932 ("python-numpy" ,python-numpy)
15933 ("python-pandas" ,python-pandas)
15934 ("python-pyzmq" ,python-pyzmq)
15935 ("python-toolz" ,python-toolz)))
15936 (home-page "https://github.com/dask/partd/")
15937 (synopsis "Appendable key-value storage")
15938 (description "Partd stores key-value pairs. Values are raw bytes. We
15939 append on old values. Partd excels at shuffling operations.")
15940 (license license:bsd-3)))
15941
15942 (define-public python2-partd
15943 (package-with-python2 python-partd))
15944
15945 (define-public python-fsspec
15946 (package
15947 (name "python-fsspec")
15948 (version "0.6.1")
15949 (source
15950 (origin
15951 (method url-fetch)
15952 (uri (pypi-uri "fsspec" version))
15953 (sha256
15954 (base32
15955 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
15956 (build-system python-build-system)
15957 (arguments '(#:tests? #f)) ; there are none
15958 (home-page "https://github.com/intake/filesystem_spec")
15959 (synopsis "File-system specification")
15960 (description "The purpose of this package is to produce a template or
15961 specification for a file-system interface, that specific implementations
15962 should follow, so that applications making use of them can rely on a common
15963 behavior and not have to worry about the specific internal implementation
15964 decisions with any given backend.")
15965 (license license:bsd-3)))
15966
15967 (define-public python-dask
15968 (package
15969 (name "python-dask")
15970 (version "2.9.0")
15971 (source
15972 (origin
15973 (method url-fetch)
15974 (uri (pypi-uri "dask" version))
15975 (sha256
15976 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
15977 (build-system python-build-system)
15978 (arguments
15979 `(#:phases
15980 (modify-phases %standard-phases
15981 (add-after 'unpack 'disable-broken-tests
15982 (lambda _
15983 ;; This test is marked as xfail when pytest-xdist is used.
15984 (substitute* "dask/tests/test_threaded.py"
15985 (("def test_interrupt\\(\\)" m)
15986 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15987 m)))
15988 ;; This one fails with a type error:
15989 ;; TypeError: Already tz-aware, use tz_convert to convert.
15990 (substitute* "dask/dataframe/tests/test_shuffle.py"
15991 (("def test_set_index_timestamp\\(\\)" m)
15992 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15993 m)))
15994 #t))
15995 (replace 'check
15996 (lambda _ (invoke "pytest" "-vv"))))))
15997 (propagated-inputs
15998 `(("python-cloudpickle" ,python-cloudpickle)
15999 ("python-fsspec" ,python-fsspec)
16000 ("python-numpy" ,python-numpy)
16001 ("python-packaging" ,python-packaging)
16002 ("python-pandas" ,python-pandas)
16003 ("python-partd" ,python-partd)
16004 ("python-toolz" ,python-toolz)
16005 ("python-pyyaml" ,python-pyyaml)))
16006 (native-inputs
16007 `(("python-pytest" ,python-pytest)
16008 ("python-pytest-runner" ,python-pytest-runner)))
16009 (home-page "https://github.com/dask/dask/")
16010 (synopsis "Parallel computing with task scheduling")
16011 (description
16012 "Dask is a flexible parallel computing library for analytics. It
16013 consists of two components: dynamic task scheduling optimized for computation,
16014 and large data collections like parallel arrays, dataframes, and lists that
16015 extend common interfaces like NumPy, Pandas, or Python iterators to
16016 larger-than-memory or distributed environments. These parallel collections
16017 run on top of the dynamic task schedulers. ")
16018 (license license:bsd-3)))
16019
16020 (define-public python-ilinkedlist
16021 (package
16022 (name "python-ilinkedlist")
16023 (version "0.4.0")
16024 (source
16025 (origin
16026 (method url-fetch)
16027 (uri (pypi-uri "ilinkedlist" version))
16028 (sha256
16029 (base32
16030 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16031 (build-system python-build-system)
16032 (native-inputs `(("python-pytest" ,python-pytest)))
16033 (inputs `(("python" ,python)))
16034 (home-page "https://github.com/luther9/ilinkedlist-py")
16035 (synopsis "Immutable linked list library")
16036 (description
16037 "This is a implementation of immutable linked lists for Python. It
16038 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16039 Since a linked list is treated as immutable, it is hashable, and its length
16040 can be retrieved in constant time. Some of the terminology is inspired by
16041 LISP. It is possible to create an improper list by creating a @code{Pair}
16042 with a non-list @code{cdr}.")
16043 (license license:gpl3+)))
16044
16045 (define-public python-readlike
16046 (package
16047 (name "python-readlike")
16048 (version "0.1.3")
16049 (source
16050 (origin
16051 (method url-fetch)
16052 (uri (pypi-uri "readlike" version))
16053 (sha256
16054 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16055 (build-system python-build-system)
16056 (home-page "https://github.com/jangler/readlike")
16057 (synopsis "GNU Readline-like line editing module")
16058 (description
16059 "This Python module provides line editing functions similar to the default
16060 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16061 @code{readline} package, this one allows access to those capabilties in settings
16062 outside of a standard command-line interface. It is especially well-suited to
16063 interfacing with Urwid, due to a shared syntax for describing key inputs.
16064
16065 Currently, all stateless Readline commands are implemented. Yanking and history
16066 are not supported.")
16067 (license license:expat)))
16068
16069 (define-public python2-readlike
16070 (package-with-python2 python-readlike))
16071
16072 (define-public python-reparser
16073 (package
16074 (name "python-reparser")
16075 (version "1.4.3")
16076 (source
16077 (origin
16078 (method url-fetch)
16079 (uri (pypi-uri "ReParser" version))
16080 (sha256
16081 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16082 (build-system python-build-system)
16083 (home-page "https://github.com/xmikos/reparser")
16084 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16085 (description
16086 "This Python library provides a simple lexer/parser for inline markup based
16087 on regular expressions.")
16088 (license license:expat)))
16089
16090 (define-public python2-reparser
16091 (let ((reparser (package-with-python2
16092 (strip-python2-variant python-reparser))))
16093 (package (inherit reparser)
16094 (propagated-inputs
16095 `(("python2-enum34" ,python2-enum34)
16096 ,@(package-propagated-inputs reparser))))))
16097
16098 (define-public python-precis-i18n
16099 (package
16100 (name "python-precis-i18n")
16101 (version "1.0.0")
16102 (source
16103 (origin
16104 (method url-fetch)
16105 (uri (pypi-uri "precis_i18n" version))
16106 (sha256
16107 (base32
16108 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16109 (build-system python-build-system)
16110 (home-page "https://github.com/byllyfish/precis_i18n")
16111 (synopsis "Implementation of the PRECIS framework")
16112 (description
16113 "This module implements the PRECIS Framework as described in RFC 8264,
16114 RFC 8265 and RFC 8266.")
16115 (license license:expat)))
16116
16117 (define-public python-absl-py
16118 (package
16119 (name "python-absl-py")
16120 (version "0.6.1")
16121 (source
16122 (origin
16123 (method url-fetch)
16124 (uri (pypi-uri "absl-py" version))
16125 (sha256
16126 (base32
16127 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16128 (build-system python-build-system)
16129 (propagated-inputs
16130 `(("python-six" ,python-six)))
16131 (home-page "https://github.com/abseil/abseil-py")
16132 (synopsis "Abseil Python common libraries")
16133 (description
16134 "This package provides the Abseil Python Common Libraries, a collection
16135 of Python libraries for building Python applications.")
16136 (license license:asl2.0)))
16137
16138 (define-public python-astor
16139 (package
16140 (name "python-astor")
16141 (version "0.7.1")
16142 (source
16143 (origin
16144 (method url-fetch)
16145 (uri (pypi-uri "astor" version))
16146 (sha256
16147 (base32
16148 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16149 (build-system python-build-system)
16150 ;; FIXME: There are two errors and two test failures.
16151 (arguments `(#:tests? #f))
16152 (home-page "https://github.com/berkerpeksag/astor")
16153 (synopsis "Read and write Python ASTs")
16154 (description "Astor is designed to allow easy manipulation of Python
16155 source via the Abstract Syntax Tree.")
16156 (license license:bsd-3)))
16157
16158 (define-public python2-astor
16159 (package-with-python2 python-astor))
16160
16161 (define-public python-grpcio
16162 (package
16163 (name "python-grpcio")
16164 (version "1.17.1")
16165 (source
16166 (origin
16167 (method url-fetch)
16168 (uri (pypi-uri "grpcio" version))
16169 (sha256
16170 (base32
16171 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16172 (build-system python-build-system)
16173 (propagated-inputs
16174 `(("python-six" ,python-six)))
16175 (home-page "https://grpc.io")
16176 (synopsis "HTTP/2-based RPC framework")
16177 (description "This package provides a Python library for communicating
16178 with the HTTP/2-based RPC framework gRPC.")
16179 (license license:asl2.0)))
16180
16181 (define-public python-astunparse
16182 (package
16183 (name "python-astunparse")
16184 (version "1.6.2")
16185 (source
16186 (origin
16187 (method url-fetch)
16188 (uri (pypi-uri "astunparse" version))
16189 (sha256
16190 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16191 (build-system python-build-system)
16192 (arguments '(#:tests? #f)) ; there are none
16193 (propagated-inputs
16194 `(("python-six" ,python-six)
16195 ("python-wheel" ,python-wheel)))
16196 (home-page "https://github.com/simonpercivall/astunparse")
16197 (synopsis "AST unparser for Python")
16198 (description "This package provides an AST unparser for Python. It is a
16199 factored out version of @code{unparse} found in the Python source
16200 distribution.")
16201 (license license:bsd-3)))
16202
16203 (define-public python-gast
16204 (package
16205 (name "python-gast")
16206 (version "0.2.2")
16207 (source
16208 (origin
16209 (method url-fetch)
16210 (uri (pypi-uri "gast" version))
16211 (sha256
16212 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16213 (build-system python-build-system)
16214 (propagated-inputs
16215 `(("python-astunparse" ,python-astunparse)))
16216 (home-page "https://pypi.org/project/gast/")
16217 (synopsis "Generic Python AST that abstracts the underlying Python version")
16218 (description
16219 "GAST provides a compatibility layer between the AST of various Python
16220 versions, as produced by @code{ast.parse} from the standard @code{ast}
16221 module.")
16222 (license license:bsd-3)))
16223
16224 (define-public python-wikidata
16225 (package
16226 (name "python-wikidata")
16227 (version "0.6.1")
16228 (source
16229 (origin
16230 (method url-fetch)
16231 (uri (pypi-uri "Wikidata" version))
16232 (sha256
16233 (base32
16234 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16235 (build-system python-build-system)
16236 (propagated-inputs
16237 `(("python-babel" ,python-babel)))
16238 (home-page "https://github.com/dahlia/wikidata")
16239 (synopsis "Wikidata client library")
16240 (description
16241 "This package provides a Python interface to
16242 @url{https://www.wikidata.org/, Wikidata}.")
16243 (properties '((upstream-name . "Wikidata")))
16244 (license license:gpl3+)))
16245
16246 (define-public python-doctest-ignore-unicode
16247 (package
16248 (name "python-doctest-ignore-unicode")
16249 (version "0.1.2")
16250 (source
16251 (origin
16252 (method url-fetch)
16253 (uri (pypi-uri "doctest-ignore-unicode" version))
16254 (sha256
16255 (base32
16256 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16257 (build-system python-build-system)
16258 (native-inputs
16259 `(("python-nose" ,python-nose)))
16260 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16261 (synopsis "Ignore Unicode literal prefixes in doctests")
16262 (description
16263 "This package adds support for a flag to ignore Unicode literal prefixes
16264 in doctests.")
16265 (license license:asl2.0)))
16266
16267 (define-public python-attr
16268 (package
16269 (name "python-attr")
16270 (version "0.3.1")
16271 (source
16272 (origin
16273 (method url-fetch)
16274 (uri (pypi-uri "attr" version))
16275 (sha256
16276 (base32
16277 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16278 (build-system python-build-system)
16279 (home-page "https://github.com/denis-ryzhkov/attr")
16280 (synopsis "Decorator for attributes of target function or class")
16281 (description "Simple decorator to set attributes of target function or
16282 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16283 (license license:expat)))
16284
16285 (define-public python-construct
16286 (package
16287 (name "python-construct")
16288 (version "2.9.45")
16289 (source
16290 (origin
16291 (method url-fetch)
16292 (uri (pypi-uri "construct" version))
16293 (sha256
16294 (base32
16295 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16296 (build-system python-build-system)
16297 (arguments
16298 `(#:tests? #f)) ; No tests exist.
16299 (propagated-inputs
16300 `(("python-extras" ,python-extras)
16301 ("python-arrow" ,python-arrow)
16302 ("python-numpy" ,python-numpy)
16303 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16304 (home-page "http://construct.readthedocs.io")
16305 (synopsis "Declarative and symmetrical parser and builder for binary data")
16306 (description
16307 "This package provides both simple, atomic constructs (such as
16308 integers of various sizes), as well as composite ones which allow you
16309 form hierarchical and sequential structures of increasing complexity.
16310 It features bit and byte granularity, easy debugging and testing, an
16311 easy-to-extend subclass system, and lots of primitive constructs to
16312 make your work easier.")
16313 (license license:expat)))
16314
16315 (define-public python-humanize
16316 (package
16317 (name "python-humanize")
16318 (version "0.5.1")
16319 (source
16320 (origin
16321 (method url-fetch)
16322 (uri (pypi-uri "humanize" version))
16323 (sha256
16324 (base32
16325 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16326 (arguments
16327 '(#:tests? #f)) ; tests not in pypi archive
16328 (build-system python-build-system)
16329 (home-page "https://github.com/jmoiron/humanize")
16330 (synopsis "Print numerical information in a human-readable form")
16331 (description "This package provides a Python module that displays numbers
16332 and dates in \"human readable\" forms. For example, it would display
16333 \"12345591313\" as \"12.3 billion\".")
16334 (license license:expat)))
16335
16336 (define-public python-txaio
16337 (package
16338 (name "python-txaio")
16339 (version "18.8.1")
16340 (source
16341 (origin
16342 (method url-fetch)
16343 (uri (pypi-uri "txaio" version))
16344 (sha256
16345 (base32
16346 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16347 (build-system python-build-system)
16348 (propagated-inputs
16349 `(("python-twisted" ,python-twisted)
16350 ("python-six" ,python-six)))
16351 (home-page "https://github.com/crossbario/txaio")
16352 (synopsis "Compatibility layer between Python asyncio and Twisted")
16353 (description "Txaio provides a compatibility layer between the Python
16354 @code{asyncio} module and @code{Twisted}.")
16355 (license license:expat)))
16356
16357 (define-public python-toolshed
16358 (package
16359 (name "python-toolshed")
16360 (version "0.4.6")
16361 (source
16362 (origin
16363 (method url-fetch)
16364 (uri (pypi-uri "toolshed" version))
16365 (sha256
16366 (base32
16367 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16368 (build-system python-build-system)
16369 (native-inputs
16370 `(("python-nose" ,python-nose)))
16371 (home-page "https://github.com/brentp/toolshed/")
16372 (synopsis "Collection of modules and functions for working with data")
16373 (description "This is a collection of well-tested, simple modules and
16374 functions that aim to reduce boilerplate when working with data.")
16375 (license license:bsd-2)))
16376
16377 (define-public python-annoy
16378 (package
16379 (name "python-annoy")
16380 (version "1.15.1")
16381 (source
16382 (origin
16383 (method url-fetch)
16384 (uri (pypi-uri "annoy" version))
16385 (sha256
16386 (base32
16387 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16388 (build-system python-build-system)
16389 (native-inputs
16390 `(("python-nose" ,python-nose)))
16391 (home-page "https://github.com/spotify/annoy/")
16392 (synopsis "Approximate nearest neighbors library")
16393 (description
16394 "Annoy is a C++ library with Python bindings to search for points in
16395 space that are close to a given query point. It also creates large read-only
16396 file-based data structures that are @code{mmap}ped into memory so that many
16397 processes may share the same data.")
16398 (license license:asl2.0)))
16399
16400 (define-public python-pylzma
16401 (package
16402 (name "python-pylzma")
16403 (version "0.5.0")
16404 (source
16405 (origin
16406 (method url-fetch)
16407 (uri (pypi-uri "pylzma" version))
16408 (sha256
16409 (base32
16410 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16411 (build-system python-build-system)
16412 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16413 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16414 (description "This package provides Python bindings for the LZMA library
16415 by Igor Pavlov.")
16416 (license license:lgpl2.1+)))
16417
16418 (define-public python2-pylzma
16419 (package-with-python2 python-pylzma))
16420
16421 (define-public python2-zeroconf
16422 (package
16423 (name "python2-zeroconf")
16424
16425 ;; This is the last version that supports Python 2.x.
16426 (version "0.19.1")
16427 (source
16428 (origin
16429 (method url-fetch)
16430 (uri (pypi-uri "zeroconf" version))
16431 (sha256
16432 (base32
16433 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16434 (build-system python-build-system)
16435 (arguments
16436 `(#:python ,python-2
16437 #:phases
16438 (modify-phases %standard-phases
16439 (add-after 'unpack 'patch-requires
16440 (lambda* (#:key inputs #:allow-other-keys)
16441 (substitute* "setup.py"
16442 (("enum-compat")
16443 "enum34"))
16444 #t)))))
16445 (native-inputs
16446 `(("python2-six" ,python2-six)
16447 ("python2-enum32" ,python2-enum34)
16448 ("python2-netifaces" ,python2-netifaces)
16449 ("python2-typing" ,python2-typing)))
16450 (home-page "https://github.com/jstasiak/python-zeroconf")
16451 (synopsis "Pure Python mDNS service discovery")
16452 (description
16453 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16454 compatible).")
16455 (license license:lgpl2.1+)))
16456
16457 (define-public python-bsddb3
16458 (package
16459 (name "python-bsddb3")
16460 (version "6.2.6")
16461 (source
16462 (origin
16463 (method url-fetch)
16464 (uri (pypi-uri "bsddb3" version))
16465 (sha256
16466 (base32
16467 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16468 (build-system python-build-system)
16469 (inputs
16470 `(("bdb" ,bdb)))
16471 (arguments
16472 '(#:phases
16473 (modify-phases %standard-phases
16474 (add-after 'unpack 'configure-locations
16475 (lambda* (#:key inputs #:allow-other-keys)
16476 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16477 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16478 #t))
16479 (replace 'check
16480 (lambda _
16481 (invoke "python3" "test3.py" "-v"))))))
16482 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16483 (synopsis "Python bindings for Oracle Berkeley DB")
16484 (description
16485 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16486 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16487 Transaction objects, and each of these is exposed as a Python type in the
16488 bsddb3.db module. The database objects can use various access methods: btree,
16489 hash, recno, and queue. Complete support of Berkeley DB distributed
16490 transactions. Complete support for Berkeley DB Replication Manager.
16491 Complete support for Berkeley DB Base Replication. Support for RPC.")
16492 (license license:bsd-3)))
16493
16494 (define-public python-dbfread
16495 (package
16496 (name "python-dbfread")
16497 (version "2.0.7")
16498 (source (origin
16499 (method url-fetch)
16500 (uri (pypi-uri "dbfread" version))
16501 (sha256
16502 (base32
16503 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16504 (build-system python-build-system)
16505 (native-inputs
16506 `(("python-pytest" ,python-pytest)))
16507 (home-page "https://dbfread.readthedocs.io")
16508 (synopsis "Read DBF Files with Python")
16509 (description
16510 "This library reads DBF files and returns the data as native Python data
16511 types for further processing. It is primarily intended for batch jobs and
16512 one-off scripts.")
16513 (license license:expat)))
16514
16515 (define-public python-cached-property
16516 (package
16517 (name "python-cached-property")
16518 (version "1.5.1")
16519 (source
16520 (origin
16521 (method url-fetch)
16522 (uri (pypi-uri "cached-property" version))
16523 (sha256
16524 (base32
16525 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16526 (build-system python-build-system)
16527 (arguments
16528 `(#:phases
16529 (modify-phases %standard-phases
16530 ;; https://github.com/pydanny/cached-property/issues/131
16531 ;; recent versions of freezegun break one test
16532 (add-after 'unpack 'disable-broken-test
16533 (lambda _
16534 (substitute* "tests/test_cached_property.py"
16535 (("def test_threads_ttl_expiry\\(self\\)" m)
16536 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16537 " " m)))
16538 #t)))))
16539 (native-inputs
16540 `(("python-freezegun" ,python-freezegun)))
16541 (home-page
16542 "https://github.com/pydanny/cached-property")
16543 (synopsis
16544 "Decorator for caching properties in classes")
16545 (description
16546 "This package provides a decorator which makes caching
16547 time-or-computationally-expensive properties quick and easy and works in Python
16548 2 or 3.")
16549 (license license:bsd-3)))
16550
16551 (define-public python-folium
16552 (package
16553 (name "python-folium")
16554 (version "0.10.1")
16555 (source
16556 (origin
16557 (method url-fetch)
16558 (uri (pypi-uri "folium" version))
16559 (sha256
16560 (base32
16561 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
16562 (build-system python-build-system)
16563 (propagated-inputs
16564 `(("python-branca" ,python-branca)
16565 ("python-jinja2" ,python-jinja2)
16566 ("python-numpy" ,python-numpy)
16567 ("python-requests" ,python-requests)))
16568 (native-inputs
16569 `(("python-pytest" ,python-pytest)))
16570 (home-page "https://github.com/python-visualization/folium")
16571 (synopsis "Make beautiful maps with Leaflet.js & Python")
16572 (description "@code{folium} makes it easy to visualize data that’s been
16573 manipulated in Python on an interactive leaflet map. It enables both the
16574 binding of data to a map for @code{choropleth} visualizations as well as
16575 passing rich vector/raster/HTML visualizations as markers on the map.
16576
16577 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16578 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16579 supports Image, Video, GeoJSON and TopoJSON overlays.")
16580 (license license:expat)))
16581
16582 (define-public jube
16583 (package
16584 ;; This is a command-line tool, so no "python-" prefix.
16585 (name "jube")
16586 (version "2.2.2")
16587 (source (origin
16588 (method url-fetch)
16589 (uri (string-append
16590 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16591 version))
16592 (sha256
16593 (base32
16594 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16595 (file-name (string-append "jube-" version ".tar.gz"))))
16596 (build-system python-build-system)
16597 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16598 (synopsis "Benchmarking environment")
16599 (description
16600 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16601 benchmarked application, benchmark data is stored in a format that allows JUBE
16602 to deduct the desired information. This data can be parsed by automatic pre-
16603 and post-processing scripts that draw information and store it more densely
16604 for manual interpretation.")
16605 (license license:gpl3+)))
16606
16607 (define-public python-pyroutelib3
16608 (package
16609 (name "python-pyroutelib3")
16610 (version "1.3.post1")
16611 (source
16612 (origin
16613 (method url-fetch)
16614 (uri (pypi-uri "pyroutelib3" version))
16615 (sha256
16616 (base32
16617 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16618 (build-system python-build-system)
16619 (propagated-inputs
16620 `(("python-dateutil" ,python-dateutil)))
16621 (home-page "https://github.com/MKuranowski/pyroutelib3")
16622 (synopsis "Library for simple routing on OSM data")
16623 (description "Library for simple routing on OSM data")
16624 (license license:gpl3+)))
16625
16626 (define-public python-bibtexparser
16627 (package
16628 (name "python-bibtexparser")
16629 (version "1.1.0")
16630 (source
16631 (origin
16632 (method url-fetch)
16633 (uri (pypi-uri "bibtexparser" version))
16634 (sha256
16635 (base32
16636 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16637 (build-system python-build-system)
16638 (propagated-inputs
16639 `(("python-pyparsing" ,python-pyparsing)))
16640 (native-inputs
16641 `(("python-future" ,python-future)))
16642 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16643 (synopsis "Python library to parse BibTeX files")
16644 (description "BibtexParser is a Python library to parse BibTeX files.")
16645 (license (list license:bsd-3 license:lgpl3))))
16646
16647 (define-public python-distro
16648 (package
16649 (name "python-distro")
16650 (version "1.4.0")
16651 (source
16652 (origin
16653 (method url-fetch)
16654 (uri (pypi-uri "distro" version))
16655 (sha256
16656 (base32
16657 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16658 (build-system python-build-system)
16659 (native-inputs
16660 `(("python-pytest" ,python-pytest)))
16661 (home-page "https://github.com/nir0s/distro")
16662 (synopsis
16663 "OS platform information API")
16664 (description
16665 "@code{distro} provides information about the OS distribution it runs on,
16666 such as a reliable machine-readable ID, or version information.
16667
16668 It is the recommended replacement for Python's original
16669 `platform.linux_distribution` function (which will be removed in Python 3.8).
16670 @code{distro} also provides a command-line interface to output the platform
16671 information in various formats.")
16672 (license license:asl2.0)))
16673
16674 (define-public python-cairosvg
16675 (package
16676 (name "python-cairosvg")
16677 (version "2.4.2")
16678 (source
16679 (origin
16680 (method url-fetch)
16681 (uri (pypi-uri "CairoSVG" version))
16682 (sha256
16683 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16684 (build-system python-build-system)
16685 (arguments
16686 `(#:phases
16687 (modify-phases %standard-phases
16688 (replace 'check
16689 (lambda _ (invoke "pytest"))))))
16690 (propagated-inputs
16691 `(("python-cairocffi" ,python-cairocffi)
16692 ("python-cssselect2" ,python-cssselect2)
16693 ("python-defusedxml" ,python-defusedxml)
16694 ("python-pillow" ,python-pillow)
16695 ("python-tinycss2" ,python-tinycss2)))
16696 (native-inputs
16697 `(("python-pytest-flake8" ,python-pytest-flake8)
16698 ("python-pytest-isort" ,python-pytest-isort)
16699 ("python-pytest-runner" ,python-pytest-runner)))
16700 (home-page "https://cairosvg.org/")
16701 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16702 (description "CairoSVG is a SVG converter based on Cairo. It can export
16703 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16704 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16705 parsed, the result is drawn to a Cairo surface that can be exported to
16706 qvarious formats: PDF, PostScript, PNG and even SVG.")
16707 (license license:lgpl3+)))
16708
16709 (define-public python-pyphen
16710 (package
16711 (name "python-pyphen")
16712 (version "0.9.5")
16713 (source
16714 (origin
16715 (method url-fetch)
16716 (uri (pypi-uri "Pyphen" version))
16717 (sha256
16718 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16719 (build-system python-build-system)
16720 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16721 ;; embedded set provided by upstream - like Debian does.
16722 (home-page "https://github.com/Kozea/Pyphen")
16723 (synopsis "Pure Python module to hyphenate text")
16724 (description "Pyphen is a pure Python module to hyphenate text using
16725 existing Hunspell hyphenation dictionaries.")
16726 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
16727
16728 (define-public python-intelhex
16729 (package
16730 (name "python-intelhex")
16731 (version "2.2.1")
16732 (source
16733 (origin
16734 (method url-fetch)
16735 (uri (pypi-uri "intelhex" version))
16736 (sha256
16737 (base32
16738 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16739 (build-system python-build-system)
16740 (arguments '(#:tests? #f)) ;issue with version
16741 (home-page "https://pypi.org/project/IntelHex/")
16742 (synopsis "Python library for Intel HEX files manipulations")
16743 (description "The Intel HEX file format is widely used in microprocessors
16744 and microcontrollers area (embedded systems etc.) as the de facto standard for
16745 representation of code to be programmed into microelectronic devices. This
16746 package provides an intelhex Python library to read, write, create from
16747 scratch and manipulate data from Intel HEX file format. It also includes
16748 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16749 converters and more, those based on the library itself.")
16750 (license license:bsd-3)))
16751
16752 (define-public python-pykwalify
16753 (package
16754 (name "python-pykwalify")
16755 (version "1.7.0")
16756 (source
16757 (origin
16758 (method url-fetch)
16759 (uri (pypi-uri "pykwalify" version))
16760 (sha256
16761 (base32
16762 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16763 (build-system python-build-system)
16764 (arguments '(#:tests? #f)) ;missing dependencies
16765 (propagated-inputs
16766 `(("python-dateutil" ,python-dateutil)
16767 ("python-docopt" ,python-docopt)
16768 ("python-pyyaml" ,python-pyyaml)))
16769 (home-page "https://github.com/grokzen/pykwalify")
16770 (synopsis
16771 "Python lib/cli for JSON/YAML schema validation")
16772 (description
16773 "This package provides a parser, schema validator, and data binding tool
16774 for YAML and JSON.")
16775 (license license:expat)))
16776
16777 (define-public python-dbusmock
16778 (package
16779 (name "python-dbusmock")
16780 (version "0.18.3")
16781 (source
16782 (origin
16783 (method url-fetch)
16784 (uri (pypi-uri "python-dbusmock" version))
16785 (sha256
16786 (base32
16787 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16788 (build-system python-build-system)
16789 (arguments
16790 '(#:phases
16791 (modify-phases %standard-phases
16792 (add-after 'unpack 'patch-shell-path
16793 (lambda _
16794 (substitute* "tests/test_code.py"
16795 (("/bin/bash") (which "bash")))
16796 #t)))))
16797 (native-inputs
16798 `(;; For tests.
16799 ("dbus" ,dbus) ; for dbus-daemon
16800 ("python-nose" ,python-nose)
16801 ("which" ,which)))
16802 (propagated-inputs
16803 `(("python-dbus" ,python-dbus)
16804 ("python-pygobject" ,python-pygobject)))
16805 (home-page "https://github.com/martinpitt/python-dbusmock")
16806 (synopsis "Python library for mock D-Bus objects")
16807 (description "python-dbusmock allows for the easy creation of mock objects on
16808 D-Bus. This is useful for writing tests for software which talks to D-Bus
16809 services such as upower, systemd, logind, gnome-session or others, and it is
16810 hard (or impossible without root privileges) to set the state of the real
16811 services to what you expect in your tests.")
16812 (license license:lgpl3+)))
16813
16814 (define-public python-ujson
16815 (package
16816 (name "python-ujson")
16817 (version "1.35")
16818 (source
16819 (origin
16820 (method url-fetch)
16821 (uri (pypi-uri "ujson" version))
16822 (sha256
16823 (base32
16824 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16825 (build-system python-build-system)
16826 (home-page "http://www.esn.me")
16827 (synopsis
16828 "Ultra fast JSON encoder and decoder for Python")
16829 (description
16830 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16831 bindings for Python 2.5+ and 3.")
16832 (license license:bsd-3)))
16833
16834 (define-public python2-ujson
16835 (package-with-python2 python-ujson))
16836
16837 (define-public python-iocapture
16838 ;; The latest release is more than a year older than this commit.
16839 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16840 (revision "1"))
16841 (package
16842 (name "python-iocapture")
16843 (version "0.1.2")
16844 (source
16845 (origin
16846 (method git-fetch)
16847 (uri (git-reference
16848 (url "https://github.com/oinume/iocapture.git")
16849 (commit commit)))
16850 (file-name (git-file-name name version))
16851 (sha256
16852 (base32
16853 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16854 (build-system python-build-system)
16855 (arguments
16856 `(#:phases
16857 (modify-phases %standard-phases
16858 (delete 'check)
16859 (add-after 'install 'check
16860 (lambda* (#:key inputs outputs #:allow-other-keys)
16861 (add-installed-pythonpath inputs outputs)
16862 (invoke "py.test" "-v" "tests")
16863 #t)))))
16864 (propagated-inputs
16865 `(("python-flexmock" ,python-flexmock)
16866 ("python-pytest" ,python-pytest)
16867 ("python-pytest-cov" ,python-pytest-cov)
16868 ("python-six" ,python-six)))
16869 (home-page "https://github.com/oinume/iocapture")
16870 (synopsis "Python capturing tool for stdout and stderr")
16871 (description
16872 "This package helps you to capture the standard out (stdout) and the
16873 standard error channel (stderr) in your program.")
16874 (license license:expat))))
16875
16876 (define-public python-argh
16877 ;; There are 21 commits since the latest release containing important
16878 ;; improvements.
16879 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16880 (revision "1"))
16881 (package
16882 (name "python-argh")
16883 (version (git-version "0.26.2" revision commit))
16884 (source
16885 (origin
16886 (method git-fetch)
16887 (uri (git-reference
16888 (url "https://github.com/neithere/argh.git")
16889 (commit commit)))
16890 (file-name (git-file-name name version))
16891 (sha256
16892 (base32
16893 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16894 (build-system python-build-system)
16895 (propagated-inputs
16896 `(("python-iocapture" ,python-iocapture)
16897 ("python-mock" ,python-mock)
16898 ("python-pytest" ,python-pytest)
16899 ("python-pytest-cov" ,python-pytest-cov)
16900 ("python-pytest-xdist" ,python-pytest-xdist)
16901 ("python-tox" ,python-tox)))
16902 (home-page "https://github.com/neithere/argh/")
16903 (synopsis "Argparse wrapper with natural syntax")
16904 (description
16905 "python-argh is a small library that provides several layers of
16906 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16907 always possible to declare a command with the highest possible (and least
16908 flexible) layer and then tune the behaviour with any of the lower layers
16909 including the native API of @code{python-argparse}.")
16910 (license license:lgpl3+))))
16911
16912 (define-public python-ppft
16913 (package
16914 (name "python-ppft")
16915 (version "1.6.6.1")
16916 (source
16917 (origin
16918 (method url-fetch)
16919 (uri (pypi-uri "ppft" version))
16920 (sha256
16921 (base32
16922 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
16923 (build-system python-build-system)
16924 (arguments '(#:tests? #f)) ; there are none
16925 (propagated-inputs
16926 `(("python-six" ,python-six)))
16927 (home-page "https://pypi.org/project/ppft/")
16928 (synopsis "Fork of Parallel Python")
16929 (description
16930 "This package is a fork of Parallel Python. The Parallel Python
16931 module (@code{pp}) provides an easy and efficient way to create
16932 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
16933 computers and clusters. It features cross-platform portability and dynamic
16934 load balancing.")
16935 (license license:bsd-3)))
16936
16937 (define-public python-pox
16938 (package
16939 (name "python-pox")
16940 (version "0.2.7")
16941 (source
16942 (origin
16943 (method url-fetch)
16944 (uri (pypi-uri "pox" version))
16945 (sha256
16946 (base32
16947 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
16948 (build-system python-build-system)
16949 (arguments
16950 `(#:phases
16951 (modify-phases %standard-phases
16952 (replace 'check
16953 (lambda _
16954 (mkdir-p "/tmp/guix")
16955 (setenv "SHELL" "bash")
16956 (setenv "USERNAME" "guix")
16957 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
16958 (invoke "py.test" "-vv")
16959 #t)))))
16960 (native-inputs
16961 `(("python-pytest" ,python-pytest)
16962 ("which" ,which)))
16963 (home-page "https://pypi.org/project/pox/")
16964 (synopsis "Python utilities for filesystem exploration and automated builds")
16965 (description
16966 "Pox provides a collection of utilities for navigating and manipulating
16967 filesystems. This module is designed to facilitate some of the low level
16968 operating system interactions that are useful when exploring a filesystem on a
16969 remote host. Pox provides Python equivalents of several shell commands such
16970 as @command{which} and @command{find}. These commands allow automated
16971 discovery of what has been installed on an operating system, and where the
16972 essential tools are located.")
16973 (license license:bsd-3)))
16974
16975 (define-public python-pathos
16976 (package
16977 (name "python-pathos")
16978 (version "0.2.5")
16979 (source
16980 (origin
16981 (method url-fetch)
16982 (uri (pypi-uri "pathos" version))
16983 (sha256
16984 (base32
16985 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
16986 (build-system python-build-system)
16987 (arguments
16988 '(#:phases
16989 (modify-phases %standard-phases
16990 (replace 'check
16991 (lambda _
16992 (setenv "PYTHONPATH"
16993 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
16994 (invoke "python" "./tests/__main__.py"))))))
16995 (propagated-inputs
16996 `(("python-dill" ,python-dill)
16997 ("python-multiprocess" ,python-multiprocess)
16998 ("python-pox" ,python-pox)
16999 ("python-ppft" ,python-ppft)))
17000 (native-inputs
17001 `(("python-pytest" ,python-pytest)))
17002 (home-page "https://pypi.org/project/pathos/")
17003 (synopsis
17004 "Parallel graph management and execution in heterogeneous computing")
17005 (description
17006 "Python-pathos is a framework for heterogenous computing. It provides a
17007 consistent high-level interface for configuring and launching parallel
17008 computations across heterogenous resources. Python-pathos provides configurable
17009 launchers for parallel and distributed computing, where each launcher contains
17010 the syntactic logic to configure and launch jobs in an execution environment.")
17011 (license license:bsd-3)))
17012
17013 (define-public python-flit
17014 (package
17015 (name "python-flit")
17016 (version "2.1.0")
17017 (source
17018 (origin
17019 (method url-fetch)
17020 (uri (pypi-uri "flit" version))
17021 (sha256
17022 (base32
17023 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17024 (build-system python-build-system)
17025 (arguments
17026 `(#:tests? #f)) ; XXX: Check requires network access.
17027 (home-page "https://flit.readthedocs.io/")
17028 (synopsis
17029 "Simple packaging tool for simple packages")
17030 (description
17031 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17032 packages a single importable module or package at a time, using the import
17033 name as the name on PyPI. All subpackages and data files within a package
17034 are included automatically.")
17035 (license license:bsd-3)))
17036
17037 (define-public python-pathtools
17038 (package
17039 (name "python-pathtools")
17040 (version "0.1.2")
17041 (source
17042 (origin
17043 (method url-fetch)
17044 (uri (pypi-uri "pathtools" version))
17045 (sha256
17046 (base32
17047 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17048 (build-system python-build-system)
17049 (home-page
17050 "https://github.com/gorakhargosh/pathtools")
17051 (synopsis "Path utilities for Python")
17052 (description "Pattern matching and various utilities for file systems
17053 paths.")
17054 (license license:expat)))
17055
17056 (define-public python-fastentrypoints
17057 (package
17058 (name "python-fastentrypoints")
17059 (version "0.12")
17060 (source
17061 (origin
17062 (method url-fetch)
17063 (uri (pypi-uri "fastentrypoints" version))
17064 (sha256
17065 (base32
17066 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17067 (build-system python-build-system)
17068 (home-page
17069 "https://github.com/ninjaaron/fast-entry_points")
17070 (synopsis
17071 "Makes entry_points specified in setup.py load more quickly")
17072 (description
17073 "Using entry_points in your setup.py makes scripts that start really
17074 slowly because it imports pkg_resources. This package allows such setup
17075 scripts to load entry points more quickly.")
17076 (license license:bsd-3)))
17077
17078 (define-public python-funcparserlib
17079 (package
17080 (name "python-funcparserlib")
17081 (version "0.3.6")
17082 (source
17083 (origin
17084 (method url-fetch)
17085 (uri (pypi-uri "funcparserlib" version))
17086 (sha256
17087 (base32
17088 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17089 (native-inputs
17090 `(("python-tox" ,python-tox)))
17091 (arguments
17092 `(#:phases
17093 (modify-phases %standard-phases
17094 (replace 'check
17095 (lambda _
17096 (invoke "tox"))))))
17097 (build-system python-build-system)
17098 (home-page
17099 "https://github.com/vlasovskikh/funcparserlib")
17100 (synopsis
17101 "Recursive descent parsing library based on functional combinators")
17102 (description
17103 "This package is a recursive descent parsing library for Python based on
17104 functional combinators. Parser combinators are just higher-order functions
17105 that take parsers as their arguments and return them as result values.")
17106 (license license:expat)))
17107
17108 (define-public python-speg
17109 (package
17110 (name "python-speg")
17111 (version "0.3")
17112 (source
17113 (origin
17114 (method url-fetch)
17115 (uri (pypi-uri "speg" version ".zip"))
17116 (sha256
17117 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17118 (arguments
17119 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17120 (native-inputs
17121 `(("unzip" ,unzip)))
17122 (build-system python-build-system)
17123 (home-page "https://github.com/avakar/speg")
17124 (synopsis "PEG-based parser interpreter with memoization")
17125 (description "This package is a PEG-based parser and interpreter with
17126 memoization.")
17127 (license license:expat)))
17128
17129 (define-public python-cson
17130 (package
17131 (name "python-cson")
17132 (version "0.8")
17133 (source
17134 (origin
17135 (method url-fetch)
17136 (uri (pypi-uri "cson" version))
17137 (sha256
17138 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17139 (build-system python-build-system)
17140 (propagated-inputs
17141 `(("python-speg" ,python-speg)))
17142 (home-page "https://github.com/avakar/pycson")
17143 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17144 (description "This package is a parser for Coffeescript Object
17145 Notation (CSON).")
17146 (license license:expat)))
17147
17148 (define-public python-asynctest
17149 (package
17150 (name "python-asynctest")
17151 (version "0.13.0")
17152 (source
17153 (origin
17154 (method url-fetch)
17155 (uri (pypi-uri "asynctest" version))
17156 (sha256
17157 (base32
17158 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17159 (build-system python-build-system)
17160 (arguments
17161 '(#:phases
17162 (modify-phases %standard-phases
17163 (replace 'check
17164 (lambda _
17165 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17166 (add-after 'unpack 'disable-tests
17167 (lambda* _
17168 (substitute* "test/test_selector.py"
17169 ;; XXX: This test fails for unknown reason inside the build
17170 ;; environment.
17171 (("def test_events_watched_outside_test_are_ignored")
17172 "@unittest.skip('disabled by guix')
17173 def test_events_watched_outside_test_are_ignored")))))))
17174 (home-page "https://github.com/Martiusweb/asynctest")
17175 (synopsis "Extension of unittest for testing asyncio libraries")
17176 (description
17177 "The package asynctest is built on top of the standard unittest module
17178 and cuts down boilerplate code when testing libraries for asyncio.")
17179 (license license:asl2.0)))
17180
17181 (define-public python-aionotify
17182 (package
17183 (name "python-aionotify")
17184 (version "0.2.0")
17185 (source
17186 (origin
17187 ;; Source tarball on PyPi lacks tests
17188 (method git-fetch)
17189 (uri (git-reference
17190 (url "https://github.com/rbarrois/aionotify")
17191 (commit (string-append "v" version))))
17192 (file-name (git-file-name name version))
17193 (sha256
17194 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17195 (build-system python-build-system)
17196 (native-inputs `(("python-asynctest" ,python-asynctest)))
17197 (home-page "https://github.com/rbarrois/aionotify")
17198 (synopsis "Asyncio-powered inotify library")
17199 (description
17200 "@code{aionotify} is a simple, asyncio-based inotify library.")
17201 (license license:bsd-3)))
17202
17203 (define-public python-forbiddenfruit
17204 (package
17205 (name "python-forbiddenfruit")
17206 (version "0.1.3")
17207 (source
17208 (origin
17209 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17210 (method git-fetch)
17211 (uri (git-reference
17212 (url "https://github.com/clarete/forbiddenfruit")
17213 (commit version)))
17214 (file-name (git-file-name name version))
17215 (sha256
17216 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17217 (build-system python-build-system)
17218 (arguments
17219 '(#:phases
17220 (modify-phases %standard-phases
17221 (replace 'check
17222 (lambda _
17223 (invoke "make" "SKIP_DEPS=1"))))))
17224 (native-inputs
17225 `(("python-nose" ,python-nose)
17226 ("python-coverage" ,python-coverage)))
17227 (home-page "https://github.com/clarete/forbiddenfruit")
17228 (synopsis "Patch python built-in objects")
17229 (description "This project allows Python code to extend built-in types.")
17230 (license (list license:gpl3+ license:expat))))
17231
17232 (define-public python-shouldbe
17233 (package
17234 (name "python-shouldbe")
17235 (version "0.1.2")
17236 (source
17237 (origin
17238 (method url-fetch)
17239 (uri (pypi-uri "shouldbe" version))
17240 (sha256
17241 (base32
17242 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17243 (build-system python-build-system)
17244 (propagated-inputs
17245 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17246 (native-inputs
17247 `(("python-nose" ,python-nose)))
17248 (home-page "https://github.com/directxman12/should_be")
17249 (synopsis "Python Assertion Helpers inspired by Shouldly")
17250 (description
17251 "Python Assertion Helpers inspired by Shouldly.")
17252 (license license:isc)))
17253
17254 (define-public python-k5test
17255 (package
17256 (name "python-k5test")
17257 (version "0.9.2")
17258 (source
17259 (origin
17260 (method url-fetch)
17261 (uri (pypi-uri "k5test" version))
17262 (sha256
17263 (base32
17264 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17265 (build-system python-build-system)
17266 (propagated-inputs
17267 `(("python-six" ,python-six)
17268 ;; `which`, `kadmin.local` binaries called inside library
17269 ("which" ,which)
17270 ("mit-krb5" ,mit-krb5)))
17271 (native-inputs `(("mit-krb5" ,mit-krb5)))
17272 (arguments
17273 '(#:phases
17274 (modify-phases %standard-phases
17275 (add-after 'unpack 'patch-paths
17276 (lambda* _
17277 (substitute* "k5test/realm.py"
17278 (("'kadmin_local'") "'kadmin.local'")))))))
17279 (home-page "https://github.com/pythongssapi/k5test")
17280 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17281 (description
17282 "@code{k5test} is a library for setting up self-contained Kerberos 5
17283 environments, and running Python unit tests inside those environments. It is
17284 based on the file of the same name found alongside the MIT Kerberos 5 unit
17285 tests.")
17286 (license license:isc)))
17287
17288 (define-public python-gssapi
17289 (package
17290 (name "python-gssapi")
17291 (version "1.6.1")
17292 (source
17293 (origin
17294 (method url-fetch)
17295 (uri (pypi-uri "gssapi" version))
17296 (sha256
17297 (base32
17298 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
17299 (build-system python-build-system)
17300 (propagated-inputs
17301 `(("python-decorator" ,python-decorator)
17302 ("python-six" ,python-six)))
17303 (inputs
17304 `(("mit-krb5" ,mit-krb5)))
17305 ;; for tests
17306 (native-inputs
17307 `(("python-shouldbe" ,python-shouldbe)
17308 ("python-parameterized" ,python-parameterized)
17309 ("python-k5test" ,python-k5test)
17310 ("python-nose" ,python-nose)))
17311 (home-page "https://github.com/pythongssapi/python-gssapi")
17312 (synopsis "Python GSSAPI Wrapper")
17313 (description
17314 "Python-GSSAPI provides both low-level and high level wrappers around the
17315 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
17316 also be useable with other GSSAPI mechanisms.")
17317 (license license:isc)))