Merge branch 'staging' into core-updates
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
72 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
73 ;;;
74 ;;; This file is part of GNU Guix.
75 ;;;
76 ;;; GNU Guix is free software; you can redistribute it and/or modify it
77 ;;; under the terms of the GNU General Public License as published by
78 ;;; the Free Software Foundation; either version 3 of the License, or (at
79 ;;; your option) any later version.
80 ;;;
81 ;;; GNU Guix is distributed in the hope that it will be useful, but
82 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
83 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84 ;;; GNU General Public License for more details.
85 ;;;
86 ;;; You should have received a copy of the GNU General Public License
87 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
88
89 (define-module (gnu packages python-xyz)
90 #:use-module ((guix licenses) #:prefix license:)
91 #:use-module (gnu packages)
92 #:use-module (gnu packages algebra)
93 #:use-module (gnu packages adns)
94 #:use-module (gnu packages attr)
95 #:use-module (gnu packages backup)
96 #:use-module (gnu packages bash)
97 #:use-module (gnu packages check)
98 #:use-module (gnu packages compression)
99 #:use-module (gnu packages crypto)
100 #:use-module (gnu packages databases)
101 #:use-module (gnu packages dbm)
102 #:use-module (gnu packages enchant)
103 #:use-module (gnu packages file)
104 #:use-module (gnu packages fontutils)
105 #:use-module (gnu packages gcc)
106 #:use-module (gnu packages geo)
107 #:use-module (gnu packages ghostscript)
108 #:use-module (gnu packages gl)
109 #:use-module (gnu packages glib)
110 #:use-module (gnu packages gnome)
111 #:use-module (gnu packages graphviz)
112 #:use-module (gnu packages graphics)
113 #:use-module (gnu packages gstreamer)
114 #:use-module (gnu packages gtk)
115 #:use-module (gnu packages icu4c)
116 #:use-module (gnu packages image)
117 #:use-module (gnu packages imagemagick)
118 #:use-module (gnu packages kerberos)
119 #:use-module (gnu packages libevent)
120 #:use-module (gnu packages libffi)
121 #:use-module (gnu packages linux)
122 #:use-module (gnu packages llvm)
123 #:use-module (gnu packages man)
124 #:use-module (gnu packages maths)
125 #:use-module (gnu packages monitoring)
126 #:use-module (gnu packages multiprecision)
127 #:use-module (gnu packages networking)
128 #:use-module (gnu packages ncurses)
129 #:use-module (gnu packages openstack)
130 #:use-module (gnu packages pcre)
131 #:use-module (gnu packages perl)
132 #:use-module (gnu packages pkg-config)
133 #:use-module (gnu packages python)
134 #:use-module (gnu packages python-check)
135 #:use-module (gnu packages python-compression)
136 #:use-module (gnu packages python-crypto)
137 #:use-module (gnu packages python-science)
138 #:use-module (gnu packages python-web)
139 #:use-module (gnu packages qt)
140 #:use-module (gnu packages readline)
141 #:use-module (gnu packages sdl)
142 #:use-module (gnu packages search)
143 #:use-module (gnu packages shells)
144 #:use-module (gnu packages sphinx)
145 #:use-module (gnu packages ssh)
146 #:use-module (gnu packages terminals)
147 #:use-module (gnu packages tex)
148 #:use-module (gnu packages texinfo)
149 #:use-module (gnu packages time)
150 #:use-module (gnu packages tls)
151 #:use-module (gnu packages version-control)
152 #:use-module (gnu packages video)
153 #:use-module (gnu packages web)
154 #:use-module (gnu packages base)
155 #:use-module (gnu packages xml)
156 #:use-module (gnu packages xorg)
157 #:use-module (gnu packages xdisorg)
158 #:use-module (gnu packages tcl)
159 #:use-module (gnu packages bdw-gc)
160 #:use-module (gnu packages serialization)
161 #:use-module (guix packages)
162 #:use-module (guix download)
163 #:use-module (guix git-download)
164 #:use-module (guix hg-download)
165 #:use-module (guix utils)
166 #:use-module (guix build-system gnu)
167 #:use-module (guix build-system cmake)
168 #:use-module (guix build-system python)
169 #:use-module (guix build-system trivial)
170 #:use-module (srfi srfi-1)
171 #:use-module (srfi srfi-26))
172
173 (define-public python-psutil
174 (package
175 (name "python-psutil")
176 (version "5.6.5")
177 (source
178 (origin
179 (method url-fetch)
180 (uri (pypi-uri "psutil" version))
181 (sha256
182 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
183 (build-system python-build-system)
184 (arguments
185 ;; FIXME: some tests does not return and times out.
186 '(#:tests? #f))
187 (home-page "https://www.github.com/giampaolo/psutil")
188 (synopsis "Library for retrieving information on running processes")
189 (description
190 "psutil (Python system and process utilities) is a library for retrieving
191 information on running processes and system utilization (CPU, memory, disks,
192 network) in Python. It is useful mainly for system monitoring, profiling and
193 limiting process resources and management of running processes. It implements
194 many functionalities offered by command line tools such as: ps, top, lsof,
195 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
196 pidof, tty, taskset, pmap.")
197 (properties `((python2-variant . ,(delay python2-psutil))))
198 (license license:bsd-3)))
199
200 (define-public python2-psutil
201 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
202 (package
203 (inherit base)
204 (propagated-inputs
205 `(("python2-enum34" ,python2-enum34) ;optional
206 ,@(package-propagated-inputs base))))))
207
208 (define-public python-shapely
209 (package
210 (name "python-shapely")
211 (version "1.6.4.post2")
212 (source
213 (origin
214 (method url-fetch)
215 (uri (pypi-uri "Shapely" version))
216 (sha256
217 (base32
218 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
219 (build-system python-build-system)
220 (native-inputs
221 `(("python-cython" ,python-cython)
222 ("python-matplotlib" ,python-matplotlib)
223 ("python-pytest" ,python-pytest)
224 ("python-pytest-cov" ,python-pytest-cov)))
225 (inputs
226 `(("geos" ,geos)))
227 (propagated-inputs
228 `(("python-numpy" ,python-numpy)))
229 (arguments
230 `(#:phases
231 (modify-phases %standard-phases
232 (add-after 'unpack 'patch-geos-path
233 (lambda* (#:key inputs #:allow-other-keys)
234 (let ((geos (assoc-ref inputs "geos"))
235 (glibc (assoc-ref inputs ,(if (%current-target-system)
236 "cross-libc" "libc"))))
237 (substitute* "shapely/geos.py"
238 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
239 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
240 geos "/lib/libgeos_c.so'])"))
241 (("free = load_dll\\('c'\\)\\.free")
242 (string-append "free = load_dll('c', fallbacks=['"
243 glibc "/lib/libc.so.6']).free"))))
244 #t)))))
245 (home-page "https://github.com/Toblerity/Shapely")
246 (synopsis "Library for the manipulation and analysis of geometric objects")
247 (description "Shapely is a Python package for manipulation and analysis of
248 planar geometric objects. It is based on the @code{GEOS} library.")
249 (license license:bsd-3)))
250
251 (define-public python-shortuuid
252 (package
253 (name "python-shortuuid")
254 (version "0.5.0")
255 (source
256 (origin
257 (method url-fetch)
258 (uri (pypi-uri "shortuuid" version))
259 (sha256
260 (base32
261 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
262 (build-system python-build-system)
263 (native-inputs
264 `(("python-pep8" ,python-pep8)))
265 (home-page "https://github.com/skorokithakis/shortuuid")
266 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
267 (description
268 "@code{shortuuid} is a Python library for generating concise, unambiguous
269 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
270 module and then similar looking characters are removed.")
271 (license license:bsd-3)))
272
273 (define-public python-logwrap
274 (package
275 (name "python-logwrap")
276 (version "3.2.1")
277 (source
278 (origin
279 (method url-fetch)
280 (uri (pypi-uri "logwrap" version ".zip"))
281 (sha256
282 (base32
283 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
284 (build-system python-build-system)
285 (propagated-inputs
286 `(("python-six" ,python-six)
287 ("python-typing" ,python-typing)))
288 (native-inputs
289 `(("unzip" ,unzip)
290 ("python-cython" ,python-cython)
291 ("python-pytest" ,python-pytest)
292 ("python-pytest-cov" ,python-pytest-cov)
293 ("python-pytest-runner" ,python-pytest-runner)))
294 (home-page "https://github.com/penguinolog/logwrap")
295 (synopsis "Decorator for logging function arguments")
296 (description "This package provides a decorator to log function arguments
297 and function call return values in a human-readable way.")
298 (license license:asl2.0)))
299
300 (define-public python2-shapely
301 (package-with-python2 python-shapely))
302
303 (define-public python-clyent
304 (package
305 (name "python-clyent")
306 (version "1.2.1")
307 (source
308 (origin
309 (method url-fetch)
310 (uri (pypi-uri "clyent" version))
311 (sha256
312 (base32
313 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
314 (build-system python-build-system)
315 (native-inputs
316 `(("python-mock" ,python-mock)))
317 (home-page "https://github.com/binstar/clyent")
318 (synopsis "Command line client library")
319 (description "Clyent is a Python command line utiliy library. It is used
320 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
321 (license license:bsd-3)))
322
323 (define-public python2-clyent
324 (package-with-python2 python-clyent))
325
326 (define-public python-babel
327 (package
328 (name "python-babel")
329 (version "2.7.0")
330 (source
331 (origin
332 (method url-fetch)
333 (uri (pypi-uri "Babel" version))
334 (sha256
335 (base32
336 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
337 (build-system python-build-system)
338 (native-inputs
339 `(("python-freezegun" ,python-freezegun)
340 ("python-pytest" ,python-pytest)))
341 (propagated-inputs
342 `(("python-pytz" ,python-pytz)))
343 (arguments
344 `(#:phases (modify-phases %standard-phases
345 (replace 'check
346 (lambda _
347 (invoke "pytest" "-vv" "-k"
348 (string-append
349 ;; XXX: These tests fail when using Pytest 4.x and
350 ;; Babel 2.6.0. Try removing this for later versions.
351 "not test_no_inherit_metazone_marker_never_in_output"
352 " and not test_smoke_dates"
353 " and not test_smoke_numbers")))))))
354 (home-page "http://babel.pocoo.org/")
355 (synopsis
356 "Tools for internationalizing Python applications")
357 (description
358 "Babel is composed of two major parts:
359 - tools to build and work with gettext message catalogs
360 - a Python interface to the CLDR (Common Locale Data Repository), providing
361 access to various locale display names, localized number and date formatting,
362 etc. ")
363 (license license:bsd-3)))
364
365 (define-public python2-babel
366 (package-with-python2 python-babel))
367
368 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
369 (define-public python2-babel-2.6
370 (package
371 (inherit python2-babel)
372 (version "2.6.0")
373 (source (origin
374 (method url-fetch)
375 (uri (pypi-uri "Babel" version))
376 (sha256
377 (base32
378 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
379
380 (define-public python2-backport-ssl-match-hostname
381 (package
382 (name "python2-backport-ssl-match-hostname")
383 (version "3.5.0.1")
384 (source
385 (origin
386 (method url-fetch)
387 (uri (pypi-uri "backports.ssl_match_hostname" version))
388 (sha256
389 (base32
390 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
391 (build-system python-build-system)
392 (arguments
393 `(#:python ,python-2
394 #:tests? #f)) ; no test target
395 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
396 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
397 (description
398 "This backport brings the ssl.match_hostname() function to users of
399 earlier versions of Python. The function checks the hostname in the
400 certificate returned by the server to which a connection has been established,
401 and verifies that it matches the intended target hostname.")
402 (license license:psfl)))
403
404 (define-public python-boolean.py
405 (package
406 (name "python-boolean.py")
407 (version "3.6")
408 (source
409 (origin
410 ;; There's no source tarball on PyPI.
411 (method git-fetch)
412 (uri (git-reference
413 (url "https://github.com/bastikr/boolean.py")
414 (commit (string-append "v" version))))
415 (file-name (git-file-name name version))
416 (sha256
417 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
418 (build-system python-build-system)
419 (home-page "https://github.com/bastikr/boolean.py")
420 (synopsis "Boolean algebra in one Python module")
421 (description
422 "This is a small Python library that implements boolean algebra.
423 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
424 @code{Symbol} class that can take on one of these two values. Calculations
425 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
426 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
427 Expressions are constructed from parsed strings or directly in Python.")
428 (license license:bsd-2)))
429
430 (define-public python-hdf4
431 (package
432 (name "python-hdf4")
433 (version "0.9")
434 (source
435 (origin
436 (method url-fetch)
437 (uri (pypi-uri name version))
438 (sha256
439 (base32
440 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
441 (build-system python-build-system)
442 (native-inputs `(("nose" ,python-nose)))
443 (propagated-inputs `(("numpy" ,python-numpy)))
444 (inputs
445 `(("hdf4" ,hdf4)
446 ("libjpeg" ,libjpeg-turbo)
447 ("zlib" ,zlib)))
448 (arguments
449 `(#:phases
450 (modify-phases %standard-phases
451 (replace 'check
452 (lambda _
453 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
454 ;; on to import numpy. Somehow this works on their CI system.
455 ;; Let's just manage PYTHONPATH here instead.
456 (substitute* "runexamples.sh"
457 (("export PYTHONPATH=.*") ""))
458 (setenv "PYTHONPATH"
459 (string-append (getcwd) ":"
460 (getenv "PYTHONPATH")))
461 (invoke "./runexamples.sh")
462 (invoke "nosetests" "-v"))))))
463 (home-page "https://github.com/fhs/python-hdf4")
464 (synopsis "Python interface to the NCSA HDF4 library")
465 (description
466 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
467 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
468 NetCDF files can also be read and modified. Python-HDF4 is a fork of
469 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
470 (license license:expat)))
471
472 (define-public python2-hdf4
473 (package-with-python2 python-hdf4))
474
475 (define-public python-h5py
476 (package
477 (name "python-h5py")
478 (version "2.8.0")
479 (source
480 (origin
481 (method url-fetch)
482 (uri (pypi-uri "h5py" version))
483 (sha256
484 (base32
485 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
486 (build-system python-build-system)
487 (arguments
488 `(#:tests? #f ; no test target
489 #:phases
490 (modify-phases %standard-phases
491 (add-after 'unpack 'fix-hdf5-paths
492 (lambda* (#:key inputs #:allow-other-keys)
493 (let ((prefix (assoc-ref inputs "hdf5")))
494 (substitute* "setup_build.py"
495 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
496 (string-append "['" prefix "/lib" "']"))
497 (("'/opt/local/include', '/usr/local/include'")
498 (string-append "'" prefix "/include" "'")))
499 (substitute* "setup_configure.py"
500 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
501 (string-append "['" prefix "/lib" "']")))
502 #t))))))
503 (propagated-inputs
504 `(("python-six" ,python-six)
505 ("python-numpy" ,python-numpy)))
506 (inputs
507 `(("hdf5" ,hdf5)))
508 (native-inputs
509 `(("python-cython" ,python-cython)
510 ("python-pkgconfig" ,python-pkgconfig)))
511 (home-page "http://www.h5py.org/")
512 (synopsis "Read and write HDF5 files from Python")
513 (description
514 "The h5py package provides both a high- and low-level interface to the
515 HDF5 library from Python. The low-level interface is intended to be a
516 complete wrapping of the HDF5 API, while the high-level component supports
517 access to HDF5 files, datasets and groups using established Python and NumPy
518 concepts.")
519 (license license:bsd-3)))
520
521 (define-public python2-h5py
522 (package-with-python2 python-h5py))
523
524 (define-public python-sh
525 (package
526 (name "python-sh")
527 (version "1.12.14")
528 (source
529 (origin
530 (method url-fetch)
531 (uri (pypi-uri "sh" version))
532 (sha256
533 (base32
534 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
535 (build-system python-build-system)
536 (arguments
537 '(#:phases
538 (modify-phases %standard-phases
539 (replace 'check
540 (lambda _
541 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
542 (setenv "HOME" "/tmp")
543 (invoke "python" "sh.py" "test"))))))
544 (native-inputs
545 `(("python-coverage" ,python-coverage)))
546 (home-page "https://github.com/amoffat/sh")
547 (synopsis "Python subprocess replacement")
548 (description "This package provides a replacement for Python's
549 @code{subprocess} feature.")
550 (license license:expat)))
551
552 (define-public python2-sh
553 (package-with-python2 python-sh))
554
555 (define-public python-cftime
556 (package
557 (name "python-cftime")
558 (version "1.0.4.2")
559 (source
560 (origin
561 (method url-fetch)
562 (uri (pypi-uri "cftime" version))
563 (sha256
564 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
565 (build-system python-build-system)
566 (propagated-inputs
567 `(("python-numpy" ,python-numpy)))
568 (native-inputs
569 `(("python-coveralls" ,python-coveralls)
570 ("python-cython" ,python-cython)
571 ("python-pytest-cov" ,python-pytest-cov)))
572 (home-page "https://github.com/Unidata/cftime")
573 (synopsis "Library for time handling")
574 (description
575 "This package provides time-handling functionality that used to be part
576 of the netcdf4 package before.")
577 ;; This package claims to include code under the GPLv3 but is released
578 ;; under ISC.
579 (license (list license:isc license:gpl3+))))
580
581 (define-public python-netcdf4
582 (package
583 (name "python-netcdf4")
584 (version "1.4.2")
585 (source
586 (origin
587 (method url-fetch)
588 (uri (pypi-uri "netCDF4" version))
589 (sha256
590 (base32
591 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
592 (build-system python-build-system)
593 (arguments
594 '(#:phases
595 (modify-phases %standard-phases
596 (add-after 'unpack 'configure-locations
597 (lambda* (#:key inputs #:allow-other-keys)
598 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
599 #t)))))
600 (native-inputs
601 `(("python-cython" ,python-cython)))
602 (propagated-inputs
603 `(("python-numpy" ,python-numpy)
604 ("python-cftime" ,python-cftime)))
605 (inputs
606 `(("netcdf" ,netcdf)
607 ("hdf4" ,hdf4)
608 ("hdf5" ,hdf5)))
609 (home-page "https://github.com/Unidata/netcdf4-python")
610 (synopsis "Python/numpy interface to the netCDF library")
611 (description "Netcdf4-python is a Python interface to the netCDF C
612 library. netCDF version 4 has many features not found in earlier
613 versions of the library and is implemented on top of HDF5. This module
614 can read and write files in both the new netCDF 4 and the old netCDF 3
615 format, and can create files that are readable by HDF5 clients. The
616 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
617 to users of that module.")
618 ;; The software is mainly ISC, but includes some files covered
619 ;; by the Expat license.
620 (license (list license:isc license:expat))))
621
622 (define-public python2-netcdf4
623 (package-with-python2 python-netcdf4))
624
625 (define-public python-license-expression
626 (package
627 (name "python-license-expression")
628 (version "0.999")
629 (source
630 (origin
631 (method url-fetch)
632 (uri (pypi-uri "license-expression" version))
633 (sha256
634 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
635 (build-system python-build-system)
636 (propagated-inputs
637 `(("python-boolean.py" ,python-boolean.py)))
638 (home-page "https://github.com/nexB/license-expression")
639 (synopsis "Apply boolean logic to license expressions")
640 (description
641 "This Python module defines a tiny language to evaluate and compare
642 license expressions using boolean logic. Logical combinations of licenses can
643 be tested for equality, containment, and equivalence. They can be normalised
644 and simplified. It supports SPDX license expressions as well as other naming
645 conventions and aliases in the same expression.")
646 (license license:gpl2+)))
647
648 (define-public python-lockfile
649 (package
650 (name "python-lockfile")
651 (version "0.12.2")
652 (source
653 (origin
654 (method url-fetch)
655 (uri (pypi-uri "lockfile" version))
656 (sha256
657 (base32
658 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
659 (build-system python-build-system)
660 (arguments '(#:test-target "check"))
661 (native-inputs
662 `(("python-pbr" ,python-pbr)))
663 (home-page "https://launchpad.net/pylockfile")
664 (synopsis "Platform-independent file locking module")
665 (description
666 "The lockfile package exports a LockFile class which provides a simple
667 API for locking files.")
668 (license license:expat)))
669
670 (define-public python2-lockfile
671 (package-with-python2 python-lockfile))
672
673 (define-public python-semantic-version
674 (package
675 (name "python-semantic-version")
676 (version "2.6.0")
677 (source
678 (origin
679 (method url-fetch)
680 (uri (pypi-uri "semantic_version" version))
681 (sha256
682 (base32
683 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
684 (build-system python-build-system)
685 (arguments
686 `(#:tests? #f)) ; PyPI tarball lacks tests
687 (home-page "https://github.com/rbarrois/python-semanticversion")
688 (synopsis "Semantic versioning module for Python")
689 (description
690 "The @code{semantic_version} class is a small library for handling
691 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
692
693 It can compare versions, generate a new version that represents a bump in one of
694 the version levels, and check whether any given string is a proper semantic
695 version identifier.")
696 (license license:bsd-3)))
697
698 (define-public python2-semantic-version
699 (package-with-python2 python-semantic-version))
700
701 (define-public python-serpent
702 (package
703 (name "python-serpent")
704 (version "1.28")
705 (source
706 (origin
707 (method url-fetch)
708 (uri (pypi-uri "serpent" version))
709 (sha256
710 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
711 (build-system python-build-system)
712 (native-inputs
713 `(("python-attrs" ,python-attrs)
714 ("python-pytz" ,python-pytz)))
715 (home-page "https://github.com/irmen/Serpent")
716 (synopsis "Serializer for literal Python expressions")
717 (description
718 "Serpent provides @code{ast.literal_eval()}-compatible object tree
719 serialization. It serializes an object tree into bytes (an utf-8 encoded
720 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
721 to rebuild the original object tree.
722
723 Because only safe literals are encoded, it is safe to send serpent data to
724 other machines, such as over the network.")
725 (license license:expat)))
726
727 (define-public python-setuptools
728 (package
729 (name "python-setuptools")
730 (version "41.0.1")
731 (source
732 (origin
733 (method url-fetch)
734 (uri (pypi-uri "setuptools" version ".zip"))
735 (sha256
736 (base32
737 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
738 (modules '((guix build utils)))
739 (snippet
740 '(begin
741 ;; Remove included binaries which are used to build self-extracting
742 ;; installers for Windows.
743 ;; TODO: Find some way to build them ourself so we can include them.
744 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
745 #t))))
746 (build-system python-build-system)
747 ;; FIXME: Tests require pytest, which itself relies on setuptools.
748 ;; One could bootstrap with an internal untested setuptools.
749 (arguments
750 `(#:tests? #f))
751 (home-page "https://pypi.python.org/pypi/setuptools")
752 (synopsis
753 "Library designed to facilitate packaging Python projects")
754 (description
755 "Setuptools is a fully-featured, stable library designed to facilitate
756 packaging Python projects, where packaging includes:
757 Python package and module definitions,
758 distribution package metadata,
759 test hooks,
760 project installation,
761 platform-specific details,
762 Python 3 support.")
763 ;; TODO: setuptools now bundles the following libraries:
764 ;; packaging, pyparsing, six and appdirs. How to unbundle?
765 (license (list license:psfl ; setuptools itself
766 license:expat ; six, appdirs, pyparsing
767 license:asl2.0 ; packaging is dual ASL2/BSD-2
768 license:bsd-2))))
769
770 (define-public python2-setuptools
771 (package-with-python2 python-setuptools))
772
773 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
774 (define-public python-setuptools-for-tensorflow
775 (hidden-package
776 (package
777 (inherit python-setuptools)
778 (version "39.1.0")
779 (source (origin
780 (inherit (package-source python-setuptools))
781 (uri (pypi-uri "setuptools" version ".zip"))
782 (sha256
783 (base32
784 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
785
786 (define-public python-uniseg
787 (package
788 (name "python-uniseg")
789 (version "0.7.1")
790 (source
791 (origin
792 (method url-fetch)
793 (uri (pypi-uri "uniseg" version ".zip"))
794 (sha256
795 (base32
796 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
797 (build-system python-build-system)
798 (arguments
799 '(#:tests? #f)) ; The test suite requires network access.
800 (native-inputs
801 `(("unzip" ,unzip)))
802 (home-page
803 "https://bitbucket.org/emptypage/uniseg-python")
804 (synopsis
805 "Python library to determine Unicode text segmentations")
806 (description
807 "Uniseg is a Python package used to determine Unicode text segmentations.
808 Supported segmentations include:
809 @enumerate
810 @item @dfn{Code point} (any value in the Unicode codespace)
811 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
812 multiple Unicode code points, e.g. \"G\" + acute-accent)
813 @item Word break
814 @item Sentence break
815 @item Line break
816 @end enumerate")
817 (license license:expat)))
818
819 (define-public python2-uniseg
820 (package-with-python2 python-uniseg))
821
822 (define-public python-humanfriendly
823 (package
824 (name "python-humanfriendly")
825 (version "4.4.1")
826 (source
827 (origin
828 (method url-fetch)
829 (uri (pypi-uri "humanfriendly" version))
830 (sha256
831 (base32
832 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
833 (build-system python-build-system)
834 (arguments
835 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
836 #:tests? #f))
837 (propagated-inputs
838 `(("python-monotonic" ,python-monotonic)))
839 (home-page "https://humanfriendly.readthedocs.io")
840 (synopsis "Human-friendly input and output in Python")
841 (description
842 "The functions and classes in @code{humanfriendly} can be used to make
843 text interfaces more user-friendly. It includes tools to parse and format
844 numbers, file sizes, and timespans, timers for long-running operations, menus
845 to allow the user to choose from a list of options, and terminal interaction
846 helpers.")
847 (license license:expat)))
848
849 (define-public python2-humanfriendly
850 (package-with-python2 python-humanfriendly))
851
852 (define-public python-capturer
853 (package
854 (name "python-capturer")
855 (version "2.4")
856 (source
857 (origin
858 (method url-fetch)
859 (uri (pypi-uri "capturer" version))
860 (sha256
861 (base32
862 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
863 (build-system python-build-system)
864 (arguments
865 `(#:tests? #f))
866 (propagated-inputs
867 `(("python-humanfriendly" ,python-humanfriendly)))
868 (home-page "https://capturer.readthedocs.io")
869 (synopsis "Capture stdout and stderr streams of the current process")
870 (description
871 "The capturer package makes it easy to capture the stdout and stderr
872 streams of the current process and subprocesses. Output can be relayed
873 to the terminal in real time but is also available to the Python program
874 for additional processing.")
875 (license license:expat)))
876
877 (define-public python2-capturer
878 (package-with-python2 python-capturer))
879
880 (define-public python-case
881 (package
882 (name "python-case")
883 (version "1.5.3")
884 (source
885 (origin
886 (method url-fetch)
887 (uri (pypi-uri "case" version))
888 (sha256
889 (base32
890 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
891 (build-system python-build-system)
892 (propagated-inputs
893 `(("python-mock" ,python-mock)
894 ("python-nose" ,python-nose)
895 ("python-six" ,python-six)
896 ("python-unittest2" ,python-unittest2)))
897 (native-inputs
898 `(("python-coverage" ,python-coverage)))
899 (home-page "https://github.com/celery/case")
900 (synopsis "Unittest utilities and convenience methods")
901 (description
902 "The @code{case} package provides utilities on top of unittest, including
903 some helpful Python 2 compatibility convenience methods.")
904 (license license:bsd-3)))
905
906 (define-public python-verboselogs
907 (package
908 (name "python-verboselogs")
909 (version "1.7")
910 (source
911 (origin
912 (method url-fetch)
913 (uri (pypi-uri "verboselogs" version))
914 (sha256
915 (base32
916 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
917 (build-system python-build-system)
918 (arguments
919 `(#:phases
920 (modify-phases %standard-phases
921 (replace 'check
922 (lambda _
923 ;; Do not run pylint plugin test, as astroid is an old
924 ;; unsupported version.
925 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
926 "verboselogs/tests.py"))))))
927 (native-inputs
928 `(("python-mock" ,python-mock)
929 ("python-pytest" ,python-pytest)))
930 (home-page "https://verboselogs.readthedocs.io")
931 (synopsis "Verbose logging level for Python's logging module")
932 (description
933 "The @code{verboselogs} package extends Python's @code{logging} module to
934 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
935 (license license:expat)))
936
937 (define-public python2-verboselogs
938 (package-with-python2 python-verboselogs))
939
940 (define-public python-coloredlogs
941 (package
942 (name "python-coloredlogs")
943 (version "10.0")
944 (source
945 (origin
946 (method url-fetch)
947 (uri (pypi-uri "coloredlogs" version))
948 (sha256
949 (base32
950 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
951 (build-system python-build-system)
952 (arguments
953 `(;Tests require some updated modules
954 #:tests? #f))
955 (propagated-inputs
956 `(("python-capturer" ,python-capturer)))
957 (home-page "https://coloredlogs.readthedocs.io")
958 (synopsis "Colored stream handler for Python's logging module")
959 (description
960 "The @code{coloredlogs} package enables colored terminal output for
961 Python's logging module. The @code{ColoredFormatter} class inherits from
962 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
963 messages in color.")
964 (license license:expat)))
965
966 (define-public python2-coloredlogs
967 (package-with-python2 python-coloredlogs))
968
969 (define-public python-editorconfig
970 (package
971 (name "python-editorconfig")
972 (version "0.12.2")
973 (source
974 (origin
975 (method url-fetch)
976 (uri (pypi-uri "EditorConfig" version))
977 (sha256
978 (base32
979 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
980 (build-system python-build-system)
981 (home-page "https://editorconfig.org/")
982 (synopsis "EditorConfig bindings for python")
983 (description "The EditorConfig project consists of a file format for
984 defining coding styles and a collection of text editor plugins that enable
985 editors to read the file format and adhere to defined styles. EditorConfig
986 files are easily readable and they work nicely with version control systems.")
987 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
988 (license (list license:bsd-2 license:psfl))))
989
990 (define-public python-et-xmlfile
991 (package
992 (name "python-et-xmlfile")
993 (version "1.0.1")
994 (source
995 (origin
996 (method url-fetch)
997 (uri (pypi-uri "et_xmlfile" version))
998 (sha256
999 (base32
1000 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1001 (build-system python-build-system)
1002 (arguments
1003 `(#:phases (modify-phases %standard-phases
1004 (replace 'check
1005 (lambda _
1006 (invoke "pytest"))))))
1007 (native-inputs
1008 `(("python-pytest" ,python-pytest)
1009 ("python-lxml" ,python-lxml))) ;used for the tests
1010 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1011 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1012 (description "This Python library is based upon the @code{xmlfile} module
1013 from @code{lxml}. It aims to provide a low memory, compatible implementation
1014 of @code{xmlfile}.")
1015 (license license:expat)))
1016
1017 (define-public python2-et-xmlfile
1018 (package-with-python2 python-et-xmlfile))
1019
1020 (define-public python-openpyxl
1021 (package
1022 (name "python-openpyxl")
1023 (version "2.6.2")
1024 (source
1025 (origin
1026 ;; We use the upstream repository, as the tests are not included in the
1027 ;; PyPI releases.
1028 (method hg-fetch)
1029 (uri (hg-reference
1030 (url "https://bitbucket.org/openpyxl/openpyxl")
1031 (changeset version)))
1032 (file-name (string-append name "-" version "-checkout"))
1033 (sha256
1034 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1035 (build-system python-build-system)
1036 (arguments
1037 `(#:phases (modify-phases %standard-phases
1038 (replace 'check
1039 (lambda _
1040 (invoke "pytest"))))))
1041 (native-inputs
1042 ;; For the test suite.
1043 `(("python-lxml" ,python-lxml)
1044 ("python-pillow" ,python-pillow)
1045 ("python-pytest" ,python-pytest)))
1046 (propagated-inputs
1047 `(("python-et-xmlfile" ,python-et-xmlfile)
1048 ("python-jdcal" ,python-jdcal)))
1049 (home-page "https://openpyxl.readthedocs.io")
1050 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1051 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1052 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1053 standard.")
1054 (license license:expat)))
1055
1056 (define-public python-eventlet
1057 (package
1058 (name "python-eventlet")
1059 (version "0.25.1")
1060 (source
1061 (origin
1062 (method url-fetch)
1063 (uri (pypi-uri "eventlet" version))
1064 (sha256
1065 (base32
1066 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1067 (build-system python-build-system)
1068 (propagated-inputs
1069 `(("python-greenlet" ,python-greenlet)))
1070 (arguments
1071 ;; TODO: Requires unpackaged 'enum-compat'.
1072 '(#:tests? #f))
1073 (home-page "https://eventlet.net")
1074 (synopsis "Concurrent networking library for Python")
1075 (description
1076 "Eventlet is a concurrent networking library for Python that
1077 allows you to change how you run your code, not how you write it.
1078 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1079 Coroutines ensure that the developer uses a blocking style of programming
1080 that is similar to threading, but provide the benefits of non-blocking I/O.
1081 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1082 from the Python interpreter, or as a small part of a larger application.")
1083 (license license:expat)))
1084
1085 (define-public python2-eventlet
1086 (let ((base (package-with-python2
1087 (strip-python2-variant python-eventlet))))
1088 (package (inherit base)
1089 (propagated-inputs
1090 `(("python2-enum34" ,python2-enum34)
1091 ,@(package-propagated-inputs base))))))
1092
1093 (define-public python-six
1094 (package
1095 (name "python-six")
1096 (version "1.14.0")
1097 (source
1098 (origin
1099 (method url-fetch)
1100 (uri (pypi-uri "six" version))
1101 (sha256
1102 (base32
1103 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1104 (build-system python-build-system)
1105 (arguments
1106 `(#:phases
1107 (modify-phases %standard-phases
1108 (replace 'check
1109 (lambda _
1110 (invoke "py.test" "-v"))))))
1111 (native-inputs
1112 `(("python-pytest" ,python-pytest-bootstrap)))
1113 (home-page "https://pypi.python.org/pypi/six/")
1114 (synopsis "Python 2 and 3 compatibility utilities")
1115 (description
1116 "Six is a Python 2 and 3 compatibility library. It provides utility
1117 functions for smoothing over the differences between the Python versions with
1118 the goal of writing Python code that is compatible on both Python versions.
1119 Six supports every Python version since 2.5. It is contained in only one
1120 Python file, so it can be easily copied into your project.")
1121 (license license:x11)))
1122
1123 (define-public python2-six
1124 (package-with-python2 python-six))
1125
1126 (define-public python-six-bootstrap
1127 (package
1128 (inherit python-six)
1129 (name "python-six-bootstrap")
1130 (native-inputs `())
1131 (arguments `(#:tests? #f))))
1132
1133 (define-public python2-six-bootstrap
1134 (package-with-python2 python-six-bootstrap))
1135
1136 (define-public python-schedule
1137 (package
1138 (name "python-schedule")
1139 (version "0.4.3")
1140 (source
1141 (origin
1142 (method url-fetch)
1143 (uri (pypi-uri "schedule" version))
1144 (sha256
1145 (base32
1146 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1147 (build-system python-build-system)
1148 (native-inputs
1149 `(("python-pytest" ,python-pytest)
1150 ("python-mock" ,python-mock)))
1151 (home-page "https://github.com/dbader/schedule")
1152 (synopsis "Schedule periodic function calls in Python")
1153 (description
1154 "Schedule is an in-process scheduler for periodic jobs that uses the
1155 builder pattern for configuration. Schedule lets you run Python functions (or
1156 any other callable) periodically at pre-determined intervals using a simple,
1157 human-friendly syntax.")
1158 (license license:expat)))
1159
1160 (define-public python2-schedule
1161 (package-with-python2 python-schedule))
1162
1163 (define-public python2-mechanize
1164 (package
1165 (name "python2-mechanize")
1166 (version "0.2.5")
1167 (source
1168 (origin
1169 (method url-fetch)
1170 (uri (pypi-uri "mechanize" version))
1171 (sha256
1172 (base32
1173 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1174 (build-system python-build-system)
1175 (arguments
1176 `(#:python ,python-2 ; apparently incompatible with Python 3
1177 #:tests? #f))
1178 ;; test fails with message
1179 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1180 ;; (python-3.3.2) or
1181 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1182 ;; (python-2.7.5).
1183 ;; The source code is from March 2011 and probably not up-to-date
1184 ;; with respect to python unit tests.
1185 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1186 (synopsis
1187 "Stateful programmatic web browsing in Python")
1188 (description
1189 "Mechanize implements stateful programmatic web browsing in Python,
1190 after Andy Lester’s Perl module WWW::Mechanize.")
1191 (license (license:non-copyleft
1192 "file://COPYING"
1193 "See COPYING in the distribution."))))
1194
1195
1196 (define-public python-simplejson
1197 (package
1198 (name "python-simplejson")
1199 (version "3.14.0")
1200 (source
1201 (origin
1202 (method url-fetch)
1203 (uri (pypi-uri "simplejson" version))
1204 (sha256
1205 (base32
1206 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1207 (build-system python-build-system)
1208 (home-page "http://simplejson.readthedocs.org/en/latest/")
1209 (synopsis
1210 "Json library for Python")
1211 (description
1212 "JSON (JavaScript Object Notation) is a subset of JavaScript
1213 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1214 format.
1215
1216 Simplejson exposes an API familiar to users of the standard library marshal
1217 and pickle modules. It is the externally maintained version of the json
1218 library contained in Python 2.6, but maintains compatibility with Python 2.5
1219 and (currently) has significant performance advantages, even without using
1220 the optional C extension for speedups. Simplejson is also supported on
1221 Python 3.3+.")
1222 (license license:x11)))
1223
1224 (define-public python2-simplejson
1225 (package-with-python2 python-simplejson))
1226
1227
1228 (define-public python-pyicu
1229 (package
1230 (name "python-pyicu")
1231 (version "2.3.1")
1232 (source
1233 (origin
1234 (method url-fetch)
1235 (uri (pypi-uri "PyICU" version))
1236 (sha256
1237 (base32
1238 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1239 (build-system python-build-system)
1240 (inputs
1241 `(("icu4c" ,icu4c)))
1242 (native-inputs
1243 `(("python-pytest" ,python-pytest)
1244 ("python-six" ,python-six)))
1245 (home-page "https://github.com/ovalhub/pyicu")
1246 (synopsis "Python extension wrapping the ICU C++ API")
1247 (description
1248 "PyICU is a python extension wrapping the ICU C++ API.")
1249 (properties `((python2-variant . ,(delay python2-pyicu))))
1250 (license license:x11)))
1251
1252 (define-public python2-pyicu
1253 (let ((base (package-with-python2
1254 (strip-python2-variant python-pyicu))))
1255 (package
1256 (inherit base)
1257 (arguments
1258 `(,@(package-arguments base)
1259 #:phases
1260 (modify-phases %standard-phases
1261 (add-before 'check 'delete-failing-test
1262 (λ _
1263 ;; XXX: This fails due to Unicode issues unique to Python 2,
1264 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1265 (delete-file "test/test_Script.py")
1266 #t))))))))
1267
1268 (define-public python2-dogtail
1269 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1270 ;; spaces in indentation" with Python 3.
1271 (package
1272 (name "python2-dogtail")
1273 (version "0.9.9")
1274 (source (origin
1275 (method url-fetch)
1276 (uri (pypi-uri "dogtail" version))
1277 (sha256
1278 (base32
1279 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1280 (build-system python-build-system)
1281 (arguments `(#:python ,python-2
1282 #:tests? #f)) ; invalid command "test"
1283 ;; Currently no offical homepage.
1284 (home-page "https://pypi.python.org/pypi/dogtail/")
1285 (synopsis "GUI test tool and automation framework written in Python")
1286 (description
1287 "Dogtail is a GUI test tool and automation framework written in Python.
1288 It uses Accessibility (a11y) technologies to communicate with desktop
1289 applications. dogtail scripts are written in Python and executed like any
1290 other Python program.")
1291 (license license:gpl2+)))
1292
1293 (define-public python-empy
1294 (package
1295 (name "python-empy")
1296 (version "3.3.3")
1297 (source (origin
1298 (method url-fetch)
1299 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1300 version ".tar.gz"))
1301 (sha256
1302 (base32
1303 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1304 (build-system python-build-system)
1305 (arguments
1306 `(#:tests? #f)) ; python2 only
1307 (home-page "http://www.alcyone.com/software/empy/")
1308 (synopsis "Templating system for Python")
1309 (description
1310 "EmPy is a system for embedding Python expressions and statements in
1311 template text; it takes an EmPy source file, processes it, and produces
1312 output. This is accomplished via expansions, which are special signals to the
1313 EmPy system and are set off by a special prefix (by default the at sign, @@).
1314 EmPy can expand arbitrary Python expressions and statements in this way, as
1315 well as a variety of special forms. Textual data not explicitly delimited in
1316 this way is sent unaffected to the output, allowing Python to be used in
1317 effect as a markup language. Also supported are callbacks via hooks,
1318 recording and playback via diversions, and dynamic, chainable filters. The
1319 system is highly configurable via command line options and embedded
1320 commands.")
1321 (license license:lgpl2.1+)))
1322
1323 (define-public python2-empy
1324 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1325 (package
1326 (inherit base)
1327 (arguments `(,@(package-arguments base)
1328 #:tests? #t)))))
1329
1330 (define-public python2-element-tree
1331 (package
1332 (name "python2-element-tree")
1333 (version "1.2.6")
1334 (source (origin
1335 (method url-fetch)
1336 (uri (string-append
1337 "http://effbot.org/media/downloads/elementtree-"
1338 version "-20050316.tar.gz"))
1339 (sha256
1340 (base32
1341 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1342 (build-system python-build-system)
1343 (arguments
1344 `(#:python ,python-2 ; seems to be part of Python 3
1345 #:tests? #f)) ; no 'test' sub-command
1346 (synopsis "Toolkit for XML processing in Python")
1347 (description
1348 "ElementTree is a Python library supporting lightweight XML processing.")
1349 (home-page "http://effbot.org/zone/element-index.htm")
1350 (license (license:x11-style
1351 "http://docs.python.org/2/license.html"
1352 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1353
1354 (define-public python2-pybugz
1355 (package
1356 (name "python2-pybugz")
1357 (version "0.6.11")
1358 (source (origin
1359 (method url-fetch)
1360 (uri (string-append
1361 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1362 version ".tar.gz"))
1363 (sha256
1364 (base32
1365 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1366 (patches (search-patches "pybugz-stty.patch"
1367 "pybugz-encode-error.patch"))))
1368 (build-system python-build-system)
1369 (arguments
1370 `(#:python ,python-2 ; SyntaxError with Python 3
1371 #:tests? #f)) ; no 'test' sub-command
1372 (propagated-inputs
1373 `(("element-tree" ,python2-element-tree)))
1374 (synopsis "Python and command-line interface to Bugzilla")
1375 (description
1376 "PyBugz is a Python library and command-line tool to query the Bugzilla
1377 bug tracking system. It is meant as an aid to speed up interaction with the
1378 bug tracker.")
1379 (home-page "http://www.liquidx.net/pybugz/")
1380 (license license:gpl2)))
1381
1382 (define-public python2-enum
1383 (package
1384 (name "python2-enum")
1385 (version "0.4.6")
1386 (source (origin
1387 (method url-fetch)
1388 (uri (pypi-uri "enum" version))
1389 (sha256
1390 (base32
1391 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1392 (build-system python-build-system)
1393 (arguments
1394 `(#:python ,python-2))
1395 (home-page "http://pypi.python.org/pypi/enum/")
1396 (synopsis "Robust enumerated type support in Python")
1397 (description
1398 "This provides a module for robust enumerations in Python. It has
1399 been superseded by the Python standard library and is provided only for
1400 compatibility.")
1401 ;; Choice of either license.
1402 (license (list license:gpl3+ license:psfl))))
1403
1404 (define-public python-enum34
1405 (package
1406 (name "python-enum34")
1407 (version "1.1.6")
1408 (source
1409 (origin
1410 (method url-fetch)
1411 (uri (pypi-uri "enum34" version))
1412 (sha256
1413 (base32
1414 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1415 (build-system python-build-system)
1416 (home-page "https://pypi.python.org/pypi/enum34")
1417 (synopsis "Backported Python 3.4 Enum")
1418 (description
1419 "Enum34 is the new Python stdlib enum module available in Python 3.4
1420 backported for previous versions of Python from 2.4 to 3.3.")
1421 (license license:bsd-3)))
1422
1423 (define-public python2-enum34
1424 (package-with-python2 python-enum34))
1425
1426 (define-public python-parse-type
1427 (package
1428 (name "python-parse-type")
1429 (version "0.4.2")
1430 (source
1431 (origin
1432 (method url-fetch)
1433 (uri (pypi-uri "parse_type" version))
1434 (sha256
1435 (base32
1436 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1437 (build-system python-build-system)
1438 (propagated-inputs
1439 `(("python-six" ,python-six)
1440 ("python-parse" ,python-parse)))
1441 (native-inputs
1442 `(("python-pytest" ,python-pytest)
1443 ("python-pytest-runner" ,python-pytest-runner)))
1444 (home-page "https://github.com/jenisys/parse_type")
1445 (synopsis "Extended parse module")
1446 (description
1447 "Parse_type extends the python parse module.")
1448 (properties
1449 `((python2-variant . ,(delay python2-parse-type))))
1450 (license license:bsd-3)))
1451
1452 (define-public python2-parse-type
1453 (let ((base (package-with-python2
1454 (strip-python2-variant python-parse-type))))
1455 (package (inherit base)
1456 (propagated-inputs
1457 `(("python2-enum34" ,python2-enum34)
1458 ,@(package-propagated-inputs base))))))
1459
1460 (define-public python-parse
1461 (package
1462 (name "python-parse")
1463 (version "1.8.4")
1464 (source
1465 (origin
1466 (method url-fetch)
1467 (uri (pypi-uri "parse" version))
1468 (sha256
1469 (base32
1470 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1471 (build-system python-build-system)
1472 (arguments
1473 `(#:phases
1474 (modify-phases %standard-phases
1475 (replace 'check
1476 (lambda _ (invoke "python" "test_parse.py"))))))
1477 (home-page "https://github.com/r1chardj0n3s/parse")
1478 (synopsis "Parse strings")
1479 (description
1480 "Parse strings using a specification based on the Python @code{format()}
1481 syntax.")
1482 (license license:x11)))
1483
1484 (define-public python-polib
1485 (package
1486 (name "python-polib")
1487 (version "1.0.8")
1488 (source (origin
1489 (method url-fetch)
1490 (uri (pypi-uri "polib" version))
1491 (sha256
1492 (base32
1493 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1494 (build-system python-build-system)
1495 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1496 (synopsis "Manipulate, create and modify gettext files")
1497 (description "Polib can manipulate any gettext format (po, pot and mo)
1498 files. It can be used to create po files from scratch or to modify
1499 existing ones.")
1500 (license license:expat)))
1501
1502 (define-public python2-polib
1503 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1504 (package
1505 (inherit base)
1506 (arguments `(,@(package-arguments base)
1507 ;; Tests don't work with python2.
1508 #:tests? #f)))))
1509
1510 (define-public python-poyo
1511 (package
1512 (name "python-poyo")
1513 (version "0.5.0")
1514 (source
1515 (origin
1516 (method url-fetch)
1517 (uri (pypi-uri "poyo" version))
1518 (sha256
1519 (base32
1520 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1521 (build-system python-build-system)
1522 (home-page "https://github.com/hackebrot/poyo")
1523 (synopsis "Lightweight YAML Parser for Python")
1524 (description
1525 "This package provides a lightweight YAML Parser for Python. It supports
1526 only a chosen subset of the YAML format that is required to parse cookiecutter
1527 user configuration files. It does not have support for serializing into YAML
1528 and is not compatible with JSON.")
1529 (license license:expat)))
1530
1531 (define-public scons
1532 (package
1533 (name "scons")
1534 (version "3.0.4")
1535 (source (origin
1536 (method git-fetch)
1537 (uri (git-reference
1538 (url "https://github.com/SCons/scons.git")
1539 (commit version)))
1540 (file-name (git-file-name name version))
1541 (sha256
1542 (base32
1543 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1544 (build-system python-build-system)
1545 (arguments
1546 `(#:use-setuptools? #f ; still relies on distutils
1547 #:tests? #f ; no 'python setup.py test' command
1548 #:phases
1549 (modify-phases %standard-phases
1550 (add-before 'build 'bootstrap
1551 (lambda _
1552 (substitute* "src/engine/SCons/compat/__init__.py"
1553 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1554 "sys.modules[new] = __import__(old)"))
1555 (substitute* "src/engine/SCons/Platform/__init__.py"
1556 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1557 "mod = __import__(full_name)"))
1558 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1559 (chdir "build/scons")
1560 #t)))))
1561 (home-page "http://scons.org/")
1562 (synopsis "Software construction tool written in Python")
1563 (description
1564 "SCons is a software construction tool. Think of SCons as an improved,
1565 cross-platform substitute for the classic Make utility with integrated
1566 functionality similar to autoconf/automake and compiler caches such as ccache.
1567 In short, SCons is an easier, more reliable and faster way to build
1568 software.")
1569 (license license:x11)))
1570
1571 (define-public scons-python2
1572 (package
1573 (inherit (package-with-python2 scons))
1574 (name "scons-python2")))
1575
1576 (define-public python-extras
1577 (package
1578 (name "python-extras")
1579 (version "1.0.0")
1580 (source
1581 (origin
1582 (method url-fetch)
1583 (uri (pypi-uri "extras" version))
1584 (sha256
1585 (base32
1586 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1587 (build-system python-build-system)
1588 (arguments
1589 ;; FIXME: Circular dependency on testtools.
1590 '(#:tests? #f))
1591 (home-page "https://github.com/testing-cabal/extras")
1592 (synopsis "Useful extensions to the Python standard library")
1593 (description
1594 "Extras is a set of extensions to the Python standard library.")
1595 (license license:expat)))
1596
1597 (define-public python2-extras
1598 (package-with-python2 python-extras))
1599
1600 (define-public python-mimeparse
1601 (package
1602 (name "python-mimeparse")
1603 (version "1.6.0")
1604 (source
1605 (origin
1606 (method url-fetch)
1607 (uri (pypi-uri "python-mimeparse" version))
1608 (sha256
1609 (base32
1610 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1611 (build-system python-build-system)
1612 (arguments
1613 '(#:phases
1614 (modify-phases %standard-phases
1615 (replace 'check
1616 (lambda _
1617 (invoke "./mimeparse_test.py"))))))
1618 (home-page
1619 "https://github.com/dbtsai/python-mimeparse")
1620 (synopsis "Python library for parsing MIME types")
1621 (description
1622 "Mimeparse provides basic functions for parsing MIME type names and
1623 matching them against a list of media-ranges.")
1624 (license license:expat)))
1625
1626 (define-public python2-mimeparse
1627 (package-with-python2 python-mimeparse))
1628
1629 (define-public python-miniboa
1630 (package
1631 (name "python-miniboa")
1632 (version "1.0.7")
1633 (source
1634 (origin
1635 (method url-fetch)
1636 (uri (pypi-uri "miniboa" version))
1637 (sha256
1638 (base32
1639 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1640 (build-system python-build-system)
1641 (home-page "https://github.com/shmup/miniboa")
1642 (synopsis "Simple, single-threaded Telnet server")
1643 (description
1644 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1645 server.")
1646 (license license:asl2.0)))
1647
1648 (define-public python2-miniboa
1649 (package-with-python2 python-miniboa))
1650
1651 (define-public python-pafy
1652 (package
1653 (name "python-pafy")
1654 (version "0.5.3.1")
1655 (source
1656 (origin
1657 (method url-fetch)
1658 (uri (pypi-uri "pafy" version))
1659 (sha256
1660 (base32
1661 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1662 (build-system python-build-system)
1663 (arguments
1664 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1665 (propagated-inputs
1666 ;; Youtube-dl is a python package which is imported in the file
1667 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1668 `(("youtube-dl" ,youtube-dl)))
1669 (home-page "https://np1.github.io/pafy/")
1670 (synopsis "Retrieve YouTube content and metadata")
1671 (description
1672 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1673 (license license:lgpl3+)))
1674
1675 (define-public python2-funcsigs
1676 (package
1677 (name "python2-funcsigs")
1678 (version "1.0.2")
1679 (source (origin
1680 (method url-fetch)
1681 (uri (pypi-uri "funcsigs" version))
1682 (sha256
1683 (base32
1684 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1685 (build-system python-build-system)
1686 (arguments
1687 `(#:python ,python-2))
1688 (native-inputs
1689 `(("python2-unittest2" ,python2-unittest2)))
1690 (home-page "http://funcsigs.readthedocs.org")
1691 (synopsis "Python function signatures from PEP362")
1692 (description
1693 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1694 (license license:asl2.0)))
1695
1696 (define-public python2-funcsigs-bootstrap
1697 (package
1698 (inherit python2-funcsigs)
1699 (name "python2-funcsigs-bootstrap")
1700 (native-inputs `())
1701 (arguments
1702 `(#:tests? #f
1703 ,@(package-arguments python2-funcsigs)))))
1704
1705 (define-public python-py
1706 (package
1707 (name "python-py")
1708 (version "1.8.1")
1709 (source
1710 (origin
1711 (method url-fetch)
1712 (uri (pypi-uri "py" version))
1713 (sha256
1714 (base32
1715 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
1716 (build-system python-build-system)
1717 (arguments
1718 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1719 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1720 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1721 ;; Is this module globally installed?"
1722 '(#:tests? #f))
1723 (native-inputs
1724 `(("python-setuptools-scm" ,python-setuptools-scm)))
1725 (home-page "https://github.com/pytest-dev/py")
1726 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1727 (description
1728 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1729 code introspection, and logging.")
1730 (license license:expat)))
1731
1732 (define-public python2-py
1733 (package-with-python2 python-py))
1734
1735 ;; Recent versions of python-fixtures and python-testrepository need
1736 ;; python-pbr for packaging, which itself needs these two packages for
1737 ;; testing.
1738 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1739 ;; same source, just without any test dependencies and with tests disabled.
1740 ;; python-pbr-minmal is then used to package python-fixtures and
1741 ;; python-testrepository.
1742 ;; Strictly speaking we currently could remove the test-requirements from the
1743 ;; normal python-pbr package (and save this package) since test are disabled
1744 ;; there anyway. But this may change in future.
1745 (define-public python-pbr-minimal
1746 (package
1747 (name "python-pbr-minimal")
1748 (version "3.0.1")
1749 (source
1750 (origin
1751 (method url-fetch)
1752 (uri (pypi-uri "pbr" version))
1753 (sha256
1754 (base32
1755 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1756 (build-system python-build-system)
1757 (arguments
1758 `(#:tests? #f))
1759 (home-page "http://docs.openstack.org/developer/pbr/")
1760 (synopsis "Minimal build of python-pbr used for bootstrapping")
1761 (description
1762 "Used only for bootstrapping python2-pbr, you should not need this.")
1763 (license license:asl2.0)))
1764
1765 (define-public python2-pbr-minimal
1766 (package-with-python2 python-pbr-minimal))
1767
1768 (define-public python-pbr
1769 (package
1770 (inherit python-pbr-minimal)
1771 (name "python-pbr")
1772 (arguments
1773 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1774 (propagated-inputs
1775 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1776 (native-inputs
1777 `(("python-fixtures" ,python-fixtures-bootstrap)
1778 ;; discover, coverage, hacking, subunit
1779 ("python-mock" ,python-mock)
1780 ("python-six" ,python-six)
1781 ("python-sphinx" ,python-sphinx)
1782 ("python-testrepository" ,python-testrepository-bootstrap)
1783 ("python-testresources" ,python-testresources-bootstrap)
1784 ("python-testscenarios" ,python-testscenarios-bootstrap)
1785 ("python-testtools" ,python-testtools-bootstrap)
1786 ("python-virtualenv" ,python-virtualenv)))
1787 (synopsis "Enhance the default behavior of Python’s setuptools")
1788 (description
1789 "Python Build Reasonableness (PBR) is a library that injects some useful
1790 and sensible default behaviors into your setuptools run. It will set
1791 versions, process requirements files and generate AUTHORS and ChangeLog file
1792 from git information.
1793 ")))
1794
1795 (define-public python2-pbr
1796 (package-with-python2 python-pbr))
1797
1798 (define-public python-pyrsistent
1799 (package
1800 (name "python-pyrsistent")
1801 (version "0.14.11")
1802 (home-page "https://github.com/tobgu/pyrsistent")
1803 (source (origin
1804 (method url-fetch)
1805 (uri (pypi-uri "pyrsistent" version))
1806 (sha256
1807 (base32
1808 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1809 (build-system python-build-system)
1810 (native-inputs
1811 `(("python-hypothesis" ,python-hypothesis)
1812 ("python-pytest" ,python-pytest)
1813 ("python-pytest-runner" ,python-pytest-runner)))
1814 (propagated-inputs
1815 `(("python-six" ,python-six)))
1816 (synopsis "Persistent data structures for Python")
1817 (description
1818 "Pyrsistent is a number of persistent collections (by some referred to as
1819 functional data structures). Persistent in the sense that they are immutable.
1820
1821 All methods on a data structure that would normally mutate it instead return a
1822 new copy of the structure containing the requested updates. The original
1823 structure is left untouched.")
1824 (license license:expat)))
1825
1826 (define-public python2-pyrsistent
1827 (package-with-python2 python-pyrsistent))
1828
1829 (define-public python-exif-read
1830 (package
1831 (name "python-exif-read")
1832 (version "2.1.2")
1833 (source (origin
1834 (method url-fetch)
1835 (uri (pypi-uri "ExifRead" version))
1836 (sha256
1837 (base32
1838 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1839 (build-system python-build-system)
1840 (arguments `(#:tests? #f)) ; no tests
1841 (home-page "https://github.com/ianare/exif-py")
1842 (synopsis "Python library to extract EXIF data from image files")
1843 (description
1844 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1845 files.")
1846 (license license:bsd-3)))
1847
1848 (define-public python2-exif-read
1849 (package-with-python2 python-exif-read))
1850
1851 (define-public python-pyld
1852 (package
1853 (name "python-pyld")
1854 (version "1.0.5")
1855 (source (origin
1856 (method url-fetch)
1857 (uri (pypi-uri "PyLD" version))
1858 (sha256
1859 (base32
1860 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1861 (build-system python-build-system)
1862 (home-page "https://github.com/digitalbazaar/pyld")
1863 (synopsis "Python implementation of the JSON-LD specification")
1864 (description
1865 "PyLD is an implementation of the JSON-LD specification.")
1866 (license license:bsd-3)))
1867
1868 (define-public python2-pyld
1869 (package-with-python2 python-pyld))
1870
1871 (define-public python-click
1872 (package
1873 (name "python-click")
1874 (version "7.0")
1875 (source
1876 (origin
1877 (method url-fetch)
1878 (uri (pypi-uri "click" version))
1879 (sha256
1880 (base32
1881 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1882 (build-system python-build-system)
1883 (arguments
1884 `(#:phases
1885 (modify-phases %standard-phases
1886 (add-after 'unpack 'fix-paths
1887 (lambda* (#:key inputs #:allow-other-keys)
1888 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1889 "cross-libc" "libc"))))
1890 (substitute* "click/_unicodefun.py"
1891 (("'locale'")
1892 (string-append "'" glibc "/bin/locale'"))))
1893 #t))
1894 (replace 'check
1895 (lambda _
1896 (invoke "python" "-m" "pytest"))))))
1897 (native-inputs
1898 `(("python-pytest" ,python-pytest)))
1899 (home-page "https://palletsprojects.com/p/click/")
1900 (synopsis "Command line library for Python")
1901 (description
1902 "Click is a Python package for creating command line interfaces in a
1903 composable way with as little code as necessary. Its name stands for
1904 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1905 with sensible defaults out of the box.")
1906 (license license:bsd-3)))
1907
1908 (define-public python2-click
1909 (package-with-python2 python-click))
1910
1911 (define-public python-wheel
1912 (package
1913 (name "python-wheel")
1914 (version "0.33.6")
1915 (source
1916 (origin
1917 (method url-fetch)
1918 (uri (pypi-uri "wheel" version))
1919 (sha256
1920 (base32
1921 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
1922 (build-system python-build-system)
1923 (arguments
1924 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
1925 ;; fails to find the newly-built bdist_wheel library, even though it is
1926 ;; available on PYTHONPATH. What search path is consulted by setup.py?
1927 '(#:tests? #f))
1928 (home-page "https://bitbucket.org/pypa/wheel/")
1929 (synopsis "Format for built Python packages")
1930 (description
1931 "A wheel is a ZIP-format archive with a specially formatted filename and
1932 the @code{.whl} extension. It is designed to contain all the files for a PEP
1933 376 compatible install in a way that is very close to the on-disk format. Many
1934 packages will be properly installed with only the @code{Unpack} step and the
1935 unpacked archive preserves enough information to @code{Spread} (copy data and
1936 scripts to their final locations) at any later time. Wheel files can be
1937 installed with a newer @code{pip} or with wheel's own command line utility.")
1938 (license license:expat)))
1939
1940 (define-public python2-wheel
1941 (package-with-python2 python-wheel))
1942
1943 (define-public python-vcversioner
1944 (package
1945 (name "python-vcversioner")
1946 (version "2.16.0.0")
1947 (source
1948 (origin
1949 (method url-fetch)
1950 (uri (pypi-uri "vcversioner" version))
1951 (sha256
1952 (base32
1953 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1954 (build-system python-build-system)
1955 (synopsis "Python library for version number discovery")
1956 (description "Vcversioner is a Python library that inspects tagging
1957 information in a variety of version control systems in order to discover
1958 version numbers.")
1959 (home-page "https://github.com/habnabit/vcversioner")
1960 (license license:isc)))
1961
1962 (define-public python2-vcversioner
1963 (package-with-python2 python-vcversioner))
1964
1965 (define-public python-jdcal
1966 (package
1967 (name "python-jdcal")
1968 (version "1.4")
1969 (source
1970 (origin
1971 (method url-fetch)
1972 (uri (pypi-uri "jdcal" version))
1973 (sha256
1974 (base32
1975 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1976 (build-system python-build-system)
1977 (arguments
1978 `(#:phases (modify-phases %standard-phases
1979 (replace 'check
1980 (lambda _
1981 (invoke "pytest"))))))
1982 (native-inputs
1983 `(("python-pytest" ,python-pytest)))
1984 (home-page "https://github.com/phn/jdcal")
1985 (synopsis "Functions to convert between Julian dates Gregorian dates")
1986 (description "This Python library provides functions for converting
1987 between Julian dates and Gregorian dates.")
1988 (license license:bsd-2)))
1989
1990 (define-public python2-jdcal
1991 (package-with-python2 python-jdcal))
1992
1993 (define-public python-jsonschema
1994 (package
1995 (name "python-jsonschema")
1996 (version "3.0.1")
1997 (source (origin
1998 (method url-fetch)
1999 (uri (pypi-uri "jsonschema" version))
2000 (sha256
2001 (base32
2002 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2003 (build-system python-build-system)
2004 (arguments
2005 '(#:phases
2006 (modify-phases %standard-phases
2007 (replace 'check
2008 (lambda _
2009 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2010 (invoke "trial" "jsonschema"))))))
2011 (native-inputs
2012 `(("python-setuptools_scm" ,python-setuptools-scm)
2013 ("python-twisted" ,python-twisted)))
2014 (propagated-inputs
2015 `(("python-attrs" ,python-attrs)
2016 ("python-pyrsistent" ,python-pyrsistent)
2017 ("python-six" ,python-six)))
2018 (home-page "https://github.com/Julian/jsonschema")
2019 (synopsis "Implementation of JSON Schema for Python")
2020 (description
2021 "Jsonschema is an implementation of JSON Schema for Python.")
2022 (license license:expat)
2023 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2024
2025 (define-public python2-jsonschema
2026 (let ((jsonschema (package-with-python2
2027 (strip-python2-variant python-jsonschema))))
2028 (package (inherit jsonschema)
2029 (propagated-inputs
2030 `(("python2-functools32" ,python2-functools32)
2031 ,@(package-propagated-inputs jsonschema))))))
2032
2033 ;; This old version is still required by docker-compose as of 1.24.0.
2034 (define-public python-jsonschema-2.6
2035 (package
2036 (name "python-jsonschema")
2037 (version "2.6.0")
2038 (source (origin
2039 (method url-fetch)
2040 (uri (pypi-uri "jsonschema" version))
2041 (sha256
2042 (base32
2043 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2044 (build-system python-build-system)
2045 (arguments
2046 '(#:phases
2047 (modify-phases %standard-phases
2048 (replace 'check (lambda _ (invoke "nosetests"))))))
2049 (native-inputs
2050 `(("python-nose" ,python-nose)
2051 ("python-vcversioner" ,python-vcversioner)))
2052 (home-page "https://github.com/Julian/jsonschema")
2053 (synopsis "Implementation of JSON Schema for Python")
2054 (description
2055 "Jsonschema is an implementation of JSON Schema for Python.")
2056 (license license:expat)
2057 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2058
2059 (define-public python-schema
2060 (package
2061 (name "python-schema")
2062 (version "0.6.6")
2063 (source
2064 (origin
2065 (method url-fetch)
2066 (uri (pypi-uri "schema" version))
2067 (sha256
2068 (base32
2069 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2070 (build-system python-build-system)
2071 (native-inputs
2072 `(("python-pytest" ,python-pytest)))
2073 (home-page "https://github.com/keleshev/schema")
2074 (synopsis "Simple data validation library")
2075 (description
2076 "@code{python-schema} is a library for validating Python data
2077 structures, such as those obtained from config-files, forms, external
2078 services or command-line parsing, converted from JSON/YAML (or
2079 something else) to Python data-types.")
2080 (license license:psfl)))
2081
2082 (define-public python2-schema
2083 (package-with-python2 python-schema))
2084
2085 (define-public python-schema-0.5
2086 (package (inherit python-schema)
2087 (version "0.5.0")
2088 (source
2089 (origin
2090 (method url-fetch)
2091 (uri (pypi-uri "schema" version))
2092 (sha256
2093 (base32
2094 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2095
2096 (define-public python2-schema-0.5
2097 (package-with-python2 python-schema-0.5))
2098
2099 (define-public python-kitchen
2100 (package
2101 (name "python-kitchen")
2102 (version "1.2.5")
2103 (source
2104 (origin
2105 (method url-fetch)
2106 (uri (pypi-uri "kitchen" version))
2107 (sha256
2108 (base32
2109 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2110 (build-system python-build-system)
2111 (propagated-inputs
2112 `(("python-chardet" ,python-chardet)))
2113 (home-page "https://github.com/fedora-infra/kitchen")
2114 (synopsis "Python API for snippets")
2115 (description "@code{kitchen} module provides a python API for all sorts of
2116 little useful snippets of code that everybody ends up writing for their projects
2117 but never seem big enough to build an independent release. Use kitchen and stop
2118 cutting and pasting that code over and over.")
2119 (license (list license:lgpl2.1+
2120 ;; subprocess.py, test_subprocess.py,
2121 ;; kitchen/pycompat25/defaultdict.py:
2122 license:psfl))))
2123
2124 (define-public python2-kitchen
2125 (package-with-python2 python-kitchen))
2126
2127 (define-public python-unidecode
2128 (package
2129 (name "python-unidecode")
2130 (version "1.1.1")
2131 (source (origin
2132 (method url-fetch)
2133 (uri (pypi-uri "Unidecode" version))
2134 (sha256
2135 (base32
2136 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2137 (build-system python-build-system)
2138 (home-page "https://pypi.python.org/pypi/Unidecode")
2139 (synopsis "ASCII transliterations of Unicode text")
2140 (description
2141 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2142 useful when integrating with legacy code that doesn't support Unicode, or for
2143 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2144 machine identifiers from human-readable Unicode strings that should still be
2145 somewhat intelligible.")
2146 (license license:gpl2+)))
2147
2148 (define-public python2-unidecode
2149 (package-with-python2 python-unidecode))
2150
2151 (define-public python-pyjwt
2152 (package
2153 (name "python-pyjwt")
2154 (version "1.7.1")
2155 (source
2156 (origin
2157 (method url-fetch)
2158 (uri (pypi-uri "PyJWT" version))
2159 (sha256
2160 (base32
2161 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2162 (modules '((guix build utils)))
2163 (snippet
2164 '(begin
2165 (for-each delete-file-recursively
2166 (find-files "." "\\.pyc$"))
2167 #t))))
2168 (build-system python-build-system)
2169 (native-inputs
2170 `(("python-pytest" ,python-pytest)
2171 ("python-pytest-cov" ,python-pytest-cov)
2172 ("python-pytest-runner" ,python-pytest-runner)))
2173 (home-page "https://github.com/progrium/pyjwt")
2174 (synopsis "JSON Web Token implementation in Python")
2175 (description
2176 "PyJWT is a JSON Web Token implementation written in Python.")
2177 (license license:expat)))
2178
2179 (define-public python2-pyjwt
2180 (package-with-python2 python-pyjwt))
2181
2182 (define-public python-pykka
2183 (package
2184 (name "python-pykka")
2185 (version "1.2.1")
2186 (source
2187 (origin
2188 (method url-fetch)
2189 (uri (pypi-uri "Pykka" version))
2190 (sha256
2191 (base32
2192 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2193 (build-system python-build-system)
2194 (native-inputs
2195 `(("python-mock" ,python-mock)
2196 ("python-nose" ,python-nose)
2197 ("python-gevent" ,python-gevent)
2198 ("python-eventlet" ,python-eventlet)))
2199 (home-page "https://www.pykka.org/")
2200 (synopsis "Pykka is a Python implementation of the actor model")
2201 (description
2202 "Pykka is a Python implementation of the actor model.
2203 The actor model introduces some simple rules to control the sharing
2204 of state and cooperation between execution units, which makes it
2205 easier to build concurrent applications.")
2206 (license license:asl2.0)))
2207
2208 (define-public python2-pykka
2209 (package-with-python2 python-pykka))
2210
2211 (define-public python-pymsgbox
2212 (package
2213 (name "python-pymsgbox")
2214 (version "1.0.6")
2215 (source
2216 (origin
2217 (method git-fetch)
2218 (uri (git-reference
2219 ;; LICENSE.txt is not present on pypi
2220 (url "https://github.com/asweigart/PyMsgBox")
2221 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2222 (file-name (git-file-name name version))
2223 (sha256
2224 (base32
2225 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2226 (arguments
2227 ;; Circular dependency to run tests:
2228 ;; Tests need pyautogui, which depends on pymsgbox.
2229 '(#:tests? #f))
2230 (build-system python-build-system)
2231 (home-page "https://github.com/asweigart/PyMsgBox")
2232 (synopsis "Python module for JavaScript-like message boxes")
2233 (description
2234 "PyMsgBox is a simple, cross-platform, pure Python module for
2235 JavaScript-like message boxes. Types of dialog boxes include:
2236 @enumerate
2237 @item alert
2238 @item confirm
2239 @item prompt
2240 @item password
2241 @end enumerate
2242 ")
2243 (license license:bsd-3)))
2244
2245 (define-public python-pympler
2246 (package
2247 (name "python-pympler")
2248 (home-page "https://pythonhosted.org/Pympler/")
2249 (version "0.8")
2250 (source (origin
2251 (method url-fetch)
2252 (uri (pypi-uri "Pympler" version))
2253 (sha256
2254 (base32
2255 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
2256 (build-system python-build-system)
2257 (arguments
2258 `(#:phases (modify-phases %standard-phases
2259 (delete 'check)
2260 (add-after 'install 'check
2261 (lambda* (#:key inputs outputs #:allow-other-keys)
2262 (add-installed-pythonpath inputs outputs)
2263 (invoke "python" "setup.py" "test"))))))
2264 (synopsis "Measure, monitor and analyze memory behavior")
2265 (description
2266 "Pympler is a development tool to measure, monitor and analyze
2267 the memory behavior of Python objects in a running Python application.
2268
2269 By pympling a Python application, detailed insight in the size and the
2270 lifetime of Python objects can be obtained. Undesirable or unexpected
2271 runtime behavior like memory bloat and other @samp{pymples} can easily
2272 be identified.
2273
2274 A web profiling frontend exposes process statistics, garbage
2275 visualisation and class tracker statistics.")
2276 (license license:asl2.0)))
2277
2278 (define-public python2-pympler
2279 (package-with-python2 python-pympler))
2280
2281 (define-public python-itsdangerous
2282 (package
2283 (name "python-itsdangerous")
2284 (version "1.1.0")
2285 (source
2286 (origin
2287 (method url-fetch)
2288 (uri (pypi-uri "itsdangerous" version))
2289 (sha256
2290 (base32
2291 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2292 (build-system python-build-system)
2293 (home-page "https://palletsprojects.com/p/itsdangerous/")
2294 (synopsis "Python library for passing data to/from untrusted environments")
2295 (description
2296 "Itsdangerous provides various helpers to pass trusted data to untrusted
2297 environments and back.")
2298 (license license:bsd-3)))
2299
2300 (define-public python2-itsdangerous
2301 (package-with-python2 python-itsdangerous))
2302
2303 (define-public python-pyyaml
2304 (package
2305 (name "python-pyyaml")
2306 (version "3.13")
2307 (source
2308 (origin
2309 (method url-fetch)
2310 (uri (pypi-uri "PyYAML" version))
2311 (sha256
2312 (base32
2313 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2314 (build-system python-build-system)
2315 (inputs
2316 `(("libyaml" ,libyaml)))
2317 (home-page "http://pyyaml.org/wiki/PyYAML")
2318 (synopsis "YAML parser and emitter for Python")
2319 (description
2320 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2321 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2322 API, and sensible error messages. PyYAML supports standard YAML tags and
2323 provides Python-specific tags that allow to represent an arbitrary Python
2324 object.")
2325 (license license:expat)))
2326
2327 (define-public python2-pyyaml
2328 (package-with-python2 python-pyyaml))
2329
2330 (define-public python-vine
2331 (package
2332 (name "python-vine")
2333 (version "1.1.4")
2334 (source
2335 (origin
2336 (method url-fetch)
2337 (uri (pypi-uri "vine" version))
2338 (sha256
2339 (base32
2340 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2341 (build-system python-build-system)
2342 (native-inputs
2343 `(("python-pytest" ,python-pytest)
2344 ("python-case" ,python-case)))
2345 (home-page "https://github.com/celery/vine")
2346 (synopsis "Promises for Python")
2347 (description
2348 "@code{vine} provides a special implementation of promises in that it can
2349 be used both for \"promise of a value\" and lazy evaluation. The biggest
2350 upside for this is that everything in a promise can also be a promise,
2351 e.g. filters, callbacks and errbacks can all be promises.")
2352 (license license:bsd-3)))
2353
2354 (define-public python-virtualenv
2355 (package
2356 (name "python-virtualenv")
2357 (version "16.1.0")
2358 (source
2359 (origin
2360 (method url-fetch)
2361 (uri (pypi-uri "virtualenv" version))
2362 (sha256
2363 (base32
2364 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2365 (build-system python-build-system)
2366 (arguments
2367 `(#:phases
2368 (modify-phases %standard-phases
2369 (add-before 'check 'disable-failing-test
2370 (lambda _
2371 ;; Disable failing test. See upstream bug report
2372 ;; https://github.com/pypa/virtualenv/issues/957
2373 (substitute* "tests/test_virtualenv.py"
2374 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2375 #t)))))
2376 (native-inputs
2377 `(("python-mock" ,python-mock)
2378 ("python-pytest" ,python-pytest)))
2379 (home-page "https://virtualenv.pypa.io/")
2380 (synopsis "Virtual Python environment builder")
2381 (description
2382 "Virtualenv is a tool to create isolated Python environments.")
2383 (license license:expat)))
2384
2385 (define-public python2-virtualenv
2386 (package-with-python2 python-virtualenv))
2387
2388 (define-public python-markupsafe
2389 (package
2390 (name "python-markupsafe")
2391 (version "1.1.1")
2392 (source
2393 (origin
2394 (method url-fetch)
2395 (uri (pypi-uri "MarkupSafe" version))
2396 (sha256
2397 (base32
2398 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2399 (build-system python-build-system)
2400 (arguments
2401 `(#:modules ((ice-9 ftw)
2402 (srfi srfi-1)
2403 (srfi srfi-26)
2404 (guix build utils)
2405 (guix build python-build-system))
2406 #:phases (modify-phases %standard-phases
2407 (replace 'check
2408 (lambda _
2409 (let ((cwd (getcwd))
2410 (libdir (find (cut string-prefix? "lib." <>)
2411 (scandir "build"))))
2412 (setenv "PYTHONPATH"
2413 (string-append cwd "/build/" libdir ":"
2414 (getenv "PYTHONPATH")))
2415 (invoke "pytest" "-vv")))))))
2416 (native-inputs
2417 `(("python-pytest" ,python-pytest)))
2418 (home-page "https://github.com/mitsuhiko/markupsafe")
2419 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2420 (description
2421 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2422 for Python.")
2423 (license license:bsd-3)))
2424
2425 (define-public python2-markupsafe
2426 (package-with-python2 python-markupsafe))
2427
2428 (define-public python-jinja2
2429 (package
2430 (name "python-jinja2")
2431 (version "2.10.1")
2432 (source
2433 (origin
2434 (method url-fetch)
2435 (uri (pypi-uri "Jinja2" version))
2436 (sha256
2437 (base32
2438 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2439 (build-system python-build-system)
2440 (propagated-inputs
2441 `(("python-markupsafe" ,python-markupsafe)))
2442 (home-page "http://jinja.pocoo.org/")
2443 (synopsis "Python template engine")
2444 (description
2445 "Jinja2 is a small but fast and easy to use stand-alone template engine
2446 written in pure Python.")
2447 (license license:bsd-3)))
2448
2449 (define-public python2-jinja2
2450 (package-with-python2 python-jinja2))
2451
2452 (define-public python-jinja2-time
2453 (package
2454 (name "python-jinja2-time")
2455 (version "0.2.0")
2456 (source
2457 (origin
2458 (method url-fetch)
2459 (uri (pypi-uri "jinja2-time" version))
2460 (sha256
2461 (base32
2462 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2463 (build-system python-build-system)
2464 (propagated-inputs
2465 `(("python-arrow" ,python-arrow)
2466 ("python-jinja2" ,python-jinja2)))
2467 (home-page
2468 "https://github.com/hackebrot/jinja2-time")
2469 (synopsis "Jinja2 Extension for Dates and Times")
2470 (description
2471 "This package provides an extension for the template engine Jinja2. It
2472 adds a 'now' tag providing a convenient access to the arrow.now() API from
2473 templates. A format string can be provided to control the output.")
2474 (license license:expat)))
2475
2476 (define-public python-pystache
2477 (package
2478 (name "python-pystache")
2479 (version "0.5.4")
2480 (source (origin
2481 (method url-fetch)
2482 (uri (pypi-uri "pystache" version))
2483 (sha256
2484 (base32
2485 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2486 (build-system python-build-system)
2487 (arguments
2488 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2489 (home-page "http://defunkt.io/pystache/")
2490 (synopsis "Python logic-less template engine")
2491 (description
2492 "Pystache is a Python implementation of the framework agnostic,
2493 logic-free templating system Mustache.")
2494 (license license:expat)
2495 (properties `((python2-variant . ,(delay python2-pystache))))))
2496
2497 (define-public python2-pystache
2498 (package (inherit (package-with-python2
2499 (strip-python2-variant python-pystache)))
2500 (arguments
2501 `(#:python ,python-2
2502 #:phases
2503 (modify-phases %standard-phases
2504 (replace 'check
2505 (lambda _
2506 (invoke "python" "test_pystache.py"))))))))
2507
2508 (define-public python-joblib
2509 (package
2510 (name "python-joblib")
2511 (version "0.13.0")
2512 (source (origin
2513 (method url-fetch)
2514 (uri (pypi-uri "joblib" version))
2515 (sha256
2516 (base32
2517 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2518 (build-system python-build-system)
2519 (arguments
2520 `(#:phases
2521 (modify-phases %standard-phases
2522 (replace 'check
2523 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2524 (native-inputs
2525 `(("python-pytest" ,python-pytest)))
2526 (home-page "https://joblib.readthedocs.io/")
2527 (synopsis "Using Python functions as pipeline jobs")
2528 (description
2529 "Joblib is a set of tools to provide lightweight pipelining in Python.
2530 In particular, joblib offers: transparent disk-caching of the output values
2531 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2532 logging and tracing of the execution.")
2533 (license license:bsd-3)))
2534
2535 (define-public python2-joblib
2536 (package-with-python2 python-joblib))
2537
2538 (define-public python-daemon
2539 (package
2540 (name "python-daemon")
2541 (version "2.2.3")
2542 (source
2543 (origin
2544 (method url-fetch)
2545 (uri (pypi-uri "python-daemon" version))
2546 (sha256
2547 (base32
2548 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2549 (build-system python-build-system)
2550 (arguments
2551 `(#:phases
2552 (modify-phases %standard-phases
2553 (add-before 'check 'disable-tests
2554 (lambda _
2555 ;; FIXME: Determine why test fails
2556 (substitute* "test/test_daemon.py"
2557 (("test_detaches_process_context")
2558 "skip_test_detaches_process_context"))
2559 #t)))))
2560 (propagated-inputs
2561 `(("python-lockfile" ,python-lockfile)))
2562 (native-inputs
2563 `(("python-unittest2" ,python-unittest2)
2564 ("python-testtools" ,python-testtools)
2565 ("python-testscenarios" ,python-testscenarios)
2566 ("python-mock" ,python-mock)
2567 ("python-docutils" ,python-docutils)))
2568 (home-page "https://pagure.io/python-daemon/")
2569 (synopsis "Python library for making a Unix daemon process")
2570 (description "Python-daemon is a library that assists a Python program to
2571 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2572
2573 This library provides a @code{DaemonContext} class that manages the following
2574 important tasks for becoming a daemon process:
2575 @enumerate
2576 @item Detach the process into its own process group.
2577 @item Set process environment appropriate for running inside a chroot.
2578 @item Renounce suid and sgid privileges.
2579 @item Close all open file descriptors.
2580 @item Change the working directory, uid, gid, and umask.
2581 @item Set appropriate signal handlers.
2582 @item Open new file descriptors for stdin, stdout, and stderr.
2583 @item Manage a specified PID lock file.
2584 @item Register cleanup functions for at-exit processing.
2585 @end enumerate")
2586 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2587 (license (list license:asl2.0 license:gpl3+))))
2588
2589 (define-public python-anytree
2590 (package
2591 (name "python-anytree")
2592 (version "2.8.0")
2593 (source (origin
2594 (method url-fetch)
2595 (uri (pypi-uri "anytree" version))
2596 (sha256
2597 (base32
2598 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2599 (build-system python-build-system)
2600 (propagated-inputs
2601 `(("python-six" ,python-six)))
2602 (native-inputs
2603 `(;; For tests.
2604 ("graphviz" ,graphviz) ;for 'dot'
2605 ("python-nose" ,python-nose)))
2606 (home-page "https://github.com/c0fec0de/anytree")
2607 (synopsis "Lightweight tree data library")
2608 (description
2609 "@code{anytree} is a simple, lightweight, and extensible tree data
2610 structure for Python.")
2611 (license license:asl2.0)))
2612
2613 (define-public python-docutils
2614 (package
2615 (name "python-docutils")
2616 (version "0.14")
2617 (source
2618 (origin
2619 (method url-fetch)
2620 (uri (pypi-uri "docutils" version))
2621 (sha256
2622 (base32
2623 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2624 (build-system python-build-system)
2625 (arguments
2626 '(#:tests? #f)) ; no setup.py test command
2627 (home-page "http://docutils.sourceforge.net/")
2628 (synopsis "Python Documentation Utilities")
2629 (description
2630 "Docutils is a modular system for processing documentation into useful
2631 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2632 reStructuredText.")
2633 ;; Most of the source code is public domain, but some source files are
2634 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2635 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2636
2637 (define-public python2-docutils
2638 (package-with-python2 python-docutils))
2639
2640 (define-public python-pygments
2641 (package
2642 (name "python-pygments")
2643 (version "2.5.2")
2644 (source
2645 (origin
2646 (method url-fetch)
2647 (uri (pypi-uri "Pygments" version))
2648 (sha256
2649 (base32
2650 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
2651 (build-system python-build-system)
2652 (arguments
2653 ;; FIXME: Tests require sphinx, which depends on this.
2654 '(#:tests? #f))
2655 (home-page "https://pygments.org/")
2656 (synopsis "Syntax highlighting")
2657 (description
2658 "Pygments is a syntax highlighting package written in Python.")
2659 (license license:bsd-2)))
2660
2661 (define-public python2-pygments
2662 (package-with-python2 python-pygments))
2663
2664 (define-public python-bumpversion
2665 (package
2666 (name "python-bumpversion")
2667 (version "0.5.3")
2668 (source
2669 (origin
2670 (method url-fetch)
2671 (uri (pypi-uri "bumpversion" version))
2672 (sha256
2673 (base32
2674 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2675 (build-system python-build-system)
2676 (home-page "https://github.com/peritus/bumpversion")
2677 (synopsis "Tool to bump software version")
2678 (description "This tool provides a command-line interface (CLI) to bump a
2679 software version simply.")
2680 (license license:expat)))
2681
2682 (define-public python-deprecated
2683 (package
2684 (name "python-deprecated")
2685 (version "1.2.5")
2686 (source
2687 (origin
2688 (method git-fetch)
2689 (uri (git-reference
2690 (url "https://github.com/tantale/deprecated.git")
2691 (commit (string-append "v" version))))
2692 (file-name (git-file-name name version))
2693 (sha256
2694 (base32
2695 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2696 (build-system python-build-system)
2697 (arguments
2698 `(#:phases (modify-phases %standard-phases
2699 (replace 'check
2700 (lambda _
2701 (invoke "pytest"))))))
2702 (propagated-inputs
2703 `(("python-wrapt" ,python-wrapt)))
2704 (native-inputs
2705 `(("python-bumpversion" ,python-bumpversion)
2706 ("python-pytest" ,python-pytest)
2707 ("python-pytest-cov" ,python-pytest-cov)
2708 ("python-sphinx" ,python-sphinx)
2709 ("python-tox" ,python-tox)))
2710 (home-page "https://github.com/tantale/deprecated")
2711 (synopsis "Python decorator to deprecate classes, functions or methods")
2712 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2713 to deprecate classes, functions or methods.")
2714 (license license:expat)))
2715
2716 (define-public python-pygithub
2717 (package
2718 (name "python-pygithub")
2719 (version "1.43.8")
2720 (source
2721 ;; We fetch from the Git repo because there are no tests in the PyPI
2722 ;; archive.
2723 (origin
2724 (method git-fetch)
2725 (uri (git-reference
2726 (url "https://github.com/PyGithub/PyGithub.git")
2727 (commit (string-append "v" version))))
2728 (file-name (git-file-name name version))
2729 (sha256
2730 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2731 (build-system python-build-system)
2732 (arguments
2733 `(#:phases (modify-phases %standard-phases
2734 ;; Some tests rely on the network.
2735 (add-after 'unpack 'disable-failing-tests
2736 (lambda _
2737 (substitute* "tests/Issue142.py"
2738 (("testDecodeJson") "disabled_testDecodeJson"))
2739 #t))
2740 (add-before 'check 'prepare-for-tests
2741 (lambda _
2742 (for-each (lambda (f)
2743 (chmod f #o666))
2744 (find-files "./tests"))
2745 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2746 (setenv "PYTHONPATH"
2747 (string-append "./tests:" (getenv "PYTHONPATH")))
2748 #t)))))
2749 (propagated-inputs
2750 `(("python-deprecated" ,python-deprecated)
2751 ("python-pyjwt" ,python-pyjwt)
2752 ("python-requests" ,python-requests)))
2753 (native-inputs `(("python-httpretty" ,python-httpretty)))
2754 (home-page "https://pygithub.readthedocs.io/en/latest/")
2755 (synopsis "Python library for the GitHub API")
2756 (description "This library allows managing GitHub resources such as
2757 repositories, user profiles, and organizations in your Python applications,
2758 using version 3 of the GitHub application programming interface (API).")
2759 (license license:lgpl3+)))
2760
2761 (define-public python-rellu
2762 (package
2763 (name "python-rellu")
2764 (version "0.7")
2765 (source
2766 (origin
2767 (method url-fetch)
2768 (uri (pypi-uri "rellu" version))
2769 (sha256
2770 (base32
2771 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2772 (build-system python-build-system)
2773 (propagated-inputs
2774 `(("python-invoke" ,python-invoke)
2775 ("python-pygithub" ,python-pygithub)))
2776 (home-page "https://github.com/robotframework/rellu")
2777 (synopsis "Utilities to create PyPI releases")
2778 (description "This collection of utilities contains tooling and templates
2779 to assist in creating releases on GitHub and publishing them on PyPI. It is
2780 designed to be used by Robot Framework and tools and libraries in its
2781 ecosystem, but can naturally be used also by other projects.")
2782 (license license:asl2.0)))
2783
2784 (define-public python-robotframework
2785 (package
2786 (name "python-robotframework")
2787 (version "3.1.2")
2788 ;; There are no tests in the PyPI archive.
2789 (source
2790 (origin
2791 (method git-fetch)
2792 (uri (git-reference
2793 (url "https://github.com/robotframework/robotframework.git")
2794 (commit (string-append "v" version))))
2795 (file-name (git-file-name name version))
2796 (sha256
2797 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2798 (patches (search-patches
2799 "python-robotframework-honor-source-date-epoch.patch"))))
2800 (build-system python-build-system)
2801 (arguments
2802 `(#:phases (modify-phases %standard-phases
2803 (add-before 'build 'build-and-install-doc
2804 (lambda* (#:key outputs #:allow-other-keys)
2805 (let* ((doc-output (assoc-ref outputs "doc"))
2806 (doc (string-append doc-output "/share/"
2807 ,name "-" ,version "/")))
2808 (invoke "invoke" "library-docs" "all")
2809 (mkdir-p doc)
2810 (copy-recursively "doc/libraries"
2811 (string-append doc "/libraries"))
2812 #t)))
2813 (replace 'check
2814 (lambda _
2815 (invoke "python" "utest/run.py"))))))
2816 (native-inputs
2817 `(("python-invoke" ,python-invoke)
2818 ("python-rellu" ,python-rellu)
2819 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2820 (outputs '("out" "doc"))
2821 (home-page "https://robotframework.org")
2822 (synopsis "Generic automation framework")
2823 (description "Robot Framework is a generic automation framework for
2824 acceptance testing, acceptance test driven development (ATDD), and robotic
2825 process automation (RPA).")
2826 (license license:asl2.0)))
2827
2828 (define-public python-robotframework-lint
2829 ;; There is no properly tagged release; the commit below seems to correspond
2830 ;; to the 0.9 stable release available from PyPI. The tests are not
2831 ;; included in the PyPI archive, so we fetch the sources from the upstream
2832 ;; Git repo.
2833 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2834 (revision "1"))
2835 (package
2836 (name "python-robotframework-lint")
2837 (version (git-version "0.9.0" revision commit))
2838 (source
2839 (origin
2840 (method git-fetch)
2841 (uri (git-reference
2842 (url "https://github.com/boakley/robotframework-lint.git")
2843 (commit commit)))
2844 (file-name (git-file-name name version))
2845 (sha256
2846 (base32
2847 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2848 (build-system python-build-system)
2849 (arguments
2850 `(#:phases
2851 (modify-phases %standard-phases
2852 (replace 'check
2853 (lambda _
2854 (invoke "python" "-m" "robot" "-A"
2855 "tests/conf/default.args" "tests"))))))
2856 (propagated-inputs
2857 `(("python-robotframework" ,python-robotframework)))
2858 (home-page "https://github.com/boakley/robotframework-lint/")
2859 (synopsis "Static analysis tool (linter) for Robot Framework")
2860 (description "This package provides the @code{rflint} command-line
2861 utility, a static analysis tool (linter) for Robot Framework source files.")
2862 (license license:asl2.0))))
2863
2864 (define-public python-robotframework-sshlibrary
2865 (package
2866 (name "python-robotframework-sshlibrary")
2867 (version "3.3.0")
2868 ;; There are no tests in the PyPI archive.
2869 (source
2870 (origin
2871 (method git-fetch)
2872 (uri (git-reference
2873 (url "https://github.com/robotframework/SSHLibrary.git")
2874 (commit (string-append "v" version))))
2875 (file-name (git-file-name name version))
2876 (sha256
2877 (base32
2878 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2879 (build-system python-build-system)
2880 (arguments
2881 `(#:phases
2882 (modify-phases %standard-phases
2883 (add-before 'build 'build-and-install-doc
2884 (lambda* (#:key outputs #:allow-other-keys)
2885 (let* ((doc-output (assoc-ref outputs "doc"))
2886 (doc (string-append doc-output "/share/"
2887 ,name "-" ,version "/")))
2888 (invoke "chmod" "-R" "+w" "docs")
2889 (invoke "invoke" "kw-docs" "project-docs")
2890 (mkdir-p doc)
2891 (for-each delete-file (find-files "docs" "\\.rst"))
2892 (copy-recursively "docs" doc)
2893 #t)))
2894 (replace 'check
2895 (lambda _
2896 ;; Some tests require an SSH server; we remove them.
2897 (delete-file "utest/test_client_api.py")
2898 (delete-file "utest/test_scp.py")
2899 (invoke "python" "utest/run.py"))))))
2900 (propagated-inputs
2901 `(("python-robotframework" ,python-robotframework)
2902 ("python-paramiko" ,python-paramiko)
2903 ("python-scp" ,python-scp)))
2904 (native-inputs
2905 `(("openssh" ,openssh)
2906 ("which" ,which)
2907 ;; To generate the documentation
2908 ("python-docutils" ,python-docutils)
2909 ("python-invoke" ,python-invoke)
2910 ("python-pygments" ,python-pygments)
2911 ("python-rellu" ,python-rellu)))
2912 (outputs '("out" "doc"))
2913 (home-page "https://github.com/robotframework/SSHLibrary")
2914 (synopsis "Robot Framework library for SSH and SFTP")
2915 (description "SSHLibrary is a Robot Framework library providing support
2916 for SSH and SFTP. It has the following main usages:
2917 @itemize @bullet
2918 @item Executing commands on the remote machine, either blocking or non-blocking.
2919 @item Writing and reading in an interactive shell.
2920 @item Transferring files and directories over SFTP.
2921 @item Ensuring that files and directories exist on the remote machine.
2922 @end itemize")
2923 (license license:asl2.0)))
2924
2925 (define-public python-scp
2926 (package
2927 (name "python-scp")
2928 (version "0.13.2")
2929 (source
2930 (origin
2931 (method url-fetch)
2932 (uri (pypi-uri "scp" version))
2933 (sha256
2934 (base32
2935 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2936 (build-system python-build-system)
2937 (arguments
2938 '(#:tests? #f)) ;tests require an SSH server
2939 (propagated-inputs
2940 `(("python-paramiko" ,python-paramiko)))
2941 (home-page "https://github.com/jbardin/scp.py")
2942 (synopsis "SCP protocol module for Python and Paramiko")
2943 (description "The scp module extends the Paramiko library to send and
2944 receive files via the SCP1 protocol, as implemented by the OpenSSH
2945 @command{scp} program.")
2946 (license license:gpl2+)))
2947
2948 (define-public python-rst.linker
2949 (package
2950 (name "python-rst.linker")
2951 (version "1.11")
2952 (source
2953 (origin
2954 (method url-fetch)
2955 (uri (pypi-uri "rst.linker" version))
2956 (sha256
2957 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
2958 (build-system python-build-system)
2959 (propagated-inputs
2960 `(("python-dateutil" ,python-dateutil)
2961 ("python-six" ,python-six)))
2962 (native-inputs
2963 `(("python-setuptools-scm" ,python-setuptools-scm)))
2964 ;; Test would require path.py, which would introduce a cyclic dependence.
2965 (arguments `(#:tests? #f))
2966 ;; Note: As of version 1.7 the documentation is not worth building.
2967 (home-page "https://github.com/jaraco/rst.linker")
2968 (synopsis "Sphinx plugin to add links and timestamps")
2969 (description "rst.linker allows to automatically replace text by a
2970 reStructuredText external reference or timestamps. It's primary purpose is to
2971 augment the changelog, but it can be used for other documents, too.")
2972 (license license:expat)))
2973
2974 (define-public python2-rst.linker
2975 (package-with-python2 python-rst.linker))
2976
2977 (define-public python-feedgenerator
2978 (package
2979 (name "python-feedgenerator")
2980 (version "1.9")
2981 (source
2982 (origin
2983 (method url-fetch)
2984 (uri (pypi-uri "feedgenerator" version))
2985 (sha256
2986 (base32
2987 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2988 (modules '((guix build utils)))
2989 (snippet
2990 '(begin
2991 ;; Remove pre-compiled .pyc files from source.
2992 (for-each delete-file-recursively
2993 (find-files "." "__pycache__" #:directories? #t))
2994 (for-each delete-file (find-files "." "\\.pyc$"))
2995 #t))))
2996 (build-system python-build-system)
2997 (propagated-inputs
2998 `(("python-pytz" ,python-pytz)
2999 ("python-six" ,python-six)))
3000 (home-page "https://github.com/getpelican/feedgenerator")
3001 (synopsis
3002 "Standalone version of Django's Atom/RSS feed generator")
3003 (description
3004 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3005 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3006 (license license:bsd-3)))
3007
3008 (define-public python2-feedgenerator
3009 (package-with-python2 python-feedgenerator))
3010
3011 (define-public python-toml
3012 (package
3013 (name "python-toml")
3014 (version "0.9.4")
3015 (source
3016 (origin
3017 (method url-fetch)
3018 (uri (pypi-uri "toml" version))
3019 (sha256
3020 (base32
3021 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3022 (build-system python-build-system)
3023 (arguments
3024 `(#:tests? #f)) ;no tests suite in release
3025 (home-page "https://github.com/uiri/toml")
3026 (synopsis "Library for TOML")
3027 (description
3028 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3029 Language (TOML) configuration files.")
3030 (license license:expat)))
3031
3032 (define-public python-jsonrpc-server
3033 (package
3034 (name "python-jsonrpc-server")
3035 (version "0.3.2")
3036 (source
3037 (origin
3038 (method url-fetch)
3039 (uri (pypi-uri "python-jsonrpc-server" version))
3040 (sha256
3041 (base32
3042 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3043 (build-system python-build-system)
3044 (propagated-inputs
3045 `(("python-future" ,python-future)
3046 ("python-mock" ,python-mock)
3047 ("python-pytest" ,python-pytest)
3048 ("python-ujson" ,python-ujson)))
3049 (home-page
3050 "https://github.com/palantir/python-jsonrpc-server")
3051 (synopsis "JSON RPC 2.0 server library")
3052 (description
3053 "This package provides a JSON RPC 2.0 server library for Python.")
3054 (license license:expat)))
3055
3056 (define-public python-pydocstyle
3057 (package
3058 (name "python-pydocstyle")
3059 (version "3.0.0")
3060 (source
3061 (origin
3062 (method url-fetch)
3063 (uri (pypi-uri "pydocstyle" version))
3064 (sha256
3065 (base32
3066 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3067 (build-system python-build-system)
3068 (propagated-inputs
3069 `(("python-six" ,python-six)
3070 ("python-snowballstemmer" ,python-snowballstemmer)))
3071 (home-page
3072 "https://github.com/PyCQA/pydocstyle/")
3073 (synopsis "Python docstring style checker")
3074 (description
3075 "This package provides a style checker for the Python Language
3076 Server (PLS).")
3077 (license license:expat)))
3078
3079 (define-public python-language-server
3080 (package
3081 (name "python-language-server")
3082 (version "0.31.6")
3083 (source
3084 (origin
3085 (method url-fetch)
3086 (uri (pypi-uri "python-language-server" version))
3087 (sha256
3088 (base32
3089 "0cqrffd5272p2hifa35rf1h1g6dss741jmjkwa43jninifmbz0df"))))
3090 (build-system python-build-system)
3091 (propagated-inputs
3092 `(("python-pluggy" ,python-pluggy)
3093 ("python-jsonrpc-server" ,python-jsonrpc-server)
3094 ("python-jedi" ,python-jedi)
3095 ("python-yapf" ,python-yapf)
3096 ("python-pyflakes" ,python-pyflakes)
3097 ("python-pydocstyle" ,python-pydocstyle)
3098 ("python-pycodestyle" ,python-pycodestyle)
3099 ("python-mccabe" ,python-mccabe)
3100 ("python-rope" ,python-rope)
3101 ("python-autopep8" ,python-autopep8)
3102 ("python-flake8" ,python-flake8)
3103 ("python-pylint" ,python-pylint)))
3104 (home-page "https://github.com/palantir/python-language-server")
3105 (synopsis "Python implementation of the Language Server Protocol")
3106 (description
3107 "The Python Language Server (pyls) is an implementation of the Python 3
3108 language specification for the Language Server Protocol (LSP). This tool is
3109 used in text editing environments to provide a complete and integrated
3110 feature-set for programming Python effectively.")
3111 (license license:expat)))
3112
3113 (define-public python-black
3114 (package
3115 (name "python-black")
3116 (version "18.6b4")
3117 (source
3118 (origin
3119 (method url-fetch)
3120 (uri (pypi-uri "black" version))
3121 (sha256
3122 (base32
3123 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3124 (build-system python-build-system)
3125 (arguments
3126 `(#:phases
3127 (modify-phases %standard-phases
3128 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3129 (lambda _
3130 (let ((python3 (which "python3")))
3131 (substitute* '("tests/data/fmtonoff.py"
3132 "tests/data/string_prefixes.py"
3133 "tests/data/function.py")
3134 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3135 (string-append "#!" python3 (if (string? minor-version)
3136 minor-version
3137 ""))))))))))
3138 (propagated-inputs
3139 `(("python-click" ,python-click)
3140 ("python-attrs" ,python-attrs)
3141 ("python-appdirs" ,python-appdirs)
3142 ("python-toml" ,python-toml)))
3143 (home-page "https://github.com/ambv/black")
3144 (synopsis "The uncompromising code formatter")
3145 (description "Black is the uncompromising Python code formatter.")
3146 (license license:expat)))
3147
3148 (define-public python-blinker
3149 (package
3150 (name "python-blinker")
3151 (version "1.4")
3152 (source
3153 (origin
3154 (method url-fetch)
3155 (uri (pypi-uri "blinker" version))
3156 (sha256
3157 (base32
3158 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3159 (build-system python-build-system)
3160 (home-page "http://pythonhosted.org/blinker/")
3161 (synopsis "Fast, simple object-to-object and broadcast signaling")
3162 (description
3163 "Blinker provides a fast dispatching system that allows any number of
3164 interested parties to subscribe to events, or \"signals\".")
3165 (license license:expat)))
3166
3167 (define-public python2-blinker
3168 (package-with-python2 python-blinker))
3169
3170 (define-public pelican
3171 (package
3172 (name "pelican")
3173 (version "4.2.0")
3174 (source
3175 (origin
3176 (method url-fetch)
3177 (uri (pypi-uri "pelican" version))
3178 (sha256
3179 (base32
3180 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3181 (build-system python-build-system)
3182 (propagated-inputs
3183 `(("python-blinker" ,python-blinker)
3184 ("python-dateutil" ,python-dateutil)
3185 ("python-docutils" ,python-docutils)
3186 ("python-feedgenerator" ,python-feedgenerator)
3187 ("python-jinja2" ,python-jinja2)
3188 ("python-markdown" ,python-markdown)
3189 ("python-pygments" ,python-pygments)
3190 ("python-pytz" ,python-pytz)
3191 ("python-six" ,python-six)
3192 ("python-unidecode" ,python-unidecode)))
3193 (home-page "https://getpelican.com/")
3194 (arguments
3195 `(;; XXX Requires a lot more packages to do unit tests :P
3196 #:tests? #f))
3197 (synopsis "Python-based static site publishing system")
3198 (description
3199 "Pelican is a tool to generate a static blog from reStructuredText,
3200 Markdown input files, and more. Pelican uses Jinja2 for templating
3201 and is very extensible.")
3202 (license license:agpl3+)))
3203
3204 (define-public mallard-ducktype
3205 (package
3206 (name "mallard-ducktype")
3207 (version "1.0.2")
3208 (source
3209 (origin
3210 (method git-fetch)
3211 ;; git-reference because tests are not included in pypi source tarball
3212 ;; https://issues.guix.gnu.org/issue/36755#2
3213 (uri (git-reference
3214 (url "https://github.com/projectmallard/mallard-ducktype.git")
3215 (commit version)))
3216 (file-name (git-file-name name version))
3217 (sha256
3218 (base32
3219 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3220 (build-system python-build-system)
3221 (arguments
3222 '(#:phases
3223 (modify-phases %standard-phases
3224 (replace 'check
3225 (lambda _
3226 (with-directory-excursion "tests"
3227 (invoke "sh" "runtests")))))))
3228 (home-page "http://projectmallard.org")
3229 (synopsis "Convert Ducktype to Mallard documentation markup")
3230 (description
3231 "Ducktype is a lightweight syntax that can represent all the semantics
3232 of the Mallard XML documentation system. Ducktype files can be converted to
3233 Mallard using the @command{ducktype} tool. The yelp-tools package
3234 provides additional functionality on the produced Mallard documents.")
3235 (license license:expat)))
3236
3237 (define-public python-cython
3238 (package
3239 (name "python-cython")
3240 (version "0.29.13")
3241 (source
3242 (origin
3243 (method url-fetch)
3244 (uri (pypi-uri "Cython" version))
3245 (sha256
3246 (base32
3247 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3248 (build-system python-build-system)
3249 ;; we need the full python package and not just the python-wrapper
3250 ;; because we need libpython3.3m.so
3251 (inputs
3252 `(("python" ,python)))
3253 (arguments
3254 `(#:phases
3255 (modify-phases %standard-phases
3256 (add-before 'check 'set-HOME
3257 ;; some tests require access to "$HOME/.cython"
3258 (lambda _ (setenv "HOME" "/tmp") #t))
3259
3260 ;; FIXME: These tests started failing on armhf after the 0.28 update
3261 ;; (commit c69d11c5930), both with an error such as this:
3262 ;; compiling (cpp) and running dictcomp ...
3263 ;; === C/C++ compiler error output: ===
3264 ;; ‘
3265 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3266 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3267 ,@(if (target-arm32?)
3268 `((add-before 'check 'disable-failing-tests
3269 (lambda _
3270 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3271 (for-each (lambda (test)
3272 (format disabled-tests "~a\n" test))
3273 '("memslice" "dictcomp"))
3274 (close-port disabled-tests)))))
3275 '())
3276
3277 (replace 'check
3278 (lambda _
3279 ;; Disable compiler optimizations to greatly reduce the running
3280 ;; time of the test suite.
3281 (setenv "CFLAGS" "-O0")
3282
3283 (invoke "python" "runtests.py" "-vv"
3284 "-j" (number->string (parallel-job-count))))))))
3285 (home-page "https://cython.org/")
3286 (synopsis "C extensions for Python")
3287 (description "Cython is an optimising static compiler for both the Python
3288 programming language and the extended Cython programming language. It makes
3289 writing C extensions for Python as easy as Python itself.")
3290 (license license:asl2.0)
3291 (properties `((python2-variant . ,(delay python2-cython))))))
3292
3293 (define-public python2-cython
3294 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3295 (package
3296 (inherit base)
3297 (name "python2-cython")
3298 (inputs
3299 `(("python-2" ,python-2))) ;this is not automatically changed
3300 (arguments
3301 (substitute-keyword-arguments (package-arguments base)
3302 ((#:phases phases)
3303 `(modify-phases ,phases
3304 (add-before 'check 'adjust-test_embed
3305 (lambda _
3306 (substitute* "runtests.py"
3307 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3308 ;; so it can give the right -L flag to GCC when embedding static
3309 ;; builds of Python. It is unaware that the Python "config"
3310 ;; directory (where the static library lives) was renamed in
3311 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3312 ;; which works fine, because that is where the shared library is.
3313 ;;
3314 ;; It also appears to be unaware that the Makefile in Demos/embed
3315 ;; already unconditionally pass the static library location to GCC,
3316 ;; after checking sysconfig.get_config_var('LIBPL).
3317 ;;
3318 ;; The effect is that the linker is unable to resolve libexpat
3319 ;; symbols when building for Python 2, because neither the Python 2
3320 ;; shared library nor Expat is available. To fix it, we can either
3321 ;; add Expat as an input and make it visible to the linker, or just
3322 ;; prevent it from overriding the Python shared library location.
3323 ;; The end result is identical, so we take the easy route.
3324 ((" or libname not in os\\.listdir\\(libdir\\)")
3325 ""))
3326 #t)))))))))
3327
3328 ;; The RPython toolchain currently does not support Python 3.
3329 (define-public python2-rpython
3330 (package
3331 (name "python2-rpython")
3332 (version "0.2.1")
3333 (source
3334 (origin
3335 (method url-fetch)
3336 (uri (pypi-uri "rpython" version))
3337 (sha256
3338 (base32
3339 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3340 (build-system python-build-system)
3341 (arguments `(#:python ,python-2))
3342 (native-inputs
3343 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3344 (home-page "https://rpython.readthedocs.org")
3345 (synopsis "Framework for implementing interpreters and virtual machines")
3346 (description "RPython is a translation and support framework for
3347 producing implementations of dynamic languages, emphasizing a clean separation
3348 between language specification and implementation aspects.")
3349 (license license:expat)))
3350
3351 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3352 ;; python-scipy still build, as these three packages are often used together.
3353 (define-public python-numpy
3354 (package
3355 (name "python-numpy")
3356 (version "1.17.3")
3357 (source
3358 (origin
3359 (method url-fetch)
3360 (uri (string-append
3361 "https://github.com/numpy/numpy/releases/download/v"
3362 version "/numpy-" version ".tar.gz"))
3363 (sha256
3364 (base32
3365 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3366 (build-system python-build-system)
3367 (inputs
3368 `(("openblas" ,openblas)
3369 ("lapack" ,lapack)))
3370 (native-inputs
3371 `(("python-cython" ,python-cython)
3372 ("python-pytest" ,python-pytest)
3373 ("gfortran" ,gfortran)))
3374 (arguments
3375 `(#:phases
3376 (modify-phases %standard-phases
3377 (add-before 'build 'configure-blas-lapack
3378 (lambda* (#:key inputs #:allow-other-keys)
3379 (call-with-output-file "site.cfg"
3380 (lambda (port)
3381 (format port
3382 "[openblas]
3383 libraries = openblas
3384 library_dirs = ~a/lib
3385 include_dirs = ~a/include
3386
3387 # backslash-n to make emacs happy
3388 \n[lapack]
3389 lapack_libs = lapack
3390 library_dirs = ~a/lib
3391 include_dirs = ~a/include
3392 "
3393 (assoc-ref inputs "openblas")
3394 (assoc-ref inputs "openblas")
3395 (assoc-ref inputs "lapack")
3396 (assoc-ref inputs "lapack"))))
3397 #t))
3398 (add-before 'build 'fix-executable-paths
3399 (lambda* (#:key inputs #:allow-other-keys)
3400 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3401 ;; instead of /bin/sh.
3402 (substitute* "numpy/distutils/exec_command.py"
3403 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3404 (string-append match-start (assoc-ref inputs "bash") match-end)))
3405 ;; Use "gcc" executable, not "cc".
3406 (substitute* "numpy/distutils/system_info.py"
3407 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3408 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3409 #t))
3410 ;; Tests can only be run after the library has been installed and not
3411 ;; within the source directory.
3412 (delete 'check)
3413 (add-after 'install 'check
3414 (lambda* (#:key outputs inputs #:allow-other-keys)
3415 ;; Make installed package available for running the tests
3416 (add-installed-pythonpath inputs outputs)
3417 ;; Make sure "f2py" etc is found.
3418 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3419 ":" (getenv "PATH")))
3420 (with-directory-excursion "/tmp"
3421 (invoke "python" "-c"
3422 "import numpy; numpy.test(verbose=2)")))))))
3423 (home-page "http://www.numpy.org/")
3424 (synopsis "Fundamental package for scientific computing with Python")
3425 (description "NumPy is the fundamental package for scientific computing
3426 with Python. It contains among other things: a powerful N-dimensional array
3427 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3428 and Fortran code, useful linear algebra, Fourier transform, and random number
3429 capabilities.")
3430 (properties `((python2-variant . ,(delay python2-numpy))))
3431 (license license:bsd-3)))
3432
3433 ;; Numpy 1.16.x are the last versions that support Python 2.
3434 (define-public python2-numpy
3435 (let ((numpy (package-with-python2
3436 (strip-python2-variant python-numpy))))
3437 (package/inherit
3438 numpy
3439 (version "1.16.5")
3440 (source (origin
3441 (method url-fetch)
3442 (uri (string-append
3443 "https://github.com/numpy/numpy/releases/download/v"
3444 version "/numpy-" version ".tar.gz"))
3445 (sha256
3446 (base32
3447 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3448
3449 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3450 ;; interest only for legacy code going back to NumPy's predecessor
3451 ;; Numeric.
3452 (define-public python2-numpy-1.8
3453 (package (inherit python2-numpy)
3454 (version "1.8.2")
3455 (source
3456 (origin
3457 (method git-fetch)
3458 (uri (git-reference
3459 (url "https://github.com/numpy/numpy")
3460 (commit (string-append "v" version))))
3461 (file-name (git-file-name "numpy" version))
3462 (sha256
3463 (base32
3464 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
3465 (arguments
3466 (substitute-keyword-arguments (package-arguments python2-numpy)
3467 ((#:phases phases)
3468 `(modify-phases ,phases
3469 (replace 'configure-blas-lapack
3470 (lambda* (#:key inputs #:allow-other-keys)
3471 (call-with-output-file "site.cfg"
3472 (lambda (port)
3473 (format port
3474 "[openblas]
3475 libraries = openblas,lapack
3476 library_dirs = ~a/lib:~a/lib
3477 include_dirs = ~a/include:~a/include
3478 "
3479 (assoc-ref inputs "openblas")
3480 (assoc-ref inputs "lapack")
3481 (assoc-ref inputs "openblas")
3482 (assoc-ref inputs "lapack"))))
3483 #t))))))
3484 (native-inputs
3485 `(("python2-nose" ,python2-nose)))
3486 (description "NumPy is the fundamental package for scientific computing
3487 with Python. It contains among other things: a powerful N-dimensional array
3488 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3489 and Fortran code, useful linear algebra, Fourier transform, and random number
3490 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3491 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3492 Numeric.")
3493 (license license:bsd-3)))
3494
3495 (define-public python-munch
3496 (package
3497 (name "python-munch")
3498 (version "2.0.4")
3499 (source
3500 (origin
3501 (method url-fetch)
3502 (uri (pypi-uri "munch" version))
3503 (sha256
3504 (base32
3505 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3506 (build-system python-build-system)
3507 (home-page "https://github.com/Infinidat/munch")
3508 (synopsis "Dot-accessible dictionary")
3509 (description "Munch is a dot-accessible dictionary similar to JavaScript
3510 objects.")
3511 (license license:expat)))
3512
3513 (define-public python2-munch
3514 (package-with-python2 python-munch))
3515
3516 (define-public python-colormath
3517 (package
3518 (name "python-colormath")
3519 (version "3.0.0")
3520 (source
3521 (origin
3522 (method url-fetch)
3523 (uri (pypi-uri "colormath" version))
3524 (sha256
3525 (base32
3526 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3527 (build-system python-build-system)
3528 (propagated-inputs
3529 `(("python-networkx" ,python-networkx)
3530 ("python-numpy" ,python-numpy)))
3531 (home-page "https://github.com/gtaylor/python-colormath")
3532 (synopsis "Color math and conversion library")
3533 (description
3534 "This is a Python library for color math and conversions.")
3535 (license license:bsd-3)))
3536
3537 (define-public python2-colormath
3538 (package-with-python2 python-colormath))
3539
3540 (define-public python-spectra
3541 (package
3542 (name "python-spectra")
3543 (version "0.0.11")
3544 (source
3545 (origin
3546 (method url-fetch)
3547 (uri (pypi-uri "spectra" version))
3548 (sha256
3549 (base32
3550 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3551 (build-system python-build-system)
3552 (arguments
3553 `(#:phases
3554 (modify-phases %standard-phases
3555 (replace 'check
3556 (lambda _ (invoke "nosetests" "-v"))))))
3557 (propagated-inputs
3558 `(("python-colormath" ,python-colormath)))
3559 (native-inputs
3560 `(("python-nose" ,python-nose)))
3561 (home-page "https://github.com/jsvine/spectra")
3562 (synopsis "Color scales and color conversion")
3563 (description
3564 "This package provides a Python library intended to make color math,
3565 color scales, and color space conversion easy. It has support for:
3566
3567 @enumerate
3568 @item Color scales
3569 @item Color ranges
3570 @item Color blending
3571 @item Brightening/darkening colors
3572 @item Saturating/desaturating colors
3573 @item Conversion to/from multiple color spaces.
3574 @end enumerate\n")
3575 (license license:expat)))
3576
3577 (define-public python2-spectra
3578 (package-with-python2 python-spectra))
3579
3580 (define-public python-numpy-documentation
3581 (package
3582 (name "python-numpy-documentation")
3583 (version (package-version python-numpy))
3584 (source (package-source python-numpy))
3585 (build-system python-build-system)
3586 (native-inputs
3587 `(("python-matplotlib" ,python-matplotlib)
3588 ("python-numpy" ,python-numpy)
3589 ("pkg-config" ,pkg-config)
3590 ("python-sphinx" ,python-sphinx)
3591 ("python-numpydoc" ,python-numpydoc)
3592 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3593 texlive-fonts-ec
3594 texlive-generic-ifxetex
3595 texlive-generic-pdftex
3596 texlive-amsfonts
3597 texlive-latex-capt-of
3598 texlive-latex-cmap
3599 texlive-latex-environ
3600 texlive-latex-eqparbox
3601 texlive-latex-etoolbox
3602 texlive-latex-expdlist
3603 texlive-latex-fancyhdr
3604 texlive-latex-fancyvrb
3605 texlive-latex-fncychap
3606 texlive-latex-float
3607 texlive-latex-framed
3608 texlive-latex-geometry
3609 texlive-latex-graphics
3610 texlive-latex-hyperref
3611 texlive-latex-mdwtools
3612 texlive-latex-multirow
3613 texlive-latex-needspace
3614 texlive-latex-oberdiek
3615 texlive-latex-parskip
3616 texlive-latex-preview
3617 texlive-latex-tabulary
3618 texlive-latex-threeparttable
3619 texlive-latex-titlesec
3620 texlive-latex-trimspaces
3621 texlive-latex-ucs
3622 texlive-latex-upquote
3623 texlive-latex-url
3624 texlive-latex-varwidth
3625 texlive-latex-wrapfig)))
3626 ("texinfo" ,texinfo)
3627 ("perl" ,perl)
3628 ("scipy-sphinx-theme"
3629 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3630 (method git-fetch)
3631 (uri (git-reference
3632 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3633 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3634 (sha256
3635 (base32
3636 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3637 ,@(package-native-inputs python-numpy)))
3638 (arguments
3639 `(#:tests? #f ; we're only generating the documentation
3640 #:phases
3641 (modify-phases %standard-phases
3642 (delete 'build)
3643 (replace 'install
3644 (lambda* (#:key inputs outputs #:allow-other-keys)
3645 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3646 (doc (string-append
3647 data "/doc/" ,name "-"
3648 ,(package-version python-numpy)))
3649 (info-reader (string-append data "/info"))
3650 (html (string-append doc "/html"))
3651 (scipy-sphinx-theme "scipy-sphinx-theme")
3652 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3653 (pyver ,(string-append "PYVER=")))
3654
3655 ;; FIXME: this is needed to for texlive-union to generate
3656 ;; fonts, which are not found.
3657 (setenv "HOME" "/tmp")
3658
3659 (with-directory-excursion "doc"
3660 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3661 (mkdir-p html)
3662 (invoke "make" "html" pyver)
3663 (invoke "make" "latex" "PAPER=a4" pyver)
3664 (invoke "make" "-C" "build/latex"
3665 "all-pdf" "PAPER=a4" pyver)
3666 ;; FIXME: Generation of the info file fails.
3667 ;; (invoke "make" "info" pyver)
3668 ;; (mkdir-p info)
3669 ;; (copy-file "build/texinfo/numpy.info"
3670 ;; (string-append info "/numpy.info"))
3671 (for-each (lambda (file)
3672 (copy-file (string-append "build/latex" file)
3673 (string-append doc file)))
3674 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3675 (with-directory-excursion "build/html"
3676 (for-each (lambda (file)
3677 (let* ((dir (dirname file))
3678 (tgt-dir (string-append html "/" dir)))
3679 (unless (equal? "." dir)
3680 (mkdir-p tgt-dir))
3681 (install-file file html)))
3682 (find-files "." ".*")))))
3683 #t)))))
3684 (home-page (package-home-page python-numpy))
3685 (synopsis "Documentation for the python-numpy package")
3686 (description (package-description python-numpy))
3687 (license (package-license python-numpy))))
3688
3689 (define-public python2-numpy-documentation
3690 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3691 (package
3692 (inherit numpy-documentation)
3693 (native-inputs `(("python2-functools32" ,python2-functools32)
3694 ,@(package-native-inputs numpy-documentation))))))
3695
3696 (define-public python-pygit2
3697 (package
3698 (name "python-pygit2")
3699 (version "0.28.2")
3700 (source
3701 (origin
3702 (method url-fetch)
3703 (uri (pypi-uri "pygit2" version))
3704 (sha256
3705 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3706 (build-system python-build-system)
3707 (arguments
3708 '(#:tests? #f)) ; tests don't run correctly in our environment
3709 (propagated-inputs
3710 `(("python-six" ,python-six)
3711 ("python-cffi" ,python-cffi)
3712 ("libgit2" ,libgit2)
3713 ("python-tox" ,python-tox)))
3714 (native-inputs
3715 `(("python-pytest" ,python-pytest)))
3716 (home-page "https://github.com/libgit2/pygit2")
3717 (synopsis "Python bindings for libgit2")
3718 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3719 library, libgit2 implements Git plumbing.")
3720 ;; GPL2.0 only, with linking exception.
3721 (license license:gpl2)))
3722
3723 (define-public python2-pygit2
3724 (package-with-python2 python-pygit2))
3725
3726 (define-public python-pyparsing
3727 (package
3728 (name "python-pyparsing")
3729 (version "2.4.6")
3730 (source
3731 (origin
3732 (method url-fetch)
3733 (uri (pypi-uri "pyparsing" version))
3734 (sha256
3735 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
3736 (build-system python-build-system)
3737 (outputs '("out" "doc"))
3738 (arguments
3739 `(#:tests? #f ; no test target
3740 #:phases
3741 (modify-phases %standard-phases
3742 (add-after 'install 'install-doc
3743 (lambda* (#:key outputs #:allow-other-keys)
3744 (let* ((doc (string-append (assoc-ref outputs "doc")
3745 "/share/doc/" ,name "-" ,version))
3746 (html-doc (string-append doc "/html"))
3747 (examples (string-append doc "/examples")))
3748 (mkdir-p html-doc)
3749 (mkdir-p examples)
3750 (for-each
3751 (lambda (dir tgt)
3752 (map (lambda (file)
3753 (install-file file tgt))
3754 (find-files dir ".*")))
3755 (list "docs" "htmldoc" "examples")
3756 (list doc html-doc examples))
3757 #t))))))
3758 (home-page "https://github.com/pyparsing/pyparsing")
3759 (synopsis "Python parsing class library")
3760 (description
3761 "The pyparsing module is an alternative approach to creating and
3762 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3763 of regular expressions. The pyparsing module provides a library of classes
3764 that client code uses to construct the grammar directly in Python code.")
3765 (license license:expat)))
3766
3767 (define-public python2-pyparsing
3768 (package-with-python2 python-pyparsing))
3769
3770 (define-public python-numpydoc
3771 (package
3772 (name "python-numpydoc")
3773 (version "0.8.0")
3774 (source
3775 (origin
3776 (method url-fetch)
3777 (uri (pypi-uri "numpydoc" version))
3778 (sha256
3779 (base32
3780 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3781 (build-system python-build-system)
3782 (propagated-inputs
3783 `(("python-sphinx" ,python-sphinx)))
3784 (native-inputs
3785 `(("python-nose" ,python-nose)))
3786 (home-page "https://pypi.python.org/pypi/numpydoc")
3787 (synopsis
3788 "Numpy's Sphinx extensions")
3789 (description
3790 "Sphinx extension to support docstrings in Numpy format.")
3791 (license license:bsd-2)))
3792
3793 (define-public python2-numpydoc
3794 (package-with-python2 python-numpydoc))
3795
3796 (define-public python-numexpr
3797 (package
3798 (name "python-numexpr")
3799 (version "2.6.5")
3800 (source
3801 (origin
3802 (method url-fetch)
3803 (uri (pypi-uri "numexpr" version))
3804 (sha256
3805 (base32
3806 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3807 (build-system python-build-system)
3808 (arguments `(#:tests? #f)) ; no tests included
3809 (propagated-inputs
3810 `(("python-numpy" ,python-numpy)))
3811 (home-page "https://github.com/pydata/numexpr")
3812 (synopsis "Fast numerical expression evaluator for NumPy")
3813 (description
3814 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3815 expressions that operate on arrays are accelerated and use less memory than
3816 doing the same calculation in Python. In addition, its multi-threaded
3817 capabilities can make use of all your cores, which may accelerate
3818 computations, most specially if they are not memory-bounded (e.g. those using
3819 transcendental functions).")
3820 (license license:expat)))
3821
3822 (define-public python2-numexpr
3823 (package-with-python2 python-numexpr))
3824
3825 (define-public python-cycler
3826 (package
3827 (name "python-cycler")
3828 (version "0.10.0")
3829 (source (origin
3830 (method url-fetch)
3831 (uri (pypi-uri "cycler" version))
3832 (sha256
3833 (base32
3834 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3835 (build-system python-build-system)
3836 (arguments
3837 ;; XXX: The current version requires 'coveralls' which we don't have.
3838 ;; Enable this for the next release which uses 'python-pytest'.
3839 '(#:tests? #f))
3840 (propagated-inputs
3841 `(("python-six" ,python-six)))
3842 (home-page "http://matplotlib.org/cycler/")
3843 (synopsis "Composable keyword argument iterator")
3844 (description
3845 "When using @code{matplotlib} and plotting more than one line, it is
3846 common to want to be able to want to be able to cycle over one or more artist
3847 styles; but the plotting logic can quickly become involved.
3848 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3849 @code{Cycler} class was developed.")
3850 (license license:bsd-3)))
3851
3852 (define-public python2-cycler
3853 (package-with-python2 python-cycler))
3854
3855 (define-public python-colorspacious
3856 (package
3857 (name "python-colorspacious")
3858 (version "1.1.2")
3859 (source
3860 (origin
3861 (method git-fetch)
3862 (uri (git-reference
3863 (url "https://github.com/njsmith/colorspacious.git")
3864 (commit (string-append "v" version))))
3865 (file-name (git-file-name name version))
3866 (sha256
3867 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3868 (build-system python-build-system)
3869 (propagated-inputs
3870 `(("python-numpy" ,python-numpy)))
3871 (native-inputs
3872 `(("python-nose" ,python-nose)))
3873 (arguments
3874 `(#:phases
3875 (modify-phases %standard-phases
3876 (replace 'check
3877 (lambda _
3878 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3879 (home-page "https://github.com/njsmith/colorspacious")
3880 (synopsis "Python library for colorspace conversions")
3881 (description "@code{colorspacious} is a Python library that lets you
3882 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3883 (license license:expat)))
3884
3885 (define-public python2-colorspacious
3886 (package-with-python2 python-colorspacious))
3887
3888 (define-public python-matplotlib
3889 (package
3890 (name "python-matplotlib")
3891 (version "3.1.2")
3892 (source
3893 (origin
3894 (method url-fetch)
3895 (uri (pypi-uri "matplotlib" version))
3896 (sha256
3897 (base32
3898 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
3899 (build-system python-build-system)
3900 (propagated-inputs ; the following packages are all needed at run time
3901 `(("python-cycler" ,python-cycler)
3902 ("python-kiwisolver" ,python-kiwisolver)
3903 ("python-pyparsing" ,python-pyparsing)
3904 ("python-pygobject" ,python-pygobject)
3905 ("gobject-introspection" ,gobject-introspection)
3906 ("python-tkinter" ,python "tk")
3907 ("python-dateutil" ,python-dateutil)
3908 ("python-numpy" ,python-numpy)
3909 ("python-pillow" ,python-pillow)
3910 ("python-pytz" ,python-pytz)
3911 ("python-six" ,python-six)
3912 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3913 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3914 ;; object. For this reason we need to import both libraries.
3915 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3916 ("python-pycairo" ,python-pycairo)
3917 ("python-cairocffi" ,python-cairocffi)))
3918 (inputs
3919 `(("libpng" ,libpng)
3920 ("imagemagick" ,imagemagick)
3921 ("freetype" ,freetype)
3922 ("cairo" ,cairo)
3923 ("glib" ,glib)
3924 ;; FIXME: Add backends when available.
3925 ;("python-wxpython" ,python-wxpython)
3926 ("tcl" ,tcl)
3927 ("tk" ,tk)))
3928 (native-inputs
3929 `(("pkg-config" ,pkg-config)
3930 ("python-pytest" ,python-pytest)
3931 ("python-mock" ,python-mock)
3932 ("unzip" ,unzip)
3933 ("jquery-ui"
3934 ,(origin
3935 (method url-fetch)
3936 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3937 (sha256
3938 (base32
3939 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3940 (arguments
3941 `(#:phases
3942 (modify-phases %standard-phases
3943 ;; XXX We disable all image comparison tests because we're using a
3944 ;; newer version of FreeType than matplotlib expects. This leads to
3945 ;; minor differences throughout the tests.
3946 (add-after 'unpack 'fix-and-disable-failing-tests
3947 (lambda _
3948 (substitute* (append (find-files "lib/matplotlib/tests/"
3949 "test_.*\\.py$")
3950 (find-files "lib/mpl_toolkits/tests"
3951 "test_.*\\.py$"))
3952 (("^from matplotlib" match)
3953 (string-append "import pytest\n" match))
3954 (("( *)@image_comparison" match indent)
3955 (string-append indent
3956 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3957 match)))
3958 (substitute* "lib/matplotlib/tests/test_animation.py"
3959 (("/bin/sh") (which "sh")))
3960 (for-each delete-file
3961 ;; test_normal_axes, test_get_tightbbox_polar
3962 '("lib/matplotlib/tests/test_axes.py"
3963 ;; We don't use the webagg backend and this test forces it.
3964 "lib/matplotlib/tests/test_backend_webagg.py"
3965 ;; test_outward_ticks
3966 "lib/matplotlib/tests/test_tightlayout.py"
3967 ;; test_hidden_axes fails with minor extent
3968 ;; differences, possibly due to the use of a
3969 ;; different version of FreeType.
3970 "lib/matplotlib/tests/test_constrainedlayout.py"
3971 ;; Fontconfig returns no fonts.
3972 "lib/matplotlib/tests/test_font_manager.py"))
3973 #t))
3974 (add-before 'install 'install-jquery-ui
3975 (lambda* (#:key outputs inputs #:allow-other-keys)
3976 (let ((dir (string-append (assoc-ref outputs "out")
3977 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3978 (mkdir-p dir)
3979 (invoke "unzip"
3980 (assoc-ref inputs "jquery-ui")
3981 "-d" dir))
3982 #t))
3983 (replace 'check
3984 (lambda* (#:key outputs inputs #:allow-other-keys)
3985 (add-installed-pythonpath inputs outputs)
3986 (invoke "python" "tests.py" "-v"
3987 "-m" "not network and not webagg")))
3988 (add-before 'build 'configure-environment
3989 (lambda* (#:key outputs inputs #:allow-other-keys)
3990 (let ((cairo (assoc-ref inputs "cairo")))
3991 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3992 ;; has not effect.
3993 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3994 (setenv "HOME" (getcwd))
3995 (call-with-output-file "setup.cfg"
3996 (lambda (port)
3997 (format port "[directories]~%
3998 basedirlist = ~a,~a~%
3999 [packages]~%
4000 tests = True~%"
4001 (assoc-ref inputs "tcl")
4002 (assoc-ref inputs "tk")))))
4003 #t)))))
4004 (home-page "https://matplotlib.org/")
4005 (synopsis "2D plotting library for Python")
4006 (description
4007 "Matplotlib is a Python 2D plotting library which produces publication
4008 quality figures in a variety of hardcopy formats and interactive environments
4009 across platforms. Matplotlib can be used in Python scripts, the python and
4010 ipython shell, web application servers, and six graphical user interface
4011 toolkits.")
4012 (license license:psfl)
4013 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4014
4015 (define-public python2-matplotlib
4016 (let ((matplotlib (package-with-python2
4017 (strip-python2-variant python-matplotlib))))
4018 (package (inherit matplotlib)
4019 (version "2.2.4")
4020 (source
4021 (origin
4022 (method url-fetch)
4023 (uri (pypi-uri "matplotlib" version))
4024 (sha256
4025 (base32
4026 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4027 (arguments
4028 (substitute-keyword-arguments (package-arguments matplotlib)
4029 ((#:phases phases)
4030 `(modify-phases ,phases
4031 (replace 'install-jquery-ui
4032 (lambda* (#:key outputs inputs #:allow-other-keys)
4033 (let ((dir (string-append (assoc-ref outputs "out")
4034 "/lib/python2.7/site-packages/"
4035 "matplotlib/backends/web_backend/")))
4036 (mkdir-p dir)
4037 (invoke "unzip"
4038 (assoc-ref inputs "jquery-ui")
4039 "-d" dir))
4040 #t))
4041 (delete 'fix-and-disable-failing-tests)
4042 (delete 'check))))) ; These tests weren't run the the past.
4043 ;; Make sure to use special packages for Python 2 instead
4044 ;; of those automatically rewritten by package-with-python2.
4045 (propagated-inputs
4046 `(("python2-pycairo" ,python2-pycairo)
4047 ("python2-backports-functools-lru-cache"
4048 ,python2-backports-functools-lru-cache)
4049 ("python2-functools32" ,python2-functools32)
4050 ("python2-pygobject-2" ,python2-pygobject-2)
4051 ("python2-subprocess32" ,python2-subprocess32)
4052 ("python2-tkinter" ,python-2 "tk")
4053 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4054 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4055
4056 (define-public python-matplotlib-documentation
4057 (package
4058 (name "python-matplotlib-documentation")
4059 (version (package-version python-matplotlib))
4060 (source (package-source python-matplotlib))
4061 (build-system python-build-system)
4062 (native-inputs
4063 `(("python-matplotlib" ,python-matplotlib)
4064 ("python-colorspacious" ,python-colorspacious)
4065 ("python-sphinx" ,python-sphinx)
4066 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4067 ("python-sphinx-gallery" ,python-sphinx-gallery)
4068 ("python-numpydoc" ,python-numpydoc)
4069 ("python-ipython" ,python-ipython)
4070 ("python-ipykernel" ,python-ipykernel)
4071 ("python-mock" ,python-mock)
4072 ("graphviz" ,graphviz)
4073 ("texlive" ,(texlive-union (list texlive-amsfonts
4074 texlive-latex-amsmath
4075 texlive-latex-enumitem
4076 texlive-latex-expdlist
4077 texlive-latex-geometry
4078 texlive-latex-preview
4079 texlive-latex-type1cm
4080 texlive-latex-ucs
4081
4082 texlive-generic-pdftex
4083
4084 texlive-fonts-ec
4085 texlive-fonts-adobe-times
4086 texlive-fonts-txfonts)))
4087 ("texinfo" ,texinfo)
4088 ,@(package-native-inputs python-matplotlib)))
4089 (arguments
4090 `(#:tests? #f ; we're only generating documentation
4091 #:phases
4092 (modify-phases %standard-phases
4093 ;; The tests in python-matplotlib are run after the install phase, so
4094 ;; we need to delete the extra phase here.
4095 (delete 'check)
4096 (replace 'build
4097 (lambda _
4098 (chdir "doc")
4099 (setenv "PYTHONPATH"
4100 (string-append (getenv "PYTHONPATH")
4101 ":" (getcwd) "/../examples/units"))
4102 (substitute* "conf.py"
4103 ;; Don't use git.
4104 (("^SHA = check_output.*")
4105 (string-append "SHA = \"" ,version "\"\n"))
4106 ;; Don't fetch intersphinx files from the Internet
4107 (("^explicit_order_folders" m)
4108 (string-append "intersphinx_mapping = {}\n" m))
4109 (("'sphinx.ext.intersphinx',") "")
4110 ;; Disable URL embedding which requires internet access.
4111 (("'https://docs.scipy.org/doc/numpy'") "None")
4112 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4113 (invoke "make"
4114 "SPHINXBUILD=sphinx-build"
4115 "SPHINXOPTS=" ; don't abort on warnings
4116 "html" "texinfo")))
4117 (replace 'install
4118 (lambda* (#:key inputs outputs #:allow-other-keys)
4119 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4120 (doc (string-append data "/doc/python-matplotlib-" ,version))
4121 (info (string-append data "/info"))
4122 (html (string-append doc "/html")))
4123 (mkdir-p html)
4124 (mkdir-p info)
4125 (copy-recursively "build/html" html)
4126 (symlink (string-append html "/_images")
4127 (string-append info "/matplotlib-figures"))
4128 (with-directory-excursion "build/texinfo"
4129 (substitute* "matplotlib.texi"
4130 (("@image\\{([^,]*)" all file)
4131 (string-append "@image{matplotlib-figures/" file)))
4132 (symlink (string-append html "/_images")
4133 "./matplotlib-figures")
4134 (invoke "makeinfo" "--no-split"
4135 "-o" "matplotlib.info" "matplotlib.texi"))
4136 (install-file "build/texinfo/matplotlib.info" info))
4137 #t)))))
4138 (home-page (package-home-page python-matplotlib))
4139 (synopsis "Documentation for the python-matplotlib package")
4140 (description (package-description python-matplotlib))
4141 (license (package-license python-matplotlib))))
4142
4143 (define-public python2-matplotlib-documentation
4144 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4145 (package
4146 (inherit parent)
4147 (native-inputs
4148 (alist-delete "python-sphinx-copybutton"
4149 (package-native-inputs parent))))))
4150
4151 (define-public python-matplotlib-venn
4152 (package
4153 (name "python-matplotlib-venn")
4154 (version "0.11.5")
4155 (source
4156 (origin
4157 (method url-fetch)
4158 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4159 (sha256
4160 (base32
4161 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4162 (build-system python-build-system)
4163 (arguments '(#:tests? #f)) ; tests are not included
4164 (propagated-inputs
4165 `(("python-matplotlib" ,python-matplotlib)
4166 ("python-numpy" ,python-numpy)
4167 ("python-scipy" ,python-scipy)))
4168 (native-inputs
4169 `(("unzip" ,unzip)))
4170 (home-page "https://github.com/konstantint/matplotlib-venn")
4171 (synopsis "Plot area-proportional Venn diagrams")
4172 (description
4173 "This package provides tools for plotting area-proportional two- and
4174 three-way Venn diagrams in @code{matplotlib}.")
4175 (license license:expat)))
4176
4177 (define-public python2-pysnptools
4178 (package
4179 (name "python2-pysnptools")
4180 (version "0.3.13")
4181 (source
4182 (origin
4183 (method url-fetch)
4184 (uri (pypi-uri "pysnptools" version))
4185 (sha256
4186 (base32
4187 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4188 (build-system python-build-system)
4189 (arguments
4190 `(#:python ,python-2 ; only Python 2.7 is supported
4191 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4192 (propagated-inputs
4193 `(("python2-numpy" ,python2-numpy)
4194 ("python2-scipy" ,python2-scipy)
4195 ("python2-pandas" ,python2-pandas)))
4196 (native-inputs
4197 `(("python2-cython" ,python2-cython)))
4198 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4199 (synopsis "Library for reading and manipulating genetic data")
4200 (description
4201 "PySnpTools is a library for reading and manipulating genetic data. It
4202 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4203 those files. It can also efficiently manipulate ranges of integers using set
4204 operators such as union, intersection, and difference.")
4205 (license license:asl2.0)))
4206
4207 (define-public python-socksipy-branch
4208 (package
4209 (name "python-socksipy-branch")
4210 (version "1.01")
4211 (source
4212 (origin
4213 (method url-fetch)
4214 (uri (pypi-uri "SocksiPy-branch" version))
4215 (sha256
4216 (base32
4217 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4218 (build-system python-build-system)
4219 (arguments
4220 `(#:tests? #f)) ; There are no tests
4221 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4222 (synopsis "Python SOCKS module")
4223 (description
4224 "SocksiPy - A Python SOCKS client module. It provides a
4225 socket-like interface that supports connections to any TCP
4226 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4227 The original version was developed by Dan Haim, this is a
4228 branch created by Mario Vilas to address some open issues,
4229 as the original project seems to have been abandoned circa 2007.")
4230 (license license:bsd-3)))
4231
4232 (define-public python2-socksipy-branch
4233 (package-with-python2 python-socksipy-branch))
4234
4235 (define-public python-socksipychain
4236 (package
4237 (name "python-socksipychain")
4238 (version "2.1.0")
4239 (source
4240 (origin
4241 (method git-fetch)
4242 (uri (git-reference
4243 (url "https://github.com/pagekite/PySocksipyChain.git")
4244 (commit (string-append "v" version))))
4245 (file-name (git-file-name name version))
4246 (sha256
4247 (base32
4248 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4249 (build-system python-build-system)
4250 (arguments
4251 `(#:tests? #f)) ; Tests try to access the network.
4252 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4253 (synopsis "Python SOCKS module with chained proxies support")
4254 (description
4255 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4256 adds support for arbitrary chaining of proxy servers and various modes of
4257 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4258 a simple netcat replacement with chaining support.")
4259 (license license:bsd-3)))
4260
4261 (define-public python-pycodestyle
4262 (package
4263 (name "python-pycodestyle")
4264 (version "2.5.0")
4265 (source
4266 (origin
4267 (method url-fetch)
4268 (uri (pypi-uri "pycodestyle" version))
4269 (sha256
4270 (base32
4271 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4272 (build-system python-build-system)
4273 (home-page "https://pycodestyle.readthedocs.io/")
4274 (synopsis "Python style guide checker")
4275 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4276 Python code against some of the style conventions in
4277 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4278 (license license:expat)))
4279
4280 (define-public python2-pycodestyle
4281 (package-with-python2 python-pycodestyle))
4282
4283 (define-public python-multidict
4284 (package
4285 (name "python-multidict")
4286 (version "4.2.0")
4287 (source
4288 (origin
4289 (method url-fetch)
4290 (uri (pypi-uri "multidict" version))
4291 (sha256
4292 (base32
4293 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4294 (build-system python-build-system)
4295 (native-inputs
4296 `(("python-pytest" ,python-pytest)
4297 ("python-pytest-runner" ,python-pytest-runner)))
4298 (home-page "https://github.com/aio-libs/multidict/")
4299 (synopsis "Multidict implementation")
4300 (description "Multidict is dict-like collection of key-value pairs
4301 where key might be occurred more than once in the container.")
4302 (license license:asl2.0)))
4303
4304 (define-public python-orderedmultidict
4305 (package
4306 (name "python-orderedmultidict")
4307 (version "0.7.11")
4308 (source
4309 (origin
4310 (method url-fetch)
4311 (uri (pypi-uri "orderedmultidict" version))
4312 (sha256
4313 (base32
4314 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4315 (build-system python-build-system)
4316 (arguments
4317 `(#:phases
4318 (modify-phases %standard-phases
4319 (add-after 'unpack 'fix-tests
4320 (lambda _
4321 ;; The package uses nosetest for running the tests.
4322 ;; Adding this initfile allows to run the test suite
4323 ;; without requiring nosetest.
4324 (with-output-to-file "tests/__init__.py" newline)
4325 #t)))))
4326 (propagated-inputs
4327 `(("python-six" ,python-six)))
4328 (native-inputs
4329 `(("python-pycodestyle" ,python-pycodestyle)))
4330 (home-page "https://github.com/gruns/orderedmultidict")
4331 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4332 (description "This package contains a library for ordered multivalue
4333 dictionaries. A multivalue dictionary is a dictionary that can store
4334 multiple values for the same key. An ordered multivalue dictionary is a
4335 multivalue dictionary that retains the order of insertions and deletions.")
4336 (license license:unlicense)))
4337
4338 (define-public python2-orderedmultidict
4339 (package-with-python2 python-orderedmultidict))
4340
4341 (define-public python-autopep8
4342 (package
4343 (name "python-autopep8")
4344 (version "1.3.5")
4345 (source
4346 (origin
4347 (method url-fetch)
4348 (uri (pypi-uri "autopep8" version))
4349 (sha256
4350 (base32
4351 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4352 (build-system python-build-system)
4353 (propagated-inputs
4354 `(("python-pycodestyle" ,python-pycodestyle)))
4355 (home-page "https://github.com/hhatto/autopep8")
4356 (synopsis "Format Python code according to the PEP 8 style guide")
4357 (description
4358 "@code{autopep8} automatically formats Python code to conform to
4359 the PEP 8 style guide. It uses the pycodestyle utility to determine
4360 what parts of the code needs to be formatted. @code{autopep8} is
4361 capable of fixing most of the formatting issues that can be reported
4362 by pycodestyle.")
4363 (license (license:non-copyleft
4364 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4365
4366 (define-public python2-autopep8
4367 (package-with-python2 python-autopep8))
4368
4369 (define-public python-distutils-extra
4370 (package
4371 (name "python-distutils-extra")
4372 (version "2.38")
4373 (source
4374 (origin
4375 (method url-fetch)
4376 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4377 version "/+download/python-distutils-extra-"
4378 version ".tar.gz"))
4379 (sha256
4380 (base32
4381 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4382 (build-system python-build-system)
4383 (home-page "https://launchpad.net/python-distutils-extra/")
4384 (synopsis "Enhancements to Python's distutils")
4385 (description
4386 "The python-distutils-extra module enables you to easily integrate
4387 gettext support, themed icons, and scrollkeeper-based documentation into
4388 Python's distutils.")
4389 (license license:gpl2)))
4390
4391 (define-public python2-distutils-extra
4392 (package-with-python2 python-distutils-extra))
4393
4394 (define-public python2-elib.intl
4395 (package
4396 (name "python2-elib.intl")
4397 (version "0.0.3")
4398 (source
4399 (origin
4400 ;; This project doesn't tag releases or publish tarballs, so we take
4401 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4402 (method git-fetch)
4403 (uri (git-reference
4404 (url "https://github.com/dieterv/elib.intl.git")
4405 (commit "d09997cfef")))
4406 (file-name (string-append name "-" version "-checkout"))
4407 (sha256
4408 (base32
4409 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4410 (build-system python-build-system)
4411 (arguments
4412 ;; incompatible with Python 3 (exception syntax)
4413 `(#:python ,python-2
4414 #:tests? #f))
4415 (home-page "https://github.com/dieterv/elib.intl")
4416 (synopsis "Enhanced internationalization for Python")
4417 (description
4418 "The elib.intl module provides enhanced internationalization (I18N)
4419 services for your Python modules and applications.")
4420 (license license:lgpl3+)))
4421
4422 (define-public python-olefile
4423 (package
4424 (name "python-olefile")
4425 (version "0.46")
4426 (source
4427 (origin
4428 (method url-fetch)
4429 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4430 "download/v" version "/olefile-" version ".tar.gz"))
4431 (file-name (string-append name "-" version ".tar.gz"))
4432 (sha256
4433 (base32
4434 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4435 (build-system python-build-system)
4436 (home-page "https://www.decalage.info/python/olefileio")
4437 (synopsis "Read and write Microsoft OLE2 files.")
4438 (description
4439 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4440 Storage or Compound Document, Microsoft Office). It is an improved version of
4441 the OleFileIO module from PIL, the Python Image Library.")
4442 (license license:bsd-3)))
4443
4444 (define-public python2-olefile
4445 (package-with-python2 python-olefile))
4446
4447 (define-public python-pillow
4448 (package
4449 (name "python-pillow")
4450 (version "6.2.1")
4451 (source
4452 (origin
4453 (method url-fetch)
4454 (uri (pypi-uri "Pillow" version))
4455 (sha256
4456 (base32
4457 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4458 (build-system python-build-system)
4459 (native-inputs
4460 `(("python-pytest" ,python-pytest)))
4461 (inputs
4462 `(("freetype" ,freetype)
4463 ("lcms" ,lcms)
4464 ("libjpeg" ,libjpeg-turbo)
4465 ("libtiff" ,libtiff)
4466 ("libwebp" ,libwebp)
4467 ("openjpeg" ,openjpeg)
4468 ("zlib" ,zlib)))
4469 (propagated-inputs
4470 `(("python-olefile" ,python-olefile)))
4471 (arguments
4472 `(#:phases
4473 (modify-phases %standard-phases
4474 (add-after 'unpack 'patch-ldconfig
4475 (lambda _
4476 (substitute* "setup.py"
4477 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4478 (replace 'check
4479 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4480 (if tests?
4481 (begin
4482 (setenv "HOME" (getcwd))
4483 ;; Make installed package available for running the tests.
4484 (add-installed-pythonpath inputs outputs)
4485 (invoke "python" "selftest.py" "--installed")
4486 (invoke "python" "-m" "pytest" "-vv"))
4487 #t))))))
4488 (home-page "https://python-pillow.org")
4489 (synopsis "Fork of the Python Imaging Library")
4490 (description
4491 "The Python Imaging Library adds image processing capabilities to your
4492 Python interpreter. This library provides extensive file format support, an
4493 efficient internal representation, and fairly powerful image processing
4494 capabilities. The core image library is designed for fast access to data
4495 stored in a few basic pixel formats. It should provide a solid foundation for
4496 a general image processing tool.")
4497 (license (license:x11-style
4498 "http://www.pythonware.com/products/pil/license.htm"
4499 "The PIL Software License"))))
4500
4501 (define-public python2-pillow
4502 (package-with-python2 python-pillow))
4503
4504 (define-public python-pycparser
4505 (package
4506 (name "python-pycparser")
4507 (version "2.19")
4508 (source
4509 (origin
4510 (method url-fetch)
4511 (uri (pypi-uri "pycparser" version))
4512 (sha256
4513 (base32
4514 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4515 (outputs '("out" "doc"))
4516 (build-system python-build-system)
4517 (native-inputs
4518 `(("pkg-config" ,pkg-config)))
4519 (arguments
4520 `(#:phases
4521 (modify-phases %standard-phases
4522 (replace 'check
4523 (lambda _
4524 (with-directory-excursion "tests"
4525 (invoke "python" "all_tests.py"))
4526 #t))
4527 (add-after 'install 'install-doc
4528 (lambda* (#:key outputs #:allow-other-keys)
4529 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4530 (doc (string-append data "/doc/" ,name "-" ,version))
4531 (examples (string-append doc "/examples")))
4532 (mkdir-p examples)
4533 (for-each (lambda (file)
4534 (copy-file (string-append "." file)
4535 (string-append doc file)))
4536 '("/README.rst" "/CHANGES" "/LICENSE"))
4537 (copy-recursively "examples" examples)
4538 #t))))))
4539 (home-page "https://github.com/eliben/pycparser")
4540 (synopsis "C parser in Python")
4541 (description
4542 "Pycparser is a complete parser of the C language, written in pure Python
4543 using the PLY parsing library. It parses C code into an AST and can serve as
4544 a front-end for C compilers or analysis tools.")
4545 (license license:bsd-3)))
4546
4547 (define-public python2-pycparser
4548 (package-with-python2 python-pycparser))
4549
4550 (define-public python-pywavelets
4551 (package
4552 (name "python-pywavelets")
4553 (version "1.0.1")
4554 (home-page "https://github.com/PyWavelets/pywt")
4555 (source (origin
4556 (method url-fetch)
4557 (uri (pypi-uri "PyWavelets" version))
4558 (sha256
4559 (base32
4560 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4561 (build-system python-build-system)
4562 (arguments
4563 '(#:modules ((ice-9 ftw)
4564 (srfi srfi-1)
4565 (srfi srfi-26)
4566 (guix build utils)
4567 (guix build python-build-system))
4568 #:phases (modify-phases %standard-phases
4569 (replace 'check
4570 (lambda _
4571 (let ((cwd (getcwd))
4572 (libdir (find (cut string-prefix? "lib." <>)
4573 (scandir "build"))))
4574 (with-directory-excursion (string-append cwd "/build/" libdir)
4575 (invoke "nosetests" "-v" "."))))))))
4576 (native-inputs
4577 `(("python-matplotlib" ,python-matplotlib) ;for tests
4578 ("python-nose" ,python-nose)))
4579 (propagated-inputs
4580 `(("python-numpy" ,python-numpy)))
4581 (synopsis "Wavelet transforms in Python")
4582 (description
4583 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4584 mathematical basis functions that are localized in both time and frequency.
4585 Wavelet transforms are time-frequency transforms employing wavelets. They are
4586 similar to Fourier transforms, the difference being that Fourier transforms are
4587 localized only in frequency instead of in time and frequency.")
4588 (license license:expat)))
4589
4590 (define-public python2-pywavelets
4591 (package-with-python2 python-pywavelets))
4592
4593 (define-public python-xcffib
4594 (package
4595 (name "python-xcffib")
4596 (version "0.6.0")
4597 (source
4598 (origin
4599 (method url-fetch)
4600 (uri (pypi-uri "xcffib" version))
4601 (sha256
4602 (base32
4603 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4604 (build-system python-build-system)
4605 (inputs
4606 `(("libxcb" ,libxcb)))
4607 (propagated-inputs
4608 `(("python-cffi" ,python-cffi) ; used at run time
4609 ("python-six" ,python-six)))
4610 (arguments
4611 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4612 #:tests? #f
4613 #:phases
4614 (modify-phases %standard-phases
4615 (add-after 'unpack 'fix-libxcb-path
4616 (lambda* (#:key inputs #:allow-other-keys)
4617 (let ((libxcb (assoc-ref inputs "libxcb")))
4618 (substitute* '("xcffib/__init__.py")
4619 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4620 #t)))
4621 (add-after 'install 'install-doc
4622 (lambda* (#:key outputs #:allow-other-keys)
4623 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4624 "/doc/" ,name "-" ,version)))
4625 (mkdir-p doc)
4626 (copy-file "README.md"
4627 (string-append doc "/README.md"))
4628 #t))))))
4629 (home-page "https://github.com/tych0/xcffib")
4630 (synopsis "XCB Python bindings")
4631 (description
4632 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4633 support for Python 3 and PyPy. It is based on cffi.")
4634 (license license:expat)))
4635
4636 (define-public python2-xcffib
4637 (package-with-python2 python-xcffib))
4638
4639 (define-public python-cairocffi
4640 (package
4641 (name "python-cairocffi")
4642 (version "0.9.0")
4643 (source
4644 (origin
4645 (method url-fetch)
4646 (uri (pypi-uri "cairocffi" version))
4647 (sha256
4648 (base32
4649 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4650 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4651 (build-system python-build-system)
4652 (outputs '("out" "doc"))
4653 (inputs
4654 `(("glib" ,glib)
4655 ("gtk+" ,gtk+)
4656 ("gdk-pixbuf" ,gdk-pixbuf)
4657 ("cairo" ,cairo)
4658 ("pango" ,pango)))
4659 (native-inputs
4660 `(("pkg-config" ,pkg-config)
4661 ("python-pytest" ,python-pytest)
4662 ("python-pytest-cov" ,python-pytest-cov)
4663 ("python-pytest-runner" ,python-pytest-runner)
4664 ("python-sphinx" ,python-sphinx)
4665 ("python-docutils" ,python-docutils)))
4666 (propagated-inputs
4667 `(("python-xcffib" ,python-xcffib))) ; used at run time
4668 (arguments
4669 `(#:phases
4670 (modify-phases %standard-phases
4671 (add-after 'unpack 'patch-paths
4672 (lambda* (#:key inputs outputs #:allow-other-keys)
4673 (substitute* (find-files "." "\\.py$")
4674 (("dlopen\\(ffi, 'cairo'")
4675 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4676 "/lib/libcairo.so.2'"))
4677 (("dlopen\\(ffi, 'gdk-3'")
4678 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4679 "/lib/libgtk-3.so.0'"))
4680 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4681 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4682 "/lib/libgdk_pixbuf-2.0.so.0'"))
4683 (("dlopen\\(ffi, 'glib-2.0'")
4684 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4685 "/lib/libglib-2.0.so.0'"))
4686 (("dlopen\\(ffi, 'gobject-2.0'")
4687 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4688 "/lib/libgobject-2.0.so.0'"))
4689 (("dlopen\\(ffi, 'pangocairo-1.0'")
4690 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4691 "/lib/libpangocairo-1.0.so.0'"))
4692 (("dlopen\\(ffi, 'pango-1.0'")
4693 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4694 "/lib/libpango-1.0.so.0'")))
4695 #t))
4696 (add-after 'install 'install-doc
4697 (lambda* (#:key inputs outputs #:allow-other-keys)
4698 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4699 (doc (string-append data "/doc/" ,name "-" ,version))
4700 (html (string-append doc "/html")))
4701 (setenv "LD_LIBRARY_PATH"
4702 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4703 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4704 (setenv "LANG" "en_US.UTF-8")
4705 (mkdir-p html)
4706 (for-each (lambda (file)
4707 (copy-file (string-append "." file)
4708 (string-append doc file)))
4709 '("/README.rst" "/CHANGES" "/LICENSE"))
4710 (system* "python" "setup.py" "build_sphinx")
4711 (copy-recursively "docs/_build/html" html)
4712 #t))))))
4713 (home-page "https://github.com/Kozea/cairocffi")
4714 (synopsis "Python bindings and object-oriented API for Cairo")
4715 (description
4716 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4717 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4718 graphics library with support for multiple backends including image buffers,
4719 PNG, PostScript, PDF, and SVG file output.")
4720 (license license:bsd-3)))
4721
4722 (define-public python2-cairocffi
4723 (package-with-python2 python-cairocffi))
4724
4725 (define-public python-decorator
4726 (package
4727 (name "python-decorator")
4728 (version "4.3.0")
4729 (source
4730 (origin
4731 (method url-fetch)
4732 (uri (pypi-uri "decorator" version))
4733 (sha256
4734 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4735 (build-system python-build-system)
4736 (home-page "https://pypi.python.org/pypi/decorator/")
4737 (synopsis "Python module to simplify usage of decorators")
4738 (description
4739 "The aim of the decorator module is to simplify the usage of decorators
4740 for the average programmer, and to popularize decorators usage giving examples
4741 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4742 etc. The core of this module is a decorator factory.")
4743 (license license:expat)))
4744
4745 (define-public python2-decorator
4746 (package-with-python2 python-decorator))
4747
4748 (define-public python-drmaa
4749 (package
4750 (name "python-drmaa")
4751 (version "0.7.7")
4752 (source
4753 (origin
4754 (method url-fetch)
4755 (uri (pypi-uri "drmaa" version))
4756 (sha256
4757 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4758 (build-system python-build-system)
4759 ;; The test suite requires libdrmaa which is provided by the cluster
4760 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4761 ;; should be set to the path of the libdrmaa library.
4762 (arguments '(#:tests? #f))
4763 (native-inputs
4764 `(("python-nose" ,python-nose)))
4765 (home-page "https://pypi.python.org/pypi/drmaa")
4766 (synopsis "Python bindings for the DRMAA library")
4767 (description
4768 "A Python package for Distributed Resource Management (DRM) job
4769 submission and control. This package is an implementation of the DRMAA 1.0
4770 Python language binding specification.")
4771 (license license:bsd-3)))
4772
4773 (define-public python2-drmaa
4774 (package-with-python2 python-drmaa))
4775
4776 (define-public python-grako
4777 (package
4778 (name "python-grako")
4779 (version "3.99.9")
4780 (source
4781 (origin
4782 (method url-fetch)
4783 (uri
4784 (pypi-uri "grako" version ".zip"))
4785 (sha256
4786 (base32
4787 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4788 (build-system python-build-system)
4789 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4790 (native-inputs
4791 `(("unzip" ,unzip)
4792 ("python-pytest" ,python-pytest)
4793 ("python-pytest-runner" ,python-pytest-runner)))
4794 (home-page "https://bitbucket.org/neogeny/grako")
4795 (synopsis "EBNF parser generator")
4796 (description
4797 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4798 memoizing PEG/Packrat parser in Python.")
4799 (license license:bsd-3)))
4800
4801 (define-public python2-grako
4802 (package-with-python2 python-grako))
4803
4804 (define-public python-gridmap
4805 (package
4806 (name "python-gridmap")
4807 (version "0.13.0")
4808 (source
4809 (origin
4810 (method git-fetch)
4811 (uri (git-reference
4812 (url "https://github.com/pygridtools/gridmap.git")
4813 (commit (string-append "v" version))))
4814 (file-name (git-file-name name version))
4815 (sha256
4816 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4817 (build-system python-build-system)
4818 (arguments
4819 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4820 (propagated-inputs
4821 `(("python-psutil" ,python-psutil)
4822 ("python-drmaa" ,python-drmaa)
4823 ("python-pyzmq" ,python-pyzmq)))
4824 (home-page "https://github.com/pygridtools/gridmap")
4825 (synopsis "Create jobs on a cluster directly from Python")
4826 (description
4827 "Gridmap is a Python package to allow you to easily create jobs on the
4828 cluster directly from Python. You can directly map Python functions onto the
4829 cluster without needing to write any wrapper code yourself.")
4830 (license license:gpl3+)))
4831
4832 (define-public python2-gridmap
4833 (package-with-python2 python-gridmap))
4834
4835 (define-public python-honcho
4836 (package
4837 (name "python-honcho")
4838 (version "1.0.1")
4839 (source
4840 (origin
4841 (method git-fetch)
4842 (uri (git-reference
4843 (url "https://github.com/nickstenning/honcho.git")
4844 (commit (string-append "v" version))))
4845 (file-name (git-file-name name version))
4846 (sha256
4847 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4848 (build-system python-build-system)
4849 (native-inputs
4850 `(("python-pytest" ,python-pytest)
4851 ("python-mock" ,python-mock)
4852 ("python-tox" ,python-tox)
4853 ("which" ,which))) ;for tests
4854 (propagated-inputs
4855 `(("python-jinja2" ,python-jinja2)))
4856 (arguments
4857 `(#:phases
4858 (modify-phases %standard-phases
4859 (delete 'check)
4860 (add-after 'install 'check
4861 (lambda* (#:key outputs inputs #:allow-other-keys)
4862 ;; fix honcho path in testsuite
4863 (substitute* "tests/conftest.py"
4864 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4865 "/bin/honcho" "'")))
4866 ;; It's easier to run tests after install.
4867 ;; Make installed package available for running the tests
4868 (add-installed-pythonpath inputs outputs)
4869 (invoke "py.test" "-v"))))))
4870 (home-page "https://github.com/nickstenning/honcho")
4871 (synopsis "Manage Procfile-based applications")
4872 (description
4873 "A Procfile is a file which describes how to run an application
4874 consisting of several processes. honcho starts all listed processes.
4875 The output of all running processes is collected by honcho and
4876 displayed.")
4877 (license license:expat)))
4878
4879 (define-public python2-honcho
4880 (package-with-python2 python-honcho))
4881
4882 (define-public python-pexpect
4883 (package
4884 (name "python-pexpect")
4885 (version "4.6.0")
4886 (source
4887 (origin
4888 (method url-fetch)
4889 (uri (pypi-uri "pexpect" version))
4890 (sha256
4891 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4892 (build-system python-build-system)
4893 (arguments
4894 `(#:phases
4895 (modify-phases %standard-phases
4896 (add-before 'check 'prepare-tests
4897 (lambda _
4898 (substitute* (find-files "tests")
4899 (("/bin/ls") (which "ls"))
4900 (("/bin/echo") (which "echo"))
4901 (("/bin/which") (which "which"))
4902 ;; Many tests try to use the /bin directory which
4903 ;; is not present in the build environment.
4904 ;; Use one that's non-empty and unlikely to change.
4905 (("/bin'") "/dev'"))
4906 ;; XXX: Socket connection test gets "Connection reset by peer".
4907 ;; Why does it not work? Delete for now.
4908 (delete-file "tests/test_socket.py")
4909 #t))
4910 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4911 (native-inputs
4912 `(("python-nose" ,python-nose)
4913 ("python-pytest" ,python-pytest)
4914 ("man-db" ,man-db)
4915 ("which" ,which)
4916 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4917 (propagated-inputs
4918 `(("python-ptyprocess" ,python-ptyprocess)))
4919 (home-page "http://pexpect.readthedocs.org/")
4920 (synopsis "Controlling interactive console applications")
4921 (description
4922 "Pexpect is a pure Python module for spawning child applications;
4923 controlling them; and responding to expected patterns in their output.
4924 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4925 child application and control it as if a human were typing commands.")
4926 (license license:isc)))
4927
4928 (define-public python2-pexpect
4929 (package-with-python2 python-pexpect))
4930
4931 (define-public python-setuptools-scm
4932 (package
4933 (name "python-setuptools-scm")
4934 (version "3.4.3")
4935 (source (origin
4936 (method url-fetch)
4937 (uri (pypi-uri "setuptools_scm" version))
4938 (sha256
4939 (base32
4940 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
4941 (build-system python-build-system)
4942 (home-page "https://github.com/pypa/setuptools_scm/")
4943 (synopsis "Manage Python package versions in SCM metadata")
4944 (description
4945 "Setuptools_scm handles managing your Python package versions in
4946 @dfn{software configuration management} (SCM) metadata instead of declaring
4947 them as the version argument or in a SCM managed file.")
4948 (license license:expat)))
4949
4950 (define-public python2-setuptools-scm
4951 (package-with-python2 python-setuptools-scm))
4952
4953 (define-public python-pathlib2
4954 (package
4955 (name "python-pathlib2")
4956 (version "2.3.3")
4957 (source
4958 (origin
4959 (method url-fetch)
4960 (uri (pypi-uri "pathlib2" version))
4961 (sha256
4962 (base32
4963 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4964 (build-system python-build-system)
4965 (propagated-inputs
4966 `(("python-scandir" ,python-scandir)
4967 ("python-six" ,python-six)))
4968 (home-page "https://pypi.python.org/pypi/pathlib2/")
4969 (synopsis "Object-oriented file system paths")
4970 (description "The goal of pathlib2 is to provide a backport of the
4971 standard @code{pathlib} module which tracks the standard library module, so
4972 all the newest features of the standard @code{pathlib} can be used also on
4973 older Python versions.")
4974 (license license:expat)))
4975
4976 (define-public python2-importlib-resources
4977 (package
4978 (name "python2-importlib-resources")
4979 (version "1.0.2")
4980 (source (origin
4981 (method url-fetch)
4982 (uri (pypi-uri "importlib_resources" version))
4983 (sha256
4984 (base32
4985 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
4986 (build-system python-build-system)
4987 (arguments
4988 `(#:python ,python-2
4989 #:phases (modify-phases %standard-phases
4990 ;; The build system tests for python-wheel, but it is
4991 ;; not required for Guix nor the test suite. Just drop
4992 ;; it to make bootstrapping pytest easier.
4993 (add-after 'unpack 'drop-wheel-dependency
4994 (lambda _
4995 (substitute* "setup.cfg"
4996 (("^[[:blank:]]+wheel")
4997 ""))
4998 #t)))))
4999 (propagated-inputs
5000 `(("python-pathlib2" ,python2-pathlib2)
5001 ("python-typing" ,python2-typing)))
5002 (home-page "https://gitlab.com/python-devs/importlib_resources")
5003 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5004 (description
5005 "This package provides an implementation of @code{importlib.resources}
5006 for older versions of Python.")
5007 (license license:asl2.0)))
5008
5009 ;; For importlib-metadata-bootstrap below.
5010 (define-public python2-importlib-resources-bootstrap
5011 (hidden-package
5012 (package/inherit
5013 python2-importlib-resources
5014 (name "python2-importlib-resources-bootstrap")
5015 (propagated-inputs
5016 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
5017 ("python-typing" ,python2-typing))))))
5018
5019 (define-public python-importlib-metadata
5020 (package
5021 (name "python-importlib-metadata")
5022 (version "1.4.0")
5023 (source
5024 (origin
5025 (method url-fetch)
5026 (uri (pypi-uri "importlib_metadata" version))
5027 (sha256
5028 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
5029 (build-system python-build-system)
5030 (propagated-inputs
5031 `(("python-zipp" ,python-zipp)))
5032 (native-inputs
5033 `(("python-setuptools-scm" ,python-setuptools-scm)
5034 ("python-packaging" ,python-packaging)))
5035 (home-page "https://importlib-metadata.readthedocs.io/")
5036 (synopsis "Read metadata from Python packages")
5037 (description
5038 "@code{importlib_metadata} is a library which provides an API for
5039 accessing an installed Python package's metadata, such as its entry points or
5040 its top-level name. This functionality intends to replace most uses of
5041 @code{pkg_resources} entry point API and metadata API. Along with
5042 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5043 need to use the older and less efficient @code{pkg_resources} package.")
5044 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
5045 (license license:asl2.0)))
5046
5047 (define-public python2-importlib-metadata
5048 (let ((base (package-with-python2 (strip-python2-variant
5049 python-importlib-metadata))))
5050 (package/inherit
5051 base
5052 (name "python2-importlib-metadata")
5053 (native-inputs
5054 `(("python-packaging" ,python2-packaging-bootstrap)
5055 ,@(alist-delete "python-packaging" (package-native-inputs base))))
5056 (propagated-inputs
5057 `(("python-configparser" ,python2-configparser)
5058 ("python-contextlib2" ,python2-contextlib2)
5059 ("python-importlib-resources" ,python2-importlib-resources)
5060 ("python-pathlib2" ,python2-pathlib2)
5061 ,@(package-propagated-inputs base))))))
5062
5063 ;; This package is used by python2-pytest, and thus must not depend on it.
5064 (define-public python2-importlib-metadata-bootstrap
5065 (hidden-package
5066 (package/inherit
5067 python2-importlib-metadata
5068 (name "python2-importlib-metadata-bootstrap")
5069 (arguments
5070 `(#:tests? #f
5071 ,@(package-arguments python2-importlib-metadata)))
5072 (propagated-inputs
5073 `(("python-zipp" ,python2-zipp-bootstrap)
5074 ("python-pathlib2" ,python2-pathlib2-bootstrap)
5075 ("python-configparser" ,python2-configparser)
5076 ("python-contextlib2" ,python2-contextlib2-bootstrap)
5077 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
5078
5079 (define-public python-jaraco-packaging
5080 (package
5081 (name "python-jaraco-packaging")
5082 (version "6.1")
5083 (source
5084 (origin
5085 (method url-fetch)
5086 (uri (pypi-uri "jaraco.packaging" version))
5087 (sha256
5088 (base32
5089 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5090 (build-system python-build-system)
5091 (propagated-inputs
5092 `(("python-pytest" ,python-pytest)
5093 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5094 ("python-pytest-flake8" ,python-pytest-flake8)
5095 ("python-rst.linker" ,python-rst.linker)
5096 ("python-setuptools" ,python-setuptools)
5097 ("python-setuptools-scm" ,python-setuptools-scm)
5098 ("python-six" ,python-six)
5099 ("python-sphinx" ,python-sphinx)))
5100 (home-page "https://github.com/jaraco/jaraco.packaging")
5101 (synopsis "Tools to supplement packaging Python releases")
5102 (description
5103 "This package provides various tools to supplement packaging Python
5104 releases.")
5105 (license license:expat)))
5106
5107 (define-public python-pathpy
5108 (package
5109 (name "python-pathpy")
5110 (version "11.5.1")
5111 (source
5112 (origin
5113 (method url-fetch)
5114 (uri (pypi-uri "path.py" version))
5115 (sha256
5116 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5117 (outputs '("out" "doc"))
5118 (build-system python-build-system)
5119 (propagated-inputs
5120 `(("python-appdirs" ,python-appdirs)
5121 ("python-importlib-metadata" ,python-importlib-metadata)))
5122 (native-inputs
5123 `(("python-setuptools-scm" ,python-setuptools-scm)
5124 ("python-sphinx" ,python-sphinx)
5125 ("python-rst.linker" ,python-rst.linker)
5126 ("python-pytest" ,python-pytest)
5127 ("python-pytest-runner" ,python-pytest-runner)
5128 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5129 (arguments
5130 `(#:phases
5131 (modify-phases %standard-phases
5132 (add-after 'build 'build-doc
5133 (lambda _
5134 (setenv "LANG" "en_US.UTF-8")
5135 (invoke "python" "setup.py" "build_sphinx")))
5136 (add-after 'install 'install-doc
5137 (lambda* (#:key outputs #:allow-other-keys)
5138 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5139 (doc (string-append data "/doc/" ,name "-" ,version))
5140 (html (string-append doc "/html")))
5141 (mkdir-p html)
5142 (for-each (lambda (file)
5143 (copy-file file (string-append doc "/" file)))
5144 '("README.rst" "CHANGES.rst"))
5145 (copy-recursively "build/sphinx/html" html)
5146 #t)))
5147 (replace 'check
5148 (lambda _
5149 ;; The import time test aborts if an import takes longer than
5150 ;; 100ms. It may very well take a little longer than that.
5151 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5152 (home-page "https://github.com/jaraco/path.py")
5153 (synopsis "Python module wrapper for built-in os.path")
5154 (description
5155 "@code{path.py} implements path objects as first-class entities, allowing
5156 common operations on files to be invoked on those path objects directly.")
5157 (license license:expat)))
5158
5159 (define-public python2-pathpy
5160 (package-with-python2 python-pathpy))
5161
5162 (define-public python-simplegeneric
5163 (package
5164 (name "python-simplegeneric")
5165 (version "0.8.1")
5166 (source
5167 (origin
5168 (method url-fetch)
5169 (uri (pypi-uri "simplegeneric" version ".zip"))
5170 (sha256
5171 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5172 (build-system python-build-system)
5173 (native-inputs
5174 `(("unzip" ,unzip)))
5175 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5176 (synopsis "Python module for simple generic functions")
5177 (description
5178 "The simplegeneric module lets you define simple single-dispatch generic
5179 functions, akin to Python’s built-in generic functions like @code{len()},
5180 @code{iter()} and so on. However, instead of using specially-named methods,
5181 these generic functions use simple lookup tables, akin to those used by
5182 e.g. @code{pickle.dump()} and other generic functions found in the Python
5183 standard library.")
5184 (license license:zpl2.1)))
5185
5186 (define-public python2-simplegeneric
5187 (package-with-python2 python-simplegeneric))
5188
5189 (define-public python-ipython-genutils
5190 ;; TODO: This package is retired, check if can be removed, see description.
5191 (package
5192 (name "python-ipython-genutils")
5193 (version "0.1.0")
5194 (source
5195 (origin
5196 (method url-fetch)
5197 (uri (pypi-uri "ipython_genutils" version))
5198 (sha256
5199 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5200 (build-system python-build-system)
5201 (arguments `(#:tests? #f)) ; no tests
5202 (home-page "https://ipython.org")
5203 (synopsis "Vestigial utilities from IPython")
5204 (description
5205 "This package provides retired utilities from IPython. No packages
5206 outside IPython/Jupyter should depend on it.
5207
5208 This package shouldn't exist. It contains some common utilities shared by
5209 Jupyter and IPython projects during The Big Split. As soon as possible, those
5210 packages will remove their dependency on this, and this package will go
5211 away.")
5212 (license license:bsd-3)))
5213
5214 (define-public python2-ipython-genutils
5215 (package-with-python2 python-ipython-genutils))
5216
5217 (define-public python-traitlets
5218 (package
5219 (name "python-traitlets")
5220 (version "4.3.3")
5221 (source
5222 (origin
5223 (method url-fetch)
5224 (uri (pypi-uri "traitlets" version))
5225 (sha256
5226 (base32
5227 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5228 (build-system python-build-system)
5229 (arguments
5230 `(#:phases
5231 (modify-phases %standard-phases
5232 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5233 (propagated-inputs
5234 `(("python-ipython-genutils" ,python-ipython-genutils)
5235 ("python-decorator" ,python-decorator)))
5236 (native-inputs
5237 `(("python-pytest" ,python-pytest)))
5238 (properties `((python2-variant . ,(delay python2-traitlets))))
5239 (home-page "https://ipython.org")
5240 (synopsis "Configuration system for Python applications")
5241 (description
5242 "Traitlets is a framework that lets Python classes have attributes with
5243 type checking, dynamically calculated default values, and ‘on change’
5244 callbacks. The package also includes a mechanism to use traitlets for
5245 configuration, loading values from files or from command line arguments. This
5246 is a distinct layer on top of traitlets, so you can use traitlets in your code
5247 without using the configuration machinery.")
5248 (license license:bsd-3)))
5249
5250 (define-public python2-traitlets
5251 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5252 (package
5253 (inherit traitlets)
5254 (propagated-inputs
5255 `(("python2-enum34" ,python2-enum34)
5256 ,@(package-propagated-inputs traitlets))))))
5257
5258 (define-public python-jupyter-core
5259 (package
5260 (name "python-jupyter-core")
5261 (version "4.4.0")
5262 (source
5263 (origin
5264 (method url-fetch)
5265 (uri (string-append (pypi-uri "jupyter_core" version)))
5266 (sha256
5267 (base32
5268 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5269 (build-system python-build-system)
5270 ;; FIXME: not sure how to run the tests
5271 (arguments `(#:tests? #f))
5272 (propagated-inputs
5273 `(("python-traitlets" ,python-traitlets)))
5274 (home-page "http://jupyter.org/")
5275 (synopsis "Jupyter base package")
5276 (description
5277 "Jupyter core is the base package on which Jupyter projects rely.")
5278 (license license:bsd-3)))
5279
5280 (define-public python2-jupyter-core
5281 (package-with-python2 python-jupyter-core))
5282
5283 (define-public python-jupyter-client
5284 (package
5285 (name "python-jupyter-client")
5286 (version "5.2.4")
5287 (source
5288 (origin
5289 (method url-fetch)
5290 (uri (pypi-uri "jupyter_client" version))
5291 (sha256
5292 (base32
5293 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5294 (build-system python-build-system)
5295 ;; Tests fail because of missing native python kernel which I assume is
5296 ;; provided by the ipython package, which we cannot use because it would
5297 ;; cause a dependency cycle.
5298 (arguments
5299 `(#:tests? #f
5300
5301 #:phases (modify-phases %standard-phases
5302 (add-after 'unpack 'set-tool-file-names
5303 (lambda* (#:key inputs #:allow-other-keys)
5304 (let ((iproute (assoc-ref inputs "iproute")))
5305 (substitute* "jupyter_client/localinterfaces.py"
5306 (("'ip'")
5307 (string-append "'" iproute "/sbin/ip'")))
5308 #t))))))
5309 (inputs
5310 `(("iproute" ,iproute)))
5311 (propagated-inputs
5312 `(("python-pyzmq" ,python-pyzmq)
5313 ("python-traitlets" ,python-traitlets)
5314 ("python-jupyter-core" ,python-jupyter-core)))
5315 (home-page "http://jupyter.org/")
5316 (synopsis "Jupyter protocol implementation and client libraries")
5317 (description
5318 "The @code{jupyter_client} package contains the reference implementation
5319 of the Jupyter protocol. It also provides client and kernel management APIs
5320 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5321 installing @code{kernelspec}s for use with Jupyter frontends.")
5322 (license license:bsd-3)))
5323
5324 (define-public python2-jupyter-client
5325 (package-with-python2 python-jupyter-client))
5326
5327 (define-public python-ipykernel
5328 (package
5329 (name "python-ipykernel")
5330 (version "5.1.3")
5331 (source
5332 (origin
5333 (method url-fetch)
5334 (uri (pypi-uri "ipykernel" version))
5335 (sha256
5336 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5337 (build-system python-build-system)
5338 (arguments
5339 `(#:phases
5340 (modify-phases %standard-phases
5341 (replace 'check
5342 (lambda _
5343 (setenv "HOME" "/tmp")
5344 (invoke "pytest" "-v")
5345 #t))
5346 (add-after 'install 'set-python-file-name
5347 (lambda* (#:key outputs #:allow-other-keys)
5348 ;; Record the absolute file name of the 'python' executable in
5349 ;; 'kernel.json'.
5350 (let ((out (assoc-ref outputs "out")))
5351 (substitute* (string-append out "/share/jupyter"
5352 "/kernels/python3/kernel.json")
5353 (("\"python\"")
5354 (string-append "\"" (which "python") "\"")))
5355 #t))))))
5356 (propagated-inputs
5357 `(("python-ipython" ,python-ipython)
5358 ;; imported at runtime during connect
5359 ("python-jupyter-client" ,python-jupyter-client)))
5360 (native-inputs
5361 `(("python-flaky" ,python-flaky)
5362 ("python-nose" ,python-nose)
5363 ("python-pytest" ,python-pytest)))
5364 (home-page "https://ipython.org")
5365 (synopsis "IPython Kernel for Jupyter")
5366 (description
5367 "This package provides the IPython kernel for Jupyter.")
5368 (license license:bsd-3)))
5369
5370 ;; Version 5.1.1 and above no longer support Python 2.
5371 (define-public python2-ipykernel
5372 (package
5373 (name "python2-ipykernel")
5374 (version "5.1.0")
5375 (source
5376 (origin
5377 (method url-fetch)
5378 (uri (pypi-uri "ipykernel" version))
5379 (sha256
5380 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5381 (build-system python-build-system)
5382 (arguments
5383 `(#:python ,python-2
5384 #:phases
5385 (modify-phases %standard-phases
5386 (replace 'check
5387 (lambda _
5388 (setenv "HOME" "/tmp")
5389 (invoke "pytest" "-v")
5390 #t)))))
5391 (propagated-inputs
5392 `(("python2-ipython" ,python2-ipython)
5393 ;; imported at runtime during connect
5394 ("python2-jupyter-client" ,python2-jupyter-client)))
5395 (native-inputs
5396 `(("python2-pytest" ,python2-pytest)
5397 ("python2-nose" ,python2-nose)))
5398 (home-page "https://ipython.org")
5399 (synopsis "IPython Kernel for Jupyter")
5400 (description
5401 "This package provides the IPython kernel for Jupyter.")
5402 (license license:bsd-3)))
5403
5404 (define-public python-pari-jupyter
5405 (package
5406 (name "python-pari-jupyter")
5407 (version "1.3.2")
5408 (source
5409 (origin
5410 (method url-fetch)
5411 (uri (pypi-uri "pari_jupyter" version))
5412 (sha256
5413 (base32
5414 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5415 (build-system python-build-system)
5416 (propagated-inputs
5417 `(("python-ipykernel" ,python-ipykernel)))
5418 (inputs
5419 `(("pari-gp" ,pari-gp)
5420 ("readline" ,readline)))
5421 (arguments
5422 `(#:tests? #f)) ; no test suite
5423 (home-page
5424 "https://github.com/jdemeyer/pari_jupyter")
5425 (synopsis "A Jupyter kernel for PARI/GP")
5426 (description "The package provides a PARI/GP kernel for Jupyter.")
5427 (license license:gpl3+)))
5428
5429 (define-public python-backcall
5430 (package
5431 (name "python-backcall")
5432 (version "0.1.0")
5433 (source
5434 (origin
5435 (method url-fetch)
5436 (uri (pypi-uri "backcall" version))
5437 (sha256
5438 (base32
5439 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5440 (build-system python-build-system)
5441 (home-page "https://github.com/takluyver/backcall/")
5442 (synopsis "Specifications for callback functions passed in to an API")
5443 (description
5444 "If your code lets other people supply callback functions, it's important
5445 to specify the function signature you expect, and check that functions support
5446 that. Adding extra parameters later would break other peoples code unless
5447 you're careful. The @code{backcall} package provides a way of specifying the
5448 callback signature using a prototype function.")
5449 (license license:bsd-3)))
5450
5451 ;; This is the latest release of the LTS version of ipython with support for
5452 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5453 ;; dropped support for Python 2.7.
5454 (define-public python2-ipython
5455 (package
5456 (name "python2-ipython")
5457 (version "5.8.0")
5458 (source
5459 (origin
5460 (method url-fetch)
5461 (uri (pypi-uri "ipython" version ".tar.gz"))
5462 (sha256
5463 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5464 (build-system python-build-system)
5465 (propagated-inputs
5466 `(("python2-backports-shutil-get-terminal-size"
5467 ,python2-backports-shutil-get-terminal-size)
5468 ("python2-pathlib2" ,python2-pathlib2)
5469 ("python2-pyzmq" ,python2-pyzmq)
5470 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5471 ("python2-terminado" ,python2-terminado)
5472 ("python2-matplotlib" ,python2-matplotlib)
5473 ("python2-numpy" ,python2-numpy)
5474 ("python2-numpydoc" ,python2-numpydoc)
5475 ("python2-jinja2" ,python2-jinja2)
5476 ("python2-mistune" ,python2-mistune)
5477 ("python2-pexpect" ,python2-pexpect)
5478 ("python2-pickleshare" ,python2-pickleshare)
5479 ("python2-simplegeneric" ,python2-simplegeneric)
5480 ("python2-jsonschema" ,python2-jsonschema)
5481 ("python2-traitlets" ,python2-traitlets)
5482 ("python2-nbformat" ,python2-nbformat)
5483 ("python2-pygments" ,python2-pygments)))
5484 (inputs
5485 `(("readline" ,readline)
5486 ("which" ,which)))
5487 (native-inputs
5488 `(("graphviz" ,graphviz)
5489 ("pkg-config" ,pkg-config)
5490 ("python2-requests" ,python2-requests) ;; for tests
5491 ("python2-testpath" ,python2-testpath)
5492 ("python2-mock" ,python2-mock)
5493 ("python2-nose" ,python2-nose)))
5494 (arguments
5495 `(#:python ,python-2
5496 #:phases
5497 (modify-phases %standard-phases
5498 (add-before 'check 'delete-broken-tests
5499 (lambda* (#:key inputs #:allow-other-keys)
5500 ;; These tests throw errors for unknown reasons.
5501 (delete-file "IPython/core/tests/test_profile.py")
5502 (delete-file "IPython/core/tests/test_interactiveshell.py")
5503 (delete-file "IPython/core/tests/test_magic.py")
5504 #t)))))
5505 (home-page "https://ipython.org")
5506 (synopsis "IPython is a tool for interactive computing in Python")
5507 (description
5508 "IPython provides a rich architecture for interactive computing with:
5509 Powerful interactive shells, a browser-based notebook, support for interactive
5510 data visualization, embeddable interpreters and tools for parallel
5511 computing.")
5512 (license license:bsd-3)))
5513
5514 (define-public python-ipython
5515 (package
5516 (name "python-ipython")
5517 (version "7.9.0")
5518 (source
5519 (origin
5520 (method url-fetch)
5521 (uri (pypi-uri "ipython" version ".tar.gz"))
5522 (sha256
5523 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5524 (build-system python-build-system)
5525 (propagated-inputs
5526 `(("python-backcall" ,python-backcall)
5527 ("python-pyzmq" ,python-pyzmq)
5528 ("python-prompt-toolkit" ,python-prompt-toolkit)
5529 ("python-terminado" ,python-terminado)
5530 ("python-matplotlib" ,python-matplotlib)
5531 ("python-numpy" ,python-numpy)
5532 ("python-numpydoc" ,python-numpydoc)
5533 ("python-jedi" ,python-jedi)
5534 ("python-jinja2" ,python-jinja2)
5535 ("python-mistune" ,python-mistune)
5536 ("python-pexpect" ,python-pexpect)
5537 ("python-pickleshare" ,python-pickleshare)
5538 ("python-simplegeneric" ,python-simplegeneric)
5539 ("python-jsonschema" ,python-jsonschema)
5540 ("python-traitlets" ,python-traitlets)
5541 ("python-nbformat" ,python-nbformat)
5542 ("python-pygments" ,python-pygments)))
5543 (inputs
5544 `(("readline" ,readline)
5545 ("which" ,which)))
5546 (native-inputs
5547 `(("graphviz" ,graphviz)
5548 ("pkg-config" ,pkg-config)
5549 ("python-requests" ,python-requests) ;; for tests
5550 ("python-testpath" ,python-testpath)
5551 ("python-nose" ,python-nose)))
5552 (arguments
5553 `(#:phases
5554 (modify-phases %standard-phases
5555 (add-after 'unpack 'make-docs-reproducible
5556 (lambda _
5557 (substitute* "IPython/sphinxext/ipython_directive.py"
5558 ((".*import datetime") "")
5559 ((".*datetime.datetime.now\\(\\)") "")
5560 (("%timeit") "# %timeit"))
5561 #t))
5562 ;; Tests can only be run after the library has been installed and not
5563 ;; within the source directory.
5564 (delete 'check)
5565 (add-after 'install 'check
5566 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5567 (if tests?
5568 (begin
5569 ;; Make installed package available for running the tests
5570 (add-installed-pythonpath inputs outputs)
5571 (setenv "HOME" "/tmp/") ;; required by a test
5572 ;; We only test the core because one of the other tests
5573 ;; tries to import ipykernel.
5574 (invoke "python" "IPython/testing/iptest.py"
5575 "-v" "IPython/core/tests"))
5576 #t)))
5577 (add-before 'check 'fix-tests
5578 (lambda* (#:key inputs #:allow-other-keys)
5579 (substitute* "./IPython/utils/_process_posix.py"
5580 (("/usr/bin/env', 'which") (which "which")))
5581 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5582 (("#!/usr/bin/env python")
5583 (string-append "#!" (which "python"))))
5584 ;; This test introduces a circular dependency on ipykernel
5585 ;; (which depends on ipython).
5586 (delete-file "IPython/core/tests/test_display.py")
5587 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5588 (delete-file "IPython/core/tests/test_interactiveshell.py")
5589 #t)))))
5590 (home-page "https://ipython.org")
5591 (synopsis "IPython is a tool for interactive computing in Python")
5592 (description
5593 "IPython provides a rich architecture for interactive computing with:
5594 Powerful interactive shells, a browser-based notebook, support for interactive
5595 data visualization, embeddable interpreters and tools for parallel
5596 computing.")
5597 (license license:bsd-3)))
5598
5599 (define-public python-ipython-documentation
5600 (package
5601 (inherit python-ipython)
5602 (name "python-ipython-documentation")
5603 (version (package-version python-ipython))
5604 (arguments
5605 `(#:phases
5606 (modify-phases %standard-phases
5607 (delete 'build)
5608 (delete 'check)
5609 (replace 'install
5610 (lambda* (#:key outputs #:allow-other-keys)
5611 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5612 (doc (string-append data "/doc/" ,name "-" ,version))
5613 (html (string-append doc "/html"))
5614 (man1 (string-append data "/man/man1"))
5615 (info (string-append data "/info"))
5616 (examples (string-append doc "/examples"))
5617 (python-arg (string-append "PYTHON=" (which "python"))))
5618 (setenv "LANG" "en_US.utf8")
5619 (with-directory-excursion "docs"
5620 ;; FIXME: pdf fails to build
5621 ;;(system* "make" "pdf" "PAPER=a4")
5622 (system* "make" python-arg "html")
5623 ;; FIXME: the generated texi file contains ^@^@, which trips
5624 ;; up the parser.
5625 ;; (system* "make" python-arg "info")
5626 )
5627 (copy-recursively "docs/man" man1)
5628 (copy-recursively "examples" examples)
5629 (copy-recursively "docs/build/html" html)
5630 ;; (copy-file "docs/build/latex/ipython.pdf"
5631 ;; (string-append doc "/ipython.pdf"))
5632 (mkdir-p info)
5633 ;; (copy-file "docs/build/texinfo/ipython.info"
5634 ;; (string-append info "/ipython.info"))
5635 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5636 #t)))))
5637 (inputs
5638 `(("python-ipython" ,python-ipython)
5639 ("python-ipykernel" ,python-ipykernel)))
5640 (native-inputs
5641 `(("python-sphinx" ,python-sphinx)
5642 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5643 ;; FIXME: It's possible that a smaller union would work just as well.
5644 ("texlive" ,(texlive-union (list texlive-amsfonts
5645 texlive-fonts-ec
5646 texlive-generic-ifxetex
5647 texlive-generic-pdftex
5648 texlive-latex-capt-of
5649 texlive-latex-cmap
5650 texlive-latex-environ
5651 texlive-latex-eqparbox
5652 texlive-latex-etoolbox
5653 texlive-latex-expdlist
5654 texlive-latex-fancyhdr
5655 texlive-latex-fancyvrb
5656 texlive-latex-fncychap
5657 texlive-latex-float
5658 texlive-latex-framed
5659 texlive-latex-geometry
5660 texlive-latex-graphics
5661 texlive-latex-hyperref
5662 texlive-latex-mdwtools
5663 texlive-latex-multirow
5664 texlive-latex-needspace
5665 texlive-latex-oberdiek
5666 texlive-latex-parskip
5667 texlive-latex-preview
5668 texlive-latex-tabulary
5669 texlive-latex-threeparttable
5670 texlive-latex-titlesec
5671 texlive-latex-trimspaces
5672 texlive-latex-ucs
5673 texlive-latex-upquote
5674 texlive-latex-url
5675 texlive-latex-varwidth
5676 texlive-latex-wrapfig)))
5677 ("texinfo" ,texinfo)))))
5678
5679 (define-public python-urwid
5680 (package
5681 (name "python-urwid")
5682 (version "2.0.1")
5683 (source
5684 (origin
5685 (method url-fetch)
5686 (uri (pypi-uri "urwid" version))
5687 (sha256
5688 (base32
5689 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5690 (build-system python-build-system)
5691 (home-page "http://urwid.org")
5692 (synopsis "Console user interface library for Python")
5693 (description
5694 "Urwid is a curses-based UI/widget library for Python. It includes many
5695 features useful for text console applications.")
5696 (license license:lgpl2.1+)))
5697
5698 (define-public python2-urwid
5699 (package-with-python2 python-urwid))
5700
5701 (define-public python-urwidtrees
5702 (package
5703 (name "python-urwidtrees")
5704 (version "1.0.2")
5705 (source
5706 (origin
5707 (method git-fetch)
5708 ;; package author intends on distributing via github rather than pypi:
5709 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5710 (uri (git-reference
5711 (url "https://github.com/pazz/urwidtrees")
5712 (commit version)))
5713 (file-name (git-file-name name version))
5714 (sha256
5715 (base32
5716 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
5717 (build-system python-build-system)
5718 (arguments
5719 '(#:use-setuptools? #f
5720 #:tests? #f)) ; no tests
5721 (propagated-inputs `(("python-urwid" ,python-urwid)))
5722 (home-page "https://github.com/pazz/urwidtrees")
5723 (synopsis "Tree widgets for urwid")
5724 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5725 toolkit. Use it to build trees of widgets.")
5726 (license license:gpl3+)))
5727
5728 (define-public python2-urwidtrees
5729 (package-with-python2 python-urwidtrees))
5730
5731 (define-public python-ua-parser
5732 (package
5733 (name "python-ua-parser")
5734 (version "0.8.0")
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (pypi-uri "ua-parser" version))
5739 (sha256
5740 (base32
5741 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5742 (build-system python-build-system)
5743 (arguments
5744 `(#:tests? #f)) ;no test suite in release
5745 (native-inputs
5746 `(("python-pyyaml" ,python-pyyaml)))
5747 (home-page "https://github.com/ua-parser/uap-python")
5748 (synopsis "User agent parser")
5749 (description
5750 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5751 (license license:asl2.0)))
5752
5753 (define-public python2-ua-parser
5754 (package-with-python2 python-ua-parser))
5755
5756 (define-public python-user-agents
5757 (package
5758 (name "python-user-agents")
5759 (version "1.1.0")
5760 (source
5761 (origin
5762 (method url-fetch)
5763 (uri (pypi-uri "user-agents" version))
5764 (sha256
5765 (base32
5766 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5767 (build-system python-build-system)
5768 (arguments
5769 `(#:tests? #f)) ;missing devices.json test file in release
5770 (propagated-inputs
5771 `(("python-ua-parser" ,python-ua-parser)))
5772 (home-page "https://github.com/selwin/python-user-agents")
5773 (synopsis "User Agent strings parsing library")
5774 (description
5775 "A library to identify devices (phones, tablets) and their capabilities by
5776 parsing (browser/HTTP) user agent strings.")
5777 (license license:expat)))
5778
5779 (define-public python2-user-agents
5780 (package-with-python2 python-user-agents))
5781
5782 (define-public python-dbus
5783 (package
5784 (name "python-dbus")
5785 (version "1.2.14")
5786 (source
5787 (origin
5788 (method url-fetch)
5789 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5790 "dbus-python-" version ".tar.gz"))
5791 (sha256
5792 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5793 (build-system gnu-build-system)
5794 (native-inputs
5795 `(("pkg-config" ,pkg-config)))
5796 (inputs
5797 `(("python" ,python-wrapper)
5798 ("dbus-glib" ,dbus-glib)))
5799 (synopsis "Python bindings for D-bus")
5800 (description "python-dbus provides bindings for libdbus, the reference
5801 implementation of D-Bus.")
5802 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5803 (license license:expat)))
5804
5805 (define-public python2-dbus
5806 (package (inherit python-dbus)
5807 (name "python2-dbus")
5808 (inputs `(("python" ,python-2)
5809 ,@(alist-delete "python"
5810 (package-inputs python-dbus)
5811 equal?)))))
5812
5813 (define-public python-notify2
5814 (package
5815 (name "python-notify2")
5816 (version "0.3.1")
5817 (source
5818 (origin
5819 (method url-fetch)
5820 (uri (pypi-uri "notify2" version))
5821 (sha256
5822 (base32
5823 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5824 (build-system python-build-system)
5825 (arguments `(#:tests? #f)) ; tests depend on system state
5826 (native-inputs
5827 `(("python-dbus" ,python-dbus)))
5828 (home-page "https://bitbucket.org/takluyver/pynotify2")
5829 (synopsis "Python interface to D-Bus notifications")
5830 (description
5831 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5832 It is a reimplementation of pynotify in pure Python, and an alternative to
5833 the GObject Introspection bindings to libnotify for non-GTK applications.")
5834 (license (list license:bsd-2
5835 license:lgpl2.1+))))
5836
5837 (define-public python2-notify2
5838 (package-with-python2 python-notify2))
5839
5840 ;; beautifulsoup4 has a totally different namespace than 3.x,
5841 ;; and pypi seems to put it under its own name, so I guess we should too
5842 (define-public python-beautifulsoup4
5843 (package
5844 (name "python-beautifulsoup4")
5845 (version "4.7.1")
5846 (source
5847 (origin
5848 (method url-fetch)
5849 (uri (pypi-uri "beautifulsoup4" version))
5850 (sha256
5851 (base32
5852 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5853 (build-system python-build-system)
5854 (arguments
5855 `(#:phases
5856 (modify-phases %standard-phases
5857 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5858 ;; must use this conversion script when building with Python 3. The
5859 ;; conversion script also runs the tests.
5860 ;; For more information, see the file 'convert-py3k' in the source
5861 ;; distribution.
5862 (replace 'check
5863 (lambda _ (invoke "./convert-py3k"))))))
5864 (propagated-inputs
5865 `(("python-soupsieve" ,python-soupsieve)))
5866 (home-page
5867 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5868 (synopsis
5869 "Python screen-scraping library")
5870 (description
5871 "Beautiful Soup is a Python library designed for rapidly setting up
5872 screen-scraping projects. It offers Pythonic idioms for navigating,
5873 searching, and modifying a parse tree, providing a toolkit for
5874 dissecting a document and extracting what you need. It automatically
5875 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5876 (license license:expat)
5877 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5878
5879 (define-public python2-beautifulsoup4
5880 (package
5881 (inherit (package-with-python2
5882 (strip-python2-variant python-beautifulsoup4)))
5883 (arguments `(#:python ,python-2))))
5884
5885 (define-public python-soupsieve
5886 (package
5887 (name "python-soupsieve")
5888 (version "1.9.5")
5889 (source
5890 (origin
5891 (method url-fetch)
5892 (uri (pypi-uri "soupsieve" version))
5893 (sha256
5894 (base32
5895 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
5896 (build-system python-build-system)
5897 (arguments `(#:tests? #f))
5898 ;;XXX: 2 tests fail currently despite claming they were to be
5899 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5900 ;;don't want to create a circular dependency.
5901 (home-page "https://github.com/facelessuser/soupsieve")
5902 (synopsis "CSS selector library")
5903 (description
5904 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5905 Soup 4. It aims to provide selecting, matching, and filtering using modern
5906 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5907 specifications up through the latest CSS level 4 drafts and beyond (though
5908 some are not yet implemented).")
5909 (properties `((python2-variant . ,(delay python2-soupsieve))))
5910 (license license:expat)))
5911
5912 (define-public python2-soupsieve
5913 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5914 (package
5915 (inherit base)
5916 (propagated-inputs
5917 `(("python2-backports-functools-lru-cache"
5918 ,python2-backports-functools-lru-cache)
5919 ,@(package-propagated-inputs base))))))
5920
5921 (define-public python-netifaces
5922 (package
5923 (name "python-netifaces")
5924 (version "0.10.7")
5925 (source
5926 (origin
5927 (method url-fetch)
5928 (uri (pypi-uri "netifaces" version))
5929 (sha256
5930 (base32
5931 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5932 (build-system python-build-system)
5933 (home-page "https://github.com/al45tair/netifaces")
5934 (synopsis
5935 "Python module for portable network interface information")
5936 (description
5937 "Netifaces is a Python module providing information on network
5938 interfaces in an easy and portable manner.")
5939 (license license:expat)))
5940
5941 (define-public python2-netifaces
5942 (package-with-python2 python-netifaces))
5943
5944 (define-public python-networkx
5945 (package
5946 (name "python-networkx")
5947 (version "2.2")
5948 (source
5949 (origin
5950 (method url-fetch)
5951 (uri (pypi-uri "networkx" version ".zip"))
5952 (sha256
5953 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5954 (build-system python-build-system)
5955 ;; python-decorator is needed at runtime.
5956 (propagated-inputs
5957 `(("python-decorator" ,python-decorator)))
5958 (native-inputs
5959 `(("python-nose" ,python-nose)
5960 ("unzip" ,unzip)))
5961 (home-page "https://networkx.github.io/")
5962 (synopsis "Python module for creating and manipulating graphs and networks")
5963 (description
5964 "NetworkX is a Python package for the creation, manipulation, and study
5965 of the structure, dynamics, and functions of complex networks.")
5966 (license license:bsd-3)))
5967
5968 (define-public python2-networkx
5969 (package-with-python2 python-networkx))
5970
5971 (define-public python-datrie
5972 (package
5973 (name "python-datrie")
5974 (version "0.8")
5975 (source
5976 (origin
5977 (method url-fetch)
5978 (uri (pypi-uri "datrie" version))
5979 (sha256
5980 (base32
5981 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5982 (build-system python-build-system)
5983 (native-inputs
5984 `(("python-cython" ,python-cython)
5985 ("python-hypothesis" ,python-hypothesis)
5986 ("python-pytest" ,python-pytest)
5987 ("python-pytest-runner" ,python-pytest-runner)))
5988 (home-page "https://github.com/kmike/datrie")
5989 (synopsis "Fast, efficiently stored trie for Python")
5990 (description
5991 "This package provides a fast, efficiently stored trie implementation for
5992 Python.")
5993 (license license:lgpl2.1+)))
5994
5995 (define-public snakemake
5996 (package
5997 (name "snakemake")
5998 (version "5.7.1")
5999 (source
6000 (origin
6001 (method url-fetch)
6002 (uri (pypi-uri "snakemake" version))
6003 (sha256
6004 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
6005 (build-system python-build-system)
6006 (arguments
6007 ;; TODO: Package missing test dependencies.
6008 '(#:tests? #f
6009 #:phases
6010 (modify-phases %standard-phases
6011 ;; For cluster execution Snakemake will call Python. Since there is
6012 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6013 ;; this by calling the snakemake wrapper instead.
6014 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6015 (lambda* (#:key outputs #:allow-other-keys)
6016 (substitute* "snakemake/executors.py"
6017 (("\\{sys.executable\\} -m snakemake")
6018 (string-append (assoc-ref outputs "out")
6019 "/bin/snakemake")))
6020 #t)))))
6021 (propagated-inputs
6022 `(("python-appdirs" ,python-appdirs)
6023 ("python-configargparse" ,python-configargparse)
6024 ("python-datrie" ,python-datrie)
6025 ("python-docutils" ,python-docutils)
6026 ("python-gitpython" ,python-gitpython)
6027 ("python-jinja2" ,python-jinja2)
6028 ("python-jsonschema" ,python-jsonschema)
6029 ("python-networkx" ,python-networkx)
6030 ("python-psutil" ,python-psutil)
6031 ("python-pyyaml" ,python-pyyaml)
6032 ("python-ratelimiter" ,python-ratelimiter)
6033 ("python-requests" ,python-requests)
6034 ("python-wrapt" ,python-wrapt)))
6035 (home-page "https://snakemake.readthedocs.io")
6036 (synopsis "Python-based execution environment for make-like workflows")
6037 (description
6038 "Snakemake aims to reduce the complexity of creating workflows by
6039 providing a clean and modern domain specific specification language (DSL) in
6040 Python style, together with a fast and comfortable execution environment.")
6041 (license license:expat)))
6042
6043 (define-public python-pyqrcode
6044 (package
6045 (name "python-pyqrcode")
6046 (version "1.2.1")
6047 (source
6048 (origin
6049 (method url-fetch)
6050 (uri (pypi-uri "PyQRCode" version))
6051 (sha256
6052 (base32
6053 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6054 (build-system python-build-system)
6055 (home-page
6056 "https://github.com/mnooner256/pyqrcode")
6057 (synopsis "QR code generator")
6058 (description
6059 "Pyqrcode is a QR code generator written purely in Python with
6060 SVG, EPS, PNG and terminal output.")
6061 (license license:bsd-3)))
6062
6063 (define-public python-seaborn
6064 (package
6065 (name "python-seaborn")
6066 (version "0.9.0")
6067 (source
6068 (origin
6069 (method url-fetch)
6070 (uri (pypi-uri "seaborn" version))
6071 (sha256
6072 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6073 (patches
6074 (list (origin
6075 (method url-fetch)
6076 ;; This has already been merged, but there is no new
6077 ;; release including this patch. It fixes problems
6078 ;; with axis rotation that would lead to test
6079 ;; failures.
6080 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6081 (sha256
6082 (base32
6083 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6084 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6085 (build-system python-build-system)
6086 (arguments
6087 `(#:phases
6088 (modify-phases %standard-phases
6089 (add-before 'check 'start-xserver
6090 (lambda* (#:key inputs #:allow-other-keys)
6091 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6092 ;; There must be a running X server and make check doesn't
6093 ;; start one. Therefore we must do it.
6094 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6095 (setenv "DISPLAY" ":1")
6096 #t)))
6097 (add-after 'unpack 'fix-tests
6098 (lambda _
6099 ;; test_cbar_ticks fails probably because of matplotlib's
6100 ;; expectation of using an older version of FreeType.
6101 (delete-file "seaborn/tests/test_matrix.py")
6102 #t))
6103 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6104 (propagated-inputs
6105 `(("python-pandas" ,python-pandas)
6106 ("python-matplotlib" ,python-matplotlib)
6107 ("python-numpy" ,python-numpy)
6108 ("python-scipy" ,python-scipy)))
6109 (native-inputs
6110 `(("python-pytest" ,python-pytest)
6111 ("xorg-server" ,xorg-server-for-tests)))
6112 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6113 (synopsis "Statistical data visualization")
6114 (description
6115 "Seaborn is a library for making attractive and informative statistical
6116 graphics in Python. It is built on top of matplotlib and tightly integrated
6117 with the PyData stack, including support for numpy and pandas data structures
6118 and statistical routines from scipy and statsmodels.")
6119 (license license:bsd-3)))
6120
6121 (define-public python2-seaborn
6122 (package-with-python2 python-seaborn))
6123
6124 (define-public python-mpmath
6125 (package
6126 (name "python-mpmath")
6127 (version "0.19")
6128 (source (origin
6129 (method url-fetch)
6130 (uri (string-append "http://mpmath.org/files/mpmath-"
6131 version ".tar.gz"))
6132 (sha256
6133 (base32
6134 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6135 (build-system python-build-system)
6136 (arguments
6137 '(#:phases
6138 (modify-phases %standard-phases
6139 (replace 'check
6140 (lambda _
6141 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6142 (home-page "http://mpmath.org")
6143 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6144 (description
6145 "@code{mpmath} can be used as an arbitrary-precision substitute for
6146 Python's float/complex types and math/cmath modules, but also does much
6147 more advanced mathematics.")
6148 (license license:bsd-3)))
6149
6150 (define-public python2-mpmath
6151 (package-with-python2 python-mpmath))
6152
6153 (define-public python-bigfloat
6154 (package
6155 (name "python-bigfloat")
6156 (version "0.3.0")
6157 (source
6158 (origin
6159 (method url-fetch)
6160 (uri (pypi-uri "bigfloat" version))
6161 (sha256
6162 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6163 (build-system python-build-system)
6164 (inputs
6165 `(("mpfr" ,mpfr)))
6166 (home-page "https://github.com/mdickinson/bigfloat")
6167 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6168 (description
6169 "This package provides a Python interface to the MPFR library for
6170 multiprecision arithmetic.")
6171 (license license:lgpl3+)))
6172
6173 (define-public python2-bigfloat
6174 (package-with-python2 python-bigfloat))
6175
6176 (define-public python-sympy
6177 (package
6178 (name "python-sympy")
6179 (version "1.1.1")
6180 (source
6181 (origin
6182 (method url-fetch)
6183 (uri (string-append
6184 "https://github.com/sympy/sympy/releases/download/sympy-"
6185 version "/sympy-" version ".tar.gz"))
6186 (sha256
6187 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6188 (build-system python-build-system)
6189 (arguments
6190 `(#:phases
6191 (modify-phases %standard-phases
6192 ;; Run the core tests after installation. By default it would run
6193 ;; *all* tests, which take a very long time to complete and are known
6194 ;; to be flaky.
6195 (delete 'check)
6196 (add-after 'install 'check
6197 (lambda* (#:key outputs #:allow-other-keys)
6198 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6199 #t)))))
6200 (propagated-inputs
6201 `(("python-mpmath" ,python-mpmath)))
6202 (home-page "http://www.sympy.org/")
6203 (synopsis "Python library for symbolic mathematics")
6204 (description
6205 "SymPy is a Python library for symbolic mathematics. It aims to become a
6206 full-featured computer algebra system (CAS) while keeping the code as simple
6207 as possible in order to be comprehensible and easily extensible.")
6208 (license license:bsd-3)))
6209
6210 (define-public python2-sympy
6211 (package
6212 (inherit (package-with-python2 python-sympy))
6213 (arguments
6214 `(#:phases
6215 (modify-phases %standard-phases
6216 ;; Run the core tests after installation. By default it would run
6217 ;; *all* tests, which take a very long time to complete and are known
6218 ;; to be flaky.
6219 (delete 'check)
6220 (add-after 'install 'check
6221 (lambda* (#:key outputs #:allow-other-keys)
6222 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6223 #t)))))))
6224
6225 (define-public python-q
6226 (package
6227 (name "python-q")
6228 (version "2.6")
6229 (source
6230 (origin
6231 (method url-fetch)
6232 (uri (pypi-uri "q" version))
6233 (sha256
6234 (base32
6235 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6236 (build-system python-build-system)
6237 (home-page "https://github.com/zestyping/q")
6238 (synopsis "Quick-and-dirty debugging output for tired programmers")
6239 (description
6240 "q is a Python module for \"print\" style of debugging Python code. It
6241 provides convenient short API for print out of values, tracebacks, and
6242 falling into the Python interpreter.")
6243 (license license:asl2.0)))
6244
6245 (define-public python2-q
6246 (package-with-python2 python-q))
6247
6248 (define-public python2-xlib
6249 (package
6250 (name "python2-xlib")
6251 (version "0.14")
6252 (source (origin
6253 (method url-fetch)
6254 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6255 "/" version "/"
6256 "python-xlib-" version ".tar.gz"))
6257 (sha256
6258 (base32
6259 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6260 (build-system python-build-system)
6261 (arguments
6262 `(#:python ,python-2 ;Python 2 only
6263 #:tests? #f)) ;no tests
6264 (home-page "http://python-xlib.sourceforge.net/")
6265 (synopsis "Python X11 client library")
6266 (description
6267 "The Python X Library is intended to be a fully functional X client
6268 library for Python programs. It is useful to implement low-level X clients.
6269 It is written entirely in Python.")
6270 (license license:gpl2+)))
6271
6272 (define-public python-singledispatch
6273 (package
6274 (name "python-singledispatch")
6275 (version "3.4.0.3")
6276 (source
6277 (origin
6278 (method url-fetch)
6279 (uri (pypi-uri "singledispatch" version))
6280 (sha256
6281 (base32
6282 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6283 (build-system python-build-system)
6284 (native-inputs
6285 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6286 (home-page
6287 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6288 (synopsis "Backport of singledispatch feature from Python 3.4")
6289 (description
6290 "This library brings functools.singledispatch from Python 3.4 to Python
6291 2.6-3.3.")
6292 (license license:expat)))
6293
6294 (define-public python2-singledispatch
6295 (package-with-python2 python-singledispatch))
6296
6297 ;; the python- version can be removed with python-3.5
6298 (define-public python-backports-abc
6299 (package
6300 (name "python-backports-abc")
6301 (version "0.5")
6302 (source
6303 (origin
6304 (method url-fetch)
6305 (uri (pypi-uri "backports_abc" version))
6306 (sha256
6307 (base32
6308 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6309 (build-system python-build-system)
6310 (home-page "https://github.com/cython/backports_abc")
6311 (synopsis "Backport of additions to the 'collections.abc' module")
6312 (description
6313 "Python-backports-abc provides a backport of additions to the
6314 @code{collections.abc} module in Python-3.5.")
6315 (license license:psfl)))
6316
6317 (define-public python2-backports-abc
6318 (package-with-python2 python-backports-abc))
6319
6320 (define-public python-backports-csv
6321 (package
6322 (name "python-backports-csv")
6323 (version "1.0.5")
6324 (source
6325 (origin
6326 (method url-fetch)
6327 (uri (pypi-uri "backports.csv" version))
6328 (sha256
6329 (base32
6330 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6331 (build-system python-build-system)
6332 (home-page "https://github.com/ryanhiebert/backports.csv")
6333 (synopsis "Backport of Python 3's csv module for Python 2")
6334 (description
6335 "Provides a backport of Python 3's @code{csv} module for parsing
6336 comma separated values. The API of the @code{csv} module in Python 2
6337 is drastically different from the @code{csv} module in Python 3.
6338 This is due, for the most part, to the difference between str in
6339 Python 2 and Python 3.")
6340 (license license:psfl)))
6341
6342 (define-public python2-backports-csv
6343 (package-with-python2 python-backports-csv))
6344
6345 (define-public python2-backports-shutil-get-terminal-size
6346 (package
6347 (name "python2-backports-shutil-get-terminal-size")
6348 (version "1.0.0")
6349 (source
6350 (origin
6351 (method url-fetch)
6352 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6353 (sha256
6354 (base32
6355 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6356 (build-system python-build-system)
6357 (arguments
6358 `(#:python ,python-2
6359 #:phases
6360 (modify-phases %standard-phases
6361 (replace 'check
6362 (lambda _
6363 (invoke "py.test" "-v"))))))
6364 (native-inputs
6365 `(("python2-pytest" ,python2-pytest)))
6366 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6367 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6368 (description
6369 "This package provides a backport of the @code{get_terminal_size
6370 function} from Python 3.3's @code{shutil}.
6371 Unlike the original version it is written in pure Python rather than C,
6372 so it might be a tiny bit slower.")
6373 (license license:expat)))
6374
6375 (define-public python-waf
6376 (package
6377 (name "python-waf")
6378 (version "2.0.19")
6379 (source (origin
6380 (method url-fetch)
6381 (uri (string-append "https://waf.io/"
6382 "waf-" version ".tar.bz2"))
6383 (sha256
6384 (base32
6385 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
6386 (build-system python-build-system)
6387 (arguments
6388 '(#:phases
6389 (modify-phases %standard-phases
6390 (replace 'build
6391 (lambda _
6392 ;; XXX: Find a way to add all extra tools.
6393 (let ((tools '("gccdeps"
6394 "clang_compilation_database")))
6395 (invoke "python" "waf-light" "configure" "build"
6396 (string-append "--tools="
6397 (string-join tools ","))))))
6398 (replace 'check
6399 (lambda _
6400 (invoke "python" "waf" "--version")))
6401 (replace 'install
6402 (lambda* (#:key outputs #:allow-other-keys)
6403 (let ((out (assoc-ref outputs "out")))
6404 (install-file "waf" (string-append out "/bin")))
6405 #t))
6406 ;; waf breaks when it is wrapped.
6407 (delete 'wrap))))
6408 (home-page "https://waf.io/")
6409 (synopsis "Python-based build system")
6410 (description
6411 "Waf is a Python-based framework for configuring, compiling and installing
6412 applications.")
6413 (license license:bsd-3)))
6414
6415 (define-public python2-waf
6416 (package-with-python2 python-waf))
6417
6418 (define-public python-pyzmq
6419 (package
6420 (name "python-pyzmq")
6421 (version "17.1.2")
6422 (source
6423 (origin
6424 (method url-fetch)
6425 (uri (pypi-uri "pyzmq" version))
6426 (sha256
6427 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6428 (build-system python-build-system)
6429 (arguments
6430 `(#:configure-flags
6431 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6432 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6433 ;; --inplace' for 'python setup.py test' to work.
6434 #:tests? #f))
6435 (inputs
6436 `(("zeromq" ,zeromq)))
6437 (native-inputs
6438 `(("pkg-config" ,pkg-config)
6439 ("python-nose" ,python-nose)))
6440 (home-page "https://github.com/zeromq/pyzmq")
6441 (synopsis "Python bindings for 0MQ")
6442 (description
6443 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6444 (license license:bsd-4)))
6445
6446 (define-public python2-pyzmq
6447 (package-with-python2 python-pyzmq))
6448
6449 (define-public python-pep8
6450 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6451 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6452 ;; some dependents' test suites, and nothing more.
6453 (package
6454 (name "python-pep8")
6455 (version "1.7.0")
6456 (source
6457 (origin
6458 (method url-fetch)
6459 (uri (pypi-uri "pep8" version))
6460 (sha256
6461 (base32
6462 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6463 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6464 (build-system python-build-system)
6465 (home-page "https://pep8.readthedocs.org/")
6466 (synopsis "Python style guide checker")
6467 (description
6468 "This tools checks Python code against some of the style conventions in
6469 PEP 8.")
6470 (license license:expat)))
6471
6472 (define-public python2-pep8
6473 (package-with-python2 python-pep8))
6474
6475 (define-public python-pyflakes
6476 (package
6477 (name "python-pyflakes")
6478 (version "2.1.1")
6479 (source
6480 (origin
6481 (method url-fetch)
6482 (uri (pypi-uri "pyflakes" version))
6483 (sha256
6484 (base32
6485 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6486 (build-system python-build-system)
6487 (home-page
6488 "https://github.com/pyflakes/pyflakes")
6489 (synopsis "Passive checker of Python programs")
6490 (description
6491 "Pyflakes statically checks Python source code for common errors.")
6492 (license license:expat)))
6493
6494 (define-public python2-pyflakes
6495 (package-with-python2 python-pyflakes))
6496
6497 (define-public python-mccabe
6498 (package
6499 (name "python-mccabe")
6500 (version "0.6.1")
6501 (source
6502 (origin
6503 (method url-fetch)
6504 (uri (pypi-uri "mccabe" version))
6505 (sha256
6506 (base32
6507 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6508 (build-system python-build-system)
6509 (native-inputs
6510 `(("python-pytest" ,python-pytest-bootstrap)
6511 ("python-pytest-runner" ,python-pytest-runner)))
6512 (home-page "https://github.com/flintwork/mccabe")
6513 (synopsis "McCabe checker, plugin for flake8")
6514 (description
6515 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6516 complexity of Python source code.")
6517 (license license:expat)))
6518
6519 (define-public python2-mccabe
6520 (package-with-python2 python-mccabe))
6521
6522 (define-public python-mccabe-0.2.1
6523 (package (inherit python-mccabe)
6524 (version "0.2.1")
6525 (source
6526 (origin
6527 (method url-fetch)
6528 (uri (pypi-uri "mccabe" version))
6529 (sha256
6530 (base32
6531 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6532
6533 (define-public python2-mccabe-0.2.1
6534 (package-with-python2 python-mccabe-0.2.1))
6535
6536 ;; Flake8 2.4.1 requires an older version of pep8.
6537 ;; This should be removed ASAP.
6538 (define-public python-pep8-1.5.7
6539 (package (inherit python-pep8)
6540 (version "1.5.7")
6541 (source
6542 (origin
6543 (method url-fetch)
6544 (uri (pypi-uri "pep8" version))
6545 (sha256
6546 (base32
6547 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6548 (arguments
6549 ;; XXX Tests not compatible with Python 3.5.
6550 '(#:tests? #f))))
6551
6552 (define-public python2-pep8-1.5.7
6553 (package-with-python2 python-pep8-1.5.7))
6554
6555 ;; Flake8 2.4.1 requires an older version of pyflakes.
6556 ;; This should be removed ASAP.
6557 (define-public python-pyflakes-0.8.1
6558 (package (inherit python-pyflakes)
6559 (version "0.8.1")
6560 (source
6561 (origin
6562 (method url-fetch)
6563 (uri (pypi-uri "pyflakes" version))
6564 (sha256
6565 (base32
6566 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6567 (arguments
6568 ;; XXX Tests not compatible with Python 3.5.
6569 '(#:tests? #f))))
6570
6571 (define-public python2-pyflakes-0.8.1
6572 (package-with-python2 python-pyflakes-0.8.1))
6573
6574 (define-public python-flake8
6575 (package
6576 (name "python-flake8")
6577 (version "3.7.9")
6578 (source (origin
6579 (method url-fetch)
6580 (uri (pypi-uri "flake8" version))
6581 (sha256
6582 (base32
6583 "1yscj6avirm6m12bjh4fn2lfgxaamqsjh9pirdqfi0fcgq8ils25"))))
6584 (build-system python-build-system)
6585 (arguments
6586 `(#:phases
6587 (modify-phases %standard-phases
6588 (delete 'check)
6589 (add-after 'install 'check
6590 (lambda* (#:key inputs outputs #:allow-other-keys)
6591 (add-installed-pythonpath inputs outputs)
6592 (invoke "pytest" "-v")
6593 #t)))))
6594 (propagated-inputs
6595 `(("python-pycodestyle" ,python-pycodestyle)
6596 ("python-entrypoints" ,python-entrypoints)
6597 ("python-pyflakes" ,python-pyflakes)
6598 ("python-mccabe" ,python-mccabe)))
6599 (native-inputs
6600 `(("python-mock" ,python-mock)
6601 ("python-pytest" ,python-pytest-bootstrap)))
6602 (home-page "https://gitlab.com/pycqa/flake8")
6603 (synopsis
6604 "The modular source code checker: pep8, pyflakes and co")
6605 (description
6606 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6607 (properties `((python2-variant . ,(delay python2-flake8))))
6608 (license license:expat)))
6609
6610 (define-public python2-flake8
6611 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6612 (package (inherit base)
6613 (propagated-inputs
6614 `(("python2-configparser" ,python2-configparser)
6615 ("python2-enum34" ,python2-enum34)
6616 ("python2-functools32" ,python2-functools32)
6617 ("python2-typing" ,python2-typing)
6618 ,@(package-propagated-inputs base))))))
6619
6620 ;; python-hacking requires flake8 <2.6.0.
6621 (define-public python-flake8-2.5
6622 (package
6623 (inherit python-flake8)
6624 (version "2.5.5")
6625 (source (origin
6626 (method url-fetch)
6627 (uri (pypi-uri "flake8" version))
6628 (sha256
6629 (base32
6630 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6631 (propagated-inputs
6632 `(("python-pep8" ,python-pep8)
6633 ,@(package-propagated-inputs python-flake8)))
6634 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6635
6636 (define-public python2-flake8-2.5
6637 (package
6638 (inherit python2-flake8)
6639 (version (package-version python-flake8-2.5))
6640 (source (origin
6641 (inherit (package-source python-flake8-2.5))))
6642 (propagated-inputs
6643 `(("python2-pep8" ,python2-pep8)
6644 ,@(package-propagated-inputs python2-flake8)))))
6645
6646 (define-public python-flake8-polyfill
6647 (package
6648 (name "python-flake8-polyfill")
6649 (version "1.0.2")
6650 (source
6651 (origin
6652 (method url-fetch)
6653 (uri (pypi-uri "flake8-polyfill" version))
6654 (sha256
6655 (base32
6656 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6657 (build-system python-build-system)
6658 (arguments
6659 '(#:phases
6660 (modify-phases %standard-phases
6661 (replace 'check
6662 (lambda _
6663 ;; Be compatible with Pytest 4:
6664 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6665 (substitute* "setup.cfg"
6666 (("\\[pytest\\]")
6667 "[tool:pytest]"))
6668
6669 (setenv "PYTHONPATH"
6670 (string-append (getcwd) "/build/lib:"
6671 (getenv "PYTHONPATH")))
6672 (invoke "py.test" "-v"))))))
6673 (native-inputs
6674 `(("python-flake8" ,python-flake8)
6675 ("python-mock" ,python-mock)
6676 ("python-pep8" ,python-pep8)
6677 ("python-pycodestyle" ,python-pycodestyle)
6678 ("python-pytest" ,python-pytest)))
6679 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6680 (synopsis "Polyfill package for Flake8 plugins")
6681 (description
6682 "This package that provides some compatibility helpers for Flake8
6683 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6684 (license license:expat)))
6685
6686 (define-public python2-flake8-polyfill
6687 (package-with-python2 python-flake8-polyfill))
6688
6689 (define-public python-mistune
6690 (package
6691 (name "python-mistune")
6692 (version "0.8.4")
6693 (source
6694 (origin
6695 (method url-fetch)
6696 (uri (pypi-uri "mistune" version))
6697 (sha256
6698 (base32
6699 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6700 (build-system python-build-system)
6701 (native-inputs
6702 `(("python-nose" ,python-nose)
6703 ("python-cython" ,python-cython)))
6704 (home-page "https://github.com/lepture/mistune")
6705 (synopsis "Markdown parser in pure Python")
6706 (description "This package provides a fast markdown parser in pure
6707 Python.")
6708 (license license:bsd-3)))
6709
6710 (define-public python2-mistune
6711 (package-with-python2 python-mistune))
6712
6713 (define-public python-markdown
6714 (package
6715 (name "python-markdown")
6716 (version "3.1.1")
6717 (source
6718 (origin
6719 (method url-fetch)
6720 (uri (pypi-uri "Markdown" version))
6721 (sha256
6722 (base32
6723 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6724 (build-system python-build-system)
6725 (native-inputs
6726 `(("python-nose" ,python-nose)
6727 ("python-pyyaml" ,python-pyyaml)))
6728 (home-page "https://python-markdown.github.io/")
6729 (synopsis "Python implementation of Markdown")
6730 (description
6731 "This package provides a Python implementation of John Gruber's
6732 Markdown. The library features international input, various Markdown
6733 extensions, and several HTML output formats. A command line wrapper
6734 markdown_py is also provided to convert Markdown files to HTML.")
6735 (license license:bsd-3)))
6736
6737 (define-public python2-markdown
6738 (package-with-python2 python-markdown))
6739
6740 (define-public python-ptyprocess
6741 (package
6742 (name "python-ptyprocess")
6743 (version "0.5.2")
6744 (source
6745 (origin
6746 (method url-fetch)
6747 (uri (pypi-uri "ptyprocess" version))
6748 (sha256
6749 (base32
6750 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6751 (build-system python-build-system)
6752 (native-inputs
6753 `(("python-nose" ,python-nose)))
6754 (arguments
6755 `(#:phases
6756 (modify-phases %standard-phases
6757 (replace 'check
6758 (lambda _ (invoke "nosetests"))))))
6759 (home-page "https://github.com/pexpect/ptyprocess")
6760 (synopsis "Run a subprocess in a pseudo terminal")
6761 (description
6762 "This package provides a Python library used to launch a subprocess in a
6763 pseudo terminal (pty), and interact with both the process and its pty.")
6764 (license license:isc)))
6765
6766 (define-public python2-ptyprocess
6767 (package-with-python2 python-ptyprocess))
6768
6769 (define-public python-cram
6770 (package
6771 (name "python-cram")
6772 (version "0.7")
6773 (home-page "https://bitheap.org/cram/")
6774 (source (origin
6775 (method url-fetch)
6776 (uri (list (string-append home-page "cram-"
6777 version ".tar.gz")
6778 (pypi-uri "cram" version)))
6779 (sha256
6780 (base32
6781 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6782 (arguments
6783 '(#:phases
6784 (modify-phases %standard-phases
6785 (add-after 'unpack 'patch-source
6786 (lambda _
6787 (substitute* (find-files "cram" ".*\\.py$")
6788 ;; Replace default shell path.
6789 (("/bin/sh") (which "sh")))
6790 (substitute* (find-files "tests" ".*\\.t$")
6791 (("md5") "md5sum")
6792 (("/bin/bash") (which "bash"))
6793 (("/bin/sh") (which "sh")))
6794 (substitute* "cram/_test.py"
6795 ;; This hack works around a bug triggered by substituting
6796 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6797 ;; "cram -h", which breaks the output at 80 characters. This
6798 ;; causes the line showing the default shell to break into two
6799 ;; lines, but the test expects a single line...
6800 (("env\\['COLUMNS'\\] = '80'")
6801 "env['COLUMNS'] = '160'"))
6802
6803 (substitute* "Makefile"
6804 ;; Recent versions of python-coverage have caused the test
6805 ;; coverage to decrease (as of version 0.7). Allow that.
6806 (("--fail-under=100")
6807 "--fail-under=90"))
6808
6809 #t))
6810 (replace 'check
6811 ;; The test phase uses the built library and executable.
6812 (lambda* (#:key inputs outputs #:allow-other-keys)
6813 (add-installed-pythonpath inputs outputs)
6814 (setenv "PATH" (string-append (getenv "PATH") ":"
6815 (assoc-ref outputs "out") "/bin"))
6816 (invoke "make" "test"))))))
6817 (build-system python-build-system)
6818 (native-inputs
6819 `(("python-coverage" ,python-coverage)
6820 ("which" ,which)))
6821 (synopsis "Simple testing framework for command line applications")
6822 (description
6823 "Cram is a functional testing framework for command line applications.
6824 Cram tests look like snippets of interactive shell sessions. Cram runs each
6825 command and compares the command output in the test with the command’s actual
6826 output.")
6827 (license license:gpl2+)))
6828
6829 (define-public python2-cram
6830 (package-with-python2 python-cram))
6831
6832 (define-public python-straight-plugin
6833 (package
6834 (name "python-straight-plugin")
6835 (version "1.4.1")
6836 (source
6837 (origin
6838 (method url-fetch)
6839 (uri (pypi-uri "straight.plugin" version))
6840 (sha256
6841 (base32
6842 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6843 (build-system python-build-system)
6844 (home-page "https://github.com/ironfroggy/straight.plugin")
6845 (synopsis "Simple namespaced plugin facility")
6846 (description "Straight Plugin provides a type of plugin you can create from
6847 almost any existing Python modules, and an easy way for outside developers to
6848 add functionality and customization to your projects with their own plugins.")
6849 (license license:expat)))
6850
6851 (define-public python2-straight-plugin
6852 (package-with-python2 python-straight-plugin))
6853
6854 (define-public python-fonttools
6855 (package
6856 (name "python-fonttools")
6857 (version "4.2.4")
6858 (source (origin
6859 (method url-fetch)
6860 (uri (pypi-uri "fonttools" version ".zip"))
6861 (sha256
6862 (base32
6863 "0rz2fn707x8ri507bb5k5y3di851dwchn0886f77g5bgiflmnpwm"))))
6864 (build-system python-build-system)
6865 (native-inputs
6866 `(("unzip" ,unzip)
6867 ("python-pytest" ,python-pytest)
6868 ("python-pytest-runner" ,python-pytest-runner)))
6869 (home-page "https://github.com/fonttools/fonttools")
6870 (synopsis "Tools to manipulate font files")
6871 (description
6872 "FontTools/TTX is a library to manipulate font files from Python. It
6873 supports reading and writing of TrueType/OpenType fonts, reading and writing
6874 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6875 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6876 from an XML-based format.")
6877 (license license:expat)))
6878
6879 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
6880 (define-public python2-fonttools
6881 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
6882 (package/inherit
6883 base
6884 (version "3.44.0")
6885 (source (origin
6886 (method url-fetch)
6887 (uri (pypi-uri "fonttools" version ".zip"))
6888 (sha256
6889 (base32
6890 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
6891
6892 (define-public python-ly
6893 (package
6894 (name "python-ly")
6895 (version "0.9.5")
6896 (source
6897 (origin
6898 (method url-fetch)
6899 (uri (pypi-uri name version))
6900 (sha256
6901 (base32
6902 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6903 (build-system python-build-system)
6904 (arguments
6905 ;; FIXME: Some tests need network access.
6906 '(#:tests? #f))
6907 (synopsis "Tool and library for manipulating LilyPond files")
6908 (description "This package provides a Python library to parse, manipulate
6909 or create documents in LilyPond format. A command line program ly is also
6910 provided that can be used to do various manipulations with LilyPond files.")
6911 (home-page "https://pypi.python.org/pypi/python-ly")
6912 (license license:gpl2+)))
6913
6914 (define-public python-appdirs
6915 (package
6916 (name "python-appdirs")
6917 (version "1.4.3")
6918 (source
6919 (origin
6920 (method url-fetch)
6921 (uri (pypi-uri "appdirs" version))
6922 (sha256
6923 (base32
6924 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6925 (build-system python-build-system)
6926 (home-page "https://github.com/ActiveState/appdirs")
6927 (synopsis
6928 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6929 (description
6930 "This module provides a portable way of finding out where user data
6931 should be stored on various operating systems.")
6932 (license license:expat)))
6933
6934 (define-public python2-appdirs
6935 (package-with-python2 python-appdirs))
6936
6937 (define-public python-llfuse
6938 (package
6939 (name "python-llfuse")
6940 (version "1.3.5")
6941 (source (origin
6942 (method url-fetch)
6943 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6944 (sha256
6945 (base32
6946 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6947 (build-system python-build-system)
6948 (inputs
6949 `(("fuse" ,fuse)
6950 ("attr" ,attr)))
6951 (native-inputs
6952 `(("pkg-config" ,pkg-config)))
6953 (synopsis "Python bindings for FUSE")
6954 (description
6955 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6956 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6957 (license license:lgpl2.0+)
6958 (properties `((python2-variant . ,(delay python2-llfuse))))))
6959
6960 (define-public python2-llfuse
6961 (package (inherit (package-with-python2
6962 (strip-python2-variant python-llfuse)))
6963 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6964
6965 ;; For attic-0.16
6966 (define-public python-llfuse-0.41
6967 (package (inherit python-llfuse)
6968 (version "0.41.1")
6969 (source (origin
6970 (method url-fetch)
6971 (uri (string-append
6972 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6973 "llfuse-" version ".tar.bz2"))
6974 (sha256
6975 (base32
6976 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6977 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6978 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6979 (license (list license:expat license:lgpl2.0+))))
6980
6981 (define-public python-msgpack
6982 (package
6983 (name "python-msgpack")
6984 (version "0.5.6")
6985 (source (origin
6986 (method url-fetch)
6987 (uri (pypi-uri "msgpack" version))
6988 (sha256
6989 (base32
6990 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6991 (build-system python-build-system)
6992 (arguments
6993 `(#:modules ((guix build utils)
6994 (guix build python-build-system)
6995 (ice-9 ftw)
6996 (srfi srfi-1)
6997 (srfi srfi-26))
6998 #:phases
6999 (modify-phases %standard-phases
7000 (replace 'check
7001 (lambda _
7002 (let ((cwd (getcwd)))
7003 (setenv "PYTHONPATH"
7004 (string-append cwd "/build/"
7005 (find (cut string-prefix? "lib" <>)
7006 (scandir (string-append cwd "/build")))
7007 ":"
7008 (getenv "PYTHONPATH")))
7009 (invoke "pytest" "-v" "test")))))))
7010 (native-inputs
7011 `(("python-pytest" ,python-pytest)))
7012 (synopsis "MessagePack (de)serializer")
7013 (description "MessagePack is a fast, compact binary serialization format,
7014 suitable for similar data to JSON. This package provides CPython bindings for
7015 reading and writing MessagePack data.")
7016 (home-page "https://pypi.python.org/pypi/msgpack/")
7017 (license license:asl2.0)))
7018
7019 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7020 ;; release 0.5. Some packages like borg still call it by the old name for now.
7021 ;; <https://bugs.gnu.org/30662>
7022 (define-public python-msgpack-transitional
7023 (package
7024 (inherit python-msgpack)
7025 (name "python-msgpack-transitional")
7026 (arguments
7027 (substitute-keyword-arguments (package-arguments python-msgpack)
7028 ((#:phases phases)
7029 `(modify-phases ,phases
7030 (add-after 'unpack 'configure-transitional
7031 (lambda _
7032 ;; Keep using the old name.
7033 (substitute* "setup.py"
7034 (("TRANSITIONAL = False")
7035 "TRANSITIONAL = 1"))
7036 #t))))))))
7037
7038 (define-public python2-msgpack
7039 (package-with-python2 python-msgpack))
7040
7041 (define-public python-netaddr
7042 (package
7043 (name "python-netaddr")
7044 (version "0.7.19")
7045 (source
7046 (origin
7047 (method url-fetch)
7048 (uri (pypi-uri "netaddr" version))
7049 (sha256
7050 (base32
7051 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7052 (build-system python-build-system)
7053 (arguments `(#:tests? #f)) ;; No tests.
7054 (home-page "https://github.com/drkjam/netaddr/")
7055 (synopsis "Pythonic manipulation of network addresses")
7056 (description
7057 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7058 and MAC network addresses.")
7059 (license license:bsd-3)))
7060
7061 (define-public python2-netaddr
7062 (package-with-python2 python-netaddr))
7063
7064 (define-public python2-pyroute2
7065 (package
7066 (name "python2-pyroute2")
7067 (version "0.5.6")
7068 (source
7069 (origin
7070 (method url-fetch)
7071 (uri (pypi-uri "pyroute2" version))
7072 (sha256
7073 (base32
7074 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7075 (build-system python-build-system)
7076 (arguments
7077 `(#:python ,python-2)) ;Python 3.x is not supported
7078 (home-page "https://github.com/svinota/pyroute2")
7079 (synopsis "Python netlink library")
7080 (description
7081 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7082 Supported netlink families and protocols include:
7083 @itemize
7084 @item rtnl, network settings - addresses, routes, traffic controls
7085 @item nfnetlink - netfilter API: ipset, nftables, ...
7086 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7087 @item devlink - manage and monitor devlink-enabled hardware
7088 @item generic - generic netlink families
7089 @itemize
7090 @item nl80211 - wireless functions API (basic support)
7091 @item taskstats - extended process statistics
7092 @item acpi_events - ACPI events monitoring
7093 @item thermal_events - thermal events monitoring
7094 @item VFS_DQUOT - disk quota events monitoring
7095 @end itemize
7096 @end itemize")
7097 (license license:gpl2+)))
7098
7099 (define-public python-wrapt
7100 (package
7101 (name "python-wrapt")
7102 (version "1.11.2")
7103 (source
7104 (origin
7105 (method url-fetch)
7106 (uri (pypi-uri "wrapt" version))
7107 (sha256
7108 (base32
7109 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7110 (build-system python-build-system)
7111 (arguments
7112 ;; Tests are not included in the tarball, they are only available in the
7113 ;; git repository.
7114 `(#:tests? #f))
7115 (home-page "https://github.com/GrahamDumpleton/wrapt")
7116 (synopsis "Module for decorators, wrappers and monkey patching")
7117 (description
7118 "The aim of the wrapt module is to provide a transparent object proxy for
7119 Python, which can be used as the basis for the construction of function
7120 wrappers and decorator functions.")
7121 (license license:bsd-2)))
7122
7123 (define-public python2-wrapt
7124 (package-with-python2 python-wrapt))
7125
7126 (define-public python-xlrd
7127 (package
7128 (name "python-xlrd")
7129 (version "1.2.0")
7130 (source (origin
7131 (method url-fetch)
7132 (uri (pypi-uri "xlrd" version))
7133 (sha256
7134 (base32
7135 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7136 (build-system python-build-system)
7137 (arguments
7138 `(#:phases
7139 (modify-phases %standard-phases
7140 ;; Some tests depend on writing a temporary file to the user's home
7141 ;; directory.
7142 (add-after 'unpack 'fix-tests
7143 (lambda _
7144 (delete-file "tests/test_open_workbook.py")
7145 #t)))))
7146 (home-page "http://www.python-excel.org/")
7147 (synopsis "Library for extracting data from Excel files")
7148 (description "This package provides a library to extract data from
7149 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7150 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7151 Unicode-aware. It is not intended as an end-user tool.")
7152 (license license:bsd-3)))
7153
7154 (define-public python2-xlrd
7155 (package-with-python2 python-xlrd))
7156
7157 (define-public python-prettytable
7158 (package
7159 (name "python-prettytable")
7160 (version "0.7.2")
7161 (source
7162 (origin
7163 (method url-fetch)
7164 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7165 (sha256
7166 (base32
7167 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7168 (build-system python-build-system)
7169 (home-page "http://code.google.com/p/prettytable/")
7170 (synopsis "Display tabular data in an ASCII table format")
7171 (description
7172 "A library designed to represent tabular data in visually appealing ASCII
7173 tables. PrettyTable allows for selection of which columns are to be printed,
7174 independent alignment of columns (left or right justified or centred) and
7175 printing of sub-tables by specifying a row range.")
7176 (license license:bsd-3)))
7177
7178 (define-public python2-prettytable
7179 (package-with-python2 python-prettytable))
7180
7181 (define-public python-tables
7182 (package
7183 (name "python-tables")
7184 (version "3.4.4")
7185 (source
7186 (origin
7187 (method url-fetch)
7188 (uri (pypi-uri "tables" version))
7189 (sha256
7190 (base32
7191 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7192 (modules '((guix build utils)))
7193 (snippet
7194 '(begin
7195 ;; Remove pre-compiled .pyc files from source.
7196 (for-each delete-file-recursively
7197 (find-files "." "__pycache__" #:directories? #t))
7198 (for-each delete-file (find-files "." "\\.pyc$"))
7199 #t))))
7200 (build-system python-build-system)
7201 (arguments
7202 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7203 ;; or "check", so we must override the build and check phases.
7204 #:phases
7205 (modify-phases %standard-phases
7206 (add-after 'unpack 'use-gcc
7207 (lambda _
7208 (substitute* "setup.py"
7209 (("compiler = new_compiler\\(\\)" line)
7210 (string-append line
7211 "\ncompiler.set_executables(compiler='gcc',"
7212 "compiler_so='gcc',"
7213 "linker_exe='gcc',"
7214 "linker_so='gcc -shared')")))
7215 #t))
7216 (replace 'build
7217 (lambda* (#:key inputs #:allow-other-keys)
7218 (invoke "python" "setup.py" "build"
7219 (string-append "--hdf5="
7220 (assoc-ref inputs "hdf5")))))
7221 (replace 'check
7222 (lambda* (#:key inputs #:allow-other-keys)
7223 (invoke "python" "setup.py" "check"
7224 (string-append "--hdf5="
7225 (assoc-ref inputs "hdf5"))))))))
7226 (propagated-inputs
7227 `(("python-numexpr" ,python-numexpr)
7228 ("python-numpy" ,python-numpy)))
7229 (native-inputs
7230 `(("python-cython" ,python-cython)
7231 ("pkg-config" ,pkg-config)))
7232 (inputs
7233 `(("hdf5" ,hdf5)
7234 ("bzip2" ,bzip2)
7235 ("zlib" ,zlib)))
7236 (home-page "http://www.pytables.org/")
7237 (synopsis "Hierarchical datasets for Python")
7238 (description "PyTables is a package for managing hierarchical datasets and
7239 designed to efficiently cope with extremely large amounts of data.")
7240 (license license:bsd-3)))
7241
7242 (define-public python2-tables
7243 (package-with-python2 python-tables))
7244
7245 (define-public python-pyasn1
7246 (package
7247 (name "python-pyasn1")
7248 (version "0.4.3")
7249 (source
7250 (origin
7251 (method url-fetch)
7252 (uri (pypi-uri "pyasn1" version))
7253 (sha256
7254 (base32
7255 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7256 (build-system python-build-system)
7257 (home-page "http://pyasn1.sourceforge.net/")
7258 (synopsis "ASN.1 types and codecs")
7259 (description
7260 "This is an implementation of ASN.1 types and codecs in Python. It is
7261 suitable for a wide range of protocols based on the ASN.1 specification.")
7262 (license license:bsd-2)))
7263
7264 (define-public python2-pyasn1
7265 (package-with-python2 python-pyasn1))
7266
7267 (define-public python-pyasn1-modules
7268 (package
7269 (name "python-pyasn1-modules")
7270 (version "0.2.2")
7271 (source
7272 (origin
7273 (method url-fetch)
7274 (uri (pypi-uri "pyasn1-modules" version))
7275 (sha256
7276 (base32
7277 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7278 (build-system python-build-system)
7279 (propagated-inputs
7280 `(("python-pyasn1" ,python-pyasn1)))
7281 (home-page "https://sourceforge.net/projects/pyasn1/")
7282 (synopsis "ASN.1 codec implementations")
7283 (description
7284 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7285 implementations of ASN.1-based codecs and protocols.")
7286 (license license:bsd-3)))
7287
7288 (define-public python2-pyasn1-modules
7289 (package-with-python2 python-pyasn1-modules))
7290
7291 (define-public python-ipaddress
7292 (package
7293 (name "python-ipaddress")
7294 (version "1.0.22")
7295 (source (origin
7296 (method url-fetch)
7297 (uri (pypi-uri "ipaddress" version))
7298 (sha256
7299 (base32
7300 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7301 (build-system python-build-system)
7302 (home-page "https://github.com/phihag/ipaddress")
7303 (synopsis "IP address manipulation library")
7304 (description
7305 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7306 in Python. This library is used to create, poke at, and manipulate IPv4 and
7307 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7308 module to older versions of Python.")
7309 (license license:psfl)))
7310
7311 (define-public python2-ipaddress
7312 (package-with-python2 python-ipaddress))
7313
7314 (define-public python2-ipaddr
7315 (package
7316 (name "python2-ipaddr")
7317 (version "2.1.11")
7318 (source
7319 (origin
7320 (method url-fetch)
7321 (uri (pypi-uri "ipaddr" version))
7322 (sha256
7323 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7324 (build-system python-build-system)
7325 (arguments
7326 `(#:python ,python-2 ;version 2 only
7327 #:phases
7328 (modify-phases %standard-phases
7329 (replace 'check
7330 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7331 (home-page "https://github.com/google/ipaddr-py")
7332 (synopsis "IP address manipulation library")
7333 (description
7334 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7335 IPv6 addresses and networks.
7336
7337 For new implementations you may prefer to use the standard module
7338 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7339 versions of Python.")
7340 (license license:asl2.0)))
7341
7342 (define-public python-idna
7343 (package
7344 (name "python-idna")
7345 (version "2.8")
7346 (source
7347 (origin
7348 (method url-fetch)
7349 (uri (pypi-uri "idna" version))
7350 (sha256
7351 (base32
7352 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7353 (build-system python-build-system)
7354 (home-page "https://github.com/kjd/idna")
7355 (synopsis "Internationalized domain names in applications")
7356 (description
7357 "This is a library to support the Internationalised Domain Names in
7358 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7359 protocol is often referred to as “IDNA2008” and can produce different results
7360 from the earlier standard from 2003. The library is also intended to act as a
7361 suitable drop-in replacement for the “encodings.idna” module that comes with
7362 the Python standard library but currently only supports the older 2003
7363 specification.")
7364 (license license:bsd-4)))
7365
7366 (define-public python-idna-2.7
7367 (package (inherit python-idna)
7368 (version "2.7")
7369 (source (origin
7370 (method url-fetch)
7371 (uri (pypi-uri "idna" version))
7372 (sha256
7373 (base32
7374 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7375
7376
7377 (define-public python2-idna
7378 (package-with-python2 python-idna))
7379
7380 (define-public python-idna-ssl
7381 (package
7382 (name "python-idna-ssl")
7383 (version "1.0.1")
7384 (source
7385 (origin
7386 (method url-fetch)
7387 (uri (pypi-uri "idna-ssl" version))
7388 (sha256
7389 (base32
7390 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7391 (build-system python-build-system)
7392 (arguments
7393 `(#:tests? #f)) ;circular dependency with python-aiohttp
7394 (home-page "https://github.com/aio-libs/idna-ssl")
7395 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7396 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7397 domains support.")
7398 (license license:expat)))
7399
7400 (define-public python-pretend
7401 (package
7402 (name "python-pretend")
7403 (version "1.0.9")
7404 (source
7405 (origin
7406 (method url-fetch)
7407 (uri (pypi-uri "pretend" version))
7408 (sha256
7409 (base32
7410 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7411 (build-system python-build-system)
7412 (home-page "https://github.com/alex/pretend")
7413 (synopsis "Library for stubbing in Python")
7414 (description
7415 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7416 technique for writing tests. You may hear the term mixed up with mocks,
7417 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7418 responses, rather than doing any computation.")
7419 (license license:bsd-3)))
7420
7421 (define-public python2-pretend
7422 (package-with-python2 python-pretend))
7423
7424 (define-public python-pip
7425 (package
7426 (name "python-pip")
7427 (version "19.2.1")
7428 (source
7429 (origin
7430 (method url-fetch)
7431 (uri (pypi-uri "pip" version))
7432 (sha256
7433 (base32
7434 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7435 (build-system python-build-system)
7436 (arguments
7437 '(#:tests? #f)) ; there are no tests in the pypi archive.
7438 (home-page "https://pip.pypa.io/")
7439 (synopsis "Package manager for Python software")
7440 (description
7441 "Pip is a package manager for Python software, that finds packages on the
7442 Python Package Index (PyPI).")
7443 (license license:expat)))
7444
7445 (define-public python2-pip
7446 (package-with-python2 python-pip))
7447
7448 (define-public python-tlsh
7449 (package
7450 (name "python-tlsh")
7451 (version "3.4.5")
7452 (home-page "https://github.com/trendmicro/tlsh")
7453 (source
7454 (origin
7455 (method git-fetch)
7456 (uri (git-reference
7457 (url "https://github.com/trendmicro/tlsh.git")
7458 (commit (string-append "v" version))))
7459 (file-name (git-file-name name version))
7460 (sha256
7461 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7462 (build-system cmake-build-system)
7463 (arguments
7464 '(#:out-of-source? #f
7465 #:phases (modify-phases %standard-phases
7466 (replace
7467 'install
7468 (lambda* (#:key outputs #:allow-other-keys)
7469 ;; Build and install the Python bindings. The underlying
7470 ;; C++ library is apparently not meant to be installed.
7471 (let ((out (assoc-ref outputs "out")))
7472 (with-directory-excursion "py_ext"
7473 (and (system* "python" "setup.py" "build")
7474 (system* "python" "setup.py" "install"
7475 (string-append "--prefix=" out))))))))))
7476 (inputs `(("python" ,python-wrapper))) ;for the bindings
7477 (synopsis "Fuzzy matching library for Python")
7478 (description
7479 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7480 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7481 value which can be used for similarity comparisons. Similar objects have
7482 similar hash values, which allows for the detection of similar objects by
7483 comparing their hash values. The byte stream should have a sufficient amount
7484 of complexity; for example, a byte stream of identical bytes will not generate
7485 a hash value.")
7486 (license license:asl2.0)))
7487
7488 (define-public python2-tlsh
7489 (package
7490 (inherit python-tlsh)
7491 (name "python2-tlsh")
7492 (inputs `(("python" ,python-2)))))
7493
7494 (define-public python-termcolor
7495 (package
7496 (name "python-termcolor")
7497 (version "1.1.0")
7498 (source
7499 (origin
7500 (method url-fetch)
7501 (uri (pypi-uri "termcolor" version))
7502 (sha256
7503 (base32
7504 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7505 (build-system python-build-system)
7506 (arguments
7507 ;; There are no tests.
7508 `(#:tests? #f))
7509 (home-page "https://pypi.python.org/pypi/termcolor")
7510 (synopsis "ANSII Color formatting for terminal output")
7511 (description
7512 "This package provides ANSII Color formatting for output in terminals.")
7513 (license license:expat)))
7514
7515 (define-public python2-termcolor
7516 (package-with-python2 python-termcolor))
7517
7518 (define-public python-libarchive-c
7519 (package
7520 (name "python-libarchive-c")
7521 (version "2.8")
7522 (source (origin
7523 (method url-fetch)
7524 (uri (pypi-uri "libarchive-c" version))
7525 (sha256
7526 (base32
7527 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7528 (build-system python-build-system)
7529 (arguments
7530 '(#:phases (modify-phases %standard-phases
7531 (add-before
7532 'build 'reference-libarchive
7533 (lambda* (#:key inputs #:allow-other-keys)
7534 ;; Retain the absolute file name of libarchive.so.
7535 (let ((libarchive (assoc-ref inputs "libarchive")))
7536 (substitute* "libarchive/ffi.py"
7537 (("find_library\\('archive'\\)")
7538 (string-append "'" libarchive
7539 "/lib/libarchive.so'"))))))
7540 (replace 'check
7541 (lambda _ (invoke "pytest" "-vv"))))))
7542 (native-inputs
7543 `(("python-mock" ,python-mock)
7544 ("python-pytest" ,python-pytest)))
7545 (inputs
7546 `(("libarchive" ,libarchive)))
7547 (home-page "https://github.com/Changaco/python-libarchive-c")
7548 (synopsis "Python interface to libarchive")
7549 (description
7550 "This package provides Python bindings to libarchive, a C library to
7551 access possibly compressed archives in many different formats. It uses
7552 Python's @code{ctypes} foreign function interface (FFI).")
7553 (license license:lgpl2.0+)))
7554
7555 (define-public python2-libarchive-c
7556 (package-with-python2 python-libarchive-c))
7557
7558 (define-public python-file
7559 (package
7560 (inherit file)
7561 (name "python-file")
7562 (build-system python-build-system)
7563 (arguments
7564 '(#:tests? #f ;no tests
7565 #:configure-flags '("--single-version-externally-managed" "--root=/")
7566 #:phases (modify-phases %standard-phases
7567 (add-before 'build 'change-directory
7568 (lambda _
7569 (chdir "python")
7570 #t))
7571 (add-before 'build 'set-library-file-name
7572 (lambda* (#:key inputs #:allow-other-keys)
7573 (let ((file (assoc-ref inputs "file")))
7574 (substitute* "magic.py"
7575 (("find_library\\('magic'\\)")
7576 (string-append "'" file "/lib/libmagic.so'")))
7577 #t))))))
7578 (inputs `(("file" ,file)))
7579 (native-inputs (if (%current-target-system)
7580 `(("self" ,this-package))
7581 '()))
7582 (synopsis "Python bindings to the libmagic file type guesser. Note that
7583 this module and the python-magic module both provide a \"magic.py\" file;
7584 these two modules, which are different and were developed separately, both
7585 serve the same purpose: provide Python bindings for libmagic.")))
7586
7587 (define-public python2-file
7588 (package-with-python2 python-file))
7589
7590 (define-public python-debian
7591 (package
7592 (name "python-debian")
7593 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7594 (version "0.1.36")
7595 (source
7596 (origin
7597 ;; Use git-fetch, as pypi doesn't include test suite.
7598 (method git-fetch)
7599 (uri (git-reference
7600 (url home-page)
7601 (commit version)))
7602 (file-name (git-file-name name version))
7603 (sha256
7604 (base32
7605 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7606 (build-system python-build-system)
7607 (arguments
7608 `(#:phases (modify-phases %standard-phases
7609 (add-after 'unpack 'remove-debian-specific-tests
7610 ;; python-apt, apt and dpkg are not yet available in guix,
7611 ;; and these tests heavily depend on them.
7612 (lambda _
7613 (delete-file "lib/debian/tests/test_deb822.py")
7614 (delete-file "lib/debian/tests/test_debfile.py")
7615 #t)))))
7616 (propagated-inputs
7617 `(("python-six" ,python-six)
7618 ("python-chardet" ,python-chardet)))
7619 (synopsis "Debian package related modules")
7620 (description
7621 ;; XXX: Use @enumerate instead of @itemize to work around
7622 ;; <http://bugs.gnu.org/21772>.
7623 "This package provides Python modules that abstract many formats of
7624 Debian-related files, such as:
7625
7626 @enumerate
7627 @item Debtags information;
7628 @item @file{debian/changelog} files;
7629 @item packages files, pdiffs;
7630 @item control files of single or multiple RFC822-style paragraphs---e.g.
7631 @file{debian/control}, @file{.changes}, @file{.dsc};
7632 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7633 contained files and meta-information.
7634 @end enumerate\n")
7635
7636 ;; Modules are either GPLv2+ or GPLv3+.
7637 (license license:gpl3+)))
7638
7639 (define-public python-nbformat
7640 (package
7641 (name "python-nbformat")
7642 (version "4.4.0")
7643 (source
7644 (origin
7645 (method url-fetch)
7646 (uri (pypi-uri "nbformat" version))
7647 (sha256
7648 (base32
7649 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7650 (build-system python-build-system)
7651 (arguments `(#:tests? #f)) ; no test target
7652 (propagated-inputs
7653 `(("python-ipython-genutils" ,python-ipython-genutils)
7654 ("python-jsonschema" ,python-jsonschema)
7655 ("python-jupyter-core" ,python-jupyter-core)
7656 ("python-traitlets" ,python-traitlets)))
7657 (home-page "http://jupyter.org")
7658 (synopsis "Jupyter Notebook format")
7659 (description "This package provides the reference implementation of the
7660 Jupyter Notebook format and Python APIs for working with notebooks.")
7661 (license license:bsd-3)))
7662
7663 (define-public python2-nbformat
7664 (package-with-python2 python-nbformat))
7665
7666 (define-public python-bleach
7667 (package
7668 (name "python-bleach")
7669 (version "3.1.0")
7670 (source
7671 (origin
7672 (method url-fetch)
7673 (uri (pypi-uri "bleach" version))
7674 (sha256
7675 (base32
7676 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7677 (build-system python-build-system)
7678 (propagated-inputs
7679 `(("python-webencodings" ,python-webencodings)
7680 ("python-six" ,python-six)))
7681 (native-inputs
7682 `(("python-pytest" ,python-pytest)
7683 ("python-pytest-runner" ,python-pytest-runner-2)))
7684 (home-page "https://github.com/jsocol/bleach")
7685 (synopsis "Whitelist-based HTML-sanitizing tool")
7686 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7687 (license license:asl2.0)))
7688
7689 (define-public python2-bleach
7690 (package-with-python2 python-bleach))
7691
7692 (define-public python-entrypoints
7693 (package
7694 (name "python-entrypoints")
7695 (version "0.3")
7696 (source
7697 (origin
7698 (method url-fetch)
7699 (uri (pypi-uri "entrypoints" version))
7700 (sha256
7701 (base32
7702 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7703 (build-system python-build-system)
7704 ;; The package does not come with a setup.py file, so we have to generate
7705 ;; one ourselves.
7706 (arguments
7707 `(#:tests? #f
7708 #:phases
7709 (modify-phases %standard-phases
7710 (add-after 'unpack 'create-setup.py
7711 (lambda _
7712 (call-with-output-file "setup.py"
7713 (lambda (port)
7714 (format port "\
7715 from setuptools import setup
7716 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7717 " ,version))))))))
7718 (home-page "https://github.com/takluyver/entrypoints")
7719 (synopsis "Discover and load entry points from installed Python packages")
7720 (description "Entry points are a way for Python packages to advertise
7721 objects with some common interface. The most common examples are
7722 @code{console_scripts} entry points, which define shell commands by
7723 identifying a Python function to run. The @code{entrypoints} module contains
7724 functions to find and load entry points.")
7725 (license license:expat)))
7726
7727 (define-public python2-entrypoints
7728 (package-with-python2 python-entrypoints))
7729
7730 (define-public python-nbconvert
7731 (package
7732 (name "python-nbconvert")
7733 (version "5.0.0b1")
7734 (source
7735 (origin
7736 (method url-fetch)
7737 (uri (pypi-uri "nbconvert" version))
7738 (sha256
7739 (base32
7740 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7741 (build-system python-build-system)
7742 (arguments
7743 `(;; The "bdist_egg" target is disabled by default, causing the installation
7744 ;; to fail.
7745 #:configure-flags (list "bdist_egg")
7746 ;; FIXME: 5 failures, 40 errors.
7747 #:tests? #f))
7748 ;; #:phases
7749 ;; (modify-phases %standard-phases
7750 ;; (replace 'check
7751 ;; (lambda _
7752 ;; (zero? (system* "py.test" "-v")))))
7753 (native-inputs
7754 `(("python-pytest" ,python-pytest)))
7755 (propagated-inputs
7756 `(("python-bleach" ,python-bleach)
7757 ("python-entrypoints" ,python-entrypoints)
7758 ("python-jinja2" ,python-jinja2)
7759 ("python-jupyter-core" ,python-jupyter-core)
7760 ("python-mistune" ,python-mistune)
7761 ("python-nbformat" ,python-nbformat)
7762 ("python-pygments" ,python-pygments)
7763 ("python-traitlets" ,python-traitlets)))
7764 (home-page "http://jupyter.org")
7765 (synopsis "Converting Jupyter Notebooks")
7766 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7767 notebooks to various other formats via Jinja templates. It allows you to
7768 convert an @code{.ipynb} notebook file into various static formats including:
7769
7770 @enumerate
7771 @item HTML
7772 @item LaTeX
7773 @item PDF
7774 @item Reveal JS
7775 @item Markdown (md)
7776 @item ReStructured Text (rst)
7777 @item executable script
7778 @end enumerate\n")
7779 (license license:bsd-3)))
7780
7781 (define-public python2-nbconvert
7782 (package-with-python2 python-nbconvert))
7783
7784 (define-public python-notebook
7785 (package
7786 (name "python-notebook")
7787 (version "5.7.4")
7788 (source (origin
7789 (method url-fetch)
7790 (uri (pypi-uri "notebook" version))
7791 (sha256
7792 (base32
7793 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7794 (build-system python-build-system)
7795 (arguments
7796 `(#:phases
7797 (modify-phases %standard-phases
7798 (replace 'check
7799 (lambda _
7800 ;; These tests require a browser
7801 (delete-file-recursively "notebook/tests/selenium")
7802 ;; Some tests need HOME
7803 (setenv "HOME" "/tmp")
7804 ;; This file contains "warningfilters", which are not supported
7805 ;; by this version of nose.
7806 (delete-file "setup.cfg")
7807 (with-directory-excursion "/tmp"
7808 (invoke "nosetests" "-v"))
7809 #t)))))
7810 (propagated-inputs
7811 `(("python-jupyter-core" ,python-jupyter-core)
7812 ("python-nbformat" ,python-nbformat)
7813 ("python-nbconvert" ,python-nbconvert)
7814 ("python-prometheus-client" ,python-prometheus-client)
7815 ("python-send2trash" ,python-send2trash)
7816 ("python-terminado" ,python-terminado)))
7817 (native-inputs
7818 `(("python-nose" ,python-nose)
7819 ("python-sphinx" ,python-sphinx)
7820 ("python-requests" ,python-requests)))
7821 (home-page "http://jupyter.org/")
7822 (synopsis "Web-based notebook environment for interactive computing")
7823 (description
7824 "The Jupyter HTML notebook is a web-based notebook environment for
7825 interactive computing.")
7826 (properties `((python2-variant . ,(delay python2-notebook))))
7827 (license license:bsd-3)))
7828
7829 (define-public python2-notebook
7830 (let ((base (package-with-python2
7831 (strip-python2-variant python-notebook))))
7832 (package (inherit base)
7833 (native-inputs
7834 `(("python2-mock" ,python2-mock)
7835 ,@(package-native-inputs base)))
7836 (arguments
7837 (substitute-keyword-arguments (package-arguments base)
7838 ((#:phases phases)
7839 `(modify-phases ,phases
7840 (add-before 'check 'disable-test-case
7841 ;; The test requires network access to localhost. Curiously it
7842 ;; fails with Python 2 only. Simply make the test-case return
7843 ;; immediately.
7844 (lambda _
7845 (substitute*
7846 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7847 (("formats = self.nbconvert_api") "return #")))))))))))
7848
7849 (define-public python-widgetsnbextension
7850 (package
7851 (name "python-widgetsnbextension")
7852 (version "3.4.2")
7853 (source
7854 (origin
7855 (method url-fetch)
7856 (uri (pypi-uri "widgetsnbextension" version))
7857 (sha256
7858 (base32
7859 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7860 (build-system python-build-system)
7861 (propagated-inputs
7862 `(("python-ipykernel" ,python-ipykernel)
7863 ("python-notebook" ,python-notebook)))
7864 (native-inputs
7865 `(("python-certifi" ,python-certifi)
7866 ("python-nose" ,python-nose)))
7867 (home-page "https://ipython.org")
7868 (synopsis "IPython HTML widgets for Jupyter")
7869 (description "This package provides interactive HTML widgets for Jupyter
7870 notebooks.")
7871 (license license:bsd-3)))
7872
7873 (define-public python2-widgetsnbextension
7874 (package-with-python2 python-widgetsnbextension))
7875
7876 (define-public python-ipywidgets
7877 (package
7878 (name "python-ipywidgets")
7879 (version "5.2.2")
7880 (source
7881 (origin
7882 (method url-fetch)
7883 (uri (pypi-uri "ipywidgets" version))
7884 (sha256
7885 (base32
7886 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7887 (build-system python-build-system)
7888 (propagated-inputs
7889 `(("python-ipython" ,python-ipython)
7890 ("python-traitlets" ,python-traitlets)
7891 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7892 (native-inputs
7893 `(("python-nose" ,python-nose)
7894 ("python-pytest" ,python-pytest)))
7895 (home-page "https://ipython.org")
7896 (synopsis "IPython HTML widgets for Jupyter")
7897 (description "Ipywidgets are interactive HTML widgets for Jupyter
7898 notebooks and the IPython kernel. Notebooks come alive when interactive
7899 widgets are used. Users gain control of their data and can visualize changes
7900 in the data.")
7901 (license license:bsd-3)))
7902
7903 (define-public python2-ipywidgets
7904 (package-with-python2 python-ipywidgets))
7905
7906 (define-public python-jupyter-console
7907 (package
7908 (name "python-jupyter-console")
7909 (version "6.0.0")
7910 (source
7911 (origin
7912 (method url-fetch)
7913 (uri (pypi-uri "jupyter_console" version))
7914 (sha256
7915 (base32
7916 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7917 (build-system python-build-system)
7918 (propagated-inputs
7919 `(("python-ipykernel" ,python-ipykernel)
7920 ("python-jupyter-client" ,python-jupyter-client)
7921 ("python-prompt-toolkit" ,python-prompt-toolkit)
7922 ("python-pygments" ,python-pygments)))
7923 (native-inputs
7924 `(("python-nose" ,python-nose)))
7925 (home-page "https://jupyter.org")
7926 (synopsis "Jupyter terminal console")
7927 (description "This package provides a terminal-based console frontend for
7928 Jupyter kernels. It also allows for console-based interaction with non-Python
7929 Jupyter kernels such as IJulia and IRKernel.")
7930 (license license:bsd-3)))
7931
7932 (define-public python2-jupyter-console
7933 (package
7934 (name "python2-jupyter-console")
7935 (version "5.2.0")
7936 (source
7937 (origin
7938 (method url-fetch)
7939 (uri (pypi-uri "jupyter_console" version))
7940 (sha256
7941 (base32
7942 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7943 (build-system python-build-system)
7944 ;; Tests only run in an TTY.
7945 (arguments `(#:tests? #f))
7946 (propagated-inputs
7947 `(("python2-ipykernel" ,python2-ipykernel)
7948 ("python2-jupyter-client" ,python2-jupyter-client)
7949 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7950 ("python2-pygments" ,python2-pygments)))
7951 (native-inputs
7952 `(("python2-nose" ,python2-nose)))
7953 (home-page "https://jupyter.org")
7954 (synopsis "Jupyter terminal console")
7955 (description "This package provides a terminal-based console frontend for
7956 Jupyter kernels. It also allows for console-based interaction with non-Python
7957 Jupyter kernels such as IJulia and IRKernel.")
7958 (license license:bsd-3)))
7959
7960 ;; The python-ipython and python-jupyter-console require each other. To get
7961 ;; the functionality in both packages working, strip down the
7962 ;; python-jupyter-console package when using it as an input to python-ipython.
7963 (define python-jupyter-console-minimal
7964 (package
7965 (inherit python-jupyter-console)
7966 (name "python-jupyter-console-minimal")
7967 (arguments
7968 (substitute-keyword-arguments
7969 (package-arguments python-jupyter-console)
7970 ((#:phases phases)
7971 `(modify-phases ,phases
7972 (add-after 'install 'delete-bin
7973 (lambda* (#:key outputs #:allow-other-keys)
7974 ;; Delete the bin files, to avoid conflicts in profiles
7975 ;; where python-ipython and python-jupyter-console are
7976 ;; both present.
7977 (delete-file-recursively
7978 (string-append
7979 (assoc-ref outputs "out") "/bin"))))))))
7980 ;; Remove the python-ipython propagated input, to avoid the cycle
7981 (propagated-inputs
7982 (alist-delete
7983 "python-ipython"
7984 (package-propagated-inputs python-jupyter-console)))))
7985
7986 (define-public python-qtconsole
7987 (package
7988 (name "python-qtconsole")
7989 (version "4.4.3")
7990 (source
7991 (origin
7992 (method url-fetch)
7993 (uri (pypi-uri "qtconsole" version))
7994 (sha256
7995 (base32
7996 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7997 (build-system python-build-system)
7998 (arguments
7999 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8000 ;; but we only have the LTS version 5.x. This means that there might be
8001 ;; runtime errors, but since this is a dependency of the Jupyter package,
8002 ;; and Jupyter can be used without the qtconsole we can overlook this for
8003 ;; now.
8004 `(#:tests? #f
8005 #:phases
8006 (modify-phases %standard-phases
8007 (add-before 'check 'pre-check
8008 (lambda _
8009 (setenv "QT_QPA_PLATFORM" "offscreen")
8010 #t)))))
8011 (propagated-inputs
8012 `(("python-ipykernel" ,python-ipykernel)
8013 ("python-ipython" ,python-ipython)))
8014 (native-inputs
8015 `(("python-pytest" ,python-pytest)))
8016 (home-page "http://jupyter.org")
8017 (synopsis "Jupyter Qt console")
8018 (description "This package provides a Qt-based console for Jupyter with
8019 support for rich media output.")
8020 (license license:bsd-3)))
8021
8022 (define-public python-jsbeautifier
8023 (package
8024 (name "python-jsbeautifier")
8025 (version "1.10.2")
8026 (home-page "https://github.com/beautify-web/js-beautify")
8027 (source (origin
8028 (method git-fetch)
8029 (uri (git-reference
8030 (url home-page)
8031 (commit (string-append "v" version))))
8032 (file-name (git-file-name name version))
8033 (sha256
8034 (base32
8035 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8036 (build-system python-build-system)
8037 (arguments
8038 `(#:phases (modify-phases %standard-phases
8039 (add-after 'unpack 'chdir
8040 (lambda _
8041 ;; The upstream Git repository contains all the code,
8042 ;; but this package only builds the python code.
8043 (chdir "python")
8044 #t))
8045 (add-after 'unpack 'patch-python-six-requirements
8046 (lambda _
8047 (substitute* "python/setup.py"
8048 (("six>=1.12.0")
8049 "six>=1.11.0"))
8050 #t)))))
8051 (propagated-inputs
8052 `(("python-editorconfig" ,python-editorconfig)
8053 ("python-six" ,python-six)))
8054 (native-inputs
8055 `(("python-pytest" ,python-pytest)))
8056 (synopsis "JavaScript unobfuscator and beautifier")
8057 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8058 popular online obfuscators.")
8059 (license license:expat)))
8060
8061 (define-public jupyter
8062 (package
8063 (name "jupyter")
8064 (version "1.0.0")
8065 (source
8066 (origin
8067 (method url-fetch)
8068 (uri (pypi-uri "jupyter" version))
8069 (sha256
8070 (base32
8071 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8072 (build-system python-build-system)
8073 (arguments '(#:tests? #f)) ; there are none.
8074 (propagated-inputs
8075 `(("python-ipykernel" ,python-ipykernel)
8076 ("python-ipywidgets" ,python-ipywidgets)
8077 ("python-jupyter-console" ,python-jupyter-console)
8078 ("python-nbconvert" ,python-nbconvert)
8079 ("python-notebook" ,python-notebook)
8080 ("python-qtconsole" ,python-qtconsole)))
8081 (native-search-paths
8082 (list (search-path-specification
8083 (variable "JUPYTER_PATH")
8084 (files '("share/jupyter")))))
8085 (home-page "https://jupyter.org")
8086 (synopsis "Web application for interactive documents")
8087 (description
8088 "The Jupyter Notebook is a web application that allows you to create and
8089 share documents that contain live code, equations, visualizations and
8090 explanatory text. Uses include: data cleaning and transformation, numerical
8091 simulation, statistical modeling, machine learning and much more.")
8092 (license license:bsd-3)))
8093
8094 (define-public python-chardet
8095 (package
8096 (name "python-chardet")
8097 (version "3.0.4")
8098 (source
8099 (origin
8100 (method url-fetch)
8101 (uri (pypi-uri "chardet" version))
8102 (sha256
8103 (base32
8104 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8105 (native-inputs
8106 `(("python-hypothesis" ,python-hypothesis)
8107 ("python-pytest" ,python-pytest)
8108 ("python-pytest-runner" ,python-pytest-runner)))
8109 (build-system python-build-system)
8110 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8111 (arguments `(#:tests? #f))
8112 (home-page "https://github.com/chardet/chardet")
8113 (synopsis "Universal encoding detector for Python 2 and 3")
8114 (description
8115 "This package provides @code{chardet}, a Python module that can
8116 automatically detect a wide range of file encodings.")
8117 (license license:lgpl2.1+)))
8118
8119 (define-public python2-chardet
8120 (package-with-python2 python-chardet))
8121
8122 (define-public python-docopt
8123 (package
8124 (name "python-docopt")
8125 (version "0.6.2")
8126 (source
8127 (origin
8128 (method git-fetch)
8129 ;; The release on PyPI does not include tests.
8130 (uri (git-reference
8131 (url "https://github.com/docopt/docopt")
8132 (commit version)))
8133 (file-name (git-file-name name version))
8134 (sha256
8135 (base32
8136 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
8137 (build-system python-build-system)
8138 (native-inputs
8139 `(("python-pytest" ,python-pytest)))
8140 (arguments
8141 `(#:phases
8142 (modify-phases %standard-phases
8143 (replace 'check
8144 (lambda _ (invoke "py.test"))))))
8145 (home-page "http://docopt.org")
8146 (synopsis "Command-line interface description language for Python")
8147 (description "This library allows the user to define a command-line
8148 interface from a program's help message rather than specifying it
8149 programmatically with command-line parsers like @code{getopt} and
8150 @code{argparse}.")
8151 (license license:expat)))
8152
8153 (define-public python2-docopt
8154 (package-with-python2 python-docopt))
8155
8156 (define-public python-pythondialog
8157 (package
8158 (name "python-pythondialog")
8159 (version "3.4.0")
8160 (source
8161 (origin
8162 (method url-fetch)
8163 (uri (pypi-uri "pythondialog" version))
8164 (sha256
8165 (base32
8166 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8167 (build-system python-build-system)
8168 (arguments
8169 `(#:phases
8170 (modify-phases %standard-phases
8171 (add-after 'unpack 'patch-path
8172 (lambda* (#:key inputs #:allow-other-keys)
8173 (let* ((dialog (assoc-ref inputs "dialog")))
8174 ;; Since this library really wants to grovel the search path, we
8175 ;; must hardcode dialog's store path into it.
8176 (substitute* "dialog.py"
8177 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8178 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8179 #t))))
8180 #:tests? #f)) ; no test suite
8181 (propagated-inputs
8182 `(("dialog" ,dialog)))
8183 (home-page "http://pythondialog.sourceforge.net/")
8184 (synopsis "Python interface to the UNIX dialog utility")
8185 (description "A Python wrapper for the dialog utility. Its purpose is to
8186 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8187 This allows one to make simple text-mode user interfaces on Unix-like systems")
8188 (license license:lgpl2.1)
8189 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8190
8191 (define-public python2-pythondialog
8192 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8193 (package
8194 (inherit base)
8195 (version (package-version python-pythondialog))
8196 (source (origin
8197 (method url-fetch)
8198 (uri (pypi-uri "python2-pythondialog" version))
8199 (sha256
8200 (base32
8201 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8202
8203 (define-public python-configobj
8204 (package
8205 (name "python-configobj")
8206 (version "5.0.6")
8207 (source (origin
8208 (method url-fetch)
8209 (uri (pypi-uri "configobj" version))
8210 (sha256
8211 (base32
8212 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8213 ;; Patch setup.py so it looks for python-setuptools, which is
8214 ;; required to parse the keyword 'install_requires' in setup.py.
8215 (patches (search-patches "python-configobj-setuptools.patch"))))
8216 (build-system python-build-system)
8217 (propagated-inputs
8218 `(("python-six" ,python-six)))
8219 (synopsis "Config file reading, writing and validation")
8220 (description "ConfigObj is a simple but powerful config file reader and
8221 writer: an ini file round tripper. Its main feature is that it is very easy to
8222 use, with a straightforward programmer’s interface and a simple syntax for
8223 config files.")
8224 (home-page "https://github.com/DiffSK/configobj")
8225 (license license:bsd-3)))
8226
8227 (define-public python2-configobj
8228 (package-with-python2 python-configobj))
8229
8230 (define-public python-configargparse
8231 (package
8232 (name "python-configargparse")
8233 (version "0.14.0")
8234 (source (origin
8235 (method url-fetch)
8236 (uri (pypi-uri "ConfigArgParse" version))
8237 (sha256
8238 (base32
8239 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8240 (build-system python-build-system)
8241 (native-inputs
8242 `(("python-pyyaml" ,python-pyyaml)))
8243 (arguments
8244 `(#:phases
8245 (modify-phases %standard-phases
8246 (replace 'check
8247 (lambda _
8248 ;; Bypass setuptools-shim because one test relies on "setup.py"
8249 ;; being the first argument passed to the python call.
8250 ;;
8251 ;; NOTE: Many tests do not run because they rely on Python's
8252 ;; built-in test.test_argparse, but we remove the unit tests from
8253 ;; our Python installation.
8254 (invoke "python" "setup.py" "test"))))))
8255 (synopsis "Replacement for argparse")
8256 (description "A drop-in replacement for argparse that allows options to also
8257 be set via config files and/or environment variables.")
8258 (home-page "https://github.com/bw2/ConfigArgParse")
8259 (license license:expat)))
8260
8261 (define-public python2-configargparse
8262 (package-with-python2 python-configargparse))
8263
8264 (define-public python-argparse-manpage
8265 (package
8266 (name "python-argparse-manpage")
8267 (version "1.1")
8268 (source
8269 (origin
8270 (method url-fetch)
8271 (uri (pypi-uri "argparse-manpage" version))
8272 (sha256
8273 (base32
8274 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8275 (build-system python-build-system)
8276 (home-page "https://github.com/praiskup/argparse-manpage")
8277 (synopsis "Build manual page from Python's ArgumentParser object")
8278 (description
8279 "This package provides tools to build manual pages from Python's
8280 @code{ArgumentParser} object.")
8281 (license license:asl2.0)))
8282
8283 (define-public python-contextlib2
8284 (package
8285 (name "python-contextlib2")
8286 (version "0.5.5")
8287 (source
8288 (origin
8289 (method url-fetch)
8290 (uri (pypi-uri "contextlib2" version))
8291 (sha256
8292 (base32
8293 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8294 (build-system python-build-system)
8295 (home-page "http://contextlib2.readthedocs.org/")
8296 (synopsis "Tools for decorators and context managers")
8297 (description "This module is primarily a backport of the Python
8298 3.2 contextlib to earlier Python versions. Like contextlib, it
8299 provides utilities for common tasks involving decorators and context
8300 managers. It also contains additional features that are not part of
8301 the standard library.")
8302 (properties `((python2-variant . ,(delay python2-contextlib2))))
8303 (license license:psfl)))
8304
8305 (define-public python2-contextlib2
8306 (let ((base (package-with-python2
8307 (strip-python2-variant python-contextlib2))))
8308 (package
8309 (inherit base)
8310 (arguments
8311 (substitute-keyword-arguments (package-arguments base)
8312 ((#:phases phases)
8313 `(modify-phases ,phases
8314 (replace 'check
8315 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8316 (native-inputs
8317 `(("python2-unittest2" ,python2-unittest2))))))
8318
8319 ;; This package is used by python2-pytest via python2-importlib-metadata,
8320 ;; and thus can not depend on python-unittest2 (which depends on pytest).
8321 (define-public python2-contextlib2-bootstrap
8322 (hidden-package
8323 (package/inherit
8324 python2-contextlib2
8325 (name "python2-contextlib2-bootstrap")
8326 (arguments
8327 `(#:tests? #f
8328 ,@(package-arguments python2-contextlib2)))
8329 (native-inputs '()))))
8330
8331 (define-public python-texttable
8332 (package
8333 (name "python-texttable")
8334 (version "0.9.1")
8335 (source
8336 (origin
8337 (method url-fetch)
8338 (uri (pypi-uri "texttable" version))
8339 (sha256
8340 (base32
8341 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8342 (build-system python-build-system)
8343 (arguments '(#:tests? #f)) ; no tests
8344 (home-page "https://github.com/foutaise/texttable/")
8345 (synopsis "Python module for creating simple ASCII tables")
8346 (description "Texttable is a Python module for creating simple ASCII
8347 tables.")
8348 (license license:lgpl2.1+)))
8349
8350 (define-public python2-texttable
8351 (package-with-python2 python-texttable))
8352
8353 (define-public python-atomicwrites
8354 (package
8355 (name "python-atomicwrites")
8356 (version "1.3.0")
8357 (source (origin
8358 (method url-fetch)
8359 (uri (pypi-uri "atomicwrites" version))
8360 (sha256
8361 (base32
8362 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8363 (build-system python-build-system)
8364 (synopsis "Atomic file writes in Python")
8365 (description "Library for atomic file writes using platform dependent tools
8366 for atomic file system operations.")
8367 (home-page "https://github.com/untitaker/python-atomicwrites")
8368 (license license:expat)))
8369
8370 (define-public python2-atomicwrites
8371 (package-with-python2 python-atomicwrites))
8372
8373 (define-public python-click-threading
8374 (package
8375 (name "python-click-threading")
8376 (version "0.4.4")
8377 (source (origin
8378 (method url-fetch)
8379 (uri (pypi-uri "click-threading" version))
8380 (sha256
8381 (base32
8382 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8383 (build-system python-build-system)
8384 (propagated-inputs
8385 `(("python-click" ,python-click)))
8386 (synopsis "Utilities for multithreading in Click")
8387 (description "This package provides utilities for multithreading in Click
8388 applications.")
8389 (home-page "https://github.com/click-contrib/click-threading")
8390 (license license:expat)))
8391
8392 (define-public python-click-log
8393 (package
8394 (name "python-click-log")
8395 (version "0.3.2")
8396 (source (origin
8397 (method url-fetch)
8398 (uri (pypi-uri "click-log" version))
8399 (sha256
8400 (base32
8401 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8402 (build-system python-build-system)
8403 (propagated-inputs
8404 `(("python-click" ,python-click)))
8405 (synopsis "Logging for click applications")
8406 (description "This package provides a Python library for logging Click
8407 applications.")
8408 (home-page "https://github.com/click-contrib/click-log")
8409 (license license:expat)))
8410
8411 (define-public python-apipkg
8412 (package
8413 (name "python-apipkg")
8414 (version "1.4")
8415 (source (origin
8416 (method url-fetch)
8417 (uri (pypi-uri "apipkg" version))
8418 (sha256
8419 (base32
8420 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8421 (build-system python-build-system)
8422 (native-inputs
8423 `(("python-pytest" ,python-pytest)))
8424 (synopsis "Namespace control and lazy-import mechanism")
8425 (description "With apipkg you can control the exported namespace of a Python
8426 package and greatly reduce the number of imports for your users. It is a small
8427 pure Python module that works on virtually all Python versions.")
8428 (home-page "https://github.com/pytest-dev/apipkg")
8429 (license license:expat)))
8430
8431 (define-public python2-apipkg
8432 (package-with-python2 python-apipkg))
8433
8434 (define-public python-execnet
8435 (package
8436 (name "python-execnet")
8437 (version "1.4.1")
8438 (source (origin
8439 (method url-fetch)
8440 (uri (pypi-uri "execnet" version))
8441 (sha256
8442 (base32
8443 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8444 (build-system python-build-system)
8445 (arguments
8446 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8447 ;; The two test failures are caused by the lack of an `ssh` executable.
8448 ;; The test suite can be run with pytest after the 'install' phase.
8449 #:tests? #f))
8450 (native-inputs
8451 `(("python-pytest" ,python-pytest)
8452 ("python-setuptools-scm" ,python-setuptools-scm)))
8453 (propagated-inputs
8454 `(("python-apipkg" ,python-apipkg)))
8455 (synopsis "Rapid multi-Python deployment")
8456 (description "Execnet provides a share-nothing model with
8457 channel-send/receive communication for distributing execution across many
8458 Python interpreters across version, platform and network barriers. It has a
8459 minimal and fast API targeting the following uses:
8460 @enumerate
8461 @item distribute tasks to (many) local or remote CPUs
8462 @item write and deploy hybrid multi-process applications
8463 @item write scripts to administer multiple environments
8464 @end enumerate")
8465 (home-page "http://codespeak.net/execnet/")
8466 (license license:expat)))
8467
8468 (define-public python2-execnet
8469 (package-with-python2 python-execnet))
8470
8471 (define-public python-icalendar
8472 (package
8473 (name "python-icalendar")
8474 (version "4.0.4")
8475 (source (origin
8476 (method url-fetch)
8477 (uri (pypi-uri "icalendar" version))
8478 (sha256
8479 (base32
8480 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8481 (build-system python-build-system)
8482 (propagated-inputs
8483 `(("python-dateutil" ,python-dateutil)
8484 ("python-pytz" ,python-pytz)))
8485 (synopsis "Python library for parsing iCalendar files")
8486 (description "The icalendar package is a parser/generator of iCalendar
8487 files for use with Python.")
8488 (home-page "https://github.com/collective/icalendar")
8489 (license license:bsd-2)))
8490
8491 (define-public python-args
8492 (package
8493 (name "python-args")
8494 (version "0.1.0")
8495 (source (origin
8496 (method url-fetch)
8497 (uri (pypi-uri "args" version))
8498 (sha256
8499 (base32
8500 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8501 (build-system python-build-system)
8502 (home-page "https://github.com/kennethreitz/args")
8503 (synopsis "Command-line argument parser")
8504 (description
8505 "This library provides a Python module to parse command-line arguments.")
8506 (license license:bsd-3)))
8507
8508 (define-public python2-args
8509 (package-with-python2 python-args))
8510
8511 (define-public python-clint
8512 (package
8513 (name "python-clint")
8514 (version "0.5.1")
8515 (source (origin
8516 (method url-fetch)
8517 (uri (pypi-uri "clint" version))
8518 (sha256
8519 (base32
8520 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8521 (build-system python-build-system)
8522 (arguments
8523 '(#:phases
8524 (modify-phases %standard-phases
8525 (replace 'check
8526 (lambda _ (invoke "py.test" "-v"))))))
8527 (native-inputs
8528 `(("python-pytest" ,python-pytest)))
8529 (propagated-inputs
8530 `(("python-args" ,python-args)))
8531 (home-page "https://github.com/kennethreitz/clint")
8532 (synopsis "Command-line interface tools")
8533 (description
8534 "Clint is a Python module filled with a set of tools for developing
8535 command-line applications, including tools for colored and indented
8536 output, progress bar display, and pipes.")
8537 (license license:isc)))
8538
8539 (define-public python2-clint
8540 (package-with-python2 python-clint))
8541
8542 (define-public python-rply
8543 (package
8544 (name "python-rply")
8545 (version "0.7.5")
8546 (source (origin
8547 (method url-fetch)
8548 (uri (pypi-uri "rply" version))
8549 (sha256
8550 (base32
8551 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8552 (build-system python-build-system)
8553 (propagated-inputs
8554 `(("python-appdirs" ,python-appdirs)))
8555 (home-page "https://github.com/alex/rply")
8556 (synopsis "Parser generator for Python")
8557 (description
8558 "This package provides a pure Python based parser generator, that also
8559 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8560 with a new public API, and RPython support.")
8561 (license license:bsd-3)))
8562
8563 (define-public python2-rply
8564 (package-with-python2 python-rply))
8565
8566 (define-public python-hy
8567 (package
8568 (name "python-hy")
8569 (version "0.17.0")
8570 (source (origin
8571 (method url-fetch)
8572 (uri (pypi-uri "hy" version))
8573 (sha256
8574 (base32
8575 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
8576 (build-system python-build-system)
8577 (arguments
8578 '(#:phases
8579 (modify-phases %standard-phases
8580 (add-before 'install 'set-HOME
8581 (lambda _
8582 (setenv "HOME" "/tmp")))
8583 (replace 'check
8584 (lambda _
8585 ;; Tests require write access to HOME.
8586 (setenv "HOME" "/tmp")
8587 (invoke "nosetests"))))))
8588 (native-inputs
8589 `(("python-coverage" ,python-coverage)
8590 ("python-nose" ,python-nose)))
8591 (propagated-inputs
8592 `(("python-astor" ,python-astor)
8593 ("python-clint" ,python-clint)
8594 ("python-rply" ,python-rply)
8595 ("python-fastentrypoints"
8596 ,python-fastentrypoints)
8597 ("python-funcparserlib"
8598 ,python-funcparserlib)))
8599 (home-page "http://hylang.org/")
8600 (synopsis "Lisp frontend to Python")
8601 (description
8602 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8603 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8604 Python at your fingertips, in Lisp form.")
8605 (license license:expat)))
8606
8607 (define-public python2-hy
8608 (package-with-python2 python-hy))
8609
8610 (define-public python2-functools32
8611 (package
8612 (name "python2-functools32")
8613 (version "3.2.3-2")
8614 (source
8615 (origin
8616 (method url-fetch)
8617 (uri (pypi-uri "functools32" version))
8618 (sha256
8619 (base32
8620 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8621 (build-system python-build-system)
8622 (arguments
8623 `(#:python ,python-2
8624 #:tests? #f)) ; no test target
8625 (home-page "https://github.com/MiCHiLU/python-functools32")
8626 (synopsis
8627 "Backport of the functools module from Python 3.2.3")
8628 (description
8629 "This package is a backport of the @code{functools} module from Python
8630 3.2.3 for use with older versions of Python and PyPy.")
8631 (license license:expat)))
8632
8633 (define-public python2-subprocess32
8634 (package
8635 (name "python2-subprocess32")
8636 (version "3.2.7")
8637 (source (origin
8638 (method url-fetch)
8639 (uri (pypi-uri "subprocess32" version))
8640 (sha256
8641 (base32
8642 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8643 (patches
8644 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8645 (build-system python-build-system)
8646 (arguments
8647 `(#:python ,python-2
8648 ;; The test suite fails with Python > 2.7.13:
8649 ;; import test.support
8650 ;; ImportError: No module named support
8651 #:tests? #f
8652 #:phases
8653 (modify-phases %standard-phases
8654 (add-after 'unpack 'patch-/bin/sh
8655 (lambda _
8656 (substitute* '("subprocess32.py"
8657 "test_subprocess32.py")
8658 (("/bin/sh") (which "sh")))
8659 #t)))))
8660 (home-page "https://github.com/google/python-subprocess32")
8661 (synopsis "Backport of the subprocess module from Python 3.2")
8662 (description
8663 "This is a backport of the @code{subprocess} standard library module
8664 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8665 new features. On POSIX systems it is guaranteed to be reliable when used
8666 in threaded applications. It includes timeout support from Python 3.3 but
8667 otherwise matches 3.2’s API.")
8668 (license license:psfl)))
8669
8670 (define-public python2-futures
8671 (package
8672 (name "python2-futures")
8673 (version "3.2.0")
8674 (source
8675 (origin
8676 (method url-fetch)
8677 (uri (pypi-uri "futures" version))
8678 (sha256
8679 (base32
8680 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8681 (build-system python-build-system)
8682 (arguments
8683 `(#:python ,python-2
8684 #:phases
8685 (modify-phases %standard-phases
8686 (replace 'check
8687 (lambda _
8688 (invoke "python" "test_futures.py")
8689 #t)))))
8690 (home-page "https://github.com/agronholm/pythonfutures")
8691 (synopsis
8692 "Backport of the concurrent.futures package from Python 3.2")
8693 (description
8694 "The concurrent.futures module provides a high-level interface for
8695 asynchronously executing callables. This package backports the
8696 concurrent.futures package from Python 3.2")
8697 (license license:bsd-3)))
8698
8699 (define-public python-promise
8700 (package
8701 (name "python-promise")
8702 (version "0.4.2")
8703 (source
8704 (origin
8705 (method url-fetch)
8706 (uri (pypi-uri "promise" version))
8707 (sha256
8708 (base32
8709 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8710 (build-system python-build-system)
8711 ;; Tests wants python-futures, which is a python2 only program, and
8712 ;; can't be found by python-promise at test time.
8713 (arguments `(#:tests? #f))
8714 (home-page "https://github.com/syrusakbary/promise")
8715 (synopsis "Promises/A+ implementation for Python")
8716 (description
8717 "Promises/A+ implementation for Python")
8718 (properties `((python2-variant . ,(delay python2-promise))))
8719 (license license:expat)))
8720
8721 (define-public python2-promise
8722 (let ((promise (package-with-python2
8723 (strip-python2-variant python-promise))))
8724 (package (inherit promise)
8725 (arguments (substitute-keyword-arguments (package-arguments promise)
8726 ((#:tests? _) #t)))
8727 (native-inputs
8728 `(("python2-futures" ,python2-futures)
8729 ("python2-pytest" ,python2-pytest)
8730 ,@(package-native-inputs promise))))))
8731
8732 (define-public python-progressbar33
8733 (package
8734 (name "python-progressbar33")
8735 (version "2.4")
8736 (source
8737 (origin
8738 (method url-fetch)
8739 (uri (pypi-uri "progressbar33" version))
8740 (sha256
8741 (base32
8742 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8743 (build-system python-build-system)
8744 (home-page "http://github.com/germangh/python-progressbar")
8745 (synopsis "Text progress bar library for Python")
8746 (description
8747 "This package provides a text progress bar library for Python. This
8748 version only differs from the original @code{progressbar} package in that it
8749 uses relative package imports instead of absolute imports, which is necessary
8750 for the module to work under Python 3.3.")
8751 ;; Either or both of these licenses may be selected.
8752 (license (list license:lgpl2.1+ license:bsd-3))))
8753
8754 (define-public python-colorama
8755 (package
8756 (name "python-colorama")
8757 (version "0.3.9")
8758 (source
8759 (origin
8760 (method url-fetch)
8761 (uri (pypi-uri "colorama" version))
8762 (sha256
8763 (base32
8764 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8765 (build-system python-build-system)
8766 (synopsis "Colored terminal text rendering for Python")
8767 (description "Colorama is a Python library for rendering colored terminal
8768 text.")
8769 (home-page "https://pypi.python.org/pypi/colorama")
8770 (license license:bsd-3)))
8771
8772 (define-public python2-colorama
8773 (package-with-python2 python-colorama))
8774
8775 (define-public python-rsa
8776 (package
8777 (name "python-rsa")
8778 (version "3.4.2")
8779 (source
8780 (origin
8781 (method url-fetch)
8782 (uri (pypi-uri "rsa" version))
8783 (sha256
8784 (base32
8785 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8786 (build-system python-build-system)
8787 (propagated-inputs
8788 `(("python-pyasn1" ,python-pyasn1)))
8789 (synopsis "Pure-Python RSA implementation")
8790 (description "Python-RSA is a pure-Python RSA implementation. It supports
8791 encryption and decryption, signing and verifying signatures, and key
8792 generation according to PKCS#1 version 1.5. It can be used as a Python
8793 library as well as on the command line.")
8794 (home-page "https://stuvel.eu/rsa")
8795 (license license:asl2.0)))
8796
8797 (define-public python2-rsa
8798 (package-with-python2 python-rsa))
8799
8800 (define-public python-pluggy
8801 (package
8802 (name "python-pluggy")
8803 (version "0.13.1")
8804 (source
8805 (origin
8806 (method url-fetch)
8807 (uri (pypi-uri "pluggy" version))
8808 (sha256
8809 (base32
8810 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
8811 (build-system python-build-system)
8812 (native-inputs
8813 `(("python-setuptools-scm" ,python-setuptools-scm)))
8814 (synopsis "Plugin and hook calling mechanism for Python")
8815 (description "Pluggy is an extraction of the plugin manager as used by
8816 Pytest but stripped of Pytest specific details.")
8817 (home-page "https://pypi.python.org/pypi/pluggy")
8818 (properties `((python2-variant . ,(delay python2-pluggy))))
8819 (license license:expat)))
8820
8821 (define-public python2-pluggy
8822 (let ((base (package-with-python2 (strip-python2-variant
8823 python-pluggy))))
8824 (package/inherit
8825 base
8826 (propagated-inputs
8827 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
8828
8829 ;; This package requires python2-importlib-metadata, but that package
8830 ;; ends up needing python2-pluggy via python2-pytest, so we need this
8831 ;; variant to solve the circular dependency.
8832 (define-public python2-pluggy-bootstrap
8833 (hidden-package
8834 (package/inherit
8835 python2-pluggy
8836 (name "python2-pluggy-bootstrap")
8837 (arguments
8838 `(#:tests? #f
8839 ,@(package-arguments python2-pluggy)))
8840 (propagated-inputs
8841 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
8842
8843 (define-public python-tox
8844 (package
8845 (name "python-tox")
8846 (version "2.8.1")
8847 (source
8848 (origin
8849 (method url-fetch)
8850 (uri (pypi-uri "tox" version))
8851 (sha256
8852 (base32
8853 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8854 (build-system python-build-system)
8855 (arguments
8856 ;; FIXME: Tests require pytest-timeout, which itself requires
8857 ;; pytest>=2.8.0 for installation.
8858 '(#:tests? #f))
8859 (propagated-inputs
8860 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8861 ("python-py" ,python-py)
8862 ("python-virtualenv" ,python-virtualenv)))
8863 (native-inputs
8864 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8865 ("python-pytest" ,python-pytest) ; >= 2.3.5
8866 ("python-setuptools-scm" ,python-setuptools-scm)))
8867 (home-page "http://tox.testrun.org/")
8868 (synopsis "Virtualenv-based automation of test activities")
8869 (description "Tox is a generic virtualenv management and test command line
8870 tool. It can be used to check that a package installs correctly with
8871 different Python versions and interpreters, or run tests in each type of
8872 supported environment, or act as a frontend to continuous integration
8873 servers.")
8874 (license license:expat)))
8875
8876 (define-public python2-tox
8877 (package-with-python2 python-tox))
8878
8879 (define-public python-jmespath
8880 (package
8881 (name "python-jmespath")
8882 (version "0.9.4")
8883 (source
8884 (origin
8885 (method url-fetch)
8886 (uri (pypi-uri "jmespath" version))
8887 (sha256
8888 (base32
8889 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
8890 (build-system python-build-system)
8891 (native-inputs
8892 `(("python-nose" ,python-nose)))
8893 (synopsis "JSON Matching Expressions")
8894 (description "JMESPath (pronounced “james path”) is a Python library that
8895 allows one to declaratively specify how to extract elements from a JSON
8896 document.")
8897 (home-page "https://github.com/jmespath/jmespath.py")
8898 (license license:expat)))
8899
8900 (define-public python2-jmespath
8901 (package-with-python2 python-jmespath))
8902
8903 (define-public python-botocore
8904 (package
8905 (name "python-botocore")
8906 (version "1.12.149")
8907 (source
8908 (origin
8909 (method url-fetch)
8910 (uri (pypi-uri "botocore" version))
8911 (sha256
8912 (base32
8913 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8914 (build-system python-build-system)
8915 (arguments
8916 ;; FIXME: Many tests are failing.
8917 '(#:tests? #f))
8918 (propagated-inputs
8919 `(("python-dateutil" ,python-dateutil)
8920 ("python-docutils" ,python-docutils)
8921 ("python-jmespath" ,python-jmespath)))
8922 (native-inputs
8923 `(("python-mock" ,python-mock)
8924 ("python-nose" ,python-nose)
8925 ("behave" ,behave)
8926 ("python-tox" ,python-tox)
8927 ("python-urllib3" ,python-urllib3)
8928 ("python-wheel" ,python-wheel)))
8929 (home-page "https://github.com/boto/botocore")
8930 (synopsis "Low-level interface to AWS")
8931 (description "Botocore is a Python library that provides a low-level
8932 interface to the Amazon Web Services (AWS) API.")
8933 (license license:asl2.0)))
8934
8935 (define-public python2-botocore
8936 (package-with-python2 python-botocore))
8937
8938 (define-public python-xdo
8939 (package
8940 (name "python-xdo")
8941 (version "0.3")
8942 (source (origin
8943 (method url-fetch)
8944 (uri (string-append
8945 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8946 "python-xdo_" version ".orig.tar.gz"))
8947 (sha256
8948 (base32
8949 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8950 (build-system python-build-system)
8951 (arguments
8952 '(#:phases
8953 (modify-phases %standard-phases
8954 (add-before 'install 'patch-libxdo-path
8955 ;; Hardcode the path of dynamically loaded libxdo library.
8956 (lambda* (#:key inputs #:allow-other-keys)
8957 (let ((libxdo (string-append
8958 (assoc-ref inputs "xdotool")
8959 "/lib/libxdo.so")))
8960 (substitute* "xdo/_xdo.py"
8961 (("find_library\\(\"xdo\"\\)")
8962 (simple-format #f "\"~a\"" libxdo)))
8963 #t))))
8964 #:tests? #f)) ; no tests provided
8965 (propagated-inputs
8966 `(("python-six" ,python-six)))
8967 (inputs
8968 `(("xdotool" ,xdotool)
8969 ("libX11" ,libx11)))
8970 (home-page "https://tracker.debian.org/pkg/python-xdo")
8971 (synopsis "Python library for simulating X11 keyboard/mouse input")
8972 (description "Provides bindings to libxdo for manipulating X11 via simulated
8973 input. (Note that this is mostly a legacy library; you may wish to look at
8974 python-xdo for newer bindings.)")
8975 (license license:bsd-3)))
8976
8977 (define-public python2-xdo
8978 (package-with-python2 python-xdo))
8979
8980 (define-public python-mako
8981 (package
8982 (name "python-mako")
8983 (version "1.1.0")
8984 (source
8985 (origin
8986 (method url-fetch)
8987 (uri (pypi-uri "Mako" version))
8988 (sha256
8989 (base32
8990 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8991 (build-system python-build-system)
8992 (arguments
8993 `(#:phases (modify-phases %standard-phases
8994 (replace 'check
8995 (lambda* (#:key tests? #:allow-other-keys)
8996 (if tests?
8997 (invoke "nosetests" "-v")
8998 (format #t "test suite not run~%"))
8999 #t)))))
9000 (propagated-inputs
9001 `(("python-markupsafe" ,python-markupsafe)))
9002 (native-inputs
9003 `(("python-mock" ,python-mock)
9004 ("python-nose" ,python-nose)))
9005 (home-page "https://www.makotemplates.org/")
9006 (synopsis "Templating language for Python")
9007 (description "Mako is a templating language for Python that compiles
9008 templates into Python modules.")
9009 (license license:expat)))
9010
9011 (define-public python2-mako
9012 (package-with-python2 python-mako))
9013
9014 (define-public python-waitress
9015 (package
9016 (name "python-waitress")
9017 (version "1.1.0")
9018 (source
9019 (origin
9020 (method url-fetch)
9021 (uri (pypi-uri "waitress" version))
9022 (patches (search-patches "python-waitress-fix-tests.patch"))
9023 (sha256
9024 (base32
9025 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9026 (build-system python-build-system)
9027 (home-page "https://github.com/Pylons/waitress")
9028 (synopsis "Waitress WSGI server")
9029 (description "Waitress is meant to be a production-quality pure-Python WSGI
9030 server with very acceptable performance.")
9031 (license license:zpl2.1)))
9032
9033 (define-public python2-waitress
9034 (package-with-python2 python-waitress))
9035
9036 (define-public python-whichcraft
9037 (package
9038 (name "python-whichcraft")
9039 (version "0.6.1")
9040 (source
9041 (origin
9042 (method url-fetch)
9043 (uri (pypi-uri "whichcraft" version))
9044 (sha256
9045 (base32
9046 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9047 (build-system python-build-system)
9048 (native-inputs
9049 `(("python-pytest" ,python-pytest)))
9050 (home-page "https://github.com/pydanny/whichcraft")
9051 (synopsis "Cross-platform cross-python shutil.which functionality")
9052 (description
9053 "This package provides a shim of the shutil.which function that's
9054 designed to work across multiple versions of Python.")
9055 (license license:bsd-3)))
9056
9057 (define-public python-cookiecutter
9058 (package
9059 (name "python-cookiecutter")
9060 (version "1.6.0")
9061 (source
9062 (origin
9063 (method url-fetch)
9064 (uri (pypi-uri "cookiecutter" version))
9065 (sha256
9066 (base32
9067 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9068 (build-system python-build-system)
9069 (native-inputs
9070 `(("python-freezegun" ,python-freezegun)
9071 ("python-pytest" ,python-pytest)
9072 ("python-pytest-catchlog" ,python-pytest-catchlog)
9073 ("python-pytest-cov" ,python-pytest-cov)
9074 ("python-pytest-mock" ,python-pytest-mock)))
9075 (propagated-inputs
9076 `(("python-binaryornot" ,python-binaryornot)
9077 ("python-click" ,python-click)
9078 ("python-future" ,python-future)
9079 ("python-jinja2" ,python-jinja2)
9080 ("python-jinja2-time" ,python-jinja2-time)
9081 ("python-poyo" ,python-poyo)
9082 ("python-requests" ,python-requests)
9083 ("python-whichcraft" ,python-whichcraft)))
9084 (home-page "https://github.com/audreyr/cookiecutter")
9085 (synopsis
9086 "Command-line utility that creates projects from project templates")
9087 (description
9088 "This package provides a command-line utility that creates projects from
9089 project templates, e.g. creating a Python package project from a Python package
9090 project template.")
9091 (license license:bsd-3)))
9092
9093 (define-public python-pyquery
9094 (package
9095 (name "python-pyquery")
9096 (version "1.2.17")
9097 (source
9098 (origin
9099 (method url-fetch)
9100 (uri (pypi-uri "pyquery" version))
9101 (sha256
9102 (base32
9103 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9104 (build-system python-build-system)
9105 (native-inputs
9106 `(("python-webob" ,python-webob)
9107 ("python-webtest" ,python-webtest)))
9108 (propagated-inputs
9109 `(("python-lxml" ,python-lxml)
9110 ("python-cssselect" ,python-cssselect)))
9111 (home-page "https://github.com/gawel/pyquery")
9112 (synopsis "Make jQuery-like queries on xml documents")
9113 (description "pyquery allows you to make jQuery queries on xml documents.
9114 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9115 fast xml and html manipulation.")
9116 (license license:bsd-3)))
9117
9118 (define-public python-anyjson
9119 (package
9120 (name "python-anyjson")
9121 (version "0.3.3")
9122 (source
9123 (origin
9124 (method url-fetch)
9125 (uri (pypi-uri "anyjson" version))
9126 (sha256
9127 (base32
9128 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9129 (build-system python-build-system)
9130 (arguments
9131 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9132 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9133 ;; whatever) so this transformation needs to be done before the tests
9134 ;; can be run. Maybe we could add a build step to transform beforehand
9135 ;; but it could be annoying/difficult.
9136 ;; We can enable tests for the Python 2 version, though, and do below.
9137 #:tests? #f))
9138 (home-page "https://bitbucket.org/runeh/anyjson/")
9139 (synopsis
9140 "Wraps best available JSON implementation in a common interface")
9141 (description
9142 "Anyjson loads whichever is the fastest JSON module installed
9143 and provides a uniform API regardless of which JSON implementation is used.")
9144 (license license:bsd-3)
9145 (properties `((python2-variant . ,(delay python2-anyjson))))))
9146
9147 (define-public python2-anyjson
9148 (let ((anyjson (package-with-python2
9149 (strip-python2-variant python-anyjson))))
9150 (package
9151 (inherit anyjson)
9152 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9153 #:tests? #t
9154 ,@(package-arguments anyjson)))
9155 (native-inputs `(("python2-nose" ,python2-nose))))))
9156
9157 (define-public python-amqp
9158 (package
9159 (name "python-amqp")
9160 (version "2.3.2")
9161 (source
9162 (origin
9163 (method url-fetch)
9164 (uri (pypi-uri "amqp" version))
9165 (sha256
9166 (base32
9167 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9168 (build-system python-build-system)
9169 (native-inputs
9170 `(("python-case" ,python-case)
9171 ("python-pytest-sugar" ,python-pytest-sugar)
9172 ("python-mock" ,python-mock)))
9173 (propagated-inputs
9174 `(("python-vine" ,python-vine)))
9175 (home-page "https://github.com/celery/py-amqp")
9176 (synopsis
9177 "Low-level AMQP client for Python (fork of amqplib)")
9178 (description
9179 "This is a fork of amqplib which was originally written by Barry Pederson.
9180 It is maintained by the Celery project, and used by kombu as a pure python
9181 alternative when librabbitmq is not available.")
9182 (license license:lgpl2.1+)
9183 (properties `((python2-variant . ,(delay python2-amqp))))))
9184
9185 (define-public python2-amqp
9186 (let ((amqp (package-with-python2
9187 (strip-python2-variant python-amqp))))
9188 (package
9189 (inherit amqp)
9190 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9191 ;; unmaintained. Weirdly, does not do this on the python 3
9192 ;; version?
9193 #:tests? #f
9194 ,@(package-arguments amqp))))))
9195
9196 (define-public python-txamqp
9197 (package
9198 (name "python-txamqp")
9199 (version "0.8.2")
9200 (source
9201 (origin
9202 (method url-fetch)
9203 (uri (pypi-uri "txAMQP" version))
9204 (sha256
9205 (base32
9206 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9207 (build-system python-build-system)
9208 (propagated-inputs
9209 `(("python-six" ,python-six)
9210 ("python-twisted" ,python-twisted)))
9211 (home-page "https://github.com/txamqp/txamqp")
9212 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9213 (description
9214 "This package provides a Python library for communicating with AMQP peers
9215 and brokers using the asynchronous networking framework Twisted. It contains
9216 all the necessary code to connect, send and receive messages to/from an
9217 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9218 also includes support for using Thrift RPC over AMQP in Twisted
9219 applications.")
9220 (license license:asl2.0)))
9221
9222 (define-public python2-txamqp
9223 (package-with-python2 python-txamqp))
9224
9225 (define-public python-kombu
9226 (package
9227 (name "python-kombu")
9228 (version "4.2.2")
9229 (source
9230 (origin
9231 (method url-fetch)
9232 (uri (pypi-uri "kombu" version))
9233 (sha256
9234 (base32
9235 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9236 (build-system python-build-system)
9237 (native-inputs
9238 `(("python-mock" ,python-mock)
9239 ("python-case" ,python-case)
9240 ("python-pyro4" ,python-pyro4)
9241 ("python-pytest-sugar" ,python-pytest-sugar)
9242 ("python-pytz" ,python-pytz)))
9243 (propagated-inputs
9244 `(("python-anyjson" ,python-anyjson)
9245 ("python-amqp" ,python-amqp)
9246 ("python-redis" ,python-redis)))
9247 (home-page "https://kombu.readthedocs.io")
9248 (synopsis "Message passing library for Python")
9249 (description "The aim of Kombu is to make messaging in Python as easy as
9250 possible by providing an idiomatic high-level interface for the AMQ protocol,
9251 and also provide proven and tested solutions to common messaging problems.
9252 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9253 message orientation, queuing, routing, reliability and security, for which the
9254 RabbitMQ messaging server is the most popular implementation.")
9255 (license license:bsd-3)
9256 (properties `((python2-variant . ,(delay python2-kombu))))))
9257
9258 (define-public python2-kombu
9259 (let ((kombu (package-with-python2
9260 (strip-python2-variant python-kombu))))
9261 (package
9262 (inherit kombu)
9263 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9264 ;; It works fine on the python3 variant.
9265 #:tests? #f
9266 ,@(package-arguments kombu)))
9267 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9268 ,@(package-native-inputs kombu))))))
9269
9270 (define-public python-billiard
9271 (package
9272 (name "python-billiard")
9273 (version "3.5.0.5")
9274 (source
9275 (origin
9276 (method url-fetch)
9277 (uri (pypi-uri "billiard" version))
9278 (sha256
9279 (base32
9280 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9281 (build-system python-build-system)
9282 (native-inputs
9283 `(("python-case" ,python-case)
9284 ("python-pytest" ,python-pytest)))
9285 (home-page "https://github.com/celery/billiard")
9286 (synopsis
9287 "Python multiprocessing fork with improvements and bugfixes")
9288 (description
9289 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9290 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9291 pyprocessing package. This standalone variant is intended to be compatible with
9292 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9293 (license license:bsd-3)
9294 (properties `((python2-variant . ,(delay python2-billiard))))))
9295
9296 (define-public python2-billiard
9297 (let ((billiard (package-with-python2
9298 (strip-python2-variant python-billiard))))
9299 (package
9300 (inherit billiard)
9301 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9302 ("python2-mock" ,python2-mock)
9303 ,@(package-native-inputs billiard))))))
9304
9305 (define-public python-celery
9306 (package
9307 (name "python-celery")
9308 (version "4.2.1")
9309 (source
9310 (origin
9311 (method url-fetch)
9312 (uri (pypi-uri "celery" version))
9313 (sha256
9314 (base32
9315 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9316 (build-system python-build-system)
9317 (arguments
9318 '(;; TODO The tests fail with Python 3.7
9319 ;; https://github.com/celery/celery/issues/4849
9320 #:tests? #f
9321 #:phases
9322 (modify-phases %standard-phases
9323 (add-after 'unpack 'patch-requirements
9324 (lambda _
9325 (substitute* "requirements/test.txt"
9326 (("pytest>=3\\.0,<3\\.3")
9327 "pytest>=3.0"))
9328 #t)))))
9329 (native-inputs
9330 `(("python-case" ,python-case)
9331 ("python-pytest" ,python-pytest)))
9332 (propagated-inputs
9333 `(("python-pytz" ,python-pytz)
9334 ("python-billiard" ,python-billiard)
9335 ("python-kombu" ,python-kombu)))
9336 (home-page "https://celeryproject.org")
9337 (synopsis "Distributed Task Queue")
9338 (description "Celery is an asynchronous task queue/job queue based on
9339 distributed message passing. It is focused on real-time operation, but
9340 supports scheduling as well. The execution units, called tasks, are executed
9341 concurrently on a single or more worker servers using multiprocessing,
9342 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9343 synchronously (wait until ready).")
9344 (license license:bsd-3)
9345 (properties `((python2-variant . ,(delay python2-celery))))))
9346
9347 (define-public python2-celery
9348 (let ((celery (package-with-python2
9349 (strip-python2-variant python-celery))))
9350 (package
9351 (inherit celery)
9352 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9353 ("python2-mock" ,python2-mock)
9354 ,@(package-native-inputs celery))))))
9355
9356 (define-public python-translitcodec
9357 (package
9358 (name "python-translitcodec")
9359 (version "0.4.0")
9360 (source
9361 (origin
9362 (method url-fetch)
9363 (uri (pypi-uri "translitcodec" version))
9364 (sha256
9365 (base32
9366 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9367 (build-system python-build-system)
9368 (arguments
9369 `(#:tests? #f)) ; no tests provided
9370 (home-page
9371 "https://github.com/claudep/translitcodec")
9372 (synopsis
9373 "Unicode to 8-bit charset transliteration codec")
9374 (description
9375 "This package contains codecs for transliterating ISO 10646 texts into
9376 best-effort representations using smaller coded character sets (ASCII,
9377 ISO 8859, etc.).")
9378 (license license:expat)))
9379
9380 (define-public python2-translitcodec
9381 (package-with-python2 python-translitcodec))
9382
9383 (define-public python-editor
9384 (package
9385 (name "python-editor")
9386 (version "0.5")
9387 (source
9388 (origin
9389 (method url-fetch)
9390 (uri (pypi-uri "python-editor" version))
9391 (sha256
9392 (base32
9393 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9394 (build-system python-build-system)
9395 (home-page
9396 "https://github.com/fmoo/python-editor")
9397 (synopsis
9398 "Programmatically open an editor, capture the result")
9399 (description
9400 "python-editor is a library that provides the editor module for
9401 programmatically interfacing with your system's $EDITOR.")
9402 (license license:asl2.0)))
9403
9404 (define-public python2-editor
9405 (package-with-python2 python-editor))
9406
9407 (define-public python-vobject
9408 (package
9409 (name "python-vobject")
9410 (version "0.9.5")
9411 (source (origin
9412 (method url-fetch)
9413 (uri (pypi-uri "vobject" version))
9414 (sha256
9415 (base32
9416 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9417 (build-system python-build-system)
9418 (arguments
9419 '(;; The test suite relies on some non-portable Windows interfaces.
9420 #:tests? #f))
9421 (propagated-inputs
9422 `(("python-dateutil" ,python-dateutil)
9423 ("python-pyicu" ,python-pyicu)))
9424 (synopsis "Parse and generate vCard and vCalendar files")
9425 (description "Vobject is intended to be a full featured Python package for
9426 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9427 are supported and well tested. vCard 3.0 files are supported, and all data
9428 should be imported, but only a few components are understood in a sophisticated
9429 way.")
9430 (home-page "http://eventable.github.io/vobject/")
9431 (license license:asl2.0)))
9432
9433 (define-public python2-vobject
9434 (package-with-python2 python-vobject))
9435
9436 (define-public python-munkres
9437 (package
9438 (name "python-munkres")
9439 (version "1.0.8")
9440 (source (origin
9441 (method url-fetch)
9442 (uri (pypi-uri "munkres" version))
9443 (sha256
9444 (base32
9445 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9446 (build-system python-build-system)
9447 (arguments
9448 '(#:tests? #f)) ; no test suite
9449 (home-page "http://software.clapper.org/munkres/")
9450 (synopsis "Implementation of the Munkres algorithm")
9451 (description "The Munkres module provides an implementation of the Munkres
9452 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9453 useful for solving the Assignment Problem.")
9454 (license license:bsd-3)))
9455
9456 (define-public python2-munkres
9457 (package-with-python2 python-munkres))
9458
9459 (define-public python-whoosh
9460 (package
9461 (name "python-whoosh")
9462 (version "2.7.4")
9463 (source
9464 (origin
9465 (method url-fetch)
9466 (uri (pypi-uri "Whoosh" version))
9467 (sha256
9468 (base32
9469 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9470 (build-system python-build-system)
9471 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9472 (native-inputs
9473 `(("python-pytest" ,python-pytest)))
9474 (home-page "https://bitbucket.org/mchaput/whoosh")
9475 (synopsis "Full text indexing, search, and spell checking library")
9476 (description
9477 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9478 checking library.")
9479 (license license:bsd-2)))
9480
9481 (define-public python2-whoosh
9482 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9483 (package (inherit whoosh)
9484 (propagated-inputs
9485 `(("python2-backport-ssl-match-hostname"
9486 ,python2-backport-ssl-match-hostname)
9487 ,@(package-propagated-inputs whoosh))))))
9488
9489 (define-public python-pathlib
9490 (package
9491 (name "python-pathlib")
9492 (version "1.0.1")
9493 (source (origin
9494 (method url-fetch)
9495 (uri (pypi-uri "pathlib" version))
9496 (sha256
9497 (base32
9498 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9499 (build-system python-build-system)
9500 ;; The tests depend on the internal "test" module, which does not provide
9501 ;; a stable interface.
9502 (arguments `(#:tests? #f))
9503 (home-page "https://pathlib.readthedocs.org/")
9504 (synopsis "Object-oriented file system paths")
9505 (description "Pathlib offers a set of classes to handle file system paths.
9506 It offers the following advantages over using string objects:
9507
9508 @enumerate
9509 @item No more cumbersome use of os and os.path functions. Everything can
9510 be done easily through operators, attribute accesses, and method calls.
9511 @item Embodies the semantics of different path types. For example,
9512 comparing Windows paths ignores casing.
9513 @item Well-defined semantics, eliminating any inconsistencies or
9514 ambiguities (forward vs. backward slashes, etc.).
9515 @end enumerate
9516
9517 Note: In Python 3.4, pathlib is now part of the standard library. For other
9518 Python versions please consider python-pathlib2 instead, which tracks the
9519 standard library module. This module (python-pathlib) isn't maintained
9520 anymore.")
9521 (license license:expat)))
9522
9523 (define-public python2-pathlib
9524 (package-with-python2 python-pathlib))
9525
9526 (define-public python2-pathlib2
9527 (package
9528 (name "python2-pathlib2")
9529 (version "2.3.5")
9530 (source (origin
9531 (method url-fetch)
9532 (uri (pypi-uri "pathlib2" version))
9533 (sha256
9534 (base32
9535 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
9536 (build-system python-build-system)
9537 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9538 ;; version is 3.4 which already includes this package as part of the
9539 ;; standard library.
9540 (arguments
9541 `(#:python ,python-2))
9542 (propagated-inputs
9543 `(("python2-scandir" ,python2-scandir)
9544 ("python2-six" ,python2-six)))
9545 (home-page "https://pypi.python.org/pypi/pathlib2/")
9546 (synopsis "Object-oriented file system paths - backport of standard
9547 pathlib module")
9548 (description "The goal of pathlib2 is to provide a backport of standard
9549 pathlib module which tracks the standard library module, so all the newest
9550 features of the standard pathlib can be used also on older Python versions.
9551
9552 Pathlib offers a set of classes to handle file system paths. It offers the
9553 following advantages over using string objects:
9554
9555 @enumerate
9556 @item No more cumbersome use of os and os.path functions. Everything can
9557 be done easily through operators, attribute accesses, and method calls.
9558 @item Embodies the semantics of different path types. For example,
9559 comparing Windows paths ignores casing.
9560 @item Well-defined semantics, eliminating any inconsistencies or
9561 ambiguities (forward vs. backward slashes, etc.).
9562 @end enumerate")
9563 (license license:expat)))
9564
9565 (define-public python2-pathlib2-bootstrap
9566 (hidden-package
9567 (package
9568 (inherit python2-pathlib2)
9569 (name "python2-pathlib2-bootstrap")
9570 (propagated-inputs
9571 `(("python2-scandir" ,python2-scandir)
9572 ("python2-six" ,python2-six-bootstrap))))))
9573
9574 (define-public python-jellyfish
9575 (package
9576 (name "python-jellyfish")
9577 (version "0.5.6")
9578 (source (origin
9579 (method url-fetch)
9580 (uri (pypi-uri "jellyfish" version))
9581 (sha256
9582 (base32
9583 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9584 (build-system python-build-system)
9585 (native-inputs
9586 `(("python-pytest" ,python-pytest)))
9587 (home-page "https://github.com/jamesturk/jellyfish")
9588 (synopsis "Approximate and phonetic matching of strings")
9589 (description "Jellyfish uses a variety of string comparison and phonetic
9590 encoding algorithms to do fuzzy string matching.")
9591 (license license:bsd-2)
9592 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9593
9594 (define-public python2-jellyfish
9595 (let ((jellyfish (package-with-python2
9596 (strip-python2-variant python-jellyfish))))
9597 (package (inherit jellyfish)
9598 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9599 ,@(package-native-inputs jellyfish))))))
9600
9601 (define-public python2-unicodecsv
9602 (package
9603 (name "python2-unicodecsv")
9604 (version "0.14.1")
9605 (source (origin
9606 (method git-fetch)
9607 ;; The test suite is not included in the PyPi release.
9608 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9609 (uri (git-reference
9610 (url "https://github.com/jdunck/python-unicodecsv")
9611 (commit version)))
9612 (file-name (git-file-name name version))
9613 (sha256
9614 (base32
9615 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
9616 (build-system python-build-system)
9617 (arguments
9618 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9619 #:python ,python-2))
9620 (native-inputs
9621 `(("python2-unittest2" ,python2-unittest2)))
9622 (home-page "https://github.com/jdunck/python-unicodecsv")
9623 (synopsis "Unicode CSV module for Python 2")
9624 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9625 module, adding support for Unicode strings.")
9626 (license license:bsd-2)))
9627
9628 (define-public python-rarfile
9629 (package
9630 (name "python-rarfile")
9631 (version "2.8")
9632 (source (origin
9633 (method url-fetch)
9634 (uri (pypi-uri "rarfile" version))
9635 (sha256
9636 (base32
9637 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9638 (build-system python-build-system)
9639 (arguments
9640 '(#:phases
9641 (modify-phases %standard-phases
9642 (replace 'check
9643 ;; Many tests fail, but the installation proceeds.
9644 (lambda _ (invoke "make" "-C" "test" "test"))))))
9645 (native-inputs
9646 `(("which" ,which))) ; required for tests
9647 (propagated-inputs
9648 `(("libarchive" ,libarchive)))
9649 (home-page "https://github.com/markokr/rarfile")
9650 (synopsis "RAR archive reader for Python")
9651 (description "This is Python module for RAR archive reading. The interface
9652 is made as zipfile like as possible.")
9653 (license license:isc)))
9654
9655 (define-public python2-rarfile
9656 (package-with-python2 python-rarfile))
9657
9658 (define-public python-magic
9659 (package
9660 (name "python-magic")
9661 (version "0.4.15")
9662 (source
9663 (origin
9664 (method url-fetch)
9665 (uri (pypi-uri "python-magic" version))
9666 (sha256
9667 (base32
9668 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9669 (file-name (string-append name "-" version "-checkout"))))
9670 (build-system python-build-system)
9671 (arguments
9672 ;; The tests are unreliable, so don't run them. The tests fail
9673 ;; under Python3 because they were written for Python2 and
9674 ;; contain import statements that do not work in Python3. One of
9675 ;; the tests fails under Python2 because its assertions are
9676 ;; overly stringent; it relies on comparing output strings which
9677 ;; are brittle and can change depending on the version of
9678 ;; libmagic being used and the system on which the test is
9679 ;; running. In my case, under GuixSD 0.10.0, only one test
9680 ;; failed, and it seems to have failed only because the version
9681 ;; of libmagic that is packaged in Guix outputs a slightly
9682 ;; different (but not wrong) string than the one that the test
9683 ;; expected.
9684 '(#:tests? #f
9685 #:phases (modify-phases %standard-phases
9686 ;; Replace a specific method call with a hard-coded
9687 ;; path to the necessary libmagic.so file in the
9688 ;; store. If we don't do this, then the method call
9689 ;; will fail to find the libmagic.so file, which in
9690 ;; turn will cause any application using
9691 ;; python-magic to fail.
9692 (add-before 'build 'hard-code-path-to-libmagic
9693 (lambda* (#:key inputs #:allow-other-keys)
9694 (let ((file (assoc-ref inputs "file")))
9695 (substitute* "magic.py"
9696 (("ctypes.util.find_library\\('magic'\\)")
9697 (string-append "'" file "/lib/libmagic.so'")))
9698 #t)))
9699 (add-before 'install 'disable-egg-compression
9700 (lambda _
9701 (let ((port (open-file "setup.cfg" "a")))
9702 (display "\n[easy_install]\nzip_ok = 0\n"
9703 port)
9704 (close-port port)
9705 #t))))))
9706 (inputs
9707 ;; python-magic needs to be able to find libmagic.so.
9708 `(("file" ,file)))
9709 (home-page
9710 "https://github.com/ahupp/python-magic")
9711 (synopsis
9712 "File type identification using libmagic")
9713 (description
9714 "This module uses ctypes to access the libmagic file type
9715 identification library. It makes use of the local magic database and
9716 supports both textual and MIME-type output. Note that this module and
9717 the python-file module both provide a \"magic.py\" file; these two
9718 modules, which are different and were developed separately, both serve
9719 the same purpose: to provide Python bindings for libmagic.")
9720 (license license:expat)))
9721
9722 (define-public python2-magic
9723 (package-with-python2 python-magic))
9724
9725 (define-public python2-s3cmd
9726 (package
9727 (name "python2-s3cmd")
9728 (version "1.6.1")
9729 (source
9730 (origin
9731 (method url-fetch)
9732 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9733 "s3cmd-" version ".tar.gz"))
9734 (sha256
9735 (base32
9736 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9737 (build-system python-build-system)
9738 (arguments
9739 ;; s3cmd is written for python2 only and contains no tests.
9740 `(#:python ,python-2
9741 #:tests? #f))
9742 (propagated-inputs
9743 `(("python2-dateutil" ,python2-dateutil)
9744 ;; The python-file package also provides a magic.py module.
9745 ;; This is an unfortunate state of affairs; however, s3cmd
9746 ;; fails to install if it cannot find specifically the
9747 ;; python-magic package. Thus we include it, instead of using
9748 ;; python-file. Ironically, s3cmd sometimes works better
9749 ;; without libmagic bindings at all:
9750 ;; https://github.com/s3tools/s3cmd/issues/198
9751 ("python2-magic" ,python2-magic)))
9752 (home-page "http://s3tools.org/s3cmd")
9753 (synopsis "Command line tool for S3-compatible storage services")
9754 (description
9755 "S3cmd is a command line tool for uploading, retrieving and managing data
9756 in storage services that are compatible with the Amazon Simple Storage
9757 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9758 GnuPG encryption, and more. It also supports management of Amazon's
9759 CloudFront content delivery network.")
9760 (license license:gpl2+)))
9761
9762 (define-public python-pkgconfig
9763 (package
9764 (name "python-pkgconfig")
9765 (version "1.3.1")
9766 (source
9767 (origin
9768 (method url-fetch)
9769 (uri (pypi-uri "pkgconfig" version))
9770 (sha256
9771 (base32
9772 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9773 (build-system python-build-system)
9774 (native-inputs
9775 `(("python-nose" ,python-nose)))
9776 (inputs
9777 `(("pkg-config" ,pkg-config)))
9778 (arguments
9779 `(#:phases
9780 (modify-phases %standard-phases
9781 (add-before 'build 'patch
9782 ;; Hard-code the path to pkg-config.
9783 (lambda _
9784 (substitute* "pkgconfig/pkgconfig.py"
9785 (("cmd = 'pkg-config")
9786 (string-append "cmd = '" (which "pkg-config"))))
9787 #t))
9788 (replace 'check
9789 (lambda _
9790 (invoke "nosetests" "test.py"))))))
9791 (home-page "https://github.com/matze/pkgconfig")
9792 (synopsis "Python interface for pkg-config")
9793 (description "This module provides a Python interface to pkg-config. It
9794 can be used to find all pkg-config packages, check if a package exists,
9795 check if a package meets certain version requirements, query CFLAGS and
9796 LDFLAGS and parse the output to build extensions with setup.py.")
9797 (license license:expat)))
9798
9799 (define-public python2-pkgconfig
9800 (package-with-python2 python-pkgconfig))
9801
9802 (define-public python-bz2file
9803 (package
9804 (name "python-bz2file")
9805 (version "0.98")
9806 (source
9807 (origin
9808 (method url-fetch)
9809 (uri (pypi-uri "bz2file" version))
9810 (sha256
9811 (base32
9812 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9813 (build-system python-build-system)
9814 (arguments
9815 `(#:tests? #f)) ; Tests use deprecated python modules.
9816 (home-page "https://github.com/nvawda/bz2file")
9817 (synopsis "Read and write bzip2-compressed files")
9818 (description
9819 "Bz2file is a Python library for reading and writing bzip2-compressed
9820 files. It contains a drop-in replacement for the I/O interface in the
9821 standard library's @code{bz2} module, including features from the latest
9822 development version of CPython that are not available in older releases.")
9823 (license license:asl2.0)))
9824
9825 (define-public python2-bz2file
9826 (package-with-python2 python-bz2file))
9827
9828 (define-public python-future
9829 (package
9830 (name "python-future")
9831 (version "0.17.1")
9832 (source
9833 (origin
9834 (method url-fetch)
9835 (uri (pypi-uri "future" version))
9836 (sha256
9837 (base32
9838 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9839 (build-system python-build-system)
9840 ;; Many tests connect to the network or are otherwise flawed.
9841 ;; https://github.com/PythonCharmers/python-future/issues/210
9842 (arguments
9843 `(#:tests? #f))
9844 (home-page "http://python-future.org")
9845 (synopsis "Single-source support for Python 3 and 2")
9846 (description
9847 "@code{python-future} is the missing compatibility layer between Python 2 and
9848 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9849 to support both Python 2 and Python 3 with minimal overhead.")
9850 (license license:expat)))
9851
9852 (define-public python2-future
9853 (package-with-python2 python-future))
9854
9855 (define-public python-cysignals
9856 (package
9857 (name "python-cysignals")
9858 (version "1.9.0")
9859 (source
9860 (origin
9861 (method url-fetch)
9862 (uri (pypi-uri "cysignals" version))
9863 (sha256
9864 (base32
9865 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9866 (build-system python-build-system)
9867 (native-inputs
9868 `(("python-cython" ,python-cython)
9869 ("python-sphinx" ,python-sphinx)))
9870 (inputs
9871 `(("pari-gp" ,pari-gp)))
9872 (arguments
9873 `(#:modules ((guix build python-build-system)
9874 ((guix build gnu-build-system) #:prefix gnu:)
9875 (guix build utils))
9876 ;; FIXME: Tests are executed after installation and currently fail
9877 ;; when not installing into standard locations; the author is working
9878 ;; on a fix.
9879 #:tests? #f
9880 #:phases
9881 (modify-phases %standard-phases
9882 (add-before
9883 'build 'configure
9884 (assoc-ref gnu:%standard-phases 'configure)))))
9885 (home-page
9886 "https://github.com/sagemath/cysignals")
9887 (synopsis
9888 "Handling of interrupts and signals for Cython")
9889 (description
9890 "The cysignals package provides mechanisms to handle interrupts (and
9891 other signals and errors) in Cython code, using two related approaches,
9892 for mixed Cython/Python code or external C libraries and pure Cython code,
9893 respectively.")
9894 (license license:lgpl3+)))
9895
9896 (define-public python2-cysignals
9897 (package-with-python2 python-cysignals))
9898
9899 (define-public python2-shedskin
9900 (package
9901 (name "python2-shedskin")
9902 (version "0.9.4")
9903 (source
9904 (origin
9905 (method url-fetch)
9906 (uri (string-append "https://github.com/shedskin/shedskin/"
9907 "releases/download/v" version
9908 "/shedskin-" version ".tgz"))
9909 (sha256
9910 (base32
9911 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9912 (build-system python-build-system)
9913 (arguments
9914 `(#:python ,python-2
9915 #:phases (modify-phases %standard-phases
9916 (add-after 'unpack 'fix-resulting-include-libs
9917 (lambda* (#:key inputs #:allow-other-keys)
9918 (let ((libgc (assoc-ref inputs "libgc"))
9919 (pcre (assoc-ref inputs "pcre")))
9920 (substitute* "shedskin/makefile.py"
9921 (("variable == 'CCFLAGS':[ ]*")
9922 (string-append "variable == 'CCFLAGS':\n"
9923 " line += ' -I " pcre "/include"
9924 " -I " libgc "/include'"))
9925 (("variable == 'LFLAGS':[ ]*")
9926 (string-append "variable == 'LFLAGS':\n"
9927 " line += ' -L" pcre "/lib"
9928 " -L " libgc "/lib'")))
9929 #t))))))
9930 (inputs `(("pcre" ,pcre)
9931 ("libgc" ,libgc)))
9932 (home-page "https://shedskin.github.io/")
9933 (synopsis "Experimental Python-2 to C++ Compiler")
9934 (description (string-append "This is an experimental compiler for a subset of
9935 Python. It generates C++ code and a Makefile."))
9936 (license (list license:gpl3 license:bsd-3 license:expat))))
9937
9938 (define-public python2-rope
9939 (package
9940 (name "python2-rope")
9941 (version "0.11.0")
9942 (source
9943 (origin
9944 (method url-fetch)
9945 (uri (pypi-uri "rope" version))
9946 (sha256
9947 (base32
9948 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9949 (arguments
9950 ;; Rope has only partial python3 support, see `python-rope'
9951 `(#:python ,python-2))
9952 (build-system python-build-system)
9953 (native-inputs
9954 `(("python2-unittest2" ,python2-unittest2)))
9955 (home-page "https://github.com/python-rope/rope")
9956 (synopsis "Refactoring library for Python")
9957 (description "Rope is a refactoring library for Python. It facilitates
9958 the renaming, moving and extracting of attributes, functions, modules, fields
9959 and parameters in Python 2 source code. These refactorings can also be applied
9960 to occurrences in strings and comments.")
9961 (license license:gpl2)))
9962
9963 (define-public python-rope
9964 (package
9965 (inherit python2-rope)
9966 (name "python-rope")
9967 (arguments `(#:python ,python-wrapper
9968 ;; XXX: Only partial python3 support, results in some failing
9969 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9970 #:tests? #f))
9971 (properties `((python2-variant . ,(delay python2-rope))))))
9972
9973 (define-public python-py3status
9974 (package
9975 (name "python-py3status")
9976 (version "3.21")
9977 (source
9978 (origin
9979 (method url-fetch)
9980 (uri (pypi-uri "py3status" version))
9981 (sha256
9982 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
9983 (build-system python-build-system)
9984 (inputs
9985 `(("file" ,file)))
9986 (arguments
9987 '(#:phases
9988 (modify-phases %standard-phases
9989 ;; 'file' is used for detection of configuration file encoding
9990 ;; let's make link the dependency to particular input
9991 (add-before 'build 'patch-file-path
9992 (lambda* (#:key inputs #:allow-other-keys)
9993 (let ((file-path (assoc-ref inputs "file")))
9994 (substitute* "py3status/parse_config.py"
9995 (("\\[\"file\", \"-b\"")
9996 (string-append "['" file-path "/bin/file', '-b'")))
9997 #t))))
9998 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9999 (home-page "https://github.com/ultrabug/py3status")
10000 (synopsis "Extensible i3status wrapper written in Python")
10001 (description "py3status is an i3status wrapper which extends i3status
10002 functionality in a modular way, allowing you to extend your panel with your
10003 own code, responding to click events and updating clock every second.")
10004 (license license:bsd-3)))
10005
10006 (define-public python-tblib
10007 (package
10008 (name "python-tblib")
10009 (version "1.3.2")
10010 (source (origin
10011 (method url-fetch)
10012 (uri (pypi-uri "tblib" version))
10013 (sha256 (base32
10014 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10015 (build-system python-build-system)
10016 (arguments
10017 `(#:phases
10018 (modify-phases %standard-phases
10019 (add-before 'check 'adjust-tests
10020 (lambda _
10021 (when (which "python3")
10022 ;; Adjust the example output to match that of Python 3.7:
10023 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10024 (substitute* "README.rst"
10025 (("Exception\\('fail',") "Exception('fail'"))
10026 #t)))
10027 (replace 'check
10028 (lambda _
10029 ;; Upstream runs tests after installation and the package itself
10030 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10031 ;; found.
10032 (setenv "PYTHONPATH"
10033 (string-append (getcwd) "/build/lib:"
10034 (getenv "PYTHONPATH")))
10035 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10036 (native-inputs
10037 `(("python-pytest" ,python-pytest)
10038 ("python-six" ,python-six)))
10039 (home-page "https://github.com/ionelmc/python-tblib")
10040 (synopsis "Traceback serialization library")
10041 (description
10042 "Traceback serialization allows you to:
10043
10044 @enumerate
10045 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10046 different processes. This allows better error handling when running code over
10047 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10048
10049 @item Parse traceback strings and raise with the parsed tracebacks.
10050 @end enumerate\n")
10051 (license license:bsd-3)))
10052
10053 (define-public python2-tblib
10054 (package-with-python2 python-tblib))
10055
10056 (define-public python-greenlet
10057 (package
10058 (name "python-greenlet")
10059 (version "0.4.15")
10060 (source (origin
10061 (method url-fetch)
10062 (uri (pypi-uri "greenlet" version))
10063 (sha256
10064 (base32
10065 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10066 (build-system python-build-system)
10067 (home-page "https://greenlet.readthedocs.io/")
10068 (synopsis "Lightweight in-process concurrent programming")
10069 (description
10070 "Greenlet package is a spin-off of Stackless, a version of CPython
10071 that supports micro-threads called \"tasklets\". Tasklets run
10072 pseudo-concurrently (typically in a single or a few OS-level threads) and
10073 are synchronized with data exchanges on \"channels\".")
10074 (license (list license:psfl license:expat))))
10075
10076 (define-public python2-greenlet
10077 (package-with-python2 python-greenlet))
10078
10079 (define-public python-objgraph
10080 (package
10081 (name "python-objgraph")
10082 (version "3.4.1")
10083 (source
10084 (origin
10085 (method url-fetch)
10086 (uri (pypi-uri "objgraph" version))
10087 (sha256
10088 (base32
10089 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
10090 (build-system python-build-system)
10091 (propagated-inputs
10092 `(("python-graphviz" ,python-graphviz)))
10093 (native-inputs
10094 `(("python-mock" ,python-mock)
10095 ("graphviz" ,graphviz)))
10096 (home-page "https://mg.pov.lt/objgraph/")
10097 (synopsis "Draw Python object reference graphs with graphviz")
10098 (description
10099 "This package provides tools to draw Python object reference graphs with
10100 graphviz.")
10101 (license license:expat)))
10102
10103 (define-public python2-objgraph
10104 (package-with-python2 python-objgraph))
10105
10106 (define-public python-gevent
10107 (package
10108 (name "python-gevent")
10109 (version "1.3.7")
10110 (source (origin
10111 (method url-fetch)
10112 (uri (pypi-uri "gevent" version))
10113 (sha256
10114 (base32
10115 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10116 (modules '((guix build utils)))
10117 (snippet
10118 '(begin
10119 ;; unbunding libev and c-ares
10120 (delete-file-recursively "deps")
10121 #t))))
10122 (build-system python-build-system)
10123 (arguments
10124 `(#:modules ((ice-9 ftw)
10125 (ice-9 match)
10126 (srfi srfi-26)
10127 (guix build utils)
10128 (guix build python-build-system))
10129 #:phases (modify-phases %standard-phases
10130 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10131 (lambda _
10132 (substitute* "src/gevent/subprocess.py"
10133 (("/bin/sh") (which "sh")))
10134 (for-each (lambda (file)
10135 (substitute* file
10136 (("/bin/sh") (which "sh"))
10137 (("/bin/true") (which "true"))))
10138 (find-files "src/greentest" "\\.py$"))
10139 #t))
10140 (add-before 'build 'do-not-use-bundled-sources
10141 (lambda* (#:key inputs #:allow-other-keys)
10142 (setenv "CONFIG_SHELL" (which "bash"))
10143 (setenv "LIBEV_EMBED" "false")
10144 (setenv "CARES_EMBED" "false")
10145 (setenv "EMBED" "false")
10146
10147 ;; Prevent building bundled libev.
10148 (substitute* "setup.py"
10149 (("run_make=_BUILDING")
10150 "run_make=False"))
10151
10152 (let ((greenlet (string-append
10153 (assoc-ref inputs "python-greenlet")
10154 "/include")))
10155 (match (scandir greenlet
10156 (lambda (item)
10157 (string-prefix? "python" item)))
10158 ((python)
10159 (setenv "C_INCLUDE_PATH"
10160 (string-append greenlet "/" python)))))
10161 #t))
10162 (add-before 'check 'skip-timer-test
10163 (lambda _
10164 ;; XXX: Skip 'TestTimerResolution', which appears to be
10165 ;; unreliable.
10166 (substitute* "src/greentest/test__core_timer.py"
10167 (("not greentest.RUNNING_ON_CI") "False"))
10168 #t))
10169 (replace 'check
10170 (lambda _
10171 ;; Make sure the build directory is on PYTHONPATH.
10172 (setenv "PYTHONPATH"
10173 (string-append
10174 (getenv "PYTHONPATH") ":"
10175 (getcwd) "/build/"
10176 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10177 (with-directory-excursion "src/greentest"
10178 ;; XXX: Many tests require network access. Instead we only
10179 ;; run known-good tests. Unfortunately we cannot use
10180 ;; recursion here since this directory also contains
10181 ;; Python-version-specific subfolders.
10182 (apply invoke "python" "testrunner.py" "--config"
10183 "known_failures.py"
10184 (scandir "." (cut regexp-exec
10185 (make-regexp "test_+(subprocess|core)")
10186 <>)))))))))
10187 (propagated-inputs
10188 `(("python-greenlet" ,python-greenlet)
10189 ("python-objgraph" ,python-objgraph)))
10190 (native-inputs
10191 `(("python-six" ,python-six)))
10192 (inputs
10193 `(("c-ares" ,c-ares)
10194 ("libev" ,libev)))
10195 (home-page "http://www.gevent.org/")
10196 (synopsis "Coroutine-based network library")
10197 (description
10198 "gevent is a coroutine-based Python networking library that uses greenlet
10199 to provide a high-level synchronous API on top of the libev event loop.")
10200 (license license:expat)
10201 (properties `((python2-variant . ,(delay python2-gevent))))))
10202
10203 (define-public python2-gevent
10204 (let ((base (package-with-python2
10205 (strip-python2-variant python-gevent))))
10206 (package
10207 (inherit base)
10208 (native-inputs `(,@(package-native-inputs python-gevent)
10209 ("python-mock" ,python2-mock))))))
10210
10211 (define-public python-fastimport
10212 (package
10213 (name "python-fastimport")
10214 (version "0.9.6")
10215 (source
10216 (origin
10217 (method url-fetch)
10218 (uri (pypi-uri "fastimport" version))
10219 (sha256
10220 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10221 (build-system python-build-system)
10222 (home-page "https://github.com/jelmer/python-fastimport")
10223 (synopsis "VCS fastimport parser and generator in Python")
10224 (description "This package provides a parser for and generator of the Git
10225 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10226 format.")
10227 (license license:gpl2+)))
10228
10229 (define-public python2-fastimport
10230 (package-with-python2 python-fastimport))
10231
10232 (define-public python-twisted
10233 (package
10234 (name "python-twisted")
10235 (version "19.7.0")
10236 (source (origin
10237 (method url-fetch)
10238 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10239 (sha256
10240 (base32
10241 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10242 (build-system python-build-system)
10243 (arguments
10244 '(#:tests? #f)) ; FIXME: some tests fail
10245 (propagated-inputs
10246 `(("python-zope-interface" ,python-zope-interface)
10247 ("python-pyhamcrest" ,python-pyhamcrest)
10248 ("python-incremental" ,python-incremental)
10249 ("python-hyperlink" ,python-hyperlink)
10250 ("python-constantly" ,python-constantly)
10251 ("python-automat" ,python-automat)))
10252 (home-page "https://twistedmatrix.com/")
10253 (synopsis "Asynchronous networking framework written in Python")
10254 (description
10255 "Twisted is an extensible framework for Python programming, with special
10256 focus on event-based network programming and multiprotocol integration.")
10257 (license license:expat)))
10258
10259 (define-public python2-twisted
10260 (package-with-python2 python-twisted))
10261
10262 (define-public python-pika
10263 (package
10264 (name "python-pika")
10265 (version "0.12.0")
10266 (source
10267 (origin
10268 (method url-fetch)
10269 (uri (pypi-uri "pika" version))
10270 (sha256
10271 (base32
10272 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10273 (build-system python-build-system)
10274 (native-inputs
10275 `(("python-pyev" ,python-pyev)
10276 ("python-tornado" ,python-tornado)
10277 ("python-twisted" ,python-twisted)))
10278 (home-page "https://pika.readthedocs.org")
10279 (synopsis "Pure Python AMQP Client Library")
10280 (description
10281 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10282 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10283 network support library.")
10284 (license license:bsd-3)))
10285
10286 (define-public python2-pika
10287 (package-with-python2 python-pika))
10288
10289 (define-public python-ply
10290 (package
10291 (name "python-ply")
10292 (version "3.10")
10293 (source
10294 (origin
10295 (method url-fetch)
10296 (uri (pypi-uri "ply" version))
10297 (sha256
10298 (base32
10299 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10300 (build-system python-build-system)
10301 (home-page "http://www.dabeaz.com/ply/")
10302 (synopsis "Python Lex & Yacc")
10303 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10304 It uses LR parsing and does extensive error checking.")
10305 (license license:bsd-3)))
10306
10307 (define-public python2-ply
10308 (package-with-python2 python-ply))
10309
10310 (define-public python-tabulate
10311 (package
10312 (name "python-tabulate")
10313 (version "0.7.7")
10314 (source (origin
10315 (method url-fetch)
10316 (uri (pypi-uri "tabulate" version))
10317 (sha256
10318 (base32
10319 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10320 (build-system python-build-system)
10321 (arguments
10322 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10323 ;; and the latest release is not tagged in the upstream repository.
10324 '(#:tests? #f))
10325 (home-page "https://bitbucket.org/astanin/python-tabulate")
10326 (synopsis "Pretty-print tabular data")
10327 (description
10328 "Tabulate is a library and command-line utility to pretty-print tabular
10329 data in Python.")
10330 (license license:expat)))
10331
10332 (define-public python2-tabulate
10333 (package-with-python2 python-tabulate))
10334
10335 (define-public python-kazoo
10336 (package
10337 (name "python-kazoo")
10338 (version "2.4.0")
10339 (source
10340 (origin
10341 (method url-fetch)
10342 (uri (pypi-uri "kazoo" version))
10343 (sha256
10344 (base32
10345 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10346 (build-system python-build-system)
10347 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10348 (propagated-inputs
10349 `(("python-six" ,python-six)))
10350 (home-page "https://kazoo.readthedocs.org")
10351 (synopsis "High-level Zookeeper client library")
10352 (description
10353 "Kazoo is a Python client library for the Apache Zookeeper distributed
10354 application service. It is designed to be easy to use and to avoid common
10355 programming errors.")
10356 (license license:asl2.0)))
10357
10358 (define-public python2-kazoo
10359 (package-with-python2 python-kazoo))
10360
10361 (define-public python-pykafka
10362 (package
10363 (name "python-pykafka")
10364 (version "2.4.0")
10365 (source (origin
10366 (method url-fetch)
10367 (uri (pypi-uri "pykafka" version))
10368 (sha256
10369 (base32
10370 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10371 (build-system python-build-system)
10372 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10373 (propagated-inputs
10374 `(("python-gevent" ,python-gevent)
10375 ("python-kazoo" ,python-kazoo)
10376 ("python-tabulate" ,python-tabulate)))
10377 (inputs
10378 `(("librdkafka" ,librdkafka)))
10379 (home-page "https://pykafka.readthedocs.io/")
10380 (synopsis "Apache Kafka client for Python")
10381 (description
10382 "PyKafka is a client for the Apache Kafka distributed messaging system.
10383 It includes Python implementations of Kafka producers and consumers, which
10384 are optionally backed by a C extension built on librdkafka.")
10385 (license license:asl2.0)))
10386
10387 (define-public python2-pykafka
10388 (package-with-python2 python-pykafka))
10389
10390 (define-public python-wcwidth
10391 (package
10392 (name "python-wcwidth")
10393 (version "0.1.8")
10394 (source (origin
10395 (method url-fetch)
10396 (uri (pypi-uri "wcwidth" version))
10397 (sha256
10398 (base32
10399 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
10400 (build-system python-build-system)
10401 (home-page "https://github.com/jquast/wcwidth")
10402 (synopsis "Measure number of terminal column cells of wide-character codes")
10403 (description "Wcwidth measures the number of terminal column cells of
10404 wide-character codes. It is useful for those implementing a terminal emulator,
10405 or programs that carefully produce output to be interpreted by one. It is a
10406 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10407 specified in POSIX.1-2001 and POSIX.1-2008.")
10408 (license license:expat)))
10409
10410 (define-public python2-wcwidth
10411 (package-with-python2 python-wcwidth))
10412
10413 (define-public python2-jsonrpclib
10414 (package
10415 (name "python2-jsonrpclib")
10416 (version "0.1.7")
10417 (source (origin
10418 (method url-fetch)
10419 (uri (pypi-uri "jsonrpclib" version))
10420 (sha256
10421 (base32
10422 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10423 (build-system python-build-system)
10424 (arguments
10425 `(#:tests? #f
10426 #:python ,python-2))
10427 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10428 (synopsis "Implementation of JSON-RPC specification for Python")
10429 (description
10430 "This library is an implementation of the JSON-RPC specification.
10431 It supports both the original 1.0 specification, as well as the
10432 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10433 etc.")
10434 (license license:asl2.0)))
10435
10436 (define-public python-chai
10437 (package
10438 (name "python-chai")
10439 (version "1.1.2")
10440 (source (origin
10441 (method url-fetch)
10442 (uri (pypi-uri "chai" version))
10443 (sha256
10444 (base32
10445 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10446 (build-system python-build-system)
10447 (home-page "https://github.com/agoragames/chai")
10448 (synopsis "Mocking framework for Python")
10449 (description
10450 "Chai provides an api for mocking, stubbing and spying your python
10451 objects, patterned after the Mocha library for Ruby.")
10452 (license license:bsd-3)))
10453
10454 (define-public python2-chai
10455 (package-with-python2 python-chai))
10456
10457 (define-public python-inflection
10458 (package
10459 (name "python-inflection")
10460 (version "0.3.1")
10461 (source
10462 (origin (method url-fetch)
10463 (uri (pypi-uri "inflection" version))
10464 (sha256
10465 (base32
10466 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10467 (build-system python-build-system)
10468 (native-inputs
10469 `(("python-pytest" ,python-pytest)))
10470 (home-page "https://github.com/jpvanhal/inflection")
10471 (synopsis "Python string transformation library")
10472 (description
10473 "Inflection is a string transformation library. It singularizes
10474 and pluralizes English words, and transforms strings from CamelCase to
10475 underscored string.")
10476 (license license:expat)))
10477
10478 (define-public python2-inflection
10479 (package-with-python2 python-inflection))
10480
10481 (define-public python-pylev
10482 (package
10483 (name "python-pylev")
10484 (version "1.3.0")
10485 (source (origin
10486 (method url-fetch)
10487 (uri (pypi-uri "pylev" version))
10488 (sha256
10489 (base32
10490 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10491 (build-system python-build-system)
10492 (home-page "https://github.com/toastdriven/pylev")
10493 (synopsis "Levenshtein distance implementation in Python")
10494 (description "Pure Python Levenshtein implementation, based off the
10495 Wikipedia code samples at
10496 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10497 (license license:bsd-3)))
10498
10499 (define-public python2-pylev
10500 (package-with-python2 python-pylev))
10501
10502 (define-public python-cleo
10503 (package
10504 (name "python-cleo")
10505 (version "0.6.8")
10506 (source (origin
10507 (method url-fetch)
10508 (uri (pypi-uri "cleo" version))
10509 (sha256
10510 (base32
10511 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
10512 (build-system python-build-system)
10513 (native-inputs
10514 `( ;; For testing
10515 ("python-mock" ,python-mock)
10516 ("python-pytest-mock" ,python-pytest-mock)
10517 ("python-pytest" ,python-pytest)))
10518 (propagated-inputs
10519 `(("python-backpack" ,python-backpack)
10520 ("python-pastel" ,python-pastel)
10521 ("python-pylev" ,python-pylev)))
10522 (home-page "https://github.com/sdispater/cleo")
10523 (synopsis "Command-line arguments library for Python")
10524 (description
10525 "Cleo allows you to create command-line commands with signature in
10526 docstring and colored output.")
10527 (license license:expat)))
10528
10529 (define-public python2-cleo
10530 (package-with-python2 python-cleo))
10531
10532 (define-public python-tomlkit
10533 (package
10534 (name "python-tomlkit")
10535 (version "0.5.7")
10536 (source
10537 (origin
10538 (method url-fetch)
10539 (uri (pypi-uri "tomlkit" version))
10540 (sha256
10541 (base32
10542 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10543 (build-system python-build-system)
10544 (native-inputs
10545 `(("python-pytest" ,python-pytest)))
10546 (home-page
10547 "https://github.com/sdispater/tomlkit")
10548 (synopsis "Style preserving TOML library")
10549 (description
10550 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10551 preserves all comments, indentations, whitespace and internal element ordering,
10552 and makes them accessible and editable via an intuitive API. It can also
10553 create new TOML documents from scratch using the provided helpers. Part of the
10554 implementation as been adapted, improved and fixed from Molten.")
10555 (license license:expat)))
10556
10557 (define-public python-shellingham
10558 (package
10559 (name "python-shellingham")
10560 (version "1.3.1")
10561 (source
10562 (origin
10563 (method url-fetch)
10564 (uri (pypi-uri "shellingham" version))
10565 (sha256
10566 (base32
10567 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10568 (build-system python-build-system)
10569 (home-page
10570 "https://github.com/sarugaku/shellingham")
10571 (synopsis "Tool to detect surrounding shell")
10572 (description
10573 "Shellingham detects what shell the current Python executable is
10574 running in.")
10575 (license license:isc)))
10576
10577 (define-public python-memcached
10578 (package
10579 (name "python-memcached")
10580 (version "1.59")
10581 (source
10582 (origin
10583 (method url-fetch)
10584 (uri (pypi-uri "python-memcached" version))
10585 (sha256
10586 (base32
10587 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10588 (build-system python-build-system)
10589 (propagated-inputs `(("python-six" ,python-six)))
10590 (home-page
10591 "https://github.com/linsomniac/python-memcached")
10592 (synopsis "Pure python memcached client")
10593 (description
10594 "This software is a pure Python interface to the memcached memory cache
10595 daemon. It is the client side software which allows storing values in one or
10596 more, possibly remote, memcached servers.")
10597 (license license:psfl)))
10598
10599 (define-public python-clikit
10600 (package
10601 (name "python-clikit")
10602 (version "0.2.4")
10603 (source
10604 (origin
10605 (method url-fetch)
10606 (uri (pypi-uri "clikit" version))
10607 (sha256
10608 (base32
10609 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10610 (build-system python-build-system)
10611 (propagated-inputs
10612 `(("python-pastel" ,python-pastel)
10613 ("python-pylev" ,python-pylev)))
10614 (home-page "https://github.com/sdispater/clikit")
10615 (synopsis "Group of utilities to build command line interfaces")
10616 (description
10617 "CliKit is a group of utilities to build testable command line
10618 interfaces.")
10619 (license license:expat)))
10620
10621 (define-public python-msgpack-python
10622 (package
10623 (name "python-msgpack-python")
10624 (version "0.5.6")
10625 (source
10626 (origin
10627 (method url-fetch)
10628 (uri (pypi-uri "msgpack-python" version))
10629 (sha256
10630 (base32
10631 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10632 (build-system python-build-system)
10633 (home-page "http://msgpack.org/")
10634 (synopsis "Package to deserialize messages in MessagePack binary format")
10635 (description
10636 "MessagePack is an efficient binary serialization format. It lets you
10637 exchange data among multiple languages like JSON. But it's faster and
10638 smaller. Small integers are encoded into a single byte, and typical short
10639 strings require only one extra byte in addition to the strings themselves.")
10640 (license license:asl2.0)))
10641
10642 (define-public python-cachy
10643 (package
10644 (name "python-cachy")
10645 (version "0.2.0")
10646 (source
10647 (origin
10648 (method url-fetch)
10649 (uri (pypi-uri "cachy" version))
10650 (sha256
10651 (base32
10652 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10653 (build-system python-build-system)
10654 (native-inputs
10655 `(("python-fakeredis" ,python-fakeredis)
10656 ("python-flexmock" ,python-flexmock)
10657 ("python-pytest" ,python-pytest)))
10658 (propagated-inputs
10659 `(("python-memcached" ,python-memcached)
10660 ("python-msgpack-python" ,python-msgpack-python)
10661 ("python-redis" ,python-redis)))
10662 (home-page "https://github.com/sdispater/cachy")
10663 (synopsis "Simple yet effective caching library")
10664 (description
10665 "Cachy provides a simple yet effective caching library. A simple but
10666 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10667 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10668 (license license:expat)))
10669
10670 (define-public poetry
10671 (package
10672 (name "poetry")
10673 (version "0.12.17")
10674 ;; Poetry can only be built from source with poetry.
10675 (source
10676 (origin
10677 (method url-fetch)
10678 (uri (pypi-uri "poetry" version))
10679 (sha256
10680 (base32
10681 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10682 (build-system python-build-system)
10683 (arguments
10684 `(#:tests? #f ;; Pypi does not have tests.
10685 #:phases
10686 (modify-phases %standard-phases
10687 (replace 'build
10688 (lambda _
10689 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10690 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10691 "setup.py")
10692 #t)))))
10693 (propagated-inputs
10694 `(("python-cachecontrol" ,python-cachecontrol)
10695 ("python-cachy" ,python-cachy)
10696 ("python-cleo" ,python-cleo)
10697 ("python-glob2" ,python-glob2)
10698 ("python-html5lib" ,python-html5lib)
10699 ("python-jsonschema" ,python-jsonschema)
10700 ("python-msgpack" ,python-msgpack)
10701 ("python-pkginfo" ,python-pkginfo)
10702 ("python-pyparsing" ,python-pyparsing)
10703 ("python-pyrsistent" ,python-pyrsistent)
10704 ("python-requests" ,python-requests)
10705 ("python-requests-toolbelt" ,python-requests-toolbelt)
10706 ("python-shellingham" ,python-shellingham)
10707 ("python-tomlkit" ,python-tomlkit)
10708 ("python-virtualenv" ,python-virtualenv)))
10709 (home-page "https://poetry.eustace.io/")
10710 (synopsis "Python dependency management and packaging made easy")
10711 (description "Poetry is a tool for dependency management and packaging
10712 in Python. It allows you to declare the libraries your project depends on and
10713 it will manage (install/update) them for you.")
10714 (license license:expat)))
10715
10716 (define-public python-lazy-object-proxy
10717 (package
10718 (name "python-lazy-object-proxy")
10719 (version "1.4.3")
10720 (source (origin
10721 (method url-fetch)
10722 (uri (pypi-uri "lazy-object-proxy" version))
10723 (sha256
10724 (base32
10725 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10726 (native-inputs
10727 `(("python-setuptools-scm" ,python-setuptools-scm)))
10728 (build-system python-build-system)
10729 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10730 (synopsis "Lazy object proxy for python")
10731 (description
10732 "Lazy object proxy is an object that wraps a callable but defers the call
10733 until the object is actually required, and caches the result of said call.")
10734 (license license:bsd-2)))
10735
10736 (define-public python2-lazy-object-proxy
10737 (package-with-python2 python-lazy-object-proxy))
10738
10739 (define-public python-dnspython
10740 (package
10741 (name "python-dnspython")
10742 (version "1.15.0")
10743 (source (origin
10744 (method url-fetch)
10745 (uri (string-append "http://www.dnspython.org/kits/"
10746 version "/dnspython-" version ".tar.gz"))
10747 (sha256
10748 (base32
10749 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10750 (build-system python-build-system)
10751 (arguments '(#:tests? #f)) ; XXX: requires internet access
10752 (home-page "http://www.dnspython.org")
10753 (synopsis "DNS toolkit for Python")
10754 (description
10755 "dnspython is a DNS toolkit for Python. It supports almost all record
10756 types. It can be used for queries, zone transfers, and dynamic updates.
10757 It supports TSIG authenticated messages and EDNS0.")
10758 (license license:expat)))
10759
10760 (define-public python2-dnspython
10761 (package-with-python2 python-dnspython))
10762
10763 (define-public python-email-validator
10764 (package
10765 (name "python-email-validator")
10766 (version "1.0.2")
10767 (source
10768 (origin (method url-fetch)
10769 (uri (pypi-uri "email_validator" version))
10770 (sha256
10771 (base32
10772 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10773 (build-system python-build-system)
10774 (arguments
10775 '(#:phases
10776 (modify-phases %standard-phases
10777 (add-before 'build 'use-dnspython
10778 (lambda _
10779 (substitute* "setup.py"
10780 (("dnspython3") "dnspython"))
10781 #t)))))
10782 (propagated-inputs
10783 `(("python-dnspython" ,python-dnspython)
10784 ("python-idna" ,python-idna)))
10785 (home-page "https://github.com/JoshData/python-email-validator")
10786 (synopsis "Email address validation library for Python")
10787 (description
10788 "This library validates email address syntax and deliverability.")
10789 (license license:cc0)))
10790
10791 (define-public python2-email-validator
10792 (package-with-python2 python-email-validator))
10793
10794 (define-public python-ukpostcodeparser
10795 (package
10796 (name "python-ukpostcodeparser")
10797 (version "1.0.3")
10798 (source (origin
10799 (method url-fetch)
10800 (uri (pypi-uri "UkPostcodeParser" version))
10801 (sha256
10802 (base32
10803 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10804 (build-system python-build-system)
10805 (home-page "https://github.com/hamstah/ukpostcodeparser")
10806 (synopsis "UK Postcode parser for Python")
10807 (description
10808 "This library provides the @code{parse_uk_postcode} function for
10809 parsing UK postcodes.")
10810 (license license:expat)))
10811
10812 (define-public python2-ukpostcodeparser
10813 (package-with-python2 python-ukpostcodeparser))
10814
10815 (define-public python-faker
10816 (package
10817 (name "python-faker")
10818 (version "0.7.9")
10819 (source (origin
10820 (method url-fetch)
10821 (uri (pypi-uri "Faker" version))
10822 (sha256
10823 (base32
10824 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10825 (patches
10826 (search-patches "python-faker-fix-build-32bit.patch"))
10827 (modules '((guix build utils)))
10828 (snippet
10829 '(begin
10830 (for-each delete-file (find-files "." "\\.pyc$"))
10831 #t))))
10832 (build-system python-build-system)
10833 (arguments
10834 '(#:phases
10835 (modify-phases %standard-phases
10836 (replace 'check
10837 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10838 (native-inputs
10839 `(;; For testing
10840 ("python-email-validator" ,python-email-validator)
10841 ("python-mock" ,python-mock)
10842 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10843 (propagated-inputs
10844 `(("python-dateutil" ,python-dateutil)
10845 ("python-six" ,python-six)))
10846 (home-page "https://github.com/joke2k/faker")
10847 (synopsis "Python package that generates fake data")
10848 (description
10849 "Faker is a Python package that generates fake data such as names,
10850 addresses, and phone numbers.")
10851 (license license:expat)
10852 (properties `((python2-variant . ,(delay python2-faker))))))
10853
10854 (define-public python2-faker
10855 (let ((base (package-with-python2 (strip-python2-variant
10856 python-faker))))
10857 (package
10858 (inherit base)
10859 (propagated-inputs
10860 `(("python2-ipaddress" ,python2-ipaddress)
10861 ,@(package-propagated-inputs base))))))
10862
10863 (define-public python-pyaml
10864 (package
10865 (name "python-pyaml")
10866 (version "18.11.0")
10867 (source (origin
10868 (method url-fetch)
10869 (uri (pypi-uri "pyaml" version))
10870 (sha256
10871 (base32
10872 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10873 (build-system python-build-system)
10874 (native-inputs
10875 `(("python-unidecode" ,python-unidecode)))
10876 (propagated-inputs
10877 `(("python-pyyaml" ,python-pyyaml)))
10878 (home-page "https://github.com/mk-fg/pretty-yaml")
10879 (synopsis "YAML pretty-print library for Python")
10880 (description
10881 "pyaml is a PyYAML based python module to produce pretty and readable
10882 YAML-serialized data.")
10883 (license license:wtfpl2)))
10884
10885 (define-public python2-pyaml
10886 (package-with-python2 python-pyaml))
10887
10888 (define-public python-backpack
10889 (package
10890 (name "python-backpack")
10891 (version "0.1")
10892 (source
10893 (origin
10894 (method url-fetch)
10895 (uri (pypi-uri "backpack" version))
10896 (sha256
10897 (base32
10898 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10899 (build-system python-build-system)
10900 (native-inputs
10901 `(("python-pytest" ,python-pytest)
10902 ("python-nose" ,python-nose)))
10903 (propagated-inputs
10904 `(("python-simplejson" ,python-simplejson)))
10905 (home-page "https://github.com/sdispater/backpack")
10906 (synopsis "Utilities for working with Python collections")
10907 (description "Backpack provides some useful utilities for working with
10908 collections of data.")
10909 (license license:expat)))
10910
10911 (define-public python2-backpack
10912 (package-with-python2 python-backpack))
10913
10914 (define-public python-prompt-toolkit
10915 (package
10916 (name "python-prompt-toolkit")
10917 (version "2.0.7")
10918 (source
10919 (origin
10920 (method url-fetch)
10921 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10922 (sha256
10923 (base32
10924 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10925 (build-system python-build-system)
10926 (arguments
10927 `(#:phases
10928 (modify-phases %standard-phases
10929 (delete 'check)
10930 (add-after 'install 'post-install-check
10931 (lambda* (#:key inputs outputs #:allow-other-keys)
10932 ;; HOME is needed for the test
10933 ;; "test_pathcompleter_can_expanduser".
10934 (setenv "HOME" "/tmp")
10935 (add-installed-pythonpath inputs outputs)
10936 (invoke "py.test"))))))
10937 (propagated-inputs
10938 `(("python-wcwidth" ,python-wcwidth)
10939 ("python-six" ,python-six)
10940 ("python-pygments" ,python-pygments)))
10941 (native-inputs
10942 `(("python-pytest" ,python-pytest)))
10943 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10944 (synopsis "Library for building command line interfaces in Python")
10945 (description
10946 "Prompt-Toolkit is a library for building interactive command line
10947 interfaces in Python. It's like GNU Readline but it also features syntax
10948 highlighting while typing, out-of-the-box multi-line input editing, advanced
10949 code completion, incremental search, support for Chinese double-width
10950 characters, mouse support, and auto suggestions.")
10951 (license license:bsd-3)))
10952
10953 (define-public python2-prompt-toolkit
10954 (package-with-python2 python-prompt-toolkit))
10955
10956 (define-public python-prompt-toolkit-1
10957 (package (inherit python-prompt-toolkit)
10958 (version "1.0.15")
10959 (source
10960 (origin
10961 (method url-fetch)
10962 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10963 (sha256
10964 (base32
10965 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10966
10967 (define-public python2-prompt-toolkit-1
10968 (package-with-python2 python-prompt-toolkit-1))
10969
10970 (define-public python-jedi
10971 (package
10972 (name "python-jedi")
10973 (version "0.15.1")
10974 (source
10975 (origin
10976 (method url-fetch)
10977 (uri (pypi-uri "jedi" version))
10978 (sha256
10979 (base32
10980 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10981 (build-system python-build-system)
10982 (arguments
10983 `(#:phases
10984 (modify-phases %standard-phases
10985 (add-after 'unpack 'disable-file-completion-test
10986 ;; A single parameterized test currently fail (see:
10987 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10988 (lambda _
10989 (substitute* "test/test_api/test_completion.py"
10990 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10991 #t))
10992 (replace 'check
10993 (lambda _
10994 (setenv "HOME" "/tmp")
10995 (invoke "python" "-m" "pytest"))))))
10996 (native-inputs
10997 `(("python-pytest" ,python-pytest)
10998 ("python-docopt" ,python-docopt)))
10999 (propagated-inputs
11000 `(("python-parso" ,python-parso)))
11001 (home-page "https://github.com/davidhalter/jedi")
11002 (synopsis "Autocompletion and static analysis library for Python")
11003 (description
11004 "Jedi is a static analysis tool for Python that can be used in Integrated
11005 Development Environments (@dfn{IDE}s) and text editors. It understands Python
11006 on a deeper level than many other static analysis frameworks for Python.
11007
11008 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11009 well.")
11010 (license license:expat)))
11011
11012 (define-public python2-jedi
11013 (package-with-python2 python-jedi))
11014
11015 (define-public ptpython
11016 (package
11017 (name "ptpython")
11018 (version "0.34")
11019 (source (origin
11020 (method url-fetch)
11021 (uri (pypi-uri "ptpython" version))
11022 (sha256
11023 (base32
11024 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11025 (build-system python-build-system)
11026 (arguments
11027 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11028 (propagated-inputs
11029 `(("python-docopt" ,python-docopt)
11030 ("python-jedi" ,python-jedi)
11031 ("python-prompt-toolkit" ,python-prompt-toolkit)
11032 ("python-pygments" ,python-pygments)))
11033 (home-page "https://github.com/jonathanslenders/ptpython")
11034 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11035 (description
11036 "ptpython is a Python read-eval-print loop with IDE-like features.
11037 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11038 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11039 etc.")
11040 (license license:bsd-3)
11041 (properties `((python2-variant . ,(delay ptpython-2))))))
11042
11043 (define-public ptpython-2
11044 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11045 (package
11046 (inherit base)
11047 (name "ptpython2"))))
11048
11049 (define-public python-stem
11050 (package
11051 (name "python-stem")
11052 (version "1.7.1")
11053 (source
11054 (origin
11055 (method url-fetch)
11056 (uri (pypi-uri "stem" version))
11057 (sha256
11058 (base32
11059 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
11060 (build-system python-build-system)
11061 (arguments
11062 `(#:phases
11063 (modify-phases %standard-phases
11064 (replace 'check
11065 (lambda _
11066 (invoke "./run_tests.py" "--unit")
11067 #t)))))
11068 (native-inputs
11069 `(("python-mock" ,python-mock)
11070 ("python-pycodestyle" ,python-pycodestyle)
11071 ("python-pyflakes" ,python-pyflakes)))
11072 (home-page "https://stem.torproject.org/")
11073 (synopsis
11074 "Python controller library that allows applications to interact with Tor")
11075 (description
11076 "Stem is a Python controller library for Tor. With it you can use Tor's
11077 control protocol to script against the Tor process and read descriptor data
11078 relays publish about themselves.")
11079 (license license:lgpl3)))
11080
11081 (define-public python2-stem
11082 (package-with-python2 python-stem))
11083
11084 (define-public python-pyserial
11085 (package
11086 (name "python-pyserial")
11087 (version "3.4")
11088 (source
11089 (origin
11090 (method url-fetch)
11091 (uri (pypi-uri "pyserial" version))
11092 (sha256
11093 (base32
11094 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
11095 (build-system python-build-system)
11096 (arguments
11097 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11098 ;; #:phases
11099 ;; (modify-phases %standard-phases
11100 ;; (replace 'check
11101 ;; (lambda _
11102 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11103 (home-page
11104 "https://github.com/pyserial/pyserial")
11105 (synopsis "Python Serial Port Bindings")
11106 (description "@code{pyserial} provide serial port bindings for Python. It
11107 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11108 and/or Xon/Xoff. The port is accessed in RAW mode.")
11109 (license license:bsd-3)))
11110
11111 (define-public python2-pyserial
11112 (package-with-python2 python-pyserial))
11113
11114 (define-public python-kivy
11115 (package
11116 (name "python-kivy")
11117 (version "1.10.1")
11118 (source
11119 (origin
11120 (method url-fetch)
11121 (uri (pypi-uri "Kivy" version))
11122 (file-name (string-append name "-" version ".tar.gz"))
11123 (sha256
11124 (base32
11125 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11126 (build-system python-build-system)
11127 (arguments
11128 `(#:tests? #f ; Tests require many optional packages
11129 #:phases
11130 (modify-phases %standard-phases
11131 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11132 (lambda* (#:key inputs #:allow-other-keys)
11133 (setenv "KIVY_SDL2_PATH"
11134 (string-append (assoc-ref inputs "sdl-union")
11135 "/include/SDL2"))
11136 #t)))))
11137 (native-inputs
11138 `(("git" ,git)
11139 ("pkg-config" ,pkg-config)
11140 ("python-cython" ,python-cython)))
11141 (inputs
11142 `(("gstreamer" ,gstreamer)
11143 ("mesa" ,mesa)
11144 ("sdl-union"
11145 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11146 (home-page "http://kivy.org")
11147 (synopsis
11148 "Multitouch application framework")
11149 (description
11150 "A software library for rapid development of
11151 hardware-accelerated multitouch applications.")
11152 (license license:expat)))
11153
11154 (define-public python2-kivy
11155 (package-with-python2 python-kivy))
11156
11157 (define-public python-kivy-next
11158 (deprecated-package "python-kivy-next" python-kivy))
11159
11160 (define-public python2-kivy-next
11161 (deprecated-package "python2-kivy-next" python2-kivy))
11162
11163 (define-public python-binaryornot
11164 (package
11165 (name "python-binaryornot")
11166 (version "0.4.4")
11167 (source (origin
11168 (method url-fetch)
11169 (uri (pypi-uri "binaryornot" version))
11170 (sha256
11171 (base32
11172 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11173 (build-system python-build-system)
11174 (arguments
11175 `(#:phases
11176 (modify-phases %standard-phases
11177 (add-after 'unpack 'patch-tests
11178 (lambda _
11179 ;; TypeError: binary() got an unexpected keyword argument
11180 ;; 'average_size'.
11181 (substitute* "tests/test_check.py"
11182 (("average_size=512") ""))
11183 #t)))))
11184 (propagated-inputs
11185 `(("python-chardet" ,python-chardet)
11186 ("python-hypothesis" ,python-hypothesis)))
11187 (home-page "https://github.com/audreyr/binaryornot")
11188 (synopsis "Package to check if a file is binary or text")
11189 (description "Ultra-lightweight pure Python package to check if a file is
11190 binary or text.")
11191 (license license:bsd-3)
11192 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11193
11194 (define-public python2-binaryornot
11195 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11196 (package (inherit base)
11197 (propagated-inputs
11198 `(("python2-enum34" ,python2-enum34)
11199 ,@(package-propagated-inputs base))))))
11200
11201 (define-public python-binwalk
11202 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11203 (revision "0"))
11204 (package
11205 (name "python-binwalk")
11206 (version (git-version "2.1.1" revision commit))
11207 (source
11208 (origin
11209 (method git-fetch)
11210 (uri (git-reference
11211 (url "https://github.com/ReFirmLabs/binwalk")
11212 (commit commit)))
11213 (file-name (git-file-name name version))
11214 (sha256
11215 (base32
11216 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11217 (build-system python-build-system)
11218 (arguments
11219 `(#:phases
11220 (modify-phases %standard-phases
11221 (add-before 'check 'set-pythonpath
11222 (lambda _
11223 (setenv "PYTHONPATH"
11224 (string-append
11225 (getcwd) "/src/"
11226 ":" (getenv "PYTHONPATH")))
11227 (setenv "HOME" "")
11228 #t)))))
11229 (native-inputs
11230 `(("python-coverage" ,python-coverage)
11231 ("python-nose" ,python-nose)))
11232 (home-page "https://github.com/ReFirmLabs/binwalk")
11233 (synopsis "Firmware analysis tool")
11234 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11235 (license license:expat))))
11236
11237 (define-public python-nltk
11238 (package
11239 (name "python-nltk")
11240 (version "3.2.1")
11241 (source (origin
11242 (method url-fetch)
11243 (uri (pypi-uri "nltk" version))
11244 (sha256
11245 (base32
11246 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11247 (build-system python-build-system)
11248 (arguments
11249 '(;; The tests require some extra resources to be downloaded.
11250 ;; TODO Try packaging these resources.
11251 #:tests? #f))
11252 (home-page "http://nltk.org/")
11253 (synopsis "Natural Language Toolkit")
11254 (description "It provides interfaces to over 50 corpora and lexical
11255 resources such as WordNet, along with a suite of text processing libraries
11256 for classification, tokenization, stemming, tagging, parsing, and semantic
11257 reasoning, wrappers for natural language processing libraries.")
11258 (license license:asl2.0)))
11259
11260 (define-public python2-nltk
11261 (package-with-python2 python-nltk))
11262
11263 (define-public python-pymongo
11264 (package
11265 (name "python-pymongo")
11266 (version "3.7.2")
11267 (source (origin
11268 (method url-fetch)
11269 (uri (pypi-uri "pymongo" version))
11270 (sha256
11271 (base32
11272 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11273 (build-system python-build-system)
11274 (propagated-inputs
11275 `(("python-certifi" ,python-certifi)))
11276 (home-page "https://github.com/mongodb/mongo-python-driver")
11277 (synopsis "Python driver for MongoDB")
11278 (description "Python driver for MongoDB.")
11279 (license license:asl2.0)))
11280
11281 (define-public python2-pymongo
11282 (package-with-python2 python-pymongo))
11283
11284 (define-public python-consul
11285 (package
11286 (name "python-consul")
11287 (version "0.6.1")
11288 (source
11289 (origin
11290 (method url-fetch)
11291 (uri (pypi-uri "python-consul" version))
11292 (sha256
11293 (base32
11294 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11295 (build-system python-build-system)
11296 (arguments
11297 '(#:tests? #f)) ; The tests are not distributed
11298 (propagated-inputs
11299 `(("python-requests" ,python-requests)
11300 ("python-six" ,python-six)))
11301 (home-page "https://github.com/cablehead/python-consul")
11302 (synopsis "Python client for Consul")
11303 (description
11304 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11305 discovery, monitoring and configuration.")
11306 (license license:expat)))
11307
11308 (define-public python2-consul
11309 (package-with-python2 python-consul))
11310
11311 (define-public python-schematics
11312 (package
11313 (name "python-schematics")
11314 (version "1.1.1")
11315 (source
11316 (origin
11317 (method git-fetch)
11318 (uri (git-reference
11319 (url "https://github.com/schematics/schematics.git")
11320 (commit (string-append "v" version))))
11321 (file-name (git-file-name name version))
11322 (sha256
11323 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11324 (build-system python-build-system)
11325 (propagated-inputs
11326 `(("python-six" ,python-six)))
11327 (arguments
11328 ;; The tests require a bunch of not very nice packages with fixed
11329 ;; version requirements (e.g. python-coveralls).
11330 `(#:tests? #f))
11331 (home-page "https://github.com/schematics/schematics")
11332 (synopsis "Python Data Structures for Humans")
11333 (description "Python Data Structures for Humans.")
11334 (license license:bsd-3)))
11335
11336 (define-public python2-schematics
11337 (package-with-python2 python-schematics))
11338
11339 (define-public python-odfpy
11340 (package
11341 (name "python-odfpy")
11342 (version "1.3.3")
11343 (source (origin
11344 (method url-fetch)
11345 (uri (pypi-uri "odfpy" version))
11346 (sha256
11347 (base32
11348 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11349 (arguments
11350 `(#:modules ((srfi srfi-1)
11351 (guix build python-build-system)
11352 (guix build utils))
11353 #:phases
11354 (modify-phases %standard-phases
11355 (replace 'check
11356 ;; The test runner invokes python2 and python3 for test*.py.
11357 ;; To avoid having both in inputs, we replicate it here.
11358 (lambda _
11359 (for-each (lambda (test-file) (invoke "python" test-file))
11360 (find-files "tests" "^test.*\\.py$"))
11361 #t)))))
11362 (build-system python-build-system)
11363 (home-page "https://github.com/eea/odfpy")
11364 (synopsis "Python API and tools to manipulate OpenDocument files")
11365 (description "Collection of libraries and utility programs written in
11366 Python to manipulate OpenDocument 1.2 files.")
11367 (license
11368 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11369 ;; number of files with other licenses.
11370 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11371
11372 (define-public python2-odfpy
11373 (package-with-python2 python-odfpy))
11374
11375 (define-public python-natsort
11376 (package
11377 (name "python-natsort")
11378 (version "5.4.1")
11379 (source (origin
11380 (method url-fetch)
11381 (uri (pypi-uri "natsort" version))
11382 (sha256
11383 (base32
11384 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11385 (build-system python-build-system)
11386 (arguments
11387 `(#:modules ((guix build utils)
11388 (guix build python-build-system)
11389 (srfi srfi-1)
11390 (srfi srfi-26)
11391 (ice-9 ftw))
11392 #:phases
11393 (modify-phases %standard-phases
11394 (add-before 'check 'set-cachedir
11395 ;; Tests require write access to $HOME by default
11396 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11397 (replace 'check
11398 (lambda _
11399 (let ((cwd (getcwd)))
11400 (setenv "PYTHONPATH"
11401 (string-append
11402 cwd "/build/"
11403 (find (cut string-prefix? "lib" <>)
11404 (scandir (string-append cwd "/build")))
11405 ":"
11406 (getenv "PYTHONPATH")))
11407 (invoke "pytest" "-v")))))))
11408 (native-inputs
11409 `(("python-hypothesis" ,python-hypothesis)
11410 ("python-pytest-cov" ,python-pytest-cov)
11411 ("python-pytest-mock" ,python-pytest-mock)
11412 ("python-pytest" ,python-pytest)))
11413 (propagated-inputs ; TODO: Add python-fastnumbers.
11414 `(("python-pyicu" ,python-pyicu)))
11415 (home-page "https://github.com/SethMMorton/natsort")
11416 (synopsis "Natural sorting for python and shell")
11417 (description
11418 "Natsort lets you apply natural sorting on lists instead of
11419 lexicographical. If you use the built-in @code{sorted} method in python
11420 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11421 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11422 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11423 identifies numbers and sorts them separately from strings. It can also sort
11424 version numbers, real numbers, mixed types and more, and comes with a shell
11425 command @command{natsort} that exposes this functionality in the command line.")
11426 (license license:expat)
11427 (properties `((python2-variant . ,(delay python2-natsort))))))
11428
11429 (define-public python2-natsort
11430 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11431 (package (inherit base)
11432 (native-inputs
11433 `(("python2-pathlib" ,python2-pathlib)
11434 ,@(package-native-inputs base))))))
11435
11436 (define-public python-glances
11437 (package
11438 (name "python-glances")
11439 (version "3.1.2")
11440 (source
11441 (origin
11442 (method url-fetch)
11443 (uri (pypi-uri "Glances" version))
11444 (sha256
11445 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
11446 (modules '((guix build utils)))
11447 (snippet
11448 '(begin
11449 ;; Glances phones PyPI for weekly update checks by default.
11450 ;; Disable these. The user can re-enable them if desired.
11451 (substitute* "glances/outdated.py"
11452 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11453 (string-append indentation
11454 "self.args.disable_check_update = True\n"
11455 line)))
11456 #t))))
11457 (build-system python-build-system)
11458 (propagated-inputs
11459 `(("python-future" ,python-future)
11460 ("python-psutil" ,python-psutil)))
11461 (home-page "https://github.com/nicolargo/glances")
11462 (synopsis "Cross-platform curses-based monitoring tool")
11463 (description
11464 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11465 Glances uses the PsUtil library to get information from your system. It
11466 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11467 (license license:lgpl3+)))
11468
11469 (define-public python2-glances
11470 (package-with-python2 python-glances))
11471
11472 (define-public python-graphql-core
11473 (package
11474 (name "python-graphql-core")
11475 (version "0.5.3")
11476 (source
11477 (origin
11478 (method url-fetch)
11479 (uri (pypi-uri "graphql-core" version))
11480 (sha256
11481 (base32
11482 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11483 (build-system python-build-system)
11484 (arguments
11485 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11486 #:phases
11487 (modify-phases %standard-phases
11488 (add-after 'unpack 'patch-hardcoded-version
11489 (lambda _ (substitute*
11490 "setup.py"
11491 (("'gevent==1.1rc1'") "'gevent'"))
11492 #t)))))
11493 (native-inputs
11494 `(("python-gevent" ,python-gevent)
11495 ("python-mock" ,python-mock)
11496 ("python-pytest-mock" ,python-pytest-mock)))
11497 (propagated-inputs
11498 `(("python-promise" ,python-promise)
11499 ("python-six" ,python-six)))
11500 (home-page "https://github.com/graphql-python/graphql-core")
11501 (synopsis "GraphQL implementation for Python")
11502 (description
11503 "GraphQL implementation for Python. GraphQL is a data query language and
11504 runtime designed and used to request and deliver data to mobile and web apps.
11505 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11506 to Python.")
11507 (license license:expat)))
11508
11509 (define-public python2-graphql-core
11510 (package-with-python2 python-graphql-core))
11511
11512 (define-public python-graphql-relay
11513 (package
11514 (name "python-graphql-relay")
11515 (version "0.4.5")
11516 (source
11517 (origin
11518 (method url-fetch)
11519 (uri (pypi-uri "graphql-relay" version))
11520 (sha256
11521 (base32
11522 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11523 (build-system python-build-system)
11524 (arguments
11525 '(#:tests? #f)) ; The tests are not distributed
11526 (propagated-inputs
11527 `(("python-graphql-core" ,python-graphql-core)
11528 ("python-promise" ,python-promise)
11529 ("python-six" ,python-six)))
11530 (home-page "https://github.com/graphql-python/graphql-relay-py")
11531 (synopsis "Relay implementation for Python")
11532 (description
11533 "This is a library to allow the easy creation of Relay-compliant servers
11534 using the GraphQL Python reference implementation of a GraphQL server. It
11535 should be noted that the code is a exact port of the original
11536 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11537 from Facebook.")
11538 (license license:expat)))
11539
11540 (define-public python2-graphql-relay
11541 (package-with-python2 python-graphql-relay))
11542
11543 (define-public python-graphene
11544 (package
11545 (name "python-graphene")
11546 (version "0.10.2")
11547 (source
11548 (origin
11549 (method url-fetch)
11550 (uri (pypi-uri "graphene" version))
11551 (sha256
11552 (base32
11553 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11554 (build-system python-build-system)
11555 (propagated-inputs
11556 `(("python-graphql-core" ,python-graphql-core)
11557 ("python-graphql-relay" ,python-graphql-relay)
11558 ("python-iso8601" ,python-iso8601)
11559 ("python-promise" ,python-promise)
11560 ("python-six" ,python-six)))
11561 (arguments
11562 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11563 (home-page "http://graphene-python.org/")
11564 (synopsis "GraphQL Framework for Python")
11565 (description
11566 "Graphene is a Python library for building GraphQL schemas/types.
11567 A GraphQL schema describes your data model, and provides a GraphQL server
11568 with an associated set of resolve methods that know how to fetch data.")
11569 (properties `((python2-variant . ,(delay python2-graphene))))
11570 (license license:expat)))
11571
11572 (define-public python2-graphene
11573 (let ((base (package-with-python2
11574 (strip-python2-variant python-graphene))))
11575 (package (inherit base)
11576 (native-inputs
11577 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11578 ,@(package-native-inputs base))))))
11579
11580 (define-public python-nautilus
11581 (package
11582 (name "python-nautilus")
11583 (version "0.4.9")
11584 (source
11585 (origin
11586 (method url-fetch)
11587 (uri (pypi-uri "nautilus" version))
11588 (sha256
11589 (base32
11590 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11591 (build-system python-build-system)
11592 (arguments `(#:tests? #f)) ; fails to import test modules
11593 (propagated-inputs
11594 `(("python-bcrypt" ,python-bcrypt)
11595 ("python-click" ,python-click)
11596 ("python-consul" ,python-consul)
11597 ("python-graphene" ,python-graphene)
11598 ("python-jinja2" ,python-jinja2)
11599 ("python-peewee" ,python-peewee)
11600 ("python-pika" ,python-pika)
11601 ("python-tornado" ,python-tornado)
11602 ("python-wtforms" ,python-wtforms)))
11603 (native-inputs
11604 `(("python-nose2" ,python-nose2)))
11605 (home-page "https://github.com/AlecAivazis/nautilus")
11606 (synopsis "Library for creating microservice applications")
11607 (description
11608 "Nautilus is a framework for flux based microservices that looks to
11609 provide extendible implementations of common aspects of a cloud so that you can
11610 focus on building massively scalable web applications.")
11611 (license license:expat)))
11612
11613 (define-public python-snowballstemmer
11614 (package
11615 (name "python-snowballstemmer")
11616 (version "1.2.1")
11617 (source (origin
11618 (method url-fetch)
11619 (uri (pypi-uri "snowballstemmer" version))
11620 (sha256
11621 (base32
11622 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11623 (build-system python-build-system)
11624 (arguments
11625 `(;; No tests exist
11626 #:tests? #f))
11627 (home-page "https://github.com/shibukawa/snowball_py")
11628 (synopsis "Snowball stemming library collection for Python")
11629 (description "This package provides 16 word stemmer algorithms generated
11630 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11631 English stemmer.")
11632 (license license:bsd-3)))
11633
11634 (define-public python2-snowballstemmer
11635 (package-with-python2 python-snowballstemmer))
11636
11637 (define-public python-setproctitle
11638 (package
11639 (name "python-setproctitle")
11640 (version "1.1.10")
11641 (source
11642 (origin
11643 (method url-fetch)
11644 (uri (pypi-uri "setproctitle" version))
11645 (sha256
11646 (base32
11647 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11648 (build-system python-build-system)
11649 (arguments
11650 '(#:phases
11651 (modify-phases %standard-phases
11652 (add-before 'check 'patch-Makefile
11653 ;; Stricly this is only required for the python2 variant.
11654 ;; But adding a phase in an inherited package seems to be
11655 ;; cumbersum. So we patch even for python3.
11656 (lambda _
11657 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11658 (when nose
11659 (substitute* "Makefile"
11660 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11661 (string-append nose "/bin/nosetests "))))
11662 #t)))
11663 (replace 'check
11664 (lambda _
11665 (setenv "PYTHON" (or (which "python3") (which "python")))
11666 (setenv "PYCONFIG" (or (which "python3-config")
11667 (which "python-config")))
11668 (setenv "CC" "gcc")
11669 ;; No need to extend PYTHONPATH to find the built package, since
11670 ;; the Makefile will build anyway
11671 (invoke "make" "check"))))))
11672 (native-inputs
11673 `(("procps" ,procps))) ; required for tests
11674 (home-page
11675 "https://github.com/dvarrazzo/py-setproctitle")
11676 (synopsis
11677 "Setproctitle implementation for Python to customize the process title")
11678 (description "The library allows a process to change its title (as displayed
11679 by system tools such as ps and top).
11680
11681 Changing the title is mostly useful in multi-process systems, for
11682 example when a master process is forked: changing the children's title
11683 allows to identify the task each process is busy with. The technique
11684 is used by PostgreSQL and the OpenSSH Server for example.")
11685 (license license:bsd-3)
11686 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11687
11688 (define-public python2-setproctitle
11689 (let ((base (package-with-python2
11690 (strip-python2-variant python-setproctitle))))
11691 (package
11692 (inherit base)
11693 (native-inputs `(("python2-nose" ,python2-nose)
11694 ,@(package-native-inputs base))))))
11695
11696 (define-public python-validictory
11697 (package
11698 (name "python-validictory")
11699 (version "1.0.1")
11700 (source
11701 (origin
11702 (method url-fetch)
11703 (uri (pypi-uri "validictory" version))
11704 (sha256
11705 (base32
11706 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11707 (build-system python-build-system)
11708 (arguments
11709 '(#:phases
11710 (modify-phases %standard-phases
11711 (add-after 'unpack 'bootstrap
11712 ;; Move the tests out of the package directory to avoid
11713 ;; packaging them.
11714 (lambda* _
11715 (rename-file "validictory/tests" "tests")
11716 (delete-file "tests/__init__.py")))
11717 (replace 'check
11718 (lambda _
11719 ;; Extend PYTHONPATH so the built package will be found.
11720 (setenv "PYTHONPATH"
11721 (string-append (getcwd) "/build/lib:"
11722 (getenv "PYTHONPATH")))
11723 (invoke "py.test" "-vv" ))))))
11724 (native-inputs
11725 `(("python-pytest" ,python-pytest)))
11726 (home-page
11727 "https://github.com/jamesturk/validictory")
11728 (synopsis "General purpose Python data validator")
11729 (description "It allows validation of arbitrary Python data structures.
11730
11731 The schema format is based on the JSON Schema
11732 proposal (http://json-schema.org), so combined with json the library is also
11733 useful as a validator for JSON data.")
11734 (license license:expat)))
11735
11736 (define-public python2-validictory
11737 (package-with-python2 python-validictory))
11738
11739 (define-public python-pyelftools
11740 (package
11741 (name "python-pyelftools")
11742 (version "0.25")
11743 (source
11744 (origin
11745 (method url-fetch)
11746 (uri (pypi-uri "pyelftools" version))
11747 (sha256
11748 (base32
11749 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11750 (build-system python-build-system)
11751 (arguments
11752 `(#:phases
11753 (modify-phases %standard-phases
11754 (add-before 'check 'set-pythonpath
11755 (lambda _
11756 (setenv "PYTHONPATH"
11757 (string-append
11758 (getcwd) "/test/"
11759 ":" (getenv "PYTHONPATH")))
11760 #t)))))
11761 (home-page
11762 "https://github.com/eliben/pyelftools")
11763 (synopsis
11764 "Analyze binary and library file information")
11765 (description "This Python library provides interfaces for parsing and
11766 analyzing two binary and library file formats; the Executable and Linking
11767 Format (ELF), and debugging information in the Debugging With Attributed
11768 Record Format (DWARF).")
11769 (license license:public-domain)))
11770
11771 (define-public python-pyev
11772 (package
11773 (name "python-pyev")
11774 (version "0.9.0")
11775 (source
11776 (origin
11777 (method url-fetch)
11778 (uri (pypi-uri "pyev" version))
11779 (sha256
11780 (base32
11781 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11782 (build-system python-build-system)
11783 (arguments
11784 `(#:tests? #f ; no test suite
11785 #:phases
11786 (modify-phases %standard-phases
11787 (add-after 'unpack 'patch
11788 (lambda* (#:key inputs #:allow-other-keys)
11789 (let ((libev (string-append (assoc-ref inputs "libev")
11790 "/lib/libev.so.4")))
11791 (substitute* "setup.py"
11792 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11793 (string-append "libev_dll_name = \"" libev "\"")))))))))
11794 (inputs
11795 `(("libev" ,libev)))
11796 (home-page "http://pythonhosted.org/pyev/")
11797 (synopsis "Python libev interface")
11798 (description "Pyev provides a Python interface to libev.")
11799 (license license:gpl3)))
11800
11801 (define-public python2-pyev
11802 (package-with-python2 python-pyev))
11803
11804 (define-public python-imagesize
11805 (package
11806 (name "python-imagesize")
11807 (version "1.1.0")
11808 (source
11809 (origin
11810 (method url-fetch)
11811 (uri (pypi-uri "imagesize" version))
11812 (sha256
11813 (base32
11814 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11815 (build-system python-build-system)
11816 (home-page "https://github.com/shibukawa/imagesize_py")
11817 (synopsis "Gets image size of files in various formats in Python")
11818 (description
11819 "This package allows determination of image size from
11820 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11821 (license license:expat)))
11822
11823 (define-public python2-imagesize
11824 (package-with-python2 python-imagesize))
11825
11826 (define-public python-termstyle
11827 (package
11828 (name "python-termstyle")
11829 (version "0.1.11")
11830 (source
11831 (origin
11832 (method url-fetch)
11833 (uri (pypi-uri "termstyle" version))
11834 (sha256
11835 (base32
11836 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11837 (build-system python-build-system)
11838 (arguments
11839 '(#:phases
11840 (modify-phases %standard-phases
11841 (replace 'check
11842 (lambda _
11843 (invoke "python" "test3.py"))))))
11844 (home-page "https://github.com/gfxmonk/termstyle")
11845 (synopsis "Console text coloring for Python")
11846 (description "This package provides console text coloring for Python.")
11847 (license license:bsd-3)))
11848
11849 (define-public python-argcomplete
11850 (package
11851 (name "python-argcomplete")
11852 (version "1.10.3")
11853 (source
11854 (origin
11855 (method url-fetch)
11856 (uri (pypi-uri "argcomplete" version))
11857 (sha256
11858 (base32
11859 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
11860 (build-system python-build-system)
11861 (arguments
11862 `(#:phases
11863 (modify-phases %standard-phases
11864 (add-after 'unpack 'embed-tool-references
11865 (lambda _
11866 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11867 ((" grep")
11868 (string-append " " (which "grep")))
11869 ((" egrep")
11870 (string-append " " (which "egrep")))
11871 (("elif which")
11872 (string-append "elif " (which "which")))
11873 (("\\$\\(which")
11874 (string-append "$(" (which "which"))))
11875 #t)))))
11876 (inputs
11877 `(("grep" ,grep)
11878 ("which" ,which)))
11879 (native-inputs
11880 `(("python-coverage" ,python-coverage)
11881 ("python-flake8" ,python-flake8)
11882 ("python-pexpect" ,python-pexpect)
11883 ("python-wheel" ,python-wheel)
11884 ("tcsh" ,tcsh)
11885 ("fish" ,fish)
11886 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11887 (home-page "https://github.com/kislyuk/argcomplete")
11888 (synopsis "Shell tab completion for Python argparse")
11889 (description "argcomplete provides extensible command line tab completion
11890 of arguments and options for Python scripts using @code{argparse}. It's
11891 particularly useful for programs with many options or sub-parsers that can
11892 dynamically suggest completions; for example, when browsing resources over the
11893 network.")
11894 (license license:asl2.0)))
11895
11896 (define-public python2-argcomplete
11897 (package-with-python2 python-argcomplete))
11898
11899 (define-public python-xopen
11900 (package
11901 (name "python-xopen")
11902 (version "0.5.0")
11903 (source
11904 (origin
11905 (method url-fetch)
11906 (uri (pypi-uri "xopen" version))
11907 (sha256
11908 (base32
11909 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11910 (build-system python-build-system)
11911 (propagated-inputs
11912 `(("python-setuptools-scm" ,python-setuptools-scm)))
11913 (home-page "https://github.com/marcelm/xopen/")
11914 (synopsis "Open compressed files transparently")
11915 (description "This module provides an @code{xopen} function that works like
11916 Python's built-in @code{open} function, but can also deal with compressed files.
11917 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11918 recognized by their file extensions. The focus is on being as efficient as
11919 possible on all supported Python versions.")
11920 (license license:expat)))
11921
11922 (define-public python2-xopen
11923 (let ((base (package-with-python2
11924 (strip-python2-variant python-xopen))))
11925 (package
11926 (inherit base)
11927 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11928 ,@(package-propagated-inputs base))))))
11929
11930 (define-public python-cheetah
11931 (package
11932 (name "python-cheetah")
11933 (version "3.1.0")
11934 (source
11935 (origin
11936 (method url-fetch)
11937 (uri (pypi-uri "Cheetah3" version))
11938 (sha256
11939 (base32
11940 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11941 (build-system python-build-system)
11942 (arguments
11943 `(#:modules ((guix build utils)
11944 (guix build python-build-system)
11945 (ice-9 ftw)
11946 (srfi srfi-1)
11947 (srfi srfi-26))
11948 #:phases (modify-phases %standard-phases
11949 (add-after 'unpack 'use-absolute-python
11950 (lambda _
11951 (substitute* "Cheetah/CheetahWrapper.py"
11952 (("#!/usr/bin/env python")
11953 (string-append "#!" (which "python"))))
11954 #t))
11955 (replace 'check
11956 (lambda _
11957 (let ((cwd (getcwd)))
11958 (setenv "PYTHONPATH"
11959 (string-append
11960 cwd "/build/"
11961 (find (cut string-prefix? "lib" <>)
11962 (scandir (string-append cwd "/build")))
11963 ":" (getenv "PYTHONPATH")))
11964 (setenv "PATH"
11965 (string-append (getenv "PATH")
11966 ":" cwd "/bin"))
11967 (setenv "TMPDIR" "/tmp")
11968
11969 (substitute* "Cheetah/Tests/Test.py"
11970 (("unittest.TextTestRunner\\(\\)")
11971 "unittest.TextTestRunner(verbosity=2)"))
11972
11973 (invoke "python" "Cheetah/Tests/Test.py")))))))
11974 (propagated-inputs
11975 `(("python-markdown" ,python-markdown))) ;optional
11976 (home-page "http://cheetahtemplate.org/")
11977 (synopsis "Template engine")
11978 (description "Cheetah is a text-based template engine and Python code
11979 generator.
11980
11981 Cheetah can be used as a standalone templating utility or referenced as
11982 a library from other Python applications. It has many potential uses,
11983 but web developers looking for a viable alternative to ASP, JSP, PHP and
11984 PSP are expected to be its principle user group.
11985
11986 Features:
11987 @enumerate
11988 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11989 text-based format.
11990 @item Cleanly separates content, graphic design, and program code.
11991 @item Blends the power and flexibility of Python with a simple template language
11992 that non-programmers can understand.
11993 @item Gives template writers full access to any Python data structure, module,
11994 function, object, or method in their templates.
11995 @item Makes code reuse easy by providing an object-orientated interface to
11996 templates that is accessible from Python code or other Cheetah templates.
11997 One template can subclass another and selectively reimplement sections of it.
11998 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11999 improve the performance of a dynamic website.
12000 @item Compiles templates into optimized, yet readable, Python code.
12001 @end enumerate")
12002 (license (license:x11-style "file://LICENSE"))))
12003
12004 (define-public python2-cheetah
12005 (package-with-python2 python-cheetah))
12006
12007 (define-public python-dulwich
12008 (package
12009 (name "python-dulwich")
12010 (version "0.18.6")
12011 (source
12012 (origin
12013 (method url-fetch)
12014 (uri (list (string-append "https://www.dulwich.io/releases/"
12015 "dulwich-" version ".tar.gz")
12016 (pypi-uri "dulwich" version)))
12017 (sha256
12018 (base32
12019 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12020 (build-system python-build-system)
12021 (arguments
12022 `(#:phases
12023 (modify-phases %standard-phases
12024 (add-before 'check 'fix-tests
12025 (lambda* (#:key inputs #:allow-other-keys)
12026 ;; The tests use Popen with a custom environment which doesn't
12027 ;; include PATH.
12028 (substitute* "dulwich/tests/compat/utils.py"
12029 (("'git'") (string-append "'"
12030 (which "git")
12031 "'")))
12032 (substitute* '("dulwich/tests/test_repository.py"
12033 "dulwich/tests/test_hooks.py")
12034 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12035 (setenv "TEST_RUNNER" "unittest")
12036 (setenv "PYTHONHASHSEED" "random")
12037 #t)))))
12038 (propagated-inputs
12039 `(("python-fastimport" ,python-fastimport)))
12040 (native-inputs
12041 `(("python-mock" ,python-mock)
12042 ("python-geventhttpclient" ,python-geventhttpclient)
12043 ("git" ,git)))
12044 (home-page "https://www.dulwich.io/")
12045 (synopsis "Git implementation in Python")
12046 (description "Dulwich is an implementation of the Git file formats and
12047 protocols written in pure Python.")
12048 ;; Can be used with either license.
12049 (license (list license:asl2.0 license:gpl2+))))
12050
12051 (define-public python2-dulwich
12052 (package-with-python2 python-dulwich))
12053
12054 (define-public python-pbkdf2
12055 (package
12056 (name "python-pbkdf2")
12057 (version "1.3")
12058 (source
12059 (origin
12060 (method url-fetch)
12061 (uri (pypi-uri "pbkdf2" version))
12062 (sha256
12063 (base32
12064 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12065 (build-system python-build-system)
12066 (arguments
12067 '(#:phases
12068 (modify-phases %standard-phases
12069 (replace 'check
12070 (lambda _
12071 (setenv "PYTHONPATH"
12072 (string-append (getcwd) "/build/lib:"
12073 (getenv "PYTHONPATH")))
12074 (invoke "python" "test/test_pbkdf2.py"))))))
12075 (propagated-inputs
12076 `(("python-pycrypto" ,python-pycrypto))) ; optional
12077 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12078 (synopsis "Password-based key derivation")
12079 (description "This module implements the password-based key derivation
12080 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12081
12082 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12083 is part of the RSA Public Key Cryptography Standards series. The provided
12084 implementation takes a password or a passphrase and a salt value (and
12085 optionally a iteration count, a digest module, and a MAC module) and provides
12086 a file-like object from which an arbitrarly-sized key can be read.")
12087 (license license:expat)))
12088
12089 (define-public python2-pbkdf2
12090 (package-with-python2 python-pbkdf2))
12091
12092 (define-public python-qrcode
12093 (package
12094 (name "python-qrcode")
12095 (version "6.1")
12096 (source
12097 (origin
12098 (method url-fetch)
12099 (uri (pypi-uri "qrcode" version))
12100 (sha256
12101 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12102 (build-system python-build-system)
12103 (arguments
12104 ;; FIXME: Tests require packaging 'pymaging'.
12105 '(#:tests? #f))
12106 (propagated-inputs
12107 `(("python-lxml" ,python-lxml) ; for SVG output
12108 ("python-pillow" ,python-pillow) ; for PNG output
12109 ("python-six" ,python-six)))
12110 (home-page "https://github.com/lincolnloop/python-qrcode")
12111 (synopsis "QR Code image generator")
12112 (description "This package provides a pure Python QR Code generator
12113 module. It uses the Python Imaging Library (PIL) to allow for the generation
12114 of QR Codes.
12115
12116 In addition this package provides a command line tool to generate QR codes and
12117 either write these QR codes to a file or do the output as ascii art at the
12118 console.")
12119 (license license:bsd-3)))
12120
12121 (define-public python2-qrcode
12122 (package-with-python2 python-qrcode))
12123
12124 (define-public python-rst2ansi
12125 (package
12126 (name "python-rst2ansi")
12127 (version "0.1.5")
12128 (source
12129 (origin
12130 (method url-fetch)
12131 (uri (pypi-uri "rst2ansi" version))
12132 (sha256
12133 (base32
12134 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12135 (build-system python-build-system)
12136 (propagated-inputs
12137 `(("python-docutils" ,python-docutils)))
12138 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12139 (synopsis "Convert RST to ANSI-decorated console output")
12140 (description
12141 "Python module dedicated to rendering RST (reStructuredText) documents
12142 to ansi-escaped strings suitable for display in a terminal.")
12143 (license license:expat)))
12144
12145 (define-public python-ansi2html
12146 (package
12147 (name "python-ansi2html")
12148 (version "1.2.0")
12149 (source
12150 (origin
12151 (method url-fetch)
12152 (uri (pypi-uri "ansi2html" version))
12153 (sha256
12154 (base32
12155 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12156 (build-system python-build-system)
12157 (native-inputs
12158 `(("python-mock" ,python-mock)
12159 ("python-nose" ,python-nose)))
12160 (propagated-inputs
12161 `(("python-six" ,python-six)))
12162 (home-page "https://github.com/ralphbean/ansi2html")
12163 (synopsis "Convert ANSI-decorated console output to HTML")
12164 (description
12165 "@command{ansi2html} is a Python library and command line utility for
12166 convering text with ANSI color codes to HTML or LaTeX.")
12167 (license license:gpl3+)))
12168
12169 (define-public python2-ansi2html
12170 (package-with-python2 python-ansi2html))
12171
12172 (define-public python-ddt
12173 (package
12174 (name "python-ddt")
12175 (version "1.1.3")
12176 (source
12177 (origin
12178 (method url-fetch)
12179 (uri (pypi-uri "ddt" version))
12180 (sha256
12181 (base32
12182 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12183 (build-system python-build-system)
12184 (native-inputs
12185 `(("python-mock" ,python-mock)
12186 ("python-nose" ,python-nose)))
12187 (propagated-inputs
12188 `(("python-six" ,python-six)
12189 ("python-pyyaml" ,python-pyyaml)))
12190 (home-page "https://github.com/txels/ddt")
12191 (synopsis "Data-Driven Tests")
12192 (description
12193 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12194 running it with different test data, and make it appear as multiple test
12195 cases.")
12196 (license license:expat)))
12197
12198 (define-public python2-ddt
12199 (package-with-python2 python-ddt))
12200
12201 (define-public python-pycountry
12202 (package
12203 (name "python-pycountry")
12204 (version "18.5.26")
12205 (source
12206 (origin
12207 (method url-fetch)
12208 (uri (pypi-uri "pycountry" version))
12209 (sha256
12210 (base32
12211 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12212 (build-system python-build-system)
12213 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12214 (synopsis "ISO databases for languages, countries, currencies, etc.")
12215 (description
12216 "@code{pycountry} provides the ISO databases for the standards:
12217 @enumerate
12218 @item 639-3 (Languages)
12219 @item 3166 (Countries)
12220 @item 3166-3 (Deleted Countries)
12221 @item 3166-2 (Subdivisions of countries)
12222 @item 4217 (Currencies)
12223 @item 15924 (Scripts)
12224 @end enumerate
12225 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12226 through a Python API.")
12227 (license license:lgpl2.1+)))
12228
12229 (define-public python2-pycountry
12230 (package-with-python2 python-pycountry))
12231
12232 (define-public python-pycosat
12233 (package
12234 (name "python-pycosat")
12235 (version "0.6.1")
12236 (source
12237 (origin
12238 (method url-fetch)
12239 (uri (pypi-uri "pycosat" version))
12240 (sha256
12241 (base32
12242 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12243 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12244 (build-system python-build-system)
12245 (home-page "https://github.com/ContinuumIO/pycosat")
12246 (synopsis "Bindings to picosat (a SAT solver)")
12247 (description
12248 "This package provides efficient Python bindings to @code{picosat} on
12249 the C level. When importing pycosat, the @code{picosat} solver becomes part
12250 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12251 Problem} (SAT) solver.")
12252 (license license:expat)))
12253
12254 (define-public python2-pycosat
12255 (package-with-python2 python-pycosat))
12256
12257 (define-public python2-ruamel.ordereddict
12258 (package
12259 (name "python2-ruamel.ordereddict")
12260 (version "0.4.9")
12261 (source
12262 (origin
12263 (method url-fetch)
12264 (uri (pypi-uri "ruamel.ordereddict" version))
12265 (sha256
12266 (base32
12267 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12268 (build-system python-build-system)
12269 (arguments
12270 `(#:python ,python-2
12271 #:phases
12272 (modify-phases %standard-phases
12273 (delete 'check)
12274 (add-after 'install 'check
12275 (lambda* (#:key inputs outputs #:allow-other-keys)
12276 (add-installed-pythonpath inputs outputs)
12277 (invoke "python" "test/testordereddict.py"))))))
12278 (home-page "https://bitbucket.org/ruamel/ordereddict")
12279 (synopsis "Version of dict that keeps keys in insertion order")
12280 (description
12281 "This is an implementation of an ordered dictionary with @dfn{Key
12282 Insertion Order} (KIO: updates of values do not affect the position of the
12283 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12284 removed and put at the back). The standard library module @code{OrderedDict},
12285 implemented later, implements a subset of @code{ordereddict} functionality.
12286 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12287 Order} (KSO, no sorting function can be specified, but a transform can be
12288 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12289 (license license:expat)))
12290
12291 (define-public python-pypeg2
12292 (package
12293 (name "python-pypeg2")
12294 (version "2.15.2")
12295 (source
12296 (origin
12297 (method url-fetch)
12298 (uri (pypi-uri "pyPEG2" version))
12299 (sha256
12300 (base32
12301 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12302 (build-system python-build-system)
12303 (propagated-inputs `(("python-lxml" ,python-lxml)))
12304 (arguments
12305 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12306 '(#:tests? #f))
12307 (home-page "https://fdik.org/pyPEG/")
12308 (synopsis "Parsering Expression Grammars in Python")
12309 (description "PyPEG is an intrinsic parser interpreter framework for
12310 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12311 parse many formal languages.")
12312 (license license:gpl2)))
12313
12314 (define-public python-incremental
12315 (package
12316 (name "python-incremental")
12317 (version "17.5.0")
12318 (source
12319 (origin
12320 (method url-fetch)
12321 (uri (pypi-uri "incremental" version))
12322 (sha256
12323 (base32
12324 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12325 (build-system python-build-system)
12326 (home-page "https://github.com/hawkowl/incremental")
12327 (synopsis "Library for versioning Python projects")
12328 (description "Incremental is a small library that versions your Python
12329 projects.")
12330 (license license:expat)))
12331
12332 (define-public python2-incremental
12333 (package-with-python2 python-incremental))
12334
12335 (define-public python-invoke
12336 (package
12337 (name "python-invoke")
12338 (home-page "http://www.pyinvoke.org/")
12339 (version "1.3.0")
12340 (source (origin
12341 (method url-fetch)
12342 (uri (pypi-uri "invoke" version))
12343 (sha256
12344 (base32
12345 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12346 (build-system python-build-system)
12347 (arguments
12348 ;; XXX: Requires many dependencies that are not yet in Guix.
12349 `(#:tests? #f))
12350 (synopsis "Pythonic task execution")
12351 (description
12352 "Invoke is a Python task execution tool and library, drawing inspiration
12353 from various sources to arrive at a powerful and clean feature set. It is
12354 evolved from the Fabric project, but focuses on local and abstract concerns
12355 instead of servers and network commands.")
12356 (license license:bsd-3)))
12357
12358 (define-public python2-invoke
12359 (package-with-python2 python-invoke))
12360
12361 (define-public python-automat
12362 (package
12363 (name "python-automat")
12364 (version "0.7.0")
12365 (source (origin
12366 (method url-fetch)
12367 (uri (pypi-uri "Automat" version))
12368 (sha256
12369 (base32
12370 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12371 (build-system python-build-system)
12372 ;; We disable the tests because they require python-twisted, while
12373 ;; python-twisted depends on python-automat. Twisted is optional, but the
12374 ;; tests fail if it is not available. Also see
12375 ;; <https://github.com/glyph/automat/issues/71>.
12376 (arguments '(#:tests? #f))
12377 (native-inputs
12378 `(("python-m2r" ,python-m2r)
12379 ("python-setuptools-scm" ,python-setuptools-scm)
12380 ("python-graphviz" ,python-graphviz)))
12381 (propagated-inputs
12382 `(("python-six" ,python-six)
12383 ("python-attrs" ,python-attrs)))
12384 (home-page "https://github.com/glyph/Automat")
12385 (synopsis "Self-service finite-state machines")
12386 (description "Automat is a library for concise, idiomatic Python
12387 expression of finite-state automata (particularly deterministic finite-state
12388 transducers).")
12389 (license license:expat)))
12390
12391 (define-public python2-automat
12392 (package-with-python2 python-automat))
12393
12394 (define-public python-m2r
12395 (package
12396 (name "python-m2r")
12397 (version "0.2.1")
12398 (source (origin
12399 (method url-fetch)
12400 (uri (pypi-uri "m2r" version))
12401 (sha256
12402 (base32
12403 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12404 (build-system python-build-system)
12405 (propagated-inputs
12406 `(("python-docutils" ,python-docutils)
12407 ("python-mistune" ,python-mistune)))
12408 (native-inputs
12409 `(("python-pygments" ,python-pygments)
12410 ("python-mock" ,python-mock)))
12411 (home-page "https://github.com/miyakogi/m2r")
12412 (synopsis "Markdown to reStructuredText converter")
12413 (description "M2R converts a markdown file including reST markups to valid
12414 reST format.")
12415 (license license:expat)))
12416
12417 (define-public python2-m2r
12418 (package-with-python2 python-m2r))
12419
12420 (define-public python-constantly
12421 (package
12422 (name "python-constantly")
12423 (version "15.1.0")
12424 (source (origin
12425 (method url-fetch)
12426 (uri (pypi-uri "constantly" version))
12427 (sha256
12428 (base32
12429 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12430 (build-system python-build-system)
12431 (home-page "https://github.com/twisted/constantly")
12432 (synopsis "Symbolic constants in Python")
12433 (description "Constantly is a Python library that provides symbolic
12434 constant support. It includes collections and constants with text, numeric,
12435 and bit flag values.")
12436 (license license:expat)))
12437
12438 (define-public python2-constantly
12439 (package-with-python2 python-constantly))
12440
12441 (define-public python-attrs
12442 (package
12443 (name "python-attrs")
12444 (version "19.3.0")
12445 (source (origin
12446 (method url-fetch)
12447 (uri (pypi-uri "attrs" version))
12448 (sha256
12449 (base32
12450 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
12451 (build-system python-build-system)
12452 (arguments
12453 `(#:modules ((guix build utils)
12454 (guix build python-build-system)
12455 (ice-9 ftw)
12456 (srfi srfi-1)
12457 (srfi srfi-26))
12458 #:phases (modify-phases %standard-phases
12459 (replace 'check
12460 (lambda _
12461 (let ((cwd (getcwd)))
12462 (setenv "PYTHONPATH"
12463 (string-append
12464 cwd "/build/"
12465 (find (cut string-prefix? "lib" <>)
12466 (scandir (string-append cwd "/build")))
12467 ":"
12468 (getenv "PYTHONPATH")))
12469 (invoke "python" "-m" "pytest")))))))
12470 (native-inputs
12471 `(("python-coverage" ,python-coverage)
12472 ("python-hypothesis" ,python-hypothesis)
12473 ("python-pympler" ,python-pympler)
12474 ("python-pytest" ,python-pytest)
12475 ("python-six" ,python-six)
12476 ("python-sphinx" ,python-sphinx)
12477 ("python-zope-interface" ,python-zope-interface)))
12478 (home-page "https://github.com/python-attrs/attrs/")
12479 (synopsis "Attributes without boilerplate")
12480 (description "@code{attrs} is a Python package with class decorators that
12481 ease the chores of implementing the most common attribute-related object
12482 protocols.")
12483 (license license:expat)))
12484
12485 (define-public python2-attrs
12486 (package-with-python2 python-attrs))
12487
12488 (define-public python-attrs-bootstrap
12489 (package
12490 (inherit python-attrs)
12491 (name "python-attrs-bootstrap")
12492 (native-inputs `())
12493 (arguments `(#:tests? #f))))
12494
12495 (define-public python2-attrs-bootstrap
12496 (package-with-python2 python-attrs-bootstrap))
12497
12498 (define-public python2-cliapp
12499 (package
12500 (name "python2-cliapp")
12501 (version "1.20180812.1")
12502 (source
12503 (origin
12504 (method url-fetch)
12505 (uri (string-append
12506 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12507 version ".tar.gz"))
12508 (sha256
12509 (base32
12510 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12511 (build-system python-build-system)
12512 (arguments
12513 `(#:python ,python-2
12514 #:phases
12515 (modify-phases %standard-phases
12516 ;; check phase needs to be run before the build phase. If not,
12517 ;; coverage-test-runner looks for tests for the built source files,
12518 ;; and fails.
12519 (delete 'check)
12520 (add-before 'build 'check
12521 (lambda _
12522 ;; Disable python3 tests
12523 (substitute* "check"
12524 (("python3") "# python3"))
12525 (invoke "./check"))))))
12526 (native-inputs
12527 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12528 ("python2-pep8" ,python2-pep8)))
12529 (propagated-inputs
12530 `(("python2-pyaml" ,python2-pyaml)))
12531 (home-page "https://liw.fi/cliapp/")
12532 (synopsis "Python framework for command line programs")
12533 (description "@code{python2-cliapp} is a python framework for
12534 command line programs. It contains the typical stuff such programs
12535 need to do, such as parsing the command line for options, and
12536 iterating over input files.")
12537 (license license:gpl2+)))
12538
12539 (define-public python2-ttystatus
12540 (package
12541 (name "python2-ttystatus")
12542 (version "0.36")
12543 (source
12544 (origin
12545 (method url-fetch)
12546 (uri (string-append
12547 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12548 version ".tar.gz"))
12549 (sha256
12550 (base32
12551 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12552 (build-system python-build-system)
12553 (native-inputs
12554 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12555 ("python2-pep8" ,python2-pep8)))
12556 (arguments
12557 `(#:python ,python-2
12558 #:phases
12559 (modify-phases %standard-phases
12560 ;; check phase needs to be run before the build phase. If not,
12561 ;; coverage-test-runner looks for tests for the built source files,
12562 ;; and fails.
12563 (delete 'check)
12564 (add-before 'build 'check
12565 (lambda _ (invoke "make" "check"))))))
12566 (home-page "https://liw.fi/ttystatus/")
12567 (synopsis "Python library for showing progress reporting and
12568 status updates on terminals")
12569 (description "@code{python2-ttystatus} is a python library for
12570 showing progress reporting and status updates on terminals, for
12571 command line programs. Output is automatically adapted to the width
12572 of the terminal: truncated if it does not fit, and resized if the
12573 terminal size changes.")
12574 (license license:gpl3+)))
12575
12576 (define-public python2-tracing
12577 (package
12578 (name "python2-tracing")
12579 (version "0.10")
12580 (source
12581 (origin
12582 (method url-fetch)
12583 (uri (string-append
12584 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12585 version ".tar.gz"))
12586 (sha256
12587 (base32
12588 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12589 (build-system python-build-system)
12590 (arguments
12591 `(#:python ,python-2))
12592 (home-page "https://liw.fi/tracing/")
12593 (synopsis "Python debug logging helper")
12594 (description "@code{python2-tracing} is a python library for
12595 logging debug messages. It provides a way to turn debugging messages
12596 on and off, based on the filename they occur in. It is much faster
12597 than using @code{logging.Filter} to accomplish the same thing, which
12598 matters when code is run in production mode. The actual logging still
12599 happens using the @code{logging} library.")
12600 (license license:gpl3+)))
12601
12602 (define-public python2-larch
12603 (package
12604 (name "python2-larch")
12605 (version "1.20151025")
12606 (source
12607 (origin
12608 (method url-fetch)
12609 (uri (string-append
12610 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12611 version ".tar.gz"))
12612 (patches (search-patches
12613 "python2-larch-coverage-4.0a6-compatibility.patch"))
12614 (sha256
12615 (base32
12616 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12617 (build-system python-build-system)
12618 (arguments
12619 `(#:python ,python-2
12620 #:phases
12621 (modify-phases %standard-phases
12622 ;; check phase needs to be run before the build phase. If not,
12623 ;; coverage-test-runner looks for tests for the built source files,
12624 ;; and fails.
12625 (delete 'check)
12626 (add-before 'build 'check
12627 (lambda _ (invoke "make" "check"))))))
12628 (native-inputs
12629 `(("cmdtest" ,cmdtest)
12630 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12631 (propagated-inputs
12632 `(("python2-tracing" ,python2-tracing)))
12633 (home-page "https://liw.fi/larch/")
12634 (synopsis "Python copy-on-write B-tree library")
12635 (description "@code{python2-larch} is an implementation of
12636 particular kind of B-tree, based on research by Ohad Rodeh. See
12637 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12638 on the data structure.
12639
12640 The distinctive feature of this B-tree is that a node is never
12641 (conceptually) modified. Instead, all updates are done by
12642 copy-on-write. This makes it easy to clone a tree, and modify only the
12643 clone, while other processes access the original tree.")
12644 (license license:gpl3+)))
12645
12646 (define-public python-astroid
12647 (package
12648 (name "python-astroid")
12649 (version "2.3.3")
12650 (source
12651 (origin
12652 (method url-fetch)
12653 (uri (pypi-uri "astroid" version))
12654 (sha256
12655 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12656 (build-system python-build-system)
12657 (propagated-inputs
12658 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12659 ("python-six" ,python-six)
12660 ("python-typed-ast" ,python-typed-ast)
12661 ("python-wrapt" ,python-wrapt)))
12662 (native-inputs
12663 `(("python-dateutil" ,python-dateutil)
12664 ("python-nose" ,python-nose)
12665 ("python-pytest" ,python-pytest)
12666 ("python-pytest-runner" ,python-pytest-runner)))
12667 (arguments
12668 `(#:phases
12669 (modify-phases %standard-phases
12670 (add-after 'unpack 'remove-spurious-test
12671 (lambda _
12672 ;; This can be removed after upgrading from python-3.7
12673 ;; https://github.com/PyCQA/astroid/issues/593
12674 ;; https://bugs.python.org/issue34056
12675 (delete-file "astroid/tests/unittest_modutils.py")
12676 #t))
12677 (replace 'check
12678 (lambda _
12679 (invoke "pytest" "astroid"))))))
12680 (home-page "https://github.com/PyCQA/astroid")
12681 (synopsis "Common base representation of python source code for pylint and
12682 other projects")
12683 (description "@code{python-astroid} provides a common base representation
12684 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12685
12686 It provides a compatible representation which comes from the _ast module. It
12687 rebuilds the tree generated by the builtin _ast module by recursively walking
12688 down the AST and building an extended ast. The new node classes have
12689 additional methods and attributes for different usages. They include some
12690 support for static inference and local name scopes. Furthermore, astroid
12691 builds partial trees by inspecting living objects.")
12692 (license license:lgpl2.1+)
12693 (properties `((python2-variant . ,(delay python2-astroid))))))
12694
12695 (define-public python2-astroid
12696 (let ((base (package-with-python2
12697 (strip-python2-variant python-astroid))))
12698 (package (inherit base)
12699 ;; Version 2.x removes python2 support.
12700 (version "1.6.5")
12701 (source
12702 (origin
12703 (method url-fetch)
12704 (uri (pypi-uri "astroid" version))
12705 (sha256
12706 (base32
12707 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12708 (arguments
12709 (substitute-keyword-arguments (package-arguments base)
12710 ((#:phases phases)
12711 `(modify-phases ,phases
12712 (add-after 'unpack 'remove-spurious-test
12713 (lambda _
12714 ;; https://github.com/PyCQA/astroid/issues/276
12715 (delete-file "astroid/tests/unittest_brain.py")
12716 #t))
12717 (replace 'check
12718 (lambda _
12719 (invoke"python" "-m" "unittest" "discover"
12720 "-p" "unittest*.py")))))))
12721 (native-inputs `())
12722 (propagated-inputs
12723 `(("python2-backports-functools-lru-cache"
12724 ,python2-backports-functools-lru-cache)
12725 ("python2-enum34" ,python2-enum34)
12726 ("python2-singledispatch" ,python2-singledispatch)
12727 ,@(alist-delete "python-typed-ast"
12728 (package-propagated-inputs base)))))))
12729
12730 (define-public python-isort
12731 (package
12732 (name "python-isort")
12733 (version "4.3.4")
12734 (source
12735 (origin
12736 (method git-fetch)
12737 (uri (git-reference
12738 ;; Tests pass only from the Github sources
12739 (url "https://github.com/timothycrosley/isort")
12740 (commit version)))
12741 (file-name (git-file-name name version))
12742 (sha256
12743 (base32
12744 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12745 (build-system python-build-system)
12746 (native-inputs
12747 `(("python-mock" ,python-mock)
12748 ("python-pytest" ,python-pytest)))
12749 (home-page "https://github.com/timothycrosley/isort")
12750 (synopsis "Python utility/library to sort python imports")
12751 (description "@code{python-isort} is a python utility/library to sort
12752 imports alphabetically, and automatically separated into sections. It
12753 provides a command line utility, a python library and plugins for various
12754 editors.")
12755 (license license:expat)
12756 (properties `((python2-variant . ,(delay python2-isort))))))
12757
12758 (define-public python2-isort
12759 (let ((base (package-with-python2
12760 (strip-python2-variant python-isort))))
12761 (package (inherit base)
12762 (native-inputs
12763 `(("python2-futures" ,python2-futures)
12764 ,@(package-native-inputs base))))))
12765
12766 (define-public python2-backports-functools-lru-cache
12767 (package
12768 (name "python2-backports-functools-lru-cache")
12769 (version "1.5")
12770 (source
12771 (origin
12772 (method url-fetch)
12773 ;; only the pypi tarballs contain the necessary metadata
12774 (uri (pypi-uri "backports.functools_lru_cache" version))
12775 (sha256
12776 (base32
12777 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12778 (build-system python-build-system)
12779 (native-inputs
12780 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12781 (arguments
12782 `(#:python ,python-2))
12783 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12784 (synopsis "Backport of functools.lru_cache from Python 3.3")
12785 (description "@code{python2-backports-functools-lru-cache} is a backport
12786 of @code{functools.lru_cache} from python 3.3.")
12787 (license license:expat)))
12788
12789 (define-public python-configparser
12790 (package
12791 (name "python-configparser")
12792 (version "4.0.2")
12793 (source
12794 (origin
12795 (method url-fetch)
12796 (uri (pypi-uri "configparser" version))
12797 (sha256
12798 (base32
12799 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
12800 (native-inputs
12801 `(("python-setuptools_scm" ,python-setuptools-scm)))
12802 (build-system python-build-system)
12803 (home-page "https://github.com/jaraco/configparser/")
12804 (synopsis "Backport of configparser from python 3.5")
12805 (description "@code{python-configparser} is a backport of
12806 @code{configparser} from Python 3.5 so that it can be used directly
12807 in other versions.")
12808 (license license:expat)))
12809
12810 (define-public python2-configparser
12811 (package-with-python2 python-configparser))
12812
12813 (define-public python-mando
12814 (package
12815 (name "python-mando")
12816 (version "0.6.4")
12817 (source (origin
12818 (method url-fetch)
12819 (uri (pypi-uri "mando" version))
12820 (sha256
12821 (base32
12822 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12823 (build-system python-build-system)
12824 (propagated-inputs
12825 `(("python-rst2ansi" ,python-rst2ansi)
12826 ("python-six" ,python-six)))
12827 (native-inputs
12828 `(("python-pytest" ,python-pytest)))
12829 (home-page "https://mando.readthedocs.org/")
12830 (synopsis
12831 "Wrapper around argparse, allowing creation of complete CLI applications")
12832 (description
12833 "This package is a wrapper around argparse, allowing you to write complete CLI
12834 applications in seconds while maintaining all the flexibility.")
12835 (license license:expat)))
12836
12837 (define-public python2-mando
12838 (package-with-python2 python-mando))
12839
12840 (define-public python2-argparse
12841 (package
12842 (name "python2-argparse")
12843 (version "1.4.0")
12844 (source
12845 (origin
12846 (method url-fetch)
12847 (uri (pypi-uri "argparse" version))
12848 (sha256
12849 (base32
12850 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12851 (build-system python-build-system)
12852 (arguments
12853 `(#:python ,python-2))
12854 (home-page "https://github.com/ThomasWaldmann/argparse/")
12855 (synopsis "Python command-line parsing library")
12856 (description
12857 "This package is mostly for people who want to have @code{argparse} on
12858 older Pythons because it was not part of the standard library back then.")
12859 (license license:psfl)))
12860
12861 (define-public python-fudge
12862 (package
12863 (name "python-fudge")
12864 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12865 ;; package, which is currently the only use of this package.
12866 (version "0.9.6")
12867 (source
12868 (origin
12869 (method url-fetch)
12870 (uri (pypi-uri "fudge" version))
12871 (sha256
12872 (base32
12873 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12874 (build-system python-build-system)
12875 (arguments
12876 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12877 (home-page "https://github.com/fudge-py/fudge")
12878 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12879 (description
12880 "Fudge is a Python module for using fake objects (mocks and stubs) to
12881 test real ones.
12882
12883 In readable Python code, you declare the methods available on your fake object
12884 and how they should be called. Then you inject that into your application and
12885 start testing. This declarative approach means you don’t have to record and
12886 playback actions and you don’t have to inspect your fakes after running code.
12887 If the fake object was used incorrectly then you’ll see an informative
12888 exception message with a traceback that points to the culprit.")
12889 (license license:expat)))
12890
12891 (define-public python2-fudge
12892 (package-with-python2 python-fudge))
12893
12894 (define-public python-mwclient
12895 (package
12896 (name "python-mwclient")
12897 (version "0.10.0")
12898 (source
12899 (origin
12900 (method git-fetch)
12901 ;; The PyPI version wouldn't contain tests.
12902 (uri (git-reference
12903 (url "https://github.com/mwclient/mwclient")
12904 (commit (string-append "v" version))))
12905 (file-name (git-file-name name version))
12906 (sha256
12907 (base32
12908 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
12909 (build-system python-build-system)
12910 (propagated-inputs
12911 `(("python-requests-oauthlib" ,python-requests-oauthlib)
12912 ("python-six" ,python-six)))
12913 (native-inputs
12914 `(("python-mock" ,python-mock)
12915 ("python-pytest" ,python-pytest)
12916 ("python-pytest-cov" ,python-pytest-cov)
12917 ("python-pytest-runner" ,python-pytest-runner)
12918 ("python-responses" ,python-responses)))
12919 (home-page "https://github.com/btongminh/mwclient")
12920 (synopsis "MediaWiki API client")
12921 (description "This package provides a MediaWiki API client.")
12922 (license license:expat)))
12923
12924 (define-public python2-mwclient
12925 (package-with-python2 python-mwclient))
12926
12927 (define-public python-utils
12928 (package
12929 (name "python-utils")
12930 (version "2.1.0")
12931 (source (origin
12932 (method url-fetch)
12933 (uri (pypi-uri "python-utils" version))
12934 (sha256
12935 (base32
12936 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12937 (build-system python-build-system)
12938 (native-inputs
12939 `(("pytest-runner" ,python-pytest-runner)
12940 ("pytest" ,python-pytest)
12941 ("six" ,python-six)))
12942 (home-page "https://github.com/WoLpH/python-utils")
12943 (synopsis "Convenient utilities not included with the standard Python install")
12944 (description
12945 "Python Utils is a collection of small Python functions and classes which
12946 make common patterns shorter and easier.")
12947 (license license:bsd-2)))
12948
12949 (define-public python2-utils
12950 (package-with-python2 python-utils))
12951
12952 (define-public python-diff-match-patch
12953 (package
12954 (name "python-diff-match-patch")
12955 (version "20121119")
12956 (source
12957 (origin
12958 (method url-fetch)
12959 (uri (pypi-uri "diff-match-patch" version))
12960 (sha256
12961 (base32
12962 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12963 (build-system python-build-system)
12964 (home-page "https://code.google.com/p/google-diff-match-patch")
12965 (synopsis "Synchronize plain text")
12966 (description "Diff Match and Patch libraries offer robust algorithms to
12967 perform the operations required for synchronizing plain text.")
12968 (license license:asl2.0)))
12969
12970 (define-public python2-diff-match-patch
12971 (package-with-python2 python-diff-match-patch))
12972
12973 (define-public python-dirsync
12974 (package
12975 (name "python-dirsync")
12976 (version "2.2.3")
12977 (source
12978 (origin
12979 (method url-fetch)
12980 (uri (pypi-uri "dirsync" version))
12981 (sha256
12982 (base32
12983 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12984 (build-system python-build-system)
12985 (propagated-inputs
12986 `(("six" ,python-six)))
12987 (home-page "https://bitbucket.org/tkhyn/dirsync")
12988 (synopsis "Advanced directory tree synchronisation tool")
12989 (description "Advanced directory tree synchronisation tool.")
12990 (license license:expat)))
12991
12992 (define-public python2-dirsync
12993 (package-with-python2 python-dirsync))
12994
12995 (define-public python-levenshtein
12996 (package
12997 (name "python-levenshtein")
12998 (version "0.12.0")
12999 (source
13000 (origin
13001 (method url-fetch)
13002 (uri (pypi-uri "python-Levenshtein" version))
13003 (sha256
13004 (base32
13005 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13006 (build-system python-build-system)
13007 (home-page "https://github.com/ztane/python-Levenshtein")
13008 (synopsis "Fast computation of Levenshtein distance and string similarity")
13009 (description
13010 "The Levenshtein Python C extension module contains functions for fast computation of
13011 @enumerate
13012 @item Levenshtein (edit) distance, and edit operations
13013 @item string similarity
13014 @item approximate median strings, and generally string averaging
13015 @item string sequence and set similarity
13016 @end enumerate
13017 It supports both normal and Unicode strings.")
13018 (license license:gpl2+)))
13019
13020 (define-public python2-levenshtein
13021 (package-with-python2 python-levenshtein))
13022
13023 (define-public python-scandir
13024 (package
13025 (name "python-scandir")
13026 (version "1.10.0")
13027 (source
13028 (origin
13029 (method url-fetch)
13030 (uri (pypi-uri "scandir" version))
13031 (sha256
13032 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
13033 (build-system python-build-system)
13034 (arguments
13035 `(#:phases (modify-phases %standard-phases
13036 (replace 'check
13037 (lambda _
13038 (invoke "python" "test/run_tests.py"))))))
13039 (home-page "https://github.com/benhoyt/scandir")
13040 (synopsis "Directory iteration function")
13041 (description
13042 "Directory iteration function like os.listdir(), except that instead of
13043 returning a list of bare filenames, it yields DirEntry objects that include
13044 file type and stat information along with the name. Using scandir() increases
13045 the speed of os.walk() by 2-20 times (depending on the platform and file
13046 system) by avoiding unnecessary calls to os.stat() in most cases.
13047
13048 This package is part of the Python standard library since version 3.5.")
13049 (license license:bsd-3)))
13050
13051 (define-public python2-scandir
13052 (package-with-python2 python-scandir))
13053
13054 (define-public python2-stemming
13055 (package
13056 (name "python2-stemming")
13057 (version "1.0.1")
13058 (source
13059 (origin
13060 (method url-fetch)
13061 (uri (pypi-uri "stemming" version))
13062 (sha256
13063 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13064 (build-system python-build-system)
13065 (arguments
13066 `(#:python ,python-2))
13067 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13068 (synopsis "Python implementations of various stemming algorithms")
13069 (description
13070 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13071 stemming algorithms for English. These implementations are straightforward and
13072 efficient, unlike some Python versions of the same algorithms available on the
13073 Web. This package is an extraction of the stemming code included in the Whoosh
13074 search engine.")
13075 (license license:public-domain)))
13076
13077 (define-public python-factory-boy
13078 (package
13079 (name "python-factory-boy")
13080 (version "2.8.1")
13081 (source
13082 (origin
13083 (method url-fetch)
13084 (uri (pypi-uri "factory_boy" version))
13085 (sha256
13086 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13087 (build-system python-build-system)
13088 (arguments
13089 ;; Tests are not included in the tarball.
13090 `(#:tests? #f))
13091 (propagated-inputs
13092 `(("faker" ,python-faker)))
13093 (home-page "https://github.com/benhoyt/scandir")
13094 (synopsis "Versatile test fixtures replacement")
13095 (description
13096 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13097
13098 As a fixtures replacement tool, it aims to replace static, hard to maintain
13099 fixtures with easy-to-use factories for complex object.
13100
13101 Instead of building an exhaustive test setup with every possible combination
13102 of corner cases, factory_boy allows you to use objects customized for the
13103 current test, while only declaring the test-specific fields")
13104 (license license:expat)))
13105
13106 (define-public python2-factory-boy
13107 (package-with-python2 python-factory-boy))
13108
13109 (define-public python-translate-toolkit
13110 (package
13111 (name "python-translate-toolkit")
13112 (version "2.1.0")
13113 (source
13114 (origin
13115 (method url-fetch)
13116 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13117 (sha256
13118 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13119 (build-system python-build-system)
13120 (native-inputs
13121 `(("python-pytest" ,python-pytest)
13122 ("python-sphinx" ,python-sphinx)))
13123 (propagated-inputs
13124 `(("python-babel" ,python-babel)
13125 ("python-beautifulsoup4" ,python-beautifulsoup4)
13126 ("python-chardet" ,python-chardet)
13127 ("python-diff-match-patch" ,python-diff-match-patch)
13128 ("python-levenshtein" ,python-levenshtein)
13129 ("python-lxml" ,python-lxml)
13130 ("python-six" ,python-six)
13131 ("python-vobject" ,python-vobject)
13132 ("python-pyyaml" ,python-pyyaml)))
13133 (arguments
13134 ;; TODO: tests are not run, because they end with
13135 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13136 ;; 'parse_funcs'
13137 ;; during test setup.
13138 `(#:tests? #f))
13139 (home-page "https://toolkit.translatehouse.org")
13140 (synopsis "Tools and API for translation and localization engineering")
13141 (description
13142 "Tools and API for translation and localization engineering. It contains
13143 several utilities, as well as an API for building localization tools.")
13144 (license license:gpl2+)))
13145
13146 (define-public python2-translate-toolkit
13147 (package-with-python2 python-translate-toolkit))
13148
13149 (define-public python-packaging
13150 (package
13151 (name "python-packaging")
13152 (version "20.0")
13153 (source
13154 (origin
13155 (method url-fetch)
13156 (uri (pypi-uri "packaging" version))
13157 ;; XXX: The URL in the patch file is wrong, it should be
13158 ;; <https://github.com/pypa/packaging/pull/256>.
13159 (patches (search-patches "python-packaging-test-arch.patch"))
13160 (sha256
13161 (base32
13162 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
13163 (build-system python-build-system)
13164 (arguments
13165 `(#:phases (modify-phases %standard-phases
13166 (replace 'check
13167 (lambda* (#:key tests? #:allow-other-keys)
13168 (if tests?
13169 (invoke "py.test" "-vv")
13170 (format #t "test suite not run~%"))
13171 #t)))))
13172 (native-inputs
13173 `(("python-pretend" ,python-pretend)
13174 ("python-pytest" ,python-pytest)))
13175 (propagated-inputs
13176 `(("python-pyparsing" ,python-pyparsing)
13177 ("python-six" ,python-six)))
13178 (home-page "https://github.com/pypa/packaging")
13179 (synopsis "Core utilities for Python packages")
13180 (description "Packaging is a Python module for dealing with Python packages.
13181 It offers an interface for working with package versions, names, and dependency
13182 information.")
13183 ;; From 'LICENSE': This software is made available under the terms of
13184 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13185 ;; Contributions to this software is made under the terms of *both* these
13186 ;; licenses.
13187 (license (list license:asl2.0 license:bsd-2))))
13188
13189 (define-public python2-packaging
13190 (package-with-python2 python-packaging))
13191
13192 ;; Variants with minimal dependencies, for bootstrapping Pytest.
13193 (define-public python-packaging-bootstrap
13194 (hidden-package
13195 (package/inherit
13196 python-packaging
13197 (name "python-packaging-bootstrap")
13198 (native-inputs '())
13199 (propagated-inputs
13200 `(("python-pyparsing" ,python-pyparsing)))
13201 (arguments '(#:tests? #f)))))
13202
13203 (define-public python2-packaging-bootstrap
13204 (hidden-package
13205 (package/inherit
13206 python2-packaging
13207 (name "python2-packaging-bootstrap")
13208 (native-inputs '())
13209 (propagated-inputs
13210 `(("python-pyparsing" ,python2-pyparsing)))
13211 (arguments
13212 `(#:tests? #f
13213 ,@(package-arguments python2-packaging))))))
13214
13215 (define-public python-relatorio
13216 (package
13217 (name "python-relatorio")
13218 (version "0.8.0")
13219 (source
13220 (origin
13221 (method url-fetch)
13222 (uri (pypi-uri "relatorio" version))
13223 (sha256
13224 (base32
13225 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13226 (build-system python-build-system)
13227 (propagated-inputs
13228 `(("python-lxml" ,python-lxml)
13229 ("python-genshi" ,python-genshi)))
13230 (native-inputs
13231 `(("python-magic" ,python-magic)))
13232 (home-page "https://relatorio.tryton.org/")
13233 (synopsis "Templating library able to output ODT and PDF files")
13234 (description "Relatorio is a templating library which provides a way to
13235 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13236 for more filetypes can be easily added by creating plugins for them.")
13237 (license license:gpl3+)))
13238
13239 (define-public python2-relatorio
13240 (package-with-python2 python-relatorio))
13241
13242 (define-public python-radon
13243 (package
13244 (name "python-radon")
13245 (version "2.2.0")
13246 (source
13247 (origin
13248 (method url-fetch)
13249 (uri (pypi-uri "radon" version))
13250 (sha256
13251 (base32
13252 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13253 (build-system python-build-system)
13254 (arguments
13255 `(#:phases (modify-phases %standard-phases
13256 (replace 'check
13257 (lambda _
13258 (invoke "python" "radon/tests/run.py"))))))
13259 (propagated-inputs
13260 `(("python-colorama" ,python-colorama)
13261 ("python-flake8-polyfill" ,python-flake8-polyfill)
13262 ("python-mando" ,python-mando)))
13263 (native-inputs
13264 `(("python-pytest" ,python-pytest)
13265 ("python-pytest-mock" ,python-pytest-mock)))
13266 (home-page "https://radon.readthedocs.org/")
13267 (synopsis "Code Metrics in Python")
13268 (description "Radon is a Python tool which computes various code metrics.
13269 Supported metrics are:
13270 @itemize @bullet
13271 @item raw metrics: SLOC, comment lines, blank lines, &c.
13272 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13273 @item Halstead metrics (all of them)
13274 @item the Maintainability Index (a Visual Studio metric)
13275 @end itemize")
13276 (license license:expat)))
13277
13278 (define-public python2-radon
13279 (package-with-python2 python-radon))
13280
13281 (define-public python-sure
13282 (package
13283 (name "python-sure")
13284 (version "1.4.11")
13285 (source
13286 (origin
13287 (method url-fetch)
13288 (uri (pypi-uri "sure" version))
13289 (sha256
13290 (base32
13291 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13292 (build-system python-build-system)
13293 (propagated-inputs
13294 `(("python-mock" ,python-mock)
13295 ("python-six" ,python-six)))
13296 (native-inputs
13297 `(("python-nose" ,python-nose)))
13298 (home-page "https://github.com/gabrielfalcao/sure")
13299 (synopsis "Automated testing library in python for python")
13300 (description
13301 "Sure is a python library that leverages a DSL for writing assertions.
13302 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13303 (license license:gpl3+)))
13304
13305 (define-public python2-sure
13306 (package-with-python2 python-sure))
13307
13308 (define-public python2-couleur
13309 ;; This package does not seem to support python3 at all, hence,
13310 ;; only the python2 variant definition is provided.
13311 (package
13312 (name "python2-couleur")
13313 (version "0.6.2")
13314 (source
13315 (origin
13316 (method url-fetch)
13317 (uri (pypi-uri "couleur" version))
13318 (sha256
13319 (base32
13320 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13321 (build-system python-build-system)
13322 (arguments
13323 `(#:python ,python-2))
13324 (home-page "https://github.com/gabrielfalcao/couleur")
13325 (synopsis
13326 "ANSI terminal tool for python, colored shell and other handy fancy features")
13327 (description
13328 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13329 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13330 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13331 ;; https://github.com/gabrielfalcao/couleur/issues/11
13332 (license license:lgpl3+)))
13333
13334 (define-public python-misaka
13335 (package
13336 (name "python-misaka")
13337 (version "2.1.1")
13338 (source
13339 (origin
13340 (method url-fetch)
13341 (uri (pypi-uri "misaka" version))
13342 (sha256
13343 (base32
13344 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13345 (build-system python-build-system)
13346 (arguments
13347 `(;; Line 37 of setup.py calls self.run_command('develop')
13348 ;; in the 'check' phase. This command seems to be trying
13349 ;; to write to
13350 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13351 ;; for which it does not have the permission to write.
13352 #:tests? #f))
13353 (propagated-inputs
13354 `(("python-cffi" ,python-cffi)))
13355 (home-page "https://github.com/FSX/misaka")
13356 (synopsis "Python binding for Hoedown")
13357 (description
13358 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13359 library written in C. It features a fast HTML renderer and functionality to make custom
13360 renderers (e.g. man pages or LaTeX).")
13361 (license license:expat)))
13362
13363 (define-public python2-misaka
13364 (package-with-python2 python-misaka))
13365
13366 (define-public python2-steadymark
13367 ;; This is forced into being a python2 only variant
13368 ;; due to its dependence on couleur that has no support
13369 ;; for python3
13370 (package
13371 (name "python2-steadymark")
13372 (version "0.7.3")
13373 (source
13374 (origin
13375 (method url-fetch)
13376 (uri (pypi-uri "steadymark" version))
13377 (sha256
13378 (base32
13379 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13380 (build-system python-build-system)
13381 (native-inputs
13382 `(("python-couleur" ,python2-couleur)
13383 ("python-sure" ,python2-sure)
13384 ("python-misaka" ,python2-misaka)))
13385 (arguments
13386 `(#:python ,python-2
13387 #:phases
13388 (modify-phases %standard-phases
13389 (add-before 'build 'patch-setup-py
13390 (lambda _
13391 ;; Update requirements from dependency==version
13392 ;; to dependency>=version
13393 (substitute* "setup.py"
13394 (("==") ">="))
13395 #t)))))
13396 (home-page "https://github.com/gabrielfalcao/steadymark")
13397 (synopsis "Markdown-based test runner for python")
13398 (description
13399 "@code{Steadymark} allows documentation to be written in github-flavoured
13400 markdown. The documentation may contain snippets of code surrounded by python
13401 code blocks and @code{Steadymark} will find these snippets and run them, making
13402 sure that there are no old malfunctional examples in the documentation examples.")
13403 (license license:expat)))
13404
13405 (define-public python-jsonpointer
13406 (package
13407 (name "python-jsonpointer")
13408 (version "1.10")
13409 (source
13410 (origin
13411 (method url-fetch)
13412 (uri (pypi-uri "jsonpointer" version))
13413 (sha256
13414 (base32
13415 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13416 (build-system python-build-system)
13417 (home-page "https://github.com/stefankoegl/python-json-pointer")
13418 (synopsis "Identify specific nodes in a JSON document")
13419 (description "@code{jsonpointer} allows you to access specific nodes
13420 by path in a JSON document (see RFC 6901).")
13421 (license license:bsd-3)))
13422
13423 (define-public python2-jsonpointer
13424 (package-with-python2 python-jsonpointer))
13425
13426 (define-public python-jsonpatch
13427 (package
13428 (name "python-jsonpatch")
13429 (version "1.16")
13430 (source
13431 (origin
13432 (method git-fetch)
13433 ;; pypi version lacks tests.js
13434 (uri (git-reference
13435 (url "https://github.com/stefankoegl/python-json-patch")
13436 (commit (string-append "v" version))))
13437 (file-name (git-file-name name version))
13438 (sha256
13439 (base32
13440 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
13441 (build-system python-build-system)
13442 (native-inputs
13443 `(("python-jsonpointer" ,python-jsonpointer)))
13444 (home-page "https://github.com/stefankoegl/python-json-patch")
13445 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13446 (description "@code{jsonpatch} is a library and program that allows
13447 applying JSON Patches according to RFC 6902.")
13448 (license license:bsd-3)))
13449
13450 (define-public python2-jsonpatch
13451 (package-with-python2 python-jsonpatch))
13452
13453 (define-public python-jsonpatch-0.4
13454 (package (inherit python-jsonpatch)
13455 (name "python-jsonpatch")
13456 (version "0.4")
13457 (source
13458 (origin
13459 (method git-fetch)
13460 (uri (git-reference
13461 (url "https://github.com/stefankoegl/python-json-patch")
13462 (commit (string-append "v" version))))
13463 (file-name (git-file-name name version))
13464 (sha256
13465 (base32
13466 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
13467
13468 (define-public python2-jsonpatch-0.4
13469 (package-with-python2 python-jsonpatch-0.4))
13470
13471 (define-public python-rfc3986
13472 (package
13473 (name "python-rfc3986")
13474 (version "1.1.0")
13475 (source (origin
13476 (method url-fetch)
13477 (uri (pypi-uri "rfc3986" version))
13478 (sha256
13479 (base32
13480 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13481 (build-system python-build-system)
13482 (arguments
13483 `(#:modules ((guix build utils)
13484 (guix build python-build-system)
13485 (ice-9 ftw)
13486 (srfi srfi-1)
13487 (srfi srfi-26))
13488 #:phases
13489 (modify-phases %standard-phases
13490 (replace 'check
13491 (lambda _
13492 (let ((cwd (getcwd)))
13493 (setenv "PYTHONPATH"
13494 (string-append cwd "/build/"
13495 (find (cut string-prefix? "lib" <>)
13496 (scandir (string-append cwd "/build")))
13497 ":"
13498 (getenv "PYTHONPATH")))
13499 (invoke "pytest" "-v")))))))
13500 (native-inputs
13501 `(("python-pytest" ,python-pytest)))
13502 (home-page "https://rfc3986.readthedocs.io/")
13503 (synopsis "Parse and validate URI references")
13504 (description
13505 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13506 validation and authority parsing. This module also supports RFC@tie{}6874
13507 which adds support for zone identifiers to IPv6 addresses.")
13508 (license license:asl2.0)))
13509
13510 (define-public python2-rfc3986
13511 (package-with-python2 python-rfc3986))
13512
13513 (define-public python-rfc3987
13514 (package
13515 (name "python-rfc3987")
13516 (version "1.3.7")
13517 (source
13518 (origin
13519 (method url-fetch)
13520 (uri (pypi-uri "rfc3987" version))
13521 (sha256
13522 (base32
13523 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13524 (build-system python-build-system)
13525 (home-page "https://pypi.python.org/pypi/rfc3987")
13526 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13527 (description "@code{rfc3987} provides routines for parsing and
13528 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13529 (license license:gpl3+)))
13530
13531 (define-public python2-rfc3987
13532 (package-with-python2 python-rfc3987))
13533
13534 (define-public python-validate-email
13535 (package
13536 (name "python-validate-email")
13537 (version "1.3")
13538 (source
13539 (origin
13540 (method url-fetch)
13541 (uri (pypi-uri "validate_email" version))
13542 (sha256
13543 (base32
13544 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13545 (build-system python-build-system)
13546 (home-page "https://github.com/syrusakbary/validate_email")
13547 (synopsis "Verifies if an email address is valid and really exists")
13548 (description "@code{validate_email} can be used to verify if an email
13549 address is valid and really exists.")
13550 (license license:lgpl3+)))
13551
13552 (define-public python2-validate-email
13553 (package-with-python2 python-validate-email))
13554
13555 (define-public python-flex
13556 (package
13557 (name "python-flex")
13558 (version "6.10.0")
13559 (source
13560 (origin
13561 (method url-fetch)
13562 (uri (pypi-uri "flex" version))
13563 (sha256
13564 (base32
13565 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13566 (build-system python-build-system)
13567 (propagated-inputs
13568 `(("python-click" ,python-click)
13569 ("python-iso8601" ,python-iso8601)
13570 ("python-jsonpointer" ,python-jsonpointer)
13571 ("python-pyyaml" ,python-pyyaml)
13572 ("python-requests" ,python-requests)
13573 ("python-rfc3987" ,python-rfc3987)
13574 ("python-six" ,python-six)
13575 ("python-validate-email" ,python-validate-email)))
13576 (home-page "https://github.com/pipermerriam/flex")
13577 (synopsis "Validates Swagger schemata")
13578 (description "@code{flex} can be used to validate Swagger schemata.")
13579 (license license:bsd-3)))
13580
13581 (define-public python2-flex
13582 (package-with-python2 python-flex))
13583
13584 (define-public python-marshmallow
13585 (package
13586 (name "python-marshmallow")
13587 (version "3.0.0b14")
13588 (source
13589 (origin
13590 (method url-fetch)
13591 (uri (pypi-uri "marshmallow" version))
13592 (sha256
13593 (base32
13594 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13595 (build-system python-build-system)
13596 (propagated-inputs
13597 `(("python-dateutil" ,python-dateutil)
13598 ("python-simplejson" ,python-simplejson)))
13599 (native-inputs
13600 `(("python-pytest" ,python-pytest)
13601 ("python-pytz" ,python-pytz)))
13602 (home-page "https://github.com/marshmallow-code/marshmallow")
13603 (synopsis "Convert complex datatypes to and from native
13604 Python datatypes.")
13605 (description "@code{marshmallow} provides a library for converting
13606 complex datatypes to and from native Python datatypes.")
13607 (license license:expat)))
13608
13609 (define-public python2-marshmallow
13610 (package-with-python2 python-marshmallow))
13611
13612 (define-public python-apispec
13613 (package
13614 (name "python-apispec")
13615 (version "0.25.3")
13616 (source
13617 (origin
13618 (method url-fetch)
13619 (uri (pypi-uri "apispec" version))
13620 (sha256
13621 (base32
13622 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13623 (build-system python-build-system)
13624 (propagated-inputs
13625 `(("python-pyyaml" ,python-pyyaml)))
13626 (native-inputs
13627 `(("python-pytest" ,python-pytest)
13628 ("python-flask" ,python-flask)
13629 ("python-marshmallow" ,python-marshmallow)
13630 ("python-tornado" ,python-tornado)
13631 ("python-bottle" ,python-bottle)
13632 ("python-mock" ,python-mock)))
13633 (home-page "https://github.com/marshmallow-code/apispec")
13634 (synopsis "Swagger 2.0 API specification generator")
13635 (description "@code{python-apispec} is a pluggable API specification
13636 generator. Currently supports the OpenAPI specification (f.k.a.
13637 Swagger 2.0).")
13638 (license license:expat)))
13639
13640 (define-public python2-apispec
13641 (package-with-python2 python-apispec))
13642
13643 (define-public python-flasgger
13644 (package
13645 (name "python-flasgger")
13646 (version "0.6.3")
13647 (source
13648 (origin
13649 (method git-fetch)
13650 (uri (git-reference
13651 (url "https://github.com/rochacbruno/flasgger.git")
13652 (commit version)))
13653 (file-name (git-file-name name version))
13654 (sha256
13655 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13656 (build-system python-build-system)
13657 (arguments
13658 `(#:phases
13659 (modify-phases %standard-phases
13660 (replace 'check
13661 (lambda* (#:key inputs outputs #:allow-other-keys)
13662 (substitute* "Makefile"
13663 (("flake8 flasgger --ignore=F403")
13664 "flake8 flasgger --ignore=E731,F403"))
13665 (setenv "PYTHONPATH" (string-append (getcwd)
13666 ":"
13667 (getenv "PYTHONPATH")))
13668 (invoke "py.test"))))))
13669 (propagated-inputs
13670 `(("python-flask" ,python-flask)
13671 ("python-pyyaml" ,python-pyyaml)
13672 ("python-jsonschema" ,python-jsonschema)
13673 ("python-mistune" ,python-mistune)
13674 ("python-six" ,python-six)))
13675 (native-inputs
13676 `(("python-decorator" ,python-decorator)
13677 ("python-flake8" ,python-flake8)
13678 ("python-flask-restful" ,python-flask-restful)
13679 ("python-flex" ,python-flex)
13680 ("python-pytest" ,python-pytest)
13681 ("python-pytest-cov" ,python-pytest-cov)
13682 ("python-marshmallow" ,python-marshmallow)
13683 ("python-apispec" ,python-apispec)))
13684 (home-page "https://github.com/rochacbruno/flasgger/")
13685 (synopsis "Extract Swagger specs from your Flask project")
13686 (description "@code{python-flasgger} allows extracting Swagger specs
13687 from your Flask project. It is a fork of Flask-Swagger.")
13688 (license license:expat)))
13689
13690 (define-public python2-flasgger
13691 (package-with-python2 python-flasgger))
13692
13693 (define-public python-swagger-spec-validator
13694 (package
13695 (name "python-swagger-spec-validator")
13696 (version "2.4.3")
13697 (source
13698 (origin
13699 (method url-fetch)
13700 (uri (pypi-uri "swagger-spec-validator" version))
13701 (sha256
13702 (base32
13703 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13704 (build-system python-build-system)
13705 (propagated-inputs
13706 `(("python-jsonschema" ,python-jsonschema)
13707 ("python-pyyaml" ,python-pyyaml)
13708 ("python-six" ,python-six)))
13709 (home-page
13710 "https://github.com/Yelp/swagger_spec_validator")
13711 (synopsis "Validation of Swagger specifications")
13712 (description "@code{swagger_spec_validator} provides a library for
13713 validating Swagger API specifications.")
13714 (license license:asl2.0)))
13715
13716 (define-public python2-swagger-spec-validator
13717 (package-with-python2 python-swagger-spec-validator))
13718
13719 (define-public python-apache-libcloud
13720 (package
13721 (name "python-apache-libcloud")
13722 (version "2.4.0")
13723 (source
13724 (origin
13725 (method url-fetch)
13726 (uri (pypi-uri "apache-libcloud" version))
13727 (sha256
13728 (base32
13729 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13730 (build-system python-build-system)
13731 (arguments
13732 `(#:phases
13733 (modify-phases %standard-phases
13734 (add-after 'unpack 'patch-ssh
13735 (lambda* (#:key inputs #:allow-other-keys)
13736 (substitute* "libcloud/compute/ssh.py"
13737 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13738 "/bin/ssh" "'")))
13739 #t))
13740 (add-after 'unpack 'patch-tests
13741 (lambda _
13742 (substitute* "./libcloud/test/test_file_fixtures.py"
13743 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13744 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13745 return (httplib.OK,
13746 \"1234abcd\",
13747 {\"test\": \"value\"},
13748 httplib.responses[httplib.OK])
13749 def _ascii"))
13750 (substitute* "libcloud/test/compute/test_ssh_client.py"
13751 (("class ShellOutSSHClientTests")
13752 "@unittest.skip(\"Guix container doesn't have ssh service\")
13753 class ShellOutSSHClientTests")
13754 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13755 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13756 (("'.xF0', '.x90', '.x8D', '.x88'")
13757 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13758 #t))
13759 (add-before 'check 'copy-secret
13760 (lambda _
13761 (copy-file "libcloud/test/secrets.py-dist"
13762 "libcloud/test/secrets.py")
13763 #t)))))
13764 (inputs
13765 `(("openssh" ,openssh)))
13766 (propagated-inputs
13767 `(("python-paramiko" ,python-paramiko)
13768 ("python-requests" ,python-requests)))
13769 (native-inputs
13770 `(("python-lockfile" ,python-lockfile)
13771 ("python-mock" ,python-mock)
13772 ("python-pytest" ,python-pytest)
13773 ("python-pytest-runner" ,python-pytest-runner)
13774 ("python-requests-mock" ,python-requests-mock)))
13775 (home-page "https://libcloud.apache.org/")
13776 (synopsis "Unified Cloud API")
13777 (description "@code{libcloud} is a Python library for interacting with
13778 many of the popular cloud service providers using a unified API.")
13779 (license license:asl2.0)))
13780
13781 (define-public python2-apache-libcloud
13782 (package-with-python2 python-apache-libcloud))
13783
13784 (define-public python-smmap2
13785 (package
13786 (name "python-smmap2")
13787 (version "2.0.5")
13788 (source
13789 (origin
13790 (method url-fetch)
13791 (uri (pypi-uri "smmap2" version))
13792 (sha256
13793 (base32 "16k03pcnxd3lgzwgbd7nl4jwzm1wmahirvd09kljnzvy96hgza99"))))
13794 (build-system python-build-system)
13795 (native-inputs
13796 `(("python-nosexcover" ,python-nosexcover)))
13797 (home-page "https://github.com/Byron/smmap")
13798 (synopsis "Python sliding window memory map manager")
13799 (description "@code{smmap2} is a pure Python implementation of a sliding
13800 window memory map manager.")
13801 (license license:bsd-3)))
13802
13803 (define-public python2-smmap2
13804 (package-with-python2 python-smmap2))
13805
13806 (define-public python-regex
13807 (package
13808 (name "python-regex")
13809 (version "2019.04.14")
13810 (source (origin
13811 (method url-fetch)
13812 (uri (pypi-uri "regex" version))
13813 (sha256
13814 (base32
13815 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13816 ;; TODO: Fix and enable regex_test.py tests that complain about the
13817 ;; test.support module not existing.
13818 (build-system python-build-system)
13819 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13820 (synopsis "Alternative regular expression module")
13821 (description "This regular expression implementation is backwards-
13822 compatible with the standard @code{re} module, but offers additional
13823 functionality like full case-folding for case-insensitive matches in Unicode.")
13824 (license license:psfl)))
13825
13826 (define-public python2-regex
13827 (package-with-python2 python-regex))
13828
13829 (define-public python2-pyopengl
13830 (package
13831 (name "python2-pyopengl")
13832 (version "3.1.0")
13833 (source
13834 (origin
13835 (method url-fetch)
13836 (uri (pypi-uri "PyOpenGL" version))
13837 (sha256
13838 (base32
13839 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13840 (arguments
13841 `(#:python ,python-2))
13842 (build-system python-build-system)
13843 (home-page "http://pyopengl.sourceforge.net")
13844 (synopsis "Standard OpenGL bindings for Python")
13845 (description
13846 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13847 related APIs. The binding is created using the standard @code{ctypes}
13848 library.")
13849 (license license:bsd-3)))
13850
13851 (define-public python2-pyopengl-accelerate
13852 (package
13853 (inherit python2-pyopengl)
13854 (name "python2-pyopengl-accelerate")
13855 (version "3.1.0")
13856 (source
13857 (origin
13858 (method url-fetch)
13859 (uri (pypi-uri "PyOpenGL-accelerate" version))
13860 (sha256
13861 (base32
13862 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13863 (synopsis "Acceleration code for PyOpenGL")
13864 (description
13865 "This is the Cython-coded accelerator module for PyOpenGL.")))
13866
13867 (define-public python-rencode
13868 (package
13869 (name "python-rencode")
13870 (version "1.0.5")
13871 (source
13872 (origin
13873 (method url-fetch)
13874 (uri (pypi-uri "rencode" version))
13875 (sha256
13876 (base32
13877 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13878 (build-system python-build-system)
13879 (arguments
13880 `(#:phases
13881 (modify-phases %standard-phases
13882 (add-before 'check 'delete-bogus-test
13883 ;; This test requires /home/aresch/Downloads, which is not provided by
13884 ;; the build environment.
13885 (lambda _
13886 (delete-file "rencode/t.py")
13887 #t)))))
13888 (native-inputs `(("pkg-config" ,pkg-config)
13889 ("python-cython" ,python-cython)))
13890 (home-page "https://github.com/aresch/rencode")
13891 (synopsis "Serialization of heterogeneous data structures")
13892 (description
13893 "The @code{rencode} module is a data structure serialization library,
13894 similar to @code{bencode} from the BitTorrent project. For complex,
13895 heterogeneous data structures with many small elements, r-encoding stake up
13896 significantly less space than b-encodings. This version of rencode is a
13897 complete rewrite in Cython to attempt to increase the performance over the
13898 pure Python module.")
13899 (license license:bsd-3)))
13900
13901 (define-public python2-rencode
13902 (package-with-python2 python-rencode))
13903
13904 (define-public python-xenon
13905 (package
13906 (name "python-xenon")
13907 (version "0.5.4")
13908 (source
13909 (origin
13910 (method url-fetch)
13911 (uri (pypi-uri "xenon" version))
13912 (sha256
13913 (base32
13914 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13915 (build-system python-build-system)
13916 (native-inputs
13917 `(("python-pyyaml" ,python-pyyaml)
13918 ("python-radon" ,python-radon)
13919 ("python-requests" ,python-requests)
13920 ("python-flake8" ,python-flake8)
13921 ("python-tox" ,python-tox)))
13922 (arguments
13923 `(#:phases
13924 (modify-phases %standard-phases
13925 (add-before 'build 'patch-test-requirements
13926 (lambda _
13927 ;; Remove httpretty dependency for tests.
13928 (substitute* "setup.py"
13929 (("httpretty") ""))
13930 #t)))))
13931 (home-page "https://xenon.readthedocs.org/")
13932 (synopsis "Monitor code metrics for Python on your CI server")
13933 (description
13934 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13935 Ideally, @code{xenon} is run every time code is committed. Through command
13936 line options, various thresholds can be set for the complexity of code. It
13937 will fail (i.e. it will exit with a non-zero exit code) when any of these
13938 requirements is not met.")
13939 (license license:expat)))
13940
13941 (define-public python2-xenon
13942 (package-with-python2 python-xenon))
13943
13944 (define-public python-pysocks
13945 (package
13946 (name "python-pysocks")
13947 (version "1.7.0")
13948 (source
13949 (origin
13950 (method url-fetch)
13951 (uri (pypi-uri "PySocks" version))
13952 (sha256
13953 (base32
13954 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13955 (build-system python-build-system)
13956 (arguments `(#:tests? #f))
13957 (home-page "https://github.com/Anorov/PySocks")
13958 (synopsis "SOCKS client module")
13959 (description "@code{pysocks} is an updated and semi-actively maintained
13960 version of @code{SocksiPy} with bug fixes and extra features.")
13961 (license license:bsd-3)))
13962
13963 (define-public python2-pysocks
13964 (package-with-python2 python-pysocks))
13965
13966 (define-public python-pydiff
13967 (package
13968 (name "python-pydiff")
13969 (version "0.2")
13970 (source
13971 (origin
13972 (method url-fetch)
13973 (uri (pypi-uri "pydiff" version))
13974 (sha256
13975 (base32
13976 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13977 (build-system python-build-system)
13978 (home-page "https://github.com/myint/pydiff")
13979 (synopsis "Library to diff two Python files at the bytecode level")
13980 (description
13981 "@code{pydiff} makes it easy to look for actual code changes while
13982 ignoring formatting changes.")
13983 (license license:expat)))
13984
13985 (define-public python2-pydiff
13986 (package-with-python2 python-pydiff))
13987
13988 (define-public python-tqdm
13989 (package
13990 (name "python-tqdm")
13991 (version "4.19.6")
13992 (source
13993 (origin
13994 (method url-fetch)
13995 (uri (pypi-uri "tqdm" version))
13996 (sha256
13997 (base32
13998 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13999 (build-system python-build-system)
14000 (native-inputs
14001 `(("python-flake8" ,python-flake8)
14002 ("python-nose" ,python-nose)
14003 ("python-coverage" ,python-coverage)))
14004 (home-page "https://github.com/tqdm/tqdm")
14005 (synopsis "Fast, extensible progress meter")
14006 (description
14007 "Make loops show a progress bar on the console by just wrapping any
14008 iterable with @code{|tqdm(iterable)|}. Offers many options to define
14009 design and layout.")
14010 (license (list license:mpl2.0 license:expat))
14011 (properties `((python2-variant . ,(delay python2-tqdm))))))
14012
14013 (define-public python2-tqdm
14014 (let ((tqdm (package-with-python2
14015 (strip-python2-variant python-tqdm))))
14016 (package (inherit tqdm)
14017 (native-inputs `(("python2-functools32" ,python2-functools32)
14018 ,@(package-native-inputs tqdm))))))
14019
14020 (define-public python-pkginfo
14021 (package
14022 (name "python-pkginfo")
14023 (version "1.4.2")
14024 (source
14025 (origin
14026 (method url-fetch)
14027 (uri (pypi-uri "pkginfo" version))
14028 (sha256
14029 (base32
14030 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14031 (build-system python-build-system)
14032 (arguments
14033 ;; The tests are broken upstream.
14034 '(#:tests? #f))
14035 (home-page
14036 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14037 (synopsis
14038 "Query metadatdata from sdists, bdists, and installed packages")
14039 (description
14040 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14041 source distriubtion (an sdist) or a binary distribution (e.g., created by
14042 running bdist_egg). It can also query the EGG-INFO directory of an installed
14043 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14044 created by running @code{python setup.py develop}).")
14045 (license license:expat)))
14046
14047 (define-public python2-pkginfo
14048 (package-with-python2 python-pkginfo))
14049
14050 (define-public python-twine
14051 (package
14052 (name "python-twine")
14053 (version "1.9.1")
14054 (source
14055 (origin
14056 (method url-fetch)
14057 (uri (pypi-uri "twine" version))
14058 (sha256
14059 (base32
14060 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14061 (build-system python-build-system)
14062 (propagated-inputs
14063 `(("python-tqdm" ,python-tqdm)
14064 ("python-pkginfo" ,python-pkginfo)
14065 ("python-requests" ,python-requests)
14066 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14067 (home-page "https://github.com/pypa/twine")
14068 (synopsis "Collection of utilities for interacting with PyPI")
14069 (description
14070 "@code{twine} currently supports registering projects and uploading
14071 distributions. It authenticates the user over HTTPS, allows them to pre-sign
14072 their files and supports any packaging format (including wheels).")
14073 (license license:asl2.0)))
14074
14075 (define-public python2-twine
14076 (package-with-python2 python-twine))
14077
14078 (define-public python-linecache2
14079 (package
14080 (name "python-linecache2")
14081 (version "1.0.0")
14082 (source
14083 (origin
14084 (method url-fetch)
14085 (uri (pypi-uri "linecache2" version))
14086 (sha256
14087 (base32
14088 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14089 (build-system python-build-system)
14090 (arguments
14091 `(;; The tests depend on unittest2, and our version is a bit too old.
14092 #:tests? #f))
14093 (native-inputs
14094 `(("python-pbr" ,python-pbr-minimal)))
14095 (home-page
14096 "https://github.com/testing-cabal/linecache2")
14097 (synopsis "Backports of the linecache module")
14098 (description
14099 "The linecache module allows one to get any line from any file, while
14100 attempting to optimize internally, using a cache, the common case where many
14101 lines are read from a single file.")
14102 (license license:psfl)))
14103
14104 (define-public python2-linecache2
14105 (package-with-python2 python-linecache2))
14106
14107 (define-public python-traceback2
14108 (package
14109 (name "python-traceback2")
14110 (version "1.4.0")
14111 (source
14112 (origin
14113 (method url-fetch)
14114 (uri (pypi-uri "traceback2" version))
14115 (sha256
14116 (base32
14117 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14118 (build-system python-build-system)
14119 (arguments
14120 `(;; python-traceback2 and python-unittest2 depend on one another.
14121 #:tests? #f))
14122 (native-inputs
14123 `(("python-pbr" ,python-pbr-minimal)))
14124 (propagated-inputs
14125 `(("python-linecache2" ,python-linecache2)))
14126 (home-page
14127 "https://github.com/testing-cabal/traceback2")
14128 (synopsis "Backports of the traceback module")
14129 (description
14130 "This module provides a standard interface to extract, format and print
14131 stack traces of Python programs. It exactly mimics the behavior of the Python
14132 interpreter when it prints a stack trace.")
14133 (license license:psfl)))
14134
14135 (define-public python2-traceback2
14136 (package-with-python2 python-traceback2))
14137
14138 (define-public python-ratelimiter
14139 (package
14140 (name "python-ratelimiter")
14141 (version "1.2.0")
14142 (source
14143 (origin
14144 (method url-fetch)
14145 (uri (pypi-uri "ratelimiter" version))
14146 (sha256
14147 (base32
14148 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14149 (build-system python-build-system)
14150 (arguments
14151 '(#:tests? #f)) ; There are no tests in the pypi archive.
14152 (home-page "https://github.com/RazerM/ratelimiter")
14153 (synopsis "Simple rate limiting object")
14154 (description
14155 "The @code{ratelimiter} module ensures that an operation will not be
14156 executed more than a given number of times during a given period.")
14157 (license license:asl2.0)))
14158
14159 (define-public python2-ratelimiter
14160 (package-with-python2 python-ratelimiter))
14161
14162 (define-public python-dukpy
14163 (package
14164 (name "python-dukpy")
14165 (version "0.3")
14166 (source
14167 (origin
14168 (method git-fetch)
14169 (uri (git-reference
14170 (url "https://github.com/kovidgoyal/dukpy.git")
14171 (commit (string-append "v" version))))
14172 (file-name (git-file-name name version))
14173 (sha256
14174 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14175 (build-system python-build-system)
14176 (home-page "https://github.com/kovidgoyal/dukpy")
14177 (synopsis "Run JavaScript in python")
14178 (description
14179 "dukpy is a JavaScript runtime environment for Python using the duktape
14180 embeddable JavaScript engine.")
14181 ;; Dukpy is licensed under MIT like the embedded duktape library,
14182 ;; with 'errors.c' as GPL3.
14183 (license (list license:expat license:gpl3))))
14184
14185 (define-public python2-dukpy
14186 (package-with-python2 python-dukpy))
14187
14188 (define-public python-jsonrpclib-pelix
14189 (package
14190 (name "python-jsonrpclib-pelix")
14191 (version "0.3.2")
14192 (source
14193 (origin
14194 (method url-fetch)
14195 (uri (pypi-uri "jsonrpclib-pelix" version))
14196 (sha256
14197 (base32
14198 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14199 (build-system python-build-system)
14200 (arguments
14201 `(#:tests? #f)) ; no tests in PyPI tarball
14202 (home-page "https://github.com/tcalmant/jsonrpclib/")
14203 (synopsis "JSON-RPC 2.0 client library for Python")
14204 (description
14205 "This library implements the JSON-RPC v2.0
14206 specification (backwards-compatible) as a client library for Python. This
14207 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14208 services.")
14209 (license license:asl2.0)))
14210
14211 (define-public python2-jsonrpclib-pelix
14212 (package-with-python2 python-jsonrpclib-pelix))
14213
14214 (define-public python-setuptools-scm-git-archive
14215 (package
14216 (name "python-setuptools-scm-git-archive")
14217 (version "1.0")
14218 (source
14219 (origin
14220 (method url-fetch)
14221 (uri (pypi-uri "setuptools_scm_git_archive" version))
14222 (sha256
14223 (base32
14224 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14225 (build-system python-build-system)
14226 (native-inputs
14227 `(("python-pytest" ,python-pytest)))
14228 (propagated-inputs
14229 `(("python-setuptools-scm" ,python-setuptools-scm)))
14230 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14231 (synopsis "Setuptools_scm plugin for git archives")
14232 (description
14233 "The setuptools_scm_git_archive package is a plugin to
14234 setuptools_scm, which supports obtaining versions from git archives that
14235 belong to tagged versions.")
14236 (license license:expat)))
14237
14238 (define-public python2-setuptools-scm-git-archive
14239 (package-with-python2 python-setuptools-scm-git-archive))
14240
14241 (define-public python-setuptools-git
14242 (package
14243 (name "python-setuptools-git")
14244 (version "1.2")
14245 (source
14246 (origin
14247 (method url-fetch)
14248 (uri (pypi-uri "setuptools-git" version))
14249 (sha256
14250 (base32
14251 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14252 (build-system python-build-system)
14253 (arguments
14254 `(#:phases
14255 (modify-phases %standard-phases
14256 ;; This is needed for tests.
14257 (add-after 'unpack 'configure-git
14258 (lambda _
14259 (setenv "HOME" "/tmp")
14260 (invoke "git" "config" "--global" "user.email" "guix")
14261 (invoke "git" "config" "--global" "user.name" "guix")
14262 #t)))))
14263 (native-inputs
14264 `(("git" ,git-minimal)))
14265 (home-page "https://github.com/msabramo/setuptools-git")
14266 (synopsis "Setuptools revision control system plugin for Git")
14267 (description
14268 "This package provides a plugin for Setuptools for revision control with
14269 Git.")
14270 (license license:bsd-3)))
14271
14272 (define-public python-pyclipper
14273 (package
14274 (name "python-pyclipper")
14275 (version "1.1.0.post3")
14276 (source
14277 (origin
14278 (method url-fetch)
14279 (uri (pypi-uri "pyclipper" version ".zip"))
14280 (sha256
14281 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14282 (modules '((guix build utils)))
14283 (snippet
14284 '(begin
14285 ;; This file is generated by Cython.
14286 (delete-file "pyclipper/pyclipper.cpp") #t))))
14287 (build-system python-build-system)
14288 (arguments
14289 `(#:phases
14290 (modify-phases %standard-phases
14291 (add-before 'build 'cythonize-sources
14292 (lambda _
14293 (with-directory-excursion "pyclipper"
14294 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14295 (propagated-inputs
14296 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14297 (native-inputs
14298 `(("python-cython" ,python-cython)
14299 ("python-pytest" ,python-pytest)
14300 ("python-pytest-runner" ,python-pytest-runner)
14301 ("python-unittest2" ,python-unittest2)
14302 ("unzip" ,unzip)))
14303 (home-page "https://github.com/greginvm/pyclipper")
14304 (synopsis "Wrapper for Angus Johnson's Clipper library")
14305 (description
14306 "Pyclipper is a Cython wrapper for the C++ translation of the
14307 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14308 (license license:expat)))
14309
14310 (define-public python2-pyclipper
14311 (package-with-python2 python-pyclipper))
14312
14313 (define-public python2-booleanoperations
14314 (package
14315 (name "python2-booleanoperations")
14316 (version "0.7.1")
14317 (source
14318 (origin
14319 (method url-fetch)
14320 (uri (pypi-uri "booleanOperations" version ".zip"))
14321 (sha256
14322 (base32
14323 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14324 (build-system python-build-system)
14325 (arguments
14326 `(#:python ,python-2))
14327 (native-inputs
14328 `(("unzip" ,unzip)
14329 ("python2-pytest" ,python2-pytest)
14330 ("python2-pytest-runner" ,python2-pytest-runner)))
14331 (propagated-inputs
14332 `(("python-fonttools" ,python2-fonttools)
14333 ("python-pyclipper" ,python2-pyclipper)
14334 ("python-ufolib" ,python2-ufolib)))
14335 (home-page "https://github.com/typemytype/booleanOperations")
14336 (synopsis "Boolean operations on paths")
14337 (description
14338 "BooleanOperations provides a Python library that enables
14339 boolean operations on paths.")
14340 (license license:expat)))
14341
14342 (define-public python-tempdir
14343 (package
14344 (name "python-tempdir")
14345 (version "0.7.1")
14346 (source
14347 (origin
14348 (method url-fetch)
14349 (uri (pypi-uri "tempdir" version))
14350 (sha256
14351 (base32
14352 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14353 (build-system python-build-system)
14354 (home-page "https://pypi.org/project/tempdir/")
14355 (arguments
14356 ;; the package has no tests
14357 '(#:tests? #f))
14358 (synopsis "Python library for managing temporary directories")
14359 (description
14360 "This library manages temporary directories that are automatically
14361 deleted with all their contents when they are no longer needed. It is
14362 particularly convenient for use in tests.")
14363 (license license:expat)))
14364
14365 (define-public python2-tempdir
14366 (package-with-python2 python-tempdir))
14367
14368 (define-public python-activepapers
14369 (package
14370 (name "python-activepapers")
14371 (version "0.2.2")
14372 (source
14373 (origin
14374 (method url-fetch)
14375 (uri (pypi-uri "ActivePapers.Py" version))
14376 (sha256
14377 (base32
14378 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14379 (build-system python-build-system)
14380 (arguments
14381 `(#:modules ((ice-9 ftw)
14382 (srfi srfi-1)
14383 (guix build utils)
14384 (guix build python-build-system))
14385
14386 #:phases
14387 (modify-phases %standard-phases
14388 (add-after 'unpack 'delete-python2-code
14389 (lambda _
14390 (for-each delete-file
14391 '("lib/activepapers/builtins2.py"
14392 "lib/activepapers/standardlib2.py"
14393 "lib/activepapers/utility2.py"))))
14394 (replace 'check
14395 (lambda _
14396 ;; Deactivate the test cases that download files
14397 (setenv "NO_NETWORK_ACCESS" "1")
14398 ;; For some strange reason, some tests fail if nosetests runs all
14399 ;; test modules in a single execution. They pass if each test
14400 ;; module is run individually.
14401 (for-each (lambda (filename)
14402 (invoke "nosetests"
14403 (string-append "tests/" filename)))
14404 (scandir "tests"
14405 (lambda (filename)
14406 (string-suffix? ".py" filename)))))))))
14407 (native-inputs
14408 `(("python-tempdir" ,python-tempdir)
14409 ("python-nose" ,python-nose)))
14410 (propagated-inputs
14411 `(("python-h5py" ,python-h5py)))
14412 (home-page "http://www.activepapers.org/")
14413 (synopsis "Executable papers for scientific computing")
14414 (description
14415 "ActivePapers is a tool for working with executable papers, which
14416 combine data, code, and documentation in single-file packages,
14417 suitable for publication as supplementary material or on repositories
14418 such as figshare or Zenodo.")
14419 (properties `((python2-variant . ,(delay python2-activepapers))))
14420 (license license:bsd-3)))
14421
14422 (define-public python2-activepapers
14423 (let ((base (package-with-python2
14424 (strip-python2-variant python-activepapers))))
14425 (package
14426 (inherit base)
14427 (arguments
14428 (substitute-keyword-arguments (package-arguments base)
14429 ((#:phases phases)
14430 `(modify-phases ,phases
14431 (delete 'delete-python2-code)
14432 (add-after 'unpack 'delete-python3-code
14433 (lambda _
14434 (for-each delete-file
14435 '("lib/activepapers/builtins3.py"
14436 "lib/activepapers/standardlib3.py"
14437 "lib/activepapers/utility3.py")))))))))))
14438
14439 (define-public python-semver
14440 (package
14441 (name "python-semver")
14442 (version "2.9.0")
14443 (source
14444 (origin
14445 (method url-fetch)
14446 (uri (pypi-uri "semver" version))
14447 (sha256
14448 (base32
14449 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14450 (build-system python-build-system)
14451 (native-inputs
14452 `(("python-tox" ,python-tox)
14453 ("python-virtualenv" ,python-virtualenv)))
14454 (home-page "https://github.com/k-bx/python-semver")
14455 (synopsis "Python helper for Semantic Versioning")
14456 (description "This package provides a Python library for
14457 @url{Semantic Versioning, http://semver.org/}.")
14458 (license license:bsd-3)))
14459
14460 (define-public python2-semver
14461 (package-with-python2 python-semver))
14462
14463 (define-public python-pyro4
14464 (package
14465 (name "python-pyro4")
14466 (version "4.77")
14467 (source
14468 (origin
14469 (method url-fetch)
14470 (uri (pypi-uri "Pyro4" version))
14471 (sha256
14472 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14473 (build-system python-build-system)
14474 (arguments
14475 '(#:tests? #f)) ;FIXME: Some tests require network access.
14476 (native-inputs
14477 `(("python-cloudpickle" ,python-cloudpickle)
14478 ("python-dill" ,python-dill)
14479 ("python-msgpack" ,python-msgpack)))
14480 (propagated-inputs
14481 `(("python-serpent" ,python-serpent)))
14482 (home-page "https://pyro4.readthedocs.io")
14483 (synopsis "Distributed object middleware for Python")
14484 (description
14485 "Pyro enables you to build applications in which objects can talk to each
14486 other over the network. You can just use normal Python method calls to call
14487 objects on other machines, also known as remote procedure calls (RPC).")
14488 (license license:expat)))
14489
14490 (define-public python2-pyro
14491 (package
14492 (name "python2-pyro")
14493 (version "3.16")
14494 (source
14495 (origin
14496 (method url-fetch)
14497 (uri (pypi-uri "Pyro" version))
14498 (file-name (string-append "Pyro-" version ".tar.gz"))
14499 (sha256
14500 (base32
14501 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14502 (build-system python-build-system)
14503 (arguments
14504 ;; Pyro is not compatible with Python 3
14505 `(#:python ,python-2
14506 ;; Pyro has no test cases for automatic execution
14507 #:tests? #f))
14508 (home-page "http://pythonhosted.org/Pyro/")
14509 (synopsis "Distributed object manager for Python")
14510 (description "Pyro is a Distributed Object Technology system
14511 written in Python that is designed to be easy to use. It resembles
14512 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14513 which is a system and language independent Distributed Object Technology
14514 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14515 longer maintained. New projects should use Pyro4 instead, which
14516 is the new Pyro version that is actively developed.")
14517 (license license:expat)))
14518
14519 (define-public python2-scientific
14520 (package
14521 (name "python2-scientific")
14522 (version "2.9.4")
14523 (source
14524 (origin
14525 (method git-fetch)
14526 (uri (git-reference
14527 (url "https://github.com/khinsen/ScientificPython")
14528 (commit (string-append "rel" version))))
14529 (file-name (git-file-name name version))
14530 (sha256
14531 (base32
14532 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
14533 (build-system python-build-system)
14534 (inputs
14535 `(("netcdf" ,netcdf)))
14536 (propagated-inputs
14537 `(("python-numpy" ,python2-numpy-1.8)
14538 ("python-pyro" ,python2-pyro)))
14539 (arguments
14540 ;; ScientificPython is not compatible with Python 3
14541 `(#:python ,python-2
14542 #:tests? #f ; No test suite
14543 #:phases
14544 (modify-phases %standard-phases
14545 (replace 'build
14546 (lambda* (#:key inputs #:allow-other-keys)
14547 (invoke "python" "setup.py" "build"
14548 (string-append "--netcdf_prefix="
14549 (assoc-ref inputs "netcdf"))))))))
14550 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
14551 (synopsis "Python modules for scientific computing")
14552 (description "ScientificPython is a collection of Python modules that are
14553 useful for scientific computing. Most modules are rather general (Geometry,
14554 physical units, automatic derivatives, ...) whereas others are more
14555 domain-specific (e.g. netCDF and PDB support). The library is currently
14556 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14557 (license license:cecill-c)))
14558
14559 (define-public python2-mmtk
14560 (package
14561 (name "python2-mmtk")
14562 (version "2.7.12")
14563 (source
14564 (origin
14565 (method git-fetch)
14566 (uri (git-reference
14567 (url "https://github.com/khinsen/MMTK")
14568 (commit (string-append "rel" version))))
14569 (file-name (git-file-name name version))
14570 (sha256
14571 (base32
14572 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
14573 (build-system python-build-system)
14574 (native-inputs
14575 `(("netcdf" ,netcdf)))
14576 (propagated-inputs
14577 `(("python-scientific" ,python2-scientific)
14578 ("python-tkinter" ,python-2 "tk")))
14579 (arguments
14580 `(#:python ,python-2
14581 #:tests? #f
14582 #:phases
14583 (modify-phases %standard-phases
14584 (add-before 'build 'includes-from-scientific
14585 (lambda* (#:key inputs #:allow-other-keys)
14586 (mkdir-p "Include/Scientific")
14587 (copy-recursively
14588 (string-append
14589 (assoc-ref inputs "python-scientific")
14590 "/include/python2.7/Scientific")
14591 "Include/Scientific"))))))
14592 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14593 (synopsis "Python library for molecular simulation")
14594 (description "MMTK is a library for molecular simulations with an emphasis
14595 on biomolecules. It provides widely used methods such as Molecular Dynamics
14596 and normal mode analysis, but also basic routines for implementing new methods
14597 for simulation and analysis. The library is currently not actively maintained
14598 and works only with Python 2 and NumPy < 1.9.")
14599 (license license:cecill-c)))
14600
14601 (define-public python-phonenumbers
14602 (package
14603 (name "python-phonenumbers")
14604 (version "8.9.1")
14605 (source
14606 (origin
14607 (method url-fetch)
14608 (uri (pypi-uri "phonenumbers" version))
14609 (sha256
14610 (base32
14611 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14612 (build-system python-build-system)
14613 (home-page
14614 "https://github.com/daviddrysdale/python-phonenumbers")
14615 (synopsis
14616 "Python library for dealing with international phone numbers")
14617 (description
14618 "This package provides a Python port of Google's libphonenumber library.")
14619 (license license:asl2.0)))
14620
14621 (define-public python2-phonenumbers
14622 (package-with-python2 python-phonenumbers))
14623
14624 (define-public python-send2trash
14625 (package
14626 (name "python-send2trash")
14627 (version "1.5.0")
14628 (source
14629 (origin (method git-fetch)
14630 ;; Source tarball on PyPI doesn't include tests.
14631 (uri (git-reference
14632 (url "https://github.com/hsoft/send2trash.git")
14633 (commit version)))
14634 (file-name (git-file-name name version))
14635 (sha256
14636 (base32
14637 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14638 (build-system python-build-system)
14639 (arguments
14640 '(#:phases
14641 (modify-phases %standard-phases
14642 (add-before 'check 'pre-check
14643 (lambda _
14644 (mkdir-p "/tmp/foo")
14645 (setenv "HOME" "/tmp/foo")
14646 #t)))))
14647 (home-page "https://github.com/hsoft/send2trash")
14648 (synopsis "Send files to the user's @file{~/Trash} directory")
14649 (description "This package provides a Python library to send files to the
14650 user's @file{~/Trash} directory.")
14651 (properties `((python2-variant . ,(delay python2-send2trash))))
14652 (license license:bsd-3)))
14653
14654 (define-public python2-send2trash
14655 (package
14656 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14657 (arguments
14658 (substitute-keyword-arguments (package-arguments python-send2trash)
14659 ((#:phases phases)
14660 `(modify-phases ,phases
14661 (add-before 'check 'setenv
14662 (lambda _
14663 (setenv "PYTHONPATH"
14664 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14665 #t))))))))
14666
14667 (define-public python-yapf
14668 (package
14669 (name "python-yapf")
14670 (version "0.29.0")
14671 (source
14672 (origin
14673 (method url-fetch)
14674 (uri (pypi-uri "yapf" version))
14675 (sha256
14676 (base32
14677 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
14678 (build-system python-build-system)
14679 (home-page "https://github.com/google/yapf")
14680 (synopsis "Formatter for Python code")
14681 (description "YAPF is a formatter for Python code. It's based off of
14682 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14683 takes the code and reformats it to the best formatting that conforms to the
14684 style guide, even if the original code didn't violate the style guide.")
14685 (license license:asl2.0)))
14686
14687 (define-public python2-yapf
14688 (package-with-python2 python-yapf))
14689
14690 (define-public python-gyp
14691 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14692 (revision "0"))
14693 (package
14694 (name "python-gyp")
14695 ;; Google does not release versions,
14696 ;; based on second most recent commit date.
14697 (version (git-version "0.0.0" revision commit))
14698 (source
14699 (origin
14700 ;; Google does not release tarballs,
14701 ;; git checkout is needed.
14702 (method git-fetch)
14703 (uri (git-reference
14704 (url "https://chromium.googlesource.com/external/gyp")
14705 (commit commit)))
14706 (file-name (git-file-name name version))
14707 (sha256
14708 (base32
14709 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14710 (build-system python-build-system)
14711 (home-page "https://gyp.gsrc.io/")
14712 (synopsis "GYP is a Meta-Build system")
14713 (description
14714 "GYP builds build systems for large, cross platform applications.
14715 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14716 files, and Makefiles.")
14717 (license license:bsd-3))))
14718
14719 (define-public python2-gyp
14720 (package-with-python2 python-gyp))
14721
14722 (define-public python-whatever
14723 (package
14724 (name "python-whatever")
14725 (version "0.6")
14726 (source
14727 (origin
14728 (method git-fetch)
14729 (uri (git-reference
14730 (url "https://github.com/Suor/whatever")
14731 (commit version)))
14732 (file-name (git-file-name name version))
14733 (sha256
14734 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
14735 (build-system python-build-system)
14736 (arguments
14737 `(#:phases
14738 (modify-phases %standard-phases
14739 (replace 'check
14740 (lambda _
14741 (invoke "py.test"))))))
14742 (native-inputs
14743 `(("python-pytest" ,python-pytest)))
14744 (home-page "http://github.com/Suor/whatever")
14745 (synopsis "Make anonymous functions by partial application of operators")
14746 (description "@code{whatever} provides an easy way to make anonymous
14747 functions by partial application of operators.")
14748 (license license:bsd-3)))
14749
14750 (define-public python2-whatever
14751 (package-with-python2 python-whatever))
14752
14753 (define-public python-funcy
14754 (package
14755 (name "python-funcy")
14756 (version "1.11")
14757 (source
14758 (origin
14759 (method git-fetch)
14760 (uri (git-reference
14761 (url "https://github.com/Suor/funcy.git")
14762 (commit version)))
14763 (sha256
14764 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14765 (file-name (git-file-name name version))))
14766 (build-system python-build-system)
14767 (arguments
14768 `(#:phases
14769 (modify-phases %standard-phases
14770 (replace 'check
14771 (lambda _
14772 (invoke "py.test"))))))
14773 (native-inputs
14774 `(("python-pytest" ,python-pytest)
14775 ("python-whatever" ,python-whatever)))
14776 (home-page "http://github.com/Suor/funcy")
14777 (synopsis "Functional tools")
14778 (description "@code{funcy} is a library that provides functional tools.
14779 Examples are:
14780 @enumerate
14781 @item merge - Merges collections of the same type
14782 @item walk - Type-preserving map
14783 @item select - Selects a part of a collection
14784 @item take - Takes the first n items of a collection
14785 @item first - Takes the first item of a collection
14786 @item remove - Predicated-removes items of a collection
14787 @item concat - Concatenates two collections
14788 @item flatten - Flattens a collection with subcollections
14789 @item distinct - Returns only distinct items
14790 @item split - Predicated-splits a collection
14791 @item split_at - Splits a collection at a given item
14792 @item group_by - Groups items by group
14793 @item pairwise - Pairs off adjacent items
14794 @item partial - Partially-applies a function
14795 @item curry - Curries a function
14796 @item compose - Composes functions
14797 @item complement - Complements a predicate
14798 @item all_fn - \"all\" with predicate
14799 @end enumerate")
14800 (license license:bsd-3)))
14801
14802 (define-public python2-funcy
14803 (package-with-python2 python-funcy))
14804
14805 (define-public python-isoweek
14806 (package
14807 (name "python-isoweek")
14808 (version "1.3.3")
14809 (source
14810 (origin
14811 (method url-fetch)
14812 (uri (pypi-uri "isoweek" version))
14813 (sha256
14814 (base32
14815 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14816 (build-system python-build-system)
14817 (home-page "https://github.com/gisle/isoweek")
14818 (synopsis "Objects representing a week")
14819 (description "The @code{isoweek} module provide the class Week that
14820 implements the week definition of ISO 8601. This standard also defines
14821 a notation for identifying weeks; yyyyWww (where the W is a literal).
14822 Week instances stringify to this form.")
14823 (license license:bsd-3)))
14824
14825 (define-public python2-isoweek
14826 (package-with-python2 python-isoweek))
14827
14828 (define-public python-tokenize-rt
14829 (package
14830 (name "python-tokenize-rt")
14831 (version "2.0.1")
14832 (source
14833 (origin
14834 (method url-fetch)
14835 (uri (pypi-uri "tokenize-rt" version))
14836 (sha256
14837 (base32
14838 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14839 (build-system python-build-system)
14840 (home-page "https://github.com/asottile/tokenize-rt")
14841 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14842 (description
14843 "This Python library is a wrapper around @code{tokenize} from the Python
14844 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14845 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14846 and @code{tokens_to_src} to roundtrip.")
14847 (license license:expat)))
14848
14849 (define-public python-future-fstrings
14850 (package
14851 (name "python-future-fstrings")
14852 (version "0.4.1")
14853 (source
14854 (origin
14855 (method url-fetch)
14856 (uri (pypi-uri "future_fstrings" version))
14857 (sha256
14858 (base32
14859 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14860 (build-system python-build-system)
14861 (propagated-inputs
14862 `(("python-tokenize-rt" ,python-tokenize-rt)))
14863 (home-page "https://github.com/asottile/future-fstrings")
14864 (synopsis "Backport of fstrings to Python < 3.6")
14865 (description
14866 "This package provides a UTF-8 compatible encoding
14867 @code{future_fstrings}, which performs source manipulation. It decodes the
14868 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14869 @code{f} strings.")
14870 (license license:expat)))
14871
14872 (define-public python-typed-ast
14873 (package
14874 (name "python-typed-ast")
14875 (version "1.4.0")
14876 (source
14877 (origin
14878 (method git-fetch)
14879 (uri (git-reference
14880 (url "https://github.com/python/typed_ast.git")
14881 (commit version)))
14882 (sha256
14883 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14884 (file-name (git-file-name name version))))
14885 (build-system python-build-system)
14886 (arguments
14887 `(#:modules ((guix build utils)
14888 (guix build python-build-system)
14889 (ice-9 ftw)
14890 (srfi srfi-1)
14891 (srfi srfi-26))
14892 #:phases
14893 (modify-phases %standard-phases
14894 (replace 'check
14895 (lambda _
14896 (let ((cwd (getcwd)))
14897 (setenv "PYTHONPATH"
14898 (string-append cwd "/build/"
14899 (find (cut string-prefix? "lib" <>)
14900 (scandir (string-append cwd "/build")))
14901 ":"
14902 (getenv "PYTHONPATH"))))
14903 (invoke "pytest")
14904 #t)))))
14905 (native-inputs `(("python-pytest" ,python-pytest)))
14906 (home-page "https://github.com/python/typed_ast")
14907 (synopsis "Fork of Python @code{ast} modules with type comment support")
14908 (description "This package provides a parser similar to the standard
14909 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14910 include PEP 484 type comments and are independent of the version of Python
14911 under which they are run. The @code{typed_ast} parsers produce the standard
14912 Python AST (plus type comments), and are both fast and correct, as they are
14913 based on the CPython 2.7 and 3.7 parsers.")
14914 ;; See the file "LICENSE" for the details.
14915 (license (list license:psfl
14916 license:asl2.0
14917 license:expat)))) ;ast27/Parser/spark.py
14918
14919 (define-public python-typing
14920 (package
14921 (name "python-typing")
14922 (version "3.7.4.1")
14923 (source
14924 (origin
14925 (method url-fetch)
14926 (uri (pypi-uri "typing" version))
14927 (sha256
14928 (base32
14929 "08xs7s5pyq99hbrzw23inczmidz90krvpv9q5p1qrvh6yzrydpwi"))))
14930 (build-system python-build-system)
14931 (home-page "https://docs.python.org/3/library/typing.html")
14932 (synopsis "Type hints for Python")
14933 (description "This is a backport of the standard library @code{typing}
14934 module to Python versions older than 3.5. Typing defines a standard notation
14935 for Python function and variable type annotations. The notation can be used
14936 for documenting code in a concise, standard format, and it has been designed
14937 to also be used by static and runtime type checkers, static analyzers, IDEs
14938 and other tools.")
14939 (license license:psfl)))
14940
14941 (define-public python2-typing
14942 (package-with-python2 python-typing))
14943
14944 (define-public python-typing-extensions
14945 (package
14946 (name "python-typing-extensions")
14947 (version "3.7.2")
14948 (source
14949 (origin
14950 (method url-fetch)
14951 (uri (pypi-uri "typing_extensions" version))
14952 (sha256
14953 (base32
14954 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14955 (build-system python-build-system)
14956 (home-page
14957 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14958 (synopsis "Experimental type hints for Python")
14959 (description
14960 "The typing_extensions module contains additional @code{typing} hints not
14961 yet present in the of the @code{typing} standard library.
14962 Included are implementations of:
14963 @enumerate
14964 @item ClassVar
14965 @item ContextManager
14966 @item Counter
14967 @item DefaultDict
14968 @item Deque
14969 @item NewType
14970 @item NoReturn
14971 @item overload
14972 @item Protocol
14973 @item runtime
14974 @item Text
14975 @item Type
14976 @item TYPE_CHECKING
14977 @item AsyncGenerator
14978 @end enumerate\n")
14979 (license license:psfl)))
14980
14981 (define-public bpython
14982 (package
14983 (name "bpython")
14984 (version "0.18")
14985 (source
14986 (origin
14987 (method url-fetch)
14988 (uri (pypi-uri "bpython" version))
14989 (sha256
14990 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
14991 (build-system python-build-system)
14992 (arguments
14993 `(#:phases
14994 (modify-phases %standard-phases
14995 (add-after 'unpack 'remove-failing-test
14996 (lambda _
14997 ;; Remove failing test. FIXME: make it pass
14998 (delete-file "bpython/test/test_args.py")
14999 #t))
15000 (add-after 'wrap 'add-aliases
15001 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15002 (lambda* (#:key outputs #:allow-other-keys)
15003 (let ((out (assoc-ref outputs "out")))
15004 (for-each
15005 (lambda (old new)
15006 (symlink old (string-append out "/bin/" new)))
15007 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15008 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15009 #t)))))
15010 (propagated-inputs
15011 `(("python-pygments" ,python-pygments)
15012 ("python-requests" ,python-requests)
15013 ("python-babel" ,python-babel) ; optional, for internationalization
15014 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15015 ("python-greenlet" ,python-greenlet)
15016 ("python-urwid" ,python-urwid) ; for bpython-urwid only
15017 ("python-six" ,python-six)))
15018 (native-inputs
15019 `(("python-sphinx" ,python-sphinx)
15020 ("python-mock" ,python-mock)))
15021 (home-page "https://bpython-interpreter.org/")
15022 (synopsis "Fancy interface to the Python interpreter")
15023 (description "Bpython is a fancy interface to the Python
15024 interpreter. bpython's main features are
15025
15026 @enumerate
15027 @item in-line syntax highlighting,
15028 @item readline-like autocomplete with suggestions displayed as you type,
15029 @item expected parameter list for any Python function,
15030 @item \"rewind\" function to pop the last line of code from memory and
15031 re-evaluate,
15032 @item send the code you've entered off to a pastebin,
15033 @item save the code you've entered to a file, and
15034 @item auto-indentation.
15035 @end enumerate")
15036 (license license:expat)))
15037
15038 (define-public bpython2
15039 (let ((base (package-with-python2
15040 (strip-python2-variant bpython))))
15041 (package (inherit base)
15042 (name "bpython2")
15043 (arguments
15044 `(#:python ,python-2
15045 #:phases
15046 (modify-phases %standard-phases
15047 (add-after 'unpack 'remove-failing-test
15048 (lambda _
15049 ;; Remove failing test. FIXME: make it pass
15050 (delete-file "bpython/test/test_args.py")
15051 ;; Disable failing test-cases (renaming inhibits they are
15052 ;; discovered)
15053 (substitute* "bpython/test/test_curtsies_repl.py"
15054 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15055 (string-append a "xxx_off_" b))
15056 (("^(\\s*def )(test_complex\\W)" _ a b)
15057 (string-append a "xxx_off_" b)))
15058 #t))
15059 (add-before 'build 'rename-scripts
15060 ;; rename the scripts to bypthon2, bpdb2, etc.
15061 (lambda _
15062 (substitute* "setup.py"
15063 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15064 (string-append name "2" rest "\n"))
15065 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15066 (string-append name "2" (or sub "") rest "\n")))
15067 #t))))))))
15068
15069 (define-public python-pyinotify
15070 (package
15071 (name "python-pyinotify")
15072 (version "0.9.6")
15073 (source (origin
15074 (method url-fetch)
15075 (uri (pypi-uri "pyinotify" version))
15076 (sha256
15077 (base32
15078 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15079 (build-system python-build-system)
15080 (arguments `(#:tests? #f)) ;no tests
15081 (home-page "https://github.com/seb-m/pyinotify")
15082 (synopsis "Python library for monitoring inotify events")
15083 (description
15084 "@code{pyinotify} provides a Python interface for monitoring
15085 file system events on Linux.")
15086 (license license:expat)))
15087
15088 (define-public python2-pyinotify
15089 (package-with-python2 python-pyinotify))
15090
15091 ;; Ada parser uses this version.
15092 (define-public python2-quex-0.67.3
15093 (package
15094 (name "python2-quex")
15095 (version "0.67.3")
15096 (source
15097 (origin
15098 (method url-fetch)
15099 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15100 (version-major+minor version)
15101 "/quex-" version ".zip"))
15102 (sha256
15103 (base32
15104 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15105 (build-system python-build-system)
15106 (native-inputs
15107 `(("unzip" ,unzip)))
15108 (arguments
15109 `(#:python ,python-2
15110 #:tests? #f
15111 #:phases
15112 (modify-phases %standard-phases
15113 (delete 'configure)
15114 (delete 'build)
15115 (replace 'install
15116 (lambda* (#:key outputs #:allow-other-keys)
15117 (let* ((out (assoc-ref outputs "out"))
15118 (share/quex (string-append out "/share/quex"))
15119 (bin (string-append out "/bin")))
15120 (copy-recursively "." share/quex)
15121 (mkdir-p bin)
15122 (symlink (string-append share/quex "/quex-exe.py")
15123 (string-append bin "/quex"))
15124 #t))))))
15125 (native-search-paths
15126 (list (search-path-specification
15127 (variable "QUEX_PATH")
15128 (files '("share/quex")))))
15129 (home-page "http://quex.sourceforge.net/")
15130 (synopsis "Lexical analyzer generator in Python")
15131 (description "@code{quex} is a lexical analyzer generator in Python.")
15132 (license license:lgpl2.1+))) ; Non-military
15133
15134 (define-public python2-quex
15135 (package (inherit python2-quex-0.67.3)
15136 (name "python2-quex")
15137 (version "0.68.1")
15138 (source
15139 (origin
15140 (method url-fetch)
15141 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15142 (sha256
15143 (base32
15144 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15145 (file-name (string-append name "-" version ".tar.gz"))))))
15146
15147 (define-public python-more-itertools
15148 (package
15149 (name "python-more-itertools")
15150 (version "8.2.0")
15151 (source
15152 (origin
15153 (method url-fetch)
15154 (uri (pypi-uri "more-itertools" version))
15155 (sha256
15156 (base32
15157 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
15158 (build-system python-build-system)
15159 (home-page "https://github.com/erikrose/more-itertools")
15160 (synopsis "More routines for operating on iterables, beyond itertools")
15161 (description "Python's built-in @code{itertools} module implements a
15162 number of iterator building blocks inspired by constructs from APL, Haskell,
15163 and SML. @code{more-itertools} includes additional building blocks for
15164 working with iterables.")
15165 (properties `((python2-variant . ,(delay python2-more-itertools))))
15166 (license license:expat)))
15167
15168 ;; The 5.x series are the last versions supporting Python 2.7.
15169 (define-public python2-more-itertools
15170 (package
15171 (inherit python-more-itertools)
15172 (name "python2-more-itertools")
15173 (version "5.0.0")
15174 (source (origin
15175 (method url-fetch)
15176 (uri (pypi-uri "more-itertools" version))
15177 (sha256
15178 (base32
15179 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15180 (arguments
15181 `(#:python ,python2-minimal))
15182 (propagated-inputs
15183 `(("python2-six" ,python2-six-bootstrap)))))
15184
15185 (define-public python-latexcodec
15186 (package
15187 (name "python-latexcodec")
15188 (version "1.0.7")
15189 (source
15190 (origin
15191 (method url-fetch)
15192 (uri (pypi-uri "latexcodec" version))
15193 (sha256
15194 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15195 (build-system python-build-system)
15196 (inputs
15197 `(("python-six" ,python-six)))
15198 (home-page "https://readthedocs.org/projects/latexcodec/")
15199 (synopsis "Work with LaTeX code in Python")
15200 (description "Lexer and codec to work with LaTeX code in Python.")
15201 (license license:expat)))
15202
15203 (define-public python-pybtex
15204 (package
15205 (name "python-pybtex")
15206 (version "0.22.2")
15207 (source
15208 (origin
15209 (method url-fetch)
15210 (uri (pypi-uri "pybtex" version))
15211 (sha256
15212 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15213 (build-system python-build-system)
15214 (native-inputs
15215 `(("python-nose" ,python-nose)))
15216 (inputs
15217 `(("python-latexcodec" ,python-latexcodec)
15218 ("python-pyyaml" ,python-pyyaml)
15219 ("python-six" ,python-six)))
15220 (arguments
15221 `(#:test-target "nosetests"))
15222 (home-page "https://pybtex.org/")
15223 (synopsis "BibTeX-compatible bibliography processor")
15224 (description "Pybtex is a BibTeX-compatible bibliography processor written
15225 in Python. You can simply type pybtex instead of bibtex.")
15226 (license license:expat)))
15227
15228 (define-public python-onetimepass
15229 (package
15230 (name "python-onetimepass")
15231 (version "1.0.1")
15232 (source
15233 (origin
15234 (method url-fetch)
15235 (uri (pypi-uri "onetimepass" version))
15236 (sha256
15237 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15238 (build-system python-build-system)
15239 (propagated-inputs `(("python-six" ,python-six)))
15240 (home-page "https://github.com/tadeck/onetimepass/")
15241 (synopsis "One-time password library")
15242 (description "Python one-time password library for HMAC-based (HOTP) and
15243 time-based (TOTP) passwords.")
15244 (license license:expat)))
15245
15246 (define-public python-parso
15247 (package
15248 (name "python-parso")
15249 (version "0.5.2")
15250 (source
15251 (origin
15252 (method url-fetch)
15253 (uri (pypi-uri "parso" version))
15254 (sha256
15255 (base32
15256 "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm"))))
15257 (native-inputs
15258 `(("python-pytest" ,python-pytest)))
15259 (build-system python-build-system)
15260 (arguments
15261 `(#:phases (modify-phases %standard-phases
15262 (replace 'check
15263 (lambda _ (invoke "pytest" "-vv"))))))
15264 (home-page "https://github.com/davidhalter/parso")
15265 (synopsis "Python Parser")
15266 (description "Parso is a Python parser that supports error recovery and
15267 round-trip parsing for different Python versions (in multiple Python versions).
15268 Parso is also able to list multiple syntax errors in your Python file.")
15269 (license license:expat)))
15270
15271 (define-public python2-parso
15272 (package-with-python2 python-parso))
15273
15274 (define-public python-async-generator
15275 (package
15276 (name "python-async-generator")
15277 (version "1.10")
15278 (source
15279 (origin
15280 (method url-fetch)
15281 (uri (pypi-uri "async_generator" version))
15282 (sha256
15283 (base32
15284 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15285 (build-system python-build-system)
15286 (native-inputs
15287 `(("python-pytest" ,python-pytest)))
15288 (home-page "https://github.com/python-trio/async_generator")
15289 (synopsis "Async generators and context managers for Python 3.5+")
15290 (description "@code{async_generator} back-ports Python 3.6's native async
15291 generators and Python 3.7's context managers into Python 3.5.")
15292 ;; Dual licensed.
15293 (license (list license:expat license:asl2.0))))
15294
15295 (define-public python-async-timeout
15296 (package
15297 (name "python-async-timeout")
15298 (version "3.0.1")
15299 (source
15300 (origin
15301 (method url-fetch)
15302 (uri (pypi-uri "async-timeout" version))
15303 (sha256
15304 (base32
15305 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15306 (build-system python-build-system)
15307 (home-page "https://github.com/aio-libs/async_timeout/")
15308 (synopsis "Timeout context manager for asyncio programs")
15309 (description "@code{async-timeout} provides a timeout timeout context
15310 manager compatible with @code{asyncio}.")
15311 (license license:asl2.0)))
15312
15313 (define-public python-glob2
15314 (package
15315 (name "python-glob2")
15316 (version "0.7")
15317 (source
15318 (origin
15319 (method git-fetch)
15320 (uri (git-reference
15321 (url "https://github.com/miracle2k/python-glob2.git")
15322 (commit (string-append "v" version))))
15323 (file-name (git-file-name name version))
15324 (sha256
15325 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15326 (build-system python-build-system)
15327 (home-page "https://github.com/miracle2k/python-glob2/")
15328 (synopsis "Extended Version of the python buildin glob module")
15329 (description "This is an extended version of the Python
15330 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15331 adds:
15332
15333 @itemize
15334 @item The ability to capture the text matched by glob patterns, and return
15335 those matches alongside the file names.
15336 @item A recursive @code{**} globbing syntax, akin for example to the
15337 @code{globstar} option of Bash.
15338 @item The ability to replace the file system functions used, in order to glob
15339 on virtual file systems.
15340 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15341 @end itemize
15342
15343 Glob2 currently based on the glob code from Python 3.3.1.")
15344 (license license:bsd-2)))
15345
15346 (define-public python2-glob2
15347 (package-with-python2 python-glob2))
15348
15349 (define-public python-gipc
15350 (package
15351 (name "python-gipc")
15352 (version "0.6.0")
15353 (source
15354 (origin
15355 (method url-fetch)
15356 (uri (pypi-uri "gipc" version ".zip"))
15357 (sha256
15358 (base32
15359 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15360 (build-system python-build-system)
15361 (native-inputs
15362 `(("unzip" ,unzip)))
15363 (propagated-inputs
15364 `(("python-gevent" ,python-gevent)))
15365 (home-page "http://gehrcke.de/gipc")
15366 (synopsis "Child process management in the context of gevent")
15367 (description "Usage of Python's multiprocessing package in a
15368 gevent-powered application may raise problems. With @code{gipc},
15369 process-based child processes can safely be created anywhere within a
15370 gevent-powered application.")
15371 (license license:expat)))
15372
15373 (define-public python2-gipc
15374 (package-with-python2 python-gipc))
15375
15376 (define-public python-fusepy
15377 (package
15378 (name "python-fusepy")
15379 (version "2.0.4")
15380 (source
15381 (origin
15382 (method url-fetch)
15383 (uri (pypi-uri "fusepy" version))
15384 (sha256
15385 (base32
15386 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15387 (build-system python-build-system)
15388 (arguments
15389 `(#:phases
15390 (modify-phases %standard-phases
15391 (add-before 'build 'set-library-file-name
15392 (lambda* (#:key inputs #:allow-other-keys)
15393 (let ((fuse (assoc-ref inputs "fuse")))
15394 (substitute* "fuse.py"
15395 (("find_library\\('fuse'\\)")
15396 (string-append "'" fuse "/lib/libfuse.so'")))
15397 #t))))))
15398 (propagated-inputs
15399 `(("fuse" ,fuse)))
15400 (home-page "https://github.com/fusepy/fusepy")
15401 (synopsis "Simple ctypes bindings for FUSE")
15402 (description "Python module that provides a simple interface to FUSE and
15403 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15404 (license license:isc)))
15405
15406 (define-public python2-fusepy
15407 (package-with-python2 python-fusepy))
15408
15409 (define-public python2-gdrivefs
15410 (package
15411 (name "python2-gdrivefs")
15412 (version "0.14.9")
15413 (source
15414 (origin
15415 (method url-fetch)
15416 (uri (pypi-uri "gdrivefs" version))
15417 (sha256
15418 (base32
15419 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15420 (build-system python-build-system)
15421 (arguments
15422 `(#:python ,python-2
15423 #:phases
15424 (modify-phases %standard-phases
15425 (add-before 'build 'patch-setup-py
15426 (lambda _
15427 ;; Update requirements from dependency==version
15428 ;; to dependency>=version
15429 (substitute* "gdrivefs/resources/requirements.txt"
15430 (("==") ">="))
15431 #t)))))
15432 (native-inputs
15433 `(("python2-gipc" ,python2-gipc)
15434 ("python2-gevent" ,python2-gevent)
15435 ("python2-greenlet" ,python2-greenlet)
15436 ("python2-httplib2" ,python2-httplib2)
15437 ("python2-uritemplate" ,python2-uritemplate)
15438 ("python2-oauth2client" ,python2-oauth2client)
15439 ("python2-six" ,python2-six)))
15440 (propagated-inputs
15441 `(("python2-dateutil" ,python2-dateutil)
15442 ("python2-fusepy" ,python2-fusepy)
15443 ("python2-google-api-client" ,python2-google-api-client)))
15444 (home-page "https://github.com/dsoprea/GDriveFS")
15445 (synopsis "Mount Google Drive as a local file system")
15446 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15447 under Python 2.7.")
15448 (license license:gpl2)))
15449
15450 (define-public pybind11
15451 (package
15452 (name "pybind11")
15453 (version "2.3.0")
15454 (source (origin
15455 (method git-fetch)
15456 (uri (git-reference
15457 (url "https://github.com/pybind/pybind11.git")
15458 (commit (string-append "v" version))))
15459 (sha256
15460 (base32
15461 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15462 (file-name (git-file-name name version))))
15463 (build-system cmake-build-system)
15464 (native-inputs
15465 `(("python" ,python)
15466 ("python-pytest" ,python-pytest)))
15467 (arguments
15468 `(#:test-target "check"))
15469 (home-page "https://github.com/pybind/pybind11/")
15470 (synopsis "Seamless operability between C++11 and Python")
15471 (description "pybind11 is a lightweight header-only library that exposes
15472 C++ types in Python and vice versa, mainly to create Python bindings of
15473 existing C++ code. Its goals and syntax are similar to the excellent
15474 Boost.Python library by David Abrahams: to minimize boilerplate code in
15475 traditional extension modules by inferring type information using compile-time
15476 introspection.")
15477 (license license:expat)))
15478
15479 (define-public python-fasteners
15480 (package
15481 (name "python-fasteners")
15482 (version "0.14.1")
15483 (source
15484 (origin
15485 (method url-fetch)
15486 (uri (pypi-uri "fasteners" version))
15487 (sha256
15488 (base32
15489 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15490 (build-system python-build-system)
15491 (propagated-inputs
15492 `(("python-monotonic" ,python-monotonic)
15493 ("python-six" ,python-six)
15494 ("python-testtools" ,python-testtools)))
15495 (home-page "https://github.com/harlowja/fasteners")
15496 (synopsis "Python package that provides useful locks")
15497 (description
15498 "This package provides a Python program that provides following locks:
15499
15500 @itemize
15501 @item Locking decorator
15502 @item Reader-writer locks
15503 @item Inter-process locks
15504 @item Generic helpers
15505 @end itemize\n")
15506 (properties `((python2-variant . ,(delay python2-fasteners))))
15507 (license license:asl2.0)))
15508
15509 (define-public python2-fasteners
15510 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15511 (package
15512 (inherit base)
15513 (propagated-inputs
15514 `(("python2-futures" ,python2-futures)
15515 ,@(package-propagated-inputs base))))))
15516
15517 (define-public python-requests-file
15518 (package
15519 (name "python-requests-file")
15520 (version "1.4.3")
15521 (source
15522 (origin
15523 (method url-fetch)
15524 (uri (pypi-uri "requests-file" version))
15525 (sha256
15526 (base32
15527 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15528 (build-system python-build-system)
15529 (propagated-inputs
15530 `(("python-requests" ,python-requests)
15531 ("python-six" ,python-six)))
15532 (home-page
15533 "https://github.com/dashea/requests-file")
15534 (synopsis "File transport adapter for Requests")
15535 (description
15536 "Requests-File is a transport adapter for use with the Requests Python
15537 library to allow local file system access via @code{file://} URLs.")
15538 (license license:asl2.0)))
15539
15540 (define-public python2-requests-file
15541 (package-with-python2 python-requests-file))
15542
15543 (define-public python-tldextract
15544 (package
15545 (name "python-tldextract")
15546 (version "2.2.0")
15547 (source
15548 (origin
15549 (method url-fetch)
15550 (uri (pypi-uri "tldextract" version))
15551 (sha256
15552 (base32
15553 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15554 (build-system python-build-system)
15555 (native-inputs
15556 `(("python-pytest" ,python-pytest)
15557 ("python-responses" ,python-responses)))
15558 (propagated-inputs
15559 `(("python-idna" ,python-idna)
15560 ("python-requests" ,python-requests)
15561 ("python-requests-file" ,python-requests-file)))
15562 (home-page
15563 "https://github.com/john-kurkowski/tldextract")
15564 (synopsis
15565 "Separate the TLD from the registered domain and subdomains of a URL")
15566 (description
15567 "TLDExtract accurately separates the TLD from the registered domain and
15568 subdomains of a URL, using the Public Suffix List. By default, this includes
15569 the public ICANN TLDs and their exceptions. It can optionally support the
15570 Public Suffix List's private domains as well.")
15571 (license license:bsd-3)))
15572
15573 (define-public python2-tldextract
15574 (package-with-python2 python-tldextract))
15575
15576 (define-public python-pynamecheap
15577 (package
15578 (name "python-pynamecheap")
15579 (version "0.0.3")
15580 (source
15581 (origin
15582 (method url-fetch)
15583 (uri (pypi-uri "PyNamecheap" version))
15584 (sha256
15585 (base32
15586 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15587 (build-system python-build-system)
15588 (propagated-inputs
15589 `(("python-requests" ,python-requests)))
15590 (home-page
15591 "https://github.com/Bemmu/PyNamecheap")
15592 (synopsis
15593 "Namecheap API client in Python")
15594 (description
15595 "PyNamecheap is a Namecheap API client in Python.")
15596 (license license:expat)))
15597
15598 (define-public python2-pynamecheap
15599 (package-with-python2 python-pynamecheap))
15600
15601 (define-public python-dns-lexicon
15602 (package
15603 (name "python-dns-lexicon")
15604 (version "2.4.0")
15605 (source
15606 (origin
15607 (method url-fetch)
15608 (uri (pypi-uri "dns-lexicon" version))
15609 (sha256
15610 (base32
15611 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15612 (build-system python-build-system)
15613 (arguments
15614 `(#:tests? #f)) ;requires internet access
15615 (propagated-inputs
15616 `(("python-future" ,python-future)
15617 ("python-pynamecheap" ,python-pynamecheap)
15618 ("python-requests" ,python-requests)
15619 ("python-tldextract" ,python-tldextract)
15620 ("python-urllib3" ,python-urllib3)))
15621 (home-page "https://github.com/AnalogJ/lexicon")
15622 (synopsis
15623 "Manipulate DNS records on various DNS providers")
15624 (description
15625 "Lexicon provides a way to manipulate DNS records on multiple DNS
15626 providers in a standardized way. It has a CLI but it can also be used as a
15627 Python library. It was designed to be used in automation, specifically with
15628 Let's Encrypt.")
15629 (license license:expat)))
15630
15631 (define-public python2-dns-lexicon
15632 (package-with-python2 python-dns-lexicon))
15633
15634 (define-public python-commandlines
15635 (package
15636 (name "python-commandlines")
15637 (version "0.4.1")
15638 (source
15639 (origin
15640 (method url-fetch)
15641 (uri (pypi-uri "commandlines" version))
15642 (sha256
15643 (base32
15644 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15645 (build-system python-build-system)
15646 (home-page "https://github.com/chrissimpkins/commandlines")
15647 (synopsis "Command line argument to object parsing library")
15648 (description
15649 "@code{Commandlines} is a Python library for command line application
15650 development that supports command line argument parsing, command string
15651 validation testing and application logic.")
15652 (license license:expat)))
15653
15654 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15655 ;; python-numba. They have a very unflexible relationship.
15656 (define-public python-numba
15657 (package
15658 (name "python-numba")
15659 (version "0.46.0")
15660 (source
15661 (origin
15662 (method url-fetch)
15663 (uri (pypi-uri "numba" version))
15664 (sha256
15665 (base32
15666 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
15667 (build-system python-build-system)
15668 (arguments
15669 `(#:modules ((guix build utils)
15670 (guix build python-build-system)
15671 (ice-9 ftw)
15672 (srfi srfi-1)
15673 (srfi srfi-26))
15674 #:phases
15675 (modify-phases %standard-phases
15676 (add-after 'unpack 'disable-proprietary-features
15677 (lambda _
15678 (setenv "NUMBA_DISABLE_HSA" "1")
15679 (setenv "NUMBA_DISABLE_CUDA" "1")
15680 #t))
15681 (add-after 'unpack 'remove-failing-tests
15682 (lambda _
15683 ;; FIXME: These tests fail for unknown reasons:
15684 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15685 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15686 (substitute* "numba/tests/test_dispatcher.py"
15687 (("def test(_non_writable_pycache)" _ m)
15688 (string-append "def guix_skip" m))
15689 (("def test(_non_creatable_pycache)" _ m)
15690 (string-append "def guix_skip" m))
15691 (("def test(_frozen)" _ m)
15692 (string-append "def guix_skip" m)))
15693
15694 ;; These tests fail because we don't run the tests from the build
15695 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15696 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
15697 (substitute* "numba/tests/test_pycc.py"
15698 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15699 (string-append "def guix_skip" m)))
15700
15701 ;; These tests fail because our version of Python does not have
15702 ;; a recognizable front-end for the Numba distribution to use
15703 ;; to check against.
15704 (substitute* "numba/tests/test_entrypoints.py"
15705 (("def test(_init_entrypoint)" _ m)
15706 (string-append "def guix_skip" m)))
15707 (substitute* "numba/tests/test_jitclasses.py"
15708 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15709 (string-append "def guix_skip" m)))
15710 #t))
15711 (replace 'check
15712 (lambda _
15713 (let ((cwd (getcwd)))
15714 (setenv "PYTHONPATH"
15715 (string-append cwd "/build/"
15716 (find (cut string-prefix? "lib" <>)
15717 (scandir (string-append cwd "/build")))
15718 ":"
15719 (getenv "PYTHONPATH")))
15720 ;; Something is wrong with the PYTHONPATH when running the
15721 ;; tests from the build directory, as it complains about not being
15722 ;; able to import certain modules.
15723 (with-directory-excursion "/tmp"
15724 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15725 #t)))))
15726 (propagated-inputs
15727 `(("python-llvmlite" ,python-llvmlite)
15728 ("python-numpy" ,python-numpy)
15729 ("python-singledispatch" ,python-singledispatch)))
15730 ;; Needed for tests.
15731 (inputs
15732 `(("python-jinja2" ,python-jinja2)
15733 ("python-pygments" ,python-pygments)))
15734 (home-page "https://numba.pydata.org")
15735 (synopsis "Compile Python code using LLVM")
15736 (description "Numba gives you the power to speed up your applications with
15737 high performance functions written directly in Python. With a few
15738 annotations, array-oriented and math-heavy Python code can be just-in-time
15739 compiled to native machine instructions, similar in performance to C, C++ and
15740 Fortran, without having to switch languages or Python interpreters.
15741
15742 Numba works by generating optimized machine code using the LLVM compiler
15743 infrastructure at import time, runtime, or statically (using the included pycc
15744 tool).")
15745 (license license:bsd-3)))
15746
15747 (define-public python-anndata
15748 (package
15749 (name "python-anndata")
15750 (version "0.6.18")
15751 (source
15752 (origin
15753 (method url-fetch)
15754 (uri (pypi-uri "anndata" version))
15755 (sha256
15756 (base32
15757 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15758 (build-system python-build-system)
15759 (propagated-inputs
15760 `(("python-h5py" ,python-h5py)
15761 ("python-natsort" ,python-natsort)
15762 ("python-pandas" ,python-pandas)
15763 ("python-scipy" ,python-scipy)))
15764 (home-page "https://github.com/theislab/anndata")
15765 (synopsis "Annotated data for data analysis pipelines")
15766 (description "Anndata is a package for simple (functional) high-level APIs
15767 for data analysis pipelines. In this context, it provides an efficient,
15768 scalable way of keeping track of data together with learned annotations and
15769 reduces the code overhead typically encountered when using a mostly
15770 object-oriented library such as @code{scikit-learn}.")
15771 (license license:bsd-3)))
15772
15773 (define-public python-dill
15774 (package
15775 (name "python-dill")
15776 (version "0.3.1.1")
15777 (source
15778 (origin
15779 (method url-fetch)
15780 (uri (pypi-uri "dill" version))
15781 (sha256
15782 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
15783 (build-system python-build-system)
15784 (arguments
15785 `(#:phases
15786 (modify-phases %standard-phases
15787 (replace 'check
15788 (lambda _
15789 (with-directory-excursion "/tmp"
15790 (invoke "nosetests" "-v"))
15791 #t)))))
15792 (native-inputs
15793 `(("python-nose" ,python-nose)))
15794 (home-page "https://pypi.org/project/dill/")
15795 (synopsis "Serialize all of Python")
15796 (description "Dill extends Python's @code{pickle} module for serializing
15797 and de-serializing Python objects to the majority of the built-in Python
15798 types. Dill provides the user the same interface as the @code{pickle} module,
15799 and also includes some additional features. In addition to pickling Python
15800 objects, @code{dill} provides the ability to save the state of an interpreter
15801 session in a single command. Hence, it would be feasible to save a
15802 interpreter session, close the interpreter, ship the pickled file to another
15803 computer, open a new interpreter, unpickle the session and thus continue from
15804 the saved state of the original interpreter session.")
15805 (license license:bsd-3)))
15806
15807 (define-public python-multiprocess
15808 (package
15809 (name "python-multiprocess")
15810 (version "0.70.9")
15811 (source
15812 (origin
15813 (method url-fetch)
15814 (uri (pypi-uri "multiprocess" version))
15815 (sha256
15816 (base32
15817 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
15818 (build-system python-build-system)
15819 (arguments
15820 `(#:phases
15821 (modify-phases %standard-phases
15822 (add-after 'unpack 'disable-broken-tests
15823 (lambda _
15824 ;; This test is broken as there is no keyboard interrupt.
15825 (substitute* "py3.7/multiprocess/tests/__init__.py"
15826 (("^(.*)def test_wait_result"
15827 line indent)
15828 (string-append indent
15829 "@unittest.skip(\"Disabled by Guix\")\n"
15830 line)))
15831 #t))
15832 ;; Tests must be run after installation.
15833 (delete 'check)
15834 (add-after 'install 'check
15835 (lambda* (#:key inputs outputs #:allow-other-keys)
15836 (add-installed-pythonpath inputs outputs)
15837 (invoke "python" "-m" "multiprocess.tests")
15838 #t)))))
15839 (propagated-inputs
15840 `(("python-dill" ,python-dill)))
15841 (home-page "https://pypi.org/project/multiprocess/")
15842 (synopsis "Multiprocessing and multithreading in Python")
15843 (description
15844 "This package is a fork of the multiprocessing Python package, a package
15845 which supports the spawning of processes using the API of the standard
15846 library's @code{threading} module.")
15847 (license license:bsd-3)))
15848
15849 (define-public python-toolz
15850 (package
15851 (name "python-toolz")
15852 (version "0.9.0")
15853 (source
15854 (origin
15855 (method url-fetch)
15856 (uri (pypi-uri "toolz" version))
15857 (sha256
15858 (base32
15859 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15860 (build-system python-build-system)
15861 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15862 ;; unregistered loader type"
15863 (arguments '(#:tests? #f))
15864 (home-page "https://github.com/pytoolz/toolz/")
15865 (synopsis "List processing tools and functional utilities")
15866 (description
15867 "This package provides a set of utility functions for iterators,
15868 functions, and dictionaries.")
15869 (license license:bsd-3)))
15870
15871 (define-public python2-toolz
15872 (package-with-python2 python-toolz))
15873
15874 (define-public python-cytoolz
15875 (package
15876 (name "python-cytoolz")
15877 (version "0.9.0.1")
15878 (source
15879 (origin
15880 (method url-fetch)
15881 (uri (pypi-uri "cytoolz" version))
15882 (sha256
15883 (base32
15884 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15885 (build-system python-build-system)
15886 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15887 ;; 'exceptions'"
15888 (arguments '(#:tests? #f))
15889 (propagated-inputs
15890 `(("python-toolz" ,python-toolz)))
15891 (native-inputs
15892 `(("python-cython" ,python-cython)))
15893 (home-page "https://github.com/pytoolz/cytoolz")
15894 (synopsis "High performance functional utilities")
15895 (description
15896 "The cytoolz package implements the same API as provided by toolz. The
15897 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15898 that is accessible to other projects developed in Cython.")
15899 (license license:bsd-3)))
15900
15901 (define-public python-sortedcontainers
15902 (package
15903 (name "python-sortedcontainers")
15904 (version "2.1.0")
15905 (source
15906 (origin
15907 (method url-fetch)
15908 (uri (pypi-uri "sortedcontainers" version))
15909 (sha256
15910 (base32
15911 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
15912 (build-system python-build-system)
15913 (arguments
15914 ;; FIXME: Tests require many extra dependencies, and would introduce
15915 ;; a circular dependency on hypothesis, which uses this package.
15916 '(#:tests? #f))
15917 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15918 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15919 (description
15920 "This package provides a sorted collections library, written in
15921 pure-Python.")
15922 (license license:asl2.0)))
15923
15924 (define-public python2-sortedcontainers
15925 (package-with-python2 python-sortedcontainers))
15926
15927 (define-public python-cloudpickle
15928 (package
15929 (name "python-cloudpickle")
15930 (version "0.6.1")
15931 (source
15932 (origin
15933 (method url-fetch)
15934 (uri (pypi-uri "cloudpickle" version))
15935 (sha256
15936 (base32
15937 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15938 (build-system python-build-system)
15939 ;; FIXME: there are 5 errors in 122 tests:
15940 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15941 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15942 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15943 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15944 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15945 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15946 (arguments '(#:tests? #f))
15947 (native-inputs
15948 `(("python-pytest" ,python-pytest)
15949 ("python-mock" ,python-mock)
15950 ("python-tornado" ,python-tornado)))
15951 (home-page "https://github.com/cloudpipe/cloudpickle")
15952 (synopsis "Extended pickling support for Python objects")
15953 (description
15954 "Cloudpickle makes it possible to serialize Python constructs not
15955 supported by the default pickle module from the Python standard library. It
15956 is especially useful for cluster computing where Python expressions are
15957 shipped over the network to execute on remote hosts, possibly close to the
15958 data.")
15959 (license license:bsd-3)))
15960
15961 (define-public python2-cloudpickle
15962 (package-with-python2 python-cloudpickle))
15963
15964 (define-public python-locket
15965 (package
15966 (name "python-locket")
15967 (version "0.2.0")
15968 (source
15969 (origin
15970 (method url-fetch)
15971 (uri (pypi-uri "locket" version))
15972 (sha256
15973 (base32
15974 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15975 (build-system python-build-system)
15976 (home-page "https://github.com/mwilliamson/locket.py")
15977 (synopsis "File-based locks for Python")
15978 (description
15979 "Locket implements a lock that can be used by multiple processes provided
15980 they use the same path.")
15981 (license license:bsd-2)))
15982
15983 (define-public python2-locket
15984 (package-with-python2 python-locket))
15985
15986 (define-public python-blosc
15987 (package
15988 (name "python-blosc")
15989 (version "1.5.1")
15990 (source
15991 (origin
15992 (method url-fetch)
15993 (uri (pypi-uri "blosc" version))
15994 (sha256
15995 (base32
15996 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15997 (build-system python-build-system)
15998 ;; FIXME: all tests pass, but then this error is printed:
15999 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16000 (arguments '(#:tests? #f))
16001 (propagated-inputs
16002 `(("python-numpy" ,python-numpy)))
16003 (home-page "https://github.com/blosc/python-blosc")
16004 (synopsis "Python wrapper for the Blosc data compressor library")
16005 (description "Blosc is a high performance compressor optimized for binary
16006 data. It has been designed to transmit data to the processor cache faster
16007 than the traditional, non-compressed, direct memory fetch approach via a
16008 @code{memcpy()} system call.
16009
16010 Blosc works well for compressing numerical arrays that contains data with
16011 relatively low entropy, like sparse data, time series, grids with
16012 regular-spaced values, etc.
16013
16014 This Python package wraps the Blosc library.")
16015 (license license:bsd-3)))
16016
16017 (define-public python2-blosc
16018 (package-with-python2 python-blosc))
16019
16020 (define-public python-partd
16021 (package
16022 (name "python-partd")
16023 (version "0.3.9")
16024 (source
16025 (origin
16026 (method url-fetch)
16027 (uri (pypi-uri "partd" version))
16028 (sha256
16029 (base32
16030 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16031 (build-system python-build-system)
16032 (propagated-inputs
16033 `(("python-blosc" ,python-blosc)
16034 ("python-locket" ,python-locket)
16035 ("python-numpy" ,python-numpy)
16036 ("python-pandas" ,python-pandas)
16037 ("python-pyzmq" ,python-pyzmq)
16038 ("python-toolz" ,python-toolz)))
16039 (home-page "https://github.com/dask/partd/")
16040 (synopsis "Appendable key-value storage")
16041 (description "Partd stores key-value pairs. Values are raw bytes. We
16042 append on old values. Partd excels at shuffling operations.")
16043 (license license:bsd-3)))
16044
16045 (define-public python2-partd
16046 (package-with-python2 python-partd))
16047
16048 (define-public python-fsspec
16049 (package
16050 (name "python-fsspec")
16051 (version "0.6.1")
16052 (source
16053 (origin
16054 (method url-fetch)
16055 (uri (pypi-uri "fsspec" version))
16056 (sha256
16057 (base32
16058 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16059 (build-system python-build-system)
16060 (arguments '(#:tests? #f)) ; there are none
16061 (home-page "https://github.com/intake/filesystem_spec")
16062 (synopsis "File-system specification")
16063 (description "The purpose of this package is to produce a template or
16064 specification for a file-system interface, that specific implementations
16065 should follow, so that applications making use of them can rely on a common
16066 behavior and not have to worry about the specific internal implementation
16067 decisions with any given backend.")
16068 (license license:bsd-3)))
16069
16070 (define-public python-dask
16071 (package
16072 (name "python-dask")
16073 (version "2.9.0")
16074 (source
16075 (origin
16076 (method url-fetch)
16077 (uri (pypi-uri "dask" version))
16078 (sha256
16079 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
16080 (build-system python-build-system)
16081 (arguments
16082 `(#:phases
16083 (modify-phases %standard-phases
16084 (add-after 'unpack 'disable-broken-tests
16085 (lambda _
16086 ;; This test is marked as xfail when pytest-xdist is used.
16087 (substitute* "dask/tests/test_threaded.py"
16088 (("def test_interrupt\\(\\)" m)
16089 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16090 m)))
16091 ;; This one fails with a type error:
16092 ;; TypeError: Already tz-aware, use tz_convert to convert.
16093 (substitute* "dask/dataframe/tests/test_shuffle.py"
16094 (("def test_set_index_timestamp\\(\\)" m)
16095 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16096 m)))
16097 #t))
16098 (replace 'check
16099 (lambda _ (invoke "pytest" "-vv"))))))
16100 (propagated-inputs
16101 `(("python-cloudpickle" ,python-cloudpickle)
16102 ("python-fsspec" ,python-fsspec)
16103 ("python-numpy" ,python-numpy)
16104 ("python-packaging" ,python-packaging)
16105 ("python-pandas" ,python-pandas)
16106 ("python-partd" ,python-partd)
16107 ("python-toolz" ,python-toolz)
16108 ("python-pyyaml" ,python-pyyaml)))
16109 (native-inputs
16110 `(("python-pytest" ,python-pytest)
16111 ("python-pytest-runner" ,python-pytest-runner)))
16112 (home-page "https://github.com/dask/dask/")
16113 (synopsis "Parallel computing with task scheduling")
16114 (description
16115 "Dask is a flexible parallel computing library for analytics. It
16116 consists of two components: dynamic task scheduling optimized for computation,
16117 and large data collections like parallel arrays, dataframes, and lists that
16118 extend common interfaces like NumPy, Pandas, or Python iterators to
16119 larger-than-memory or distributed environments. These parallel collections
16120 run on top of the dynamic task schedulers. ")
16121 (license license:bsd-3)))
16122
16123 (define-public python-ilinkedlist
16124 (package
16125 (name "python-ilinkedlist")
16126 (version "0.4.0")
16127 (source
16128 (origin
16129 (method url-fetch)
16130 (uri (pypi-uri "ilinkedlist" version))
16131 (sha256
16132 (base32
16133 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16134 (build-system python-build-system)
16135 (native-inputs `(("python-pytest" ,python-pytest)))
16136 (inputs `(("python" ,python)))
16137 (home-page "https://github.com/luther9/ilinkedlist-py")
16138 (synopsis "Immutable linked list library")
16139 (description
16140 "This is a implementation of immutable linked lists for Python. It
16141 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16142 Since a linked list is treated as immutable, it is hashable, and its length
16143 can be retrieved in constant time. Some of the terminology is inspired by
16144 LISP. It is possible to create an improper list by creating a @code{Pair}
16145 with a non-list @code{cdr}.")
16146 (license license:gpl3+)))
16147
16148 (define-public python-readlike
16149 (package
16150 (name "python-readlike")
16151 (version "0.1.3")
16152 (source
16153 (origin
16154 (method url-fetch)
16155 (uri (pypi-uri "readlike" version))
16156 (sha256
16157 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16158 (build-system python-build-system)
16159 (home-page "https://github.com/jangler/readlike")
16160 (synopsis "GNU Readline-like line editing module")
16161 (description
16162 "This Python module provides line editing functions similar to the default
16163 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16164 @code{readline} package, this one allows access to those capabilties in settings
16165 outside of a standard command-line interface. It is especially well-suited to
16166 interfacing with Urwid, due to a shared syntax for describing key inputs.
16167
16168 Currently, all stateless Readline commands are implemented. Yanking and history
16169 are not supported.")
16170 (license license:expat)))
16171
16172 (define-public python2-readlike
16173 (package-with-python2 python-readlike))
16174
16175 (define-public python-reparser
16176 (package
16177 (name "python-reparser")
16178 (version "1.4.3")
16179 (source
16180 (origin
16181 (method url-fetch)
16182 (uri (pypi-uri "ReParser" version))
16183 (sha256
16184 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16185 (build-system python-build-system)
16186 (home-page "https://github.com/xmikos/reparser")
16187 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16188 (description
16189 "This Python library provides a simple lexer/parser for inline markup based
16190 on regular expressions.")
16191 (license license:expat)))
16192
16193 (define-public python2-reparser
16194 (let ((reparser (package-with-python2
16195 (strip-python2-variant python-reparser))))
16196 (package (inherit reparser)
16197 (propagated-inputs
16198 `(("python2-enum34" ,python2-enum34)
16199 ,@(package-propagated-inputs reparser))))))
16200
16201 (define-public python-precis-i18n
16202 (package
16203 (name "python-precis-i18n")
16204 (version "1.0.0")
16205 (source
16206 (origin
16207 (method url-fetch)
16208 (uri (pypi-uri "precis_i18n" version))
16209 (sha256
16210 (base32
16211 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16212 (build-system python-build-system)
16213 (home-page "https://github.com/byllyfish/precis_i18n")
16214 (synopsis "Implementation of the PRECIS framework")
16215 (description
16216 "This module implements the PRECIS Framework as described in RFC 8264,
16217 RFC 8265 and RFC 8266.")
16218 (license license:expat)))
16219
16220 (define-public python-absl-py
16221 (package
16222 (name "python-absl-py")
16223 (version "0.6.1")
16224 (source
16225 (origin
16226 (method url-fetch)
16227 (uri (pypi-uri "absl-py" version))
16228 (sha256
16229 (base32
16230 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16231 (build-system python-build-system)
16232 (propagated-inputs
16233 `(("python-six" ,python-six)))
16234 (home-page "https://github.com/abseil/abseil-py")
16235 (synopsis "Abseil Python common libraries")
16236 (description
16237 "This package provides the Abseil Python Common Libraries, a collection
16238 of Python libraries for building Python applications.")
16239 (license license:asl2.0)))
16240
16241 (define-public python-astor
16242 (package
16243 (name "python-astor")
16244 (version "0.7.1")
16245 (source
16246 (origin
16247 (method url-fetch)
16248 (uri (pypi-uri "astor" version))
16249 (sha256
16250 (base32
16251 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16252 (build-system python-build-system)
16253 ;; FIXME: There are two errors and two test failures.
16254 (arguments `(#:tests? #f))
16255 (home-page "https://github.com/berkerpeksag/astor")
16256 (synopsis "Read and write Python ASTs")
16257 (description "Astor is designed to allow easy manipulation of Python
16258 source via the Abstract Syntax Tree.")
16259 (license license:bsd-3)))
16260
16261 (define-public python2-astor
16262 (package-with-python2 python-astor))
16263
16264 (define-public python-grpcio
16265 (package
16266 (name "python-grpcio")
16267 (version "1.17.1")
16268 (source
16269 (origin
16270 (method url-fetch)
16271 (uri (pypi-uri "grpcio" version))
16272 (sha256
16273 (base32
16274 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16275 (build-system python-build-system)
16276 (propagated-inputs
16277 `(("python-six" ,python-six)))
16278 (home-page "https://grpc.io")
16279 (synopsis "HTTP/2-based RPC framework")
16280 (description "This package provides a Python library for communicating
16281 with the HTTP/2-based RPC framework gRPC.")
16282 (license license:asl2.0)))
16283
16284 (define-public python-astunparse
16285 (package
16286 (name "python-astunparse")
16287 (version "1.6.2")
16288 (source
16289 (origin
16290 (method url-fetch)
16291 (uri (pypi-uri "astunparse" version))
16292 (sha256
16293 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16294 (build-system python-build-system)
16295 (arguments '(#:tests? #f)) ; there are none
16296 (propagated-inputs
16297 `(("python-six" ,python-six)
16298 ("python-wheel" ,python-wheel)))
16299 (home-page "https://github.com/simonpercivall/astunparse")
16300 (synopsis "AST unparser for Python")
16301 (description "This package provides an AST unparser for Python. It is a
16302 factored out version of @code{unparse} found in the Python source
16303 distribution.")
16304 (license license:bsd-3)))
16305
16306 (define-public python-gast
16307 (package
16308 (name "python-gast")
16309 (version "0.2.2")
16310 (source
16311 (origin
16312 (method url-fetch)
16313 (uri (pypi-uri "gast" version))
16314 (sha256
16315 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16316 (build-system python-build-system)
16317 (propagated-inputs
16318 `(("python-astunparse" ,python-astunparse)))
16319 (home-page "https://pypi.org/project/gast/")
16320 (synopsis "Generic Python AST that abstracts the underlying Python version")
16321 (description
16322 "GAST provides a compatibility layer between the AST of various Python
16323 versions, as produced by @code{ast.parse} from the standard @code{ast}
16324 module.")
16325 (license license:bsd-3)))
16326
16327 (define-public python-wikidata
16328 (package
16329 (name "python-wikidata")
16330 (version "0.6.1")
16331 (source
16332 (origin
16333 (method url-fetch)
16334 (uri (pypi-uri "Wikidata" version))
16335 (sha256
16336 (base32
16337 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16338 (build-system python-build-system)
16339 (propagated-inputs
16340 `(("python-babel" ,python-babel)))
16341 (home-page "https://github.com/dahlia/wikidata")
16342 (synopsis "Wikidata client library")
16343 (description
16344 "This package provides a Python interface to
16345 @url{https://www.wikidata.org/, Wikidata}.")
16346 (properties '((upstream-name . "Wikidata")))
16347 (license license:gpl3+)))
16348
16349 (define-public python-doctest-ignore-unicode
16350 (package
16351 (name "python-doctest-ignore-unicode")
16352 (version "0.1.2")
16353 (source
16354 (origin
16355 (method url-fetch)
16356 (uri (pypi-uri "doctest-ignore-unicode" version))
16357 (sha256
16358 (base32
16359 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16360 (build-system python-build-system)
16361 (native-inputs
16362 `(("python-nose" ,python-nose)))
16363 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16364 (synopsis "Ignore Unicode literal prefixes in doctests")
16365 (description
16366 "This package adds support for a flag to ignore Unicode literal prefixes
16367 in doctests.")
16368 (license license:asl2.0)))
16369
16370 (define-public python-attr
16371 (package
16372 (name "python-attr")
16373 (version "0.3.1")
16374 (source
16375 (origin
16376 (method url-fetch)
16377 (uri (pypi-uri "attr" version))
16378 (sha256
16379 (base32
16380 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16381 (build-system python-build-system)
16382 (home-page "https://github.com/denis-ryzhkov/attr")
16383 (synopsis "Decorator for attributes of target function or class")
16384 (description "Simple decorator to set attributes of target function or
16385 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16386 (license license:expat)))
16387
16388 (define-public python-construct
16389 (package
16390 (name "python-construct")
16391 (version "2.9.45")
16392 (source
16393 (origin
16394 (method url-fetch)
16395 (uri (pypi-uri "construct" version))
16396 (sha256
16397 (base32
16398 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16399 (build-system python-build-system)
16400 (arguments
16401 `(#:tests? #f)) ; No tests exist.
16402 (propagated-inputs
16403 `(("python-extras" ,python-extras)
16404 ("python-arrow" ,python-arrow)
16405 ("python-numpy" ,python-numpy)
16406 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16407 (home-page "http://construct.readthedocs.io")
16408 (synopsis "Declarative and symmetrical parser and builder for binary data")
16409 (description
16410 "This package provides both simple, atomic constructs (such as
16411 integers of various sizes), as well as composite ones which allow you
16412 form hierarchical and sequential structures of increasing complexity.
16413 It features bit and byte granularity, easy debugging and testing, an
16414 easy-to-extend subclass system, and lots of primitive constructs to
16415 make your work easier.")
16416 (license license:expat)))
16417
16418 (define-public python-humanize
16419 (package
16420 (name "python-humanize")
16421 (version "0.5.1")
16422 (source
16423 (origin
16424 (method url-fetch)
16425 (uri (pypi-uri "humanize" version))
16426 (sha256
16427 (base32
16428 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16429 (arguments
16430 '(#:tests? #f)) ; tests not in pypi archive
16431 (build-system python-build-system)
16432 (home-page "https://github.com/jmoiron/humanize")
16433 (synopsis "Print numerical information in a human-readable form")
16434 (description "This package provides a Python module that displays numbers
16435 and dates in \"human readable\" forms. For example, it would display
16436 \"12345591313\" as \"12.3 billion\".")
16437 (license license:expat)))
16438
16439 (define-public python-txaio
16440 (package
16441 (name "python-txaio")
16442 (version "18.8.1")
16443 (source
16444 (origin
16445 (method url-fetch)
16446 (uri (pypi-uri "txaio" version))
16447 (sha256
16448 (base32
16449 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16450 (build-system python-build-system)
16451 (propagated-inputs
16452 `(("python-twisted" ,python-twisted)
16453 ("python-six" ,python-six)))
16454 (home-page "https://github.com/crossbario/txaio")
16455 (synopsis "Compatibility layer between Python asyncio and Twisted")
16456 (description "Txaio provides a compatibility layer between the Python
16457 @code{asyncio} module and @code{Twisted}.")
16458 (license license:expat)))
16459
16460 (define-public python-toolshed
16461 (package
16462 (name "python-toolshed")
16463 (version "0.4.6")
16464 (source
16465 (origin
16466 (method url-fetch)
16467 (uri (pypi-uri "toolshed" version))
16468 (sha256
16469 (base32
16470 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16471 (build-system python-build-system)
16472 (native-inputs
16473 `(("python-nose" ,python-nose)))
16474 (home-page "https://github.com/brentp/toolshed/")
16475 (synopsis "Collection of modules and functions for working with data")
16476 (description "This is a collection of well-tested, simple modules and
16477 functions that aim to reduce boilerplate when working with data.")
16478 (license license:bsd-2)))
16479
16480 (define-public python-annoy
16481 (package
16482 (name "python-annoy")
16483 (version "1.15.1")
16484 (source
16485 (origin
16486 (method url-fetch)
16487 (uri (pypi-uri "annoy" version))
16488 (sha256
16489 (base32
16490 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16491 (build-system python-build-system)
16492 (native-inputs
16493 `(("python-nose" ,python-nose)))
16494 (home-page "https://github.com/spotify/annoy/")
16495 (synopsis "Approximate nearest neighbors library")
16496 (description
16497 "Annoy is a C++ library with Python bindings to search for points in
16498 space that are close to a given query point. It also creates large read-only
16499 file-based data structures that are @code{mmap}ped into memory so that many
16500 processes may share the same data.")
16501 (license license:asl2.0)))
16502
16503 (define-public python-pylzma
16504 (package
16505 (name "python-pylzma")
16506 (version "0.5.0")
16507 (source
16508 (origin
16509 (method url-fetch)
16510 (uri (pypi-uri "pylzma" version))
16511 (sha256
16512 (base32
16513 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16514 (build-system python-build-system)
16515 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16516 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16517 (description "This package provides Python bindings for the LZMA library
16518 by Igor Pavlov.")
16519 (license license:lgpl2.1+)))
16520
16521 (define-public python2-pylzma
16522 (package-with-python2 python-pylzma))
16523
16524 (define-public python2-zeroconf
16525 (package
16526 (name "python2-zeroconf")
16527
16528 ;; This is the last version that supports Python 2.x.
16529 (version "0.19.1")
16530 (source
16531 (origin
16532 (method url-fetch)
16533 (uri (pypi-uri "zeroconf" version))
16534 (sha256
16535 (base32
16536 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16537 (build-system python-build-system)
16538 (arguments
16539 `(#:python ,python-2
16540 #:phases
16541 (modify-phases %standard-phases
16542 (add-after 'unpack 'patch-requires
16543 (lambda* (#:key inputs #:allow-other-keys)
16544 (substitute* "setup.py"
16545 (("enum-compat")
16546 "enum34"))
16547 #t)))))
16548 (native-inputs
16549 `(("python2-six" ,python2-six)
16550 ("python2-enum32" ,python2-enum34)
16551 ("python2-netifaces" ,python2-netifaces)
16552 ("python2-typing" ,python2-typing)))
16553 (home-page "https://github.com/jstasiak/python-zeroconf")
16554 (synopsis "Pure Python mDNS service discovery")
16555 (description
16556 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16557 compatible).")
16558 (license license:lgpl2.1+)))
16559
16560 (define-public python-bsddb3
16561 (package
16562 (name "python-bsddb3")
16563 (version "6.2.6")
16564 (source
16565 (origin
16566 (method url-fetch)
16567 (uri (pypi-uri "bsddb3" version))
16568 (sha256
16569 (base32
16570 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16571 (build-system python-build-system)
16572 (inputs
16573 `(("bdb" ,bdb)))
16574 (arguments
16575 '(#:phases
16576 (modify-phases %standard-phases
16577 (add-after 'unpack 'configure-locations
16578 (lambda* (#:key inputs #:allow-other-keys)
16579 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16580 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16581 #t))
16582 (replace 'check
16583 (lambda _
16584 (invoke "python3" "test3.py" "-v"))))))
16585 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16586 (synopsis "Python bindings for Oracle Berkeley DB")
16587 (description
16588 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16589 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16590 Transaction objects, and each of these is exposed as a Python type in the
16591 bsddb3.db module. The database objects can use various access methods: btree,
16592 hash, recno, and queue. Complete support of Berkeley DB distributed
16593 transactions. Complete support for Berkeley DB Replication Manager.
16594 Complete support for Berkeley DB Base Replication. Support for RPC.")
16595 (license license:bsd-3)))
16596
16597 (define-public python-dbfread
16598 (package
16599 (name "python-dbfread")
16600 (version "2.0.7")
16601 (source (origin
16602 (method url-fetch)
16603 (uri (pypi-uri "dbfread" version))
16604 (sha256
16605 (base32
16606 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16607 (build-system python-build-system)
16608 (native-inputs
16609 `(("python-pytest" ,python-pytest)))
16610 (home-page "https://dbfread.readthedocs.io")
16611 (synopsis "Read DBF Files with Python")
16612 (description
16613 "This library reads DBF files and returns the data as native Python data
16614 types for further processing. It is primarily intended for batch jobs and
16615 one-off scripts.")
16616 (license license:expat)))
16617
16618 (define-public python-cached-property
16619 (package
16620 (name "python-cached-property")
16621 (version "1.5.1")
16622 (source
16623 (origin
16624 (method url-fetch)
16625 (uri (pypi-uri "cached-property" version))
16626 (sha256
16627 (base32
16628 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16629 (build-system python-build-system)
16630 (arguments
16631 `(#:phases
16632 (modify-phases %standard-phases
16633 ;; https://github.com/pydanny/cached-property/issues/131
16634 ;; recent versions of freezegun break one test
16635 (add-after 'unpack 'disable-broken-test
16636 (lambda _
16637 (substitute* "tests/test_cached_property.py"
16638 (("def test_threads_ttl_expiry\\(self\\)" m)
16639 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16640 " " m)))
16641 #t)))))
16642 (native-inputs
16643 `(("python-freezegun" ,python-freezegun)))
16644 (home-page
16645 "https://github.com/pydanny/cached-property")
16646 (synopsis
16647 "Decorator for caching properties in classes")
16648 (description
16649 "This package provides a decorator which makes caching
16650 time-or-computationally-expensive properties quick and easy and works in Python
16651 2 or 3.")
16652 (license license:bsd-3)))
16653
16654 (define-public python-folium
16655 (package
16656 (name "python-folium")
16657 (version "0.10.1")
16658 (source
16659 (origin
16660 (method url-fetch)
16661 (uri (pypi-uri "folium" version))
16662 (sha256
16663 (base32
16664 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
16665 (build-system python-build-system)
16666 (propagated-inputs
16667 `(("python-branca" ,python-branca)
16668 ("python-jinja2" ,python-jinja2)
16669 ("python-numpy" ,python-numpy)
16670 ("python-requests" ,python-requests)))
16671 (native-inputs
16672 `(("python-pytest" ,python-pytest)))
16673 (home-page "https://github.com/python-visualization/folium")
16674 (synopsis "Make beautiful maps with Leaflet.js & Python")
16675 (description "@code{folium} makes it easy to visualize data that’s been
16676 manipulated in Python on an interactive leaflet map. It enables both the
16677 binding of data to a map for @code{choropleth} visualizations as well as
16678 passing rich vector/raster/HTML visualizations as markers on the map.
16679
16680 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16681 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16682 supports Image, Video, GeoJSON and TopoJSON overlays.")
16683 (license license:expat)))
16684
16685 (define-public jube
16686 (package
16687 ;; This is a command-line tool, so no "python-" prefix.
16688 (name "jube")
16689 (version "2.2.2")
16690 (source (origin
16691 (method url-fetch)
16692 (uri (string-append
16693 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16694 version))
16695 (sha256
16696 (base32
16697 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16698 (file-name (string-append "jube-" version ".tar.gz"))))
16699 (build-system python-build-system)
16700 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16701 (synopsis "Benchmarking environment")
16702 (description
16703 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16704 benchmarked application, benchmark data is stored in a format that allows JUBE
16705 to deduct the desired information. This data can be parsed by automatic pre-
16706 and post-processing scripts that draw information and store it more densely
16707 for manual interpretation.")
16708 (license license:gpl3+)))
16709
16710 (define-public python-pyroutelib3
16711 (package
16712 (name "python-pyroutelib3")
16713 (version "1.3.post1")
16714 (source
16715 (origin
16716 (method url-fetch)
16717 (uri (pypi-uri "pyroutelib3" version))
16718 (sha256
16719 (base32
16720 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16721 (build-system python-build-system)
16722 (propagated-inputs
16723 `(("python-dateutil" ,python-dateutil)))
16724 (home-page "https://github.com/MKuranowski/pyroutelib3")
16725 (synopsis "Library for simple routing on OSM data")
16726 (description "Library for simple routing on OSM data")
16727 (license license:gpl3+)))
16728
16729 (define-public python-bibtexparser
16730 (package
16731 (name "python-bibtexparser")
16732 (version "1.1.0")
16733 (source
16734 (origin
16735 (method url-fetch)
16736 (uri (pypi-uri "bibtexparser" version))
16737 (sha256
16738 (base32
16739 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16740 (build-system python-build-system)
16741 (propagated-inputs
16742 `(("python-pyparsing" ,python-pyparsing)))
16743 (native-inputs
16744 `(("python-future" ,python-future)))
16745 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16746 (synopsis "Python library to parse BibTeX files")
16747 (description "BibtexParser is a Python library to parse BibTeX files.")
16748 (license (list license:bsd-3 license:lgpl3))))
16749
16750 (define-public python-distro
16751 (package
16752 (name "python-distro")
16753 (version "1.4.0")
16754 (source
16755 (origin
16756 (method url-fetch)
16757 (uri (pypi-uri "distro" version))
16758 (sha256
16759 (base32
16760 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16761 (build-system python-build-system)
16762 (native-inputs
16763 `(("python-pytest" ,python-pytest)))
16764 (home-page "https://github.com/nir0s/distro")
16765 (synopsis
16766 "OS platform information API")
16767 (description
16768 "@code{distro} provides information about the OS distribution it runs on,
16769 such as a reliable machine-readable ID, or version information.
16770
16771 It is the recommended replacement for Python's original
16772 `platform.linux_distribution` function (which will be removed in Python 3.8).
16773 @code{distro} also provides a command-line interface to output the platform
16774 information in various formats.")
16775 (license license:asl2.0)))
16776
16777 (define-public python-cairosvg
16778 (package
16779 (name "python-cairosvg")
16780 (version "2.4.2")
16781 (source
16782 (origin
16783 (method url-fetch)
16784 (uri (pypi-uri "CairoSVG" version))
16785 (sha256
16786 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16787 (build-system python-build-system)
16788 (arguments
16789 `(#:phases
16790 (modify-phases %standard-phases
16791 (replace 'check
16792 (lambda _ (invoke "pytest"))))))
16793 (propagated-inputs
16794 `(("python-cairocffi" ,python-cairocffi)
16795 ("python-cssselect2" ,python-cssselect2)
16796 ("python-defusedxml" ,python-defusedxml)
16797 ("python-pillow" ,python-pillow)
16798 ("python-tinycss2" ,python-tinycss2)))
16799 (native-inputs
16800 `(("python-pytest-flake8" ,python-pytest-flake8)
16801 ("python-pytest-isort" ,python-pytest-isort)
16802 ("python-pytest-runner" ,python-pytest-runner)))
16803 (home-page "https://cairosvg.org/")
16804 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16805 (description "CairoSVG is a SVG converter based on Cairo. It can export
16806 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16807 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16808 parsed, the result is drawn to a Cairo surface that can be exported to
16809 qvarious formats: PDF, PostScript, PNG and even SVG.")
16810 (license license:lgpl3+)))
16811
16812 (define-public python-pyphen
16813 (package
16814 (name "python-pyphen")
16815 (version "0.9.5")
16816 (source
16817 (origin
16818 (method url-fetch)
16819 (uri (pypi-uri "Pyphen" version))
16820 (sha256
16821 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16822 (build-system python-build-system)
16823 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16824 ;; embedded set provided by upstream - like Debian does.
16825 (home-page "https://github.com/Kozea/Pyphen")
16826 (synopsis "Pure Python module to hyphenate text")
16827 (description "Pyphen is a pure Python module to hyphenate text using
16828 existing Hunspell hyphenation dictionaries.")
16829 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
16830
16831 (define-public python-intelhex
16832 (package
16833 (name "python-intelhex")
16834 (version "2.2.1")
16835 (source
16836 (origin
16837 (method url-fetch)
16838 (uri (pypi-uri "intelhex" version))
16839 (sha256
16840 (base32
16841 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16842 (build-system python-build-system)
16843 (arguments '(#:tests? #f)) ;issue with version
16844 (home-page "https://pypi.org/project/IntelHex/")
16845 (synopsis "Python library for Intel HEX files manipulations")
16846 (description "The Intel HEX file format is widely used in microprocessors
16847 and microcontrollers area (embedded systems etc.) as the de facto standard for
16848 representation of code to be programmed into microelectronic devices. This
16849 package provides an intelhex Python library to read, write, create from
16850 scratch and manipulate data from Intel HEX file format. It also includes
16851 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16852 converters and more, those based on the library itself.")
16853 (license license:bsd-3)))
16854
16855 (define-public python-pykwalify
16856 (package
16857 (name "python-pykwalify")
16858 (version "1.7.0")
16859 (source
16860 (origin
16861 (method url-fetch)
16862 (uri (pypi-uri "pykwalify" version))
16863 (sha256
16864 (base32
16865 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16866 (build-system python-build-system)
16867 (arguments '(#:tests? #f)) ;missing dependencies
16868 (propagated-inputs
16869 `(("python-dateutil" ,python-dateutil)
16870 ("python-docopt" ,python-docopt)
16871 ("python-pyyaml" ,python-pyyaml)))
16872 (home-page "https://github.com/grokzen/pykwalify")
16873 (synopsis
16874 "Python lib/cli for JSON/YAML schema validation")
16875 (description
16876 "This package provides a parser, schema validator, and data binding tool
16877 for YAML and JSON.")
16878 (license license:expat)))
16879
16880 (define-public python-dbusmock
16881 (package
16882 (name "python-dbusmock")
16883 (version "0.18.3")
16884 (source
16885 (origin
16886 (method url-fetch)
16887 (uri (pypi-uri "python-dbusmock" version))
16888 (sha256
16889 (base32
16890 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16891 (build-system python-build-system)
16892 (arguments
16893 '(#:phases
16894 (modify-phases %standard-phases
16895 (add-after 'unpack 'patch-shell-path
16896 (lambda _
16897 (substitute* "tests/test_code.py"
16898 (("/bin/bash") (which "bash")))
16899 #t)))))
16900 (native-inputs
16901 `(;; For tests.
16902 ("dbus" ,dbus) ; for dbus-daemon
16903 ("python-nose" ,python-nose)
16904 ("which" ,which)))
16905 (propagated-inputs
16906 `(("python-dbus" ,python-dbus)
16907 ("python-pygobject" ,python-pygobject)))
16908 (home-page "https://github.com/martinpitt/python-dbusmock")
16909 (synopsis "Python library for mock D-Bus objects")
16910 (description "python-dbusmock allows for the easy creation of mock objects on
16911 D-Bus. This is useful for writing tests for software which talks to D-Bus
16912 services such as upower, systemd, logind, gnome-session or others, and it is
16913 hard (or impossible without root privileges) to set the state of the real
16914 services to what you expect in your tests.")
16915 (license license:lgpl3+)))
16916
16917 (define-public python-ujson
16918 (package
16919 (name "python-ujson")
16920 (version "1.35")
16921 (source
16922 (origin
16923 (method url-fetch)
16924 (uri (pypi-uri "ujson" version))
16925 (sha256
16926 (base32
16927 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16928 (build-system python-build-system)
16929 (home-page "http://www.esn.me")
16930 (synopsis
16931 "Ultra fast JSON encoder and decoder for Python")
16932 (description
16933 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16934 bindings for Python 2.5+ and 3.")
16935 (license license:bsd-3)))
16936
16937 (define-public python2-ujson
16938 (package-with-python2 python-ujson))
16939
16940 (define-public python-iocapture
16941 ;; The latest release is more than a year older than this commit.
16942 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16943 (revision "1"))
16944 (package
16945 (name "python-iocapture")
16946 (version "0.1.2")
16947 (source
16948 (origin
16949 (method git-fetch)
16950 (uri (git-reference
16951 (url "https://github.com/oinume/iocapture.git")
16952 (commit commit)))
16953 (file-name (git-file-name name version))
16954 (sha256
16955 (base32
16956 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16957 (build-system python-build-system)
16958 (arguments
16959 `(#:phases
16960 (modify-phases %standard-phases
16961 (delete 'check)
16962 (add-after 'install 'check
16963 (lambda* (#:key inputs outputs #:allow-other-keys)
16964 (add-installed-pythonpath inputs outputs)
16965 (invoke "py.test" "-v" "tests")
16966 #t)))))
16967 (propagated-inputs
16968 `(("python-flexmock" ,python-flexmock)
16969 ("python-pytest" ,python-pytest)
16970 ("python-pytest-cov" ,python-pytest-cov)
16971 ("python-six" ,python-six)))
16972 (home-page "https://github.com/oinume/iocapture")
16973 (synopsis "Python capturing tool for stdout and stderr")
16974 (description
16975 "This package helps you to capture the standard out (stdout) and the
16976 standard error channel (stderr) in your program.")
16977 (license license:expat))))
16978
16979 (define-public python-argh
16980 ;; There are 21 commits since the latest release containing important
16981 ;; improvements.
16982 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16983 (revision "1"))
16984 (package
16985 (name "python-argh")
16986 (version (git-version "0.26.2" revision commit))
16987 (source
16988 (origin
16989 (method git-fetch)
16990 (uri (git-reference
16991 (url "https://github.com/neithere/argh.git")
16992 (commit commit)))
16993 (file-name (git-file-name name version))
16994 (sha256
16995 (base32
16996 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16997 (build-system python-build-system)
16998 (propagated-inputs
16999 `(("python-iocapture" ,python-iocapture)
17000 ("python-mock" ,python-mock)
17001 ("python-pytest" ,python-pytest)
17002 ("python-pytest-cov" ,python-pytest-cov)
17003 ("python-pytest-xdist" ,python-pytest-xdist)
17004 ("python-tox" ,python-tox)))
17005 (home-page "https://github.com/neithere/argh/")
17006 (synopsis "Argparse wrapper with natural syntax")
17007 (description
17008 "python-argh is a small library that provides several layers of
17009 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
17010 always possible to declare a command with the highest possible (and least
17011 flexible) layer and then tune the behaviour with any of the lower layers
17012 including the native API of @code{python-argparse}.")
17013 (license license:lgpl3+))))
17014
17015 (define-public python-ppft
17016 (package
17017 (name "python-ppft")
17018 (version "1.6.6.1")
17019 (source
17020 (origin
17021 (method url-fetch)
17022 (uri (pypi-uri "ppft" version))
17023 (sha256
17024 (base32
17025 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
17026 (build-system python-build-system)
17027 (arguments '(#:tests? #f)) ; there are none
17028 (propagated-inputs
17029 `(("python-six" ,python-six)))
17030 (home-page "https://pypi.org/project/ppft/")
17031 (synopsis "Fork of Parallel Python")
17032 (description
17033 "This package is a fork of Parallel Python. The Parallel Python
17034 module (@code{pp}) provides an easy and efficient way to create
17035 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17036 computers and clusters. It features cross-platform portability and dynamic
17037 load balancing.")
17038 (license license:bsd-3)))
17039
17040 (define-public python-pox
17041 (package
17042 (name "python-pox")
17043 (version "0.2.7")
17044 (source
17045 (origin
17046 (method url-fetch)
17047 (uri (pypi-uri "pox" version))
17048 (sha256
17049 (base32
17050 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17051 (build-system python-build-system)
17052 (arguments
17053 `(#:phases
17054 (modify-phases %standard-phases
17055 (replace 'check
17056 (lambda _
17057 (mkdir-p "/tmp/guix")
17058 (setenv "SHELL" "bash")
17059 (setenv "USERNAME" "guix")
17060 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17061 (invoke "py.test" "-vv")
17062 #t)))))
17063 (native-inputs
17064 `(("python-pytest" ,python-pytest)
17065 ("which" ,which)))
17066 (home-page "https://pypi.org/project/pox/")
17067 (synopsis "Python utilities for filesystem exploration and automated builds")
17068 (description
17069 "Pox provides a collection of utilities for navigating and manipulating
17070 filesystems. This module is designed to facilitate some of the low level
17071 operating system interactions that are useful when exploring a filesystem on a
17072 remote host. Pox provides Python equivalents of several shell commands such
17073 as @command{which} and @command{find}. These commands allow automated
17074 discovery of what has been installed on an operating system, and where the
17075 essential tools are located.")
17076 (license license:bsd-3)))
17077
17078 (define-public python-pathos
17079 (package
17080 (name "python-pathos")
17081 (version "0.2.5")
17082 (source
17083 (origin
17084 (method url-fetch)
17085 (uri (pypi-uri "pathos" version))
17086 (sha256
17087 (base32
17088 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17089 (build-system python-build-system)
17090 (arguments
17091 '(#:phases
17092 (modify-phases %standard-phases
17093 (replace 'check
17094 (lambda _
17095 (setenv "PYTHONPATH"
17096 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17097 (invoke "python" "./tests/__main__.py"))))))
17098 (propagated-inputs
17099 `(("python-dill" ,python-dill)
17100 ("python-multiprocess" ,python-multiprocess)
17101 ("python-pox" ,python-pox)
17102 ("python-ppft" ,python-ppft)))
17103 (native-inputs
17104 `(("python-pytest" ,python-pytest)))
17105 (home-page "https://pypi.org/project/pathos/")
17106 (synopsis
17107 "Parallel graph management and execution in heterogeneous computing")
17108 (description
17109 "Python-pathos is a framework for heterogenous computing. It provides a
17110 consistent high-level interface for configuring and launching parallel
17111 computations across heterogenous resources. Python-pathos provides configurable
17112 launchers for parallel and distributed computing, where each launcher contains
17113 the syntactic logic to configure and launch jobs in an execution environment.")
17114 (license license:bsd-3)))
17115
17116 (define-public python-flit
17117 (package
17118 (name "python-flit")
17119 (version "2.1.0")
17120 (source
17121 (origin
17122 (method url-fetch)
17123 (uri (pypi-uri "flit" version))
17124 (sha256
17125 (base32
17126 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17127 (build-system python-build-system)
17128 (arguments
17129 `(#:tests? #f)) ; XXX: Check requires network access.
17130 (home-page "https://flit.readthedocs.io/")
17131 (synopsis
17132 "Simple packaging tool for simple packages")
17133 (description
17134 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17135 packages a single importable module or package at a time, using the import
17136 name as the name on PyPI. All subpackages and data files within a package
17137 are included automatically.")
17138 (license license:bsd-3)))
17139
17140 (define-public python-pathtools
17141 (package
17142 (name "python-pathtools")
17143 (version "0.1.2")
17144 (source
17145 (origin
17146 (method url-fetch)
17147 (uri (pypi-uri "pathtools" version))
17148 (sha256
17149 (base32
17150 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17151 (build-system python-build-system)
17152 (home-page
17153 "https://github.com/gorakhargosh/pathtools")
17154 (synopsis "Path utilities for Python")
17155 (description "Pattern matching and various utilities for file systems
17156 paths.")
17157 (license license:expat)))
17158
17159 (define-public python-fastentrypoints
17160 (package
17161 (name "python-fastentrypoints")
17162 (version "0.12")
17163 (source
17164 (origin
17165 (method url-fetch)
17166 (uri (pypi-uri "fastentrypoints" version))
17167 (sha256
17168 (base32
17169 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17170 (build-system python-build-system)
17171 (home-page
17172 "https://github.com/ninjaaron/fast-entry_points")
17173 (synopsis
17174 "Makes entry_points specified in setup.py load more quickly")
17175 (description
17176 "Using entry_points in your setup.py makes scripts that start really
17177 slowly because it imports pkg_resources. This package allows such setup
17178 scripts to load entry points more quickly.")
17179 (license license:bsd-3)))
17180
17181 (define-public python-funcparserlib
17182 (package
17183 (name "python-funcparserlib")
17184 (version "0.3.6")
17185 (source
17186 (origin
17187 (method url-fetch)
17188 (uri (pypi-uri "funcparserlib" version))
17189 (sha256
17190 (base32
17191 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17192 (native-inputs
17193 `(("python-tox" ,python-tox)))
17194 (arguments
17195 `(#:phases
17196 (modify-phases %standard-phases
17197 (replace 'check
17198 (lambda _
17199 (invoke "tox"))))))
17200 (build-system python-build-system)
17201 (home-page
17202 "https://github.com/vlasovskikh/funcparserlib")
17203 (synopsis
17204 "Recursive descent parsing library based on functional combinators")
17205 (description
17206 "This package is a recursive descent parsing library for Python based on
17207 functional combinators. Parser combinators are just higher-order functions
17208 that take parsers as their arguments and return them as result values.")
17209 (license license:expat)))
17210
17211 (define-public python-speg
17212 (package
17213 (name "python-speg")
17214 (version "0.3")
17215 (source
17216 (origin
17217 (method url-fetch)
17218 (uri (pypi-uri "speg" version ".zip"))
17219 (sha256
17220 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17221 (arguments
17222 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17223 (native-inputs
17224 `(("unzip" ,unzip)))
17225 (build-system python-build-system)
17226 (home-page "https://github.com/avakar/speg")
17227 (synopsis "PEG-based parser interpreter with memoization")
17228 (description "This package is a PEG-based parser and interpreter with
17229 memoization.")
17230 (license license:expat)))
17231
17232 (define-public python-cson
17233 (package
17234 (name "python-cson")
17235 (version "0.8")
17236 (source
17237 (origin
17238 (method url-fetch)
17239 (uri (pypi-uri "cson" version))
17240 (sha256
17241 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17242 (build-system python-build-system)
17243 (propagated-inputs
17244 `(("python-speg" ,python-speg)))
17245 (home-page "https://github.com/avakar/pycson")
17246 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17247 (description "This package is a parser for Coffeescript Object
17248 Notation (CSON).")
17249 (license license:expat)))
17250
17251 (define-public python-asynctest
17252 (package
17253 (name "python-asynctest")
17254 (version "0.13.0")
17255 (source
17256 (origin
17257 (method url-fetch)
17258 (uri (pypi-uri "asynctest" version))
17259 (sha256
17260 (base32
17261 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17262 (build-system python-build-system)
17263 (arguments
17264 '(#:phases
17265 (modify-phases %standard-phases
17266 (replace 'check
17267 (lambda _
17268 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17269 (add-after 'unpack 'disable-tests
17270 (lambda* _
17271 (substitute* "test/test_selector.py"
17272 ;; XXX: This test fails for unknown reason inside the build
17273 ;; environment.
17274 (("def test_events_watched_outside_test_are_ignored")
17275 "@unittest.skip('disabled by guix')
17276 def test_events_watched_outside_test_are_ignored")))))))
17277 (home-page "https://github.com/Martiusweb/asynctest")
17278 (synopsis "Extension of unittest for testing asyncio libraries")
17279 (description
17280 "The package asynctest is built on top of the standard unittest module
17281 and cuts down boilerplate code when testing libraries for asyncio.")
17282 (license license:asl2.0)))
17283
17284 (define-public python-aionotify
17285 (package
17286 (name "python-aionotify")
17287 (version "0.2.0")
17288 (source
17289 (origin
17290 ;; Source tarball on PyPi lacks tests
17291 (method git-fetch)
17292 (uri (git-reference
17293 (url "https://github.com/rbarrois/aionotify")
17294 (commit (string-append "v" version))))
17295 (file-name (git-file-name name version))
17296 (sha256
17297 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17298 (build-system python-build-system)
17299 (native-inputs `(("python-asynctest" ,python-asynctest)))
17300 (home-page "https://github.com/rbarrois/aionotify")
17301 (synopsis "Asyncio-powered inotify library")
17302 (description
17303 "@code{aionotify} is a simple, asyncio-based inotify library.")
17304 (license license:bsd-3)))
17305
17306 (define-public python-forbiddenfruit
17307 (package
17308 (name "python-forbiddenfruit")
17309 (version "0.1.3")
17310 (source
17311 (origin
17312 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17313 (method git-fetch)
17314 (uri (git-reference
17315 (url "https://github.com/clarete/forbiddenfruit")
17316 (commit version)))
17317 (file-name (git-file-name name version))
17318 (sha256
17319 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17320 (build-system python-build-system)
17321 (arguments
17322 '(#:phases
17323 (modify-phases %standard-phases
17324 (replace 'check
17325 (lambda _
17326 (invoke "make" "SKIP_DEPS=1"))))))
17327 (native-inputs
17328 `(("python-nose" ,python-nose)
17329 ("python-coverage" ,python-coverage)))
17330 (home-page "https://github.com/clarete/forbiddenfruit")
17331 (synopsis "Patch python built-in objects")
17332 (description "This project allows Python code to extend built-in types.")
17333 (license (list license:gpl3+ license:expat))))
17334
17335 (define-public python-shouldbe
17336 (package
17337 (name "python-shouldbe")
17338 (version "0.1.2")
17339 (source
17340 (origin
17341 (method url-fetch)
17342 (uri (pypi-uri "shouldbe" version))
17343 (sha256
17344 (base32
17345 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17346 (build-system python-build-system)
17347 (propagated-inputs
17348 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17349 (native-inputs
17350 `(("python-nose" ,python-nose)))
17351 (home-page "https://github.com/directxman12/should_be")
17352 (synopsis "Python Assertion Helpers inspired by Shouldly")
17353 (description
17354 "Python Assertion Helpers inspired by Shouldly.")
17355 (license license:isc)))
17356
17357 (define-public python-k5test
17358 (package
17359 (name "python-k5test")
17360 (version "0.9.2")
17361 (source
17362 (origin
17363 (method url-fetch)
17364 (uri (pypi-uri "k5test" version))
17365 (sha256
17366 (base32
17367 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17368 (build-system python-build-system)
17369 (propagated-inputs
17370 `(("python-six" ,python-six)
17371 ;; `which`, `kadmin.local` binaries called inside library
17372 ("which" ,which)
17373 ("mit-krb5" ,mit-krb5)))
17374 (native-inputs `(("mit-krb5" ,mit-krb5)))
17375 (arguments
17376 '(#:phases
17377 (modify-phases %standard-phases
17378 (add-after 'unpack 'patch-paths
17379 (lambda* _
17380 (substitute* "k5test/realm.py"
17381 (("'kadmin_local'") "'kadmin.local'")))))))
17382 (home-page "https://github.com/pythongssapi/k5test")
17383 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17384 (description
17385 "@code{k5test} is a library for setting up self-contained Kerberos 5
17386 environments, and running Python unit tests inside those environments. It is
17387 based on the file of the same name found alongside the MIT Kerberos 5 unit
17388 tests.")
17389 (license license:isc)))
17390
17391 (define-public python-gssapi
17392 (package
17393 (name "python-gssapi")
17394 (version "1.6.1")
17395 (source
17396 (origin
17397 (method url-fetch)
17398 (uri (pypi-uri "gssapi" version))
17399 (sha256
17400 (base32
17401 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
17402 (build-system python-build-system)
17403 (propagated-inputs
17404 `(("python-decorator" ,python-decorator)
17405 ("python-six" ,python-six)))
17406 (inputs
17407 `(("mit-krb5" ,mit-krb5)))
17408 ;; for tests
17409 (native-inputs
17410 `(("python-shouldbe" ,python-shouldbe)
17411 ("python-parameterized" ,python-parameterized)
17412 ("python-k5test" ,python-k5test)
17413 ("python-nose" ,python-nose)))
17414 (home-page "https://github.com/pythongssapi/python-gssapi")
17415 (synopsis "Python GSSAPI Wrapper")
17416 (description
17417 "Python-GSSAPI provides both low-level and high level wrappers around the
17418 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
17419 also be useable with other GSSAPI mechanisms.")
17420 (license license:isc)))
17421
17422 (define-public python-check-manifest
17423 (package
17424 (name "python-check-manifest")
17425 (version "0.37")
17426 (source
17427 (origin
17428 (method url-fetch)
17429 (uri (pypi-uri "check-manifest" version))
17430 (sha256
17431 (base32
17432 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
17433 (build-system python-build-system)
17434 (native-inputs
17435 `(("python-mock" ,python-mock)
17436 ("git" ,git)))
17437 (home-page "https://github.com/mgedmin/check-manifest")
17438 (synopsis "Check MANIFEST.in in a Python source package for completeness")
17439 (description "Python package can include a MANIFEST.in file to help with
17440 sending package files to the Python Package Index. This package checks that
17441 file to ensure it completely and accurately describes your project.")
17442 (license license:expat)))
17443
17444 (define-public python-android-stringslib
17445 (package
17446 (name "python-android-stringslib")
17447 (version "0.1.2")
17448 (source
17449 (origin
17450 (method git-fetch)
17451 (uri (git-reference
17452 (url "https://framagit.org/tyreunom/python-android-strings-lib")
17453 (commit (string-append "v" version))))
17454 (file-name (git-file-name name version))
17455 (sha256
17456 (base32
17457 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
17458 (build-system python-build-system)
17459 (arguments
17460 `(#:tests? #f))
17461 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
17462 (synopsis "Android strings.xml support")
17463 (description "Android Strings Lib provides support for android's strings.xml
17464 files. These files are used to translate strings in android apps.")
17465 (license license:expat)))
17466
17467 (define-public python-watchdog
17468 (package
17469 (name "python-watchdog")
17470 (version "0.9.0")
17471 (source
17472 (origin
17473 (method url-fetch)
17474 (uri (pypi-uri "watchdog" version))
17475 (sha256
17476 (base32
17477 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
17478 (build-system python-build-system)
17479 (arguments
17480 `(#:phases
17481 (modify-phases %standard-phases
17482 (add-before 'check 'remove-failing
17483 (lambda _
17484 (delete-file "tests/test_inotify_buffer.py")
17485 (delete-file "tests/test_snapshot_diff.py")
17486 #t)))))
17487 (propagated-inputs
17488 `(("python-argh" ,python-argh)
17489 ("python-pathtools" ,python-pathtools)
17490 ("python-pyyaml" ,python-pyyaml)))
17491 (native-inputs
17492 `(("python-pytest-cov" ,python-pytest-cov)
17493 ("python-pytest-timeout" ,python-pytest-timeout)))
17494 (home-page "https://github.com/gorakhargosh/watchdog")
17495 (synopsis "Filesystem events monitoring")
17496 (description "This package provides a way to monitor filesystem events
17497 such as a file modification and trigger an action. This is similar to inotify,
17498 but portable.")
17499 (license license:asl2.0)))
17500
17501 (define-public offlate
17502 (package
17503 (name "offlate")
17504 (version "0.5")
17505 (source
17506 (origin
17507 (method git-fetch)
17508 (uri (git-reference
17509 (url "https://framagit.org/tyreunom/offlate")
17510 (commit version)))
17511 (file-name (git-file-name name version))
17512 (sha256
17513 (base32
17514 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
17515 (build-system python-build-system)
17516 (arguments
17517 ;; No tests
17518 `(#:tests? #f))
17519 (propagated-inputs
17520 `(("python-android-stringslib" ,python-android-stringslib)
17521 ("python-dateutil" ,python-dateutil)
17522 ("python-gitlab" ,python-gitlab)
17523 ("python-lxml" ,python-lxml)
17524 ("python-polib" ,python-polib)
17525 ("python-pyenchant" ,python-pyenchant)
17526 ("python-pygit2" ,python-pygit2)
17527 ("python-pygithub" ,python-pygithub)
17528 ("python-pyqt" ,python-pyqt)
17529 ("python-requests" ,python-requests)
17530 ("python-ruamel.yaml" ,python-ruamel.yaml)
17531 ("python-translation-finder" ,python-translation-finder)
17532 ("python-watchdog" ,python-watchdog)))
17533 (native-inputs
17534 `(("qttools" ,qttools)))
17535 (home-page "https://framagit.org/tyreunom/offlate")
17536 (synopsis "Offline translation interface for online translation tools")
17537 (description "Offlate offers a unified interface for different translation
17538 file formats, as well as many different online translation platforms. You can
17539 use it to get work from online platforms, specialized such as the Translation
17540 Project, or not such a gitlab instance when your upstream doesn't use any
17541 dedicated platform. The tool proposes a unified interface for any format and
17542 an upload option to send your work back to the platform.")
17543 (license license:gpl3+)))
17544
17545 (define-public python-pypng
17546 (package
17547 (name "python-pypng")
17548 (version "0.0.20")
17549 (source
17550 (origin
17551 (method url-fetch)
17552 (uri (pypi-uri "pypng" version))
17553 (sha256
17554 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
17555 (build-system python-build-system)
17556 (home-page "https://github.com/drj11/pypng")
17557 (synopsis "Pure Python PNG image encoder/decoder")
17558 (description
17559 "The PyPNG module implements support for PNG images. It reads and writes
17560 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
17561 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
17562 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
17563 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
17564 A number of optional chunks can be specified (when writing) and
17565 understood (when reading): tRNS, bKGD, gAMA.
17566
17567 PyPNG is not a high level toolkit for image processing (like PIL) and does not
17568 aim at being a replacement or competitor. Its strength lies in fine-grained
17569 extensive support of PNG features. It can also read and write Netpbm PAM
17570 files, with a focus on its use as an intermediate format for implementing
17571 custom PNG processing.")
17572 (license license:expat)))