gnu: python-pyclipper: Update to 1.1.0.post3.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
2d040763 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
fa8ffaa0 4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
44d10b1f
RW
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>
b742c006 14;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
44d10b1f
RW
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
8581b40d 22;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
44d10b1f
RW
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>
47956fa0 26;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
44d10b1f
RW
27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28;;; Copyright © 2016 David Craven <david@craven.ch>
47f66348 29;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
44d10b1f
RW
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
e746d1c3 32;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
44d10b1f
RW
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
217ea1a1 35;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
44d10b1f
RW
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>
a0b2accf 41;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
44d10b1f
RW
42;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
dcfa0acd 47;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
44d10b1f
RW
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>
412342d1 54;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
44d10b1f 55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
85cfb0e9 56;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
4caf37b0 57;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
44d10b1f
RW
58;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
a9ba0a31 60;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
a91f4eba 61;;; Copyright © 2019 Sam <smbaines8@gmail.com>
8c141421 62;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
f825e605 63;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
fb236fdd 64;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
edeb04bf 65;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
e308b4f0 66;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
30e7c03a 67;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
c1bbef69 68;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
ba42a6bf 69;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
44d10b1f
RW
70;;;
71;;; This file is part of GNU Guix.
72;;;
73;;; GNU Guix is free software; you can redistribute it and/or modify it
74;;; under the terms of the GNU General Public License as published by
75;;; the Free Software Foundation; either version 3 of the License, or (at
76;;; your option) any later version.
77;;;
78;;; GNU Guix is distributed in the hope that it will be useful, but
79;;; WITHOUT ANY WARRANTY; without even the implied warranty of
80;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
81;;; GNU General Public License for more details.
82;;;
83;;; You should have received a copy of the GNU General Public License
84;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
85
86(define-module (gnu packages python-xyz)
87 #:use-module ((guix licenses) #:prefix license:)
88 #:use-module (gnu packages)
89 #:use-module (gnu packages algebra)
90 #:use-module (gnu packages adns)
91 #:use-module (gnu packages attr)
92 #:use-module (gnu packages backup)
93 #:use-module (gnu packages bash)
94 #:use-module (gnu packages check)
95 #:use-module (gnu packages compression)
96 #:use-module (gnu packages crypto)
97 #:use-module (gnu packages databases)
f825e605 98 #:use-module (gnu packages dbm)
44d10b1f
RW
99 #:use-module (gnu packages file)
100 #:use-module (gnu packages fontutils)
101 #:use-module (gnu packages gcc)
102 #:use-module (gnu packages geo)
103 #:use-module (gnu packages ghostscript)
104 #:use-module (gnu packages gl)
105 #:use-module (gnu packages glib)
106 #:use-module (gnu packages graphviz)
107 #:use-module (gnu packages graphics)
108 #:use-module (gnu packages gstreamer)
109 #:use-module (gnu packages gtk)
110 #:use-module (gnu packages icu4c)
111 #:use-module (gnu packages image)
112 #:use-module (gnu packages imagemagick)
113 #:use-module (gnu packages libevent)
114 #:use-module (gnu packages libffi)
115 #:use-module (gnu packages linux)
116 #:use-module (gnu packages llvm)
117 #:use-module (gnu packages man)
118 #:use-module (gnu packages maths)
42f0b0c2 119 #:use-module (gnu packages monitoring)
44d10b1f
RW
120 #:use-module (gnu packages multiprecision)
121 #:use-module (gnu packages networking)
122 #:use-module (gnu packages ncurses)
123 #:use-module (gnu packages openstack)
124 #:use-module (gnu packages pcre)
125 #:use-module (gnu packages perl)
126 #:use-module (gnu packages pkg-config)
127 #:use-module (gnu packages python)
d362b11d 128 #:use-module (gnu packages python-check)
15b65617 129 #:use-module (gnu packages python-compression)
44d10b1f
RW
130 #:use-module (gnu packages python-crypto)
131 #:use-module (gnu packages python-web)
132 #:use-module (gnu packages qt)
133 #:use-module (gnu packages readline)
134 #:use-module (gnu packages sdl)
135 #:use-module (gnu packages search)
136 #:use-module (gnu packages shells)
9d0c291e 137 #:use-module (gnu packages sphinx)
44d10b1f
RW
138 #:use-module (gnu packages ssh)
139 #:use-module (gnu packages terminals)
140 #:use-module (gnu packages tex)
141 #:use-module (gnu packages texinfo)
142 #:use-module (gnu packages time)
143 #:use-module (gnu packages tls)
144 #:use-module (gnu packages version-control)
145 #:use-module (gnu packages video)
146 #:use-module (gnu packages web)
147 #:use-module (gnu packages base)
148 #:use-module (gnu packages xml)
149 #:use-module (gnu packages xorg)
150 #:use-module (gnu packages xdisorg)
151 #:use-module (gnu packages tcl)
152 #:use-module (gnu packages bdw-gc)
f98232a3 153 #:use-module (gnu packages serialization)
44d10b1f
RW
154 #:use-module (guix packages)
155 #:use-module (guix download)
156 #:use-module (guix git-download)
a042d348 157 #:use-module (guix hg-download)
44d10b1f
RW
158 #:use-module (guix utils)
159 #:use-module (guix build-system gnu)
160 #:use-module (guix build-system cmake)
161 #:use-module (guix build-system python)
162 #:use-module (guix build-system trivial)
163 #:use-module (srfi srfi-1)
164 #:use-module (srfi srfi-26))
165
166(define-public python-psutil
167 (package
168 (name "python-psutil")
e9119ac1 169 (version "5.6.5")
44d10b1f
RW
170 (source
171 (origin
172 (method url-fetch)
173 (uri (pypi-uri "psutil" version))
174 (sha256
e9119ac1 175 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
44d10b1f
RW
176 (build-system python-build-system)
177 (arguments
178 ;; FIXME: some tests does not return and times out.
179 '(#:tests? #f))
180 (home-page "https://www.github.com/giampaolo/psutil")
181 (synopsis "Library for retrieving information on running processes")
182 (description
183 "psutil (Python system and process utilities) is a library for retrieving
184information on running processes and system utilization (CPU, memory, disks,
185network) in Python. It is useful mainly for system monitoring, profiling and
186limiting process resources and management of running processes. It implements
187many functionalities offered by command line tools such as: ps, top, lsof,
188netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
189pidof, tty, taskset, pmap.")
190 (properties `((python2-variant . ,(delay python2-psutil))))
191 (license license:bsd-3)))
192
193(define-public python2-psutil
194 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
195 (package
196 (inherit base)
197 (propagated-inputs
198 `(("python2-enum34" ,python2-enum34) ;optional
199 ,@(package-propagated-inputs base))))))
200
201(define-public python-shapely
202 (package
203 (name "python-shapely")
6d94465b 204 (version "1.6.4.post2")
44d10b1f
RW
205 (source
206 (origin
207 (method url-fetch)
208 (uri (pypi-uri "Shapely" version))
209 (sha256
210 (base32
6d94465b 211 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
212 (build-system python-build-system)
213 (native-inputs
214 `(("python-cython" ,python-cython)
215 ("python-matplotlib" ,python-matplotlib)
216 ("python-pytest" ,python-pytest)
217 ("python-pytest-cov" ,python-pytest-cov)))
218 (inputs
219 `(("geos" ,geos)))
220 (propagated-inputs
221 `(("python-numpy" ,python-numpy)))
222 (arguments
223 `(#:phases
224 (modify-phases %standard-phases
225 (add-after 'unpack 'patch-geos-path
226 (lambda* (#:key inputs #:allow-other-keys)
227 (let ((geos (assoc-ref inputs "geos"))
228 (glibc (assoc-ref inputs ,(if (%current-target-system)
229 "cross-libc" "libc"))))
230 (substitute* "shapely/geos.py"
231 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
232 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
233 geos "/lib/libgeos_c.so'])"))
234 (("free = load_dll\\('c'\\)\\.free")
235 (string-append "free = load_dll('c', fallbacks=['"
236 glibc "/lib/libc.so.6']).free"))))
237 #t)))))
238 (home-page "https://github.com/Toblerity/Shapely")
239 (synopsis "Library for the manipulation and analysis of geometric objects")
240 (description "Shapely is a Python package for manipulation and analysis of
241planar geometric objects. It is based on the @code{GEOS} library.")
242 (license license:bsd-3)))
243
a91f4eba
S
244(define-public python-shortuuid
245 (package
246 (name "python-shortuuid")
247 (version "0.5.0")
248 (source
249 (origin
250 (method url-fetch)
251 (uri (pypi-uri "shortuuid" version))
252 (sha256
253 (base32
254 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
255 (build-system python-build-system)
256 (native-inputs
257 `(("python-pep8" ,python-pep8)))
258 (home-page "https://github.com/skorokithakis/shortuuid")
259 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
260 (description
261 "@code{shortuuid} is a Python library for generating concise, unambiguous
262and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
263module and then similar looking characters are removed.")
264 (license license:bsd-3)))
265
44d10b1f
RW
266(define-public python-logwrap
267 (package
268 (name "python-logwrap")
269 (version "3.2.1")
270 (source
271 (origin
272 (method url-fetch)
273 (uri (pypi-uri "logwrap" version ".zip"))
274 (sha256
275 (base32
276 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
277 (build-system python-build-system)
278 (propagated-inputs
279 `(("python-six" ,python-six)
280 ("python-typing" ,python-typing)))
281 (native-inputs
282 `(("unzip" ,unzip)
283 ("python-cython" ,python-cython)
284 ("python-pytest" ,python-pytest)
285 ("python-pytest-cov" ,python-pytest-cov)
286 ("python-pytest-runner" ,python-pytest-runner)))
287 (home-page "https://github.com/penguinolog/logwrap")
288 (synopsis "Decorator for logging function arguments")
289 (description "This package provides a decorator to log function arguments
290and function call return values in a human-readable way.")
291 (license license:asl2.0)))
292
293(define-public python2-shapely
294 (package-with-python2 python-shapely))
295
296(define-public python-clyent
297 (package
298 (name "python-clyent")
299 (version "1.2.1")
300 (source
301 (origin
302 (method url-fetch)
303 (uri (pypi-uri "clyent" version))
304 (sha256
305 (base32
306 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
307 (build-system python-build-system)
308 (native-inputs
309 `(("python-mock" ,python-mock)))
310 (home-page "https://github.com/binstar/clyent")
311 (synopsis "Command line client library")
312 (description "Clyent is a Python command line utiliy library. It is used
313by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
314 (license license:bsd-3)))
315
316(define-public python2-clyent
317 (package-with-python2 python-clyent))
318
319(define-public python-babel
320 (package
321 (name "python-babel")
93253411 322 (version "2.7.0")
44d10b1f
RW
323 (source
324 (origin
325 (method url-fetch)
326 (uri (pypi-uri "Babel" version))
327 (sha256
328 (base32
93253411 329 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
330 (build-system python-build-system)
331 (native-inputs
332 `(("python-freezegun" ,python-freezegun)
333 ("python-pytest" ,python-pytest)))
334 (propagated-inputs
335 `(("python-pytz" ,python-pytz)))
336 (arguments
337 `(#:phases (modify-phases %standard-phases
338 (replace 'check
8acd1e90
MB
339 (lambda _
340 (invoke "pytest" "-vv" "-k"
341 (string-append
342 ;; XXX: These tests fail when using Pytest 4.x and
343 ;; Babel 2.6.0. Try removing this for later versions.
344 "not test_no_inherit_metazone_marker_never_in_output"
345 " and not test_smoke_dates"
346 " and not test_smoke_numbers")))))))
44d10b1f
RW
347 (home-page "http://babel.pocoo.org/")
348 (synopsis
349 "Tools for internationalizing Python applications")
350 (description
351 "Babel is composed of two major parts:
352- tools to build and work with gettext message catalogs
353- a Python interface to the CLDR (Common Locale Data Repository), providing
354access to various locale display names, localized number and date formatting,
355etc. ")
356 (license license:bsd-3)))
357
358(define-public python2-babel
359 (package-with-python2 python-babel))
360
93253411
MB
361;; Sphinx < 2.0 requires this version. Remove once no longer needed.
362(define-public python2-babel-2.6
363 (package
364 (inherit python2-babel)
365 (version "2.6.0")
366 (source (origin
367 (method url-fetch)
368 (uri (pypi-uri "Babel" version))
369 (sha256
370 (base32
371 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
372
44d10b1f
RW
373(define-public python2-backport-ssl-match-hostname
374 (package
375 (name "python2-backport-ssl-match-hostname")
376 (version "3.5.0.1")
377 (source
378 (origin
379 (method url-fetch)
2c1f0d09 380 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
381 (sha256
382 (base32
383 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
384 (build-system python-build-system)
385 (arguments
386 `(#:python ,python-2
387 #:tests? #f)) ; no test target
388 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
389 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
390 (description
391 "This backport brings the ssl.match_hostname() function to users of
392earlier versions of Python. The function checks the hostname in the
393certificate returned by the server to which a connection has been established,
394and verifies that it matches the intended target hostname.")
395 (license license:psfl)))
396
dc827867
TGR
397(define-public python-boolean.py
398 (package
399 (name "python-boolean.py")
400 (version "3.6")
401 (source
402 (origin
403 ;; There's no source tarball on PyPI.
404 (method git-fetch)
405 (uri (git-reference
406 (url "https://github.com/bastikr/boolean.py")
407 (commit (string-append "v" version))))
408 (file-name (git-file-name name version))
409 (sha256
410 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
411 (build-system python-build-system)
412 (home-page "https://github.com/bastikr/boolean.py")
413 (synopsis "Boolean algebra in one Python module")
414 (description
415 "This is a small Python library that implements boolean algebra.
416It defines two base elements, @code{TRUE} and @code{FALSE}, and a
417@code{Symbol} class that can take on one of these two values. Calculations
418are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
419compositions like @code{XOR} and @code{NAND} are emulated on top of them.
420Expressions are constructed from parsed strings or directly in Python.")
421 (license license:bsd-2)))
422
44d10b1f
RW
423(define-public python-hdf4
424 (package
425 (name "python-hdf4")
426 (version "0.9")
427 (source
428 (origin
429 (method url-fetch)
430 (uri (pypi-uri name version))
431 (sha256
432 (base32
433 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
434 (build-system python-build-system)
435 (native-inputs `(("nose" ,python-nose)))
436 (propagated-inputs `(("numpy" ,python-numpy)))
437 (inputs
438 `(("hdf4" ,hdf4)
439 ("libjpeg" ,libjpeg)
440 ("zlib" ,zlib)))
441 (arguments
442 `(#:phases
443 (modify-phases %standard-phases
444 (replace 'check
445 (lambda _
446 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
447 ;; on to import numpy. Somehow this works on their CI system.
448 ;; Let's just manage PYTHONPATH here instead.
449 (substitute* "runexamples.sh"
450 (("export PYTHONPATH=.*") ""))
451 (setenv "PYTHONPATH"
452 (string-append (getcwd) ":"
453 (getenv "PYTHONPATH")))
454 (invoke "./runexamples.sh")
455 (invoke "nosetests" "-v"))))))
456 (home-page "https://github.com/fhs/python-hdf4")
457 (synopsis "Python interface to the NCSA HDF4 library")
458 (description
459 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
460which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
461NetCDF files can also be read and modified. Python-HDF4 is a fork of
462@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
463 (license license:expat)))
464
465(define-public python2-hdf4
466 (package-with-python2 python-hdf4))
467
468(define-public python-h5py
469 (package
470 (name "python-h5py")
471 (version "2.8.0")
472 (source
473 (origin
474 (method url-fetch)
475 (uri (pypi-uri "h5py" version))
476 (sha256
477 (base32
478 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
479 (build-system python-build-system)
480 (arguments
481 `(#:tests? #f ; no test target
482 #:phases
483 (modify-phases %standard-phases
484 (add-after 'unpack 'fix-hdf5-paths
485 (lambda* (#:key inputs #:allow-other-keys)
486 (let ((prefix (assoc-ref inputs "hdf5")))
487 (substitute* "setup_build.py"
488 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
489 (string-append "['" prefix "/lib" "']"))
490 (("'/opt/local/include', '/usr/local/include'")
491 (string-append "'" prefix "/include" "'")))
492 (substitute* "setup_configure.py"
493 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
494 (string-append "['" prefix "/lib" "']")))
495 #t))))))
496 (propagated-inputs
497 `(("python-six" ,python-six)
498 ("python-numpy" ,python-numpy)))
499 (inputs
500 `(("hdf5" ,hdf5)))
501 (native-inputs
502 `(("python-cython" ,python-cython)
503 ("python-pkgconfig" ,python-pkgconfig)))
504 (home-page "http://www.h5py.org/")
505 (synopsis "Read and write HDF5 files from Python")
506 (description
507 "The h5py package provides both a high- and low-level interface to the
508HDF5 library from Python. The low-level interface is intended to be a
509complete wrapping of the HDF5 API, while the high-level component supports
510access to HDF5 files, datasets and groups using established Python and NumPy
511concepts.")
512 (license license:bsd-3)))
513
514(define-public python2-h5py
515 (package-with-python2 python-h5py))
516
8b89dedc
RW
517(define-public python-sh
518 (package
519 (name "python-sh")
520 (version "1.12.14")
521 (source
522 (origin
523 (method url-fetch)
524 (uri (pypi-uri "sh" version))
525 (sha256
526 (base32
527 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
528 (build-system python-build-system)
fd3638d8
EF
529 (arguments
530 '(#:phases
531 (modify-phases %standard-phases
532 (replace 'check
533 (lambda _
ca983a2f
NG
534 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
535 (setenv "HOME" "/tmp")
fd3638d8
EF
536 (invoke "python" "sh.py" "test"))))))
537 (native-inputs
538 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
539 (home-page "https://github.com/amoffat/sh")
540 (synopsis "Python subprocess replacement")
541 (description "This package provides a replacement for Python's
542@code{subprocess} feature.")
543 (license license:expat)))
544
3869effd
RW
545(define-public python2-sh
546 (package-with-python2 python-sh))
547
d362b11d
RW
548(define-public python-cftime
549 (package
550 (name "python-cftime")
da107cf5 551 (version "1.0.4.2")
d362b11d
RW
552 (source
553 (origin
554 (method url-fetch)
555 (uri (pypi-uri "cftime" version))
556 (sha256
da107cf5 557 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
558 (build-system python-build-system)
559 (propagated-inputs
560 `(("python-numpy" ,python-numpy)))
561 (native-inputs
562 `(("python-coveralls" ,python-coveralls)
563 ("python-cython" ,python-cython)
564 ("python-pytest-cov" ,python-pytest-cov)))
565 (home-page "https://github.com/Unidata/cftime")
566 (synopsis "Library for time handling")
567 (description
568 "This package provides time-handling functionality that used to be part
569of the netcdf4 package before.")
570 ;; This package claims to include code under the GPLv3 but is released
571 ;; under ISC.
572 (license (list license:isc license:gpl3+))))
573
44d10b1f
RW
574(define-public python-netcdf4
575 (package
576 (name "python-netcdf4")
93e7b209 577 (version "1.4.2")
44d10b1f
RW
578 (source
579 (origin
580 (method url-fetch)
581 (uri (pypi-uri "netCDF4" version))
582 (sha256
583 (base32
93e7b209 584 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 585 (build-system python-build-system)
93e7b209
RW
586 (arguments
587 '(#:phases
588 (modify-phases %standard-phases
589 (add-after 'unpack 'configure-locations
590 (lambda* (#:key inputs #:allow-other-keys)
591 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
592 #t)))))
44d10b1f
RW
593 (native-inputs
594 `(("python-cython" ,python-cython)))
595 (propagated-inputs
93e7b209
RW
596 `(("python-numpy" ,python-numpy)
597 ("python-cftime" ,python-cftime)))
44d10b1f
RW
598 (inputs
599 `(("netcdf" ,netcdf)
600 ("hdf4" ,hdf4)
601 ("hdf5" ,hdf5)))
93e7b209 602 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
603 (synopsis "Python/numpy interface to the netCDF library")
604 (description "Netcdf4-python is a Python interface to the netCDF C
605library. netCDF version 4 has many features not found in earlier
606versions of the library and is implemented on top of HDF5. This module
607can read and write files in both the new netCDF 4 and the old netCDF 3
608format, and can create files that are readable by HDF5 clients. The
609API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
610to users of that module.")
611 ;; The software is mainly ISC, but includes some files covered
612 ;; by the Expat license.
613 (license (list license:isc license:expat))))
614
615(define-public python2-netcdf4
616 (package-with-python2 python-netcdf4))
617
d6803445
TGR
618(define-public python-license-expression
619 (package
620 (name "python-license-expression")
621 (version "0.999")
622 (source
623 (origin
624 (method url-fetch)
625 (uri (pypi-uri "license-expression" version))
626 (sha256
627 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
628 (build-system python-build-system)
629 (propagated-inputs
630 `(("python-boolean.py" ,python-boolean.py)))
631 (home-page "https://github.com/nexB/license-expression")
632 (synopsis "Apply boolean logic to license expressions")
633 (description
634 "This Python module defines a tiny language to evaluate and compare
635license expressions using boolean logic. Logical combinations of licenses can
636be tested for equality, containment, and equivalence. They can be normalised
637and simplified. It supports SPDX license expressions as well as other naming
638conventions and aliases in the same expression.")
639 (license license:gpl2+)))
640
44d10b1f
RW
641(define-public python-lockfile
642 (package
643 (name "python-lockfile")
644 (version "0.12.2")
645 (source
646 (origin
647 (method url-fetch)
8318bf07 648 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
649 (sha256
650 (base32
651 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
652 (build-system python-build-system)
653 (arguments '(#:test-target "check"))
654 (native-inputs
655 `(("python-pbr" ,python-pbr)))
656 (home-page "https://launchpad.net/pylockfile")
657 (synopsis "Platform-independent file locking module")
658 (description
659 "The lockfile package exports a LockFile class which provides a simple
660API for locking files.")
661 (license license:expat)))
662
663(define-public python2-lockfile
664 (package-with-python2 python-lockfile))
665
666(define-public python-semantic-version
667 (package
668 (name "python-semantic-version")
669 (version "2.6.0")
670 (source
671 (origin
672 (method url-fetch)
673 (uri (pypi-uri "semantic_version" version))
674 (sha256
675 (base32
676 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
677 (build-system python-build-system)
678 (arguments
679 `(#:tests? #f)) ; PyPI tarball lacks tests
680 (home-page "https://github.com/rbarrois/python-semanticversion")
681 (synopsis "Semantic versioning module for Python")
682 (description
683 "The @code{semantic_version} class is a small library for handling
684@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
685
686It can compare versions, generate a new version that represents a bump in one of
687the version levels, and check whether any given string is a proper semantic
688version identifier.")
689 (license license:bsd-3)))
690
691(define-public python2-semantic-version
692 (package-with-python2 python-semantic-version))
693
694(define-public python-serpent
695 (package
696 (name "python-serpent")
fa9d14ac 697 (version "1.28")
44d10b1f
RW
698 (source
699 (origin
700 (method url-fetch)
701 (uri (pypi-uri "serpent" version))
702 (sha256
fa9d14ac 703 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 704 (build-system python-build-system)
fa9d14ac
TGR
705 (native-inputs
706 `(("python-attrs" ,python-attrs)
707 ("python-pytz" ,python-pytz)))
44d10b1f
RW
708 (home-page "https://github.com/irmen/Serpent")
709 (synopsis "Serializer for literal Python expressions")
710 (description
1d3c7803
TGR
711 "Serpent provides @code{ast.literal_eval()}-compatible object tree
712serialization. It serializes an object tree into bytes (an utf-8 encoded
713string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
714to rebuild the original object tree.
715
716Because only safe literals are encoded, it is safe to send serpent data to
717other machines, such as over the network.")
44d10b1f
RW
718 (license license:expat)))
719
720(define-public python-setuptools
721 (package
722 (name "python-setuptools")
e39d4933 723 (version "41.0.1")
44d10b1f
RW
724 (source
725 (origin
726 (method url-fetch)
727 (uri (pypi-uri "setuptools" version ".zip"))
728 (sha256
729 (base32
e39d4933 730 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
731 (modules '((guix build utils)))
732 (snippet
733 '(begin
734 ;; Remove included binaries which are used to build self-extracting
735 ;; installers for Windows.
736 ;; TODO: Find some way to build them ourself so we can include them.
737 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
738 #t))))
739 (build-system python-build-system)
740 ;; FIXME: Tests require pytest, which itself relies on setuptools.
741 ;; One could bootstrap with an internal untested setuptools.
742 (arguments
743 `(#:tests? #f))
744 (home-page "https://pypi.python.org/pypi/setuptools")
745 (synopsis
746 "Library designed to facilitate packaging Python projects")
747 (description
748 "Setuptools is a fully-featured, stable library designed to facilitate
749packaging Python projects, where packaging includes:
750Python package and module definitions,
751distribution package metadata,
752test hooks,
753project installation,
754platform-specific details,
755Python 3 support.")
756 ;; TODO: setuptools now bundles the following libraries:
757 ;; packaging, pyparsing, six and appdirs. How to unbundle?
758 (license (list license:psfl ; setuptools itself
759 license:expat ; six, appdirs, pyparsing
760 license:asl2.0 ; packaging is dual ASL2/BSD-2
761 license:bsd-2))))
762
763(define-public python2-setuptools
764 (package-with-python2 python-setuptools))
765
0fdec2a3
MB
766;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
767(define-public python-setuptools-for-tensorflow
768 (hidden-package
769 (package
770 (inherit python-setuptools)
771 (version "39.1.0")
772 (source (origin
773 (inherit (package-source python-setuptools))
774 (uri (pypi-uri "setuptools" version ".zip"))
775 (sha256
776 (base32
777 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
778
44d10b1f
RW
779(define-public python-uniseg
780 (package
781 (name "python-uniseg")
782 (version "0.7.1")
783 (source
784 (origin
785 (method url-fetch)
786 (uri (pypi-uri "uniseg" version ".zip"))
787 (sha256
788 (base32
789 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
790 (build-system python-build-system)
791 (arguments
792 '(#:tests? #f)) ; The test suite requires network access.
793 (native-inputs
794 `(("unzip" ,unzip)))
795 (home-page
796 "https://bitbucket.org/emptypage/uniseg-python")
797 (synopsis
798 "Python library to determine Unicode text segmentations")
799 (description
800 "Uniseg is a Python package used to determine Unicode text segmentations.
801Supported segmentations include:
802@enumerate
803@item @dfn{Code point} (any value in the Unicode codespace)
804@item @dfn{Grapheme cluster} (user-perceived character made of a single or
805multiple Unicode code points, e.g. \"G\" + acute-accent)
806@item Word break
807@item Sentence break
808@item Line break
809@end enumerate")
810 (license license:expat)))
811
812(define-public python2-uniseg
813 (package-with-python2 python-uniseg))
814
815(define-public python-humanfriendly
816 (package
817 (name "python-humanfriendly")
818 (version "4.4.1")
819 (source
820 (origin
821 (method url-fetch)
822 (uri (pypi-uri "humanfriendly" version))
823 (sha256
824 (base32
825 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
826 (build-system python-build-system)
827 (arguments
828 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
829 #:tests? #f))
830 (propagated-inputs
831 `(("python-monotonic" ,python-monotonic)))
832 (home-page "https://humanfriendly.readthedocs.io")
833 (synopsis "Human-friendly input and output in Python")
834 (description
835 "The functions and classes in @code{humanfriendly} can be used to make
836text interfaces more user-friendly. It includes tools to parse and format
837numbers, file sizes, and timespans, timers for long-running operations, menus
838to allow the user to choose from a list of options, and terminal interaction
839helpers.")
840 (license license:expat)))
841
842(define-public python2-humanfriendly
843 (package-with-python2 python-humanfriendly))
844
845(define-public python-capturer
846 (package
847 (name "python-capturer")
848 (version "2.4")
849 (source
850 (origin
851 (method url-fetch)
852 (uri (pypi-uri "capturer" version))
853 (sha256
854 (base32
855 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
856 (build-system python-build-system)
857 (arguments
858 `(#:tests? #f))
859 (propagated-inputs
860 `(("python-humanfriendly" ,python-humanfriendly)))
861 (home-page "https://capturer.readthedocs.io")
862 (synopsis "Capture stdout and stderr streams of the current process")
863 (description
864 "The capturer package makes it easy to capture the stdout and stderr
865streams of the current process and subprocesses. Output can be relayed
866to the terminal in real time but is also available to the Python program
867for additional processing.")
868 (license license:expat)))
869
870(define-public python2-capturer
871 (package-with-python2 python-capturer))
872
873(define-public python-case
874 (package
875 (name "python-case")
876 (version "1.5.3")
877 (source
878 (origin
879 (method url-fetch)
880 (uri (pypi-uri "case" version))
881 (sha256
882 (base32
883 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
884 (build-system python-build-system)
885 (propagated-inputs
886 `(("python-mock" ,python-mock)
887 ("python-nose" ,python-nose)
888 ("python-six" ,python-six)
889 ("python-unittest2" ,python-unittest2)))
890 (native-inputs
891 `(("python-coverage" ,python-coverage)))
892 (home-page "https://github.com/celery/case")
893 (synopsis "Unittest utilities and convenience methods")
894 (description
895 "The @code{case} package provides utilities on top of unittest, including
896some helpful Python 2 compatibility convenience methods.")
897 (license license:bsd-3)))
898
899(define-public python-verboselogs
900 (package
901 (name "python-verboselogs")
902 (version "1.7")
903 (source
904 (origin
905 (method url-fetch)
906 (uri (pypi-uri "verboselogs" version))
907 (sha256
908 (base32
909 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
910 (build-system python-build-system)
1760c970
MO
911 (arguments
912 `(#:phases
913 (modify-phases %standard-phases
914 (replace 'check
915 (lambda _
916 ;; Do not run pylint plugin test, as astroid is an old
917 ;; unsupported version.
918 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
919 "verboselogs/tests.py"))))))
44d10b1f
RW
920 (native-inputs
921 `(("python-mock" ,python-mock)
1760c970 922 ("python-pytest" ,python-pytest)))
44d10b1f
RW
923 (home-page "https://verboselogs.readthedocs.io")
924 (synopsis "Verbose logging level for Python's logging module")
925 (description
926 "The @code{verboselogs} package extends Python's @code{logging} module to
927add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
928 (license license:expat)))
929
930(define-public python2-verboselogs
931 (package-with-python2 python-verboselogs))
932
933(define-public python-coloredlogs
934 (package
935 (name "python-coloredlogs")
b2b8a39c 936 (version "10.0")
44d10b1f
RW
937 (source
938 (origin
939 (method url-fetch)
940 (uri (pypi-uri "coloredlogs" version))
941 (sha256
942 (base32
b2b8a39c 943 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
944 (build-system python-build-system)
945 (arguments
946 `(;Tests require some updated modules
947 #:tests? #f))
948 (propagated-inputs
949 `(("python-capturer" ,python-capturer)))
950 (home-page "https://coloredlogs.readthedocs.io")
951 (synopsis "Colored stream handler for Python's logging module")
952 (description
953 "The @code{coloredlogs} package enables colored terminal output for
954Python's logging module. The @code{ColoredFormatter} class inherits from
955@code{logging.Formatter} and uses ANSI escape sequences to render your logging
956messages in color.")
957 (license license:expat)))
958
959(define-public python2-coloredlogs
960 (package-with-python2 python-coloredlogs))
961
af760990
VC
962(define-public python-editorconfig
963 (package
964 (name "python-editorconfig")
965 (version "0.12.2")
966 (source
967 (origin
968 (method url-fetch)
969 (uri (pypi-uri "EditorConfig" version))
970 (sha256
971 (base32
972 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
973 (build-system python-build-system)
974 (home-page "https://editorconfig.org/")
975 (synopsis "EditorConfig bindings for python")
976 (description "The EditorConfig project consists of a file format for
977defining coding styles and a collection of text editor plugins that enable
978editors to read the file format and adhere to defined styles. EditorConfig
979files are easily readable and they work nicely with version control systems.")
980 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
981 (license (list license:bsd-2 license:psfl))))
982
4caf37b0
MC
983(define-public python-et-xmlfile
984 (package
985 (name "python-et-xmlfile")
986 (version "1.0.1")
987 (source
988 (origin
989 (method url-fetch)
990 (uri (pypi-uri "et_xmlfile" version))
991 (sha256
992 (base32
993 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
994 (build-system python-build-system)
995 (arguments
996 `(#:phases (modify-phases %standard-phases
997 (replace 'check
998 (lambda _
999 (invoke "pytest"))))))
1000 (native-inputs
1001 `(("python-pytest" ,python-pytest)
1002 ("python-lxml" ,python-lxml))) ;used for the tests
1003 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1004 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1005 (description "This Python library is based upon the @code{xmlfile} module
1006from @code{lxml}. It aims to provide a low memory, compatible implementation
1007of @code{xmlfile}.")
1008 (license license:expat)))
1009
1010(define-public python2-et-xmlfile
1011 (package-with-python2 python-et-xmlfile))
1012
a042d348
MC
1013(define-public python-openpyxl
1014 (package
1015 (name "python-openpyxl")
441e6d93 1016 (version "2.6.2")
a042d348
MC
1017 (source
1018 (origin
1019 ;; We use the upstream repository, as the tests are not included in the
1020 ;; PyPI releases.
1021 (method hg-fetch)
1022 (uri (hg-reference
1023 (url "https://bitbucket.org/openpyxl/openpyxl")
1024 (changeset version)))
1025 (file-name (string-append name "-" version "-checkout"))
1026 (sha256
441e6d93 1027 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1028 (build-system python-build-system)
1029 (arguments
1030 `(#:phases (modify-phases %standard-phases
1031 (replace 'check
1032 (lambda _
1033 (invoke "pytest"))))))
1034 (native-inputs
1035 ;; For the test suite.
1036 `(("python-lxml" ,python-lxml)
1037 ("python-pillow" ,python-pillow)
1038 ("python-pytest" ,python-pytest)))
1039 (propagated-inputs
1040 `(("python-et-xmlfile" ,python-et-xmlfile)
1041 ("python-jdcal" ,python-jdcal)))
1042 (home-page "https://openpyxl.readthedocs.io")
1043 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1044 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1045XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1046standard.")
1047 (license license:expat)))
1048
44d10b1f
RW
1049(define-public python-eventlet
1050 (package
1051 (name "python-eventlet")
1052 (version "0.20.1")
1053 (source
1054 (origin
1055 (method url-fetch)
1056 (uri (pypi-uri "eventlet" version))
1057 (sha256
1058 (base32
1059 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1060 (build-system python-build-system)
1061 (propagated-inputs
1062 `(("python-greenlet" ,python-greenlet)))
1063 (arguments
1064 ;; TODO: Requires unpackaged 'enum-compat'.
1065 '(#:tests? #f))
1066 (home-page "http://eventlet.net")
1067 (synopsis "Concurrent networking library for Python")
1068 (description
1069 "Eventlet is a concurrent networking library for Python that
1070allows you to change how you run your code, not how you write it.
1071It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1072Coroutines ensure that the developer uses a blocking style of programming
1073that is similar to threading, but provide the benefits of non-blocking I/O.
1074The event dispatch is implicit, which means you can easily use @code{Eventlet}
1075from the Python interpreter, or as a small part of a larger application.")
1076 (license license:expat)))
1077
1078(define-public python2-eventlet
1079 (let ((base (package-with-python2
1080 (strip-python2-variant python-eventlet))))
1081 (package (inherit base)
1082 (propagated-inputs
1083 `(("python2-enum34" ,python2-enum34)
1084 ,@(package-propagated-inputs base))))))
1085
1086(define-public python-six
1087 (package
1088 (name "python-six")
6c58a06e 1089 (version "1.12.0")
44d10b1f
RW
1090 (source
1091 (origin
1092 (method url-fetch)
1093 (uri (pypi-uri "six" version))
1094 (sha256
1095 (base32
6c58a06e 1096 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1097 (build-system python-build-system)
1098 (arguments
1099 `(#:phases
1100 (modify-phases %standard-phases
1101 (replace 'check
1102 (lambda _
1103 (invoke "py.test" "-v"))))))
1104 (native-inputs
1105 `(("python-py" ,python-py)
1106 ("python-pytest" ,python-pytest-bootstrap)))
1107 (home-page "https://pypi.python.org/pypi/six/")
1108 (synopsis "Python 2 and 3 compatibility utilities")
1109 (description
1110 "Six is a Python 2 and 3 compatibility library. It provides utility
1111functions for smoothing over the differences between the Python versions with
1112the goal of writing Python code that is compatible on both Python versions.
1113Six supports every Python version since 2.5. It is contained in only one
1114Python file, so it can be easily copied into your project.")
1115 (license license:x11)))
1116
1117(define-public python2-six
1118 (package-with-python2 python-six))
1119
1120(define-public python-six-bootstrap
1121 (package
1122 (inherit python-six)
1123 (name "python-six-bootstrap")
1124 (native-inputs `())
1125 (arguments `(#:tests? #f))))
1126
1127(define-public python2-six-bootstrap
1128 (package-with-python2 python-six-bootstrap))
1129
1130(define-public python-schedule
1131 (package
1132 (name "python-schedule")
1133 (version "0.4.3")
1134 (source
1135 (origin
1136 (method url-fetch)
1137 (uri (pypi-uri "schedule" version))
1138 (sha256
1139 (base32
1140 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1141 (build-system python-build-system)
1142 (native-inputs
1143 `(("python-pytest" ,python-pytest)
1144 ("python-mock" ,python-mock)))
1145 (home-page "https://github.com/dbader/schedule")
1146 (synopsis "Schedule periodic function calls in Python")
1147 (description
1148 "Schedule is an in-process scheduler for periodic jobs that uses the
1149builder pattern for configuration. Schedule lets you run Python functions (or
1150any other callable) periodically at pre-determined intervals using a simple,
1151human-friendly syntax.")
1152 (license license:expat)))
1153
1154(define-public python2-schedule
1155 (package-with-python2 python-schedule))
1156
1157(define-public python-pandas
1158 (package
1159 (name "python-pandas")
7a97a26d 1160 (version "0.25.2")
44d10b1f
RW
1161 (source
1162 (origin
1163 (method url-fetch)
1164 (uri (pypi-uri "pandas" version))
1165 (sha256
7a97a26d 1166 (base32 "1gp2pvzdiakvgjmykdzdlzrsfbg4vjm49jjdl9s0ha0a3yfs34fa"))))
44d10b1f
RW
1167 (build-system python-build-system)
1168 (arguments
1169 `(#:modules ((guix build utils)
1170 (guix build python-build-system)
1171 (ice-9 ftw)
1172 (srfi srfi-26))
1173 #:phases (modify-phases %standard-phases
c0d43f62
MC
1174 (add-after 'unpack 'patch-which
1175 (lambda* (#:key inputs #:allow-other-keys)
1176 (let ((which (assoc-ref inputs "which")))
1177 (substitute* "pandas/io/clipboard/__init__.py"
1178 (("^CHECK_CMD = .*")
1179 (string-append "CHECK_CMD = \"" which "\"\n"))))
1180 #t))
44d10b1f
RW
1181 (replace 'check
1182 (lambda _
1183 (let ((build-directory
1184 (string-append
1185 (getcwd) "/build/"
1186 (car (scandir "build"
1187 (cut string-prefix? "lib." <>))))))
1188 ;; Disable the "strict data files" option which causes
c0d43f62
MC
1189 ;; the build to error out if required data files are
1190 ;; not available (as is the case with PyPI archives).
44d10b1f
RW
1191 (substitute* "setup.cfg"
1192 (("addopts = --strict-data-files") "addopts = "))
1193 (with-directory-excursion build-directory
c0d43f62
MC
1194 ;; Delete tests that require "moto" which is not yet
1195 ;; in Guix.
44d10b1f
RW
1196 (for-each delete-file
1197 '("pandas/tests/io/conftest.py"
1198 "pandas/tests/io/json/test_compression.py"
1199 "pandas/tests/io/parser/test_network.py"
44d10b1f
RW
1200 "pandas/tests/io/test_parquet.py"))
1201 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1202 "--skip-network" "-k"
1203 ;; XXX: Due to the deleted tests above.
1204 "not test_read_s3_jsonl"))))))))
1205 (propagated-inputs
1206 `(("python-numpy" ,python-numpy)
667c6ef5 1207 ("python-openpyxl" ,python-openpyxl)
44d10b1f 1208 ("python-pytz" ,python-pytz)
667c6ef5
MC
1209 ("python-dateutil" ,python-dateutil)
1210 ("python-xlrd" ,python-xlrd)))
c0d43f62
MC
1211 (inputs
1212 `(("which" ,which)))
44d10b1f
RW
1213 (native-inputs
1214 `(("python-cython" ,python-cython)
1215 ("python-beautifulsoup4" ,python-beautifulsoup4)
1216 ("python-lxml" ,python-lxml)
1217 ("python-html5lib" ,python-html5lib)
1218 ("python-nose" ,python-nose)
c0d43f62
MC
1219 ("python-pytest" ,python-pytest)
1220 ("python-pytest-mock" ,python-pytest-mock)))
44d10b1f
RW
1221 (home-page "https://pandas.pydata.org")
1222 (synopsis "Data structures for data analysis, time series, and statistics")
1223 (description
1224 "Pandas is a Python package providing fast, flexible, and expressive data
1225structures designed to make working with structured (tabular,
1226multidimensional, potentially heterogeneous) and time series data both easy
1227and intuitive. It aims to be the fundamental high-level building block for
1228doing practical, real world data analysis in Python.")
d8bb1097 1229 (properties `((python2-variant . ,(delay python2-pandas))))
44d10b1f
RW
1230 (license license:bsd-3)))
1231
d8bb1097 1232;; Pandas 0.24.x are the last versions that support Python 2.
44d10b1f 1233(define-public python2-pandas
d8bb1097
MB
1234 (let ((pandas (package-with-python2
1235 (strip-python2-variant python-pandas))))
1236 (package/inherit
1237 pandas
1238 (version "0.24.2")
1239 (source (origin
1240 (method url-fetch)
1241 (uri (pypi-uri "pandas" version))
1242 (sha256
1243 (base32
1244 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag")))))))
44d10b1f
RW
1245
1246(define-public python2-mechanize
1247 (package
1248 (name "python2-mechanize")
1249 (version "0.2.5")
1250 (source
1251 (origin
1252 (method url-fetch)
1cc184e6 1253 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1254 (sha256
1255 (base32
1256 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1257 (build-system python-build-system)
1258 (arguments
1259 `(#:python ,python-2 ; apparently incompatible with Python 3
1260 #:tests? #f))
1261 ;; test fails with message
1262 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1263 ;; (python-3.3.2) or
1264 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1265 ;; (python-2.7.5).
1266 ;; The source code is from March 2011 and probably not up-to-date
1267 ;; with respect to python unit tests.
1268 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1269 (synopsis
1270 "Stateful programmatic web browsing in Python")
1271 (description
1272 "Mechanize implements stateful programmatic web browsing in Python,
1273after Andy Lester’s Perl module WWW::Mechanize.")
1274 (license (license:non-copyleft
1275 "file://COPYING"
1276 "See COPYING in the distribution."))))
1277
1278
1279(define-public python-simplejson
1280 (package
1281 (name "python-simplejson")
1282 (version "3.14.0")
1283 (source
1284 (origin
1285 (method url-fetch)
1286 (uri (pypi-uri "simplejson" version))
1287 (sha256
1288 (base32
1289 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1290 (build-system python-build-system)
1291 (home-page "http://simplejson.readthedocs.org/en/latest/")
1292 (synopsis
1293 "Json library for Python")
1294 (description
1295 "JSON (JavaScript Object Notation) is a subset of JavaScript
1296syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1297format.
1298
1299Simplejson exposes an API familiar to users of the standard library marshal
1300and pickle modules. It is the externally maintained version of the json
1301library contained in Python 2.6, but maintains compatibility with Python 2.5
1302and (currently) has significant performance advantages, even without using
1303the optional C extension for speedups. Simplejson is also supported on
1304Python 3.3+.")
1305 (license license:x11)))
1306
1307(define-public python2-simplejson
1308 (package-with-python2 python-simplejson))
1309
1310
1311(define-public python-pyicu
1312 (package
1313 (name "python-pyicu")
dc23bb45 1314 (version "2.3.1")
44d10b1f
RW
1315 (source
1316 (origin
1317 (method url-fetch)
1318 (uri (pypi-uri "PyICU" version))
1319 (sha256
1320 (base32
dc23bb45 1321 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1322 (build-system python-build-system)
1323 (inputs
1324 `(("icu4c" ,icu4c)))
1325 (native-inputs
1326 `(("python-pytest" ,python-pytest)
1327 ("python-six" ,python-six)))
1328 (home-page "https://github.com/ovalhub/pyicu")
1329 (synopsis "Python extension wrapping the ICU C++ API")
1330 (description
1331 "PyICU is a python extension wrapping the ICU C++ API.")
1332 (properties `((python2-variant . ,(delay python2-pyicu))))
1333 (license license:x11)))
1334
1335(define-public python2-pyicu
1336 (let ((base (package-with-python2
1337 (strip-python2-variant python-pyicu))))
1338 (package
1339 (inherit base)
1340 (arguments
1341 `(,@(package-arguments base)
1342 #:phases
1343 (modify-phases %standard-phases
1344 (add-before 'check 'delete-failing-test
1345 (λ _
1346 ;; XXX: This fails due to Unicode issues unique to Python 2,
1347 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1348 (delete-file "test/test_Script.py")
1349 #t))))))))
1350
1351(define-public python2-dogtail
1352 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1353 ;; spaces in indentation" with Python 3.
1354 (package
1355 (name "python2-dogtail")
1356 (version "0.9.9")
1357 (source (origin
1358 (method url-fetch)
1359 (uri (pypi-uri "dogtail" version))
1360 (sha256
1361 (base32
1362 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1363 (build-system python-build-system)
1364 (arguments `(#:python ,python-2
1365 #:tests? #f)) ; invalid command "test"
1366 ;; Currently no offical homepage.
1367 (home-page "https://pypi.python.org/pypi/dogtail/")
1368 (synopsis "GUI test tool and automation framework written in Python")
1369 (description
1370 "Dogtail is a GUI test tool and automation framework written in Python.
1371It uses Accessibility (a11y) technologies to communicate with desktop
1372applications. dogtail scripts are written in Python and executed like any
1373other Python program.")
1374 (license license:gpl2+)))
1375
1376(define-public python-empy
1377 (package
1378 (name "python-empy")
0f6d5115 1379 (version "3.3.3")
44d10b1f
RW
1380 (source (origin
1381 (method url-fetch)
1382 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1383 version ".tar.gz"))
1384 (sha256
1385 (base32
0f6d5115 1386 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1387 (build-system python-build-system)
1388 (arguments
0f6d5115 1389 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1390 (home-page "http://www.alcyone.com/software/empy/")
1391 (synopsis "Templating system for Python")
1392 (description
1393 "EmPy is a system for embedding Python expressions and statements in
1394template text; it takes an EmPy source file, processes it, and produces
1395output. This is accomplished via expansions, which are special signals to the
1396EmPy system and are set off by a special prefix (by default the at sign, @@).
1397EmPy can expand arbitrary Python expressions and statements in this way, as
1398well as a variety of special forms. Textual data not explicitly delimited in
1399this way is sent unaffected to the output, allowing Python to be used in
1400effect as a markup language. Also supported are callbacks via hooks,
1401recording and playback via diversions, and dynamic, chainable filters. The
1402system is highly configurable via command line options and embedded
1403commands.")
1404 (license license:lgpl2.1+)))
1405
1406(define-public python2-empy
0f064242
TGR
1407 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1408 (package
1409 (inherit base)
1410 (arguments `(,@(package-arguments base)
1411 #:tests? #t)))))
44d10b1f
RW
1412
1413(define-public python2-element-tree
1414 (package
1415 (name "python2-element-tree")
1416 (version "1.2.6")
1417 (source (origin
1418 (method url-fetch)
1419 (uri (string-append
1420 "http://effbot.org/media/downloads/elementtree-"
1421 version "-20050316.tar.gz"))
1422 (sha256
1423 (base32
1424 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1425 (build-system python-build-system)
1426 (arguments
1427 `(#:python ,python-2 ; seems to be part of Python 3
1428 #:tests? #f)) ; no 'test' sub-command
1429 (synopsis "Toolkit for XML processing in Python")
1430 (description
1431 "ElementTree is a Python library supporting lightweight XML processing.")
1432 (home-page "http://effbot.org/zone/element-index.htm")
1433 (license (license:x11-style
1434 "http://docs.python.org/2/license.html"
1435 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1436
1437(define-public python2-pybugz
1438 (package
1439 (name "python2-pybugz")
1440 (version "0.6.11")
1441 (source (origin
1442 (method url-fetch)
1443 (uri (string-append
1444 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1445 version ".tar.gz"))
1446 (sha256
1447 (base32
1448 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1449 (patches (search-patches "pybugz-stty.patch"
1450 "pybugz-encode-error.patch"))))
1451 (build-system python-build-system)
1452 (arguments
1453 `(#:python ,python-2 ; SyntaxError with Python 3
1454 #:tests? #f)) ; no 'test' sub-command
1455 (propagated-inputs
1456 `(("element-tree" ,python2-element-tree)))
1457 (synopsis "Python and command-line interface to Bugzilla")
1458 (description
1459 "PyBugz is a Python library and command-line tool to query the Bugzilla
1460bug tracking system. It is meant as an aid to speed up interaction with the
1461bug tracker.")
1462 (home-page "http://www.liquidx.net/pybugz/")
1463 (license license:gpl2)))
1464
1465(define-public python2-enum
1466 (package
1467 (name "python2-enum")
1468 (version "0.4.6")
1469 (source (origin
1470 (method url-fetch)
1471 (uri (pypi-uri "enum" version))
1472 (sha256
1473 (base32
1474 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1475 (build-system python-build-system)
1476 (arguments
1477 `(#:python ,python-2))
1478 (home-page "http://pypi.python.org/pypi/enum/")
1479 (synopsis "Robust enumerated type support in Python")
1480 (description
1481 "This provides a module for robust enumerations in Python. It has
1482been superseded by the Python standard library and is provided only for
1483compatibility.")
1484 ;; Choice of either license.
1485 (license (list license:gpl3+ license:psfl))))
1486
1487(define-public python-enum34
1488 (package
1489 (name "python-enum34")
1490 (version "1.1.6")
1491 (source
1492 (origin
1493 (method url-fetch)
1494 (uri (pypi-uri "enum34" version))
1495 (sha256
1496 (base32
1497 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1498 (build-system python-build-system)
1499 (home-page "https://pypi.python.org/pypi/enum34")
1500 (synopsis "Backported Python 3.4 Enum")
1501 (description
1502 "Enum34 is the new Python stdlib enum module available in Python 3.4
1503backported for previous versions of Python from 2.4 to 3.3.")
1504 (license license:bsd-3)))
1505
1506(define-public python2-enum34
1507 (package-with-python2 python-enum34))
1508
1509(define-public python-parse-type
1510 (package
1511 (name "python-parse-type")
1512 (version "0.4.2")
1513 (source
1514 (origin
1515 (method url-fetch)
1516 (uri (pypi-uri "parse_type" version))
1517 (sha256
1518 (base32
1519 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1520 (build-system python-build-system)
1521 (propagated-inputs
1522 `(("python-six" ,python-six)
1523 ("python-parse" ,python-parse)))
1524 (native-inputs
1525 `(("python-pytest" ,python-pytest)
1526 ("python-pytest-runner" ,python-pytest-runner)))
1527 (home-page "https://github.com/jenisys/parse_type")
1528 (synopsis "Extended parse module")
1529 (description
1530 "Parse_type extends the python parse module.")
1531 (properties
1532 `((python2-variant . ,(delay python2-parse-type))))
1533 (license license:bsd-3)))
1534
1535(define-public python2-parse-type
1536 (let ((base (package-with-python2
1537 (strip-python2-variant python-parse-type))))
1538 (package (inherit base)
1539 (propagated-inputs
1540 `(("python2-enum34" ,python2-enum34)
1541 ,@(package-propagated-inputs base))))))
1542
1543(define-public python-parse
1544 (package
1545 (name "python-parse")
1546 (version "1.8.4")
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri (pypi-uri "parse" version))
1551 (sha256
1552 (base32
1553 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1554 (build-system python-build-system)
1555 (arguments
1556 `(#:phases
1557 (modify-phases %standard-phases
1558 (replace 'check
1559 (lambda _ (invoke "python" "test_parse.py"))))))
1560 (home-page "https://github.com/r1chardj0n3s/parse")
1561 (synopsis "Parse strings")
1562 (description
1563 "Parse strings using a specification based on the Python @code{format()}
1564syntax.")
1565 (license license:x11)))
1566
1567(define-public python-polib
1568 (package
1569 (name "python-polib")
1570 (version "1.0.8")
1571 (source (origin
1572 (method url-fetch)
1573 (uri (pypi-uri "polib" version))
1574 (sha256
1575 (base32
1576 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1577 (build-system python-build-system)
1578 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1579 (synopsis "Manipulate, create and modify gettext files")
1580 (description "Polib can manipulate any gettext format (po, pot and mo)
1581files. It can be used to create po files from scratch or to modify
1582existing ones.")
1583 (license license:expat)))
1584
1585(define-public python2-polib
1586 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1587 (package
1588 (inherit base)
1589 (arguments `(,@(package-arguments base)
1590 ;; Tests don't work with python2.
1591 #:tests? #f)))))
1592
6830120e
TLC
1593(define-public python-poyo
1594 (package
1595 (name "python-poyo")
1596 (version "0.5.0")
1597 (source
1598 (origin
1599 (method url-fetch)
1600 (uri (pypi-uri "poyo" version))
1601 (sha256
1602 (base32
1603 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1604 (build-system python-build-system)
1605 (home-page "https://github.com/hackebrot/poyo")
1606 (synopsis "Lightweight YAML Parser for Python")
1607 (description
1608 "This package provides a lightweight YAML Parser for Python. It supports
1609only a chosen subset of the YAML format that is required to parse cookiecutter
1610user configuration files. It does not have support for serializing into YAML
1611and is not compatible with JSON.")
1612 (license license:expat)))
1613
44d10b1f
RW
1614(define-public scons
1615 (package
1616 (name "scons")
05487ed8 1617 (version "3.0.4")
44d10b1f 1618 (source (origin
ad34338d
RW
1619 (method git-fetch)
1620 (uri (git-reference
1621 (url "https://github.com/SCons/scons.git")
1622 (commit version)))
1623 (file-name (git-file-name name version))
44d10b1f
RW
1624 (sha256
1625 (base32
05487ed8 1626 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1627 (build-system python-build-system)
1628 (arguments
1629 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1630 #:tests? #f ; no 'python setup.py test' command
1631 #:phases
1632 (modify-phases %standard-phases
1633 (add-before 'build 'bootstrap
1634 (lambda _
1635 (substitute* "src/engine/SCons/compat/__init__.py"
1636 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1637 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1638 (substitute* "src/engine/SCons/Platform/__init__.py"
1639 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1640 "mod = __import__(full_name)"))
ad34338d
RW
1641 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1642 (chdir "build/scons")
1643 #t)))))
44d10b1f
RW
1644 (home-page "http://scons.org/")
1645 (synopsis "Software construction tool written in Python")
1646 (description
1647 "SCons is a software construction tool. Think of SCons as an improved,
1648cross-platform substitute for the classic Make utility with integrated
1649functionality similar to autoconf/automake and compiler caches such as ccache.
1650In short, SCons is an easier, more reliable and faster way to build
1651software.")
1652 (license license:x11)))
1653
1654(define-public scons-python2
1655 (package
1656 (inherit (package-with-python2 scons))
1657 (name "scons-python2")))
1658
1659(define-public python-extras
1660 (package
1661 (name "python-extras")
1662 (version "1.0.0")
1663 (source
1664 (origin
1665 (method url-fetch)
1666 (uri (pypi-uri "extras" version))
1667 (sha256
1668 (base32
1669 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1670 (build-system python-build-system)
1671 (arguments
1672 ;; FIXME: Circular dependency on testtools.
1673 '(#:tests? #f))
1674 (home-page "https://github.com/testing-cabal/extras")
1675 (synopsis "Useful extensions to the Python standard library")
1676 (description
1677 "Extras is a set of extensions to the Python standard library.")
1678 (license license:expat)))
1679
1680(define-public python2-extras
1681 (package-with-python2 python-extras))
1682
1683(define-public python-mimeparse
1684 (package
1685 (name "python-mimeparse")
1686 (version "1.6.0")
1687 (source
1688 (origin
1689 (method url-fetch)
89bf667c 1690 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1691 (sha256
1692 (base32
1693 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1694 (build-system python-build-system)
1695 (arguments
1696 '(#:phases
1697 (modify-phases %standard-phases
1698 (replace 'check
1699 (lambda _
1700 (invoke "./mimeparse_test.py"))))))
1701 (home-page
1702 "https://github.com/dbtsai/python-mimeparse")
1703 (synopsis "Python library for parsing MIME types")
1704 (description
1705 "Mimeparse provides basic functions for parsing MIME type names and
1706matching them against a list of media-ranges.")
1707 (license license:expat)))
1708
1709(define-public python2-mimeparse
1710 (package-with-python2 python-mimeparse))
1711
1712(define-public python-miniboa
1713 (package
1714 (name "python-miniboa")
1715 (version "1.0.7")
1716 (source
1717 (origin
1718 (method url-fetch)
1719 (uri (pypi-uri "miniboa" version))
1720 (sha256
1721 (base32
1722 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1723 (build-system python-build-system)
1724 (home-page "https://github.com/shmup/miniboa")
1725 (synopsis "Simple, single-threaded Telnet server")
1726 (description
1727 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1728server.")
1729 (license license:asl2.0)))
1730
1731(define-public python2-miniboa
1732 (package-with-python2 python-miniboa))
1733
1734(define-public python-pafy
1735 (package
1736 (name "python-pafy")
1737 (version "0.5.3.1")
1738 (source
1739 (origin
1740 (method url-fetch)
1741 (uri (pypi-uri "pafy" version))
1742 (sha256
1743 (base32
1744 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1745 (build-system python-build-system)
1746 (arguments
1747 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1748 (propagated-inputs
1749 ;; Youtube-dl is a python package which is imported in the file
1750 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1751 `(("youtube-dl" ,youtube-dl)))
1752 (home-page "https://np1.github.io/pafy/")
1753 (synopsis "Retrieve YouTube content and metadata")
1754 (description
1755 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1756 (license license:lgpl3+)))
1757
1758(define-public python2-funcsigs
1759 (package
1760 (name "python2-funcsigs")
1761 (version "1.0.2")
1762 (source (origin
1763 (method url-fetch)
1764 (uri (pypi-uri "funcsigs" version))
1765 (sha256
1766 (base32
1767 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1768 (build-system python-build-system)
1769 (arguments
1770 `(#:python ,python-2))
1771 (native-inputs
1772 `(("python2-unittest2" ,python2-unittest2)))
1773 (home-page "http://funcsigs.readthedocs.org")
1774 (synopsis "Python function signatures from PEP362")
1775 (description
1776 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1777 (license license:asl2.0)))
1778
1779(define-public python2-funcsigs-bootstrap
1780 (package
1781 (inherit python2-funcsigs)
1782 (name "python2-funcsigs-bootstrap")
1783 (native-inputs `())
1784 (arguments
1785 `(#:tests? #f
1786 ,@(package-arguments python2-funcsigs)))))
1787
1788(define-public python-py
1789 (package
1790 (name "python-py")
08eba545 1791 (version "1.8.0")
44d10b1f
RW
1792 (source
1793 (origin
1794 (method url-fetch)
1795 (uri (pypi-uri "py" version))
1796 (sha256
1797 (base32
08eba545 1798 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1799 (build-system python-build-system)
1800 (arguments
1801 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1802 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1803 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1804 ;; Is this module globally installed?"
1805 '(#:tests? #f))
1806 (native-inputs
1807 `(("python-setuptools-scm" ,python-setuptools-scm)))
1808 (home-page "https://github.com/pytest-dev/py")
1809 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1810 (description
1811 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1812code introspection, and logging.")
1813 (license license:expat)))
1814
1815(define-public python2-py
1816 (package-with-python2 python-py))
1817
1818;; Recent versions of python-fixtures and python-testrepository need
1819;; python-pbr for packaging, which itself needs these two packages for
1820;; testing.
1821;; To fix this circular dependency, we use a build of python-pbr, based on the
1822;; same source, just without any test dependencies and with tests disabled.
1823;; python-pbr-minmal is then used to package python-fixtures and
1824;; python-testrepository.
1825;; Strictly speaking we currently could remove the test-requirements from the
1826;; normal python-pbr package (and save this package) since test are disabled
1827;; there anyway. But this may change in future.
1828(define-public python-pbr-minimal
1829 (package
1830 (name "python-pbr-minimal")
1831 (version "3.0.1")
1832 (source
1833 (origin
1834 (method url-fetch)
1835 (uri (pypi-uri "pbr" version))
1836 (sha256
1837 (base32
1838 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1839 (build-system python-build-system)
1840 (arguments
1841 `(#:tests? #f))
1842 (home-page "http://docs.openstack.org/developer/pbr/")
1843 (synopsis "Minimal build of python-pbr used for bootstrapping")
1844 (description
1845 "Used only for bootstrapping python2-pbr, you should not need this.")
1846 (license license:asl2.0)))
1847
1848(define-public python2-pbr-minimal
1849 (package-with-python2 python-pbr-minimal))
1850
1851(define-public python-pbr
1852 (package
1853 (inherit python-pbr-minimal)
1854 (name "python-pbr")
1855 (arguments
1856 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1857 (propagated-inputs
1858 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1859 (native-inputs
1860 `(("python-fixtures" ,python-fixtures-bootstrap)
1861 ;; discover, coverage, hacking, subunit
1862 ("python-mock" ,python-mock)
1863 ("python-six" ,python-six)
1864 ("python-sphinx" ,python-sphinx)
1865 ("python-testrepository" ,python-testrepository-bootstrap)
1866 ("python-testresources" ,python-testresources-bootstrap)
1867 ("python-testscenarios" ,python-testscenarios-bootstrap)
1868 ("python-testtools" ,python-testtools-bootstrap)
1869 ("python-virtualenv" ,python-virtualenv)))
1870 (synopsis "Enhance the default behavior of Python’s setuptools")
1871 (description
1872 "Python Build Reasonableness (PBR) is a library that injects some useful
1873and sensible default behaviors into your setuptools run. It will set
1874versions, process requirements files and generate AUTHORS and ChangeLog file
1875from git information.
1876")))
1877
1878(define-public python2-pbr
1879 (package-with-python2 python-pbr))
1880
ea43f0d5
MB
1881(define-public python-pyrsistent
1882 (package
1883 (name "python-pyrsistent")
1884 (version "0.14.11")
1885 (home-page "https://github.com/tobgu/pyrsistent")
1886 (source (origin
1887 (method url-fetch)
1888 (uri (pypi-uri "pyrsistent" version))
1889 (sha256
1890 (base32
1891 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1892 (build-system python-build-system)
1893 (native-inputs
1894 `(("python-hypothesis" ,python-hypothesis)
1895 ("python-pytest" ,python-pytest)
1896 ("python-pytest-runner" ,python-pytest-runner)))
1897 (propagated-inputs
1898 `(("python-six" ,python-six)))
1899 (synopsis "Persistent data structures for Python")
1900 (description
1901 "Pyrsistent is a number of persistent collections (by some referred to as
1902functional data structures). Persistent in the sense that they are immutable.
1903
1904All methods on a data structure that would normally mutate it instead return a
1905new copy of the structure containing the requested updates. The original
1906structure is left untouched.")
1907 (license license:expat)))
1908
1909(define-public python2-pyrsistent
1910 (package-with-python2 python-pyrsistent))
1911
44d10b1f
RW
1912(define-public python-exif-read
1913 (package
1914 (name "python-exif-read")
1915 (version "2.1.2")
1916 (source (origin
1917 (method url-fetch)
1918 (uri (pypi-uri "ExifRead" version))
1919 (sha256
1920 (base32
1921 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1922 (build-system python-build-system)
1923 (arguments `(#:tests? #f)) ; no tests
1924 (home-page "https://github.com/ianare/exif-py")
1925 (synopsis "Python library to extract EXIF data from image files")
1926 (description
1927 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1928files.")
1929 (license license:bsd-3)))
1930
1931(define-public python2-exif-read
1932 (package-with-python2 python-exif-read))
1933
1934(define-public python-pyld
1935 (package
1936 (name "python-pyld")
6d4ed78d 1937 (version "1.0.5")
44d10b1f
RW
1938 (source (origin
1939 (method url-fetch)
1940 (uri (pypi-uri "PyLD" version))
1941 (sha256
1942 (base32
6d4ed78d 1943 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
44d10b1f
RW
1944 (build-system python-build-system)
1945 (home-page "https://github.com/digitalbazaar/pyld")
1946 (synopsis "Python implementation of the JSON-LD specification")
1947 (description
1948 "PyLD is an implementation of the JSON-LD specification.")
1949 (license license:bsd-3)))
1950
1951(define-public python2-pyld
1952 (package-with-python2 python-pyld))
1953
1954(define-public python-click
1955 (package
1956 (name "python-click")
61984855 1957 (version "7.0")
44d10b1f
RW
1958 (source
1959 (origin
1960 (method url-fetch)
1961 (uri (pypi-uri "click" version))
1962 (sha256
1963 (base32
61984855 1964 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1965 (build-system python-build-system)
1966 (arguments
8d7e7ca6 1967 `(#:phases
44d10b1f
RW
1968 (modify-phases %standard-phases
1969 (add-after 'unpack 'fix-paths
1970 (lambda* (#:key inputs #:allow-other-keys)
1971 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1972 "cross-libc" "libc"))))
1973 (substitute* "click/_unicodefun.py"
1974 (("'locale'")
1975 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1976 #t))
1977 (replace 'check
1978 (lambda _
1979 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1980 (native-inputs
1981 `(("python-pytest" ,python-pytest)))
61984855 1982 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1983 (synopsis "Command line library for Python")
1984 (description
1985 "Click is a Python package for creating command line interfaces in a
1986composable way with as little code as necessary. Its name stands for
1987\"Command Line Interface Creation Kit\". It's highly configurable but comes
1988with sensible defaults out of the box.")
1989 (license license:bsd-3)))
1990
1991(define-public python2-click
1992 (package-with-python2 python-click))
1993
1994(define-public python-wheel
1995 (package
1996 (name "python-wheel")
746c074b 1997 (version "0.32.3")
44d10b1f
RW
1998 (source
1999 (origin
2000 (method url-fetch)
2001 (uri (pypi-uri "wheel" version))
2002 (sha256
2003 (base32
746c074b 2004 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
2005 (build-system python-build-system)
2006 (native-inputs
2007 `(("python-jsonschema" ,python-jsonschema)
2008 ("python-pytest-cov" ,python-pytest-cov)))
2009 (home-page "https://bitbucket.org/pypa/wheel/")
2010 (synopsis "Format for built Python packages")
2011 (description
2012 "A wheel is a ZIP-format archive with a specially formatted filename and
2013the @code{.whl} extension. It is designed to contain all the files for a PEP
2014376 compatible install in a way that is very close to the on-disk format. Many
2015packages will be properly installed with only the @code{Unpack} step and the
2016unpacked archive preserves enough information to @code{Spread} (copy data and
2017scripts to their final locations) at any later time. Wheel files can be
2018installed with a newer @code{pip} or with wheel's own command line utility.")
2019 (license license:expat)
2020 (properties `((python2-variant . ,(delay python2-wheel))))))
2021
2022(define-public python2-wheel
2023 (let ((wheel (package-with-python2
2024 (strip-python2-variant python-wheel))))
2025 (package (inherit wheel)
2026 (native-inputs `(("python2-functools32" ,python2-functools32)
2027 ,@(package-native-inputs wheel))))))
2028
2029(define-public python-vcversioner
2030 (package
2031 (name "python-vcversioner")
2032 (version "2.16.0.0")
2033 (source
2034 (origin
2035 (method url-fetch)
2036 (uri (pypi-uri "vcversioner" version))
2037 (sha256
2038 (base32
2039 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2040 (build-system python-build-system)
2041 (synopsis "Python library for version number discovery")
2042 (description "Vcversioner is a Python library that inspects tagging
2043information in a variety of version control systems in order to discover
2044version numbers.")
2045 (home-page "https://github.com/habnabit/vcversioner")
2046 (license license:isc)))
2047
2048(define-public python2-vcversioner
2049 (package-with-python2 python-vcversioner))
2050
5591fc4f
MC
2051(define-public python-jdcal
2052 (package
2053 (name "python-jdcal")
2054 (version "1.4")
2055 (source
2056 (origin
2057 (method url-fetch)
2058 (uri (pypi-uri "jdcal" version))
2059 (sha256
2060 (base32
2061 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2062 (build-system python-build-system)
2063 (arguments
2064 `(#:phases (modify-phases %standard-phases
2065 (replace 'check
2066 (lambda _
2067 (invoke "pytest"))))))
2068 (native-inputs
2069 `(("python-pytest" ,python-pytest)))
2070 (home-page "https://github.com/phn/jdcal")
2071 (synopsis "Functions to convert between Julian dates Gregorian dates")
2072 (description "This Python library provides functions for converting
2073between Julian dates and Gregorian dates.")
2074 (license license:bsd-2)))
2075
2076(define-public python2-jdcal
2077 (package-with-python2 python-jdcal))
2078
44d10b1f
RW
2079(define-public python-jsonschema
2080 (package
2081 (name "python-jsonschema")
1adde06e 2082 (version "3.0.1")
44d10b1f
RW
2083 (source (origin
2084 (method url-fetch)
786ccb87 2085 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
2086 (sha256
2087 (base32
1adde06e 2088 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
2089 (build-system python-build-system)
2090 (arguments
2091 '(#:phases
2092 (modify-phases %standard-phases
1adde06e
MB
2093 (replace 'check
2094 (lambda _
2095 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2096 (invoke "trial" "jsonschema"))))))
44d10b1f 2097 (native-inputs
1adde06e
MB
2098 `(("python-setuptools_scm" ,python-setuptools-scm)
2099 ("python-twisted" ,python-twisted)))
2100 (propagated-inputs
2101 `(("python-attrs" ,python-attrs)
2102 ("python-pyrsistent" ,python-pyrsistent)
2103 ("python-six" ,python-six)))
44d10b1f
RW
2104 (home-page "https://github.com/Julian/jsonschema")
2105 (synopsis "Implementation of JSON Schema for Python")
2106 (description
2107 "Jsonschema is an implementation of JSON Schema for Python.")
2108 (license license:expat)
2109 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2110
2111(define-public python2-jsonschema
2112 (let ((jsonschema (package-with-python2
2113 (strip-python2-variant python-jsonschema))))
2114 (package (inherit jsonschema)
44d10b1f 2115 (propagated-inputs
1adde06e
MB
2116 `(("python2-functools32" ,python2-functools32)
2117 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 2118
914bba28
TGR
2119;; This old version is still required by docker-compose as of 1.24.0.
2120(define-public python-jsonschema-2.6
2121 (package
2122 (name "python-jsonschema")
2123 (version "2.6.0")
2124 (source (origin
2125 (method url-fetch)
2126 (uri (pypi-uri "jsonschema" version))
2127 (sha256
2128 (base32
2129 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2130 (build-system python-build-system)
2131 (arguments
2132 '(#:phases
2133 (modify-phases %standard-phases
2134 (replace 'check (lambda _ (invoke "nosetests"))))))
2135 (native-inputs
2136 `(("python-nose" ,python-nose)
2137 ("python-vcversioner" ,python-vcversioner)))
2138 (home-page "https://github.com/Julian/jsonschema")
2139 (synopsis "Implementation of JSON Schema for Python")
2140 (description
2141 "Jsonschema is an implementation of JSON Schema for Python.")
2142 (license license:expat)
2143 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2144
44d10b1f
RW
2145(define-public python-schema
2146 (package
2147 (name "python-schema")
2148 (version "0.6.6")
2149 (source
2150 (origin
2151 (method url-fetch)
2152 (uri (pypi-uri "schema" version))
2153 (sha256
2154 (base32
2155 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2156 (build-system python-build-system)
2157 (native-inputs
2158 `(("python-pytest" ,python-pytest)))
2159 (home-page "https://github.com/keleshev/schema")
2160 (synopsis "Simple data validation library")
2161 (description
2162 "@code{python-schema} is a library for validating Python data
2163structures, such as those obtained from config-files, forms, external
2164services or command-line parsing, converted from JSON/YAML (or
2165something else) to Python data-types.")
2166 (license license:psfl)))
2167
2168(define-public python2-schema
2169 (package-with-python2 python-schema))
2170
2171(define-public python-schema-0.5
2172 (package (inherit python-schema)
2173 (version "0.5.0")
2174 (source
2175 (origin
2176 (method url-fetch)
2177 (uri (pypi-uri "schema" version))
2178 (sha256
2179 (base32
2180 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2181
2182(define-public python2-schema-0.5
2183 (package-with-python2 python-schema-0.5))
2184
2185(define-public python-kitchen
2186 (package
2187 (name "python-kitchen")
2188 (version "1.2.5")
2189 (source
2190 (origin
2191 (method url-fetch)
2192 (uri (pypi-uri "kitchen" version))
2193 (sha256
2194 (base32
2195 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2196 (build-system python-build-system)
2197 (propagated-inputs
2198 `(("python-chardet" ,python-chardet)))
2199 (home-page "https://github.com/fedora-infra/kitchen")
2200 (synopsis "Python API for snippets")
2201 (description "@code{kitchen} module provides a python API for all sorts of
2202little useful snippets of code that everybody ends up writing for their projects
2203but never seem big enough to build an independent release. Use kitchen and stop
2204cutting and pasting that code over and over.")
2205 (license (list license:lgpl2.1+
2206 ;; subprocess.py, test_subprocess.py,
2207 ;; kitchen/pycompat25/defaultdict.py:
2208 license:psfl))))
2209
2210(define-public python2-kitchen
2211 (package-with-python2 python-kitchen))
2212
2213(define-public python-unidecode
2214 (package
2215 (name "python-unidecode")
eb80a300 2216 (version "1.1.1")
44d10b1f
RW
2217 (source (origin
2218 (method url-fetch)
2219 (uri (pypi-uri "Unidecode" version))
2220 (sha256
2221 (base32
eb80a300 2222 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
44d10b1f
RW
2223 (build-system python-build-system)
2224 (home-page "https://pypi.python.org/pypi/Unidecode")
2225 (synopsis "ASCII transliterations of Unicode text")
2226 (description
2227 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2228useful when integrating with legacy code that doesn't support Unicode, or for
2229ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2230machine identifiers from human-readable Unicode strings that should still be
2231somewhat intelligible.")
2232 (license license:gpl2+)))
2233
2234(define-public python2-unidecode
2235 (package-with-python2 python-unidecode))
2236
2237(define-public python-pyjwt
2238 (package
2239 (name "python-pyjwt")
be6f2f56 2240 (version "1.7.1")
44d10b1f
RW
2241 (source
2242 (origin
2243 (method url-fetch)
2244 (uri (pypi-uri "PyJWT" version))
2245 (sha256
2246 (base32
be6f2f56 2247 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
44d10b1f
RW
2248 (modules '((guix build utils)))
2249 (snippet
2250 '(begin
2251 (for-each delete-file-recursively
2252 (find-files "." "\\.pyc$"))
2253 #t))))
2254 (build-system python-build-system)
2255 (native-inputs
2256 `(("python-pytest" ,python-pytest)
2257 ("python-pytest-cov" ,python-pytest-cov)
2258 ("python-pytest-runner" ,python-pytest-runner)))
2259 (home-page "https://github.com/progrium/pyjwt")
2260 (synopsis "JSON Web Token implementation in Python")
2261 (description
2262 "PyJWT is a JSON Web Token implementation written in Python.")
2263 (license license:expat)))
2264
2265(define-public python2-pyjwt
2266 (package-with-python2 python-pyjwt))
2267
2268(define-public python-pykka
2269 (package
2270 (name "python-pykka")
2271 (version "1.2.1")
2272 (source
2273 (origin
2274 (method url-fetch)
2275 (uri (pypi-uri "Pykka" version))
2276 (sha256
2277 (base32
2278 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2279 (build-system python-build-system)
2280 (native-inputs
2281 `(("python-mock" ,python-mock)
2282 ("python-nose" ,python-nose)
2283 ("python-gevent" ,python-gevent)
2284 ("python-eventlet" ,python-eventlet)))
2285 (home-page "https://www.pykka.org/")
2286 (synopsis "Pykka is a Python implementation of the actor model")
2287 (description
2288 "Pykka is a Python implementation of the actor model.
2289The actor model introduces some simple rules to control the sharing
2290of state and cooperation between execution units, which makes it
2291easier to build concurrent applications.")
2292 (license license:asl2.0)))
2293
2294(define-public python2-pykka
2295 (package-with-python2 python-pykka))
2296
8d22f7e3
VC
2297(define-public python-pymsgbox
2298 (package
2299 (name "python-pymsgbox")
2300 (version "1.0.6")
2301 (source
2302 (origin
2303 (method git-fetch)
2304 (uri (git-reference
2305 ;; LICENSE.txt is not present on pypi
2306 (url "https://github.com/asweigart/PyMsgBox")
2307 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2308 (file-name (git-file-name name version))
2309 (sha256
2310 (base32
2311 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2312 (arguments
2313 ;; Circular dependency to run tests:
2314 ;; Tests need pyautogui, which depends on pymsgbox.
2315 '(#:tests? #f))
2316 (build-system python-build-system)
2317 (home-page "https://github.com/asweigart/PyMsgBox")
2318 (synopsis "Python module for JavaScript-like message boxes")
2319 (description
2320 "PyMsgBox is a simple, cross-platform, pure Python module for
2321JavaScript-like message boxes. Types of dialog boxes include:
2322@enumerate
2323@item alert
2324@item confirm
2325@item prompt
2326@item password
2327@end enumerate
2328")
2329 (license license:bsd-3)))
2330
44d10b1f
RW
2331(define-public python-pympler
2332 (package
2333 (name "python-pympler")
2334 (home-page "https://pythonhosted.org/Pympler/")
c498a07e 2335 (version "0.7")
44d10b1f
RW
2336 (source (origin
2337 (method url-fetch)
2338 (uri (pypi-uri "Pympler" version))
2339 (sha256
2340 (base32
c498a07e 2341 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
44d10b1f
RW
2342 (build-system python-build-system)
2343 (arguments
2344 `(#:phases (modify-phases %standard-phases
2345 (delete 'check)
2346 (add-after 'install 'check
2347 (lambda* (#:key inputs outputs #:allow-other-keys)
2348 (add-installed-pythonpath inputs outputs)
2349 (invoke "python" "setup.py" "test"))))))
2350 (synopsis "Measure, monitor and analyze memory behavior")
2351 (description
2352 "Pympler is a development tool to measure, monitor and analyze
2353the memory behavior of Python objects in a running Python application.
2354
2355By pympling a Python application, detailed insight in the size and the
2356lifetime of Python objects can be obtained. Undesirable or unexpected
2357runtime behavior like memory bloat and other @samp{pymples} can easily
2358be identified.
2359
2360A web profiling frontend exposes process statistics, garbage
2361visualisation and class tracker statistics.")
2362 (license license:asl2.0)))
2363
2364(define-public python2-pympler
2365 (package-with-python2 python-pympler))
2366
2367(define-public python-itsdangerous
2368 (package
2369 (name "python-itsdangerous")
acfcf2ed 2370 (version "1.1.0")
44d10b1f
RW
2371 (source
2372 (origin
2373 (method url-fetch)
acfcf2ed 2374 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2375 (sha256
2376 (base32
acfcf2ed 2377 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2378 (build-system python-build-system)
acfcf2ed 2379 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2380 (synopsis "Python library for passing data to/from untrusted environments")
2381 (description
2382 "Itsdangerous provides various helpers to pass trusted data to untrusted
2383environments and back.")
2384 (license license:bsd-3)))
2385
2386(define-public python2-itsdangerous
2387 (package-with-python2 python-itsdangerous))
2388
2389(define-public python-pyyaml
2390 (package
2391 (name "python-pyyaml")
2392 (version "3.13")
2393 (source
2394 (origin
2395 (method url-fetch)
2396 (uri (pypi-uri "PyYAML" version))
2397 (sha256
2398 (base32
2399 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2400 (build-system python-build-system)
2401 (inputs
2402 `(("libyaml" ,libyaml)))
2403 (home-page "http://pyyaml.org/wiki/PyYAML")
2404 (synopsis "YAML parser and emitter for Python")
2405 (description
2406 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2407complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2408API, and sensible error messages. PyYAML supports standard YAML tags and
2409provides Python-specific tags that allow to represent an arbitrary Python
2410object.")
2411 (license license:expat)))
2412
2413(define-public python2-pyyaml
2414 (package-with-python2 python-pyyaml))
2415
2416(define-public python-vine
2417 (package
2418 (name "python-vine")
2419 (version "1.1.4")
2420 (source
2421 (origin
2422 (method url-fetch)
2423 (uri (pypi-uri "vine" version))
2424 (sha256
2425 (base32
2426 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2427 (build-system python-build-system)
2428 (native-inputs
2429 `(("python-pytest" ,python-pytest)
2430 ("python-case" ,python-case)))
2431 (home-page "https://github.com/celery/vine")
2432 (synopsis "Promises for Python")
2433 (description
2434 "@code{vine} provides a special implementation of promises in that it can
2435be used both for \"promise of a value\" and lazy evaluation. The biggest
2436upside for this is that everything in a promise can also be a promise,
2437e.g. filters, callbacks and errbacks can all be promises.")
2438 (license license:bsd-3)))
2439
2440(define-public python-virtualenv
2441 (package
2442 (name "python-virtualenv")
2782bd51 2443 (version "16.1.0")
44d10b1f
RW
2444 (source
2445 (origin
2446 (method url-fetch)
2447 (uri (pypi-uri "virtualenv" version))
2448 (sha256
2449 (base32
2782bd51 2450 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2451 (build-system python-build-system)
2452 (arguments
2453 `(#:phases
2454 (modify-phases %standard-phases
2782bd51 2455 (add-before 'check 'disable-failing-test
44d10b1f
RW
2456 (lambda _
2457 ;; Disable failing test. See upstream bug report
2458 ;; https://github.com/pypa/virtualenv/issues/957
2459 (substitute* "tests/test_virtualenv.py"
2460 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2461 #t)))))
44d10b1f
RW
2462 (native-inputs
2463 `(("python-mock" ,python-mock)
2464 ("python-pytest" ,python-pytest)))
2465 (home-page "https://virtualenv.pypa.io/")
2466 (synopsis "Virtual Python environment builder")
2467 (description
2468 "Virtualenv is a tool to create isolated Python environments.")
2469 (license license:expat)))
2470
2471(define-public python2-virtualenv
2472 (package-with-python2 python-virtualenv))
2473
2474(define-public python-markupsafe
2475 (package
2476 (name "python-markupsafe")
753eb411 2477 (version "1.1.1")
44d10b1f
RW
2478 (source
2479 (origin
2480 (method url-fetch)
5182927c 2481 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2482 (sha256
2483 (base32
753eb411 2484 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2485 (build-system python-build-system)
753eb411
MB
2486 (arguments
2487 `(#:modules ((ice-9 ftw)
2488 (srfi srfi-1)
2489 (srfi srfi-26)
2490 (guix build utils)
2491 (guix build python-build-system))
2492 #:phases (modify-phases %standard-phases
2493 (replace 'check
2494 (lambda _
2495 (let ((cwd (getcwd))
2496 (libdir (find (cut string-prefix? "lib." <>)
2497 (scandir "build"))))
2498 (setenv "PYTHONPATH"
2499 (string-append cwd "/build/" libdir ":"
2500 (getenv "PYTHONPATH")))
2501 (invoke "pytest" "-vv")))))))
2502 (native-inputs
2503 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2504 (home-page "https://github.com/mitsuhiko/markupsafe")
2505 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2506 (description
2507 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2508for Python.")
2509 (license license:bsd-3)))
2510
2511(define-public python2-markupsafe
2512 (package-with-python2 python-markupsafe))
2513
2514(define-public python-jinja2
2515 (package
2516 (name "python-jinja2")
4a5c7934 2517 (version "2.10.1")
44d10b1f
RW
2518 (source
2519 (origin
2520 (method url-fetch)
2521 (uri (pypi-uri "Jinja2" version))
2522 (sha256
2523 (base32
4a5c7934 2524 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2525 (build-system python-build-system)
2526 (propagated-inputs
2527 `(("python-markupsafe" ,python-markupsafe)))
2528 (home-page "http://jinja.pocoo.org/")
2529 (synopsis "Python template engine")
2530 (description
2531 "Jinja2 is a small but fast and easy to use stand-alone template engine
2532written in pure Python.")
2533 (license license:bsd-3)))
2534
2535(define-public python2-jinja2
2536 (package-with-python2 python-jinja2))
2537
ba42a6bf
TLC
2538(define-public python-jinja2-time
2539 (package
2540 (name "python-jinja2-time")
2541 (version "0.2.0")
2542 (source
2543 (origin
2544 (method url-fetch)
2545 (uri (pypi-uri "jinja2-time" version))
2546 (sha256
2547 (base32
2548 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2549 (build-system python-build-system)
2550 (propagated-inputs
2551 `(("python-arrow" ,python-arrow)
2552 ("python-jinja2" ,python-jinja2)))
2553 (home-page
2554 "https://github.com/hackebrot/jinja2-time")
2555 (synopsis "Jinja2 Extension for Dates and Times")
2556 (description
2557 "This package provides an extension for the template engine Jinja2. It
2558adds a 'now' tag providing a convenient access to the arrow.now() API from
2559templates. A format string can be provided to control the output.")
2560 (license license:expat)))
2561
44d10b1f
RW
2562(define-public python-pystache
2563 (package
2564 (name "python-pystache")
2565 (version "0.5.4")
2566 (source (origin
2567 (method url-fetch)
2568 (uri (pypi-uri "pystache" version))
2569 (sha256
2570 (base32
2571 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2572 (build-system python-build-system)
2573 (arguments
2574 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2575 (home-page "http://defunkt.io/pystache/")
2576 (synopsis "Python logic-less template engine")
2577 (description
2578 "Pystache is a Python implementation of the framework agnostic,
2579logic-free templating system Mustache.")
2580 (license license:expat)
2581 (properties `((python2-variant . ,(delay python2-pystache))))))
2582
2583(define-public python2-pystache
2584 (package (inherit (package-with-python2
2585 (strip-python2-variant python-pystache)))
2586 (arguments
2587 `(#:python ,python-2
2588 #:phases
2589 (modify-phases %standard-phases
2590 (replace 'check
2591 (lambda _
dfafc29b 2592 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2593
2594(define-public python-joblib
2595 (package
2596 (name "python-joblib")
2597 (version "0.13.0")
2598 (source (origin
2599 (method url-fetch)
2600 (uri (pypi-uri "joblib" version))
2601 (sha256
2602 (base32
2603 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2604 (build-system python-build-system)
2605 (arguments
2606 `(#:phases
2607 (modify-phases %standard-phases
2608 (replace 'check
2609 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2610 (native-inputs
2611 `(("python-pytest" ,python-pytest)))
2612 (home-page "https://joblib.readthedocs.io/")
2613 (synopsis "Using Python functions as pipeline jobs")
2614 (description
2615 "Joblib is a set of tools to provide lightweight pipelining in Python.
2616In particular, joblib offers: transparent disk-caching of the output values
2617and lazy re-evaluation (memoize pattern), easy simple parallel computing
2618logging and tracing of the execution.")
2619 (license license:bsd-3)))
2620
2621(define-public python2-joblib
2622 (package-with-python2 python-joblib))
2623
a3363341
VC
2624(define-public python-daemon
2625 (package
2626 (name "python-daemon")
2627 (version "2.2.3")
2628 (source
2629 (origin
2630 (method url-fetch)
2631 (uri (pypi-uri "python-daemon" version))
2632 (sha256
2633 (base32
2634 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2635 (build-system python-build-system)
2636 (arguments
2637 `(#:phases
2638 (modify-phases %standard-phases
2639 (add-before 'check 'disable-tests
2640 (lambda _
2641 ;; FIXME: Determine why test fails
2642 (substitute* "test/test_daemon.py"
2643 (("test_detaches_process_context")
2644 "skip_test_detaches_process_context"))
2645 #t)))))
2646 (propagated-inputs
2647 `(("python-lockfile" ,python-lockfile)))
2648 (native-inputs
2649 `(("python-unittest2" ,python-unittest2)
2650 ("python-testtools" ,python-testtools)
2651 ("python-testscenarios" ,python-testscenarios)
2652 ("python-mock" ,python-mock)
2653 ("python-docutils" ,python-docutils)))
2654 (home-page "https://pagure.io/python-daemon/")
2655 (synopsis "Python library for making a Unix daemon process")
2656 (description "Python-daemon is a library that assists a Python program to
2657turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2658
2659This library provides a @code{DaemonContext} class that manages the following
2660important tasks for becoming a daemon process:
2661@enumerate
2662@item Detach the process into its own process group.
2663@item Set process environment appropriate for running inside a chroot.
2664@item Renounce suid and sgid privileges.
2665@item Close all open file descriptors.
2666@item Change the working directory, uid, gid, and umask.
2667@item Set appropriate signal handlers.
2668@item Open new file descriptors for stdin, stdout, and stderr.
2669@item Manage a specified PID lock file.
2670@item Register cleanup functions for at-exit processing.
2671@end enumerate")
2672 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2673 (license (list license:asl2.0 license:gpl3+))))
2674
44d10b1f
RW
2675(define-public python-docutils
2676 (package
2677 (name "python-docutils")
2678 (version "0.14")
2679 (source
2680 (origin
2681 (method url-fetch)
2682 (uri (pypi-uri "docutils" version))
2683 (sha256
2684 (base32
2685 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2686 (build-system python-build-system)
2687 (arguments
2688 '(#:tests? #f)) ; no setup.py test command
2689 (home-page "http://docutils.sourceforge.net/")
2690 (synopsis "Python Documentation Utilities")
2691 (description
2692 "Docutils is a modular system for processing documentation into useful
2693formats, such as HTML, XML, and LaTeX. For input Docutils supports
2694reStructuredText.")
2695 ;; Most of the source code is public domain, but some source files are
2696 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2697 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2698
2699(define-public python2-docutils
2700 (package-with-python2 python-docutils))
2701
2702(define-public python-pygments
2703 (package
2704 (name "python-pygments")
eed81080 2705 (version "2.4.2")
44d10b1f
RW
2706 (source
2707 (origin
2708 (method url-fetch)
2709 (uri (pypi-uri "Pygments" version))
2710 (sha256
2711 (base32
eed81080 2712 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
44d10b1f
RW
2713 (build-system python-build-system)
2714 (arguments
2715 ;; FIXME: Tests require sphinx, which depends on this.
2716 '(#:tests? #f))
2717 (home-page "http://pygments.org/")
2718 (synopsis "Syntax highlighting")
2719 (description
2720 "Pygments is a syntax highlighting package written in Python.")
2721 (license license:bsd-2)))
2722
2723(define-public python2-pygments
2724 (package-with-python2 python-pygments))
2725
0f0a5ef9
MC
2726(define-public python-bumpversion
2727 (package
2728 (name "python-bumpversion")
2729 (version "0.5.3")
2730 (source
2731 (origin
2732 (method url-fetch)
2733 (uri (pypi-uri "bumpversion" version))
2734 (sha256
2735 (base32
2736 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2737 (build-system python-build-system)
2738 (home-page "https://github.com/peritus/bumpversion")
2739 (synopsis "Tool to bump software version")
2740 (description "This tool provides a command-line interface (CLI) to bump a
2741software version simply.")
2742 (license license:expat)))
2743
b24fd2c2
MC
2744(define-public python-deprecated
2745 (package
2746 (name "python-deprecated")
2747 (version "1.2.5")
2748 (source
2749 (origin
2750 (method git-fetch)
2751 (uri (git-reference
2752 (url "https://github.com/tantale/deprecated.git")
2753 (commit (string-append "v" version))))
2754 (file-name (git-file-name name version))
2755 (sha256
2756 (base32
2757 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2758 (build-system python-build-system)
2759 (arguments
2760 `(#:phases (modify-phases %standard-phases
2761 (replace 'check
2762 (lambda _
2763 (invoke "pytest"))))))
2764 (propagated-inputs
2765 `(("python-wrapt" ,python-wrapt)))
2766 (native-inputs
2767 `(("python-bumpversion" ,python-bumpversion)
2768 ("python-pytest" ,python-pytest)
2769 ("python-pytest-cov" ,python-pytest-cov)
2770 ("python-sphinx" ,python-sphinx)
2771 ("python-tox" ,python-tox)))
2772 (home-page "https://github.com/tantale/deprecated")
2773 (synopsis "Python decorator to deprecate classes, functions or methods")
2774 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2775to deprecate classes, functions or methods.")
2776 (license license:expat)))
2777
d5a998fa
MC
2778(define-public python-pygithub
2779 (package
2780 (name "python-pygithub")
749e38d7 2781 (version "1.43.8")
d5a998fa
MC
2782 (source
2783 ;; We fetch from the Git repo because there are no tests in the PyPI
2784 ;; archive.
2785 (origin
2786 (method git-fetch)
2787 (uri (git-reference
2788 (url "https://github.com/PyGithub/PyGithub.git")
2789 (commit (string-append "v" version))))
2790 (file-name (git-file-name name version))
2791 (sha256
749e38d7 2792 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
2793 (build-system python-build-system)
2794 (arguments
2795 `(#:phases (modify-phases %standard-phases
2796 ;; Some tests rely on the network.
2797 (add-after 'unpack 'disable-failing-tests
2798 (lambda _
2799 (substitute* "tests/Issue142.py"
2800 (("testDecodeJson") "disabled_testDecodeJson"))
2801 #t))
2802 (add-before 'check 'prepare-for-tests
2803 (lambda _
2804 (for-each (lambda (f)
2805 (chmod f #o666))
2806 (find-files "./tests"))
2807 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2808 (setenv "PYTHONPATH"
2809 (string-append "./tests:" (getenv "PYTHONPATH")))
2810 #t)))))
2811 (propagated-inputs
2812 `(("python-deprecated" ,python-deprecated)
2813 ("python-pyjwt" ,python-pyjwt)
2814 ("python-requests" ,python-requests)))
2815 (native-inputs `(("python-httpretty" ,python-httpretty)))
2816 (home-page "https://pygithub.readthedocs.io/en/latest/")
2817 (synopsis "Python library for the GitHub API")
2818 (description "This library allows managing GitHub resources such as
2819repositories, user profiles, and organizations in your Python applications,
2820using version 3 of the GitHub application programming interface (API).")
2821 (license license:lgpl3+)))
2822
c0c0bb38
MC
2823(define-public python-rellu
2824 (package
2825 (name "python-rellu")
2826 (version "0.7")
2827 (source
2828 (origin
2829 (method url-fetch)
2830 (uri (pypi-uri "rellu" version))
2831 (sha256
2832 (base32
2833 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2834 (build-system python-build-system)
2835 (propagated-inputs
2836 `(("python-invoke" ,python-invoke)
2837 ("python-pygithub" ,python-pygithub)))
2838 (home-page "https://github.com/robotframework/rellu")
2839 (synopsis "Utilities to create PyPI releases")
2840 (description "This collection of utilities contains tooling and templates
2841to assist in creating releases on GitHub and publishing them on PyPI. It is
2842designed to be used by Robot Framework and tools and libraries in its
2843ecosystem, but can naturally be used also by other projects.")
2844 (license license:asl2.0)))
2845
b9790285
MC
2846(define-public python-robotframework
2847 (package
2848 (name "python-robotframework")
1710b8f8 2849 (version "3.1.2")
b9790285
MC
2850 ;; There are no tests in the PyPI archive.
2851 (source
2852 (origin
2853 (method git-fetch)
2854 (uri (git-reference
2855 (url "https://github.com/robotframework/robotframework.git")
2856 (commit (string-append "v" version))))
2857 (file-name (git-file-name name version))
2858 (sha256
1710b8f8 2859 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2860 (patches (search-patches
2861 "python-robotframework-honor-source-date-epoch.patch"))))
2862 (build-system python-build-system)
2863 (arguments
2864 `(#:phases (modify-phases %standard-phases
2865 (add-before 'build 'build-and-install-doc
2866 (lambda* (#:key outputs #:allow-other-keys)
2867 (let* ((doc-output (assoc-ref outputs "doc"))
2868 (doc (string-append doc-output "/share/"
2869 ,name "-" ,version "/")))
2870 (invoke "invoke" "library-docs" "all")
2871 (mkdir-p doc)
2872 (copy-recursively "doc/libraries"
2873 (string-append doc "/libraries"))
2874 #t)))
2875 (replace 'check
2876 (lambda _
2877 (invoke "python" "utest/run.py"))))))
2878 (native-inputs
2879 `(("python-invoke" ,python-invoke)
2880 ("python-rellu" ,python-rellu)
2881 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2882 (outputs '("out" "doc"))
2883 (home-page "https://robotframework.org")
2884 (synopsis "Generic automation framework")
2885 (description "Robot Framework is a generic automation framework for
2886acceptance testing, acceptance test driven development (ATDD), and robotic
2887process automation (RPA).")
2888 (license license:asl2.0)))
2889
5b84c120
MC
2890(define-public python-robotframework-lint
2891 ;; There is no properly tagged release; the commit below seems to correspond
2892 ;; to the 0.9 stable release available from PyPI. The tests are not
2893 ;; included in the PyPI archive, so we fetch the sources from the upstream
2894 ;; Git repo.
2895 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2896 (revision "1"))
2897 (package
2898 (name "python-robotframework-lint")
2899 (version (git-version "0.9.0" revision commit))
2900 (source
2901 (origin
2902 (method git-fetch)
2903 (uri (git-reference
2904 (url "https://github.com/boakley/robotframework-lint.git")
2905 (commit commit)))
2906 (file-name (git-file-name name version))
2907 (sha256
2908 (base32
2909 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2910 (build-system python-build-system)
2911 (arguments
2912 `(#:phases
2913 (modify-phases %standard-phases
2914 (replace 'check
2915 (lambda _
2916 (invoke "python" "-m" "robot" "-A"
2917 "tests/conf/default.args" "tests"))))))
2918 (propagated-inputs
2919 `(("python-robotframework" ,python-robotframework)))
2920 (home-page "https://github.com/boakley/robotframework-lint/")
2921 (synopsis "Static analysis tool (linter) for Robot Framework")
2922 (description "This package provides the @code{rflint} command-line
2923utility, a static analysis tool (linter) for Robot Framework source files.")
2924 (license license:asl2.0))))
2925
c0c64f17
MC
2926(define-public python-robotframework-sshlibrary
2927 (package
2928 (name "python-robotframework-sshlibrary")
2929 (version "3.3.0")
2930 ;; There are no tests in the PyPI archive.
2931 (source
2932 (origin
2933 (method git-fetch)
2934 (uri (git-reference
2935 (url "https://github.com/robotframework/SSHLibrary.git")
2936 (commit (string-append "v" version))))
2937 (file-name (git-file-name name version))
2938 (sha256
2939 (base32
2940 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2941 (build-system python-build-system)
2942 (arguments
2943 `(#:phases
2944 (modify-phases %standard-phases
2945 (add-before 'build 'build-and-install-doc
2946 (lambda* (#:key outputs #:allow-other-keys)
2947 (let* ((doc-output (assoc-ref outputs "doc"))
2948 (doc (string-append doc-output "/share/"
2949 ,name "-" ,version "/")))
2950 (invoke "chmod" "-R" "+w" "docs")
2951 (invoke "invoke" "kw-docs" "project-docs")
2952 (mkdir-p doc)
2953 (for-each delete-file (find-files "docs" "\\.rst"))
2954 (copy-recursively "docs" doc)
2955 #t)))
2956 (replace 'check
2957 (lambda _
2958 ;; Some tests require an SSH server; we remove them.
2959 (delete-file "utest/test_client_api.py")
2960 (delete-file "utest/test_scp.py")
2961 (invoke "python" "utest/run.py"))))))
2962 (propagated-inputs
2963 `(("python-robotframework" ,python-robotframework)
2964 ("python-paramiko" ,python-paramiko)
2965 ("python-scp" ,python-scp)))
2966 (native-inputs
2967 `(("openssh" ,openssh)
2968 ("which" ,which)
2969 ;; To generate the documentation
2970 ("python-docutils" ,python-docutils)
2971 ("python-invoke" ,python-invoke)
2972 ("python-pygments" ,python-pygments)
2973 ("python-rellu" ,python-rellu)))
2974 (outputs '("out" "doc"))
2975 (home-page "https://github.com/robotframework/SSHLibrary")
2976 (synopsis "Robot Framework library for SSH and SFTP")
2977 (description "SSHLibrary is a Robot Framework library providing support
2978for SSH and SFTP. It has the following main usages:
2979@itemize @bullet
2980@item Executing commands on the remote machine, either blocking or non-blocking.
2981@item Writing and reading in an interactive shell.
2982@item Transferring files and directories over SFTP.
2983@item Ensuring that files and directories exist on the remote machine.
2984@end itemize")
2985 (license license:asl2.0)))
2986
13d825fc
MC
2987(define-public python-scp
2988 (package
2989 (name "python-scp")
2990 (version "0.13.2")
2991 (source
2992 (origin
2993 (method url-fetch)
2994 (uri (pypi-uri "scp" version))
2995 (sha256
2996 (base32
2997 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2998 (build-system python-build-system)
2999 (arguments
3000 '(#:tests? #f)) ;tests require an SSH server
3001 (propagated-inputs
3002 `(("python-paramiko" ,python-paramiko)))
3003 (home-page "https://github.com/jbardin/scp.py")
3004 (synopsis "SCP protocol module for Python and Paramiko")
3005 (description "The scp module extends the Paramiko library to send and
3006receive files via the SCP1 protocol, as implemented by the OpenSSH
3007@command{scp} program.")
3008 (license license:gpl2+)))
3009
44d10b1f
RW
3010(define-public python-rst.linker
3011 (package
3012 (name "python-rst.linker")
d37e8e53 3013 (version "1.11")
44d10b1f
RW
3014 (source
3015 (origin
3016 (method url-fetch)
3017 (uri (pypi-uri "rst.linker" version))
3018 (sha256
d37e8e53 3019 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
3020 (build-system python-build-system)
3021 (propagated-inputs
3022 `(("python-dateutil" ,python-dateutil)
3023 ("python-six" ,python-six)))
3024 (native-inputs
3025 `(("python-setuptools-scm" ,python-setuptools-scm)))
3026 ;; Test would require path.py, which would introduce a cyclic dependence.
3027 (arguments `(#:tests? #f))
3028 ;; Note: As of version 1.7 the documentation is not worth building.
3029 (home-page "https://github.com/jaraco/rst.linker")
3030 (synopsis "Sphinx plugin to add links and timestamps")
3031 (description "rst.linker allows to automatically replace text by a
3032reStructuredText external reference or timestamps. It's primary purpose is to
3033augment the changelog, but it can be used for other documents, too.")
3034 (license license:expat)))
3035
3036(define-public python2-rst.linker
3037 (package-with-python2 python-rst.linker))
3038
3039(define-public python-feedgenerator
3040 (package
3041 (name "python-feedgenerator")
3042 (version "1.9")
3043 (source
3044 (origin
3045 (method url-fetch)
3046 (uri (pypi-uri "feedgenerator" version))
3047 (sha256
3048 (base32
3049 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3050 (modules '((guix build utils)))
3051 (snippet
3052 '(begin
3053 ;; Remove pre-compiled .pyc files from source.
3054 (for-each delete-file-recursively
3055 (find-files "." "__pycache__" #:directories? #t))
3056 (for-each delete-file (find-files "." "\\.pyc$"))
3057 #t))))
3058 (build-system python-build-system)
3059 (propagated-inputs
3060 `(("python-pytz" ,python-pytz)
3061 ("python-six" ,python-six)))
3062 (home-page "https://github.com/getpelican/feedgenerator")
3063 (synopsis
3064 "Standalone version of Django's Atom/RSS feed generator")
3065 (description
3066 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3067which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3068 (license license:bsd-3)))
3069
3070(define-public python2-feedgenerator
3071 (package-with-python2 python-feedgenerator))
3072
3073(define-public python-toml
3074 (package
3075 (name "python-toml")
3076 (version "0.9.4")
3077 (source
3078 (origin
3079 (method url-fetch)
3080 (uri (pypi-uri "toml" version))
3081 (sha256
3082 (base32
3083 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3084 (build-system python-build-system)
3085 (arguments
3086 `(#:tests? #f)) ;no tests suite in release
3087 (home-page "https://github.com/uiri/toml")
3088 (synopsis "Library for TOML")
3089 (description
3090 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3091Language (TOML) configuration files.")
3092 (license license:expat)))
3093
346c8752
BG
3094(define-public python-jsonrpc-server
3095 (package
3096 (name "python-jsonrpc-server")
3097 (version "0.1.2")
3098 (source
3099 (origin
3100 (method url-fetch)
3101 (uri (pypi-uri "python-jsonrpc-server" version))
3102 (sha256
3103 (base32
3104 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
3105 (build-system python-build-system)
3106 (propagated-inputs
3107 `(("python-future" ,python-future)
3108 ("python-mock" ,python-mock)
3109 ("python-pytest" ,python-pytest)))
3110 (home-page
3111 "https://github.com/palantir/python-jsonrpc-server")
3112 (synopsis "JSON RPC 2.0 server library")
3113 (description
1df5407c 3114 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3115 (license license:expat)))
3116
56f4ad47
BG
3117(define-public python-pydocstyle
3118 (package
3119 (name "python-pydocstyle")
3120 (version "3.0.0")
3121 (source
3122 (origin
3123 (method url-fetch)
3124 (uri (pypi-uri "pydocstyle" version))
3125 (sha256
3126 (base32
3127 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3128 (build-system python-build-system)
3129 (propagated-inputs
3130 `(("python-six" ,python-six)
3131 ("python-snowballstemmer" ,python-snowballstemmer)))
3132 (home-page
3133 "https://github.com/PyCQA/pydocstyle/")
3134 (synopsis "Python docstring style checker")
3135 (description
3136 "This package provides a style checker for the Python Language
3137Server (PLS).")
3138 (license license:expat)))
3139
be4d840c 3140(define-public python-language-server
808dd2d0
BL
3141 (package
3142 (name "python-language-server")
3143 (version "0.29.1")
3144 (source
3145 (origin
3146 (method url-fetch)
3147 (uri (pypi-uri "python-language-server" version))
3148 (sha256
3149 (base32
3150 "1f8qlflh6j3s7qfmzhirpl8fgidl6f0qbakdmiml96wdxzvka0s3"))))
3151 (build-system python-build-system)
3152 (propagated-inputs
3153 `(("python-pluggy" ,python-pluggy)
3154 ("python-jsonrpc-server" ,python-jsonrpc-server)
3155 ("python-jedi" ,python-jedi)
3156 ("python-yapf" ,python-yapf)
3157 ("python-pyflakes" ,python-pyflakes)
3158 ("python-pydocstyle" ,python-pydocstyle)
3159 ("python-pycodestyle" ,python-pycodestyle)
3160 ("python-mccabe" ,python-mccabe)
3161 ("python-rope" ,python-rope)
3162 ("python-autopep8" ,python-autopep8)
3163 ("python-flake8" ,python-flake8)
3164 ("python-pylint" ,python-pylint)))
3165 (home-page "https://github.com/palantir/python-language-server")
3166 (synopsis "Python implementation of the Language Server Protocol")
3167 (description
3168 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3169language specification for the Language Server Protocol (LSP). This tool is
3170used in text editing environments to provide a complete and integrated
3171feature-set for programming Python effectively.")
808dd2d0 3172 (license license:expat)))
be4d840c 3173
44d10b1f
RW
3174(define-public python-black
3175 (package
3176 (name "python-black")
3177 (version "18.6b4")
3178 (source
3179 (origin
3180 (method url-fetch)
3181 (uri (pypi-uri "black" version))
3182 (sha256
3183 (base32
3184 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3185 (build-system python-build-system)
3186 (arguments
3187 `(#:phases
3188 (modify-phases %standard-phases
3189 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3190 (lambda _
3191 (let ((python3 (which "python3")))
3192 (substitute* '("tests/data/fmtonoff.py"
3193 "tests/data/string_prefixes.py"
3194 "tests/data/function.py")
3195 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3196 (string-append "#!" python3 (if (string? minor-version)
3197 minor-version
3198 ""))))))))))
3199 (propagated-inputs
3200 `(("python-click" ,python-click)
3201 ("python-attrs" ,python-attrs)
3202 ("python-appdirs" ,python-appdirs)
3203 ("python-toml" ,python-toml)))
3204 (home-page "https://github.com/ambv/black")
3205 (synopsis "The uncompromising code formatter")
3206 (description "Black is the uncompromising Python code formatter.")
3207 (license license:expat)))
3208
3209(define-public python-blinker
3210 (package
3211 (name "python-blinker")
3212 (version "1.4")
3213 (source
3214 (origin
3215 (method url-fetch)
3216 (uri (pypi-uri "blinker" version))
3217 (sha256
3218 (base32
3219 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3220 (build-system python-build-system)
3221 (home-page "http://pythonhosted.org/blinker/")
3222 (synopsis "Fast, simple object-to-object and broadcast signaling")
3223 (description
3224 "Blinker provides a fast dispatching system that allows any number of
3225interested parties to subscribe to events, or \"signals\".")
3226 (license license:expat)))
3227
3228(define-public python2-blinker
3229 (package-with-python2 python-blinker))
3230
3231(define-public pelican
3232 (package
3233 (name "pelican")
aa71b690 3234 (version "4.0.1")
44d10b1f
RW
3235 (source
3236 (origin
3237 (method url-fetch)
3238 (uri (pypi-uri "pelican" version))
3239 (sha256
3240 (base32
aa71b690 3241 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
3242 (build-system python-build-system)
3243 (propagated-inputs
3244 `(("python-feedgenerator" ,python-feedgenerator)
3245 ("python-jinja2" ,python-jinja2)
3246 ("python-pygments" ,python-pygments)
3247 ("python-docutils" ,python-docutils)
3248 ("python-pytz" ,python-pytz)
3249 ("python-blinker" ,python-blinker)
3250 ("python-unidecode" ,python-unidecode)
3251 ("python-six" ,python-six)
3252 ("python-dateutil" ,python-dateutil)
3253 ("python-markdown" ,python-markdown)))
3254 (home-page "https://getpelican.com/")
3255 (arguments
3256 `(;; XXX Requires a lot more packages to do unit tests :P
3257 #:tests? #f
3258 #:phases (modify-phases %standard-phases
3259 (add-before
3260 'install 'adjust-requires
3261 ;; Since feedgenerator is installed from git, it doesn't
3262 ;; conform to the version requirements.
3263 ;;
3264 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3265 ;; version requirement so setuptools doesn't get confused.
3266 (lambda _
3267 (substitute* "setup.py"
3268 (("['\"]feedgenerator.*?['\"]")
3269 "'feedgenerator'")))))))
3270 (synopsis "Python-based static site publishing system")
3271 (description
3272 "Pelican is a tool to generate a static blog from reStructuredText,
3273Markdown input files, and more. Pelican uses Jinja2 for templating
3274and is very extensible.")
3275 (license license:agpl3+)))
3276
8c141421
JH
3277(define-public mallard-ducktype
3278 (package
3279 (name "mallard-ducktype")
12cc3da5 3280 (version "1.0.2")
8c141421
JH
3281 (source
3282 (origin
3283 (method git-fetch)
12cc3da5
JH
3284 ;; git-reference because tests are not included in pypi source tarball
3285 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3286 (uri (git-reference
3287 (url "https://github.com/projectmallard/mallard-ducktype.git")
3288 (commit version)))
3289 (file-name (git-file-name name version))
3290 (sha256
3291 (base32
12cc3da5 3292 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3293 (build-system python-build-system)
5246655f
EF
3294 (arguments
3295 '(#:phases
3296 (modify-phases %standard-phases
3297 (replace 'check
3298 (lambda _
3299 (with-directory-excursion "tests"
3300 (invoke "sh" "runtests")))))))
8c141421
JH
3301 (home-page "http://projectmallard.org")
3302 (synopsis "Convert Ducktype to Mallard documentation markup")
3303 (description
3304 "Ducktype is a lightweight syntax that can represent all the semantics
3305of the Mallard XML documentation system. Ducktype files can be converted to
3306Mallard using the @command{ducktype} tool. The yelp-tools package
3307provides additional functionality on the produced Mallard documents.")
3308 (license license:expat)))
3309
44d10b1f
RW
3310(define-public python-scikit-image
3311 (package
3312 (name "python-scikit-image")
9ff04084 3313 (version "0.14.2")
44d10b1f
RW
3314 (source
3315 (origin
3316 (method url-fetch)
3317 (uri (pypi-uri "scikit-image" version))
3318 (sha256
9ff04084 3319 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
3320 (build-system python-build-system)
3321 (arguments
3322 ;; TODO: Some tests require running X11 server. Disable them?
3323 '(#:tests? #f))
3324 ;; See DEPENDS.txt for the list of build and run time requiremnts
3325 (propagated-inputs
3326 `(("python-cloudpickle" ,python-cloudpickle)
3327 ("python-dask" ,python-dask)
3328 ("python-matplotlib" ,python-matplotlib)
3329 ("python-networkx" ,python-networkx)
3330 ("python-numpy" ,python-numpy)
3331 ("python-pillow" ,python-pillow)
3332 ("python-pywavelets" ,python-pywavelets)
3333 ("python-scipy" ,python-scipy)
3334 ("python-six" ,python-six)))
3335 (native-inputs
3336 `(("python-cython" ,python-cython)))
3337 (home-page "http://scikit-image.org/")
3338 (synopsis "Image processing in Python")
3339 (description
3340 "Scikit-image is a collection of algorithms for image processing.")
3341 (license license:bsd-3)))
3342
3343(define-public python2-scikit-image
3344 (package-with-python2 python-scikit-image))
3345
3346(define-public python-cython
3347 (package
3348 (name "python-cython")
6fd27a71 3349 (version "0.29.13")
44d10b1f
RW
3350 (source
3351 (origin
3352 (method url-fetch)
3353 (uri (pypi-uri "Cython" version))
3354 (sha256
6fd27a71
TGR
3355 (base32
3356 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3357 (build-system python-build-system)
3358 ;; we need the full python package and not just the python-wrapper
3359 ;; because we need libpython3.3m.so
3360 (inputs
3361 `(("python" ,python)))
3362 (arguments
3363 `(#:phases
3364 (modify-phases %standard-phases
3365 (add-before 'check 'set-HOME
3366 ;; some tests require access to "$HOME/.cython"
3367 (lambda _ (setenv "HOME" "/tmp") #t))
3368
3369 ;; FIXME: These tests started failing on armhf after the 0.28 update
3370 ;; (commit c69d11c5930), both with an error such as this:
3371 ;; compiling (cpp) and running dictcomp ...
3372 ;; === C/C++ compiler error output: ===
3373 ;; ‘
3374 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3375 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3376 ,@(if (target-arm32?)
3377 `((add-before 'check 'disable-failing-tests
3378 (lambda _
3379 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3380 (for-each (lambda (test)
3381 (format disabled-tests "~a\n" test))
3382 '("memslice" "dictcomp"))
3383 (close-port disabled-tests)))))
3384 '())
3385
3386 (replace 'check
3387 (lambda _
e9194eb0
MB
3388 ;; Disable compiler optimizations to greatly reduce the running
3389 ;; time of the test suite.
3390 (setenv "CFLAGS" "-O0")
3391
3392 (invoke "python" "runtests.py" "-vv"
3393 "-j" (number->string (parallel-job-count))))))))
f319409b 3394 (home-page "https://cython.org/")
44d10b1f
RW
3395 (synopsis "C extensions for Python")
3396 (description "Cython is an optimising static compiler for both the Python
3397programming language and the extended Cython programming language. It makes
3398writing C extensions for Python as easy as Python itself.")
3399 (license license:asl2.0)
3400 (properties `((python2-variant . ,(delay python2-cython))))))
3401
3402(define-public python2-cython
da460865
MB
3403 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3404 (package
3405 (inherit base)
3406 (name "python2-cython")
3407 (inputs
3408 `(("python-2" ,python-2))) ;this is not automatically changed
3409 (arguments
3410 (substitute-keyword-arguments (package-arguments base)
3411 ((#:phases phases)
3412 `(modify-phases ,phases
3413 (add-before 'check 'adjust-test_embed
3414 (lambda _
3415 (substitute* "runtests.py"
3416 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3417 ;; so it can give the right -L flag to GCC when embedding static
3418 ;; builds of Python. It is unaware that the Python "config"
3419 ;; directory (where the static library lives) was renamed in
3420 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3421 ;; which works fine, because that is where the shared library is.
3422 ;;
3423 ;; It also appears to be unaware that the Makefile in Demos/embed
3424 ;; already unconditionally pass the static library location to GCC,
3425 ;; after checking sysconfig.get_config_var('LIBPL).
3426 ;;
3427 ;; The effect is that the linker is unable to resolve libexpat
3428 ;; symbols when building for Python 2, because neither the Python 2
3429 ;; shared library nor Expat is available. To fix it, we can either
3430 ;; add Expat as an input and make it visible to the linker, or just
3431 ;; prevent it from overriding the Python shared library location.
3432 ;; The end result is identical, so we take the easy route.
3433 ((" or libname not in os\\.listdir\\(libdir\\)")
3434 ""))
3435 #t)))))))))
44d10b1f
RW
3436
3437;; The RPython toolchain currently does not support Python 3.
3438(define-public python2-rpython
3439 (package
3440 (name "python2-rpython")
3441 (version "0.2.1")
3442 (source
3443 (origin
3444 (method url-fetch)
3445 (uri (pypi-uri "rpython" version))
3446 (sha256
3447 (base32
3448 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3449 (build-system python-build-system)
3450 (arguments `(#:python ,python-2))
3451 (native-inputs
3452 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3453 (home-page "https://rpython.readthedocs.org")
3454 (synopsis "Framework for implementing interpreters and virtual machines")
3455 (description "RPython is a translation and support framework for
3456producing implementations of dynamic languages, emphasizing a clean separation
3457between language specification and implementation aspects.")
3458 (license license:expat)))
3459
3460;; NOTE: when upgrading numpy please make sure that python-pandas and
3461;; python-scipy still build, as these three packages are often used together.
3462(define-public python-numpy
3463 (package
3464 (name "python-numpy")
8e5fbd5d 3465 (version "1.17.3")
44d10b1f
RW
3466 (source
3467 (origin
3468 (method url-fetch)
3469 (uri (string-append
3470 "https://github.com/numpy/numpy/releases/download/v"
3471 version "/numpy-" version ".tar.gz"))
3472 (sha256
3473 (base32
8e5fbd5d 3474 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3475 (build-system python-build-system)
3476 (inputs
3477 `(("openblas" ,openblas)
3478 ("lapack" ,lapack)))
3479 (native-inputs
3480 `(("python-cython" ,python-cython)
3481 ("python-pytest" ,python-pytest)
3482 ("gfortran" ,gfortran)))
3483 (arguments
3484 `(#:phases
3485 (modify-phases %standard-phases
3486 (add-before 'build 'configure-blas-lapack
3487 (lambda* (#:key inputs #:allow-other-keys)
3488 (call-with-output-file "site.cfg"
3489 (lambda (port)
3490 (format port
3491 "[openblas]
3492libraries = openblas
3493library_dirs = ~a/lib
3494include_dirs = ~a/include
3495
3496# backslash-n to make emacs happy
3497\n[lapack]
3498lapack_libs = lapack
3499library_dirs = ~a/lib
3500include_dirs = ~a/include
3501"
3502 (assoc-ref inputs "openblas")
3503 (assoc-ref inputs "openblas")
3504 (assoc-ref inputs "lapack")
3505 (assoc-ref inputs "lapack"))))
3506 #t))
3507 (add-before 'build 'fix-executable-paths
3508 (lambda* (#:key inputs #:allow-other-keys)
3509 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3510 ;; instead of /bin/sh.
3511 (substitute* "numpy/distutils/exec_command.py"
3512 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3513 (string-append match-start (assoc-ref inputs "bash") match-end)))
3514 ;; Use "gcc" executable, not "cc".
3515 (substitute* "numpy/distutils/system_info.py"
3516 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3517 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3518 #t))
3519 ;; Tests can only be run after the library has been installed and not
3520 ;; within the source directory.
3521 (delete 'check)
3522 (add-after 'install 'check
3523 (lambda* (#:key outputs inputs #:allow-other-keys)
3524 ;; Make installed package available for running the tests
3525 (add-installed-pythonpath inputs outputs)
3526 ;; Make sure "f2py" etc is found.
3527 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3528 ":" (getenv "PATH")))
3529 (with-directory-excursion "/tmp"
3530 (invoke "python" "-c"
3531 "import numpy; numpy.test(verbose=2)")))))))
3532 (home-page "http://www.numpy.org/")
3533 (synopsis "Fundamental package for scientific computing with Python")
3534 (description "NumPy is the fundamental package for scientific computing
3535with Python. It contains among other things: a powerful N-dimensional array
3536object, sophisticated (broadcasting) functions, tools for integrating C/C++
3537and Fortran code, useful linear algebra, Fourier transform, and random number
3538capabilities.")
adb396ea 3539 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3540 (license license:bsd-3)))
3541
adb396ea 3542;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3543(define-public python2-numpy
adb396ea
MB
3544 (let ((numpy (package-with-python2
3545 (strip-python2-variant python-numpy))))
3546 (package/inherit
3547 numpy
3548 (version "1.16.5")
3549 (source (origin
3550 (method url-fetch)
3551 (uri (string-append
3552 "https://github.com/numpy/numpy/releases/download/v"
3553 version "/numpy-" version ".tar.gz"))
3554 (sha256
3555 (base32
3556 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3557
3558;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3559;; interest only for legacy code going back to NumPy's predecessor
3560;; Numeric.
3561(define-public python2-numpy-1.8
3562 (package (inherit python2-numpy)
3563 (version "1.8.2")
3564 (source
3565 (origin
3566 (method url-fetch)
3567 (uri (string-append
3568 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3569 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3570 (sha256
3571 (base32
3572 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3573 (arguments
3574 (substitute-keyword-arguments (package-arguments python2-numpy)
3575 ((#:phases phases)
3576 `(modify-phases ,phases
3577 (replace 'configure-blas-lapack
3578 (lambda* (#:key inputs #:allow-other-keys)
3579 (call-with-output-file "site.cfg"
3580 (lambda (port)
3581 (format port
3582 "[openblas]
3583libraries = openblas,lapack
3584library_dirs = ~a/lib:~a/lib
3585include_dirs = ~a/include:~a/include
3586"
3587 (assoc-ref inputs "openblas")
3588 (assoc-ref inputs "lapack")
3589 (assoc-ref inputs "openblas")
3590 (assoc-ref inputs "lapack"))))
3591 #t))))))
3592 (native-inputs
3593 `(("python2-nose" ,python2-nose)))
3594 (description "NumPy is the fundamental package for scientific computing
3595with Python. It contains among other things: a powerful N-dimensional array
3596object, sophisticated (broadcasting) functions, tools for integrating C/C++
3597and Fortran code, useful linear algebra, Fourier transform, and random number
3598capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3599that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3600Numeric.")
3601 (license license:bsd-3)))
3602
3603(define-public python-munch
3604 (package
3605 (name "python-munch")
3606 (version "2.0.4")
3607 (source
3608 (origin
3609 (method url-fetch)
3610 (uri (pypi-uri "munch" version))
3611 (sha256
3612 (base32
3613 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3614 (build-system python-build-system)
3615 (home-page "https://github.com/Infinidat/munch")
3616 (synopsis "Dot-accessible dictionary")
3617 (description "Munch is a dot-accessible dictionary similar to JavaScript
3618objects.")
3619 (license license:expat)))
3620
3621(define-public python2-munch
3622 (package-with-python2 python-munch))
3623
3624(define-public python-colormath
3625 (package
3626 (name "python-colormath")
3627 (version "3.0.0")
3628 (source
3629 (origin
3630 (method url-fetch)
3631 (uri (pypi-uri "colormath" version))
3632 (sha256
3633 (base32
3634 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3635 (build-system python-build-system)
3636 (propagated-inputs
3637 `(("python-networkx" ,python-networkx)
3638 ("python-numpy" ,python-numpy)))
3639 (home-page "https://github.com/gtaylor/python-colormath")
3640 (synopsis "Color math and conversion library")
3641 (description
3642 "This is a Python library for color math and conversions.")
3643 (license license:bsd-3)))
3644
3645(define-public python2-colormath
3646 (package-with-python2 python-colormath))
3647
3648(define-public python-spectra
3649 (package
3650 (name "python-spectra")
3651 (version "0.0.11")
3652 (source
3653 (origin
3654 (method url-fetch)
3655 (uri (pypi-uri "spectra" version))
3656 (sha256
3657 (base32
3658 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3659 (build-system python-build-system)
3660 (arguments
3661 `(#:phases
3662 (modify-phases %standard-phases
3663 (replace 'check
38ec0f6a 3664 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3665 (propagated-inputs
3666 `(("python-colormath" ,python-colormath)))
3667 (native-inputs
3668 `(("python-nose" ,python-nose)))
3669 (home-page "https://github.com/jsvine/spectra")
3670 (synopsis "Color scales and color conversion")
3671 (description
3672 "This package provides a Python library intended to make color math,
3673color scales, and color space conversion easy. It has support for:
3674
3675@enumerate
3676@item Color scales
3677@item Color ranges
3678@item Color blending
3679@item Brightening/darkening colors
3680@item Saturating/desaturating colors
3681@item Conversion to/from multiple color spaces.
3682@end enumerate\n")
3683 (license license:expat)))
3684
3685(define-public python2-spectra
3686 (package-with-python2 python-spectra))
3687
3688(define-public python-numpy-documentation
3689 (package
3690 (name "python-numpy-documentation")
3691 (version (package-version python-numpy))
3692 (source (package-source python-numpy))
3693 (build-system python-build-system)
3694 (native-inputs
3695 `(("python-matplotlib" ,python-matplotlib)
3696 ("python-numpy" ,python-numpy)
3697 ("pkg-config" ,pkg-config)
3698 ("python-sphinx" ,python-sphinx)
3699 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3700 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3701 texlive-fonts-ec
3702 texlive-generic-ifxetex
3703 texlive-generic-pdftex
f75aa97f 3704 texlive-amsfonts
44d10b1f
RW
3705 texlive-latex-capt-of
3706 texlive-latex-cmap
3707 texlive-latex-environ
3708 texlive-latex-eqparbox
3709 texlive-latex-etoolbox
3710 texlive-latex-expdlist
3711 texlive-latex-fancyhdr
3712 texlive-latex-fancyvrb
3713 texlive-latex-fncychap
3714 texlive-latex-float
3715 texlive-latex-framed
3716 texlive-latex-geometry
3717 texlive-latex-graphics
3718 texlive-latex-hyperref
3719 texlive-latex-mdwtools
3720 texlive-latex-multirow
3721 texlive-latex-needspace
3722 texlive-latex-oberdiek
3723 texlive-latex-parskip
3724 texlive-latex-preview
3725 texlive-latex-tabulary
3726 texlive-latex-threeparttable
3727 texlive-latex-titlesec
3728 texlive-latex-trimspaces
3729 texlive-latex-ucs
3730 texlive-latex-upquote
3731 texlive-latex-url
3732 texlive-latex-varwidth
3733 texlive-latex-wrapfig)))
3734 ("texinfo" ,texinfo)
3735 ("perl" ,perl)
3736 ("scipy-sphinx-theme"
3737 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3738 (method git-fetch)
3739 (uri (git-reference
3740 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3741 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3742 (sha256
3743 (base32
3744 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3745 ,@(package-native-inputs python-numpy)))
3746 (arguments
3747 `(#:tests? #f ; we're only generating the documentation
3748 #:phases
3749 (modify-phases %standard-phases
3750 (delete 'build)
3751 (replace 'install
3752 (lambda* (#:key inputs outputs #:allow-other-keys)
3753 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3754 (doc (string-append
3755 data "/doc/" ,name "-"
3756 ,(package-version python-numpy)))
3757 (info-reader (string-append data "/info"))
3758 (html (string-append doc "/html"))
3759 (scipy-sphinx-theme "scipy-sphinx-theme")
3760 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3761 (pyver ,(string-append "PYVER=")))
3762
3763 ;; FIXME: this is needed to for texlive-union to generate
3764 ;; fonts, which are not found.
3765 (setenv "HOME" "/tmp")
3766
3767 (with-directory-excursion "doc"
3768 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3769 (mkdir-p html)
4fc898da
RW
3770 (invoke "make" "html" pyver)
3771 (invoke "make" "latex" "PAPER=a4" pyver)
3772 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3773 "all-pdf" "PAPER=a4" pyver)
3774 ;; FIXME: Generation of the info file fails.
4fc898da 3775 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3776 ;; (mkdir-p info)
3777 ;; (copy-file "build/texinfo/numpy.info"
3778 ;; (string-append info "/numpy.info"))
3779 (for-each (lambda (file)
3780 (copy-file (string-append "build/latex" file)
3781 (string-append doc file)))
3782 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3783 (with-directory-excursion "build/html"
3784 (for-each (lambda (file)
3785 (let* ((dir (dirname file))
3786 (tgt-dir (string-append html "/" dir)))
3787 (unless (equal? "." dir)
3788 (mkdir-p tgt-dir))
3789 (install-file file html)))
3790 (find-files "." ".*")))))
3791 #t)))))
3792 (home-page (package-home-page python-numpy))
3793 (synopsis "Documentation for the python-numpy package")
3794 (description (package-description python-numpy))
3795 (license (package-license python-numpy))))
3796
3797(define-public python2-numpy-documentation
3798 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3799 (package
3800 (inherit numpy-documentation)
3801 (native-inputs `(("python2-functools32" ,python2-functools32)
3802 ,@(package-native-inputs numpy-documentation))))))
3803
3804(define-public python-pygit2
3805 (package
3806 (name "python-pygit2")
dac8b275 3807 (version "0.28.2")
44d10b1f
RW
3808 (source
3809 (origin
3810 (method url-fetch)
3811 (uri (pypi-uri "pygit2" version))
3812 (sha256
dac8b275 3813 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3814 (build-system python-build-system)
3815 (arguments
c3ecab0d 3816 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3817 (propagated-inputs
3818 `(("python-six" ,python-six)
3819 ("python-cffi" ,python-cffi)
3820 ("libgit2" ,libgit2)
3821 ("python-tox" ,python-tox)))
3822 (native-inputs
3823 `(("python-pytest" ,python-pytest)))
3824 (home-page "https://github.com/libgit2/pygit2")
3825 (synopsis "Python bindings for libgit2")
3826 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3827library, libgit2 implements Git plumbing.")
3828 ;; GPL2.0 only, with linking exception.
3829 (license license:gpl2)))
3830
3831(define-public python2-pygit2
3832 (package-with-python2 python-pygit2))
3833
3834(define-public python-pyparsing
3835 (package
3836 (name "python-pyparsing")
6d3cff5a 3837 (version "2.3.1")
44d10b1f
RW
3838 (source
3839 (origin
3840 (method url-fetch)
3841 (uri (pypi-uri "pyparsing" version))
3842 (sha256
6d3cff5a 3843 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3844 (build-system python-build-system)
3845 (outputs '("out" "doc"))
3846 (arguments
3847 `(#:tests? #f ; no test target
3848 #:phases
3849 (modify-phases %standard-phases
3850 (add-after 'install 'install-doc
3851 (lambda* (#:key outputs #:allow-other-keys)
3852 (let* ((doc (string-append (assoc-ref outputs "doc")
3853 "/share/doc/" ,name "-" ,version))
3854 (html-doc (string-append doc "/html"))
3855 (examples (string-append doc "/examples")))
3856 (mkdir-p html-doc)
3857 (mkdir-p examples)
3858 (for-each
3859 (lambda (dir tgt)
3860 (map (lambda (file)
3861 (install-file file tgt))
3862 (find-files dir ".*")))
3863 (list "docs" "htmldoc" "examples")
3864 (list doc html-doc examples))
3865 #t))))))
3866 (home-page "https://github.com/pyparsing/pyparsing")
3867 (synopsis "Python parsing class library")
3868 (description
3869 "The pyparsing module is an alternative approach to creating and
3870executing simple grammars, vs. the traditional lex/yacc approach, or the use
3871of regular expressions. The pyparsing module provides a library of classes
3872that client code uses to construct the grammar directly in Python code.")
3873 (license license:expat)))
3874
3875(define-public python2-pyparsing
3876 (package-with-python2 python-pyparsing))
3877
3878(define-public python-numpydoc
3879 (package
3880 (name "python-numpydoc")
3881 (version "0.8.0")
3882 (source
3883 (origin
3884 (method url-fetch)
3885 (uri (pypi-uri "numpydoc" version))
3886 (sha256
3887 (base32
3888 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3889 (build-system python-build-system)
3890 (propagated-inputs
3891 `(("python-sphinx" ,python-sphinx)))
3892 (native-inputs
3893 `(("python-nose" ,python-nose)))
3894 (home-page "https://pypi.python.org/pypi/numpydoc")
3895 (synopsis
3896 "Numpy's Sphinx extensions")
3897 (description
3898 "Sphinx extension to support docstrings in Numpy format.")
3899 (license license:bsd-2)))
3900
3901(define-public python2-numpydoc
3902 (package-with-python2 python-numpydoc))
3903
3904(define-public python-numexpr
3905 (package
3906 (name "python-numexpr")
3907 (version "2.6.5")
3908 (source
3909 (origin
3910 (method url-fetch)
3911 (uri (pypi-uri "numexpr" version))
3912 (sha256
3913 (base32
3914 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3915 (build-system python-build-system)
3916 (arguments `(#:tests? #f)) ; no tests included
3917 (propagated-inputs
3918 `(("python-numpy" ,python-numpy)))
3919 (home-page "https://github.com/pydata/numexpr")
3920 (synopsis "Fast numerical expression evaluator for NumPy")
3921 (description
3922 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3923expressions that operate on arrays are accelerated and use less memory than
3924doing the same calculation in Python. In addition, its multi-threaded
3925capabilities can make use of all your cores, which may accelerate
3926computations, most specially if they are not memory-bounded (e.g. those using
3927transcendental functions).")
3928 (license license:expat)))
3929
3930(define-public python2-numexpr
3931 (package-with-python2 python-numexpr))
3932
3933(define-public python-cycler
3934 (package
3935 (name "python-cycler")
3936 (version "0.10.0")
3937 (source (origin
3938 (method url-fetch)
3939 (uri (pypi-uri "cycler" version))
3940 (sha256
3941 (base32
3942 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3943 (build-system python-build-system)
3944 (arguments
3945 ;; XXX: The current version requires 'coveralls' which we don't have.
3946 ;; Enable this for the next release which uses 'python-pytest'.
3947 '(#:tests? #f))
3948 (propagated-inputs
3949 `(("python-six" ,python-six)))
3950 (home-page "http://matplotlib.org/cycler/")
3951 (synopsis "Composable keyword argument iterator")
3952 (description
3953 "When using @code{matplotlib} and plotting more than one line, it is
3954common to want to be able to want to be able to cycle over one or more artist
3955styles; but the plotting logic can quickly become involved.
3956To address this and enable easy cycling over arbitrary @code{kwargs}, the
3957@code{Cycler} class was developed.")
3958 (license license:bsd-3)))
3959
3960(define-public python2-cycler
3961 (package-with-python2 python-cycler))
3962
3963(define-public python-colorspacious
3964 (package
3965 (name "python-colorspacious")
53a3ebed 3966 (version "1.1.2")
44d10b1f 3967 (source
dee92e65
TGR
3968 (origin
3969 (method git-fetch)
3970 (uri (git-reference
3971 (url "https://github.com/njsmith/colorspacious.git")
3972 (commit (string-append "v" version))))
3973 (file-name (git-file-name name version))
3974 (sha256
53a3ebed 3975 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
3976 (build-system python-build-system)
3977 (propagated-inputs
3978 `(("python-numpy" ,python-numpy)))
3979 (native-inputs
3980 `(("python-nose" ,python-nose)))
3981 (arguments
3982 `(#:phases
3983 (modify-phases %standard-phases
3984 (replace 'check
3985 (lambda _
c988afda 3986 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3987 (home-page "https://github.com/njsmith/colorspacious")
3988 (synopsis "Python library for colorspace conversions")
3989 (description "@code{colorspacious} is a Python library that lets you
3990convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3991 (license license:expat)))
3992
3993(define-public python2-colorspacious
3994 (package-with-python2 python-colorspacious))
3995
3996(define-public python-matplotlib
3997 (package
3998 (name "python-matplotlib")
9e7cb2f1 3999 (version "3.1.2")
44d10b1f
RW
4000 (source
4001 (origin
4002 (method url-fetch)
4003 (uri (pypi-uri "matplotlib" version))
4004 (sha256
4005 (base32
9e7cb2f1 4006 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
4007 (build-system python-build-system)
4008 (propagated-inputs ; the following packages are all needed at run time
4009 `(("python-cycler" ,python-cycler)
4010 ("python-kiwisolver" ,python-kiwisolver)
4011 ("python-pyparsing" ,python-pyparsing)
4012 ("python-pygobject" ,python-pygobject)
4013 ("gobject-introspection" ,gobject-introspection)
4014 ("python-tkinter" ,python "tk")
4015 ("python-dateutil" ,python-dateutil)
4016 ("python-numpy" ,python-numpy)
4017 ("python-pillow" ,python-pillow)
4018 ("python-pytz" ,python-pytz)
4019 ("python-six" ,python-six)
44d10b1f
RW
4020 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4021 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4022 ;; object. For this reason we need to import both libraries.
5ea654cf 4023 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 4024 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
4025 ("python-cairocffi" ,python-cairocffi)))
4026 (inputs
4027 `(("libpng" ,libpng)
4028 ("imagemagick" ,imagemagick)
4029 ("freetype" ,freetype)
4030 ("cairo" ,cairo)
4031 ("glib" ,glib)
4032 ;; FIXME: Add backends when available.
4033 ;("python-wxpython" ,python-wxpython)
4034 ("tcl" ,tcl)
4035 ("tk" ,tk)))
4036 (native-inputs
4037 `(("pkg-config" ,pkg-config)
5ea654cf
RW
4038 ("python-pytest" ,python-pytest)
4039 ("python-mock" ,python-mock)
4040 ("unzip" ,unzip)
4041 ("jquery-ui"
4042 ,(origin
4043 (method url-fetch)
4044 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4045 (sha256
4046 (base32
4047 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
4048 (arguments
4049 `(#:phases
4050 (modify-phases %standard-phases
5ea654cf
RW
4051 ;; XXX We disable all image comparison tests because we're using a
4052 ;; newer version of FreeType than matplotlib expects. This leads to
4053 ;; minor differences throughout the tests.
4054 (add-after 'unpack 'fix-and-disable-failing-tests
4055 (lambda _
4056 (substitute* (append (find-files "lib/matplotlib/tests/"
4057 "test_.*\\.py$")
4058 (find-files "lib/mpl_toolkits/tests"
4059 "test_.*\\.py$"))
4060 (("^from matplotlib" match)
4061 (string-append "import pytest\n" match))
4062 (("( *)@image_comparison" match indent)
4063 (string-append indent
4064 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4065 match)))
4066 (substitute* "lib/matplotlib/tests/test_animation.py"
4067 (("/bin/sh") (which "sh")))
4068 (for-each delete-file
4069 ;; test_normal_axes, test_get_tightbbox_polar
4070 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
4071 ;; We don't use the webagg backend and this test forces it.
4072 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
4073 ;; test_outward_ticks
4074 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
4075 ;; test_hidden_axes fails with minor extent
4076 ;; differences, possibly due to the use of a
4077 ;; different version of FreeType.
4078 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
4079 ;; Fontconfig returns no fonts.
4080 "lib/matplotlib/tests/test_font_manager.py"))
4081 #t))
4082 (add-before 'install 'install-jquery-ui
4083 (lambda* (#:key outputs inputs #:allow-other-keys)
4084 (let ((dir (string-append (assoc-ref outputs "out")
4085 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4086 (mkdir-p dir)
4087 (invoke "unzip"
4088 (assoc-ref inputs "jquery-ui")
4089 "-d" dir))
4090 #t))
c09f598d 4091 (replace 'check
5ea654cf
RW
4092 (lambda* (#:key outputs inputs #:allow-other-keys)
4093 (add-installed-pythonpath inputs outputs)
4094 (invoke "python" "tests.py" "-v"
9e7cb2f1 4095 "-m" "not network and not webagg")))
44d10b1f
RW
4096 (add-before 'build 'configure-environment
4097 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
4098 (let ((cairo (assoc-ref inputs "cairo")))
4099 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 4100 ;; has not effect.
34c2a16b 4101 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
4102 (setenv "HOME" (getcwd))
4103 (call-with-output-file "setup.cfg"
4104 (lambda (port)
4105 (format port "[directories]~%
4106basedirlist = ~a,~a~%
5ea654cf
RW
4107[packages]~%
4108tests = True~%"
44d10b1f
RW
4109 (assoc-ref inputs "tcl")
4110 (assoc-ref inputs "tk")))))
4111 #t)))))
339b5828 4112 (home-page "https://matplotlib.org/")
44d10b1f
RW
4113 (synopsis "2D plotting library for Python")
4114 (description
4115 "Matplotlib is a Python 2D plotting library which produces publication
4116quality figures in a variety of hardcopy formats and interactive environments
4117across platforms. Matplotlib can be used in Python scripts, the python and
4118ipython shell, web application servers, and six graphical user interface
4119toolkits.")
4120 (license license:psfl)
4121 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4122
4123(define-public python2-matplotlib
4124 (let ((matplotlib (package-with-python2
4125 (strip-python2-variant python-matplotlib))))
4126 (package (inherit matplotlib)
7380df73 4127 (version "2.2.4")
5ea654cf
RW
4128 (source
4129 (origin
4130 (method url-fetch)
4131 (uri (pypi-uri "matplotlib" version))
4132 (sha256
4133 (base32
7380df73 4134 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4135 (arguments
4136 (substitute-keyword-arguments (package-arguments matplotlib)
4137 ((#:phases phases)
4138 `(modify-phases ,phases
66a3c2db
EF
4139 (replace 'install-jquery-ui
4140 (lambda* (#:key outputs inputs #:allow-other-keys)
4141 (let ((dir (string-append (assoc-ref outputs "out")
4142 "/lib/python2.7/site-packages/"
4143 "matplotlib/backends/web_backend/")))
4144 (mkdir-p dir)
4145 (invoke "unzip"
4146 (assoc-ref inputs "jquery-ui")
4147 "-d" dir))
4148 #t))
38a404d5 4149 (delete 'fix-and-disable-failing-tests)
5d484f42 4150 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4151 ;; Make sure to use special packages for Python 2 instead
4152 ;; of those automatically rewritten by package-with-python2.
4153 (propagated-inputs
4154 `(("python2-pycairo" ,python2-pycairo)
4155 ("python2-backports-functools-lru-cache"
4156 ,python2-backports-functools-lru-cache)
4157 ("python2-functools32" ,python2-functools32)
4158 ("python2-pygobject-2" ,python2-pygobject-2)
4159 ("python2-subprocess32" ,python2-subprocess32)
4160 ("python2-tkinter" ,python-2 "tk")
4161 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4162 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4163
4164(define-public python-matplotlib-documentation
4165 (package
4166 (name "python-matplotlib-documentation")
4167 (version (package-version python-matplotlib))
4168 (source (package-source python-matplotlib))
4169 (build-system python-build-system)
4170 (native-inputs
4171 `(("python-matplotlib" ,python-matplotlib)
4172 ("python-colorspacious" ,python-colorspacious)
4173 ("python-sphinx" ,python-sphinx)
5ad0a452 4174 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4175 ("python-sphinx-gallery" ,python-sphinx-gallery)
4176 ("python-numpydoc" ,python-numpydoc)
4177 ("python-ipython" ,python-ipython)
e7a53914 4178 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4179 ("python-mock" ,python-mock)
4180 ("graphviz" ,graphviz)
f75aa97f 4181 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4182 texlive-latex-amsmath
4183 texlive-latex-enumitem
4184 texlive-latex-expdlist
4185 texlive-latex-geometry
4186 texlive-latex-preview
4187 texlive-latex-type1cm
4188 texlive-latex-ucs
4189
4190 texlive-generic-pdftex
4191
e7a53914
RW
4192 texlive-fonts-ec
4193 texlive-fonts-adobe-times
4194 texlive-fonts-txfonts)))
44d10b1f
RW
4195 ("texinfo" ,texinfo)
4196 ,@(package-native-inputs python-matplotlib)))
4197 (arguments
4198 `(#:tests? #f ; we're only generating documentation
4199 #:phases
4200 (modify-phases %standard-phases
5ea654cf
RW
4201 ;; The tests in python-matplotlib are run after the install phase, so
4202 ;; we need to delete the extra phase here.
4203 (delete 'check)
44d10b1f
RW
4204 (replace 'build
4205 (lambda _
4206 (chdir "doc")
e7a53914
RW
4207 (setenv "PYTHONPATH"
4208 (string-append (getenv "PYTHONPATH")
4209 ":" (getcwd) "/../examples/units"))
44d10b1f 4210 (substitute* "conf.py"
e7a53914
RW
4211 ;; Don't use git.
4212 (("^SHA = check_output.*")
4213 (string-append "SHA = \"" ,version "\"\n"))
4214 ;; Don't fetch intersphinx files from the Internet
4215 (("^explicit_order_folders" m)
4216 (string-append "intersphinx_mapping = {}\n" m))
4217 (("'sphinx.ext.intersphinx',") "")
4218 ;; Disable URL embedding which requires internet access.
4219 (("'https://docs.scipy.org/doc/numpy'") "None")
4220 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4221 (invoke "make"
4222 "SPHINXBUILD=sphinx-build"
4223 "SPHINXOPTS=" ; don't abort on warnings
4224 "html" "texinfo")))
44d10b1f
RW
4225 (replace 'install
4226 (lambda* (#:key inputs outputs #:allow-other-keys)
4227 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4228 (doc (string-append data "/doc/python-matplotlib-" ,version))
4229 (info (string-append data "/info"))
4230 (html (string-append doc "/html")))
4231 (mkdir-p html)
4232 (mkdir-p info)
4233 (copy-recursively "build/html" html)
4234 (symlink (string-append html "/_images")
4235 (string-append info "/matplotlib-figures"))
4236 (with-directory-excursion "build/texinfo"
4237 (substitute* "matplotlib.texi"
4238 (("@image\\{([^,]*)" all file)
4239 (string-append "@image{matplotlib-figures/" file)))
4240 (symlink (string-append html "/_images")
4241 "./matplotlib-figures")
e7a53914
RW
4242 (invoke "makeinfo" "--no-split"
4243 "-o" "matplotlib.info" "matplotlib.texi"))
4244 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4245 #t)))))
4246 (home-page (package-home-page python-matplotlib))
4247 (synopsis "Documentation for the python-matplotlib package")
4248 (description (package-description python-matplotlib))
4249 (license (package-license python-matplotlib))))
4250
4251(define-public python2-matplotlib-documentation
5ad0a452
RW
4252 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4253 (package
4254 (inherit parent)
4255 (native-inputs
4256 (alist-delete "python-sphinx-copybutton"
4257 (package-native-inputs parent))))))
44d10b1f 4258
55dae98f
RW
4259(define-public python-matplotlib-venn
4260 (package
4261 (name "python-matplotlib-venn")
4262 (version "0.11.5")
4263 (source
4264 (origin
4265 (method url-fetch)
4266 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4267 (sha256
4268 (base32
4269 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4270 (build-system python-build-system)
4271 (arguments '(#:tests? #f)) ; tests are not included
4272 (propagated-inputs
4273 `(("python-matplotlib" ,python-matplotlib)
4274 ("python-numpy" ,python-numpy)
4275 ("python-scipy" ,python-scipy)))
4276 (native-inputs
4277 `(("unzip" ,unzip)))
4278 (home-page "https://github.com/konstantint/matplotlib-venn")
4279 (synopsis "Plot area-proportional Venn diagrams")
4280 (description
4281 "This package provides tools for plotting area-proportional two- and
4282three-way Venn diagrams in @code{matplotlib}.")
4283 (license license:expat)))
4284
44d10b1f
RW
4285(define-public python2-pysnptools
4286 (package
4287 (name "python2-pysnptools")
5d1ade85 4288 (version "0.3.13")
44d10b1f
RW
4289 (source
4290 (origin
4291 (method url-fetch)
5d1ade85 4292 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4293 (sha256
4294 (base32
5d1ade85 4295 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4296 (build-system python-build-system)
4297 (arguments
5d1ade85
RW
4298 `(#:python ,python-2 ; only Python 2.7 is supported
4299 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4300 (propagated-inputs
4301 `(("python2-numpy" ,python2-numpy)
4302 ("python2-scipy" ,python2-scipy)
4303 ("python2-pandas" ,python2-pandas)))
44d10b1f 4304 (native-inputs
5d1ade85 4305 `(("python2-cython" ,python2-cython)))
1b66989b 4306 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4307 (synopsis "Library for reading and manipulating genetic data")
4308 (description
4309 "PySnpTools is a library for reading and manipulating genetic data. It
4310can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4311those files. It can also efficiently manipulate ranges of integers using set
4312operators such as union, intersection, and difference.")
4313 (license license:asl2.0)))
4314
4315(define-public python-scipy
4316 (package
4317 (name "python-scipy")
45256ae0 4318 (version "1.3.2")
44d10b1f
RW
4319 (source
4320 (origin
4321 (method url-fetch)
4322 (uri (pypi-uri "scipy" version))
4323 (sha256
45256ae0 4324 (base32 "192d8dsybvhv19igkrsafbdafx198nz7pibkjgrqjhlr66s3jfd0"))))
44d10b1f
RW
4325 (build-system python-build-system)
4326 (propagated-inputs
4327 `(("python-numpy" ,python-numpy)
4328 ("python-matplotlib" ,python-matplotlib)
4329 ("python-pyparsing" ,python-pyparsing)))
4330 (inputs
4331 `(("lapack" ,lapack)
4332 ("openblas" ,openblas)))
4333 (native-inputs
4334 `(("python-cython" ,python-cython)
4335 ("python-pytest" ,python-pytest)
4336 ("python-sphinx" ,python-sphinx)
4337 ("python-numpydoc" ,python-numpydoc)
4338 ("gfortran" ,gfortran)
4339 ("perl" ,perl)
4340 ("which" ,which)))
4341 (outputs '("out" "doc"))
4342 (arguments
4343 `(#:phases
4344 (modify-phases %standard-phases
4345 (add-after 'unpack 'disable-broken-tests
4346 (lambda _
4347 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4348 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4349 (string-append indent
4350 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4351 m)))
4352 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4353 (("^def test_parallel_threads\\(\\):" m)
4354 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4355 m)))
4356 #t))
4357 (add-before 'build 'configure-openblas
4358 (lambda* (#:key inputs #:allow-other-keys)
4359 (call-with-output-file "site.cfg"
4360 (lambda (port)
4361 (format port
4362 "[blas]
4363libraries = openblas
4364library_dirs = ~a/lib
4365include_dirs = ~a/include
4366
4367# backslash-n to make emacs happy
4368\n[atlas]
4369library_dirs = ~a/lib
4370atlas_libs = openblas
4371"
4372 (assoc-ref inputs "openblas")
4373 (assoc-ref inputs "openblas")
4374 (assoc-ref inputs "openblas"))))
4375 #t))
4376 (add-after 'install 'install-doc
4377 (lambda* (#:key inputs outputs #:allow-other-keys)
4378 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4379 (doc (string-append data "/doc/" ,name "-" ,version))
4380 (html (string-append doc "/html"))
4381 (pyver ,(string-append "PYVER=" (version-major+minor
4382 (package-version python))))
4383 ;; By default it tries to run sphinx-build through the Python
4384 ;; interpreter which won't work with our shell wrapper.
4385 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4386 ;; Make installed package available for building the
4387 ;; documentation
4388 (add-installed-pythonpath inputs outputs)
4389 (with-directory-excursion "doc"
4390 ;; Fix generation of images for mathematical expressions.
4391 (substitute* (find-files "source" "conf\\.py")
4392 (("pngmath_use_preview = True")
4393 "pngmath_use_preview = False"))
4394 (mkdir-p html)
4395 (invoke "make" "html" pyver sphinxbuild)
4396 (with-directory-excursion "build/html"
4397 (for-each (lambda (file)
4398 (let* ((dir (dirname file))
4399 (tgt-dir (string-append html "/" dir)))
4400 (install-file file html)))
4401 (find-files "." ".*")))))
4402 #t))
4403 ;; Tests can only be run after the library has been installed and not
4404 ;; within the source directory.
4405 (delete 'check)
4406 (add-after 'install 'check
4407 (lambda* (#:key inputs outputs #:allow-other-keys)
4408 (add-installed-pythonpath inputs outputs)
4409 (with-directory-excursion "/tmp"
4410 (invoke "python" "-c"
4411 "import scipy; scipy.test(verbose=2)")))))))
4412 (home-page "https://www.scipy.org/")
4413 (synopsis "The Scipy library provides efficient numerical routines")
4414 (description "The SciPy library is one of the core packages that make up
4415the SciPy stack. It provides many user-friendly and efficient numerical
4416routines such as routines for numerical integration and optimization.")
4417 (properties `((python2-variant . ,(delay python2-scipy))))
4418 (license license:bsd-3)))
4419
a35f153d 4420;; Version 1.2.2 is the last version to support Python 2
44d10b1f 4421(define-public python2-scipy
a35f153d
RW
4422 (package
4423 (inherit (package-with-python2
4424 (strip-python2-variant python-scipy)))
4425 (version "1.2.2")
4426 (source
4427 (origin
4428 (method url-fetch)
4429 (uri (pypi-uri "scipy" version))
4430 (sha256
4431 (base32
4432 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
44d10b1f
RW
4433
4434(define-public python-socksipy-branch
4435 (package
4436 (name "python-socksipy-branch")
4437 (version "1.01")
4438 (source
4439 (origin
4440 (method url-fetch)
4441 (uri (pypi-uri "SocksiPy-branch" version))
4442 (sha256
4443 (base32
4444 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4445 (build-system python-build-system)
4446 (arguments
4447 `(#:tests? #f)) ; There are no tests
4448 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4449 (synopsis "Python SOCKS module")
4450 (description
4451 "SocksiPy - A Python SOCKS client module. It provides a
4452socket-like interface that supports connections to any TCP
4453service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4454The original version was developed by Dan Haim, this is a
4455branch created by Mario Vilas to address some open issues,
4456as the original project seems to have been abandoned circa 2007.")
4457 (license license:bsd-3)))
4458
4459(define-public python2-socksipy-branch
4460 (package-with-python2 python-socksipy-branch))
4461
6fcceb23
AG
4462(define-public python-socksipychain
4463 (package
4464 (name "python-socksipychain")
4465 (version "2.0.15")
4466 (source
4467 (origin
4468 (method git-fetch)
4469 (uri (git-reference
4470 (url "https://github.com/pagekite/PySocksipyChain.git")
4471 (commit (string-append "v" version))))
4472 (file-name (git-file-name name version))
4473 (sha256
4474 (base32
4475 "1pkljnh9hfwla8sg7mil4f9zrnsqj0dbhr3crxjw3k8dnjz70dvk"))))
4476 (build-system python-build-system)
4477 (arguments
4478 `(#:tests? #f)) ; Tests try to access the network.
4479 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4480 (synopsis "Python SOCKS module with chained proxies support")
4481 (description
4482 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4483adds support for arbitrary chaining of proxy servers and various modes of
4484TLS/SSL encryption. It was developed for use in PageKite, and also includes
4485a simple netcat replacement with chaining support.")
4486 (license license:bsd-3)))
4487
4488(define-public python2-socksipychain
4489 (package-with-python2 python-socksipychain))
4490
44d10b1f
RW
4491(define-public python-pycodestyle
4492 (package
4493 (name "python-pycodestyle")
d16ef28b 4494 (version "2.5.0")
44d10b1f 4495 (source
ba88eea2
RW
4496 (origin
4497 (method url-fetch)
4498 (uri (pypi-uri "pycodestyle" version))
4499 (sha256
4500 (base32
d16ef28b 4501 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4502 (build-system python-build-system)
4503 (home-page "https://pycodestyle.readthedocs.io/")
4504 (synopsis "Python style guide checker")
4505 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4506Python code against some of the style conventions in
4507@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4508 (license license:expat)))
4509
4510(define-public python2-pycodestyle
4511 (package-with-python2 python-pycodestyle))
4512
4513(define-public python-multidict
4514 (package
4515 (name "python-multidict")
4516 (version "4.2.0")
4517 (source
4518 (origin
4519 (method url-fetch)
4520 (uri (pypi-uri "multidict" version))
4521 (sha256
4522 (base32
4523 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4524 (build-system python-build-system)
4525 (native-inputs
4526 `(("python-pytest" ,python-pytest)
4527 ("python-pytest-runner" ,python-pytest-runner)))
4528 (home-page "https://github.com/aio-libs/multidict/")
4529 (synopsis "Multidict implementation")
4530 (description "Multidict is dict-like collection of key-value pairs
4531where key might be occurred more than once in the container.")
4532 (license license:asl2.0)))
4533
4534(define-public python-orderedmultidict
4535 (package
4536 (name "python-orderedmultidict")
4537 (version "0.7.11")
4538 (source
4539 (origin
4540 (method url-fetch)
4541 (uri (pypi-uri "orderedmultidict" version))
4542 (sha256
4543 (base32
4544 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4545 (build-system python-build-system)
4546 (arguments
4547 `(#:phases
4548 (modify-phases %standard-phases
4549 (add-after 'unpack 'fix-tests
4550 (lambda _
4551 ;; The package uses nosetest for running the tests.
4552 ;; Adding this initfile allows to run the test suite
4553 ;; without requiring nosetest.
d1c4f329
RW
4554 (with-output-to-file "tests/__init__.py" newline)
4555 #t)))))
44d10b1f
RW
4556 (propagated-inputs
4557 `(("python-six" ,python-six)))
4558 (native-inputs
4559 `(("python-pycodestyle" ,python-pycodestyle)))
4560 (home-page "https://github.com/gruns/orderedmultidict")
4561 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4562 (description "This package contains a library for ordered multivalue
4563dictionaries. A multivalue dictionary is a dictionary that can store
4564multiple values for the same key. An ordered multivalue dictionary is a
4565multivalue dictionary that retains the order of insertions and deletions.")
4566 (license license:unlicense)))
4567
4568(define-public python2-orderedmultidict
4569 (package-with-python2 python-orderedmultidict))
4570
4571(define-public python-autopep8
4572 (package
4573 (name "python-autopep8")
4574 (version "1.3.5")
4575 (source
4576 (origin
4577 (method url-fetch)
4578 (uri (pypi-uri "autopep8" version))
4579 (sha256
4580 (base32
4581 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4582 (build-system python-build-system)
4583 (propagated-inputs
4584 `(("python-pycodestyle" ,python-pycodestyle)))
4585 (home-page "https://github.com/hhatto/autopep8")
4586 (synopsis "Format Python code according to the PEP 8 style guide")
4587 (description
4588 "@code{autopep8} automatically formats Python code to conform to
4589the PEP 8 style guide. It uses the pycodestyle utility to determine
4590what parts of the code needs to be formatted. @code{autopep8} is
4591capable of fixing most of the formatting issues that can be reported
4592by pycodestyle.")
4593 (license (license:non-copyleft
4594 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4595
4596(define-public python2-autopep8
4597 (package-with-python2 python-autopep8))
4598
4599(define-public python-distutils-extra
4600 (package
4601 (name "python-distutils-extra")
4602 (version "2.38")
4603 (source
4604 (origin
4605 (method url-fetch)
4606 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4607 version "/+download/python-distutils-extra-"
4608 version ".tar.gz"))
4609 (sha256
4610 (base32
4611 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4612 (build-system python-build-system)
4613 (home-page "https://launchpad.net/python-distutils-extra/")
4614 (synopsis "Enhancements to Python's distutils")
4615 (description
4616 "The python-distutils-extra module enables you to easily integrate
4617gettext support, themed icons, and scrollkeeper-based documentation into
4618Python's distutils.")
4619 (license license:gpl2)))
4620
4621(define-public python2-distutils-extra
4622 (package-with-python2 python-distutils-extra))
4623
4624(define-public python2-elib.intl
4625 (package
4626 (name "python2-elib.intl")
4627 (version "0.0.3")
4628 (source
4629 (origin
4630 ;; This project doesn't tag releases or publish tarballs, so we take
4631 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4632 (method git-fetch)
4633 (uri (git-reference
4634 (url "https://github.com/dieterv/elib.intl.git")
4635 (commit "d09997cfef")))
4636 (file-name (string-append name "-" version "-checkout"))
4637 (sha256
4638 (base32
4639 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4640 (build-system python-build-system)
4641 (arguments
4642 ;; incompatible with Python 3 (exception syntax)
4643 `(#:python ,python-2
4644 #:tests? #f))
4645 (home-page "https://github.com/dieterv/elib.intl")
4646 (synopsis "Enhanced internationalization for Python")
4647 (description
4648 "The elib.intl module provides enhanced internationalization (I18N)
4649services for your Python modules and applications.")
4650 (license license:lgpl3+)))
4651
4652(define-public python-olefile
4653 (package
4654 (name "python-olefile")
5bef0f10 4655 (version "0.46")
44d10b1f
RW
4656 (source
4657 (origin
4658 (method url-fetch)
5bef0f10
MB
4659 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4660 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4661 (file-name (string-append name "-" version ".tar.gz"))
4662 (sha256
4663 (base32
5bef0f10 4664 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4665 (build-system python-build-system)
5bef0f10 4666 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4667 (synopsis "Read and write Microsoft OLE2 files.")
4668 (description
4669 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4670Storage or Compound Document, Microsoft Office). It is an improved version of
4671the OleFileIO module from PIL, the Python Image Library.")
4672 (license license:bsd-3)))
4673
4674(define-public python2-olefile
4675 (package-with-python2 python-olefile))
4676
4677(define-public python-pillow
4678 (package
4679 (name "python-pillow")
0c6de725 4680 (version "6.1.0")
44d10b1f
RW
4681 (source
4682 (origin
4683 (method url-fetch)
4684 (uri (pypi-uri "Pillow" version))
4685 (sha256
4686 (base32
0c6de725 4687 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
44d10b1f
RW
4688 (build-system python-build-system)
4689 (native-inputs
4690 `(("python-pytest" ,python-pytest)))
4691 (inputs
4692 `(("freetype" ,freetype)
4693 ("lcms" ,lcms)
4694 ("zlib" ,zlib)
4695 ("libjpeg" ,libjpeg)
4696 ("openjpeg" ,openjpeg)
4697 ("libtiff" ,libtiff)
4698 ("libwebp" ,libwebp)))
4699 (propagated-inputs
4700 `(("python-olefile" ,python-olefile)))
4701 (arguments
4702 `(#:phases
4703 (modify-phases %standard-phases
4704 (add-after 'unpack 'patch-ldconfig
4705 (lambda _
4706 (substitute* "setup.py"
4707 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4708 (delete 'check) ; We must run checks after python-pillow is installed.
4709 (add-after 'install 'check-installed
4710 (lambda* (#:key outputs inputs #:allow-other-keys)
4711 (begin
4712 (setenv "HOME" (getcwd))
4713 ;; Make installed package available for running the tests.
4714 (add-installed-pythonpath inputs outputs)
4715 (invoke "python" "selftest.py" "--installed")
4716 (invoke "python" "-m" "pytest" "-vv")))))))
4717 (home-page "https://python-pillow.org")
4718 (synopsis "Fork of the Python Imaging Library")
4719 (description
4720 "The Python Imaging Library adds image processing capabilities to your
4721Python interpreter. This library provides extensive file format support, an
4722efficient internal representation, and fairly powerful image processing
4723capabilities. The core image library is designed for fast access to data
4724stored in a few basic pixel formats. It should provide a solid foundation for
4725a general image processing tool.")
4726 (license (license:x11-style
4727 "http://www.pythonware.com/products/pil/license.htm"
4728 "The PIL Software License"))))
4729
4730(define-public python2-pillow
4731 (package-with-python2 python-pillow))
4732
4733(define-public python-pycparser
4734 (package
4735 (name "python-pycparser")
c6c0940e 4736 (version "2.19")
44d10b1f
RW
4737 (source
4738 (origin
4739 (method url-fetch)
4740 (uri (pypi-uri "pycparser" version))
4741 (sha256
4742 (base32
c6c0940e 4743 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4744 (outputs '("out" "doc"))
4745 (build-system python-build-system)
4746 (native-inputs
4747 `(("pkg-config" ,pkg-config)))
4748 (arguments
4749 `(#:phases
4750 (modify-phases %standard-phases
4751 (replace 'check
4752 (lambda _
4753 (with-directory-excursion "tests"
acb75c03
RW
4754 (invoke "python" "all_tests.py"))
4755 #t))
44d10b1f
RW
4756 (add-after 'install 'install-doc
4757 (lambda* (#:key outputs #:allow-other-keys)
4758 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4759 (doc (string-append data "/doc/" ,name "-" ,version))
4760 (examples (string-append doc "/examples")))
4761 (mkdir-p examples)
4762 (for-each (lambda (file)
4763 (copy-file (string-append "." file)
4764 (string-append doc file)))
4765 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4766 (copy-recursively "examples" examples)
4767 #t))))))
44d10b1f
RW
4768 (home-page "https://github.com/eliben/pycparser")
4769 (synopsis "C parser in Python")
4770 (description
4771 "Pycparser is a complete parser of the C language, written in pure Python
4772using the PLY parsing library. It parses C code into an AST and can serve as
4773a front-end for C compilers or analysis tools.")
4774 (license license:bsd-3)))
4775
4776(define-public python2-pycparser
4777 (package-with-python2 python-pycparser))
4778
4779(define-public python-pywavelets
4780 (package
4781 (name "python-pywavelets")
4782 (version "1.0.1")
4783 (home-page "https://github.com/PyWavelets/pywt")
4784 (source (origin
4785 (method url-fetch)
4786 (uri (pypi-uri "PyWavelets" version))
4787 (sha256
4788 (base32
4789 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4790 (build-system python-build-system)
4791 (arguments
4792 '(#:modules ((ice-9 ftw)
4793 (srfi srfi-1)
4794 (srfi srfi-26)
4795 (guix build utils)
4796 (guix build python-build-system))
4797 #:phases (modify-phases %standard-phases
4798 (replace 'check
4799 (lambda _
4800 (let ((cwd (getcwd))
4801 (libdir (find (cut string-prefix? "lib." <>)
4802 (scandir "build"))))
4803 (with-directory-excursion (string-append cwd "/build/" libdir)
4804 (invoke "nosetests" "-v" "."))))))))
4805 (native-inputs
4806 `(("python-matplotlib" ,python-matplotlib) ;for tests
4807 ("python-nose" ,python-nose)))
4808 (propagated-inputs
4809 `(("python-numpy" ,python-numpy)))
4810 (synopsis "Wavelet transforms in Python")
4811 (description
4812 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4813mathematical basis functions that are localized in both time and frequency.
4814Wavelet transforms are time-frequency transforms employing wavelets. They are
4815similar to Fourier transforms, the difference being that Fourier transforms are
4816localized only in frequency instead of in time and frequency.")
4817 (license license:expat)))
4818
4819(define-public python2-pywavelets
4820 (package-with-python2 python-pywavelets))
4821
4822(define-public python-xcffib
4823 (package
4824 (name "python-xcffib")
4825 (version "0.6.0")
4826 (source
4827 (origin
4828 (method url-fetch)
4829 (uri (pypi-uri "xcffib" version))
4830 (sha256
4831 (base32
4832 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4833 (build-system python-build-system)
4834 (inputs
4835 `(("libxcb" ,libxcb)))
4836 (propagated-inputs
4837 `(("python-cffi" ,python-cffi) ; used at run time
4838 ("python-six" ,python-six)))
4839 (arguments
4840 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4841 #:tests? #f
4842 #:phases
4843 (modify-phases %standard-phases
4844 (add-after 'unpack 'fix-libxcb-path
4845 (lambda* (#:key inputs #:allow-other-keys)
4846 (let ((libxcb (assoc-ref inputs "libxcb")))
4847 (substitute* '("xcffib/__init__.py")
4848 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4849 #t)))
4850 (add-after 'install 'install-doc
4851 (lambda* (#:key outputs #:allow-other-keys)
4852 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4853 "/doc/" ,name "-" ,version)))
4854 (mkdir-p doc)
4855 (copy-file "README.md"
4856 (string-append doc "/README.md"))
4857 #t))))))
4858 (home-page "https://github.com/tych0/xcffib")
4859 (synopsis "XCB Python bindings")
4860 (description
4861 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4862support for Python 3 and PyPy. It is based on cffi.")
4863 (license license:expat)))
4864
4865(define-public python2-xcffib
4866 (package-with-python2 python-xcffib))
4867
4868(define-public python-cairocffi
4869 (package
4870 (name "python-cairocffi")
4871 (version "0.9.0")
4872 (source
4873 (origin
4874 (method url-fetch)
4875 (uri (pypi-uri "cairocffi" version))
4876 (sha256
4877 (base32
4878 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4879 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4880 (build-system python-build-system)
4881 (outputs '("out" "doc"))
4882 (inputs
4883 `(("glib" ,glib)
4884 ("gtk+" ,gtk+)
4885 ("gdk-pixbuf" ,gdk-pixbuf)
4886 ("cairo" ,cairo)
4887 ("pango" ,pango)))
4888 (native-inputs
4889 `(("pkg-config" ,pkg-config)
4890 ("python-pytest" ,python-pytest)
4891 ("python-pytest-cov" ,python-pytest-cov)
4892 ("python-pytest-runner" ,python-pytest-runner)
4893 ("python-sphinx" ,python-sphinx)
4894 ("python-docutils" ,python-docutils)))
4895 (propagated-inputs
4896 `(("python-xcffib" ,python-xcffib))) ; used at run time
4897 (arguments
4898 `(#:phases
4899 (modify-phases %standard-phases
4900 (add-after 'unpack 'patch-paths
4901 (lambda* (#:key inputs outputs #:allow-other-keys)
4902 (substitute* (find-files "." "\\.py$")
4903 (("dlopen\\(ffi, 'cairo'")
4904 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4905 "/lib/libcairo.so.2'"))
4906 (("dlopen\\(ffi, 'gdk-3'")
4907 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4908 "/lib/libgtk-3.so.0'"))
4909 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4910 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4911 "/lib/libgdk_pixbuf-2.0.so.0'"))
4912 (("dlopen\\(ffi, 'glib-2.0'")
4913 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4914 "/lib/libglib-2.0.so.0'"))
4915 (("dlopen\\(ffi, 'gobject-2.0'")
4916 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4917 "/lib/libgobject-2.0.so.0'"))
4918 (("dlopen\\(ffi, 'pangocairo-1.0'")
4919 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4920 "/lib/libpangocairo-1.0.so.0'"))
4921 (("dlopen\\(ffi, 'pango-1.0'")
4922 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4923 "/lib/libpango-1.0.so.0'")))
4924 #t))
4925 (add-after 'install 'install-doc
4926 (lambda* (#:key inputs outputs #:allow-other-keys)
4927 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4928 (doc (string-append data "/doc/" ,name "-" ,version))
4929 (html (string-append doc "/html")))
4930 (setenv "LD_LIBRARY_PATH"
4931 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4932 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4933 (setenv "LANG" "en_US.UTF-8")
4934 (mkdir-p html)
4935 (for-each (lambda (file)
4936 (copy-file (string-append "." file)
4937 (string-append doc file)))
4938 '("/README.rst" "/CHANGES" "/LICENSE"))
4939 (system* "python" "setup.py" "build_sphinx")
4940 (copy-recursively "docs/_build/html" html)
4941 #t))))))
4942 (home-page "https://github.com/Kozea/cairocffi")
4943 (synopsis "Python bindings and object-oriented API for Cairo")
4944 (description
4945 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4946Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4947graphics library with support for multiple backends including image buffers,
4948PNG, PostScript, PDF, and SVG file output.")
4949 (license license:bsd-3)))
4950
4951(define-public python2-cairocffi
4952 (package-with-python2 python-cairocffi))
4953
4954(define-public python-decorator
4955 (package
4956 (name "python-decorator")
4957 (version "4.3.0")
4958 (source
4959 (origin
4960 (method url-fetch)
4961 (uri (pypi-uri "decorator" version))
4962 (sha256
4963 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4964 (build-system python-build-system)
4965 (home-page "https://pypi.python.org/pypi/decorator/")
4966 (synopsis "Python module to simplify usage of decorators")
4967 (description
4968 "The aim of the decorator module is to simplify the usage of decorators
4969for the average programmer, and to popularize decorators usage giving examples
4970of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4971etc. The core of this module is a decorator factory.")
4972 (license license:expat)))
4973
4974(define-public python2-decorator
4975 (package-with-python2 python-decorator))
4976
4977(define-public python-drmaa
4978 (package
4979 (name "python-drmaa")
4980 (version "0.7.7")
4981 (source
4982 (origin
4983 (method url-fetch)
4984 (uri (pypi-uri "drmaa" version))
4985 (sha256
4986 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4987 (build-system python-build-system)
4988 ;; The test suite requires libdrmaa which is provided by the cluster
4989 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4990 ;; should be set to the path of the libdrmaa library.
4991 (arguments '(#:tests? #f))
4992 (native-inputs
4993 `(("python-nose" ,python-nose)))
4994 (home-page "https://pypi.python.org/pypi/drmaa")
4995 (synopsis "Python bindings for the DRMAA library")
4996 (description
4997 "A Python package for Distributed Resource Management (DRM) job
4998submission and control. This package is an implementation of the DRMAA 1.0
4999Python language binding specification.")
5000 (license license:bsd-3)))
5001
5002(define-public python2-drmaa
5003 (package-with-python2 python-drmaa))
5004
5005(define-public python-grako
5006 (package
5007 (name "python-grako")
5008 (version "3.99.9")
5009 (source
5010 (origin
5011 (method url-fetch)
5012 (uri
5013 (pypi-uri "grako" version ".zip"))
5014 (sha256
5015 (base32
5016 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5017 (build-system python-build-system)
5018 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5019 (native-inputs
5020 `(("unzip" ,unzip)
5021 ("python-pytest" ,python-pytest)
5022 ("python-pytest-runner" ,python-pytest-runner)))
5023 (home-page "https://bitbucket.org/neogeny/grako")
5024 (synopsis "EBNF parser generator")
5025 (description
5026 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5027memoizing PEG/Packrat parser in Python.")
5028 (license license:bsd-3)))
5029
5030(define-public python2-grako
5031 (package-with-python2 python-grako))
5032
5033(define-public python-gridmap
5034 (package
5035 (name "python-gridmap")
5036 (version "0.13.0")
5037 (source
5038 (origin
768fea0f
TGR
5039 (method git-fetch)
5040 (uri (git-reference
5041 (url "https://github.com/pygridtools/gridmap.git")
5042 (commit (string-append "v" version))))
5043 (file-name (git-file-name name version))
44d10b1f 5044 (sha256
768fea0f 5045 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
5046 (build-system python-build-system)
5047 (arguments
5048 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5049 (propagated-inputs
5050 `(("python-psutil" ,python-psutil)
5051 ("python-drmaa" ,python-drmaa)
5052 ("python-pyzmq" ,python-pyzmq)))
5053 (home-page "https://github.com/pygridtools/gridmap")
5054 (synopsis "Create jobs on a cluster directly from Python")
5055 (description
5056 "Gridmap is a Python package to allow you to easily create jobs on the
5057cluster directly from Python. You can directly map Python functions onto the
5058cluster without needing to write any wrapper code yourself.")
5059 (license license:gpl3+)))
5060
5061(define-public python2-gridmap
5062 (package-with-python2 python-gridmap))
5063
5064(define-public python-honcho
5065 (package
5066 (name "python-honcho")
5067 (version "1.0.1")
5068 (source
5069 (origin
8524d130
TGR
5070 (method git-fetch)
5071 (uri (git-reference
5072 (url "https://github.com/nickstenning/honcho.git")
5073 (commit (string-append "v" version))))
5074 (file-name (git-file-name name version))
44d10b1f 5075 (sha256
8524d130 5076 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
5077 (build-system python-build-system)
5078 (native-inputs
5079 `(("python-pytest" ,python-pytest)
5080 ("python-mock" ,python-mock)
5081 ("python-tox" ,python-tox)
5082 ("which" ,which))) ;for tests
5083 (propagated-inputs
5084 `(("python-jinja2" ,python-jinja2)))
5085 (arguments
5086 `(#:phases
5087 (modify-phases %standard-phases
5088 (delete 'check)
5089 (add-after 'install 'check
5090 (lambda* (#:key outputs inputs #:allow-other-keys)
5091 ;; fix honcho path in testsuite
5092 (substitute* "tests/conftest.py"
5093 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5094 "/bin/honcho" "'")))
5095 ;; It's easier to run tests after install.
5096 ;; Make installed package available for running the tests
5097 (add-installed-pythonpath inputs outputs)
95b707fb 5098 (invoke "py.test" "-v"))))))
44d10b1f
RW
5099 (home-page "https://github.com/nickstenning/honcho")
5100 (synopsis "Manage Procfile-based applications")
5101 (description
5102 "A Procfile is a file which describes how to run an application
50fceab0 5103consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
5104The output of all running processes is collected by honcho and
5105displayed.")
5106 (license license:expat)))
5107
5108(define-public python2-honcho
5109 (package-with-python2 python-honcho))
5110
5111(define-public python-pexpect
5112 (package
5113 (name "python-pexpect")
5114 (version "4.6.0")
5115 (source
5116 (origin
5117 (method url-fetch)
5118 (uri (pypi-uri "pexpect" version))
5119 (sha256
5120 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5121 (build-system python-build-system)
5122 (arguments
5123 `(#:phases
5124 (modify-phases %standard-phases
5125 (add-before 'check 'prepare-tests
5126 (lambda _
5127 (substitute* (find-files "tests")
5128 (("/bin/ls") (which "ls"))
5129 (("/bin/echo") (which "echo"))
5130 (("/bin/which") (which "which"))
5131 ;; Many tests try to use the /bin directory which
5132 ;; is not present in the build environment.
5133 ;; Use one that's non-empty and unlikely to change.
5134 (("/bin'") "/dev'"))
5135 ;; XXX: Socket connection test gets "Connection reset by peer".
5136 ;; Why does it not work? Delete for now.
5137 (delete-file "tests/test_socket.py")
5138 #t))
5139 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5140 (native-inputs
5141 `(("python-nose" ,python-nose)
5142 ("python-pytest" ,python-pytest)
5143 ("man-db" ,man-db)
5144 ("which" ,which)
5145 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5146 (propagated-inputs
5147 `(("python-ptyprocess" ,python-ptyprocess)))
5148 (home-page "http://pexpect.readthedocs.org/")
5149 (synopsis "Controlling interactive console applications")
5150 (description
5151 "Pexpect is a pure Python module for spawning child applications;
5152controlling them; and responding to expected patterns in their output.
5153Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5154child application and control it as if a human were typing commands.")
5155 (license license:isc)))
5156
5157(define-public python2-pexpect
5158 (package-with-python2 python-pexpect))
5159
5160(define-public python-setuptools-scm
5161 (package
5162 (name "python-setuptools-scm")
85092643 5163 (version "3.2.0")
44d10b1f
RW
5164 (source (origin
5165 (method url-fetch)
5166 (uri (pypi-uri "setuptools_scm" version))
5167 (sha256
5168 (base32
85092643 5169 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
5170 (build-system python-build-system)
5171 (home-page "https://github.com/pypa/setuptools_scm/")
5172 (synopsis "Manage Python package versions in SCM metadata")
5173 (description
5174 "Setuptools_scm handles managing your Python package versions in
5175@dfn{software configuration management} (SCM) metadata instead of declaring
5176them as the version argument or in a SCM managed file.")
5177 (license license:expat)))
5178
a0b2accf
MO
5179;; Needed by python-lazy-object-proxy, remove on next update cycle.
5180(define-public python-setuptools-scm-3.3
5181 (package
5182 (inherit python-setuptools-scm)
5183 (version "3.3.3")
5184 (source (origin
5185 (method url-fetch)
5186 (uri (pypi-uri "setuptools_scm" version))
5187 (sha256
5188 (base32
5189 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5190
44d10b1f
RW
5191(define-public python2-setuptools-scm
5192 (package-with-python2 python-setuptools-scm))
5193
bb74ea09
RW
5194(define-public python-pathlib2
5195 (package
5196 (name "python-pathlib2")
5197 (version "2.3.3")
5198 (source
5199 (origin
5200 (method url-fetch)
5201 (uri (pypi-uri "pathlib2" version))
5202 (sha256
5203 (base32
5204 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5205 (build-system python-build-system)
5206 (propagated-inputs
5207 `(("python-scandir" ,python-scandir)
5208 ("python-six" ,python-six)))
5209 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 5210 (synopsis "Object-oriented file system paths")
bb74ea09
RW
5211 (description "The goal of pathlib2 is to provide a backport of the
5212standard @code{pathlib} module which tracks the standard library module, so
5213all the newest features of the standard @code{pathlib} can be used also on
5214older Python versions.")
5215 (license license:expat)))
5216
15b65617
RW
5217(define-public python-importlib-metadata
5218 (package
5219 (name "python-importlib-metadata")
0af697d9 5220 (version "0.23")
15b65617
RW
5221 (source
5222 (origin
5223 (method url-fetch)
5224 (uri (pypi-uri "importlib_metadata" version))
5225 (sha256
0af697d9 5226 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
15b65617
RW
5227 (build-system python-build-system)
5228 (propagated-inputs
5229 `(("python-configparser" ,python-configparser)
5230 ("python-contextlib2" ,python-contextlib2)
5231 ("python-docutils" ,python-docutils)
5232 ("python-pathlib2" ,python-pathlib2)
5233 ("python-rst.linker" ,python-rst.linker)
5234 ("python-zipp" ,python-zipp)))
5235 (native-inputs
5236 `(("python-setuptools-scm" ,python-setuptools-scm)
5237 ("python-sphinx" ,python-sphinx)))
5238 (home-page "https://importlib-metadata.readthedocs.io/")
5239 (synopsis "Read metadata from Python packages")
5240 (description
5241 "@code{importlib_metadata} is a library which provides an API for
5242accessing an installed Python package's metadata, such as its entry points or
5243its top-level name. This functionality intends to replace most uses of
5244@code{pkg_resources} entry point API and metadata API. Along with
5245@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5246need to use the older and less efficient @code{pkg_resources} package.")
5247 (license license:asl2.0)))
5248
37c173d1
RW
5249(define-public python-jaraco-packaging
5250 (package
5251 (name "python-jaraco-packaging")
5252 (version "6.1")
5253 (source
5254 (origin
5255 (method url-fetch)
5256 (uri (pypi-uri "jaraco.packaging" version))
5257 (sha256
5258 (base32
5259 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5260 (build-system python-build-system)
5261 (propagated-inputs
5262 `(("python-pytest" ,python-pytest)
5263 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5264 ("python-pytest-flake8" ,python-pytest-flake8)
5265 ("python-rst.linker" ,python-rst.linker)
5266 ("python-setuptools" ,python-setuptools)
5267 ("python-setuptools-scm" ,python-setuptools-scm)
5268 ("python-six" ,python-six)
5269 ("python-sphinx" ,python-sphinx)))
5270 (home-page "https://github.com/jaraco/jaraco.packaging")
5271 (synopsis "Tools to supplement packaging Python releases")
5272 (description
5273 "This package provides various tools to supplement packaging Python
5274releases.")
5275 (license license:expat)))
5276
44d10b1f
RW
5277(define-public python-pathpy
5278 (package
5279 (name "python-pathpy")
a3dd8871 5280 (version "11.5.1")
44d10b1f
RW
5281 (source
5282 (origin
5283 (method url-fetch)
5284 (uri (pypi-uri "path.py" version))
5285 (sha256
a3dd8871 5286 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5287 (outputs '("out" "doc"))
44d10b1f
RW
5288 (build-system python-build-system)
5289 (propagated-inputs
01a53e0b
MC
5290 `(("python-appdirs" ,python-appdirs)
5291 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5292 (native-inputs
5293 `(("python-setuptools-scm" ,python-setuptools-scm)
5294 ("python-sphinx" ,python-sphinx)
5295 ("python-rst.linker" ,python-rst.linker)
5296 ("python-pytest" ,python-pytest)
49ad11e9
RW
5297 ("python-pytest-runner" ,python-pytest-runner)
5298 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5299 (arguments
49ad11e9
RW
5300 `(#:phases
5301 (modify-phases %standard-phases
5302 (add-after 'build 'build-doc
5303 (lambda _
5304 (setenv "LANG" "en_US.UTF-8")
5305 (invoke "python" "setup.py" "build_sphinx")))
5306 (add-after 'install 'install-doc
5307 (lambda* (#:key outputs #:allow-other-keys)
5308 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5309 (doc (string-append data "/doc/" ,name "-" ,version))
5310 (html (string-append doc "/html")))
5311 (mkdir-p html)
5312 (for-each (lambda (file)
5313 (copy-file file (string-append doc "/" file)))
5314 '("README.rst" "CHANGES.rst"))
5315 (copy-recursively "build/sphinx/html" html)
5316 #t)))
5317 (replace 'check
5318 (lambda _
5319 ;; The import time test aborts if an import takes longer than
5320 ;; 100ms. It may very well take a little longer than that.
5321 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5322 (home-page "https://github.com/jaraco/path.py")
5323 (synopsis "Python module wrapper for built-in os.path")
5324 (description
5325 "@code{path.py} implements path objects as first-class entities, allowing
5326common operations on files to be invoked on those path objects directly.")
5327 (license license:expat)))
5328
5329(define-public python2-pathpy
5330 (package-with-python2 python-pathpy))
5331
5332(define-public python-simplegeneric
5333 (package
5334 (name "python-simplegeneric")
5335 (version "0.8.1")
5336 (source
5337 (origin
5338 (method url-fetch)
6c8c3980 5339 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5340 (sha256
5341 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5342 (build-system python-build-system)
5343 (native-inputs
5344 `(("unzip" ,unzip)))
5345 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5346 (synopsis "Python module for simple generic functions")
5347 (description
5348 "The simplegeneric module lets you define simple single-dispatch generic
5349functions, akin to Python’s built-in generic functions like @code{len()},
5350@code{iter()} and so on. However, instead of using specially-named methods,
5351these generic functions use simple lookup tables, akin to those used by
5352e.g. @code{pickle.dump()} and other generic functions found in the Python
5353standard library.")
5354 (license license:zpl2.1)))
5355
5356(define-public python2-simplegeneric
5357 (package-with-python2 python-simplegeneric))
5358
5359(define-public python-ipython-genutils
5360 ;; TODO: This package is retired, check if can be removed, see description.
5361 (package
5362 (name "python-ipython-genutils")
5363 (version "0.1.0")
5364 (source
5365 (origin
5366 (method url-fetch)
c9671d4b 5367 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5368 (sha256
5369 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5370 (build-system python-build-system)
5371 (arguments `(#:tests? #f)) ; no tests
5372 (home-page "https://ipython.org")
5373 (synopsis "Vestigial utilities from IPython")
5374 (description
5375 "This package provides retired utilities from IPython. No packages
5376outside IPython/Jupyter should depend on it.
5377
5378This package shouldn't exist. It contains some common utilities shared by
5379Jupyter and IPython projects during The Big Split. As soon as possible, those
5380packages will remove their dependency on this, and this package will go
5381away.")
5382 (license license:bsd-3)))
5383
5384(define-public python2-ipython-genutils
5385 (package-with-python2 python-ipython-genutils))
5386
5387(define-public python-traitlets
5388 (package
5389 (name "python-traitlets")
ac5e205a 5390 (version "4.3.3")
44d10b1f
RW
5391 (source
5392 (origin
5393 (method url-fetch)
5394 (uri (pypi-uri "traitlets" version))
5395 (sha256
5396 (base32
ac5e205a 5397 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5398 (build-system python-build-system)
5399 (arguments
5400 `(#:phases
5401 (modify-phases %standard-phases
5402 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5403 (propagated-inputs
5404 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5405 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5406 (native-inputs
5407 `(("python-pytest" ,python-pytest)))
5408 (properties `((python2-variant . ,(delay python2-traitlets))))
5409 (home-page "https://ipython.org")
5410 (synopsis "Configuration system for Python applications")
5411 (description
5412 "Traitlets is a framework that lets Python classes have attributes with
5413type checking, dynamically calculated default values, and ‘on change’
5414callbacks. The package also includes a mechanism to use traitlets for
5415configuration, loading values from files or from command line arguments. This
5416is a distinct layer on top of traitlets, so you can use traitlets in your code
5417without using the configuration machinery.")
5418 (license license:bsd-3)))
5419
5420(define-public python2-traitlets
5421 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5422 (package
5423 (inherit traitlets)
5424 (propagated-inputs
5425 `(("python2-enum34" ,python2-enum34)
5426 ,@(package-propagated-inputs traitlets))))))
5427
5428(define-public python-jupyter-core
5429 (package
5430 (name "python-jupyter-core")
5431 (version "4.4.0")
5432 (source
5433 (origin
5434 (method url-fetch)
5435 (uri (string-append (pypi-uri "jupyter_core" version)))
5436 (sha256
5437 (base32
5438 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5439 (build-system python-build-system)
5440 ;; FIXME: not sure how to run the tests
5441 (arguments `(#:tests? #f))
5442 (propagated-inputs
5443 `(("python-traitlets" ,python-traitlets)))
5444 (home-page "http://jupyter.org/")
5445 (synopsis "Jupyter base package")
5446 (description
5447 "Jupyter core is the base package on which Jupyter projects rely.")
5448 (license license:bsd-3)))
5449
5450(define-public python2-jupyter-core
5451 (package-with-python2 python-jupyter-core))
5452
5453(define-public python-jupyter-client
5454 (package
5455 (name "python-jupyter-client")
5456 (version "5.2.4")
5457 (source
5458 (origin
5459 (method url-fetch)
5460 (uri (pypi-uri "jupyter_client" version))
5461 (sha256
5462 (base32
5463 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5464 (build-system python-build-system)
5465 ;; Tests fail because of missing native python kernel which I assume is
5466 ;; provided by the ipython package, which we cannot use because it would
5467 ;; cause a dependency cycle.
ddc586ea
LC
5468 (arguments
5469 `(#:tests? #f
5470
5471 #:phases (modify-phases %standard-phases
5472 (add-after 'unpack 'set-tool-file-names
5473 (lambda* (#:key inputs #:allow-other-keys)
5474 (let ((iproute (assoc-ref inputs "iproute")))
5475 (substitute* "jupyter_client/localinterfaces.py"
5476 (("'ip'")
5477 (string-append "'" iproute "/sbin/ip'")))
5478 #t))))))
5479 (inputs
5480 `(("iproute" ,iproute)))
44d10b1f
RW
5481 (propagated-inputs
5482 `(("python-pyzmq" ,python-pyzmq)
5483 ("python-traitlets" ,python-traitlets)
5484 ("python-jupyter-core" ,python-jupyter-core)))
5485 (home-page "http://jupyter.org/")
5486 (synopsis "Jupyter protocol implementation and client libraries")
5487 (description
5488 "The @code{jupyter_client} package contains the reference implementation
5489of the Jupyter protocol. It also provides client and kernel management APIs
5490for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5491installing @code{kernelspec}s for use with Jupyter frontends.")
5492 (license license:bsd-3)))
5493
5494(define-public python2-jupyter-client
5495 (package-with-python2 python-jupyter-client))
5496
5497(define-public python-ipykernel
5498 (package
5499 (name "python-ipykernel")
08d0a355 5500 (version "5.1.3")
44d10b1f
RW
5501 (source
5502 (origin
5503 (method url-fetch)
5504 (uri (pypi-uri "ipykernel" version))
5505 (sha256
08d0a355 5506 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5507 (build-system python-build-system)
5508 (arguments
5509 `(#:phases
5510 (modify-phases %standard-phases
5511 (replace 'check
5512 (lambda _
5513 (setenv "HOME" "/tmp")
5514 (invoke "pytest" "-v")
aa856d02
LC
5515 #t))
5516 (add-after 'install 'set-python-file-name
5517 (lambda* (#:key outputs #:allow-other-keys)
5518 ;; Record the absolute file name of the 'python' executable in
5519 ;; 'kernel.json'.
5520 (let ((out (assoc-ref outputs "out")))
5521 (substitute* (string-append out "/share/jupyter"
5522 "/kernels/python3/kernel.json")
5523 (("\"python\"")
5524 (string-append "\"" (which "python") "\"")))
5525 #t))))))
44d10b1f
RW
5526 (propagated-inputs
5527 `(("python-ipython" ,python-ipython)
5528 ;; imported at runtime during connect
5529 ("python-jupyter-client" ,python-jupyter-client)))
5530 (native-inputs
08d0a355
TGR
5531 `(("python-flaky" ,python-flaky)
5532 ("python-nose" ,python-nose)
5533 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5534 (home-page "https://ipython.org")
5535 (synopsis "IPython Kernel for Jupyter")
5536 (description
5537 "This package provides the IPython kernel for Jupyter.")
5538 (license license:bsd-3)))
5539
0f378947 5540;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5541(define-public python2-ipykernel
0f378947
RW
5542 (package
5543 (name "python2-ipykernel")
5544 (version "5.1.0")
5545 (source
5546 (origin
5547 (method url-fetch)
5548 (uri (pypi-uri "ipykernel" version))
5549 (sha256
5550 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5551 (build-system python-build-system)
5552 (arguments
5553 `(#:python ,python-2
5554 #:phases
5555 (modify-phases %standard-phases
5556 (replace 'check
5557 (lambda _
5558 (setenv "HOME" "/tmp")
5559 (invoke "pytest" "-v")
5560 #t)))))
5561 (propagated-inputs
5562 `(("python2-ipython" ,python2-ipython)
5563 ;; imported at runtime during connect
5564 ("python2-jupyter-client" ,python2-jupyter-client)))
5565 (native-inputs
5566 `(("python2-pytest" ,python2-pytest)
5567 ("python2-nose" ,python2-nose)))
5568 (home-page "https://ipython.org")
5569 (synopsis "IPython Kernel for Jupyter")
5570 (description
5571 "This package provides the IPython kernel for Jupyter.")
5572 (license license:bsd-3)))
44d10b1f 5573
966aa714
AE
5574(define-public python-pari-jupyter
5575 (package
5576 (name "python-pari-jupyter")
5577 (version "1.3.2")
5578 (source
5579 (origin
5580 (method url-fetch)
5581 (uri (pypi-uri "pari_jupyter" version))
5582 (sha256
5583 (base32
5584 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5585 (build-system python-build-system)
5586 (propagated-inputs
5587 `(("python-ipykernel" ,python-ipykernel)))
5588 (inputs
5589 `(("pari-gp" ,pari-gp)
5590 ("readline" ,readline)))
5591 (arguments
5592 `(#:tests? #f)) ; no test suite
5593 (home-page
5594 "https://github.com/jdemeyer/pari_jupyter")
5595 (synopsis "A Jupyter kernel for PARI/GP")
5596 (description "The package provides a PARI/GP kernel for Jupyter.")
5597 (license license:gpl3+)))
5598
dede052a
RW
5599(define-public python-backcall
5600 (package
5601 (name "python-backcall")
5602 (version "0.1.0")
5603 (source
5604 (origin
5605 (method url-fetch)
5606 (uri (pypi-uri "backcall" version))
5607 (sha256
5608 (base32
5609 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5610 (build-system python-build-system)
5611 (home-page "https://github.com/takluyver/backcall/")
5612 (synopsis "Specifications for callback functions passed in to an API")
5613 (description
5614 "If your code lets other people supply callback functions, it's important
5615to specify the function signature you expect, and check that functions support
5616that. Adding extra parameters later would break other peoples code unless
5617you're careful. The @code{backcall} package provides a way of specifying the
5618callback signature using a prototype function.")
5619 (license license:bsd-3)))
5620
44d10b1f
RW
5621;; This is the latest release of the LTS version of ipython with support for
5622;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5623;; dropped support for Python 2.7.
5624(define-public python2-ipython
44d10b1f 5625 (package
8b5f756c 5626 (name "python2-ipython")
44d10b1f
RW
5627 (version "5.8.0")
5628 (source
5629 (origin
5630 (method url-fetch)
5631 (uri (pypi-uri "ipython" version ".tar.gz"))
5632 (sha256
5633 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5634 (build-system python-build-system)
44d10b1f 5635 (propagated-inputs
8b5f756c
RW
5636 `(("python2-backports-shutil-get-terminal-size"
5637 ,python2-backports-shutil-get-terminal-size)
5638 ("python2-pathlib2" ,python2-pathlib2)
5639 ("python2-pyzmq" ,python2-pyzmq)
5640 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5641 ("python2-terminado" ,python2-terminado)
5642 ("python2-matplotlib" ,python2-matplotlib)
5643 ("python2-numpy" ,python2-numpy)
5644 ("python2-numpydoc" ,python2-numpydoc)
5645 ("python2-jinja2" ,python2-jinja2)
5646 ("python2-mistune" ,python2-mistune)
5647 ("python2-pexpect" ,python2-pexpect)
5648 ("python2-pickleshare" ,python2-pickleshare)
5649 ("python2-simplegeneric" ,python2-simplegeneric)
5650 ("python2-jsonschema" ,python2-jsonschema)
5651 ("python2-traitlets" ,python2-traitlets)
5652 ("python2-nbformat" ,python2-nbformat)
5653 ("python2-pygments" ,python2-pygments)))
5654 (inputs
5655 `(("readline" ,readline)
5656 ("which" ,which)))
5657 (native-inputs
5658 `(("graphviz" ,graphviz)
5659 ("pkg-config" ,pkg-config)
5660 ("python2-requests" ,python2-requests) ;; for tests
5661 ("python2-testpath" ,python2-testpath)
5662 ("python2-mock" ,python2-mock)
5663 ("python2-nose" ,python2-nose)))
5664 (arguments
5665 `(#:python ,python-2
5666 #:phases
5667 (modify-phases %standard-phases
5668 (add-before 'check 'delete-broken-tests
5669 (lambda* (#:key inputs #:allow-other-keys)
5670 ;; These tests throw errors for unknown reasons.
5671 (delete-file "IPython/core/tests/test_profile.py")
5672 (delete-file "IPython/core/tests/test_interactiveshell.py")
5673 (delete-file "IPython/core/tests/test_magic.py")
5674 #t)))))
5675 (home-page "https://ipython.org")
5676 (synopsis "IPython is a tool for interactive computing in Python")
5677 (description
5678 "IPython provides a rich architecture for interactive computing with:
5679Powerful interactive shells, a browser-based notebook, support for interactive
5680data visualization, embeddable interpreters and tools for parallel
5681computing.")
5682 (license license:bsd-3)))
5683
5684(define-public python-ipython
5685 (package
5686 (name "python-ipython")
ee515773 5687 (version "7.9.0")
8b5f756c
RW
5688 (source
5689 (origin
5690 (method url-fetch)
5691 (uri (pypi-uri "ipython" version ".tar.gz"))
5692 (sha256
ee515773 5693 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5694 (build-system python-build-system)
5695 (propagated-inputs
5696 `(("python-backcall" ,python-backcall)
5697 ("python-pyzmq" ,python-pyzmq)
5698 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5699 ("python-terminado" ,python-terminado)
5700 ("python-matplotlib" ,python-matplotlib)
5701 ("python-numpy" ,python-numpy)
5702 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5703 ("python-jedi" ,python-jedi)
44d10b1f
RW
5704 ("python-jinja2" ,python-jinja2)
5705 ("python-mistune" ,python-mistune)
5706 ("python-pexpect" ,python-pexpect)
5707 ("python-pickleshare" ,python-pickleshare)
5708 ("python-simplegeneric" ,python-simplegeneric)
5709 ("python-jsonschema" ,python-jsonschema)
5710 ("python-traitlets" ,python-traitlets)
5711 ("python-nbformat" ,python-nbformat)
5712 ("python-pygments" ,python-pygments)))
5713 (inputs
5714 `(("readline" ,readline)
5715 ("which" ,which)))
5716 (native-inputs
5717 `(("graphviz" ,graphviz)
5718 ("pkg-config" ,pkg-config)
5719 ("python-requests" ,python-requests) ;; for tests
5720 ("python-testpath" ,python-testpath)
8b5f756c 5721 ("python-nose" ,python-nose)))
44d10b1f
RW
5722 (arguments
5723 `(#:phases
5724 (modify-phases %standard-phases
0f272518
RW
5725 (add-after 'unpack 'make-docs-reproducible
5726 (lambda _
5727 (substitute* "IPython/sphinxext/ipython_directive.py"
5728 ((".*import datetime") "")
5729 ((".*datetime.datetime.now\\(\\)") "")
5730 (("%timeit") "# %timeit"))
5731 #t))
44d10b1f
RW
5732 ;; Tests can only be run after the library has been installed and not
5733 ;; within the source directory.
5734 (delete 'check)
5735 (add-after 'install 'check
5736 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5737 (if tests?
5738 (begin
5739 ;; Make installed package available for running the tests
5740 (add-installed-pythonpath inputs outputs)
5741 (setenv "HOME" "/tmp/") ;; required by a test
5742 ;; We only test the core because one of the other tests
5743 ;; tries to import ipykernel.
5744 (invoke "python" "IPython/testing/iptest.py"
5745 "-v" "IPython/core/tests"))
5746 #t)))
5747 (add-before 'check 'fix-tests
5748 (lambda* (#:key inputs #:allow-other-keys)
5749 (substitute* "./IPython/utils/_process_posix.py"
5750 (("/usr/bin/env', 'which") (which "which")))
5751 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5752 (("#!/usr/bin/env python")
5753 (string-append "#!" (which "python"))))
44d10b1f
RW
5754 ;; This test introduces a circular dependency on ipykernel
5755 ;; (which depends on ipython).
5756 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5757 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5758 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5759 #t)))))
5760 (home-page "https://ipython.org")
5761 (synopsis "IPython is a tool for interactive computing in Python")
5762 (description
5763 "IPython provides a rich architecture for interactive computing with:
5764Powerful interactive shells, a browser-based notebook, support for interactive
5765data visualization, embeddable interpreters and tools for parallel
5766computing.")
8b5f756c 5767 (license license:bsd-3)))
44d10b1f 5768
8b5f756c
RW
5769(define-public python-ipython-documentation
5770 (package
5771 (inherit python-ipython)
5772 (name "python-ipython-documentation")
5773 (version (package-version python-ipython))
5774 (arguments
5775 `(#:phases
5776 (modify-phases %standard-phases
5777 (delete 'build)
5778 (delete 'check)
5779 (replace 'install
5780 (lambda* (#:key outputs #:allow-other-keys)
5781 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5782 (doc (string-append data "/doc/" ,name "-" ,version))
5783 (html (string-append doc "/html"))
5784 (man1 (string-append data "/man/man1"))
5785 (info (string-append data "/info"))
5786 (examples (string-append doc "/examples"))
5787 (python-arg (string-append "PYTHON=" (which "python"))))
5788 (setenv "LANG" "en_US.utf8")
5789 (with-directory-excursion "docs"
5790 ;; FIXME: pdf fails to build
5791 ;;(system* "make" "pdf" "PAPER=a4")
5792 (system* "make" python-arg "html")
5793 ;; FIXME: the generated texi file contains ^@^@, which trips
5794 ;; up the parser.
5795 ;; (system* "make" python-arg "info")
5796 )
5797 (copy-recursively "docs/man" man1)
5798 (copy-recursively "examples" examples)
5799 (copy-recursively "docs/build/html" html)
5800 ;; (copy-file "docs/build/latex/ipython.pdf"
5801 ;; (string-append doc "/ipython.pdf"))
5802 (mkdir-p info)
5803 ;; (copy-file "docs/build/texinfo/ipython.info"
5804 ;; (string-append info "/ipython.info"))
5805 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5806 #t)))))
5807 (inputs
5808 `(("python-ipython" ,python-ipython)
5809 ("python-ipykernel" ,python-ipykernel)))
5810 (native-inputs
5811 `(("python-sphinx" ,python-sphinx)
5812 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5813 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5814 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5815 texlive-fonts-ec
5816 texlive-generic-ifxetex
5817 texlive-generic-pdftex
8b5f756c
RW
5818 texlive-latex-capt-of
5819 texlive-latex-cmap
5820 texlive-latex-environ
5821 texlive-latex-eqparbox
5822 texlive-latex-etoolbox
5823 texlive-latex-expdlist
5824 texlive-latex-fancyhdr
5825 texlive-latex-fancyvrb
5826 texlive-latex-fncychap
5827 texlive-latex-float
5828 texlive-latex-framed
5829 texlive-latex-geometry
5830 texlive-latex-graphics
5831 texlive-latex-hyperref
5832 texlive-latex-mdwtools
5833 texlive-latex-multirow
5834 texlive-latex-needspace
5835 texlive-latex-oberdiek
5836 texlive-latex-parskip
5837 texlive-latex-preview
5838 texlive-latex-tabulary
5839 texlive-latex-threeparttable
5840 texlive-latex-titlesec
5841 texlive-latex-trimspaces
5842 texlive-latex-ucs
5843 texlive-latex-upquote
5844 texlive-latex-url
5845 texlive-latex-varwidth
5846 texlive-latex-wrapfig)))
5847 ("texinfo" ,texinfo)))))
44d10b1f
RW
5848
5849(define-public python-urwid
5850 (package
5851 (name "python-urwid")
5852 (version "2.0.1")
5853 (source
5854 (origin
5855 (method url-fetch)
5856 (uri (pypi-uri "urwid" version))
5857 (sha256
5858 (base32
5859 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5860 (build-system python-build-system)
5861 (home-page "http://urwid.org")
5862 (synopsis "Console user interface library for Python")
5863 (description
5864 "Urwid is a curses-based UI/widget library for Python. It includes many
5865features useful for text console applications.")
5866 (license license:lgpl2.1+)))
5867
5868(define-public python2-urwid
5869 (package-with-python2 python-urwid))
5870
5871(define-public python-urwidtrees
5872 (package
5873 (name "python-urwidtrees")
5874 (version "1.0.2")
5875 (source
5876 (origin
5877 (method url-fetch)
5878 ;; package author intends on distributing via github rather than pypi:
5879 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5880 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5881 version ".tar.gz"))
5882 (file-name (string-append name "-" version ".tar.gz"))
5883 (sha256
5884 (base32
5885 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5886 (build-system python-build-system)
5887 (arguments
5888 '(#:tests? #f)) ; no tests
5889 (propagated-inputs `(("python-urwid" ,python-urwid)))
5890 (home-page "https://github.com/pazz/urwidtrees")
5891 (synopsis "Tree widgets for urwid")
5892 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5893toolkit. Use it to build trees of widgets.")
5894 (license license:gpl3+)))
5895
5896(define-public python2-urwidtrees
5897 (package-with-python2 python-urwidtrees))
5898
5899(define-public python-ua-parser
5900 (package
5901 (name "python-ua-parser")
5902 (version "0.8.0")
5903 (source
5904 (origin
5905 (method url-fetch)
5906 (uri (pypi-uri "ua-parser" version))
5907 (sha256
5908 (base32
5909 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5910 (build-system python-build-system)
5911 (arguments
5912 `(#:tests? #f)) ;no test suite in release
5913 (native-inputs
5914 `(("python-pyyaml" ,python-pyyaml)))
5915 (home-page "https://github.com/ua-parser/uap-python")
5916 (synopsis "User agent parser")
5917 (description
5918 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5919 (license license:asl2.0)))
5920
5921(define-public python2-ua-parser
5922 (package-with-python2 python-ua-parser))
5923
5924(define-public python-user-agents
5925 (package
5926 (name "python-user-agents")
5927 (version "1.1.0")
5928 (source
5929 (origin
5930 (method url-fetch)
5931 (uri (pypi-uri "user-agents" version))
5932 (sha256
5933 (base32
5934 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5935 (build-system python-build-system)
5936 (arguments
5937 `(#:tests? #f)) ;missing devices.json test file in release
5938 (propagated-inputs
5939 `(("python-ua-parser" ,python-ua-parser)))
5940 (home-page "https://github.com/selwin/python-user-agents")
5941 (synopsis "User Agent strings parsing library")
5942 (description
5943 "A library to identify devices (phones, tablets) and their capabilities by
5944parsing (browser/HTTP) user agent strings.")
5945 (license license:expat)))
5946
5947(define-public python2-user-agents
5948 (package-with-python2 python-user-agents))
5949
5950(define-public python-dbus
5951 (package
5952 (name "python-dbus")
ba5ef999 5953 (version "1.2.14")
44d10b1f
RW
5954 (source
5955 (origin
5956 (method url-fetch)
5957 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5958 "dbus-python-" version ".tar.gz"))
5959 (sha256
ba5ef999 5960 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 5961 (build-system gnu-build-system)
44d10b1f
RW
5962 (native-inputs
5963 `(("pkg-config" ,pkg-config)))
5964 (inputs
5965 `(("python" ,python-wrapper)
5966 ("dbus-glib" ,dbus-glib)))
5967 (synopsis "Python bindings for D-bus")
5968 (description "python-dbus provides bindings for libdbus, the reference
5969implementation of D-Bus.")
5970 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5971 (license license:expat)))
5972
5973(define-public python2-dbus
5974 (package (inherit python-dbus)
5975 (name "python2-dbus")
5976 (inputs `(("python" ,python-2)
5977 ,@(alist-delete "python"
5978 (package-inputs python-dbus)
ba5ef999 5979 equal?)))))
44d10b1f 5980
fb236fdd
AG
5981(define-public python-notify2
5982 (package
5983 (name "python-notify2")
5984 (version "0.3.1")
5985 (source
5986 (origin
5987 (method url-fetch)
5988 (uri (pypi-uri "notify2" version))
5989 (sha256
5990 (base32
5991 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5992 (build-system python-build-system)
5993 (arguments `(#:tests? #f)) ; tests depend on system state
5994 (native-inputs
5995 `(("python-dbus" ,python-dbus)))
5996 (home-page "https://bitbucket.org/takluyver/pynotify2")
5997 (synopsis "Python interface to D-Bus notifications")
5998 (description
5999 "Pynotify2 provides a Python interface for sending D-Bus notifications.
6000It is a reimplementation of pynotify in pure Python, and an alternative to
6001the GObject Introspection bindings to libnotify for non-GTK applications.")
6002 (license (list license:bsd-2
6003 license:lgpl2.1+))))
6004
6005(define-public python2-notify2
6006 (package-with-python2 python-notify2))
6007
44d10b1f
RW
6008(define-public python-lxml
6009 (package
6010 (name "python-lxml")
2a74f928 6011 (version "4.4.1")
44d10b1f
RW
6012 (source
6013 (origin
6014 (method url-fetch)
6015 (uri (pypi-uri "lxml" version))
6016 (sha256
6017 (base32
2a74f928 6018 "14jnpfcpgqr9sx8ppd286jzcbk0b36hbqsvd8jkvffipzw5v8768"))))
44d10b1f 6019 (build-system python-build-system)
2f3c2daf
MB
6020 (arguments
6021 `(#:phases (modify-phases %standard-phases
6022 (replace 'check
6023 (lambda _
6024 (invoke "make" "test"))))))
44d10b1f
RW
6025 (inputs
6026 `(("libxml2" ,libxml2)
6027 ("libxslt" ,libxslt)))
6028 (home-page "http://lxml.de/")
6029 (synopsis
6030 "Python XML processing library")
6031 (description
6032 "The lxml XML toolkit is a Pythonic binding for the C libraries
6033libxml2 and libxslt.")
6034 (license license:bsd-3))) ; and a few more, see LICENSES.txt
6035
6036(define-public python2-lxml
6037 (package-with-python2 python-lxml))
6038
6039;; beautifulsoup4 has a totally different namespace than 3.x,
6040;; and pypi seems to put it under its own name, so I guess we should too
6041(define-public python-beautifulsoup4
6042 (package
6043 (name "python-beautifulsoup4")
abb53e6f 6044 (version "4.7.1")
44d10b1f
RW
6045 (source
6046 (origin
6047 (method url-fetch)
6048 (uri (pypi-uri "beautifulsoup4" version))
6049 (sha256
6050 (base32
abb53e6f 6051 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
6052 (build-system python-build-system)
6053 (arguments
6054 `(#:phases
6055 (modify-phases %standard-phases
6056 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6057 ;; must use this conversion script when building with Python 3. The
6058 ;; conversion script also runs the tests.
6059 ;; For more information, see the file 'convert-py3k' in the source
6060 ;; distribution.
6061 (replace 'check
dff0197e 6062 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 6063 (propagated-inputs
abb53e6f 6064 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
6065 (home-page
6066 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6067 (synopsis
6068 "Python screen-scraping library")
6069 (description
6070 "Beautiful Soup is a Python library designed for rapidly setting up
6071screen-scraping projects. It offers Pythonic idioms for navigating,
6072searching, and modifying a parse tree, providing a toolkit for
6073dissecting a document and extracting what you need. It automatically
6074converts incoming documents to Unicode and outgoing documents to UTF-8.")
6075 (license license:expat)
6076 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6077
6078(define-public python2-beautifulsoup4
6079 (package
6080 (inherit (package-with-python2
6081 (strip-python2-variant python-beautifulsoup4)))
6082 (arguments `(#:python ,python-2))))
6083
ad74978a
BT
6084(define-public python-soupsieve
6085 (package
6086 (name "python-soupsieve")
3367df31 6087 (version "1.9.5")
ad74978a
BT
6088 (source
6089 (origin
6090 (method url-fetch)
6091 (uri (pypi-uri "soupsieve" version))
6092 (sha256
6093 (base32
3367df31 6094 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
6095 (build-system python-build-system)
6096 (arguments `(#:tests? #f))
6097 ;;XXX: 2 tests fail currently despite claming they were to be
6098 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6099 ;;don't want to create a circular dependency.
6100 (home-page "https://github.com/facelessuser/soupsieve")
6101 (synopsis "CSS selector library")
6102 (description
6103 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6104Soup 4. It aims to provide selecting, matching, and filtering using modern
6105CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6106specifications up through the latest CSS level 4 drafts and beyond (though
6107some are not yet implemented).")
d00b83fb 6108 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
6109 (license license:expat)))
6110
6111(define-public python2-soupsieve
d00b83fb 6112 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
6113 (package
6114 (inherit base)
6115 (propagated-inputs
d00b83fb
MB
6116 `(("python2-backports-functools-lru-cache"
6117 ,python2-backports-functools-lru-cache)
6118 ,@(package-propagated-inputs base))))))
ad74978a 6119
44d10b1f
RW
6120(define-public python-netifaces
6121 (package
6122 (name "python-netifaces")
6123 (version "0.10.7")
6124 (source
6125 (origin
6126 (method url-fetch)
6127 (uri (pypi-uri "netifaces" version))
6128 (sha256
6129 (base32
6130 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6131 (build-system python-build-system)
6132 (home-page "https://github.com/al45tair/netifaces")
6133 (synopsis
6134 "Python module for portable network interface information")
6135 (description
6136 "Netifaces is a Python module providing information on network
6137interfaces in an easy and portable manner.")
6138 (license license:expat)))
6139
6140(define-public python2-netifaces
6141 (package-with-python2 python-netifaces))
6142
6143(define-public python-networkx
6144 (package
6145 (name "python-networkx")
6146 (version "2.2")
6147 (source
6148 (origin
6149 (method url-fetch)
6150 (uri (pypi-uri "networkx" version ".zip"))
6151 (sha256
6152 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6153 (build-system python-build-system)
6154 ;; python-decorator is needed at runtime.
6155 (propagated-inputs
6156 `(("python-decorator" ,python-decorator)))
6157 (native-inputs
6158 `(("python-nose" ,python-nose)
6159 ("unzip" ,unzip)))
6160 (home-page "https://networkx.github.io/")
6161 (synopsis "Python module for creating and manipulating graphs and networks")
6162 (description
6163 "NetworkX is a Python package for the creation, manipulation, and study
6164of the structure, dynamics, and functions of complex networks.")
6165 (license license:bsd-3)))
6166
6167(define-public python2-networkx
6168 (package-with-python2 python-networkx))
6169
6170(define-public python-datrie
6171 (package
6172 (name "python-datrie")
0b58cb42 6173 (version "0.8")
44d10b1f
RW
6174 (source
6175 (origin
6176 (method url-fetch)
6177 (uri (pypi-uri "datrie" version))
6178 (sha256
6179 (base32
0b58cb42 6180 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 6181 (build-system python-build-system)
44d10b1f
RW
6182 (native-inputs
6183 `(("python-cython" ,python-cython)
6184 ("python-hypothesis" ,python-hypothesis)
6185 ("python-pytest" ,python-pytest)
6186 ("python-pytest-runner" ,python-pytest-runner)))
6187 (home-page "https://github.com/kmike/datrie")
6188 (synopsis "Fast, efficiently stored trie for Python")
6189 (description
6190 "This package provides a fast, efficiently stored trie implementation for
6191Python.")
6192 (license license:lgpl2.1+)))
6193
6194(define-public snakemake
6195 (package
6196 (name "snakemake")
93803c6b 6197 (version "5.7.1")
44d10b1f
RW
6198 (source
6199 (origin
6200 (method url-fetch)
6201 (uri (pypi-uri "snakemake" version))
6202 (sha256
93803c6b 6203 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
6204 (build-system python-build-system)
6205 (arguments
6206 ;; TODO: Package missing test dependencies.
6207 '(#:tests? #f
6208 #:phases
6209 (modify-phases %standard-phases
6210 ;; For cluster execution Snakemake will call Python. Since there is
6211 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6212 ;; this by calling the snakemake wrapper instead.
6213 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6214 (lambda* (#:key outputs #:allow-other-keys)
6215 (substitute* "snakemake/executors.py"
6216 (("\\{sys.executable\\} -m snakemake")
6217 (string-append (assoc-ref outputs "out")
6218 "/bin/snakemake")))
6219 #t)))))
6220 (propagated-inputs
8994ae34 6221 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
6222 ("python-configargparse" ,python-configargparse)
6223 ("python-datrie" ,python-datrie)
6224 ("python-docutils" ,python-docutils)
8994ae34 6225 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
6226 ("python-jinja2" ,python-jinja2)
6227 ("python-jsonschema" ,python-jsonschema)
6228 ("python-networkx" ,python-networkx)
93803c6b 6229 ("python-psutil" ,python-psutil)
44d10b1f 6230 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6231 ("python-ratelimiter" ,python-ratelimiter)
6232 ("python-requests" ,python-requests)
6233 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6234 (home-page "https://snakemake.readthedocs.io")
6235 (synopsis "Python-based execution environment for make-like workflows")
6236 (description
6237 "Snakemake aims to reduce the complexity of creating workflows by
6238providing a clean and modern domain specific specification language (DSL) in
6239Python style, together with a fast and comfortable execution environment.")
6240 (license license:expat)))
6241
44d10b1f
RW
6242(define-public python-pyqrcode
6243 (package
6244 (name "python-pyqrcode")
6245 (version "1.2.1")
6246 (source
6247 (origin
6248 (method url-fetch)
6249 (uri (pypi-uri "PyQRCode" version))
6250 (sha256
6251 (base32
6252 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6253 (build-system python-build-system)
6254 (home-page
6255 "https://github.com/mnooner256/pyqrcode")
6256 (synopsis "QR code generator")
6257 (description
6258 "Pyqrcode is a QR code generator written purely in Python with
6259SVG, EPS, PNG and terminal output.")
6260 (license license:bsd-3)))
6261
6262(define-public python-seaborn
6263 (package
6264 (name "python-seaborn")
6265 (version "0.9.0")
6266 (source
6267 (origin
6268 (method url-fetch)
6269 (uri (pypi-uri "seaborn" version))
6270 (sha256
f9bd82e7
RW
6271 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6272 (patches
6273 (list (origin
6274 (method url-fetch)
6275 ;; This has already been merged, but there is no new
6276 ;; release including this patch. It fixes problems
6277 ;; with axis rotation that would lead to test
6278 ;; failures.
6279 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6280 (sha256
6281 (base32
6282 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6283 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
44d10b1f
RW
6284 (build-system python-build-system)
6285 (arguments
6286 `(#:phases
6287 (modify-phases %standard-phases
6288 (add-before 'check 'start-xserver
6289 (lambda* (#:key inputs #:allow-other-keys)
6290 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6291 ;; There must be a running X server and make check doesn't
6292 ;; start one. Therefore we must do it.
6293 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6294 (setenv "DISPLAY" ":1")
6295 #t)))
a1322765
RW
6296 (add-after 'unpack 'fix-tests
6297 (lambda _
6298 ;; test_cbar_ticks fails probably because of matplotlib's
6299 ;; expectation of using an older version of FreeType.
6300 (delete-file "seaborn/tests/test_matrix.py")
6301 #t))
44d10b1f
RW
6302 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6303 (propagated-inputs
6304 `(("python-pandas" ,python-pandas)
6305 ("python-matplotlib" ,python-matplotlib)
6306 ("python-numpy" ,python-numpy)
6307 ("python-scipy" ,python-scipy)))
6308 (native-inputs
6309 `(("python-pytest" ,python-pytest)
ff337525 6310 ("xorg-server" ,xorg-server-for-tests)))
44d10b1f
RW
6311 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6312 (synopsis "Statistical data visualization")
6313 (description
6314 "Seaborn is a library for making attractive and informative statistical
6315graphics in Python. It is built on top of matplotlib and tightly integrated
6316with the PyData stack, including support for numpy and pandas data structures
6317and statistical routines from scipy and statsmodels.")
6318 (license license:bsd-3)))
6319
6320(define-public python2-seaborn
6321 (package-with-python2 python-seaborn))
6322
6323(define-public python-mpmath
6324 (package
6325 (name "python-mpmath")
6326 (version "0.19")
6327 (source (origin
6328 (method url-fetch)
6329 (uri (string-append "http://mpmath.org/files/mpmath-"
6330 version ".tar.gz"))
6331 (sha256
6332 (base32
6333 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6334 (build-system python-build-system)
6335 (arguments
6336 '(#:phases
6337 (modify-phases %standard-phases
6338 (replace 'check
6339 (lambda _
5d7a6f1c 6340 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6341 (home-page "http://mpmath.org")
6342 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6343 (description
6344 "@code{mpmath} can be used as an arbitrary-precision substitute for
6345Python's float/complex types and math/cmath modules, but also does much
6346more advanced mathematics.")
6347 (license license:bsd-3)))
6348
6349(define-public python2-mpmath
6350 (package-with-python2 python-mpmath))
6351
6352(define-public python-bigfloat
6353 (package
6354 (name "python-bigfloat")
6355 (version "0.3.0")
6356 (source
6357 (origin
6358 (method url-fetch)
6359 (uri (pypi-uri "bigfloat" version))
6360 (sha256
6361 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6362 (build-system python-build-system)
6363 (inputs
6364 `(("mpfr" ,mpfr)))
6365 (home-page "https://github.com/mdickinson/bigfloat")
6366 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6367 (description
e36de31b 6368 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6369multiprecision arithmetic.")
6370 (license license:lgpl3+)))
6371
6372(define-public python2-bigfloat
6373 (package-with-python2 python-bigfloat))
6374
6375(define-public python-sympy
6376 (package
6377 (name "python-sympy")
6378 (version "1.1.1")
6379 (source
6380 (origin
6381 (method url-fetch)
6382 (uri (string-append
6383 "https://github.com/sympy/sympy/releases/download/sympy-"
6384 version "/sympy-" version ".tar.gz"))
6385 (sha256
6386 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6387 (build-system python-build-system)
6388 (arguments
6389 `(#:phases
6390 (modify-phases %standard-phases
6391 ;; Run the core tests after installation. By default it would run
6392 ;; *all* tests, which take a very long time to complete and are known
6393 ;; to be flaky.
6394 (delete 'check)
6395 (add-after 'install 'check
6396 (lambda* (#:key outputs #:allow-other-keys)
6397 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6398 #t)))))
6399 (propagated-inputs
6400 `(("python-mpmath" ,python-mpmath)))
6401 (home-page "http://www.sympy.org/")
6402 (synopsis "Python library for symbolic mathematics")
6403 (description
6404 "SymPy is a Python library for symbolic mathematics. It aims to become a
6405full-featured computer algebra system (CAS) while keeping the code as simple
6406as possible in order to be comprehensible and easily extensible.")
6407 (license license:bsd-3)))
6408
6409(define-public python2-sympy
6410 (package
6411 (inherit (package-with-python2 python-sympy))
6412 (arguments
6413 `(#:phases
6414 (modify-phases %standard-phases
6415 ;; Run the core tests after installation. By default it would run
6416 ;; *all* tests, which take a very long time to complete and are known
6417 ;; to be flaky.
6418 (delete 'check)
6419 (add-after 'install 'check
6420 (lambda* (#:key outputs #:allow-other-keys)
6421 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6422 #t)))))))
6423
6424(define-public python-q
6425 (package
6426 (name "python-q")
6427 (version "2.6")
6428 (source
6429 (origin
6430 (method url-fetch)
6431 (uri (pypi-uri "q" version))
6432 (sha256
6433 (base32
6434 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6435 (build-system python-build-system)
6436 (home-page "https://github.com/zestyping/q")
6437 (synopsis "Quick-and-dirty debugging output for tired programmers")
6438 (description
6439 "q is a Python module for \"print\" style of debugging Python code. It
6440provides convenient short API for print out of values, tracebacks, and
6441falling into the Python interpreter.")
6442 (license license:asl2.0)))
6443
6444(define-public python2-q
6445 (package-with-python2 python-q))
6446
6447(define-public python2-xlib
6448 (package
6449 (name "python2-xlib")
6450 (version "0.14")
6451 (source (origin
6452 (method url-fetch)
6453 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6454 "/" version "/"
6455 "python-xlib-" version ".tar.gz"))
6456 (sha256
6457 (base32
6458 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6459 (build-system python-build-system)
6460 (arguments
6461 `(#:python ,python-2 ;Python 2 only
6462 #:tests? #f)) ;no tests
6463 (home-page "http://python-xlib.sourceforge.net/")
6464 (synopsis "Python X11 client library")
6465 (description
6466 "The Python X Library is intended to be a fully functional X client
6467library for Python programs. It is useful to implement low-level X clients.
6468It is written entirely in Python.")
6469 (license license:gpl2+)))
6470
6471(define-public python-singledispatch
6472 (package
6473 (name "python-singledispatch")
6474 (version "3.4.0.3")
6475 (source
6476 (origin
6477 (method url-fetch)
6478 (uri (pypi-uri "singledispatch" version))
6479 (sha256
6480 (base32
6481 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6482 (build-system python-build-system)
6483 (native-inputs
6484 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6485 (home-page
6486 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6487 (synopsis "Backport of singledispatch feature from Python 3.4")
6488 (description
6489 "This library brings functools.singledispatch from Python 3.4 to Python
64902.6-3.3.")
6491 (license license:expat)))
6492
6493(define-public python2-singledispatch
6494 (package-with-python2 python-singledispatch))
6495
6496;; the python- version can be removed with python-3.5
6497(define-public python-backports-abc
6498 (package
6499 (name "python-backports-abc")
6500 (version "0.5")
6501 (source
6502 (origin
6503 (method url-fetch)
6504 (uri (pypi-uri "backports_abc" version))
6505 (sha256
6506 (base32
6507 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6508 (build-system python-build-system)
6509 (home-page "https://github.com/cython/backports_abc")
6510 (synopsis "Backport of additions to the 'collections.abc' module")
6511 (description
6512 "Python-backports-abc provides a backport of additions to the
36a4366d 6513@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6514 (license license:psfl)))
6515
6516(define-public python2-backports-abc
6517 (package-with-python2 python-backports-abc))
6518
6519(define-public python-backports-csv
6520 (package
6521 (name "python-backports-csv")
6522 (version "1.0.5")
6523 (source
6524 (origin
6525 (method url-fetch)
6526 (uri (pypi-uri "backports.csv" version))
6527 (sha256
6528 (base32
6529 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6530 (build-system python-build-system)
6531 (home-page "https://github.com/ryanhiebert/backports.csv")
6532 (synopsis "Backport of Python 3's csv module for Python 2")
6533 (description
6534 "Provides a backport of Python 3's @code{csv} module for parsing
6535comma separated values. The API of the @code{csv} module in Python 2
6536is drastically different from the @code{csv} module in Python 3.
6537This is due, for the most part, to the difference between str in
6538Python 2 and Python 3.")
6539 (license license:psfl)))
6540
6541(define-public python2-backports-csv
6542 (package-with-python2 python-backports-csv))
6543
6544(define-public python2-backports-shutil-get-terminal-size
6545 (package
6546 (name "python2-backports-shutil-get-terminal-size")
6547 (version "1.0.0")
6548 (source
6549 (origin
6550 (method url-fetch)
6551 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6552 (sha256
6553 (base32
6554 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6555 (build-system python-build-system)
6556 (arguments
6557 `(#:python ,python-2
6558 #:phases
6559 (modify-phases %standard-phases
6560 (replace 'check
6561 (lambda _
4a4a7d9a 6562 (invoke "py.test" "-v"))))))
44d10b1f
RW
6563 (native-inputs
6564 `(("python2-pytest" ,python2-pytest)))
6565 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6566 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6567 (description
6568 "This package provides a backport of the @code{get_terminal_size
6569function} from Python 3.3's @code{shutil}.
6570Unlike the original version it is written in pure Python rather than C,
6571so it might be a tiny bit slower.")
6572 (license license:expat)))
6573
6574(define-public python-waf
6575 (package
6576 (name "python-waf")
6577 (version "2.0.11")
6578 (source (origin
6579 (method url-fetch)
6580 (uri (string-append "https://waf.io/"
6581 "waf-" version ".tar.bz2"))
6582 (sha256
6583 (base32
6584 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6585 (build-system python-build-system)
6586 (arguments
6587 '(#:phases
6588 (modify-phases %standard-phases
6589 (replace 'build
6590 (lambda _
6591 (invoke "python" "waf-light" "configure" "build")))
6592 (replace 'check
6593 (lambda _
6594 (invoke "python" "waf" "--version")))
6595 (replace 'install
6596 (lambda* (#:key outputs #:allow-other-keys)
6597 (let ((out (assoc-ref outputs "out")))
6598 (install-file "waf" (string-append out "/bin")))
6599 #t))
6600 ;; waf breaks when it is wrapped.
6601 (delete 'wrap))))
6602 (home-page "https://waf.io/")
6603 (synopsis "Python-based build system")
6604 (description
6605 "Waf is a Python-based framework for configuring, compiling and installing
6606applications.")
6607 (license license:bsd-3)))
6608
6609(define-public python2-waf
6610 (package-with-python2 python-waf))
6611
6612(define-public python-pyzmq
6613 (package
6614 (name "python-pyzmq")
6615 (version "17.1.2")
6616 (source
6617 (origin
6618 (method url-fetch)
6619 (uri (pypi-uri "pyzmq" version))
6620 (sha256
6621 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6622 (build-system python-build-system)
6623 (arguments
6624 `(#:configure-flags
6625 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6626 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6627 ;; --inplace' for 'python setup.py test' to work.
6628 #:tests? #f))
6629 (inputs
6630 `(("zeromq" ,zeromq)))
6631 (native-inputs
6632 `(("pkg-config" ,pkg-config)
6633 ("python-nose" ,python-nose)))
6634 (home-page "https://github.com/zeromq/pyzmq")
6635 (synopsis "Python bindings for 0MQ")
6636 (description
6637 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6638 (license license:bsd-4)))
6639
6640(define-public python2-pyzmq
6641 (package-with-python2 python-pyzmq))
6642
6643(define-public python-pep8
6644 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6645 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6646 ;; some dependents' test suites, and nothing more.
6647 (package
6648 (name "python-pep8")
6649 (version "1.7.0")
6650 (source
6651 (origin
6652 (method url-fetch)
6653 (uri (pypi-uri "pep8" version))
6654 (sha256
6655 (base32
2be878d8
CB
6656 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6657 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6658 (build-system python-build-system)
6659 (home-page "https://pep8.readthedocs.org/")
6660 (synopsis "Python style guide checker")
6661 (description
6662 "This tools checks Python code against some of the style conventions in
6663PEP 8.")
6664 (license license:expat)))
6665
6666(define-public python2-pep8
6667 (package-with-python2 python-pep8))
6668
6669(define-public python-pyflakes
6670 (package
6671 (name "python-pyflakes")
d0cba11b 6672 (version "2.1.1")
44d10b1f
RW
6673 (source
6674 (origin
6675 (method url-fetch)
6676 (uri (pypi-uri "pyflakes" version))
6677 (sha256
6678 (base32
d0cba11b 6679 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6680 (build-system python-build-system)
6681 (home-page
6682 "https://github.com/pyflakes/pyflakes")
6683 (synopsis "Passive checker of Python programs")
6684 (description
6685 "Pyflakes statically checks Python source code for common errors.")
6686 (license license:expat)))
6687
6688(define-public python2-pyflakes
6689 (package-with-python2 python-pyflakes))
6690
6691(define-public python-mccabe
6692 (package
6693 (name "python-mccabe")
6694 (version "0.6.1")
6695 (source
6696 (origin
6697 (method url-fetch)
6698 (uri (pypi-uri "mccabe" version))
6699 (sha256
6700 (base32
6701 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6702 (build-system python-build-system)
6703 (native-inputs
6704 `(("python-pytest" ,python-pytest-bootstrap)
6705 ("python-pytest-runner" ,python-pytest-runner)))
6706 (home-page "https://github.com/flintwork/mccabe")
6707 (synopsis "McCabe checker, plugin for flake8")
6708 (description
6709 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6710complexity of Python source code.")
6711 (license license:expat)))
6712
6713(define-public python2-mccabe
6714 (package-with-python2 python-mccabe))
6715
6716(define-public python-mccabe-0.2.1
6717 (package (inherit python-mccabe)
6718 (version "0.2.1")
6719 (source
6720 (origin
6721 (method url-fetch)
6722 (uri (pypi-uri "mccabe" version))
6723 (sha256
6724 (base32
6725 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6726
6727(define-public python2-mccabe-0.2.1
6728 (package-with-python2 python-mccabe-0.2.1))
6729
6730;; Flake8 2.4.1 requires an older version of pep8.
6731;; This should be removed ASAP.
6732(define-public python-pep8-1.5.7
6733 (package (inherit python-pep8)
6734 (version "1.5.7")
6735 (source
f3576970
RW
6736 (origin
6737 (method url-fetch)
6738 (uri (pypi-uri "pep8" version))
6739 (sha256
6740 (base32
6741 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6742 (arguments
6743 ;; XXX Tests not compatible with Python 3.5.
6744 '(#:tests? #f))))
6745
6746(define-public python2-pep8-1.5.7
6747 (package-with-python2 python-pep8-1.5.7))
6748
6749;; Flake8 2.4.1 requires an older version of pyflakes.
6750;; This should be removed ASAP.
6751(define-public python-pyflakes-0.8.1
6752 (package (inherit python-pyflakes)
6753 (version "0.8.1")
6754 (source
8c4dffb5
RW
6755 (origin
6756 (method url-fetch)
6757 (uri (pypi-uri "pyflakes" version))
6758 (sha256
6759 (base32
6760 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6761 (arguments
6762 ;; XXX Tests not compatible with Python 3.5.
6763 '(#:tests? #f))))
6764
6765(define-public python2-pyflakes-0.8.1
6766 (package-with-python2 python-pyflakes-0.8.1))
6767
ac63cf0a 6768(define-public python-flake8
44d10b1f
RW
6769 (package
6770 (name "python-flake8")
beaff4a8 6771 (version "3.7.7")
ac63cf0a
MB
6772 (source (origin
6773 (method url-fetch)
6774 (uri (pypi-uri "flake8" version))
6775 (sha256
6776 (base32
beaff4a8 6777 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6778 (build-system python-build-system)
6779 (arguments
6780 `(#:phases
6781 (modify-phases %standard-phases
44d10b1f
RW
6782 (delete 'check)
6783 (add-after 'install 'check
6784 (lambda* (#:key inputs outputs #:allow-other-keys)
6785 (add-installed-pythonpath inputs outputs)
6786 (invoke "pytest" "-v")
6787 #t)))))
6788 (propagated-inputs
6789 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6790 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6791 ("python-pyflakes" ,python-pyflakes)
6792 ("python-mccabe" ,python-mccabe)))
6793 (native-inputs
6794 `(("python-mock" ,python-mock)
6795 ("python-pytest" ,python-pytest-bootstrap)
6796 ("python-pytest-runner" ,python-pytest-runner)))
6797 (home-page "https://gitlab.com/pycqa/flake8")
6798 (synopsis
6799 "The modular source code checker: pep8, pyflakes and co")
6800 (description
6801 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6802 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6803 (license license:expat)))
6804
ac63cf0a
MB
6805(define-public python2-flake8
6806 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6807 (package (inherit base)
6808 (propagated-inputs
6809 `(("python2-configparser" ,python2-configparser)
6810 ("python2-enum34" ,python2-enum34)
beaff4a8 6811 ("python2-typing" ,python2-typing)
44d10b1f
RW
6812 ,@(package-propagated-inputs base))))))
6813
44d10b1f
RW
6814;; python-hacking requires flake8 <2.6.0.
6815(define-public python-flake8-2.5
6816 (package
6817 (inherit python-flake8)
6818 (version "2.5.5")
6819 (source (origin
6820 (method url-fetch)
6821 (uri (pypi-uri "flake8" version))
6822 (sha256
6823 (base32
6824 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6825 (propagated-inputs
6826 `(("python-pep8" ,python-pep8)
6827 ,@(package-propagated-inputs python-flake8)))
6828 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6829
6830(define-public python2-flake8-2.5
6831 (package
6832 (inherit python2-flake8)
6833 (version (package-version python-flake8-2.5))
6834 (source (origin
6835 (inherit (package-source python-flake8-2.5))))
6836 (propagated-inputs
6837 `(("python2-pep8" ,python2-pep8)
6838 ,@(package-propagated-inputs python2-flake8)))))
6839
6840(define-public python-flake8-polyfill
6841 (package
6842 (name "python-flake8-polyfill")
6843 (version "1.0.2")
6844 (source
6845 (origin
6846 (method url-fetch)
6847 (uri (pypi-uri "flake8-polyfill" version))
6848 (sha256
6849 (base32
6850 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6851 (build-system python-build-system)
6852 (arguments
6853 '(#:phases
6854 (modify-phases %standard-phases
6855 (replace 'check
6856 (lambda _
40a7153d
MB
6857 ;; Be compatible with Pytest 4:
6858 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6859 (substitute* "setup.cfg"
6860 (("\\[pytest\\]")
6861 "[tool:pytest]"))
6862
44d10b1f
RW
6863 (setenv "PYTHONPATH"
6864 (string-append (getcwd) "/build/lib:"
6865 (getenv "PYTHONPATH")))
4f0a0894 6866 (invoke "py.test" "-v"))))))
44d10b1f
RW
6867 (native-inputs
6868 `(("python-flake8" ,python-flake8)
6869 ("python-mock" ,python-mock)
6870 ("python-pep8" ,python-pep8)
6871 ("python-pycodestyle" ,python-pycodestyle)
6872 ("python-pytest" ,python-pytest)))
6873 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6874 (synopsis "Polyfill package for Flake8 plugins")
6875 (description
6876 "This package that provides some compatibility helpers for Flake8
6877plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6878 (license license:expat)))
6879
6880(define-public python2-flake8-polyfill
6881 (package-with-python2 python-flake8-polyfill))
6882
6883(define-public python-mistune
6884 (package
6885 (name "python-mistune")
6886 (version "0.8.4")
6887 (source
6888 (origin
6889 (method url-fetch)
6890 (uri (pypi-uri "mistune" version))
6891 (sha256
6892 (base32
6893 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6894 (build-system python-build-system)
6895 (native-inputs
6896 `(("python-nose" ,python-nose)
6897 ("python-cython" ,python-cython)))
6898 (home-page "https://github.com/lepture/mistune")
6899 (synopsis "Markdown parser in pure Python")
6900 (description "This package provides a fast markdown parser in pure
6901Python.")
6902 (license license:bsd-3)))
6903
6904(define-public python2-mistune
6905 (package-with-python2 python-mistune))
6906
6907(define-public python-markdown
6908 (package
6909 (name "python-markdown")
ceb1936a 6910 (version "3.1.1")
44d10b1f
RW
6911 (source
6912 (origin
6913 (method url-fetch)
6914 (uri (pypi-uri "Markdown" version))
6915 (sha256
6916 (base32
ceb1936a 6917 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6918 (build-system python-build-system)
6919 (native-inputs
6920 `(("python-nose" ,python-nose)
6921 ("python-pyyaml" ,python-pyyaml)))
6922 (home-page "https://python-markdown.github.io/")
6923 (synopsis "Python implementation of Markdown")
6924 (description
6925 "This package provides a Python implementation of John Gruber's
6926Markdown. The library features international input, various Markdown
6927extensions, and several HTML output formats. A command line wrapper
6928markdown_py is also provided to convert Markdown files to HTML.")
6929 (license license:bsd-3)))
6930
6931(define-public python2-markdown
6932 (package-with-python2 python-markdown))
6933
6934(define-public python-ptyprocess
6935 (package
6936 (name "python-ptyprocess")
6937 (version "0.5.2")
6938 (source
6939 (origin
6940 (method url-fetch)
6941 (uri (pypi-uri "ptyprocess" version))
6942 (sha256
6943 (base32
6944 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6945 (build-system python-build-system)
6946 (native-inputs
6947 `(("python-nose" ,python-nose)))
6948 (arguments
6949 `(#:phases
6950 (modify-phases %standard-phases
6951 (replace 'check
7904d6fa 6952 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6953 (home-page "https://github.com/pexpect/ptyprocess")
6954 (synopsis "Run a subprocess in a pseudo terminal")
6955 (description
6956 "This package provides a Python library used to launch a subprocess in a
6957pseudo terminal (pty), and interact with both the process and its pty.")
6958 (license license:isc)))
6959
6960(define-public python2-ptyprocess
6961 (package-with-python2 python-ptyprocess))
6962
6963(define-public python-cram
6964 (package
6965 (name "python-cram")
6966 (version "0.7")
6967 (home-page "https://bitheap.org/cram/")
6968 (source (origin
6969 (method url-fetch)
6970 (uri (list (string-append home-page "cram-"
6971 version ".tar.gz")
6972 (pypi-uri "cram" version)))
6973 (sha256
6974 (base32
6975 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6976 (arguments
6977 '(#:phases
6978 (modify-phases %standard-phases
6979 (add-after 'unpack 'patch-source
6980 (lambda _
6981 (substitute* (find-files "cram" ".*\\.py$")
6982 ;; Replace default shell path.
6983 (("/bin/sh") (which "sh")))
6984 (substitute* (find-files "tests" ".*\\.t$")
6985 (("md5") "md5sum")
6986 (("/bin/bash") (which "bash"))
6987 (("/bin/sh") (which "sh")))
6988 (substitute* "cram/_test.py"
6989 ;; This hack works around a bug triggered by substituting
6990 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6991 ;; "cram -h", which breaks the output at 80 characters. This
6992 ;; causes the line showing the default shell to break into two
6993 ;; lines, but the test expects a single line...
6994 (("env\\['COLUMNS'\\] = '80'")
6995 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6996
6997 (substitute* "Makefile"
6998 ;; Recent versions of python-coverage have caused the test
6999 ;; coverage to decrease (as of version 0.7). Allow that.
7000 (("--fail-under=100")
7001 "--fail-under=90"))
7002
44d10b1f 7003 #t))
ff1e80d7 7004 (replace 'check
44d10b1f 7005 ;; The test phase uses the built library and executable.
44d10b1f
RW
7006 (lambda* (#:key inputs outputs #:allow-other-keys)
7007 (add-installed-pythonpath inputs outputs)
7008 (setenv "PATH" (string-append (getenv "PATH") ":"
7009 (assoc-ref outputs "out") "/bin"))
2d7db192 7010 (invoke "make" "test"))))))
44d10b1f
RW
7011 (build-system python-build-system)
7012 (native-inputs
7013 `(("python-coverage" ,python-coverage)
7014 ("which" ,which)))
7015 (synopsis "Simple testing framework for command line applications")
7016 (description
7017 "Cram is a functional testing framework for command line applications.
7018Cram tests look like snippets of interactive shell sessions. Cram runs each
7019command and compares the command output in the test with the command’s actual
7020output.")
7021 (license license:gpl2+)))
7022
7023(define-public python2-cram
7024 (package-with-python2 python-cram))
7025
7026(define-public python-straight-plugin
7027 (package
7028 (name "python-straight-plugin")
7029 (version "1.4.1")
7030 (source
7031 (origin
7032 (method url-fetch)
7033 (uri (pypi-uri "straight.plugin" version))
7034 (sha256
7035 (base32
7036 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7037 (build-system python-build-system)
7038 (home-page "https://github.com/ironfroggy/straight.plugin")
7039 (synopsis "Simple namespaced plugin facility")
7040 (description "Straight Plugin provides a type of plugin you can create from
7041almost any existing Python modules, and an easy way for outside developers to
7042add functionality and customization to your projects with their own plugins.")
7043 (license license:expat)))
7044
7045(define-public python2-straight-plugin
7046 (package-with-python2 python-straight-plugin))
7047
7048(define-public python-fonttools
7049 (package
7050 (name "python-fonttools")
1a4bb420 7051 (version "3.38.0")
44d10b1f
RW
7052 (source (origin
7053 (method url-fetch)
7054 (uri (pypi-uri "fonttools" version ".zip"))
7055 (sha256
7056 (base32
1a4bb420 7057 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
7058 (build-system python-build-system)
7059 (native-inputs
7060 `(("unzip" ,unzip)
7061 ("python-pytest" ,python-pytest)
7062 ("python-pytest-runner" ,python-pytest-runner)))
7063 (home-page "https://github.com/behdad/fonttools")
7064 (synopsis "Tools to manipulate font files")
7065 (description
7066 "FontTools/TTX is a library to manipulate font files from Python. It
7067supports reading and writing of TrueType/OpenType fonts, reading and writing
7068of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7069also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7070from an XML-based format.")
7071 (license license:expat)))
7072
7073(define-public python2-fonttools
7074 (package-with-python2 python-fonttools))
7075
7076(define-public python-ly
7077 (package
7078 (name "python-ly")
7079 (version "0.9.5")
7080 (source
7081 (origin
7082 (method url-fetch)
7083 (uri (pypi-uri name version))
7084 (sha256
7085 (base32
7086 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7087 (build-system python-build-system)
7088 (arguments
7089 ;; FIXME: Some tests need network access.
7090 '(#:tests? #f))
7091 (synopsis "Tool and library for manipulating LilyPond files")
7092 (description "This package provides a Python library to parse, manipulate
7093or create documents in LilyPond format. A command line program ly is also
7094provided that can be used to do various manipulations with LilyPond files.")
7095 (home-page "https://pypi.python.org/pypi/python-ly")
7096 (license license:gpl2+)))
7097
7098(define-public python-appdirs
7099 (package
7100 (name "python-appdirs")
7101 (version "1.4.3")
7102 (source
7103 (origin
7104 (method url-fetch)
7105 (uri (pypi-uri "appdirs" version))
7106 (sha256
7107 (base32
7108 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7109 (build-system python-build-system)
7110 (home-page "https://github.com/ActiveState/appdirs")
7111 (synopsis
7112 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7113 (description
7114 "This module provides a portable way of finding out where user data
7115should be stored on various operating systems.")
7116 (license license:expat)))
7117
7118(define-public python2-appdirs
7119 (package-with-python2 python-appdirs))
7120
7121(define-public python-llfuse
7122 (package
7123 (name "python-llfuse")
7124 (version "1.3.5")
7125 (source (origin
7126 (method url-fetch)
7127 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7128 (sha256
7129 (base32
7130 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7131 (build-system python-build-system)
7132 (inputs
7133 `(("fuse" ,fuse)
7134 ("attr" ,attr)))
7135 (native-inputs
7136 `(("pkg-config" ,pkg-config)))
7137 (synopsis "Python bindings for FUSE")
7138 (description
7139 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7140 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7141 (license license:lgpl2.0+)
7142 (properties `((python2-variant . ,(delay python2-llfuse))))))
7143
7144(define-public python2-llfuse
7145 (package (inherit (package-with-python2
7146 (strip-python2-variant python-llfuse)))
7147 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7148
7149;; For attic-0.16
7150(define-public python-llfuse-0.41
7151 (package (inherit python-llfuse)
7152 (version "0.41.1")
7153 (source (origin
7154 (method url-fetch)
7155 (uri (string-append
7156 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7157 "llfuse-" version ".tar.bz2"))
7158 (sha256
7159 (base32
7160 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7161 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7162 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7163 (license (list license:expat license:lgpl2.0+))))
7164
7165(define-public python-msgpack
7166 (package
7167 (name "python-msgpack")
7168 (version "0.5.6")
7169 (source (origin
7170 (method url-fetch)
7171 (uri (pypi-uri "msgpack" version))
7172 (sha256
7173 (base32
7174 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7175 (build-system python-build-system)
7176 (arguments
7177 `(#:modules ((guix build utils)
7178 (guix build python-build-system)
7179 (ice-9 ftw)
7180 (srfi srfi-1)
7181 (srfi srfi-26))
7182 #:phases
7183 (modify-phases %standard-phases
7184 (replace 'check
7185 (lambda _
7186 (let ((cwd (getcwd)))
7187 (setenv "PYTHONPATH"
7188 (string-append cwd "/build/"
7189 (find (cut string-prefix? "lib" <>)
7190 (scandir (string-append cwd "/build")))
7191 ":"
7192 (getenv "PYTHONPATH")))
7193 (invoke "pytest" "-v" "test")))))))
7194 (native-inputs
7195 `(("python-pytest" ,python-pytest)))
7196 (synopsis "MessagePack (de)serializer")
7197 (description "MessagePack is a fast, compact binary serialization format,
7198suitable for similar data to JSON. This package provides CPython bindings for
7199reading and writing MessagePack data.")
7200 (home-page "https://pypi.python.org/pypi/msgpack/")
7201 (license license:asl2.0)))
7202
7203;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7204;; release 0.5. Some packages like borg still call it by the old name for now.
7205;; <https://bugs.gnu.org/30662>
7206(define-public python-msgpack-transitional
7207 (package
7208 (inherit python-msgpack)
7209 (name "python-msgpack-transitional")
7210 (arguments
7211 (substitute-keyword-arguments (package-arguments python-msgpack)
7212 ((#:phases phases)
7213 `(modify-phases ,phases
7214 (add-after 'unpack 'configure-transitional
7215 (lambda _
7216 ;; Keep using the old name.
7217 (substitute* "setup.py"
7218 (("TRANSITIONAL = False")
7219 "TRANSITIONAL = 1"))
7220 #t))))))))
7221
7222(define-public python2-msgpack
7223 (package-with-python2 python-msgpack))
7224
7225(define-public python-netaddr
7226 (package
7227 (name "python-netaddr")
7228 (version "0.7.19")
7229 (source
7230 (origin
7231 (method url-fetch)
7232 (uri (pypi-uri "netaddr" version))
7233 (sha256
7234 (base32
7235 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7236 (build-system python-build-system)
7237 (arguments `(#:tests? #f)) ;; No tests.
7238 (home-page "https://github.com/drkjam/netaddr/")
7239 (synopsis "Pythonic manipulation of network addresses")
7240 (description
7241 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7242and MAC network addresses.")
7243 (license license:bsd-3)))
7244
7245(define-public python2-netaddr
7246 (package-with-python2 python-netaddr))
7247
dd85eca0
AG
7248(define-public python2-pyroute2
7249 (package
7250 (name "python2-pyroute2")
7251 (version "0.5.6")
7252 (source
7253 (origin
7254 (method url-fetch)
7255 (uri (pypi-uri "pyroute2" version))
7256 (sha256
7257 (base32
7258 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7259 (build-system python-build-system)
7260 (arguments
7261 `(#:python ,python-2)) ;Python 3.x is not supported
7262 (home-page "https://github.com/svinota/pyroute2")
7263 (synopsis "Python netlink library")
7264 (description
7265 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7266Supported netlink families and protocols include:
7267@itemize
7268@item rtnl, network settings - addresses, routes, traffic controls
7269@item nfnetlink - netfilter API: ipset, nftables, ...
7270@item ipq - simplest userspace packet filtering, iptables QUEUE target
7271@item devlink - manage and monitor devlink-enabled hardware
7272@item generic - generic netlink families
7273 @itemize
7274 @item nl80211 - wireless functions API (basic support)
7275 @item taskstats - extended process statistics
7276 @item acpi_events - ACPI events monitoring
7277 @item thermal_events - thermal events monitoring
7278 @item VFS_DQUOT - disk quota events monitoring
7279 @end itemize
7280@end itemize")
7281 (license license:gpl2+)))
7282
44d10b1f
RW
7283(define-public python-wrapt
7284 (package
7285 (name "python-wrapt")
2271a1dc 7286 (version "1.11.2")
44d10b1f 7287 (source
2271a1dc
MB
7288 (origin
7289 (method url-fetch)
7290 (uri (pypi-uri "wrapt" version))
7291 (sha256
7292 (base32
7293 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7294 (build-system python-build-system)
7295 (arguments
7296 ;; Tests are not included in the tarball, they are only available in the
7297 ;; git repository.
7298 `(#:tests? #f))
7299 (home-page "https://github.com/GrahamDumpleton/wrapt")
7300 (synopsis "Module for decorators, wrappers and monkey patching")
7301 (description
2271a1dc 7302 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7303 Python, which can be used as the basis for the construction of function
7304 wrappers and decorator functions.")
7305 (license license:bsd-2)))
7306
7307(define-public python2-wrapt
7308 (package-with-python2 python-wrapt))
7309
7310(define-public python-xlrd
7311 (package
7312 (name "python-xlrd")
3a2b1a3c 7313 (version "1.2.0")
44d10b1f
RW
7314 (source (origin
7315 (method url-fetch)
7316 (uri (pypi-uri "xlrd" version))
7317 (sha256
7318 (base32
3a2b1a3c 7319 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7320 (build-system python-build-system)
7321 (arguments
7322 `(#:phases
7323 (modify-phases %standard-phases
3ccdd3a5
MO
7324 ;; Some tests depend on writing a temporary file to the user's home
7325 ;; directory.
3a2b1a3c
GL
7326 (add-after 'unpack 'fix-tests
7327 (lambda _
7328 (delete-file "tests/test_open_workbook.py")
7329 #t)))))
44d10b1f
RW
7330 (home-page "http://www.python-excel.org/")
7331 (synopsis "Library for extracting data from Excel files")
a0909286 7332 (description "This package provides a library to extract data from
44d10b1f
RW
7333spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7334@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7335Unicode-aware. It is not intended as an end-user tool.")
7336 (license license:bsd-3)))
7337
7338(define-public python2-xlrd
7339 (package-with-python2 python-xlrd))
7340
7341(define-public python-prettytable
7342 (package
7343 (name "python-prettytable")
7344 (version "0.7.2")
7345 (source
7346 (origin
7347 (method url-fetch)
337c3a1e 7348 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7349 (sha256
7350 (base32
7351 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7352 (build-system python-build-system)
7353 (home-page "http://code.google.com/p/prettytable/")
7354 (synopsis "Display tabular data in an ASCII table format")
7355 (description
7356 "A library designed to represent tabular data in visually appealing ASCII
7357tables. PrettyTable allows for selection of which columns are to be printed,
7358independent alignment of columns (left or right justified or centred) and
7359printing of sub-tables by specifying a row range.")
7360 (license license:bsd-3)))
7361
7362(define-public python2-prettytable
7363 (package-with-python2 python-prettytable))
7364
7365(define-public python-tables
7366 (package
7367 (name "python-tables")
7368 (version "3.4.4")
7369 (source
7370 (origin
7371 (method url-fetch)
7372 (uri (pypi-uri "tables" version))
7373 (sha256
7374 (base32
7375 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7376 (modules '((guix build utils)))
7377 (snippet
7378 '(begin
7379 ;; Remove pre-compiled .pyc files from source.
7380 (for-each delete-file-recursively
7381 (find-files "." "__pycache__" #:directories? #t))
7382 (for-each delete-file (find-files "." "\\.pyc$"))
7383 #t))))
7384 (build-system python-build-system)
7385 (arguments
7386 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7387 ;; or "check", so we must override the build and check phases.
7388 #:phases
7389 (modify-phases %standard-phases
7390 (add-after 'unpack 'use-gcc
7391 (lambda _
7392 (substitute* "setup.py"
7393 (("compiler = new_compiler\\(\\)" line)
7394 (string-append line
7395 "\ncompiler.set_executables(compiler='gcc',"
7396 "compiler_so='gcc',"
7397 "linker_exe='gcc',"
7398 "linker_so='gcc -shared')")))
7399 #t))
7400 (replace 'build
7401 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7402 (invoke "python" "setup.py" "build"
7403 (string-append "--hdf5="
7404 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7405 (replace 'check
7406 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7407 (invoke "python" "setup.py" "check"
7408 (string-append "--hdf5="
7409 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7410 (propagated-inputs
7411 `(("python-numexpr" ,python-numexpr)
7412 ("python-numpy" ,python-numpy)))
7413 (native-inputs
7414 `(("python-cython" ,python-cython)
7415 ("pkg-config" ,pkg-config)))
7416 (inputs
7417 `(("hdf5" ,hdf5)
7418 ("bzip2" ,bzip2)
7419 ("zlib" ,zlib)))
7420 (home-page "http://www.pytables.org/")
7421 (synopsis "Hierarchical datasets for Python")
7422 (description "PyTables is a package for managing hierarchical datasets and
7423designed to efficiently cope with extremely large amounts of data.")
7424 (license license:bsd-3)))
7425
7426(define-public python2-tables
7427 (package-with-python2 python-tables))
7428
7429(define-public python-pyasn1
7430 (package
7431 (name "python-pyasn1")
7432 (version "0.4.3")
7433 (source
7434 (origin
7435 (method url-fetch)
7436 (uri (pypi-uri "pyasn1" version))
7437 (sha256
7438 (base32
7439 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7440 (build-system python-build-system)
7441 (home-page "http://pyasn1.sourceforge.net/")
7442 (synopsis "ASN.1 types and codecs")
7443 (description
7444 "This is an implementation of ASN.1 types and codecs in Python. It is
7445suitable for a wide range of protocols based on the ASN.1 specification.")
7446 (license license:bsd-2)))
7447
7448(define-public python2-pyasn1
7449 (package-with-python2 python-pyasn1))
7450
7451(define-public python-pyasn1-modules
7452 (package
7453 (name "python-pyasn1-modules")
7454 (version "0.2.2")
7455 (source
7456 (origin
7457 (method url-fetch)
7458 (uri (pypi-uri "pyasn1-modules" version))
7459 (sha256
7460 (base32
7461 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7462 (build-system python-build-system)
7463 (propagated-inputs
7464 `(("python-pyasn1" ,python-pyasn1)))
7465 (home-page "https://sourceforge.net/projects/pyasn1/")
7466 (synopsis "ASN.1 codec implementations")
7467 (description
7468 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7469implementations of ASN.1-based codecs and protocols.")
7470 (license license:bsd-3)))
7471
7472(define-public python2-pyasn1-modules
7473 (package-with-python2 python-pyasn1-modules))
7474
7475(define-public python-ipaddress
7476 (package
7477 (name "python-ipaddress")
7478 (version "1.0.22")
7479 (source (origin
7480 (method url-fetch)
7481 (uri (pypi-uri "ipaddress" version))
7482 (sha256
7483 (base32
7484 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7485 (build-system python-build-system)
7486 (home-page "https://github.com/phihag/ipaddress")
7487 (synopsis "IP address manipulation library")
7488 (description
7489 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7490 in Python. This library is used to create, poke at, and manipulate IPv4 and
7491 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7492 module to older versions of Python.")
7493 (license license:psfl)))
7494
7495(define-public python2-ipaddress
7496 (package-with-python2 python-ipaddress))
7497
7498(define-public python2-ipaddr
7499 (package
7500 (name "python2-ipaddr")
7501 (version "2.1.11")
7502 (source
7503 (origin
7504 (method url-fetch)
7505 (uri (pypi-uri "ipaddr" version))
7506 (sha256
7507 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7508 (build-system python-build-system)
7509 (arguments
7510 `(#:python ,python-2 ;version 2 only
7511 #:phases
7512 (modify-phases %standard-phases
7513 (replace 'check
40b8c4e3 7514 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7515 (home-page "https://github.com/google/ipaddr-py")
7516 (synopsis "IP address manipulation library")
7517 (description
7518 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7519IPv6 addresses and networks.
7520
7521For new implementations you may prefer to use the standard module
7522@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7523versions of Python.")
7524 (license license:asl2.0)))
7525
7526(define-public python-idna
7527 (package
7528 (name "python-idna")
e95c9837 7529 (version "2.8")
44d10b1f
RW
7530 (source
7531 (origin
7532 (method url-fetch)
7533 (uri (pypi-uri "idna" version))
7534 (sha256
7535 (base32
e95c9837 7536 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7537 (build-system python-build-system)
7538 (home-page "https://github.com/kjd/idna")
7539 (synopsis "Internationalized domain names in applications")
7540 (description
7541 "This is a library to support the Internationalised Domain Names in
7542Applications (IDNA) protocol as specified in RFC 5891. This version of the
7543protocol is often referred to as “IDNA2008” and can produce different results
7544from the earlier standard from 2003. The library is also intended to act as a
7545suitable drop-in replacement for the “encodings.idna” module that comes with
7546the Python standard library but currently only supports the older 2003
7547specification.")
7548 (license license:bsd-4)))
7549
a76e6a69
JM
7550(define-public python-idna-2.7
7551 (package (inherit python-idna)
7552 (version "2.7")
7553 (source (origin
7554 (method url-fetch)
7555 (uri (pypi-uri "idna" version))
7556 (sha256
7557 (base32
7558 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7559
7560
44d10b1f
RW
7561(define-public python2-idna
7562 (package-with-python2 python-idna))
7563
7564(define-public python-idna-ssl
7565 (package
7566 (name "python-idna-ssl")
7567 (version "1.0.1")
7568 (source
7569 (origin
7570 (method url-fetch)
7571 (uri (pypi-uri "idna-ssl" version))
7572 (sha256
7573 (base32
7574 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7575 (build-system python-build-system)
7576 (arguments
7577 `(#:tests? #f)) ;circular dependency with python-aiohttp
7578 (home-page "https://github.com/aio-libs/idna-ssl")
7579 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7580 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7581domains support.")
7582 (license license:expat)))
7583
7584(define-public python-pretend
7585 (package
7586 (name "python-pretend")
7587 (version "1.0.9")
7588 (source
7589 (origin
7590 (method url-fetch)
9f1f22ee 7591 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7592 (sha256
7593 (base32
7594 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7595 (build-system python-build-system)
7596 (home-page "https://github.com/alex/pretend")
7597 (synopsis "Library for stubbing in Python")
7598 (description
7599 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7600technique for writing tests. You may hear the term mixed up with mocks,
7601fakes, or doubles. Basically, a stub is an object that returns pre-canned
7602responses, rather than doing any computation.")
7603 (license license:bsd-3)))
7604
7605(define-public python2-pretend
7606 (package-with-python2 python-pretend))
7607
7608(define-public python-pip
7609 (package
7610 (name "python-pip")
523ba4b1 7611 (version "19.2.1")
44d10b1f
RW
7612 (source
7613 (origin
7614 (method url-fetch)
7615 (uri (pypi-uri "pip" version))
7616 (sha256
7617 (base32
523ba4b1 7618 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
44d10b1f
RW
7619 (build-system python-build-system)
7620 (arguments
7621 '(#:tests? #f)) ; there are no tests in the pypi archive.
7622 (home-page "https://pip.pypa.io/")
7623 (synopsis "Package manager for Python software")
7624 (description
7625 "Pip is a package manager for Python software, that finds packages on the
7626Python Package Index (PyPI).")
7627 (license license:expat)))
7628
7629(define-public python2-pip
7630 (package-with-python2 python-pip))
7631
7632(define-public python-tlsh
7633 (package
7634 (name "python-tlsh")
7635 (version "3.4.5")
7636 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7637 (source
7638 (origin
7639 (method git-fetch)
7640 (uri (git-reference
7641 (url "https://github.com/trendmicro/tlsh.git")
7642 (commit (string-append "v" version))))
7643 (file-name (git-file-name name version))
7644 (sha256
7645 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7646 (build-system cmake-build-system)
7647 (arguments
7648 '(#:out-of-source? #f
7649 #:phases (modify-phases %standard-phases
7650 (replace
7651 'install
7652 (lambda* (#:key outputs #:allow-other-keys)
7653 ;; Build and install the Python bindings. The underlying
7654 ;; C++ library is apparently not meant to be installed.
7655 (let ((out (assoc-ref outputs "out")))
7656 (with-directory-excursion "py_ext"
7657 (and (system* "python" "setup.py" "build")
7658 (system* "python" "setup.py" "install"
7659 (string-append "--prefix=" out))))))))))
7660 (inputs `(("python" ,python-wrapper))) ;for the bindings
7661 (synopsis "Fuzzy matching library for Python")
7662 (description
7663 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7664Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7665value which can be used for similarity comparisons. Similar objects have
7666similar hash values, which allows for the detection of similar objects by
7667comparing their hash values. The byte stream should have a sufficient amount
7668of complexity; for example, a byte stream of identical bytes will not generate
7669a hash value.")
7670 (license license:asl2.0)))
7671
7672(define-public python2-tlsh
7673 (package
7674 (inherit python-tlsh)
7675 (name "python2-tlsh")
7676 (inputs `(("python" ,python-2)))))
7677
7678(define-public python-termcolor
7679 (package
7680 (name "python-termcolor")
7681 (version "1.1.0")
7682 (source
7683 (origin
7684 (method url-fetch)
7685 (uri (pypi-uri "termcolor" version))
7686 (sha256
7687 (base32
7688 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7689 (build-system python-build-system)
7690 (arguments
7691 ;; There are no tests.
7692 `(#:tests? #f))
7693 (home-page "https://pypi.python.org/pypi/termcolor")
7694 (synopsis "ANSII Color formatting for terminal output")
7695 (description
7696 "This package provides ANSII Color formatting for output in terminals.")
7697 (license license:expat)))
7698
7699(define-public python2-termcolor
7700 (package-with-python2 python-termcolor))
7701
7702(define-public python-libarchive-c
7703 (package
7704 (name "python-libarchive-c")
7705 (version "2.8")
7706 (source (origin
7707 (method url-fetch)
7708 (uri (pypi-uri "libarchive-c" version))
7709 (sha256
7710 (base32
7711 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7712 (build-system python-build-system)
7713 (arguments
7714 '(#:phases (modify-phases %standard-phases
7715 (add-before
7716 'build 'reference-libarchive
7717 (lambda* (#:key inputs #:allow-other-keys)
7718 ;; Retain the absolute file name of libarchive.so.
7719 (let ((libarchive (assoc-ref inputs "libarchive")))
7720 (substitute* "libarchive/ffi.py"
7721 (("find_library\\('archive'\\)")
7722 (string-append "'" libarchive
7723 "/lib/libarchive.so'"))))))
7724 (replace 'check
7725 (lambda _ (invoke "pytest" "-vv"))))))
7726 (native-inputs
7727 `(("python-mock" ,python-mock)
7728 ("python-pytest" ,python-pytest)))
7729 (inputs
7730 `(("libarchive" ,libarchive)))
7731 (home-page "https://github.com/Changaco/python-libarchive-c")
7732 (synopsis "Python interface to libarchive")
7733 (description
7734 "This package provides Python bindings to libarchive, a C library to
7735access possibly compressed archives in many different formats. It uses
7736Python's @code{ctypes} foreign function interface (FFI).")
7737 (license license:lgpl2.0+)))
7738
7739(define-public python2-libarchive-c
7740 (package-with-python2 python-libarchive-c))
7741
7742(define-public python-file
7743 (package
7744 (inherit file)
7745 (name "python-file")
7746 (build-system python-build-system)
7747 (arguments
7748 '(#:tests? #f ;no tests
7749 #:configure-flags '("--single-version-externally-managed" "--root=/")
7750 #:phases (modify-phases %standard-phases
7751 (add-before 'build 'change-directory
7752 (lambda _
7753 (chdir "python")
7754 #t))
7755 (add-before 'build 'set-library-file-name
7756 (lambda* (#:key inputs #:allow-other-keys)
7757 (let ((file (assoc-ref inputs "file")))
7758 (substitute* "magic.py"
7759 (("find_library\\('magic'\\)")
7760 (string-append "'" file "/lib/libmagic.so'")))
7761 #t))))))
7762 (inputs `(("file" ,file)))
528ea990
LC
7763 (native-inputs (if (%current-target-system)
7764 `(("self" ,this-package))
7765 '()))
44d10b1f
RW
7766 (synopsis "Python bindings to the libmagic file type guesser. Note that
7767this module and the python-magic module both provide a \"magic.py\" file;
7768these two modules, which are different and were developed separately, both
7769serve the same purpose: provide Python bindings for libmagic.")))
7770
7771(define-public python2-file
7772 (package-with-python2 python-file))
7773
7774(define-public python-debian
7775 (package
7776 (name "python-debian")
7777 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7778 (version "0.1.36")
44d10b1f
RW
7779 (source
7780 (origin
9f74bd31
VC
7781 ;; Use git-fetch, as pypi doesn't include test suite.
7782 (method git-fetch)
7783 (uri (git-reference
7784 (url home-page)
7785 (commit version)))
7786 (file-name (git-file-name name version))
44d10b1f
RW
7787 (sha256
7788 (base32
9f74bd31 7789 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7790 (build-system python-build-system)
9f74bd31
VC
7791 (arguments
7792 `(#:phases (modify-phases %standard-phases
7793 (add-after 'unpack 'remove-debian-specific-tests
7794 ;; python-apt, apt and dpkg are not yet available in guix,
7795 ;; and these tests heavily depend on them.
7796 (lambda _
7797 (delete-file "lib/debian/tests/test_deb822.py")
7798 (delete-file "lib/debian/tests/test_debfile.py")
7799 #t)))))
44d10b1f 7800 (propagated-inputs
9f74bd31
VC
7801 `(("python-six" ,python-six)
7802 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7803 (synopsis "Debian package related modules")
7804 (description
7805 ;; XXX: Use @enumerate instead of @itemize to work around
7806 ;; <http://bugs.gnu.org/21772>.
7807 "This package provides Python modules that abstract many formats of
7808Debian-related files, such as:
7809
7810@enumerate
7811@item Debtags information;
7812@item @file{debian/changelog} files;
7813@item packages files, pdiffs;
7814@item control files of single or multiple RFC822-style paragraphs---e.g.
7815 @file{debian/control}, @file{.changes}, @file{.dsc};
7816@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7817 contained files and meta-information.
7818@end enumerate\n")
7819
7820 ;; Modules are either GPLv2+ or GPLv3+.
7821 (license license:gpl3+)))
7822
7823(define-public python2-debian
7824 (package-with-python2 python-debian))
7825
7826(define-public python-nbformat
7827 (package
7828 (name "python-nbformat")
7829 (version "4.4.0")
7830 (source
7831 (origin
7832 (method url-fetch)
7833 (uri (pypi-uri "nbformat" version))
7834 (sha256
7835 (base32
7836 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7837 (build-system python-build-system)
7838 (arguments `(#:tests? #f)) ; no test target
7839 (propagated-inputs
7840 `(("python-ipython-genutils" ,python-ipython-genutils)
7841 ("python-jsonschema" ,python-jsonschema)
7842 ("python-jupyter-core" ,python-jupyter-core)
7843 ("python-traitlets" ,python-traitlets)))
7844 (home-page "http://jupyter.org")
7845 (synopsis "Jupyter Notebook format")
7846 (description "This package provides the reference implementation of the
7847Jupyter Notebook format and Python APIs for working with notebooks.")
7848 (license license:bsd-3)))
7849
7850(define-public python2-nbformat
7851 (package-with-python2 python-nbformat))
7852
7853(define-public python-bleach
7854 (package
7855 (name "python-bleach")
ff0efc8f 7856 (version "3.1.0")
44d10b1f
RW
7857 (source
7858 (origin
7859 (method url-fetch)
7860 (uri (pypi-uri "bleach" version))
7861 (sha256
7862 (base32
ff0efc8f 7863 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
44d10b1f
RW
7864 (build-system python-build-system)
7865 (propagated-inputs
ff0efc8f 7866 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
7867 ("python-six" ,python-six)))
7868 (native-inputs
ff0efc8f
MB
7869 `(("python-pytest" ,python-pytest)
7870 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
7871 (home-page "https://github.com/jsocol/bleach")
7872 (synopsis "Whitelist-based HTML-sanitizing tool")
7873 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7874 (license license:asl2.0)))
7875
7876(define-public python2-bleach
7877 (package-with-python2 python-bleach))
7878
7879(define-public python-entrypoints
7880 (package
7881 (name "python-entrypoints")
a7f1b718 7882 (version "0.3")
44d10b1f
RW
7883 (source
7884 (origin
7885 (method url-fetch)
a7f1b718 7886 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7887 (sha256
7888 (base32
a7f1b718 7889 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7890 (build-system python-build-system)
7891 ;; The package does not come with a setup.py file, so we have to generate
7892 ;; one ourselves.
7893 (arguments
7894 `(#:tests? #f
7895 #:phases
7896 (modify-phases %standard-phases
7897 (add-after 'unpack 'create-setup.py
7898 (lambda _
7899 (call-with-output-file "setup.py"
7900 (lambda (port)
7901 (format port "\
7902from setuptools import setup
7903setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7904" ,version))))))))
7905 (home-page "https://github.com/takluyver/entrypoints")
7906 (synopsis "Discover and load entry points from installed Python packages")
7907 (description "Entry points are a way for Python packages to advertise
7908objects with some common interface. The most common examples are
7909@code{console_scripts} entry points, which define shell commands by
7910identifying a Python function to run. The @code{entrypoints} module contains
7911functions to find and load entry points.")
7912 (license license:expat)))
7913
7914(define-public python2-entrypoints
7915 (package-with-python2 python-entrypoints))
7916
7917(define-public python-nbconvert
7918 (package
7919 (name "python-nbconvert")
7920 (version "5.0.0b1")
7921 (source
7922 (origin
7923 (method url-fetch)
7924 (uri (pypi-uri "nbconvert" version))
7925 (sha256
7926 (base32
7927 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7928 (build-system python-build-system)
7929 (arguments
7930 `(;; The "bdist_egg" target is disabled by default, causing the installation
7931 ;; to fail.
7932 #:configure-flags (list "bdist_egg")
7933 ;; FIXME: 5 failures, 40 errors.
7934 #:tests? #f))
7935 ;; #:phases
7936 ;; (modify-phases %standard-phases
7937 ;; (replace 'check
7938 ;; (lambda _
7939 ;; (zero? (system* "py.test" "-v")))))
7940 (native-inputs
7941 `(("python-pytest" ,python-pytest)))
7942 (propagated-inputs
7943 `(("python-bleach" ,python-bleach)
7944 ("python-entrypoints" ,python-entrypoints)
7945 ("python-jinja2" ,python-jinja2)
7946 ("python-jupyter-core" ,python-jupyter-core)
7947 ("python-mistune" ,python-mistune)
7948 ("python-nbformat" ,python-nbformat)
7949 ("python-pygments" ,python-pygments)
7950 ("python-traitlets" ,python-traitlets)))
7951 (home-page "http://jupyter.org")
7952 (synopsis "Converting Jupyter Notebooks")
7953 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7954notebooks to various other formats via Jinja templates. It allows you to
7955convert an @code{.ipynb} notebook file into various static formats including:
7956
7957@enumerate
7958@item HTML
7959@item LaTeX
7960@item PDF
7961@item Reveal JS
7962@item Markdown (md)
7963@item ReStructured Text (rst)
7964@item executable script
7965@end enumerate\n")
7966 (license license:bsd-3)))
7967
7968(define-public python2-nbconvert
7969 (package-with-python2 python-nbconvert))
7970
44d10b1f
RW
7971(define-public python-notebook
7972 (package
7973 (name "python-notebook")
7974 (version "5.7.4")
7975 (source (origin
7976 (method url-fetch)
7977 (uri (pypi-uri "notebook" version))
7978 (sha256
7979 (base32
7980 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7981 (build-system python-build-system)
7982 (arguments
7983 `(#:phases
7984 (modify-phases %standard-phases
7985 (replace 'check
7986 (lambda _
7987 ;; These tests require a browser
7988 (delete-file-recursively "notebook/tests/selenium")
7989 ;; Some tests need HOME
7990 (setenv "HOME" "/tmp")
7991 ;; This file contains "warningfilters", which are not supported
7992 ;; by this version of nose.
7993 (delete-file "setup.cfg")
7994 (with-directory-excursion "/tmp"
7995 (invoke "nosetests" "-v"))
7996 #t)))))
7997 (propagated-inputs
7998 `(("python-jupyter-core" ,python-jupyter-core)
7999 ("python-nbformat" ,python-nbformat)
8000 ("python-nbconvert" ,python-nbconvert)
8001 ("python-prometheus-client" ,python-prometheus-client)
8002 ("python-send2trash" ,python-send2trash)
8003 ("python-terminado" ,python-terminado)))
8004 (native-inputs
8005 `(("python-nose" ,python-nose)
8006 ("python-sphinx" ,python-sphinx)
8007 ("python-requests" ,python-requests)))
8008 (home-page "http://jupyter.org/")
8009 (synopsis "Web-based notebook environment for interactive computing")
8010 (description
8011 "The Jupyter HTML notebook is a web-based notebook environment for
8012interactive computing.")
8013 (properties `((python2-variant . ,(delay python2-notebook))))
8014 (license license:bsd-3)))
8015
8016(define-public python2-notebook
8017 (let ((base (package-with-python2
8018 (strip-python2-variant python-notebook))))
8019 (package (inherit base)
8020 (native-inputs
8021 `(("python2-mock" ,python2-mock)
8022 ,@(package-native-inputs base)))
8023 (arguments
8024 (substitute-keyword-arguments (package-arguments base)
8025 ((#:phases phases)
8026 `(modify-phases ,phases
8027 (add-before 'check 'disable-test-case
8028 ;; The test requires network access to localhost. Curiously it
8029 ;; fails with Python 2 only. Simply make the test-case return
8030 ;; immediately.
8031 (lambda _
8032 (substitute*
8033 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8034 (("formats = self.nbconvert_api") "return #")))))))))))
8035
8036(define-public python-widgetsnbextension
8037 (package
8038 (name "python-widgetsnbextension")
8039 (version "3.4.2")
8040 (source
8041 (origin
8042 (method url-fetch)
8043 (uri (pypi-uri "widgetsnbextension" version))
8044 (sha256
8045 (base32
8046 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
8047 (build-system python-build-system)
8048 (propagated-inputs
8049 `(("python-ipykernel" ,python-ipykernel)
8050 ("python-notebook" ,python-notebook)))
8051 (native-inputs
8052 `(("python-certifi" ,python-certifi)
8053 ("python-nose" ,python-nose)))
8054 (home-page "https://ipython.org")
8055 (synopsis "IPython HTML widgets for Jupyter")
8056 (description "This package provides interactive HTML widgets for Jupyter
8057notebooks.")
8058 (license license:bsd-3)))
8059
8060(define-public python2-widgetsnbextension
8061 (package-with-python2 python-widgetsnbextension))
8062
8063(define-public python-ipywidgets
8064 (package
8065 (name "python-ipywidgets")
8066 (version "5.2.2")
8067 (source
8068 (origin
8069 (method url-fetch)
8070 (uri (pypi-uri "ipywidgets" version))
8071 (sha256
8072 (base32
8073 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8074 (build-system python-build-system)
8075 (propagated-inputs
8076 `(("python-ipython" ,python-ipython)
8077 ("python-traitlets" ,python-traitlets)
8078 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8079 (native-inputs
8080 `(("python-nose" ,python-nose)
8081 ("python-pytest" ,python-pytest)))
8082 (home-page "https://ipython.org")
8083 (synopsis "IPython HTML widgets for Jupyter")
8084 (description "Ipywidgets are interactive HTML widgets for Jupyter
8085notebooks and the IPython kernel. Notebooks come alive when interactive
8086widgets are used. Users gain control of their data and can visualize changes
8087in the data.")
8088 (license license:bsd-3)))
8089
8090(define-public python2-ipywidgets
8091 (package-with-python2 python-ipywidgets))
8092
8093(define-public python-jupyter-console
8094 (package
8095 (name "python-jupyter-console")
becb9cbf 8096 (version "6.0.0")
44d10b1f
RW
8097 (source
8098 (origin
8099 (method url-fetch)
8100 (uri (pypi-uri "jupyter_console" version))
8101 (sha256
8102 (base32
becb9cbf 8103 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 8104 (build-system python-build-system)
44d10b1f
RW
8105 (propagated-inputs
8106 `(("python-ipykernel" ,python-ipykernel)
8107 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 8108 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
8109 ("python-pygments" ,python-pygments)))
8110 (native-inputs
8111 `(("python-nose" ,python-nose)))
8112 (home-page "https://jupyter.org")
8113 (synopsis "Jupyter terminal console")
8114 (description "This package provides a terminal-based console frontend for
8115Jupyter kernels. It also allows for console-based interaction with non-Python
8116Jupyter kernels such as IJulia and IRKernel.")
8117 (license license:bsd-3)))
8118
8119(define-public python2-jupyter-console
8e590c81
RW
8120 (package
8121 (name "python2-jupyter-console")
8122 (version "5.2.0")
8123 (source
8124 (origin
8125 (method url-fetch)
8126 (uri (pypi-uri "jupyter_console" version))
8127 (sha256
8128 (base32
8129 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8130 (build-system python-build-system)
8131 ;; Tests only run in an TTY.
8132 (arguments `(#:tests? #f))
8133 (propagated-inputs
8134 `(("python2-ipykernel" ,python2-ipykernel)
8135 ("python2-jupyter-client" ,python2-jupyter-client)
8136 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8137 ("python2-pygments" ,python2-pygments)))
8138 (native-inputs
8139 `(("python2-nose" ,python2-nose)))
8140 (home-page "https://jupyter.org")
8141 (synopsis "Jupyter terminal console")
8142 (description "This package provides a terminal-based console frontend for
8143Jupyter kernels. It also allows for console-based interaction with non-Python
8144Jupyter kernels such as IJulia and IRKernel.")
8145 (license license:bsd-3)))
44d10b1f
RW
8146
8147;; The python-ipython and python-jupyter-console require each other. To get
8148;; the functionality in both packages working, strip down the
8149;; python-jupyter-console package when using it as an input to python-ipython.
8150(define python-jupyter-console-minimal
8151 (package
8152 (inherit python-jupyter-console)
8153 (name "python-jupyter-console-minimal")
8154 (arguments
8155 (substitute-keyword-arguments
8156 (package-arguments python-jupyter-console)
8157 ((#:phases phases)
8158 `(modify-phases ,phases
8159 (add-after 'install 'delete-bin
8160 (lambda* (#:key outputs #:allow-other-keys)
8161 ;; Delete the bin files, to avoid conflicts in profiles
8162 ;; where python-ipython and python-jupyter-console are
8163 ;; both present.
8164 (delete-file-recursively
8165 (string-append
8166 (assoc-ref outputs "out") "/bin"))))))))
8167 ;; Remove the python-ipython propagated input, to avoid the cycle
8168 (propagated-inputs
8169 (alist-delete
8170 "python-ipython"
8171 (package-propagated-inputs python-jupyter-console)))))
8172
8173(define-public python-qtconsole
8174 (package
8175 (name "python-qtconsole")
8176 (version "4.4.3")
8177 (source
8178 (origin
8179 (method url-fetch)
8180 (uri (pypi-uri "qtconsole" version))
8181 (sha256
8182 (base32
8183 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8184 (build-system python-build-system)
8185 (arguments
8186 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8187 ;; but we only have the LTS version 5.x. This means that there might be
8188 ;; runtime errors, but since this is a dependency of the Jupyter package,
8189 ;; and Jupyter can be used without the qtconsole we can overlook this for
8190 ;; now.
8191 `(#:tests? #f
8192 #:phases
8193 (modify-phases %standard-phases
8194 (add-before 'check 'pre-check
8195 (lambda _
8196 (setenv "QT_QPA_PLATFORM" "offscreen")
8197 #t)))))
8198 (propagated-inputs
8199 `(("python-ipykernel" ,python-ipykernel)
8200 ("python-ipython" ,python-ipython)))
8201 (native-inputs
8202 `(("python-pytest" ,python-pytest)))
8203 (home-page "http://jupyter.org")
8204 (synopsis "Jupyter Qt console")
8205 (description "This package provides a Qt-based console for Jupyter with
8206support for rich media output.")
8207 (license license:bsd-3)))
8208
6ec87223
VC
8209(define-public python-jsbeautifier
8210 (package
8211 (name "python-jsbeautifier")
8212 (version "1.10.2")
8213 (home-page "https://github.com/beautify-web/js-beautify")
8214 (source (origin
8215 (method git-fetch)
8216 (uri (git-reference
8217 (url home-page)
8218 (commit (string-append "v" version))))
8219 (file-name (git-file-name name version))
8220 (sha256
8221 (base32
8222 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8223 (build-system python-build-system)
8224 (arguments
8225 `(#:phases (modify-phases %standard-phases
8226 (add-after 'unpack 'chdir
8227 (lambda _
8228 ;; The upstream Git repository contains all the code,
8229 ;; but this package only builds the python code.
8230 (chdir "python")
8231 #t))
8232 (add-after 'unpack 'patch-python-six-requirements
8233 (lambda _
8234 (substitute* "python/setup.py"
8235 (("six>=1.12.0")
8236 "six>=1.11.0"))
8237 #t)))))
8238 (propagated-inputs
8239 `(("python-editorconfig" ,python-editorconfig)
8240 ("python-six" ,python-six)))
8241 (native-inputs
8242 `(("python-pytest" ,python-pytest)))
8243 (synopsis "JavaScript unobfuscator and beautifier")
8244 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8245popular online obfuscators.")
8246 (license license:expat)))
8247
44d10b1f
RW
8248(define-public jupyter
8249 (package
8250 (name "jupyter")
8251 (version "1.0.0")
8252 (source
8253 (origin
8254 (method url-fetch)
8255 (uri (pypi-uri "jupyter" version))
8256 (sha256
8257 (base32
8258 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8259 (build-system python-build-system)
8260 (arguments '(#:tests? #f)) ; there are none.
8261 (propagated-inputs
8262 `(("python-ipykernel" ,python-ipykernel)
8263 ("python-ipywidgets" ,python-ipywidgets)
8264 ("python-jupyter-console" ,python-jupyter-console)
8265 ("python-nbconvert" ,python-nbconvert)
8266 ("python-notebook" ,python-notebook)
8267 ("python-qtconsole" ,python-qtconsole)))
8268 (native-search-paths
8269 (list (search-path-specification
8270 (variable "JUPYTER_PATH")
8271 (files '("share/jupyter")))))
8272 (home-page "https://jupyter.org")
8273 (synopsis "Web application for interactive documents")
8274 (description
8275 "The Jupyter Notebook is a web application that allows you to create and
8276share documents that contain live code, equations, visualizations and
8277explanatory text. Uses include: data cleaning and transformation, numerical
8278simulation, statistical modeling, machine learning and much more.")
8279 (license license:bsd-3)))
8280
8281(define-public python-chardet
8282 (package
8283 (name "python-chardet")
8284 (version "3.0.4")
8285 (source
8286 (origin
8287 (method url-fetch)
8288 (uri (pypi-uri "chardet" version))
8289 (sha256
8290 (base32
8291 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8292 (native-inputs
8293 `(("python-hypothesis" ,python-hypothesis)
8294 ("python-pytest" ,python-pytest)
8295 ("python-pytest-runner" ,python-pytest-runner)))
8296 (build-system python-build-system)
3d369407
MB
8297 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8298 (arguments `(#:tests? #f))
44d10b1f
RW
8299 (home-page "https://github.com/chardet/chardet")
8300 (synopsis "Universal encoding detector for Python 2 and 3")
8301 (description
8302 "This package provides @code{chardet}, a Python module that can
8303automatically detect a wide range of file encodings.")
8304 (license license:lgpl2.1+)))
8305
8306(define-public python2-chardet
8307 (package-with-python2 python-chardet))
8308
8309(define-public python-docopt
8310 (package
8311 (name "python-docopt")
8312 (version "0.6.2")
8313 (source
8314 (origin
8315 (method url-fetch)
8316 ;; The release on PyPI does not include tests.
8317 (uri (string-append
8318 "https://github.com/docopt/docopt/archive/"
8319 version ".tar.gz"))
8320 (file-name (string-append name "-" version ".tar.gz"))
8321 (sha256
8322 (base32
8323 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8324 (build-system python-build-system)
8325 (native-inputs
8326 `(("python-pytest" ,python-pytest)))
8327 (arguments
8328 `(#:phases
8329 (modify-phases %standard-phases
8330 (replace 'check
8331 (lambda _ (invoke "py.test"))))))
8332 (home-page "http://docopt.org")
8333 (synopsis "Command-line interface description language for Python")
8334 (description "This library allows the user to define a command-line
8335interface from a program's help message rather than specifying it
4ca7207b 8336programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8337@code{argparse}.")
8338 (license license:expat)))
8339
8340(define-public python2-docopt
8341 (package-with-python2 python-docopt))
8342
8343(define-public python-pythondialog
8344 (package
8345 (name "python-pythondialog")
8346 (version "3.4.0")
8347 (source
8348 (origin
8349 (method url-fetch)
8350 (uri (pypi-uri "pythondialog" version))
8351 (sha256
8352 (base32
8353 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8354 (build-system python-build-system)
8355 (arguments
8356 `(#:phases
8357 (modify-phases %standard-phases
8358 (add-after 'unpack 'patch-path
8359 (lambda* (#:key inputs #:allow-other-keys)
8360 (let* ((dialog (assoc-ref inputs "dialog")))
8361 ;; Since this library really wants to grovel the search path, we
8362 ;; must hardcode dialog's store path into it.
8363 (substitute* "dialog.py"
8364 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8365 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8366 #t))))
8367 #:tests? #f)) ; no test suite
8368 (propagated-inputs
8369 `(("dialog" ,dialog)))
8370 (home-page "http://pythondialog.sourceforge.net/")
8371 (synopsis "Python interface to the UNIX dialog utility")
8372 (description "A Python wrapper for the dialog utility. Its purpose is to
8373provide an easy to use, pythonic and comprehensive Python interface to dialog.
8374This allows one to make simple text-mode user interfaces on Unix-like systems")
8375 (license license:lgpl2.1)
8376 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8377
8378(define-public python2-pythondialog
8379 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8380 (package
8381 (inherit base)
8382 (version (package-version python-pythondialog))
8383 (source (origin
8384 (method url-fetch)
8385 (uri (pypi-uri "python2-pythondialog" version))
8386 (sha256
8387 (base32
8388 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8389
8390(define-public python-configobj
8391 (package
8392 (name "python-configobj")
8393 (version "5.0.6")
8394 (source (origin
8395 (method url-fetch)
b0758fbb 8396 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8397 (sha256
8398 (base32
8399 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8400 ;; Patch setup.py so it looks for python-setuptools, which is
8401 ;; required to parse the keyword 'install_requires' in setup.py.
8402 (patches (search-patches "python-configobj-setuptools.patch"))))
8403 (build-system python-build-system)
8404 (propagated-inputs
8405 `(("python-six" ,python-six)))
8406 (synopsis "Config file reading, writing and validation")
8407 (description "ConfigObj is a simple but powerful config file reader and
8408writer: an ini file round tripper. Its main feature is that it is very easy to
8409use, with a straightforward programmer’s interface and a simple syntax for
8410config files.")
8411 (home-page "https://github.com/DiffSK/configobj")
8412 (license license:bsd-3)))
8413
8414(define-public python2-configobj
8415 (package-with-python2 python-configobj))
8416
8417(define-public python-configargparse
8418 (package
8419 (name "python-configargparse")
86ae491f 8420 (version "0.14.0")
44d10b1f
RW
8421 (source (origin
8422 (method url-fetch)
8423 (uri (pypi-uri "ConfigArgParse" version))
8424 (sha256
8425 (base32
86ae491f 8426 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8427 (build-system python-build-system)
8428 (native-inputs
8429 `(("python-pyyaml" ,python-pyyaml)))
8430 (arguments
8431 `(#:phases
8432 (modify-phases %standard-phases
8433 (replace 'check
8434 (lambda _
8435 ;; Bypass setuptools-shim because one test relies on "setup.py"
8436 ;; being the first argument passed to the python call.
8437 ;;
8438 ;; NOTE: Many tests do not run because they rely on Python's
8439 ;; built-in test.test_argparse, but we remove the unit tests from
8440 ;; our Python installation.
8441 (invoke "python" "setup.py" "test"))))))
8442 (synopsis "Replacement for argparse")
8443 (description "A drop-in replacement for argparse that allows options to also
8444be set via config files and/or environment variables.")
8445 (home-page "https://github.com/bw2/ConfigArgParse")
8446 (license license:expat)))
8447
8448(define-public python2-configargparse
8449 (package-with-python2 python-configargparse))
8450
8451(define-public python-argparse-manpage
8452 (package
8453 (name "python-argparse-manpage")
8454 (version "1.1")
8455 (source
8456 (origin
8457 (method url-fetch)
8458 (uri (pypi-uri "argparse-manpage" version))
8459 (sha256
8460 (base32
8461 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8462 (build-system python-build-system)
8463 (home-page "https://github.com/praiskup/argparse-manpage")
8464 (synopsis "Build manual page from Python's ArgumentParser object")
8465 (description
8466 "This package provides tools to build manual pages from Python's
8467@code{ArgumentParser} object.")
8468 (license license:asl2.0)))
8469
3e8f76d8
RW
8470(define-public python-contextlib2
8471 (package
8472 (name "python-contextlib2")
8473 (version "0.5.5")
8474 (source
8475 (origin
8476 (method url-fetch)
8477 (uri (pypi-uri "contextlib2" version))
8478 (sha256
8479 (base32
8480 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8481 (build-system python-build-system)
8482 (home-page "http://contextlib2.readthedocs.org/")
8483 (synopsis "Tools for decorators and context managers")
8484 (description "This module is primarily a backport of the Python
84853.2 contextlib to earlier Python versions. Like contextlib, it
8486provides utilities for common tasks involving decorators and context
8487managers. It also contains additional features that are not part of
8488the standard library.")
8489 (license license:psfl)))
8490
44d10b1f
RW
8491(define-public python2-contextlib2
8492 (package
8493 (name "python2-contextlib2")
8494 (version "0.5.5")
8495 (source
8496 (origin
8497 (method url-fetch)
8498 (uri (pypi-uri "contextlib2" version))
8499 (sha256
8500 (base32
8501 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8502 (build-system python-build-system)
8503 (arguments
8504 `(#:python ,python-2
8505 #:phases
8506 (modify-phases %standard-phases
8507 (replace 'check
8508 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8509 (native-inputs
8510 `(("python2-unittest2" ,python2-unittest2)))
8511 (home-page "http://contextlib2.readthedocs.org/")
8512 (synopsis "Tools for decorators and context managers")
8513 (description "This module is primarily a backport of the Python
85143.2 contextlib to earlier Python versions. Like contextlib, it
8515provides utilities for common tasks involving decorators and context
8516managers. It also contains additional features that are not part of
8517the standard library.")
8518 (license license:psfl)))
8519
8520(define-public python-texttable
8521 (package
8522 (name "python-texttable")
52cc4892 8523 (version "0.9.1")
44d10b1f
RW
8524 (source
8525 (origin
8526 (method url-fetch)
8527 (uri (pypi-uri "texttable" version))
8528 (sha256
8529 (base32
52cc4892 8530 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8531 (build-system python-build-system)
8532 (arguments '(#:tests? #f)) ; no tests
8533 (home-page "https://github.com/foutaise/texttable/")
8534 (synopsis "Python module for creating simple ASCII tables")
8535 (description "Texttable is a Python module for creating simple ASCII
8536tables.")
8537 (license license:lgpl2.1+)))
8538
8539(define-public python2-texttable
8540 (package-with-python2 python-texttable))
8541
8542(define-public python-atomicwrites
8543 (package
8544 (name "python-atomicwrites")
14f10479 8545 (version "1.3.0")
44d10b1f
RW
8546 (source (origin
8547 (method url-fetch)
8548 (uri (pypi-uri "atomicwrites" version))
8549 (sha256
8550 (base32
14f10479 8551 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8552 (build-system python-build-system)
8553 (synopsis "Atomic file writes in Python")
8554 (description "Library for atomic file writes using platform dependent tools
8555for atomic file system operations.")
8556 (home-page "https://github.com/untitaker/python-atomicwrites")
8557 (license license:expat)))
8558
8559(define-public python2-atomicwrites
8560 (package-with-python2 python-atomicwrites))
8561
8562(define-public python-click-threading
8563 (package
8564 (name "python-click-threading")
8565 (version "0.4.4")
8566 (source (origin
8567 (method url-fetch)
8568 (uri (pypi-uri "click-threading" version))
8569 (sha256
8570 (base32
8571 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8572 (build-system python-build-system)
8573 (propagated-inputs
8574 `(("python-click" ,python-click)))
8575 (synopsis "Utilities for multithreading in Click")
8576 (description "This package provides utilities for multithreading in Click
8577applications.")
8578 (home-page "https://github.com/click-contrib/click-threading")
8579 (license license:expat)))
8580
8581(define-public python-click-log
8582 (package
8583 (name "python-click-log")
8584 (version "0.3.2")
8585 (source (origin
8586 (method url-fetch)
8587 (uri (pypi-uri "click-log" version))
8588 (sha256
8589 (base32
8590 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8591 (build-system python-build-system)
8592 (propagated-inputs
8593 `(("python-click" ,python-click)))
8594 (synopsis "Logging for click applications")
8595 (description "This package provides a Python library for logging Click
8596applications.")
8597 (home-page "https://github.com/click-contrib/click-log")
8598 (license license:expat)))
8599
8600(define-public python-apipkg
8601 (package
8602 (name "python-apipkg")
8603 (version "1.4")
8604 (source (origin
8605 (method url-fetch)
8606 (uri (pypi-uri "apipkg" version))
8607 (sha256
8608 (base32
8609 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8610 (build-system python-build-system)
8611 (native-inputs
8612 `(("python-pytest" ,python-pytest)))
8613 (synopsis "Namespace control and lazy-import mechanism")
8614 (description "With apipkg you can control the exported namespace of a Python
8615package and greatly reduce the number of imports for your users. It is a small
8616pure Python module that works on virtually all Python versions.")
8617 (home-page "https://github.com/pytest-dev/apipkg")
8618 (license license:expat)))
8619
8620(define-public python2-apipkg
8621 (package-with-python2 python-apipkg))
8622
8623(define-public python-execnet
8624 (package
8625 (name "python-execnet")
8626 (version "1.4.1")
8627 (source (origin
8628 (method url-fetch)
8629 (uri (pypi-uri "execnet" version))
8630 (sha256
8631 (base32
8632 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8633 (build-system python-build-system)
8634 (arguments
8635 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8636 ;; The two test failures are caused by the lack of an `ssh` executable.
8637 ;; The test suite can be run with pytest after the 'install' phase.
8638 #:tests? #f))
8639 (native-inputs
8640 `(("python-pytest" ,python-pytest)
8641 ("python-setuptools-scm" ,python-setuptools-scm)))
8642 (propagated-inputs
8643 `(("python-apipkg" ,python-apipkg)))
8644 (synopsis "Rapid multi-Python deployment")
8645 (description "Execnet provides a share-nothing model with
8646channel-send/receive communication for distributing execution across many
8647Python interpreters across version, platform and network barriers. It has a
8648minimal and fast API targeting the following uses:
8649@enumerate
8650@item distribute tasks to (many) local or remote CPUs
8651@item write and deploy hybrid multi-process applications
8652@item write scripts to administer multiple environments
8653@end enumerate")
8654 (home-page "http://codespeak.net/execnet/")
8655 (license license:expat)))
8656
8657(define-public python2-execnet
8658 (package-with-python2 python-execnet))
8659
8660(define-public python-icalendar
8661 (package
8662 (name "python-icalendar")
8663 (version "4.0.3")
8664 (source (origin
8665 (method url-fetch)
8666 (uri (pypi-uri "icalendar" version))
8667 (sha256
8668 (base32
8669 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8670 (build-system python-build-system)
8671 (propagated-inputs
8672 `(("python-dateutil" ,python-dateutil)
8673 ("python-pytz" ,python-pytz)))
8674 (synopsis "Python library for parsing iCalendar files")
8675 (description "The icalendar package is a parser/generator of iCalendar
8676files for use with Python.")
8677 (home-page "https://github.com/collective/icalendar")
8678 (license license:bsd-2)))
8679
44d10b1f
RW
8680(define-public python-args
8681 (package
8682 (name "python-args")
8683 (version "0.1.0")
8684 (source (origin
8685 (method url-fetch)
8686 (uri (pypi-uri "args" version))
8687 (sha256
8688 (base32
8689 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8690 (build-system python-build-system)
8691 (home-page "https://github.com/kennethreitz/args")
8692 (synopsis "Command-line argument parser")
8693 (description
8694 "This library provides a Python module to parse command-line arguments.")
8695 (license license:bsd-3)))
8696
8697(define-public python2-args
8698 (package-with-python2 python-args))
8699
8700(define-public python-clint
8701 (package
8702 (name "python-clint")
8703 (version "0.5.1")
8704 (source (origin
8705 (method url-fetch)
8706 (uri (pypi-uri "clint" version))
8707 (sha256
8708 (base32
8709 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8710 (build-system python-build-system)
8711 (arguments
8712 '(#:phases
8713 (modify-phases %standard-phases
8714 (replace 'check
8715 (lambda _ (invoke "py.test" "-v"))))))
8716 (native-inputs
8717 `(("python-pytest" ,python-pytest)))
8718 (propagated-inputs
8719 `(("python-args" ,python-args)))
8720 (home-page "https://github.com/kennethreitz/clint")
8721 (synopsis "Command-line interface tools")
8722 (description
8723 "Clint is a Python module filled with a set of tools for developing
8724command-line applications, including tools for colored and indented
8725output, progress bar display, and pipes.")
8726 (license license:isc)))
8727
8728(define-public python2-clint
8729 (package-with-python2 python-clint))
8730
44d10b1f
RW
8731(define-public python-rply
8732 (package
8733 (name "python-rply")
8734 (version "0.7.5")
8735 (source (origin
8736 (method url-fetch)
8737 (uri (pypi-uri "rply" version))
8738 (sha256
8739 (base32
8740 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8741 (build-system python-build-system)
8742 (propagated-inputs
8743 `(("python-appdirs" ,python-appdirs)))
8744 (home-page "https://github.com/alex/rply")
8745 (synopsis "Parser generator for Python")
8746 (description
8747 "This package provides a pure Python based parser generator, that also
8748works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8749with a new public API, and RPython support.")
8750 (license license:bsd-3)))
8751
8752(define-public python2-rply
8753 (package-with-python2 python-rply))
8754
8755(define-public python-hy
8756 (package
8757 (name "python-hy")
8758 (version "0.13.0")
8759 (source (origin
8760 (method url-fetch)
8761 (uri (pypi-uri "hy" version))
8762 (sha256
8763 (base32
8764 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8765 (build-system python-build-system)
8766 (arguments
8767 '(#:phases
8768 (modify-phases %standard-phases
6ba6a1c1
JG
8769 (add-before 'install 'set-HOME
8770 (lambda _
8771 (setenv "HOME" "/tmp")))
44d10b1f
RW
8772 (replace 'check
8773 (lambda _
8774 ;; Tests require write access to HOME.
8775 (setenv "HOME" "/tmp")
8776 (invoke "nosetests"))))))
8777 (native-inputs
8778 `(("python-coverage" ,python-coverage)
8779 ("python-nose" ,python-nose)))
8780 (propagated-inputs
8781 `(("python-astor" ,python-astor)
8782 ("python-clint" ,python-clint)
8783 ("python-rply" ,python-rply)))
8784 (home-page "http://hylang.org/")
8785 (synopsis "Lisp frontend to Python")
8786 (description
8787 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8788its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8789Python at your fingertips, in Lisp form.")
8790 (license license:expat)))
8791
8792(define-public python2-hy
8793 (package-with-python2 python-hy))
8794
8795(define-public python2-functools32
8796 (package
8797 (name "python2-functools32")
8798 (version "3.2.3-2")
8799 (source
8800 (origin
8801 (method url-fetch)
8802 (uri (pypi-uri "functools32" version))
8803 (sha256
8804 (base32
8805 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8806 (build-system python-build-system)
8807 (arguments
8808 `(#:python ,python-2
8809 #:tests? #f)) ; no test target
8810 (home-page "https://github.com/MiCHiLU/python-functools32")
8811 (synopsis
8812 "Backport of the functools module from Python 3.2.3")
8813 (description
8814 "This package is a backport of the @code{functools} module from Python
88153.2.3 for use with older versions of Python and PyPy.")
8816 (license license:expat)))
8817
8818(define-public python2-subprocess32
8819 (package
8820 (name "python2-subprocess32")
8821 (version "3.2.7")
8822 (source (origin
8823 (method url-fetch)
8824 (uri (pypi-uri "subprocess32" version))
8825 (sha256
8826 (base32
8827 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8828 (patches
8829 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8830 (build-system python-build-system)
8831 (arguments
8832 `(#:python ,python-2
8833 ;; The test suite fails with Python > 2.7.13:
8834 ;; import test.support
8835 ;; ImportError: No module named support
8836 #:tests? #f
8837 #:phases
8838 (modify-phases %standard-phases
8839 (add-after 'unpack 'patch-/bin/sh
8840 (lambda _
8841 (substitute* '("subprocess32.py"
8842 "test_subprocess32.py")
8843 (("/bin/sh") (which "sh")))
8844 #t)))))
8845 (home-page "https://github.com/google/python-subprocess32")
8846 (synopsis "Backport of the subprocess module from Python 3.2")
8847 (description
8848 "This is a backport of the @code{subprocess} standard library module
8849from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8850new features. On POSIX systems it is guaranteed to be reliable when used
8851in threaded applications. It includes timeout support from Python 3.3 but
8852otherwise matches 3.2’s API.")
8853 (license license:psfl)))
8854
8855(define-public python2-futures
8856 (package
8857 (name "python2-futures")
8858 (version "3.2.0")
8859 (source
8860 (origin
8861 (method url-fetch)
8862 (uri (pypi-uri "futures" version))
8863 (sha256
8864 (base32
8865 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8866 (build-system python-build-system)
ba88eea2
RW
8867 (arguments
8868 `(#:python ,python-2
8869 #:phases
8870 (modify-phases %standard-phases
8871 (replace 'check
8872 (lambda _
8873 (invoke "python" "test_futures.py")
8874 #t)))))
44d10b1f
RW
8875 (home-page "https://github.com/agronholm/pythonfutures")
8876 (synopsis
8877 "Backport of the concurrent.futures package from Python 3.2")
8878 (description
8879 "The concurrent.futures module provides a high-level interface for
8880asynchronously executing callables. This package backports the
8881concurrent.futures package from Python 3.2")
8882 (license license:bsd-3)))
8883
8884(define-public python-promise
8885 (package
8886 (name "python-promise")
8887 (version "0.4.2")
8888 (source
8889 (origin
8890 (method url-fetch)
8891 (uri (pypi-uri "promise" version))
8892 (sha256
8893 (base32
8894 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8895 (build-system python-build-system)
8896 ;; Tests wants python-futures, which is a python2 only program, and
8897 ;; can't be found by python-promise at test time.
8898 (arguments `(#:tests? #f))
8899 (home-page "https://github.com/syrusakbary/promise")
8900 (synopsis "Promises/A+ implementation for Python")
8901 (description
8902 "Promises/A+ implementation for Python")
8903 (properties `((python2-variant . ,(delay python2-promise))))
8904 (license license:expat)))
8905
8906(define-public python2-promise
8907 (let ((promise (package-with-python2
8908 (strip-python2-variant python-promise))))
8909 (package (inherit promise)
8910 (arguments (substitute-keyword-arguments (package-arguments promise)
8911 ((#:tests? _) #t)))
8912 (native-inputs
8913 `(("python2-futures" ,python2-futures)
8914 ("python2-pytest" ,python2-pytest)
8915 ,@(package-native-inputs promise))))))
8916
d71d85cd
RW
8917(define-public python-progressbar33
8918 (package
8919 (name "python-progressbar33")
8920 (version "2.4")
8921 (source
8922 (origin
8923 (method url-fetch)
8924 (uri (pypi-uri "progressbar33" version))
8925 (sha256
8926 (base32
8927 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8928 (build-system python-build-system)
8929 (home-page "http://github.com/germangh/python-progressbar")
8930 (synopsis "Text progress bar library for Python")
8931 (description
8932 "This package provides a text progress bar library for Python. This
8933version only differs from the original @code{progressbar} package in that it
8934uses relative package imports instead of absolute imports, which is necessary
8935for the module to work under Python 3.3.")
8936 ;; Either or both of these licenses may be selected.
8937 (license (list license:lgpl2.1+ license:bsd-3))))
8938
44d10b1f
RW
8939(define-public python-colorama
8940 (package
8941 (name "python-colorama")
8942 (version "0.3.9")
8943 (source
8944 (origin
8945 (method url-fetch)
8946 (uri (pypi-uri "colorama" version))
8947 (sha256
8948 (base32
8949 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8950 (build-system python-build-system)
8951 (synopsis "Colored terminal text rendering for Python")
8952 (description "Colorama is a Python library for rendering colored terminal
8953text.")
8954 (home-page "https://pypi.python.org/pypi/colorama")
8955 (license license:bsd-3)))
8956
8957(define-public python2-colorama
8958 (package-with-python2 python-colorama))
8959
8960(define-public python-rsa
8961 (package
8962 (name "python-rsa")
8963 (version "3.4.2")
8964 (source
8965 (origin
8966 (method url-fetch)
8967 (uri (pypi-uri "rsa" version))
8968 (sha256
8969 (base32
8970 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8971 (build-system python-build-system)
8972 (propagated-inputs
8973 `(("python-pyasn1" ,python-pyasn1)))
8974 (synopsis "Pure-Python RSA implementation")
8975 (description "Python-RSA is a pure-Python RSA implementation. It supports
8976encryption and decryption, signing and verifying signatures, and key
8977generation according to PKCS#1 version 1.5. It can be used as a Python
8978library as well as on the command line.")
8979 (home-page "https://stuvel.eu/rsa")
8980 (license license:asl2.0)))
8981
8982(define-public python2-rsa
8983 (package-with-python2 python-rsa))
8984
8985(define-public python-pluggy
8986 (package
8987 (name "python-pluggy")
e5731c03 8988 (version "0.11.0")
44d10b1f
RW
8989 (source
8990 (origin
8991 (method url-fetch)
8992 (uri (pypi-uri "pluggy" version))
8993 (sha256
8994 (base32
e5731c03 8995 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
8996 (build-system python-build-system)
8997 (native-inputs
8998 `(("python-setuptools-scm" ,python-setuptools-scm)))
8999 (synopsis "Plugin and hook calling mechanism for Python")
9000 (description "Pluggy is an extraction of the plugin manager as used by
9001Pytest but stripped of Pytest specific details.")
9002 (home-page "https://pypi.python.org/pypi/pluggy")
9003 (license license:expat)))
9004
9005(define-public python2-pluggy
9006 (package-with-python2 python-pluggy))
9007
9008(define-public python-tox
9009 (package
9010 (name "python-tox")
9011 (version "2.8.1")
9012 (source
9013 (origin
9014 (method url-fetch)
9015 (uri (pypi-uri "tox" version))
9016 (sha256
9017 (base32
9018 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
9019 (build-system python-build-system)
9020 (arguments
9021 ;; FIXME: Tests require pytest-timeout, which itself requires
9022 ;; pytest>=2.8.0 for installation.
9023 '(#:tests? #f))
9024 (propagated-inputs
9025 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9026 ("python-py" ,python-py)
9027 ("python-virtualenv" ,python-virtualenv)))
9028 (native-inputs
9029 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9030 ("python-pytest" ,python-pytest) ; >= 2.3.5
9031 ("python-setuptools-scm" ,python-setuptools-scm)))
9032 (home-page "http://tox.testrun.org/")
9033 (synopsis "Virtualenv-based automation of test activities")
9034 (description "Tox is a generic virtualenv management and test command line
9035tool. It can be used to check that a package installs correctly with
9036different Python versions and interpreters, or run tests in each type of
9037supported environment, or act as a frontend to continuous integration
9038servers.")
9039 (license license:expat)))
9040
9041(define-public python2-tox
9042 (package-with-python2 python-tox))
9043
9044(define-public python-jmespath
9045 (package
9046 (name "python-jmespath")
27fb781f 9047 (version "0.9.4")
44d10b1f
RW
9048 (source
9049 (origin
9050 (method url-fetch)
9051 (uri (pypi-uri "jmespath" version))
9052 (sha256
9053 (base32
27fb781f 9054 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
9055 (build-system python-build-system)
9056 (native-inputs
9057 `(("python-nose" ,python-nose)))
9058 (synopsis "JSON Matching Expressions")
9059 (description "JMESPath (pronounced “james path”) is a Python library that
9060allows one to declaratively specify how to extract elements from a JSON
9061document.")
9062 (home-page "https://github.com/jmespath/jmespath.py")
9063 (license license:expat)))
9064
9065(define-public python2-jmespath
9066 (package-with-python2 python-jmespath))
9067
9068(define-public python-botocore
9069 (package
7bcf827c
RW
9070 (name "python-botocore")
9071 (version "1.12.149")
9072 (source
9073 (origin
9074 (method url-fetch)
9075 (uri (pypi-uri "botocore" version))
9076 (sha256
9077 (base32
9078 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9079 (build-system python-build-system)
9080 (arguments
9081 ;; FIXME: Many tests are failing.
9082 '(#:tests? #f))
9083 (propagated-inputs
9084 `(("python-dateutil" ,python-dateutil)
9085 ("python-docutils" ,python-docutils)
9086 ("python-jmespath" ,python-jmespath)))
9087 (native-inputs
9088 `(("python-mock" ,python-mock)
9089 ("python-nose" ,python-nose)
9090 ("behave" ,behave)
9091 ("python-tox" ,python-tox)
9092 ("python-urllib3" ,python-urllib3)
9093 ("python-wheel" ,python-wheel)))
9094 (home-page "https://github.com/boto/botocore")
9095 (synopsis "Low-level interface to AWS")
9096 (description "Botocore is a Python library that provides a low-level
44d10b1f 9097interface to the Amazon Web Services (AWS) API.")
7bcf827c 9098 (license license:asl2.0)))
44d10b1f
RW
9099
9100(define-public python2-botocore
9101 (package-with-python2 python-botocore))
9102
9103(define-public python-xdo
9104 (package
9105 (name "python-xdo")
9106 (version "0.3")
9107 (source (origin
9108 (method url-fetch)
9109 (uri (string-append
9110 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9111 "python-xdo_" version ".orig.tar.gz"))
9112 (sha256
9113 (base32
9114 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9115 (build-system python-build-system)
9116 (arguments
9117 '(#:phases
9118 (modify-phases %standard-phases
9119 (add-before 'install 'patch-libxdo-path
9120 ;; Hardcode the path of dynamically loaded libxdo library.
9121 (lambda* (#:key inputs #:allow-other-keys)
9122 (let ((libxdo (string-append
9123 (assoc-ref inputs "xdotool")
9124 "/lib/libxdo.so")))
9125 (substitute* "xdo/_xdo.py"
9126 (("find_library\\(\"xdo\"\\)")
9127 (simple-format #f "\"~a\"" libxdo)))
9128 #t))))
9129 #:tests? #f)) ; no tests provided
9130 (propagated-inputs
9131 `(("python-six" ,python-six)))
9132 (inputs
9133 `(("xdotool" ,xdotool)
9134 ("libX11" ,libx11)))
9135 (home-page "https://tracker.debian.org/pkg/python-xdo")
9136 (synopsis "Python library for simulating X11 keyboard/mouse input")
9137 (description "Provides bindings to libxdo for manipulating X11 via simulated
9138input. (Note that this is mostly a legacy library; you may wish to look at
9139python-xdo for newer bindings.)")
9140 (license license:bsd-3)))
9141
9142(define-public python2-xdo
9143 (package-with-python2 python-xdo))
9144
9145(define-public python-mako
9146 (package
9147 (name "python-mako")
6bf53ad5 9148 (version "1.1.0")
44d10b1f
RW
9149 (source
9150 (origin
9151 (method url-fetch)
9152 (uri (pypi-uri "Mako" version))
9153 (sha256
9154 (base32
6bf53ad5 9155 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 9156 (build-system python-build-system)
6bf53ad5
MB
9157 (arguments
9158 `(#:phases (modify-phases %standard-phases
9159 (replace 'check
9160 (lambda _
9161 (invoke "pytest" "-vv"))))))
44d10b1f
RW
9162 (propagated-inputs
9163 `(("python-markupsafe" ,python-markupsafe)))
9164 (native-inputs
9165 `(("python-mock" ,python-mock)
44d10b1f 9166 ("python-pytest" ,python-pytest)))
7016e620 9167 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
9168 (synopsis "Templating language for Python")
9169 (description "Mako is a templating language for Python that compiles
9170templates into Python modules.")
9171 (license license:expat)))
9172
9173(define-public python2-mako
9174 (package-with-python2 python-mako))
9175
9176(define-public python-waitress
9177 (package
9178 (name "python-waitress")
9179 (version "1.1.0")
9180 (source
9181 (origin
9182 (method url-fetch)
9183 (uri (pypi-uri "waitress" version))
9184 (patches (search-patches "python-waitress-fix-tests.patch"))
9185 (sha256
9186 (base32
9187 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9188 (build-system python-build-system)
9189 (home-page "https://github.com/Pylons/waitress")
9190 (synopsis "Waitress WSGI server")
9191 (description "Waitress is meant to be a production-quality pure-Python WSGI
9192server with very acceptable performance.")
9193 (license license:zpl2.1)))
9194
9195(define-public python2-waitress
9196 (package-with-python2 python-waitress))
9197
b2b23d12
TLC
9198(define-public python-whichcraft
9199 (package
9200 (name "python-whichcraft")
9201 (version "0.6.1")
9202 (source
9203 (origin
9204 (method url-fetch)
9205 (uri (pypi-uri "whichcraft" version))
9206 (sha256
9207 (base32
9208 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9209 (build-system python-build-system)
9210 (native-inputs
9211 `(("python-pytest" ,python-pytest)))
9212 (home-page "https://github.com/pydanny/whichcraft")
9213 (synopsis "Cross-platform cross-python shutil.which functionality")
9214 (description
9215 "This package provides a shim of the shutil.which function that's
9216designed to work across multiple versions of Python.")
9217 (license license:bsd-3)))
9218
1133ca44
TLC
9219(define-public python-cookiecutter
9220 (package
9221 (name "python-cookiecutter")
9222 (version "1.6.0")
9223 (source
9224 (origin
9225 (method url-fetch)
9226 (uri (pypi-uri "cookiecutter" version))
9227 (sha256
9228 (base32
9229 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9230 (build-system python-build-system)
9231 (native-inputs
9232 `(("python-freezegun" ,python-freezegun)
9233 ("python-pytest" ,python-pytest)
9234 ("python-pytest-catchlog" ,python-pytest-catchlog)
9235 ("python-pytest-cov" ,python-pytest-cov)
9236 ("python-pytest-mock" ,python-pytest-mock)))
9237 (propagated-inputs
9238 `(("python-binaryornot" ,python-binaryornot)
9239 ("python-click" ,python-click)
9240 ("python-future" ,python-future)
9241 ("python-jinja2" ,python-jinja2)
9242 ("python-jinja2-time" ,python-jinja2-time)
9243 ("python-poyo" ,python-poyo)
9244 ("python-requests" ,python-requests)
9245 ("python-whichcraft" ,python-whichcraft)))
9246 (home-page "https://github.com/audreyr/cookiecutter")
9247 (synopsis
9248 "Command-line utility that creates projects from project templates")
9249 (description
9250 "This package provides a command-line utility that creates projects from
9251project templates, e.g. creating a Python package project from a Python package
9252project template.")
9253 (license license:bsd-3)))
9254
44d10b1f
RW
9255(define-public python-pyquery
9256 (package
9257 (name "python-pyquery")
9258 (version "1.2.17")
9259 (source
9260 (origin
9261 (method url-fetch)
9262 (uri (pypi-uri "pyquery" version))
9263 (sha256
9264 (base32
9265 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9266 (build-system python-build-system)
9267 (native-inputs
9268 `(("python-webob" ,python-webob)
9269 ("python-webtest" ,python-webtest)))
9270 (propagated-inputs
9271 `(("python-lxml" ,python-lxml)
9272 ("python-cssselect" ,python-cssselect)))
9273 (home-page "https://github.com/gawel/pyquery")
9274 (synopsis "Make jQuery-like queries on xml documents")
9275 (description "pyquery allows you to make jQuery queries on xml documents.
9276The API is as much as possible the similar to jQuery. pyquery uses lxml for
9277fast xml and html manipulation.")
9278 (license license:bsd-3)))
9279
44d10b1f
RW
9280(define-public python-anyjson
9281 (package
9282 (name "python-anyjson")
9283 (version "0.3.3")
9284 (source
9285 (origin
9286 (method url-fetch)
9287 (uri (pypi-uri "anyjson" version))
9288 (sha256
9289 (base32
9290 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9291 (build-system python-build-system)
9292 (arguments
9293 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9294 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9295 ;; whatever) so this transformation needs to be done before the tests
9296 ;; can be run. Maybe we could add a build step to transform beforehand
9297 ;; but it could be annoying/difficult.
9298 ;; We can enable tests for the Python 2 version, though, and do below.
9299 #:tests? #f))
9300 (home-page "https://bitbucket.org/runeh/anyjson/")
9301 (synopsis
9302 "Wraps best available JSON implementation in a common interface")
9303 (description
9304 "Anyjson loads whichever is the fastest JSON module installed
9305and provides a uniform API regardless of which JSON implementation is used.")
9306 (license license:bsd-3)
9307 (properties `((python2-variant . ,(delay python2-anyjson))))))
9308
9309(define-public python2-anyjson
9310 (let ((anyjson (package-with-python2
9311 (strip-python2-variant python-anyjson))))
9312 (package
9313 (inherit anyjson)
9314 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9315 #:tests? #t
9316 ,@(package-arguments anyjson)))
9317 (native-inputs `(("python2-nose" ,python2-nose))))))
9318
9319(define-public python-amqp
9320 (package
9321 (name "python-amqp")
9322 (version "2.3.2")
9323 (source
9324 (origin
9325 (method url-fetch)
9326 (uri (pypi-uri "amqp" version))
9327 (sha256
9328 (base32
9329 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9330 (build-system python-build-system)
9331 (native-inputs
9332 `(("python-case" ,python-case)
9333 ("python-pytest-sugar" ,python-pytest-sugar)
9334 ("python-mock" ,python-mock)))
9335 (propagated-inputs
9336 `(("python-vine" ,python-vine)))
9337 (home-page "https://github.com/celery/py-amqp")
9338 (synopsis
9339 "Low-level AMQP client for Python (fork of amqplib)")
9340 (description
9341 "This is a fork of amqplib which was originally written by Barry Pederson.
9342It is maintained by the Celery project, and used by kombu as a pure python
9343alternative when librabbitmq is not available.")
9344 (license license:lgpl2.1+)
9345 (properties `((python2-variant . ,(delay python2-amqp))))))
9346
9347(define-public python2-amqp
9348 (let ((amqp (package-with-python2
9349 (strip-python2-variant python-amqp))))
9350 (package
9351 (inherit amqp)
9352 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9353 ;; unmaintained. Weirdly, does not do this on the python 3
9354 ;; version?
9355 #:tests? #f
9356 ,@(package-arguments amqp))))))
9357
9358(define-public python-txamqp
9359 (package
9360 (name "python-txamqp")
9361 (version "0.8.2")
9362 (source
9363 (origin
9364 (method url-fetch)
9365 (uri (pypi-uri "txAMQP" version))
9366 (sha256
9367 (base32
9368 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9369 (build-system python-build-system)
9370 (propagated-inputs
9371 `(("python-six" ,python-six)
9372 ("python-twisted" ,python-twisted)))
9373 (home-page "https://github.com/txamqp/txamqp")
9374 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9375 (description
9376 "This package provides a Python library for communicating with AMQP peers
9377and brokers using the asynchronous networking framework Twisted. It contains
9378all the necessary code to connect, send and receive messages to/from an
9379AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9380also includes support for using Thrift RPC over AMQP in Twisted
9381applications.")
9382 (license license:asl2.0)))
9383
9384(define-public python2-txamqp
9385 (package-with-python2 python-txamqp))
9386
9387(define-public python-kombu
9388 (package
9389 (name "python-kombu")
9390 (version "4.2.2")
9391 (source
9392 (origin
9393 (method url-fetch)
9394 (uri (pypi-uri "kombu" version))
9395 (sha256
9396 (base32
9397 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9398 (build-system python-build-system)
9399 (native-inputs
9400 `(("python-mock" ,python-mock)
9401 ("python-case" ,python-case)
9402 ("python-pyro4" ,python-pyro4)
9403 ("python-pytest-sugar" ,python-pytest-sugar)
9404 ("python-pytz" ,python-pytz)))
9405 (propagated-inputs
9406 `(("python-anyjson" ,python-anyjson)
9407 ("python-amqp" ,python-amqp)
9408 ("python-redis" ,python-redis)))
9409 (home-page "https://kombu.readthedocs.io")
9410 (synopsis "Message passing library for Python")
9411 (description "The aim of Kombu is to make messaging in Python as easy as
9412possible by providing an idiomatic high-level interface for the AMQ protocol,
9413and also provide proven and tested solutions to common messaging problems.
9414AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9415message orientation, queuing, routing, reliability and security, for which the
9416RabbitMQ messaging server is the most popular implementation.")
9417 (license license:bsd-3)
9418 (properties `((python2-variant . ,(delay python2-kombu))))))
9419
9420(define-public python2-kombu
9421 (let ((kombu (package-with-python2
9422 (strip-python2-variant python-kombu))))
9423 (package
9424 (inherit kombu)
9425 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9426 ;; It works fine on the python3 variant.
9427 #:tests? #f
9428 ,@(package-arguments kombu)))
9429 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9430 ,@(package-native-inputs kombu))))))
9431
9432(define-public python-billiard
9433 (package
9434 (name "python-billiard")
9435 (version "3.5.0.5")
9436 (source
9437 (origin
9438 (method url-fetch)
9439 (uri (pypi-uri "billiard" version))
9440 (sha256
9441 (base32
9442 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9443 (build-system python-build-system)
9444 (native-inputs
9445 `(("python-case" ,python-case)
9446 ("python-pytest" ,python-pytest)))
9447 (home-page "https://github.com/celery/billiard")
9448 (synopsis
9449 "Python multiprocessing fork with improvements and bugfixes")
9450 (description
9451 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9452multiprocessing package itself is a renamed and updated version of R Oudkerk's
9453pyprocessing package. This standalone variant is intended to be compatible with
9454Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9455 (license license:bsd-3)
9456 (properties `((python2-variant . ,(delay python2-billiard))))))
9457
9458(define-public python2-billiard
9459 (let ((billiard (package-with-python2
9460 (strip-python2-variant python-billiard))))
9461 (package
9462 (inherit billiard)
9463 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9464 ("python2-mock" ,python2-mock)
9465 ,@(package-native-inputs billiard))))))
9466
9467(define-public python-celery
9468 (package
9469 (name "python-celery")
9470 (version "4.2.1")
9471 (source
9472 (origin
9473 (method url-fetch)
9474 (uri (pypi-uri "celery" version))
9475 (sha256
9476 (base32
9477 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9478 (build-system python-build-system)
9479 (arguments
9480 '(;; TODO The tests fail with Python 3.7
9481 ;; https://github.com/celery/celery/issues/4849
9482 #:tests? #f
9483 #:phases
9484 (modify-phases %standard-phases
9485 (add-after 'unpack 'patch-requirements
9486 (lambda _
9487 (substitute* "requirements/test.txt"
9488 (("pytest>=3\\.0,<3\\.3")
9489 "pytest>=3.0"))
9490 #t)))))
9491 (native-inputs
9492 `(("python-case" ,python-case)
9493 ("python-pytest" ,python-pytest)))
9494 (propagated-inputs
9495 `(("python-pytz" ,python-pytz)
9496 ("python-billiard" ,python-billiard)
9497 ("python-kombu" ,python-kombu)))
9498 (home-page "https://celeryproject.org")
9499 (synopsis "Distributed Task Queue")
9500 (description "Celery is an asynchronous task queue/job queue based on
9501distributed message passing. It is focused on real-time operation, but
9502supports scheduling as well. The execution units, called tasks, are executed
9503concurrently on a single or more worker servers using multiprocessing,
9504Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9505synchronously (wait until ready).")
9506 (license license:bsd-3)
9507 (properties `((python2-variant . ,(delay python2-celery))))))
9508
9509(define-public python2-celery
9510 (let ((celery (package-with-python2
9511 (strip-python2-variant python-celery))))
9512 (package
9513 (inherit celery)
9514 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9515 ("python2-mock" ,python2-mock)
9516 ,@(package-native-inputs celery))))))
9517
9518(define-public python-translitcodec
9519 (package
9520 (name "python-translitcodec")
9521 (version "0.4.0")
9522 (source
9523 (origin
9524 (method url-fetch)
9525 (uri (pypi-uri "translitcodec" version))
9526 (sha256
9527 (base32
9528 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9529 (build-system python-build-system)
9530 (arguments
9531 `(#:tests? #f)) ; no tests provided
9532 (home-page
9533 "https://github.com/claudep/translitcodec")
9534 (synopsis
9535 "Unicode to 8-bit charset transliteration codec")
9536 (description
9537 "This package contains codecs for transliterating ISO 10646 texts into
9538best-effort representations using smaller coded character sets (ASCII,
9539ISO 8859, etc.).")
9540 (license license:expat)))
9541
9542(define-public python2-translitcodec
9543 (package-with-python2 python-translitcodec))
9544
9545(define-public python-editor
9546 (package
9547 (name "python-editor")
9548 (version "0.5")
9549 (source
9550 (origin
9551 (method url-fetch)
9552 (uri (pypi-uri "python-editor" version))
9553 (sha256
9554 (base32
9555 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9556 (build-system python-build-system)
9557 (home-page
9558 "https://github.com/fmoo/python-editor")
9559 (synopsis
9560 "Programmatically open an editor, capture the result")
9561 (description
9562 "python-editor is a library that provides the editor module for
9563programmatically interfacing with your system's $EDITOR.")
9564 (license license:asl2.0)))
9565
9566(define-public python2-editor
9567 (package-with-python2 python-editor))
9568
44d10b1f
RW
9569(define-public python-vobject
9570 (package
9571 (name "python-vobject")
9572 (version "0.9.5")
9573 (source (origin
9574 (method url-fetch)
9575 (uri (pypi-uri "vobject" version))
9576 (sha256
9577 (base32
9578 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9579 (build-system python-build-system)
9580 (arguments
9581 '(;; The test suite relies on some non-portable Windows interfaces.
9582 #:tests? #f))
9583 (propagated-inputs
9584 `(("python-dateutil" ,python-dateutil)
9585 ("python-pyicu" ,python-pyicu)))
9586 (synopsis "Parse and generate vCard and vCalendar files")
9587 (description "Vobject is intended to be a full featured Python package for
9588parsing and generating vCard and vCalendar files. Currently, iCalendar files
9589are supported and well tested. vCard 3.0 files are supported, and all data
9590should be imported, but only a few components are understood in a sophisticated
9591way.")
9592 (home-page "http://eventable.github.io/vobject/")
9593 (license license:asl2.0)))
9594
9595(define-public python2-vobject
9596 (package-with-python2 python-vobject))
9597
9598(define-public python-munkres
9599 (package
9600 (name "python-munkres")
9601 (version "1.0.8")
9602 (source (origin
9603 (method url-fetch)
9604 (uri (pypi-uri "munkres" version))
9605 (sha256
9606 (base32
9607 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9608 (build-system python-build-system)
9609 (arguments
9610 '(#:tests? #f)) ; no test suite
9611 (home-page "http://software.clapper.org/munkres/")
9612 (synopsis "Implementation of the Munkres algorithm")
9613 (description "The Munkres module provides an implementation of the Munkres
9614algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9615useful for solving the Assignment Problem.")
9616 (license license:bsd-3)))
9617
9618(define-public python2-munkres
9619 (package-with-python2 python-munkres))
9620
9621(define-public python-whoosh
9622 (package
9623 (name "python-whoosh")
9624 (version "2.7.4")
9625 (source
9626 (origin
9627 (method url-fetch)
9628 (uri (pypi-uri "Whoosh" version))
9629 (sha256
9630 (base32
9631 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9632 (build-system python-build-system)
2679d9a4 9633 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9634 (native-inputs
9635 `(("python-pytest" ,python-pytest)))
9636 (home-page "https://bitbucket.org/mchaput/whoosh")
9637 (synopsis "Full text indexing, search, and spell checking library")
9638 (description
9639 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9640checking library.")
9641 (license license:bsd-2)))
9642
9643(define-public python2-whoosh
9644 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9645 (package (inherit whoosh)
9646 (propagated-inputs
9647 `(("python2-backport-ssl-match-hostname"
9648 ,python2-backport-ssl-match-hostname)
9649 ,@(package-propagated-inputs whoosh))))))
9650
9651(define-public python-pathlib
9652 (package
9653 (name "python-pathlib")
9654 (version "1.0.1")
9655 (source (origin
9656 (method url-fetch)
9657 (uri (pypi-uri "pathlib" version))
9658 (sha256
9659 (base32
9660 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9661 (build-system python-build-system)
9662 ;; The tests depend on the internal "test" module, which does not provide
9663 ;; a stable interface.
9664 (arguments `(#:tests? #f))
9665 (home-page "https://pathlib.readthedocs.org/")
9666 (synopsis "Object-oriented file system paths")
9667 (description "Pathlib offers a set of classes to handle file system paths.
9668It offers the following advantages over using string objects:
9669
9670@enumerate
9671@item No more cumbersome use of os and os.path functions. Everything can
9672be done easily through operators, attribute accesses, and method calls.
9673@item Embodies the semantics of different path types. For example,
9674comparing Windows paths ignores casing.
9675@item Well-defined semantics, eliminating any inconsistencies or
9676ambiguities (forward vs. backward slashes, etc.).
9677@end enumerate
9678
9679Note: In Python 3.4, pathlib is now part of the standard library. For other
9680Python versions please consider python-pathlib2 instead, which tracks the
9681standard library module. This module (python-pathlib) isn't maintained
9682anymore.")
9683 (license license:expat)))
9684
9685(define-public python2-pathlib
9686 (package-with-python2 python-pathlib))
9687
9688(define-public python2-pathlib2
9689 (package
9690 (name "python2-pathlib2")
54da6f9f 9691 (version "2.3.3")
44d10b1f
RW
9692 (source (origin
9693 (method url-fetch)
9694 (uri (pypi-uri "pathlib2" version))
9695 (sha256
9696 (base32
54da6f9f 9697 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9698 (build-system python-build-system)
9699 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9700 ;; version is 3.4 which already includes this package as part of the
9701 ;; standard library.
9702 (arguments
9703 `(#:python ,python-2))
9704 (propagated-inputs
9705 `(("python2-scandir" ,python2-scandir)
9706 ("python2-six" ,python2-six)))
9707 (home-page "https://pypi.python.org/pypi/pathlib2/")
9708 (synopsis "Object-oriented file system paths - backport of standard
9709pathlib module")
9710 (description "The goal of pathlib2 is to provide a backport of standard
9711pathlib module which tracks the standard library module, so all the newest
9712features of the standard pathlib can be used also on older Python versions.
9713
9714Pathlib offers a set of classes to handle file system paths. It offers the
9715following advantages over using string objects:
9716
9717@enumerate
9718@item No more cumbersome use of os and os.path functions. Everything can
9719be done easily through operators, attribute accesses, and method calls.
9720@item Embodies the semantics of different path types. For example,
9721comparing Windows paths ignores casing.
9722@item Well-defined semantics, eliminating any inconsistencies or
9723ambiguities (forward vs. backward slashes, etc.).
9724@end enumerate")
9725 (license license:expat)))
9726
9727(define-public python2-pathlib2-bootstrap
9728 (hidden-package
9729 (package
9730 (inherit python2-pathlib2)
9731 (name "python2-pathlib2-bootstrap")
9732 (propagated-inputs
9733 `(("python2-scandir" ,python2-scandir)
9734 ("python2-six" ,python2-six-bootstrap))))))
9735
9736(define-public python-jellyfish
9737 (package
9738 (name "python-jellyfish")
9739 (version "0.5.6")
9740 (source (origin
9741 (method url-fetch)
9742 (uri (pypi-uri "jellyfish" version))
9743 (sha256
9744 (base32
9745 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9746 (build-system python-build-system)
9747 (native-inputs
9748 `(("python-pytest" ,python-pytest)))
9749 (home-page "https://github.com/jamesturk/jellyfish")
9750 (synopsis "Approximate and phonetic matching of strings")
9751 (description "Jellyfish uses a variety of string comparison and phonetic
9752encoding algorithms to do fuzzy string matching.")
9753 (license license:bsd-2)
9754 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9755
9756(define-public python2-jellyfish
9757 (let ((jellyfish (package-with-python2
9758 (strip-python2-variant python-jellyfish))))
9759 (package (inherit jellyfish)
9760 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9761 ,@(package-native-inputs jellyfish))))))
9762
9763(define-public python2-unicodecsv
9764 (package
9765 (name "python2-unicodecsv")
9766 (version "0.14.1")
9767 (source (origin
9768 (method url-fetch)
9769 ;; The test suite is not included in the PyPi release.
9770 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9771 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9772 "archive/" version ".tar.gz"))
9773 (file-name (string-append name "-" version ".tar.gz"))
9774 (sha256
9775 (base32
9776 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9777 (build-system python-build-system)
9778 (arguments
9779 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9780 #:python ,python-2))
9781 (native-inputs
9782 `(("python2-unittest2" ,python2-unittest2)))
9783 (home-page "https://github.com/jdunck/python-unicodecsv")
9784 (synopsis "Unicode CSV module for Python 2")
9785 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9786module, adding support for Unicode strings.")
9787 (license license:bsd-2)))
9788
9789(define-public python-rarfile
9790 (package
9791 (name "python-rarfile")
9792 (version "2.8")
9793 (source (origin
9794 (method url-fetch)
9795 (uri (pypi-uri "rarfile" version))
9796 (sha256
9797 (base32
9798 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9799 (build-system python-build-system)
9800 (arguments
9801 '(#:phases
9802 (modify-phases %standard-phases
9803 (replace 'check
9804 ;; Many tests fail, but the installation proceeds.
e59dd341 9805 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9806 (native-inputs
9807 `(("which" ,which))) ; required for tests
9808 (propagated-inputs
9809 `(("libarchive" ,libarchive)))
9810 (home-page "https://github.com/markokr/rarfile")
9811 (synopsis "RAR archive reader for Python")
9812 (description "This is Python module for RAR archive reading. The interface
9813is made as zipfile like as possible.")
9814 (license license:isc)))
9815
9816(define-public python2-rarfile
9817 (package-with-python2 python-rarfile))
9818
9819(define-public python-magic
9820 (package
9821 (name "python-magic")
9822 (version "0.4.15")
9823 (source
9824 (origin
9825 (method url-fetch)
9826 (uri (pypi-uri "python-magic" version))
9827 (sha256
9828 (base32
9829 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9830 (file-name (string-append name "-" version "-checkout"))))
9831 (build-system python-build-system)
9832 (arguments
9833 ;; The tests are unreliable, so don't run them. The tests fail
9834 ;; under Python3 because they were written for Python2 and
9835 ;; contain import statements that do not work in Python3. One of
9836 ;; the tests fails under Python2 because its assertions are
9837 ;; overly stringent; it relies on comparing output strings which
9838 ;; are brittle and can change depending on the version of
9839 ;; libmagic being used and the system on which the test is
9840 ;; running. In my case, under GuixSD 0.10.0, only one test
9841 ;; failed, and it seems to have failed only because the version
9842 ;; of libmagic that is packaged in Guix outputs a slightly
9843 ;; different (but not wrong) string than the one that the test
9844 ;; expected.
9845 '(#:tests? #f
9846 #:phases (modify-phases %standard-phases
9847 ;; Replace a specific method call with a hard-coded
9848 ;; path to the necessary libmagic.so file in the
9849 ;; store. If we don't do this, then the method call
9850 ;; will fail to find the libmagic.so file, which in
9851 ;; turn will cause any application using
9852 ;; python-magic to fail.
9853 (add-before 'build 'hard-code-path-to-libmagic
9854 (lambda* (#:key inputs #:allow-other-keys)
9855 (let ((file (assoc-ref inputs "file")))
9856 (substitute* "magic.py"
9857 (("ctypes.util.find_library\\('magic'\\)")
9858 (string-append "'" file "/lib/libmagic.so'")))
9859 #t)))
9860 (add-before 'install 'disable-egg-compression
9861 (lambda _
9862 (let ((port (open-file "setup.cfg" "a")))
9863 (display "\n[easy_install]\nzip_ok = 0\n"
9864 port)
9865 (close-port port)
9866 #t))))))
9867 (inputs
9868 ;; python-magic needs to be able to find libmagic.so.
9869 `(("file" ,file)))
9870 (home-page
9871 "https://github.com/ahupp/python-magic")
9872 (synopsis
9873 "File type identification using libmagic")
9874 (description
9875 "This module uses ctypes to access the libmagic file type
9876identification library. It makes use of the local magic database and
9877supports both textual and MIME-type output. Note that this module and
9878the python-file module both provide a \"magic.py\" file; these two
9879modules, which are different and were developed separately, both serve
9880the same purpose: to provide Python bindings for libmagic.")
9881 (license license:expat)))
9882
9883(define-public python2-magic
9884 (package-with-python2 python-magic))
9885
9886(define-public python2-s3cmd
9887 (package
9888 (name "python2-s3cmd")
9889 (version "1.6.1")
9890 (source
9891 (origin
9892 (method url-fetch)
9893 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9894 "s3cmd-" version ".tar.gz"))
9895 (sha256
9896 (base32
9897 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9898 (build-system python-build-system)
9899 (arguments
9900 ;; s3cmd is written for python2 only and contains no tests.
9901 `(#:python ,python-2
9902 #:tests? #f))
9903 (propagated-inputs
9904 `(("python2-dateutil" ,python2-dateutil)
9905 ;; The python-file package also provides a magic.py module.
9906 ;; This is an unfortunate state of affairs; however, s3cmd
9907 ;; fails to install if it cannot find specifically the
9908 ;; python-magic package. Thus we include it, instead of using
9909 ;; python-file. Ironically, s3cmd sometimes works better
9910 ;; without libmagic bindings at all:
9911 ;; https://github.com/s3tools/s3cmd/issues/198
9912 ("python2-magic" ,python2-magic)))
9913 (home-page "http://s3tools.org/s3cmd")
9914 (synopsis "Command line tool for S3-compatible storage services")
9915 (description
9916 "S3cmd is a command line tool for uploading, retrieving and managing data
9917in storage services that are compatible with the Amazon Simple Storage
9918Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9919GnuPG encryption, and more. It also supports management of Amazon's
9920CloudFront content delivery network.")
9921 (license license:gpl2+)))
9922
9923(define-public python-pkgconfig
9924 (package
9925 (name "python-pkgconfig")
9926 (version "1.3.1")
9927 (source
9928 (origin
9929 (method url-fetch)
9930 (uri (pypi-uri "pkgconfig" version))
9931 (sha256
9932 (base32
9933 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9934 (build-system python-build-system)
9935 (native-inputs
9936 `(("python-nose" ,python-nose)))
9937 (inputs
9938 `(("pkg-config" ,pkg-config)))
9939 (arguments
9940 `(#:phases
9941 (modify-phases %standard-phases
9942 (add-before 'build 'patch
9943 ;; Hard-code the path to pkg-config.
9944 (lambda _
9945 (substitute* "pkgconfig/pkgconfig.py"
9946 (("cmd = 'pkg-config")
9947 (string-append "cmd = '" (which "pkg-config"))))
9948 #t))
9949 (replace 'check
9950 (lambda _
9951 (invoke "nosetests" "test.py"))))))
9952 (home-page "https://github.com/matze/pkgconfig")
9953 (synopsis "Python interface for pkg-config")
9954 (description "This module provides a Python interface to pkg-config. It
9955can be used to find all pkg-config packages, check if a package exists,
9956check if a package meets certain version requirements, query CFLAGS and
9957LDFLAGS and parse the output to build extensions with setup.py.")
9958 (license license:expat)))
9959
9960(define-public python2-pkgconfig
9961 (package-with-python2 python-pkgconfig))
9962
9963(define-public python-bz2file
9964 (package
9965 (name "python-bz2file")
9966 (version "0.98")
9967 (source
9968 (origin
9969 (method url-fetch)
9970 (uri (pypi-uri "bz2file" version))
9971 (sha256
9972 (base32
9973 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9974 (build-system python-build-system)
9975 (arguments
9976 `(#:tests? #f)) ; Tests use deprecated python modules.
9977 (home-page "https://github.com/nvawda/bz2file")
9978 (synopsis "Read and write bzip2-compressed files")
9979 (description
9980 "Bz2file is a Python library for reading and writing bzip2-compressed
9981files. It contains a drop-in replacement for the I/O interface in the
9982standard library's @code{bz2} module, including features from the latest
9983development version of CPython that are not available in older releases.")
9984 (license license:asl2.0)))
9985
9986(define-public python2-bz2file
9987 (package-with-python2 python-bz2file))
9988
9989(define-public python-future
9990 (package
9991 (name "python-future")
d5d54030 9992 (version "0.17.1")
44d10b1f
RW
9993 (source
9994 (origin
9995 (method url-fetch)
9996 (uri (pypi-uri "future" version))
9997 (sha256
9998 (base32
d5d54030 9999 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
10000 (build-system python-build-system)
10001 ;; Many tests connect to the network or are otherwise flawed.
10002 ;; https://github.com/PythonCharmers/python-future/issues/210
10003 (arguments
10004 `(#:tests? #f))
10005 (home-page "http://python-future.org")
10006 (synopsis "Single-source support for Python 3 and 2")
10007 (description
10008 "@code{python-future} is the missing compatibility layer between Python 2 and
10009Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10010to support both Python 2 and Python 3 with minimal overhead.")
10011 (license license:expat)))
10012
10013(define-public python2-future
10014 (package-with-python2 python-future))
10015
10016(define-public python-cysignals
10017 (package
10018 (name "python-cysignals")
8e3e51df 10019 (version "1.9.0")
44d10b1f
RW
10020 (source
10021 (origin
10022 (method url-fetch)
8e3e51df 10023 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
10024 (sha256
10025 (base32
8e3e51df 10026 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
10027 (build-system python-build-system)
10028 (native-inputs
10029 `(("python-cython" ,python-cython)
10030 ("python-sphinx" ,python-sphinx)))
10031 (inputs
10032 `(("pari-gp" ,pari-gp)))
10033 (arguments
10034 `(#:modules ((guix build python-build-system)
10035 ((guix build gnu-build-system) #:prefix gnu:)
10036 (guix build utils))
10037 ;; FIXME: Tests are executed after installation and currently fail
10038 ;; when not installing into standard locations; the author is working
10039 ;; on a fix.
10040 #:tests? #f
10041 #:phases
10042 (modify-phases %standard-phases
10043 (add-before
10044 'build 'configure
10045 (assoc-ref gnu:%standard-phases 'configure)))))
10046 (home-page
10047 "https://github.com/sagemath/cysignals")
10048 (synopsis
10049 "Handling of interrupts and signals for Cython")
10050 (description
10051 "The cysignals package provides mechanisms to handle interrupts (and
10052other signals and errors) in Cython code, using two related approaches,
10053for mixed Cython/Python code or external C libraries and pure Cython code,
10054respectively.")
10055 (license license:lgpl3+)))
10056
10057(define-public python2-cysignals
10058 (package-with-python2 python-cysignals))
10059
10060(define-public python2-shedskin
10061 (package
10062 (name "python2-shedskin")
10063 (version "0.9.4")
10064 (source
10065 (origin
10066 (method url-fetch)
10067 (uri (string-append "https://github.com/shedskin/shedskin/"
10068 "releases/download/v" version
10069 "/shedskin-" version ".tgz"))
10070 (sha256
10071 (base32
10072 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10073 (build-system python-build-system)
10074 (arguments
10075 `(#:python ,python-2
10076 #:phases (modify-phases %standard-phases
10077 (add-after 'unpack 'fix-resulting-include-libs
10078 (lambda* (#:key inputs #:allow-other-keys)
10079 (let ((libgc (assoc-ref inputs "libgc"))
10080 (pcre (assoc-ref inputs "pcre")))
10081 (substitute* "shedskin/makefile.py"
10082 (("variable == 'CCFLAGS':[ ]*")
10083 (string-append "variable == 'CCFLAGS':\n"
10084 " line += ' -I " pcre "/include"
10085 " -I " libgc "/include'"))
10086 (("variable == 'LFLAGS':[ ]*")
10087 (string-append "variable == 'LFLAGS':\n"
10088 " line += ' -L" pcre "/lib"
10089 " -L " libgc "/lib'")))
10090 #t))))))
10091 (inputs `(("pcre" ,pcre)
10092 ("libgc" ,libgc)))
10093 (home-page "https://shedskin.github.io/")
10094 (synopsis "Experimental Python-2 to C++ Compiler")
10095 (description (string-append "This is an experimental compiler for a subset of
10096Python. It generates C++ code and a Makefile."))
10097 (license (list license:gpl3 license:bsd-3 license:expat))))
10098
10099(define-public python2-rope
10100 (package
10101 (name "python2-rope")
a9ba0a31 10102 (version "0.11.0")
44d10b1f
RW
10103 (source
10104 (origin
10105 (method url-fetch)
10106 (uri (pypi-uri "rope" version))
10107 (sha256
10108 (base32
a9ba0a31 10109 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 10110 (arguments
afb29715 10111 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
10112 `(#:python ,python-2))
10113 (build-system python-build-system)
10114 (native-inputs
10115 `(("python2-unittest2" ,python2-unittest2)))
10116 (home-page "https://github.com/python-rope/rope")
10117 (synopsis "Refactoring library for Python")
10118 (description "Rope is a refactoring library for Python. It facilitates
10119the renaming, moving and extracting of attributes, functions, modules, fields
10120and parameters in Python 2 source code. These refactorings can also be applied
10121to occurrences in strings and comments.")
10122 (license license:gpl2)))
10123
2c880ef4
LC
10124(define-public python-rope
10125 (package
10126 (inherit python2-rope)
10127 (name "python-rope")
10128 (arguments `(#:python ,python-wrapper
10129 ;; XXX: Only partial python3 support, results in some failing
10130 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10131 #:tests? #f))
10132 (properties `((python2-variant . ,(delay python2-rope))))))
10133
44d10b1f
RW
10134(define-public python-py3status
10135 (package
10136 (name "python-py3status")
ef68b35d 10137 (version "3.21")
44d10b1f
RW
10138 (source
10139 (origin
10140 (method url-fetch)
10141 (uri (pypi-uri "py3status" version))
10142 (sha256
ef68b35d 10143 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
10144 (build-system python-build-system)
10145 (inputs
10146 `(("file" ,file)))
10147 (arguments
10148 '(#:phases
10149 (modify-phases %standard-phases
10150 ;; 'file' is used for detection of configuration file encoding
10151 ;; let's make link the dependency to particular input
10152 (add-before 'build 'patch-file-path
10153 (lambda* (#:key inputs #:allow-other-keys)
10154 (let ((file-path (assoc-ref inputs "file")))
10155 (substitute* "py3status/parse_config.py"
10156 (("\\['file', '-b'")
10157 (string-append "['" file-path "/bin/file', '-b'")))
10158 #t))))
10159 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10160 (home-page "https://github.com/ultrabug/py3status")
10161 (synopsis "Extensible i3status wrapper written in Python")
10162 (description "py3status is an i3status wrapper which extends i3status
10163functionality in a modular way, allowing you to extend your panel with your
10164own code, responding to click events and updating clock every second.")
10165 (license license:bsd-3)))
10166
10167(define-public python-tblib
10168 (package
10169 (name "python-tblib")
10170 (version "1.3.2")
10171 (source (origin
10172 (method url-fetch)
10173 (uri (pypi-uri "tblib" version))
10174 (sha256 (base32
10175 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10176 (build-system python-build-system)
10177 (arguments
10178 `(#:phases
10179 (modify-phases %standard-phases
10180 (add-before 'check 'adjust-tests
10181 (lambda _
10182 (when (which "python3")
10183 ;; Adjust the example output to match that of Python 3.7:
10184 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10185 (substitute* "README.rst"
10186 (("Exception\\('fail',") "Exception('fail'"))
10187 #t)))
10188 (replace 'check
10189 (lambda _
10190 ;; Upstream runs tests after installation and the package itself
10191 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10192 ;; found.
10193 (setenv "PYTHONPATH"
10194 (string-append (getcwd) "/build/lib:"
10195 (getenv "PYTHONPATH")))
10196 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10197 (native-inputs
10198 `(("python-pytest" ,python-pytest)
10199 ("python-six" ,python-six)))
10200 (home-page "https://github.com/ionelmc/python-tblib")
10201 (synopsis "Traceback serialization library")
10202 (description
10203 "Traceback serialization allows you to:
10204
10205@enumerate
10206@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10207different processes. This allows better error handling when running code over
10208multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10209
10210@item Parse traceback strings and raise with the parsed tracebacks.
10211@end enumerate\n")
10212 (license license:bsd-3)))
10213
10214(define-public python2-tblib
10215 (package-with-python2 python-tblib))
10216
10217(define-public python-greenlet
10218 (package
10219 (name "python-greenlet")
10220 (version "0.4.15")
10221 (source (origin
10222 (method url-fetch)
10223 (uri (pypi-uri "greenlet" version))
10224 (sha256
10225 (base32
10226 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10227 (build-system python-build-system)
10228 (home-page "https://greenlet.readthedocs.io/")
10229 (synopsis "Lightweight in-process concurrent programming")
10230 (description
10231 "Greenlet package is a spin-off of Stackless, a version of CPython
10232that supports micro-threads called \"tasklets\". Tasklets run
10233pseudo-concurrently (typically in a single or a few OS-level threads) and
10234are synchronized with data exchanges on \"channels\".")
10235 (license (list license:psfl license:expat))))
10236
10237(define-public python2-greenlet
10238 (package-with-python2 python-greenlet))
10239
10240(define-public python-objgraph
10241 (package
10242 (name "python-objgraph")
10243 (version "3.4.0")
10244 (source
10245 (origin
10246 (method url-fetch)
10247 (uri (pypi-uri "objgraph" version))
10248 (sha256
10249 (base32
10250 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10251 (build-system python-build-system)
10252 (propagated-inputs
10253 `(("python-graphviz" ,python-graphviz)))
10254 (native-inputs
10255 `(("python-mock" ,python-mock)
10256 ("graphviz" ,graphviz)))
10257 (home-page "https://mg.pov.lt/objgraph/")
10258 (synopsis "Draw Python object reference graphs with graphviz")
10259 (description
10260 "This package provides tools to draw Python object reference graphs with
10261graphviz.")
10262 (license license:expat)))
10263
10264(define-public python-gevent
10265 (package
10266 (name "python-gevent")
10267 (version "1.3.7")
10268 (source (origin
10269 (method url-fetch)
10270 (uri (pypi-uri "gevent" version))
10271 (sha256
10272 (base32
10273 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10274 (modules '((guix build utils)))
10275 (snippet
10276 '(begin
10277 ;; unbunding libev and c-ares
10278 (delete-file-recursively "deps")
10279 #t))))
10280 (build-system python-build-system)
10281 (arguments
10282 `(#:modules ((ice-9 ftw)
10283 (ice-9 match)
10284 (srfi srfi-26)
10285 (guix build utils)
10286 (guix build python-build-system))
10287 #:phases (modify-phases %standard-phases
44d10b1f
RW
10288 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10289 (lambda _
10290 (substitute* "src/gevent/subprocess.py"
10291 (("/bin/sh") (which "sh")))
10292 (for-each (lambda (file)
10293 (substitute* file
10294 (("/bin/sh") (which "sh"))
10295 (("/bin/true") (which "true"))))
10296 (find-files "src/greentest" "\\.py$"))
10297 #t))
10298 (add-before 'build 'do-not-use-bundled-sources
10299 (lambda* (#:key inputs #:allow-other-keys)
10300 (setenv "CONFIG_SHELL" (which "bash"))
10301 (setenv "LIBEV_EMBED" "false")
10302 (setenv "CARES_EMBED" "false")
10303 (setenv "EMBED" "false")
10304
b5b56b7f
MB
10305 ;; Prevent building bundled libev.
10306 (substitute* "setup.py"
10307 (("run_make=_BUILDING")
10308 "run_make=False"))
10309
44d10b1f
RW
10310 (let ((greenlet (string-append
10311 (assoc-ref inputs "python-greenlet")
10312 "/include")))
10313 (match (scandir greenlet
10314 (lambda (item)
10315 (string-prefix? "python" item)))
10316 ((python)
b5b56b7f 10317 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
10318 (string-append greenlet "/" python)))))
10319 #t))
10320 (add-before 'check 'skip-timer-test
10321 (lambda _
10322 ;; XXX: Skip 'TestTimerResolution', which appears to be
10323 ;; unreliable.
10324 (substitute* "src/greentest/test__core_timer.py"
10325 (("not greentest.RUNNING_ON_CI") "False"))
10326 #t))
10327 (replace 'check
10328 (lambda _
10329 ;; Make sure the build directory is on PYTHONPATH.
10330 (setenv "PYTHONPATH"
10331 (string-append
10332 (getenv "PYTHONPATH") ":"
10333 (getcwd) "/build/"
10334 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10335 (with-directory-excursion "src/greentest"
10336 ;; XXX: Many tests require network access. Instead we only
10337 ;; run known-good tests. Unfortunately we cannot use
10338 ;; recursion here since this directory also contains
10339 ;; Python-version-specific subfolders.
10340 (apply invoke "python" "testrunner.py" "--config"
10341 "known_failures.py"
10342 (scandir "." (cut regexp-exec
10343 (make-regexp "test_+(subprocess|core)")
10344 <>)))))))))
10345 (propagated-inputs
10346 `(("python-greenlet" ,python-greenlet)
10347 ("python-objgraph" ,python-objgraph)))
10348 (native-inputs
b5b56b7f 10349 `(("python-six" ,python-six)))
44d10b1f
RW
10350 (inputs
10351 `(("c-ares" ,c-ares)
10352 ("libev" ,libev)))
10353 (home-page "http://www.gevent.org/")
10354 (synopsis "Coroutine-based network library")
10355 (description
10356 "gevent is a coroutine-based Python networking library that uses greenlet
10357to provide a high-level synchronous API on top of the libev event loop.")
10358 (license license:expat)
10359 (properties `((python2-variant . ,(delay python2-gevent))))))
10360
10361(define-public python2-gevent
10362 (let ((base (package-with-python2
10363 (strip-python2-variant python-gevent))))
10364 (package
10365 (inherit base)
10366 (native-inputs `(,@(package-native-inputs python-gevent)
10367 ("python-mock" ,python2-mock))))))
10368
10369(define-public python-fastimport
10370 (package
10371 (name "python-fastimport")
10372 (version "0.9.6")
10373 (source
10374 (origin
10375 (method url-fetch)
10376 (uri (pypi-uri "fastimport" version))
10377 (sha256
10378 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10379 (build-system python-build-system)
10380 (home-page "https://github.com/jelmer/python-fastimport")
10381 (synopsis "VCS fastimport parser and generator in Python")
10382 (description "This package provides a parser for and generator of the Git
10383@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10384format.")
10385 (license license:gpl2+)))
10386
10387(define-public python2-fastimport
10388 (package-with-python2 python-fastimport))
10389
10390(define-public python-twisted
10391 (package
10392 (name "python-twisted")
fdfad2fc 10393 (version "19.7.0")
44d10b1f
RW
10394 (source (origin
10395 (method url-fetch)
10396 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10397 (sha256
10398 (base32
fdfad2fc 10399 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10400 (build-system python-build-system)
10401 (arguments
0107c9b8 10402 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10403 (propagated-inputs
10404 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10405 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10406 ("python-incremental" ,python-incremental)
e5ba2fe3 10407 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10408 ("python-constantly" ,python-constantly)
10409 ("python-automat" ,python-automat)))
10410 (home-page "https://twistedmatrix.com/")
10411 (synopsis "Asynchronous networking framework written in Python")
10412 (description
10413 "Twisted is an extensible framework for Python programming, with special
10414focus on event-based network programming and multiprotocol integration.")
10415 (license license:expat)))
10416
10417(define-public python2-twisted
10418 (package-with-python2 python-twisted))
10419
10420(define-public python-pika
10421 (package
10422 (name "python-pika")
10423 (version "0.12.0")
10424 (source
10425 (origin
10426 (method url-fetch)
10427 (uri (pypi-uri "pika" version))
10428 (sha256
10429 (base32
10430 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10431 (build-system python-build-system)
10432 (native-inputs
10433 `(("python-pyev" ,python-pyev)
10434 ("python-tornado" ,python-tornado)
10435 ("python-twisted" ,python-twisted)))
10436 (home-page "https://pika.readthedocs.org")
10437 (synopsis "Pure Python AMQP Client Library")
10438 (description
10439 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10440Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10441network support library.")
10442 (license license:bsd-3)))
10443
10444(define-public python2-pika
10445 (package-with-python2 python-pika))
10446
10447(define-public python-ply
10448 (package
10449 (name "python-ply")
10450 (version "3.10")
10451 (source
10452 (origin
10453 (method url-fetch)
10454 (uri (pypi-uri "ply" version))
10455 (sha256
10456 (base32
10457 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10458 (build-system python-build-system)
10459 (home-page "http://www.dabeaz.com/ply/")
10460 (synopsis "Python Lex & Yacc")
10461 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10462It uses LR parsing and does extensive error checking.")
10463 (license license:bsd-3)))
10464
10465(define-public python2-ply
10466 (package-with-python2 python-ply))
10467
10468(define-public python-tabulate
10469 (package
10470 (name "python-tabulate")
10471 (version "0.7.7")
10472 (source (origin
10473 (method url-fetch)
10474 (uri (pypi-uri "tabulate" version))
10475 (sha256
10476 (base32
10477 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10478 (build-system python-build-system)
10479 (arguments
10480 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10481 ;; and the latest release is not tagged in the upstream repository.
10482 '(#:tests? #f))
10483 (home-page "https://bitbucket.org/astanin/python-tabulate")
10484 (synopsis "Pretty-print tabular data")
10485 (description
10486 "Tabulate is a library and command-line utility to pretty-print tabular
10487data in Python.")
10488 (license license:expat)))
10489
10490(define-public python2-tabulate
10491 (package-with-python2 python-tabulate))
10492
10493(define-public python-kazoo
10494 (package
10495 (name "python-kazoo")
10496 (version "2.4.0")
10497 (source
10498 (origin
10499 (method url-fetch)
10500 (uri (pypi-uri "kazoo" version))
10501 (sha256
10502 (base32
10503 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10504 (build-system python-build-system)
10505 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10506 (propagated-inputs
10507 `(("python-six" ,python-six)))
10508 (home-page "https://kazoo.readthedocs.org")
10509 (synopsis "High-level Zookeeper client library")
10510 (description
10511 "Kazoo is a Python client library for the Apache Zookeeper distributed
10512application service. It is designed to be easy to use and to avoid common
10513programming errors.")
10514 (license license:asl2.0)))
10515
10516(define-public python2-kazoo
10517 (package-with-python2 python-kazoo))
10518
10519(define-public python-pykafka
10520 (package
10521 (name "python-pykafka")
10522 (version "2.4.0")
10523 (source (origin
10524 (method url-fetch)
0ca1d040 10525 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10526 (sha256
10527 (base32
10528 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10529 (build-system python-build-system)
10530 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10531 (propagated-inputs
10532 `(("python-gevent" ,python-gevent)
10533 ("python-kazoo" ,python-kazoo)
10534 ("python-tabulate" ,python-tabulate)))
10535 (inputs
10536 `(("librdkafka" ,librdkafka)))
10537 (home-page "https://pykafka.readthedocs.io/")
10538 (synopsis "Apache Kafka client for Python")
10539 (description
10540 "PyKafka is a client for the Apache Kafka distributed messaging system.
10541It includes Python implementations of Kafka producers and consumers, which
10542are optionally backed by a C extension built on librdkafka.")
10543 (license license:asl2.0)))
10544
10545(define-public python2-pykafka
10546 (package-with-python2 python-pykafka))
10547
10548(define-public python-wcwidth
10549 (package
10550 (name "python-wcwidth")
10551 (version "0.1.7")
10552 (source
10553 (origin
10554 (method url-fetch)
10555 (uri (pypi-uri "wcwidth" version))
10556 (sha256
10557 (base32
10558 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10559 (build-system python-build-system)
10560 (home-page "https://github.com/jquast/wcwidth")
10561 (synopsis "Measure number of terminal column cells of wide-character codes")
10562 (description "Wcwidth measures the number of terminal column cells of
10563wide-character codes. It is useful for those implementing a terminal emulator,
10564or programs that carefully produce output to be interpreted by one. It is a
10565Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10566specified in POSIX.1-2001 and POSIX.1-2008.")
10567 (license license:expat)))
10568
10569(define-public python2-wcwidth
10570 (package-with-python2 python-wcwidth))
10571
10572(define-public python2-jsonrpclib
10573 (package
10574 (name "python2-jsonrpclib")
10575 (version "0.1.7")
10576 (source (origin
10577 (method url-fetch)
6571bba0 10578 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10579 (sha256
10580 (base32
10581 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10582 (build-system python-build-system)
10583 (arguments
10584 `(#:tests? #f
10585 #:python ,python-2))
10586 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10587 (synopsis "Implementation of JSON-RPC specification for Python")
10588 (description
10589 "This library is an implementation of the JSON-RPC specification.
10590It supports both the original 1.0 specification, as well as the
10591new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10592etc.")
10593 (license license:asl2.0)))
10594
10595(define-public python-chai
10596 (package
10597 (name "python-chai")
10598 (version "1.1.2")
10599 (source (origin
10600 (method url-fetch)
10601 (uri (pypi-uri "chai" version))
10602 (sha256
10603 (base32
10604 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10605 (build-system python-build-system)
10606 (home-page "https://github.com/agoragames/chai")
10607 (synopsis "Mocking framework for Python")
10608 (description
10609 "Chai provides an api for mocking, stubbing and spying your python
10610objects, patterned after the Mocha library for Ruby.")
10611 (license license:bsd-3)))
10612
10613(define-public python2-chai
10614 (package-with-python2 python-chai))
10615
10616(define-public python-inflection
10617 (package
10618 (name "python-inflection")
10619 (version "0.3.1")
10620 (source
10621 (origin (method url-fetch)
10622 (uri (pypi-uri "inflection" version))
10623 (sha256
10624 (base32
10625 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10626 (build-system python-build-system)
10627 (native-inputs
10628 `(("python-pytest" ,python-pytest)))
10629 (home-page "https://github.com/jpvanhal/inflection")
10630 (synopsis "Python string transformation library")
10631 (description
10632 "Inflection is a string transformation library. It singularizes
10633and pluralizes English words, and transforms strings from CamelCase to
10634underscored string.")
10635 (license license:expat)))
10636
10637(define-public python2-inflection
10638 (package-with-python2 python-inflection))
10639
10640(define-public python-pylev
10641 (package
10642 (name "python-pylev")
10643 (version "1.3.0")
10644 (source (origin
10645 (method url-fetch)
10646 (uri (pypi-uri "pylev" version))
10647 (sha256
10648 (base32
10649 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10650 (build-system python-build-system)
10651 (home-page "https://github.com/toastdriven/pylev")
10652 (synopsis "Levenshtein distance implementation in Python")
10653 (description "Pure Python Levenshtein implementation, based off the
10654Wikipedia code samples at
10655@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10656 (license license:bsd-3)))
10657
10658(define-public python2-pylev
10659 (package-with-python2 python-pylev))
10660
10661(define-public python-cleo
10662 (package
10663 (name "python-cleo")
af2d3713 10664 (version "0.6.8")
44d10b1f
RW
10665 (source (origin
10666 (method url-fetch)
10667 (uri (pypi-uri "cleo" version))
10668 (sha256
10669 (base32
af2d3713 10670 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
44d10b1f
RW
10671 (build-system python-build-system)
10672 (native-inputs
af2d3713 10673 `( ;; For testing
44d10b1f
RW
10674 ("python-mock" ,python-mock)
10675 ("python-pytest-mock" ,python-pytest-mock)
10676 ("python-pytest" ,python-pytest)))
10677 (propagated-inputs
10678 `(("python-backpack" ,python-backpack)
10679 ("python-pastel" ,python-pastel)
10680 ("python-pylev" ,python-pylev)))
10681 (home-page "https://github.com/sdispater/cleo")
10682 (synopsis "Command-line arguments library for Python")
10683 (description
10684 "Cleo allows you to create command-line commands with signature in
10685docstring and colored output.")
10686 (license license:expat)))
10687
10688(define-public python2-cleo
10689 (package-with-python2 python-cleo))
10690
2be85c45
TLC
10691(define-public python-tomlkit
10692 (package
10693 (name "python-tomlkit")
10694 (version "0.5.7")
10695 (source
10696 (origin
10697 (method url-fetch)
10698 (uri (pypi-uri "tomlkit" version))
10699 (sha256
10700 (base32
10701 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10702 (build-system python-build-system)
10703 (native-inputs
10704 `(("python-pytest" ,python-pytest)))
10705 (home-page
10706 "https://github.com/sdispater/tomlkit")
10707 (synopsis "Style preserving TOML library")
10708 (description
10709 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10710preserves all comments, indentations, whitespace and internal element ordering,
10711and makes them accessible and editable via an intuitive API. It can also
10712create new TOML documents from scratch using the provided helpers. Part of the
10713implementation as been adapted, improved and fixed from Molten.")
10714 (license license:expat)))
10715
0bb32201
TLC
10716(define-public python-shellingham
10717 (package
10718 (name "python-shellingham")
10719 (version "1.3.1")
10720 (source
10721 (origin
10722 (method url-fetch)
10723 (uri (pypi-uri "shellingham" version))
10724 (sha256
10725 (base32
10726 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10727 (build-system python-build-system)
10728 (home-page
10729 "https://github.com/sarugaku/shellingham")
10730 (synopsis "Tool to detect surrounding shell")
10731 (description
10732 "Shellingham detects what shell the current Python executable is
10733running in.")
10734 (license license:isc)))
10735
aee92957
TLC
10736(define-public python-memcached
10737 (package
10738 (name "python-memcached")
10739 (version "1.59")
10740 (source
10741 (origin
10742 (method url-fetch)
10743 (uri (pypi-uri "python-memcached" version))
10744 (sha256
10745 (base32
10746 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10747 (build-system python-build-system)
10748 (propagated-inputs `(("python-six" ,python-six)))
10749 (home-page
10750 "https://github.com/linsomniac/python-memcached")
10751 (synopsis "Pure python memcached client")
10752 (description
10753 "This software is a pure Python interface to the memcached memory cache
10754daemon. It is the client side software which allows storing values in one or
10755more, possibly remote, memcached servers.")
10756 (license license:psfl)))
10757
b2ac2508
TLC
10758(define-public python-clikit
10759 (package
10760 (name "python-clikit")
10761 (version "0.2.4")
10762 (source
10763 (origin
10764 (method url-fetch)
10765 (uri (pypi-uri "clikit" version))
10766 (sha256
10767 (base32
10768 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10769 (build-system python-build-system)
10770 (propagated-inputs
10771 `(("python-pastel" ,python-pastel)
10772 ("python-pylev" ,python-pylev)))
10773 (home-page "https://github.com/sdispater/clikit")
10774 (synopsis "Group of utilities to build command line interfaces")
10775 (description
10776 "CliKit is a group of utilities to build testable command line
10777interfaces.")
10778 (license license:expat)))
10779
c6f008d6
TLC
10780(define-public python-msgpack-python
10781 (package
10782 (name "python-msgpack-python")
10783 (version "0.5.6")
10784 (source
10785 (origin
10786 (method url-fetch)
10787 (uri (pypi-uri "msgpack-python" version))
10788 (sha256
10789 (base32
10790 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10791 (build-system python-build-system)
10792 (home-page "http://msgpack.org/")
10793 (synopsis "Package to deserialize messages in MessagePack binary format")
10794 (description
10795 "MessagePack is an efficient binary serialization format. It lets you
10796exchange data among multiple languages like JSON. But it's faster and
10797smaller. Small integers are encoded into a single byte, and typical short
10798strings require only one extra byte in addition to the strings themselves.")
10799 (license license:asl2.0)))
10800
badc1c63
TLC
10801(define-public python-cachy
10802 (package
10803 (name "python-cachy")
10804 (version "0.2.0")
10805 (source
10806 (origin
10807 (method url-fetch)
10808 (uri (pypi-uri "cachy" version))
10809 (sha256
10810 (base32
10811 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10812 (build-system python-build-system)
10813 (native-inputs
10814 `(("python-fakeredis" ,python-fakeredis)
10815 ("python-flexmock" ,python-flexmock)
10816 ("python-pytest" ,python-pytest)))
10817 (propagated-inputs
10818 `(("python-memcached" ,python-memcached)
10819 ("python-msgpack-python" ,python-msgpack-python)
10820 ("python-redis" ,python-redis)))
10821 (home-page "https://github.com/sdispater/cachy")
10822 (synopsis "Simple yet effective caching library")
10823 (description
10824 "Cachy provides a simple yet effective caching library. A simple but
10825powerful API: thread-safety; decorator syntax; support for memcached, redis,
10826database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10827 (license license:expat)))
10828
617bb67b
TLC
10829(define-public poetry
10830 (package
10831 (name "poetry")
10832 (version "0.12.17")
10833 ;; Poetry can only be built from source with poetry.
10834 (source
10835 (origin
10836 (method url-fetch)
10837 (uri (pypi-uri "poetry" version))
10838 (sha256
10839 (base32
10840 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10841 (build-system python-build-system)
10842 (arguments
10843 `(#:tests? #f ;; Pypi does not have tests.
10844 #:phases
10845 (modify-phases %standard-phases
10846 (replace 'build
10847 (lambda _
10848 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10849 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10850 "setup.py")
10851 #t)))))
10852 (propagated-inputs
10853 `(("python-cachecontrol" ,python-cachecontrol)
10854 ("python-cachy" ,python-cachy)
10855 ("python-cleo" ,python-cleo)
10856 ("python-glob2" ,python-glob2)
10857 ("python-html5lib" ,python-html5lib)
10858 ("python-jsonschema" ,python-jsonschema)
10859 ("python-msgpack" ,python-msgpack)
10860 ("python-pathlib2" ,python-pathlib2)
10861 ("python-pkginfo" ,python-pkginfo)
10862 ("python-pyparsing" ,python-pyparsing)
10863 ("python-pyrsistent" ,python-pyrsistent)
10864 ("python-requests" ,python-requests)
10865 ("python-requests-toolbelt" ,python-requests-toolbelt)
10866 ("python-shellingham" ,python-shellingham)
10867 ("python-tomlkit" ,python-tomlkit)
10868 ("python-virtualenv" ,python-virtualenv)))
10869 (home-page "https://poetry.eustace.io/")
10870 (synopsis "Python dependency management and packaging made easy")
10871 (description "Poetry is a tool for dependency management and packaging
10872in Python. It allows you to declare the libraries your project depends on and
10873it will manage (install/update) them for you.")
10874 (license license:expat)))
10875
44d10b1f
RW
10876(define-public python-lazy-object-proxy
10877 (package
10878 (name "python-lazy-object-proxy")
7454078a 10879 (version "1.4.3")
44d10b1f
RW
10880 (source (origin
10881 (method url-fetch)
10882 (uri (pypi-uri "lazy-object-proxy" version))
10883 (sha256
10884 (base32
7454078a 10885 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
10886 (native-inputs
10887 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
10888 (build-system python-build-system)
10889 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10890 (synopsis "Lazy object proxy for python")
10891 (description
10892 "Lazy object proxy is an object that wraps a callable but defers the call
10893until the object is actually required, and caches the result of said call.")
10894 (license license:bsd-2)))
10895
10896(define-public python2-lazy-object-proxy
10897 (package-with-python2 python-lazy-object-proxy))
10898
10899(define-public python-dnspython
10900 (package
10901 (name "python-dnspython")
10902 (version "1.15.0")
10903 (source (origin
10904 (method url-fetch)
10905 (uri (string-append "http://www.dnspython.org/kits/"
10906 version "/dnspython-" version ".tar.gz"))
10907 (sha256
10908 (base32
10909 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10910 (build-system python-build-system)
10911 (arguments '(#:tests? #f)) ; XXX: requires internet access
10912 (home-page "http://www.dnspython.org")
10913 (synopsis "DNS toolkit for Python")
10914 (description
10915 "dnspython is a DNS toolkit for Python. It supports almost all record
10916types. It can be used for queries, zone transfers, and dynamic updates.
10917It supports TSIG authenticated messages and EDNS0.")
10918 (license license:expat)))
10919
10920(define-public python2-dnspython
10921 (package-with-python2 python-dnspython))
10922
10923(define-public python-email-validator
10924 (package
10925 (name "python-email-validator")
10926 (version "1.0.2")
10927 (source
10928 (origin (method url-fetch)
10929 (uri (pypi-uri "email_validator" version))
10930 (sha256
10931 (base32
10932 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10933 (build-system python-build-system)
10934 (arguments
10935 '(#:phases
10936 (modify-phases %standard-phases
10937 (add-before 'build 'use-dnspython
10938 (lambda _
10939 (substitute* "setup.py"
10940 (("dnspython3") "dnspython"))
10941 #t)))))
10942 (propagated-inputs
10943 `(("python-dnspython" ,python-dnspython)
10944 ("python-idna" ,python-idna)))
10945 (home-page "https://github.com/JoshData/python-email-validator")
10946 (synopsis "Email address validation library for Python")
10947 (description
10948 "This library validates email address syntax and deliverability.")
10949 (license license:cc0)))
10950
10951(define-public python2-email-validator
10952 (package-with-python2 python-email-validator))
10953
10954(define-public python-ukpostcodeparser
10955 (package
10956 (name "python-ukpostcodeparser")
10957 (version "1.0.3")
10958 (source (origin
10959 (method url-fetch)
10960 (uri (pypi-uri "UkPostcodeParser" version))
10961 (sha256
10962 (base32
10963 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10964 (build-system python-build-system)
10965 (home-page "https://github.com/hamstah/ukpostcodeparser")
10966 (synopsis "UK Postcode parser for Python")
10967 (description
10968 "This library provides the @code{parse_uk_postcode} function for
10969parsing UK postcodes.")
10970 (license license:expat)))
10971
10972(define-public python2-ukpostcodeparser
10973 (package-with-python2 python-ukpostcodeparser))
10974
10975(define-public python-faker
10976 (package
10977 (name "python-faker")
10978 (version "0.7.9")
10979 (source (origin
10980 (method url-fetch)
10981 (uri (pypi-uri "Faker" version))
10982 (sha256
10983 (base32
10984 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10985 (patches
10986 (search-patches "python-faker-fix-build-32bit.patch"))
10987 (modules '((guix build utils)))
10988 (snippet
10989 '(begin
10990 (for-each delete-file (find-files "." "\\.pyc$"))
10991 #t))))
10992 (build-system python-build-system)
10993 (arguments
10994 '(#:phases
10995 (modify-phases %standard-phases
10996 (replace 'check
49ff8827 10997 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10998 (native-inputs
10999 `(;; For testing
11000 ("python-email-validator" ,python-email-validator)
11001 ("python-mock" ,python-mock)
11002 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11003 (propagated-inputs
11004 `(("python-dateutil" ,python-dateutil)
11005 ("python-six" ,python-six)))
11006 (home-page "https://github.com/joke2k/faker")
11007 (synopsis "Python package that generates fake data")
11008 (description
11009 "Faker is a Python package that generates fake data such as names,
11010addresses, and phone numbers.")
11011 (license license:expat)
11012 (properties `((python2-variant . ,(delay python2-faker))))))
11013
11014(define-public python2-faker
11015 (let ((base (package-with-python2 (strip-python2-variant
11016 python-faker))))
11017 (package
11018 (inherit base)
11019 (propagated-inputs
11020 `(("python2-ipaddress" ,python2-ipaddress)
11021 ,@(package-propagated-inputs base))))))
11022
11023(define-public python-pyaml
11024 (package
11025 (name "python-pyaml")
11026 (version "18.11.0")
11027 (source (origin
11028 (method url-fetch)
11029 (uri (pypi-uri "pyaml" version))
11030 (sha256
11031 (base32
11032 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
11033 (build-system python-build-system)
11034 (native-inputs
11035 `(("python-unidecode" ,python-unidecode)))
11036 (propagated-inputs
11037 `(("python-pyyaml" ,python-pyyaml)))
11038 (home-page "https://github.com/mk-fg/pretty-yaml")
11039 (synopsis "YAML pretty-print library for Python")
11040 (description
11041 "pyaml is a PyYAML based python module to produce pretty and readable
11042YAML-serialized data.")
492e3a7a 11043 (license license:wtfpl2)))
44d10b1f
RW
11044
11045(define-public python2-pyaml
11046 (package-with-python2 python-pyaml))
11047
11048(define-public python-backpack
11049 (package
11050 (name "python-backpack")
11051 (version "0.1")
11052 (source
11053 (origin
11054 (method url-fetch)
11055 (uri (pypi-uri "backpack" version))
11056 (sha256
11057 (base32
11058 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
11059 (build-system python-build-system)
11060 (native-inputs
11061 `(("python-pytest" ,python-pytest)
11062 ("python-nose" ,python-nose)))
11063 (propagated-inputs
11064 `(("python-simplejson" ,python-simplejson)))
11065 (home-page "https://github.com/sdispater/backpack")
11066 (synopsis "Utilities for working with Python collections")
11067 (description "Backpack provides some useful utilities for working with
11068collections of data.")
11069 (license license:expat)))
11070
11071(define-public python2-backpack
11072 (package-with-python2 python-backpack))
11073
11074(define-public python-prompt-toolkit
11075 (package
11076 (name "python-prompt-toolkit")
11077 (version "2.0.7")
11078 (source
11079 (origin
11080 (method url-fetch)
11081 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11082 (sha256
11083 (base32
11084 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
11085 (build-system python-build-system)
11086 (arguments
11087 `(#:phases
11088 (modify-phases %standard-phases
11089 (delete 'check)
11090 (add-after 'install 'post-install-check
11091 (lambda* (#:key inputs outputs #:allow-other-keys)
11092 ;; HOME is needed for the test
11093 ;; "test_pathcompleter_can_expanduser".
11094 (setenv "HOME" "/tmp")
11095 (add-installed-pythonpath inputs outputs)
11096 (invoke "py.test"))))))
11097 (propagated-inputs
11098 `(("python-wcwidth" ,python-wcwidth)
11099 ("python-six" ,python-six)
11100 ("python-pygments" ,python-pygments)))
11101 (native-inputs
11102 `(("python-pytest" ,python-pytest)))
11103 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11104 (synopsis "Library for building command line interfaces in Python")
11105 (description
11106 "Prompt-Toolkit is a library for building interactive command line
11107interfaces in Python. It's like GNU Readline but it also features syntax
11108highlighting while typing, out-of-the-box multi-line input editing, advanced
11109code completion, incremental search, support for Chinese double-width
11110characters, mouse support, and auto suggestions.")
11111 (license license:bsd-3)))
11112
11113(define-public python2-prompt-toolkit
11114 (package-with-python2 python-prompt-toolkit))
11115
11116(define-public python-prompt-toolkit-1
11117 (package (inherit python-prompt-toolkit)
11118 (version "1.0.15")
11119 (source
11120 (origin
11121 (method url-fetch)
11122 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11123 (sha256
11124 (base32
11125 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11126
11127(define-public python2-prompt-toolkit-1
11128 (package-with-python2 python-prompt-toolkit-1))
11129
11130(define-public python-jedi
11131 (package
11132 (name "python-jedi")
296e1aea 11133 (version "0.15.1")
44d10b1f
RW
11134 (source
11135 (origin
11136 (method url-fetch)
11137 (uri (pypi-uri "jedi" version))
11138 (sha256
11139 (base32
296e1aea 11140 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
11141 (build-system python-build-system)
11142 (arguments
296e1aea 11143 `(#:phases
44d10b1f 11144 (modify-phases %standard-phases
296e1aea
MC
11145 (add-after 'unpack 'disable-file-completion-test
11146 ;; A single parameterized test currently fail (see:
11147 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
11148 (lambda _
11149 (substitute* "test/test_api/test_completion.py"
11150 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
11151 #t))
44d10b1f 11152 (replace 'check
296e1aea
MC
11153 (lambda _
11154 (setenv "HOME" "/tmp")
11155 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
11156 (native-inputs
11157 `(("python-pytest" ,python-pytest)
11158 ("python-docopt" ,python-docopt)))
11159 (propagated-inputs
11160 `(("python-parso" ,python-parso)))
11161 (home-page "https://github.com/davidhalter/jedi")
11162 (synopsis "Autocompletion and static analysis library for Python")
11163 (description
11164 "Jedi is a static analysis tool for Python that can be used in Integrated
11165Development Environments (@dfn{IDE}s) and text editors. It understands Python
11166on a deeper level than many other static analysis frameworks for Python.
11167
11168Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11169well.")
11170 (license license:expat)))
11171
11172(define-public python2-jedi
296e1aea 11173 (package-with-python2 python-jedi))
44d10b1f
RW
11174
11175(define-public ptpython
11176 (package
11177 (name "ptpython")
11178 (version "0.34")
11179 (source (origin
11180 (method url-fetch)
11181 (uri (pypi-uri "ptpython" version))
11182 (sha256
11183 (base32
11184 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11185 (build-system python-build-system)
11186 (arguments
11187 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11188 (propagated-inputs
11189 `(("python-docopt" ,python-docopt)
11190 ("python-jedi" ,python-jedi)
11191 ("python-prompt-toolkit" ,python-prompt-toolkit)
11192 ("python-pygments" ,python-pygments)))
11193 (home-page "https://github.com/jonathanslenders/ptpython")
11194 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11195 (description
11196 "ptpython is a Python read-eval-print loop with IDE-like features.
11197It supports syntax highlighting, multiline editing, autocompletion, mouse,
11198color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11199etc.")
11200 (license license:bsd-3)
11201 (properties `((python2-variant . ,(delay ptpython-2))))))
11202
11203(define-public ptpython-2
11204 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11205 (package
11206 (inherit base)
11207 (name "ptpython2"))))
11208
11209(define-public python-stem
11210 (package
11211 (name "python-stem")
e746d1c3 11212 (version "1.7.1")
44d10b1f
RW
11213 (source
11214 (origin
11215 (method url-fetch)
11216 (uri (pypi-uri "stem" version))
11217 (sha256
11218 (base32
e746d1c3 11219 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
11220 (build-system python-build-system)
11221 (arguments
11222 `(#:phases
11223 (modify-phases %standard-phases
11224 (replace 'check
11225 (lambda _
11226 (invoke "./run_tests.py" "--unit")
11227 #t)))))
11228 (native-inputs
11229 `(("python-mock" ,python-mock)
11230 ("python-pycodestyle" ,python-pycodestyle)
11231 ("python-pyflakes" ,python-pyflakes)))
11232 (home-page "https://stem.torproject.org/")
11233 (synopsis
11234 "Python controller library that allows applications to interact with Tor")
11235 (description
11236 "Stem is a Python controller library for Tor. With it you can use Tor's
11237control protocol to script against the Tor process and read descriptor data
11238relays publish about themselves.")
11239 (license license:lgpl3)))
11240
11241(define-public python2-stem
11242 (package-with-python2 python-stem))
11243
11244(define-public python-pyserial
11245 (package
11246 (name "python-pyserial")
11247 (version "3.1.1")
11248 (source
11249 (origin
11250 (method url-fetch)
11251 (uri (pypi-uri "pyserial" version))
11252 (sha256
11253 (base32
11254 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11255 (build-system python-build-system)
11256 (arguments
11257 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11258 ;; #:phases
11259 ;; (modify-phases %standard-phases
11260 ;; (replace 'check
11261 ;; (lambda _
11262 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11263 (home-page
11264 "https://github.com/pyserial/pyserial")
11265 (synopsis "Python Serial Port Bindings")
11266 (description "@code{pyserial} provide serial port bindings for Python. It
11267supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11268and/or Xon/Xoff. The port is accessed in RAW mode.")
11269 (license license:bsd-3)))
11270
11271(define-public python2-pyserial
11272 (package-with-python2 python-pyserial))
11273
11274(define-public python-kivy
11275 (package
11276 (name "python-kivy")
11277 (version "1.10.1")
11278 (source
11279 (origin
11280 (method url-fetch)
11281 (uri (pypi-uri "Kivy" version))
11282 (file-name (string-append name "-" version ".tar.gz"))
11283 (sha256
11284 (base32
11285 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11286 (build-system python-build-system)
11287 (arguments
11288 `(#:tests? #f ; Tests require many optional packages
11289 #:phases
11290 (modify-phases %standard-phases
11291 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11292 (lambda* (#:key inputs #:allow-other-keys)
11293 (setenv "KIVY_SDL2_PATH"
11294 (string-append (assoc-ref inputs "sdl-union")
11295 "/include/SDL2"))
11296 #t)))))
11297 (native-inputs
11298 `(("git" ,git)
11299 ("pkg-config" ,pkg-config)
11300 ("python-cython" ,python-cython)))
11301 (inputs
11302 `(("gstreamer" ,gstreamer)
11303 ("mesa" ,mesa)
11304 ("sdl-union"
11305 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11306 (home-page "http://kivy.org")
11307 (synopsis
11308 "Multitouch application framework")
11309 (description
11310 "A software library for rapid development of
11311hardware-accelerated multitouch applications.")
11312 (license license:expat)))
11313
11314(define-public python2-kivy
11315 (package-with-python2 python-kivy))
11316
11317(define-public python-kivy-next
11318 (deprecated-package "python-kivy-next" python-kivy))
11319
11320(define-public python2-kivy-next
11321 (deprecated-package "python2-kivy-next" python2-kivy))
11322
11323(define-public python-binaryornot
11324 (package
11325 (name "python-binaryornot")
11326 (version "0.4.4")
11327 (source (origin
11328 (method url-fetch)
11329 (uri (pypi-uri "binaryornot" version))
11330 (sha256
11331 (base32
11332 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11333 (build-system python-build-system)
86723f98
DM
11334 (arguments
11335 `(#:phases
11336 (modify-phases %standard-phases
ee623903 11337 (add-after 'unpack 'patch-tests
86723f98
DM
11338 (lambda _
11339 ;; TypeError: binary() got an unexpected keyword argument
11340 ;; 'average_size'.
11341 (substitute* "tests/test_check.py"
11342 (("average_size=512") ""))
11343 #t)))))
44d10b1f
RW
11344 (propagated-inputs
11345 `(("python-chardet" ,python-chardet)
11346 ("python-hypothesis" ,python-hypothesis)))
11347 (home-page "https://github.com/audreyr/binaryornot")
11348 (synopsis "Package to check if a file is binary or text")
11349 (description "Ultra-lightweight pure Python package to check if a file is
11350binary or text.")
11351 (license license:bsd-3)
11352 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11353
11354(define-public python2-binaryornot
11355 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11356 (package (inherit base)
11357 (propagated-inputs
11358 `(("python2-enum34" ,python2-enum34)
11359 ,@(package-propagated-inputs base))))))
11360
f315673d
VC
11361(define-public python-binwalk
11362 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11363 (revision "0"))
11364 (package
11365 (name "python-binwalk")
11366 (version (git-version "2.1.1" revision commit))
11367 (source
11368 (origin
11369 (method git-fetch)
11370 (uri (git-reference
11371 (url "https://github.com/ReFirmLabs/binwalk")
11372 (commit commit)))
11373 (file-name (git-file-name name version))
11374 (sha256
11375 (base32
11376 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11377 (build-system python-build-system)
11378 (arguments
11379 `(#:phases
11380 (modify-phases %standard-phases
11381 (add-before 'check 'set-pythonpath
11382 (lambda _
11383 (setenv "PYTHONPATH"
11384 (string-append
11385 (getcwd) "/src/"
11386 ":" (getenv "PYTHONPATH")))
11387 (setenv "HOME" "")
11388 #t)))))
11389 (native-inputs
11390 `(("python-coverage" ,python-coverage)
11391 ("python-nose" ,python-nose)))
11392 (home-page "https://github.com/ReFirmLabs/binwalk")
11393 (synopsis "Firmware analysis tool")
11394 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11395 (license license:expat))))
11396
44d10b1f
RW
11397(define-public python-nltk
11398 (package
11399 (name "python-nltk")
11400 (version "3.2.1")
11401 (source (origin
11402 (method url-fetch)
11403 (uri (pypi-uri "nltk" version))
11404 (sha256
11405 (base32
11406 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11407 (build-system python-build-system)
11408 (arguments
11409 '(;; The tests require some extra resources to be downloaded.
11410 ;; TODO Try packaging these resources.
11411 #:tests? #f))
11412 (home-page "http://nltk.org/")
11413 (synopsis "Natural Language Toolkit")
11414 (description "It provides interfaces to over 50 corpora and lexical
11415resources such as WordNet, along with a suite of text processing libraries
11416for classification, tokenization, stemming, tagging, parsing, and semantic
11417reasoning, wrappers for natural language processing libraries.")
11418 (license license:asl2.0)))
11419
11420(define-public python2-nltk
11421 (package-with-python2 python-nltk))
11422
11423(define-public python-pymongo
11424 (package
11425 (name "python-pymongo")
11426 (version "3.7.2")
11427 (source (origin
11428 (method url-fetch)
11429 (uri (pypi-uri "pymongo" version))
11430 (sha256
11431 (base32
11432 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11433 (build-system python-build-system)
11434 (propagated-inputs
11435 `(("python-certifi" ,python-certifi)))
11436 (home-page "https://github.com/mongodb/mongo-python-driver")
11437 (synopsis "Python driver for MongoDB")
11438 (description "Python driver for MongoDB.")
11439 (license license:asl2.0)))
11440
11441(define-public python2-pymongo
11442 (package-with-python2 python-pymongo))
11443
44d10b1f
RW
11444(define-public python-consul
11445 (package
11446 (name "python-consul")
11447 (version "0.6.1")
11448 (source
11449 (origin
11450 (method url-fetch)
11451 (uri (pypi-uri "python-consul" version))
11452 (sha256
11453 (base32
11454 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11455 (build-system python-build-system)
11456 (arguments
11457 '(#:tests? #f)) ; The tests are not distributed
11458 (propagated-inputs
11459 `(("python-requests" ,python-requests)
11460 ("python-six" ,python-six)))
11461 (home-page "https://github.com/cablehead/python-consul")
11462 (synopsis "Python client for Consul")
11463 (description
11464 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11465discovery, monitoring and configuration.")
11466 (license license:expat)))
11467
11468(define-public python2-consul
11469 (package-with-python2 python-consul))
11470
11471(define-public python-schematics
11472 (package
11473 (name "python-schematics")
11474 (version "1.1.1")
11475 (source
1961d187
TGR
11476 (origin
11477 (method git-fetch)
11478 (uri (git-reference
11479 (url "https://github.com/schematics/schematics.git")
11480 (commit (string-append "v" version))))
11481 (file-name (git-file-name name version))
11482 (sha256
11483 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11484 (build-system python-build-system)
11485 (propagated-inputs
11486 `(("python-six" ,python-six)))
11487 (arguments
1961d187
TGR
11488 ;; The tests require a bunch of not very nice packages with fixed
11489 ;; version requirements (e.g. python-coveralls).
11490 `(#:tests? #f))
44d10b1f
RW
11491 (home-page "https://github.com/schematics/schematics")
11492 (synopsis "Python Data Structures for Humans")
11493 (description "Python Data Structures for Humans.")
11494 (license license:bsd-3)))
11495
11496(define-public python2-schematics
11497 (package-with-python2 python-schematics))
11498
11499(define-public python-odfpy
11500 (package
11501 (name "python-odfpy")
11502 (version "1.3.3")
11503 (source (origin
11504 (method url-fetch)
11505 (uri (pypi-uri "odfpy" version))
11506 (sha256
11507 (base32
11508 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11509 (arguments
11510 `(#:modules ((srfi srfi-1)
11511 (guix build python-build-system)
11512 (guix build utils))
11513 #:phases
11514 (modify-phases %standard-phases
11515 (replace 'check
11516 ;; The test runner invokes python2 and python3 for test*.py.
11517 ;; To avoid having both in inputs, we replicate it here.
11518 (lambda _
21ccc01d
RW
11519 (for-each (lambda (test-file) (invoke "python" test-file))
11520 (find-files "tests" "^test.*\\.py$"))
11521 #t)))))
44d10b1f
RW
11522 (build-system python-build-system)
11523 (home-page "https://github.com/eea/odfpy")
11524 (synopsis "Python API and tools to manipulate OpenDocument files")
11525 (description "Collection of libraries and utility programs written in
11526Python to manipulate OpenDocument 1.2 files.")
11527 (license
11528 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11529 ;; number of files with other licenses.
11530 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11531
11532(define-public python2-odfpy
11533 (package-with-python2 python-odfpy))
11534
11535(define-public python-natsort
11536 (package
11537 (name "python-natsort")
11538 (version "5.4.1")
11539 (source (origin
11540 (method url-fetch)
11541 (uri (pypi-uri "natsort" version))
11542 (sha256
11543 (base32
11544 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11545 (build-system python-build-system)
11546 (arguments
11547 `(#:modules ((guix build utils)
11548 (guix build python-build-system)
11549 (srfi srfi-1)
11550 (srfi srfi-26)
11551 (ice-9 ftw))
11552 #:phases
11553 (modify-phases %standard-phases
11554 (add-before 'check 'set-cachedir
11555 ;; Tests require write access to $HOME by default
11556 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11557 (replace 'check
11558 (lambda _
11559 (let ((cwd (getcwd)))
11560 (setenv "PYTHONPATH"
11561 (string-append
11562 cwd "/build/"
11563 (find (cut string-prefix? "lib" <>)
11564 (scandir (string-append cwd "/build")))
11565 ":"
11566 (getenv "PYTHONPATH")))
11567 (invoke "pytest" "-v")))))))
11568 (native-inputs
11569 `(("python-hypothesis" ,python-hypothesis)
11570 ("python-pytest-cov" ,python-pytest-cov)
11571 ("python-pytest-mock" ,python-pytest-mock)
11572 ("python-pytest" ,python-pytest)))
11573 (propagated-inputs ; TODO: Add python-fastnumbers.
11574 `(("python-pyicu" ,python-pyicu)))
11575 (home-page "https://github.com/SethMMorton/natsort")
11576 (synopsis "Natural sorting for python and shell")
11577 (description
11578 "Natsort lets you apply natural sorting on lists instead of
11579lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11580on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11581@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11582@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11583identifies numbers and sorts them separately from strings. It can also sort
11584version numbers, real numbers, mixed types and more, and comes with a shell
11585command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11586 (license license:expat)
11587 (properties `((python2-variant . ,(delay python2-natsort))))))
11588
11589(define-public python2-natsort
11590 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11591 (package (inherit base)
11592 (native-inputs
11593 `(("python2-pathlib" ,python2-pathlib)
11594 ,@(package-native-inputs base))))))
11595
11596(define-public python-glances
11597 (package
11598 (name "python-glances")
9898a2d3 11599 (version "3.1.1")
44d10b1f
RW
11600 (source
11601 (origin
11602 (method url-fetch)
11603 (uri (pypi-uri "Glances" version))
11604 (sha256
11605 (base32
15b4c911
TGR
11606 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11607 (modules '((guix build utils)))
11608 (snippet
11609 '(begin
11610 ;; Glances phones PyPI for weekly update checks by default.
11611 ;; Disable these. The user can re-enable them if desired.
11612 (substitute* "glances/outdated.py"
11613 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11614 (string-append indentation
11615 "self.args.disable_check_update = True\n"
11616 line)))
11617 #t))))
44d10b1f
RW
11618 (build-system python-build-system)
11619 (propagated-inputs
9898a2d3
TGR
11620 `(("python-future" ,python-future)
11621 ("python-psutil" ,python-psutil)))
44d10b1f
RW
11622 (home-page
11623 "https://github.com/nicolargo/glances")
bab94ffa 11624 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11625 (description
11626 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11627Glances uses the PsUtil library to get information from your system. It
11628monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11629 (license license:lgpl3+)))
11630
11631(define-public python2-glances
11632 (package-with-python2 python-glances))
11633
11634(define-public python-graphql-core
11635 (package
11636 (name "python-graphql-core")
11637 (version "0.5.3")
11638 (source
11639 (origin
11640 (method url-fetch)
11641 (uri (pypi-uri "graphql-core" version))
11642 (sha256
11643 (base32
11644 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11645 (build-system python-build-system)
11646 (arguments
11647 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11648 #:phases
11649 (modify-phases %standard-phases
11650 (add-after 'unpack 'patch-hardcoded-version
11651 (lambda _ (substitute*
11652 "setup.py"
11653 (("'gevent==1.1rc1'") "'gevent'"))
11654 #t)))))
11655 (native-inputs
11656 `(("python-gevent" ,python-gevent)
11657 ("python-mock" ,python-mock)
11658 ("python-pytest-mock" ,python-pytest-mock)))
11659 (propagated-inputs
11660 `(("python-promise" ,python-promise)
11661 ("python-six" ,python-six)))
11662 (home-page "https://github.com/graphql-python/graphql-core")
11663 (synopsis "GraphQL implementation for Python")
11664 (description
11665 "GraphQL implementation for Python. GraphQL is a data query language and
11666runtime designed and used to request and deliver data to mobile and web apps.
11667This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11668to Python.")
11669 (license license:expat)))
11670
11671(define-public python2-graphql-core
11672 (package-with-python2 python-graphql-core))
11673
11674(define-public python-graphql-relay
11675 (package
11676 (name "python-graphql-relay")
11677 (version "0.4.5")
11678 (source
11679 (origin
11680 (method url-fetch)
11681 (uri (pypi-uri "graphql-relay" version))
11682 (sha256
11683 (base32
11684 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11685 (build-system python-build-system)
11686 (arguments
11687 '(#:tests? #f)) ; The tests are not distributed
11688 (propagated-inputs
11689 `(("python-graphql-core" ,python-graphql-core)
11690 ("python-promise" ,python-promise)
11691 ("python-six" ,python-six)))
11692 (home-page "https://github.com/graphql-python/graphql-relay-py")
11693 (synopsis "Relay implementation for Python")
11694 (description
11695 "This is a library to allow the easy creation of Relay-compliant servers
11696using the GraphQL Python reference implementation of a GraphQL server. It
11697should be noted that the code is a exact port of the original
11698@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11699from Facebook.")
11700 (license license:expat)))
11701
11702(define-public python2-graphql-relay
11703 (package-with-python2 python-graphql-relay))
11704
11705(define-public python-graphene
11706 (package
11707 (name "python-graphene")
11708 (version "0.10.2")
11709 (source
11710 (origin
11711 (method url-fetch)
11712 (uri (pypi-uri "graphene" version))
11713 (sha256
11714 (base32
11715 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11716 (build-system python-build-system)
11717 (propagated-inputs
11718 `(("python-graphql-core" ,python-graphql-core)
11719 ("python-graphql-relay" ,python-graphql-relay)
11720 ("python-iso8601" ,python-iso8601)
11721 ("python-promise" ,python-promise)
11722 ("python-six" ,python-six)))
11723 (arguments
11724 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11725 (home-page "http://graphene-python.org/")
11726 (synopsis "GraphQL Framework for Python")
11727 (description
11728 "Graphene is a Python library for building GraphQL schemas/types.
11729A GraphQL schema describes your data model, and provides a GraphQL server
11730with an associated set of resolve methods that know how to fetch data.")
11731 (properties `((python2-variant . ,(delay python2-graphene))))
11732 (license license:expat)))
11733
11734(define-public python2-graphene
11735 (let ((base (package-with-python2
11736 (strip-python2-variant python-graphene))))
11737 (package (inherit base)
11738 (native-inputs
11739 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11740 ,@(package-native-inputs base))))))
11741
11742(define-public python-nautilus
11743 (package
11744 (name "python-nautilus")
11745 (version "0.4.9")
11746 (source
11747 (origin
11748 (method url-fetch)
11749 (uri (pypi-uri "nautilus" version))
11750 (sha256
11751 (base32
11752 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11753 (build-system python-build-system)
11754 (arguments `(#:tests? #f)) ; fails to import test modules
11755 (propagated-inputs
11756 `(("python-bcrypt" ,python-bcrypt)
11757 ("python-click" ,python-click)
11758 ("python-consul" ,python-consul)
11759 ("python-graphene" ,python-graphene)
11760 ("python-jinja2" ,python-jinja2)
11761 ("python-peewee" ,python-peewee)
11762 ("python-pika" ,python-pika)
11763 ("python-tornado" ,python-tornado)
11764 ("python-wtforms" ,python-wtforms)))
11765 (native-inputs
11766 `(("python-nose2" ,python-nose2)))
11767 (home-page "https://github.com/AlecAivazis/nautilus")
11768 (synopsis "Library for creating microservice applications")
11769 (description
11770 "Nautilus is a framework for flux based microservices that looks to
11771provide extendible implementations of common aspects of a cloud so that you can
11772focus on building massively scalable web applications.")
11773 (license license:expat)))
11774
11775(define-public python-snowballstemmer
11776 (package
11777 (name "python-snowballstemmer")
11778 (version "1.2.1")
11779 (source (origin
11780 (method url-fetch)
11781 (uri (pypi-uri "snowballstemmer" version))
11782 (sha256
11783 (base32
11784 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11785 (build-system python-build-system)
11786 (arguments
11787 `(;; No tests exist
11788 #:tests? #f))
11789 (home-page "https://github.com/shibukawa/snowball_py")
11790 (synopsis "Snowball stemming library collection for Python")
11791 (description "This package provides 16 word stemmer algorithms generated
11792from Snowball algorithms. It includes the 15 original ones plus the Poerter
11793English stemmer.")
11794 (license license:bsd-3)))
11795
11796(define-public python2-snowballstemmer
11797 (package-with-python2 python-snowballstemmer))
11798
44d10b1f
RW
11799(define-public python-setproctitle
11800(package
11801 (name "python-setproctitle")
11802 (version "1.1.10")
11803 (source
11804 (origin
11805 (method url-fetch)
11806 (uri (pypi-uri "setproctitle" version))
11807 (sha256
11808 (base32
11809 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11810 (build-system python-build-system)
11811 (arguments
11812 '(#:phases
11813 (modify-phases %standard-phases
11814 (add-before 'check 'patch-Makefile
11815 ;; Stricly this is only required for the python2 variant.
11816 ;; But adding a phase in an inherited package seems to be
11817 ;; cumbersum. So we patch even for python3.
11818 (lambda _
11819 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11820 (when nose
11821 (substitute* "Makefile"
11822 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11823 (string-append nose "/bin/nosetests "))))
11824 #t)))
11825 (replace 'check
11826 (lambda _
11827 (setenv "PYTHON" (or (which "python3") (which "python")))
11828 (setenv "PYCONFIG" (or (which "python3-config")
11829 (which "python-config")))
11830 (setenv "CC" "gcc")
11831 ;; No need to extend PYTHONPATH to find the built package, since
11832 ;; the Makefile will build anyway
11833 (invoke "make" "check"))))))
11834 (native-inputs
11835 `(("procps" ,procps))) ; required for tests
11836 (home-page
11837 "https://github.com/dvarrazzo/py-setproctitle")
11838 (synopsis
11839 "Setproctitle implementation for Python to customize the process title")
11840 (description "The library allows a process to change its title (as displayed
11841by system tools such as ps and top).
11842
11843Changing the title is mostly useful in multi-process systems, for
11844example when a master process is forked: changing the children's title
11845allows to identify the task each process is busy with. The technique
11846is used by PostgreSQL and the OpenSSH Server for example.")
11847 (license license:bsd-3)
11848 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11849
11850(define-public python2-setproctitle
11851 (let ((base (package-with-python2
11852 (strip-python2-variant python-setproctitle))))
11853 (package
11854 (inherit base)
11855 (native-inputs `(("python2-nose" ,python2-nose)
11856 ,@(package-native-inputs base))))))
11857
11858(define-public python-validictory
11859 (package
11860 (name "python-validictory")
11861 (version "1.0.1")
11862 (source
11863 (origin
11864 (method url-fetch)
11865 (uri (pypi-uri "validictory" version))
11866 (sha256
11867 (base32
11868 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11869 (build-system python-build-system)
11870 (arguments
11871 '(#:phases
11872 (modify-phases %standard-phases
11873 (add-after 'unpack 'bootstrap
11874 ;; Move the tests out of the package directory to avoid
11875 ;; packaging them.
11876 (lambda* _
11877 (rename-file "validictory/tests" "tests")
11878 (delete-file "tests/__init__.py")))
11879 (replace 'check
11880 (lambda _
11881 ;; Extend PYTHONPATH so the built package will be found.
11882 (setenv "PYTHONPATH"
11883 (string-append (getcwd) "/build/lib:"
11884 (getenv "PYTHONPATH")))
6568bd5d 11885 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11886 (native-inputs
11887 `(("python-pytest" ,python-pytest)))
11888 (home-page
11889 "https://github.com/jamesturk/validictory")
11890 (synopsis "General purpose Python data validator")
11891 (description "It allows validation of arbitrary Python data structures.
11892
11893The schema format is based on the JSON Schema
11894proposal (http://json-schema.org), so combined with json the library is also
11895useful as a validator for JSON data.")
11896 (license license:expat)))
11897
11898(define-public python2-validictory
11899 (package-with-python2 python-validictory))
11900
11901(define-public python-pyelftools
11902 (package
11903 (name "python-pyelftools")
11904 (version "0.25")
11905 (source
11906 (origin
11907 (method url-fetch)
11908 (uri (pypi-uri "pyelftools" version))
11909 (sha256
11910 (base32
11911 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11912 (build-system python-build-system)
11913 (arguments
11914 `(#:phases
11915 (modify-phases %standard-phases
11916 (add-before 'check 'set-pythonpath
11917 (lambda _
11918 (setenv "PYTHONPATH"
11919 (string-append
11920 (getcwd) "/test/"
11921 ":" (getenv "PYTHONPATH")))
11922 #t)))))
11923 (home-page
11924 "https://github.com/eliben/pyelftools")
11925 (synopsis
11926 "Analyze binary and library file information")
11927 (description "This Python library provides interfaces for parsing and
11928analyzing two binary and library file formats; the Executable and Linking
11929Format (ELF), and debugging information in the Debugging With Attributed
11930Record Format (DWARF).")
11931 (license license:public-domain)))
11932
11933(define-public python-pyev
11934 (package
11935 (name "python-pyev")
11936 (version "0.9.0")
11937 (source
11938 (origin
11939 (method url-fetch)
11940 (uri (pypi-uri "pyev" version))
11941 (sha256
11942 (base32
11943 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11944 (build-system python-build-system)
11945 (arguments
11946 `(#:tests? #f ; no test suite
11947 #:phases
11948 (modify-phases %standard-phases
11949 (add-after 'unpack 'patch
11950 (lambda* (#:key inputs #:allow-other-keys)
11951 (let ((libev (string-append (assoc-ref inputs "libev")
11952 "/lib/libev.so.4")))
11953 (substitute* "setup.py"
11954 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11955 (string-append "libev_dll_name = \"" libev "\"")))))))))
11956 (inputs
11957 `(("libev" ,libev)))
11958 (home-page "http://pythonhosted.org/pyev/")
11959 (synopsis "Python libev interface")
11960 (description "Pyev provides a Python interface to libev.")
11961 (license license:gpl3)))
11962
11963(define-public python2-pyev
11964 (package-with-python2 python-pyev))
11965
11966(define-public python-imagesize
11967 (package
11968 (name "python-imagesize")
11969 (version "1.1.0")
11970 (source
11971 (origin
11972 (method url-fetch)
11973 (uri (pypi-uri "imagesize" version))
11974 (sha256
11975 (base32
11976 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11977 (build-system python-build-system)
11978 (home-page "https://github.com/shibukawa/imagesize_py")
11979 (synopsis "Gets image size of files in various formats in Python")
11980 (description
11981 "This package allows determination of image size from
11982PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11983 (license license:expat)))
11984
11985(define-public python2-imagesize
11986 (package-with-python2 python-imagesize))
11987
11988(define-public python-termstyle
11989 (package
11990 (name "python-termstyle")
11991 (version "0.1.11")
11992 (source
11993 (origin
11994 (method url-fetch)
11995 (uri (pypi-uri "termstyle" version))
11996 (sha256
11997 (base32
11998 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11999 (build-system python-build-system)
12000 (arguments
12001 '(#:phases
12002 (modify-phases %standard-phases
12003 (replace 'check
12004 (lambda _
831080a6 12005 (invoke "python" "test3.py"))))))
44d10b1f
RW
12006 (home-page "https://github.com/gfxmonk/termstyle")
12007 (synopsis "Console text coloring for Python")
12008 (description "This package provides console text coloring for Python.")
12009 (license license:bsd-3)))
12010
12011(define-public python-argcomplete
12012 (package
12013 (name "python-argcomplete")
12014 (version "1.7.0")
12015 (source
12016 (origin
12017 (method url-fetch)
12018 (uri (pypi-uri "argcomplete" version))
12019 (sha256
12020 (base32
12021 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
12022 (build-system python-build-system)
12023 (native-inputs
12024 `(("python-pexpect" ,python-pexpect)
12025 ("tcsh" ,tcsh)
12026 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
12027 (home-page "https://github.com/kislyuk/argcomplete")
12028 (synopsis "Shell tab completion for Python argparse")
12029 (description "argcomplete provides extensible command line tab completion
12030of arguments and options for Python scripts using @code{argparse}. It's
12031particularly useful for programs with many options or sub-parsers that can
12032dynamically suggest completions; for example, when browsing resources over the
12033network.")
12034 (license license:asl2.0)))
12035
12036(define-public python2-argcomplete
12037 (package-with-python2 python-argcomplete))
12038
12039(define-public python-xopen
12040 (package
12041 (name "python-xopen")
24d64989 12042 (version "0.5.0")
44d10b1f
RW
12043 (source
12044 (origin
12045 (method url-fetch)
12046 (uri (pypi-uri "xopen" version))
12047 (sha256
12048 (base32
24d64989 12049 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 12050 (build-system python-build-system)
24d64989
RW
12051 (propagated-inputs
12052 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
12053 (home-page "https://github.com/marcelm/xopen/")
12054 (synopsis "Open compressed files transparently")
12055 (description "This module provides an @code{xopen} function that works like
12056Python's built-in @code{open} function, but can also deal with compressed files.
12057Supported compression formats are gzip, bzip2 and, xz, and are automatically
12058recognized by their file extensions. The focus is on being as efficient as
12059possible on all supported Python versions.")
12060 (license license:expat)))
12061
12062(define-public python2-xopen
12063 (let ((base (package-with-python2
12064 (strip-python2-variant python-xopen))))
12065 (package
12066 (inherit base)
12067 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
12068 ,@(package-propagated-inputs base))))))
12069
12070(define-public python-cheetah
12071 (package
12072 (name "python-cheetah")
12073 (version "3.1.0")
12074 (source
12075 (origin
12076 (method url-fetch)
12077 (uri (pypi-uri "Cheetah3" version))
12078 (sha256
12079 (base32
12080 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12081 (build-system python-build-system)
12082 (arguments
12083 `(#:modules ((guix build utils)
12084 (guix build python-build-system)
12085 (ice-9 ftw)
12086 (srfi srfi-1)
12087 (srfi srfi-26))
12088 #:phases (modify-phases %standard-phases
12089 (add-after 'unpack 'use-absolute-python
12090 (lambda _
12091 (substitute* "Cheetah/CheetahWrapper.py"
12092 (("#!/usr/bin/env python")
12093 (string-append "#!" (which "python"))))
12094 #t))
12095 (replace 'check
12096 (lambda _
12097 (let ((cwd (getcwd)))
12098 (setenv "PYTHONPATH"
12099 (string-append
12100 cwd "/build/"
12101 (find (cut string-prefix? "lib" <>)
12102 (scandir (string-append cwd "/build")))
12103 ":" (getenv "PYTHONPATH")))
12104 (setenv "PATH"
12105 (string-append (getenv "PATH")
12106 ":" cwd "/bin"))
12107 (setenv "TMPDIR" "/tmp")
12108
12109 (substitute* "Cheetah/Tests/Test.py"
12110 (("unittest.TextTestRunner\\(\\)")
12111 "unittest.TextTestRunner(verbosity=2)"))
12112
12113 (invoke "python" "Cheetah/Tests/Test.py")))))))
12114 (propagated-inputs
12115 `(("python-markdown" ,python-markdown))) ;optional
12116 (home-page "http://cheetahtemplate.org/")
12117 (synopsis "Template engine")
12118 (description "Cheetah is a text-based template engine and Python code
12119generator.
12120
12121Cheetah can be used as a standalone templating utility or referenced as
12122a library from other Python applications. It has many potential uses,
12123but web developers looking for a viable alternative to ASP, JSP, PHP and
12124PSP are expected to be its principle user group.
12125
12126Features:
12127@enumerate
12128@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12129 text-based format.
12130@item Cleanly separates content, graphic design, and program code.
12131@item Blends the power and flexibility of Python with a simple template language
12132 that non-programmers can understand.
12133@item Gives template writers full access to any Python data structure, module,
12134 function, object, or method in their templates.
12135@item Makes code reuse easy by providing an object-orientated interface to
12136 templates that is accessible from Python code or other Cheetah templates.
12137 One template can subclass another and selectively reimplement sections of it.
12138@item Provides a simple, yet powerful, caching mechanism that can dramatically
12139 improve the performance of a dynamic website.
12140@item Compiles templates into optimized, yet readable, Python code.
12141@end enumerate")
12142 (license (license:x11-style "file://LICENSE"))))
12143
12144(define-public python2-cheetah
12145 (package-with-python2 python-cheetah))
12146
12147(define-public python-dulwich
12148 (package
12149 (name "python-dulwich")
12150 (version "0.18.6")
12151 (source
12152 (origin
12153 (method url-fetch)
12154 (uri (list (string-append "https://www.dulwich.io/releases/"
12155 "dulwich-" version ".tar.gz")
12156 (pypi-uri "dulwich" version)))
12157 (sha256
12158 (base32
12159 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12160 (build-system python-build-system)
12161 (arguments
12162 `(#:phases
12163 (modify-phases %standard-phases
12164 (add-before 'check 'fix-tests
12165 (lambda* (#:key inputs #:allow-other-keys)
12166 ;; The tests use Popen with a custom environment which doesn't
12167 ;; include PATH.
12168 (substitute* "dulwich/tests/compat/utils.py"
12169 (("'git'") (string-append "'"
12170 (which "git")
12171 "'")))
12172 (substitute* '("dulwich/tests/test_repository.py"
12173 "dulwich/tests/test_hooks.py")
12174 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12175 (setenv "TEST_RUNNER" "unittest")
12176 (setenv "PYTHONHASHSEED" "random")
12177 #t)))))
12178 (propagated-inputs
12179 `(("python-fastimport" ,python-fastimport)))
12180 (native-inputs
12181 `(("python-mock" ,python-mock)
12182 ("python-geventhttpclient" ,python-geventhttpclient)
12183 ("git" ,git)))
12184 (home-page "https://www.dulwich.io/")
12185 (synopsis "Git implementation in Python")
12186 (description "Dulwich is an implementation of the Git file formats and
12187protocols written in pure Python.")
12188 ;; Can be used with either license.
12189 (license (list license:asl2.0 license:gpl2+))))
12190
12191(define-public python2-dulwich
12192 (package-with-python2 python-dulwich))
12193
12194(define-public python-pbkdf2
12195 (package
12196 (name "python-pbkdf2")
12197 (version "1.3")
12198 (source
12199 (origin
12200 (method url-fetch)
12201 (uri (pypi-uri "pbkdf2" version))
12202 (sha256
12203 (base32
12204 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12205 (build-system python-build-system)
12206 (arguments
12207 '(#:phases
12208 (modify-phases %standard-phases
12209 (replace 'check
12210 (lambda _
12211 (setenv "PYTHONPATH"
12212 (string-append (getcwd) "/build/lib:"
12213 (getenv "PYTHONPATH")))
ee2bb944 12214 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12215 (propagated-inputs
12216 `(("python-pycrypto" ,python-pycrypto))) ; optional
12217 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12218 (synopsis "Password-based key derivation")
12219 (description "This module implements the password-based key derivation
12220function, PBKDF2, specified in RSA PKCS#5 v2.0.
12221
12222PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12223is part of the RSA Public Key Cryptography Standards series. The provided
12224implementation takes a password or a passphrase and a salt value (and
12225optionally a iteration count, a digest module, and a MAC module) and provides
12226a file-like object from which an arbitrarly-sized key can be read.")
12227 (license license:expat)))
12228
12229(define-public python2-pbkdf2
12230 (package-with-python2 python-pbkdf2))
12231
12232(define-public python-qrcode
12233 (package
12234 (name "python-qrcode")
217ea1a1 12235 (version "6.1")
44d10b1f
RW
12236 (source
12237 (origin
12238 (method url-fetch)
12239 (uri (pypi-uri "qrcode" version))
12240 (sha256
217ea1a1 12241 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12242 (build-system python-build-system)
12243 (arguments
12244 ;; FIXME: Tests require packaging 'pymaging'.
12245 '(#:tests? #f))
12246 (propagated-inputs
12247 `(("python-lxml" ,python-lxml) ; for SVG output
12248 ("python-pillow" ,python-pillow) ; for PNG output
12249 ("python-six" ,python-six)))
44d10b1f
RW
12250 (home-page "https://github.com/lincolnloop/python-qrcode")
12251 (synopsis "QR Code image generator")
12252 (description "This package provides a pure Python QR Code generator
12253module. It uses the Python Imaging Library (PIL) to allow for the generation
12254of QR Codes.
12255
12256In addition this package provides a command line tool to generate QR codes and
12257either write these QR codes to a file or do the output as ascii art at the
12258console.")
12259 (license license:bsd-3)))
12260
12261(define-public python2-qrcode
12262 (package-with-python2 python-qrcode))
12263
12264(define-public python-rst2ansi
12265 (package
12266 (name "python-rst2ansi")
12267 (version "0.1.5")
12268 (source
12269 (origin
12270 (method url-fetch)
12271 (uri (pypi-uri "rst2ansi" version))
12272 (sha256
12273 (base32
12274 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12275 (build-system python-build-system)
12276 (propagated-inputs
12277 `(("python-docutils" ,python-docutils)))
12278 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12279 (synopsis "Convert RST to ANSI-decorated console output")
12280 (description
12281 "Python module dedicated to rendering RST (reStructuredText) documents
12282to ansi-escaped strings suitable for display in a terminal.")
12283 (license license:expat)))
12284
12285(define-public python-ansi2html
12286 (package
12287 (name "python-ansi2html")
12288 (version "1.2.0")
12289 (source
12290 (origin
12291 (method url-fetch)
12292 (uri (pypi-uri "ansi2html" version))
12293 (sha256
12294 (base32
12295 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12296 (build-system python-build-system)
12297 (native-inputs
12298 `(("python-mock" ,python-mock)
12299 ("python-nose" ,python-nose)))
12300 (propagated-inputs
12301 `(("python-six" ,python-six)))
12302 (home-page "https://github.com/ralphbean/ansi2html")
12303 (synopsis "Convert ANSI-decorated console output to HTML")
12304 (description
12305 "@command{ansi2html} is a Python library and command line utility for
12306convering text with ANSI color codes to HTML or LaTeX.")
12307 (license license:gpl3+)))
12308
12309(define-public python2-ansi2html
12310 (package-with-python2 python-ansi2html))
12311
12312(define-public python-ddt
12313 (package
12314 (name "python-ddt")
12315 (version "1.1.3")
12316 (source
12317 (origin
12318 (method url-fetch)
12319 (uri (pypi-uri "ddt" version))
12320 (sha256
12321 (base32
12322 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12323 (build-system python-build-system)
12324 (native-inputs
12325 `(("python-mock" ,python-mock)
12326 ("python-nose" ,python-nose)))
12327 (propagated-inputs
12328 `(("python-six" ,python-six)
12329 ("python-pyyaml" ,python-pyyaml)))
12330 (home-page "https://github.com/txels/ddt")
12331 (synopsis "Data-Driven Tests")
12332 (description
12333 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12334running it with different test data, and make it appear as multiple test
12335cases.")
12336 (license license:expat)))
12337
12338(define-public python2-ddt
12339 (package-with-python2 python-ddt))
12340
12341(define-public python-pycountry
12342 (package
12343 (name "python-pycountry")
12344 (version "18.5.26")
12345 (source
12346 (origin
12347 (method url-fetch)
12348 (uri (pypi-uri "pycountry" version))
12349 (sha256
12350 (base32
12351 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12352 (build-system python-build-system)
12353 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12354 (synopsis "ISO databases for languages, countries, currencies, etc.")
12355 (description
12356 "@code{pycountry} provides the ISO databases for the standards:
12357@enumerate
12358@item 639-3 (Languages)
12359@item 3166 (Countries)
12360@item 3166-3 (Deleted Countries)
12361@item 3166-2 (Subdivisions of countries)
12362@item 4217 (Currencies)
12363@item 15924 (Scripts)
12364@end enumerate
12365It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12366through a Python API.")
12367 (license license:lgpl2.1+)))
12368
12369(define-public python2-pycountry
12370 (package-with-python2 python-pycountry))
12371
12372(define-public python-pycosat
12373 (package
12374 (name "python-pycosat")
12375 (version "0.6.1")
12376 (source
12377 (origin
12378 (method url-fetch)
12379 (uri (pypi-uri "pycosat" version))
12380 (sha256
12381 (base32
12382 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12383 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12384 (build-system python-build-system)
12385 (home-page "https://github.com/ContinuumIO/pycosat")
12386 (synopsis "Bindings to picosat (a SAT solver)")
12387 (description
12388 "This package provides efficient Python bindings to @code{picosat} on
12389the C level. When importing pycosat, the @code{picosat} solver becomes part
12390of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12391Problem} (SAT) solver.")
12392 (license license:expat)))
12393
12394(define-public python2-pycosat
12395 (package-with-python2 python-pycosat))
12396
12397(define-public python2-ruamel.ordereddict
12398 (package
12399 (name "python2-ruamel.ordereddict")
12400 (version "0.4.9")
12401 (source
12402 (origin
12403 (method url-fetch)
12404 (uri (pypi-uri "ruamel.ordereddict" version))
12405 (sha256
12406 (base32
12407 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12408 (build-system python-build-system)
12409 (arguments
12410 `(#:python ,python-2
12411 #:phases
12412 (modify-phases %standard-phases
12413 (delete 'check)
12414 (add-after 'install 'check
12415 (lambda* (#:key inputs outputs #:allow-other-keys)
12416 (add-installed-pythonpath inputs outputs)
f987ac30 12417 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12418 (home-page "https://bitbucket.org/ruamel/ordereddict")
12419 (synopsis "Version of dict that keeps keys in insertion order")
12420 (description
12421 "This is an implementation of an ordered dictionary with @dfn{Key
12422Insertion Order} (KIO: updates of values do not affect the position of the
12423key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12424removed and put at the back). The standard library module @code{OrderedDict},
12425implemented later, implements a subset of @code{ordereddict} functionality.
12426Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12427Order} (KSO, no sorting function can be specified, but a transform can be
12428specified to apply on the key before comparison (e.g. @code{string.lower})).")
12429 (license license:expat)))
12430
12431(define-public python-pypeg2
12432 (package
12433 (name "python-pypeg2")
12434 (version "2.15.2")
12435 (source
12436 (origin
12437 (method url-fetch)
12438 (uri (pypi-uri "pyPEG2" version))
12439 (sha256
12440 (base32
12441 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12442 (build-system python-build-system)
12443 (propagated-inputs `(("python-lxml" ,python-lxml)))
12444 (arguments
12445 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12446 '(#:tests? #f))
12447 (home-page "https://fdik.org/pyPEG/")
12448 (synopsis "Parsering Expression Grammars in Python")
12449 (description "PyPEG is an intrinsic parser interpreter framework for
12450Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12451parse many formal languages.")
12452 (license license:gpl2)))
12453
12454(define-public python-incremental
12455 (package
12456 (name "python-incremental")
12457 (version "17.5.0")
12458 (source
12459 (origin
12460 (method url-fetch)
12461 (uri (pypi-uri "incremental" version))
12462 (sha256
12463 (base32
12464 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12465 (build-system python-build-system)
12466 (home-page "https://github.com/hawkowl/incremental")
12467 (synopsis "Library for versioning Python projects")
12468 (description "Incremental is a small library that versions your Python
12469projects.")
12470 (license license:expat)))
12471
12472(define-public python2-incremental
12473 (package-with-python2 python-incremental))
12474
12475(define-public python-invoke
12476 (package
12477 (name "python-invoke")
12478 (home-page "http://www.pyinvoke.org/")
a5662319 12479 (version "1.3.0")
44d10b1f
RW
12480 (source (origin
12481 (method url-fetch)
12482 (uri (pypi-uri "invoke" version))
12483 (sha256
12484 (base32
a5662319 12485 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
12486 (build-system python-build-system)
12487 (arguments
12488 ;; XXX: Requires many dependencies that are not yet in Guix.
12489 `(#:tests? #f))
12490 (synopsis "Pythonic task execution")
12491 (description
12492 "Invoke is a Python task execution tool and library, drawing inspiration
12493from various sources to arrive at a powerful and clean feature set. It is
12494evolved from the Fabric project, but focuses on local and abstract concerns
12495instead of servers and network commands.")
12496 (license license:bsd-3)))
12497
12498(define-public python2-invoke
12499 (package-with-python2 python-invoke))
12500
12501(define-public python-automat
12502 (package
12503 (name "python-automat")
919d80a0 12504 (version "0.7.0")
44d10b1f
RW
12505 (source (origin
12506 (method url-fetch)
12507 (uri (pypi-uri "Automat" version))
12508 (sha256
12509 (base32
919d80a0 12510 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12511 (build-system python-build-system)
12512 ;; We disable the tests because they require python-twisted, while
12513 ;; python-twisted depends on python-automat. Twisted is optional, but the
12514 ;; tests fail if it is not available. Also see
12515 ;; <https://github.com/glyph/automat/issues/71>.
12516 (arguments '(#:tests? #f))
12517 (native-inputs
12518 `(("python-m2r" ,python-m2r)
12519 ("python-setuptools-scm" ,python-setuptools-scm)
12520 ("python-graphviz" ,python-graphviz)))
12521 (propagated-inputs
12522 `(("python-six" ,python-six)
12523 ("python-attrs" ,python-attrs)))
12524 (home-page "https://github.com/glyph/Automat")
12525 (synopsis "Self-service finite-state machines")
12526 (description "Automat is a library for concise, idiomatic Python
12527expression of finite-state automata (particularly deterministic finite-state
12528transducers).")
12529 (license license:expat)))
12530
12531(define-public python2-automat
12532 (package-with-python2 python-automat))
12533
12534(define-public python-m2r
12535 (package
12536 (name "python-m2r")
bcfb8fac 12537 (version "0.2.1")
44d10b1f
RW
12538 (source (origin
12539 (method url-fetch)
12540 (uri (pypi-uri "m2r" version))
12541 (sha256
12542 (base32
bcfb8fac 12543 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12544 (build-system python-build-system)
12545 (propagated-inputs
12546 `(("python-docutils" ,python-docutils)
12547 ("python-mistune" ,python-mistune)))
12548 (native-inputs
12549 `(("python-pygments" ,python-pygments)
12550 ("python-mock" ,python-mock)))
12551 (home-page "https://github.com/miyakogi/m2r")
12552 (synopsis "Markdown to reStructuredText converter")
12553 (description "M2R converts a markdown file including reST markups to valid
12554reST format.")
12555 (license license:expat)))
12556
12557(define-public python2-m2r
12558 (package-with-python2 python-m2r))
12559
12560(define-public python-constantly
12561 (package
12562 (name "python-constantly")
12563 (version "15.1.0")
12564 (source (origin
12565 (method url-fetch)
12566 (uri (pypi-uri "constantly" version))
12567 (sha256
12568 (base32
12569 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12570 (build-system python-build-system)
12571 (home-page "https://github.com/twisted/constantly")
12572 (synopsis "Symbolic constants in Python")
12573 (description "Constantly is a Python library that provides symbolic
12574constant support. It includes collections and constants with text, numeric,
12575and bit flag values.")
12576 (license license:expat)))
12577
12578(define-public python2-constantly
12579 (package-with-python2 python-constantly))
12580
12581(define-public python-attrs
12582 (package
12583 (name "python-attrs")
c41d5144 12584 (version "19.1.0")
44d10b1f
RW
12585 (source (origin
12586 (method url-fetch)
12587 (uri (pypi-uri "attrs" version))
12588 (sha256
12589 (base32
c41d5144 12590 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12591 (build-system python-build-system)
12592 (arguments
12593 `(#:modules ((guix build utils)
12594 (guix build python-build-system)
12595 (ice-9 ftw)
12596 (srfi srfi-1)
12597 (srfi srfi-26))
12598 #:phases (modify-phases %standard-phases
12599 (replace 'check
12600 (lambda _
12601 (let ((cwd (getcwd)))
12602 (setenv "PYTHONPATH"
12603 (string-append
12604 cwd "/build/"
12605 (find (cut string-prefix? "lib" <>)
12606 (scandir (string-append cwd "/build")))
12607 ":"
12608 (getenv "PYTHONPATH")))
12609 (invoke "python" "-m" "pytest")))))))
12610 (native-inputs
12611 `(("python-coverage" ,python-coverage)
12612 ("python-hypothesis" ,python-hypothesis)
12613 ("python-pympler" ,python-pympler)
12614 ("python-pytest" ,python-pytest)
12615 ("python-six" ,python-six)
12616 ("python-sphinx" ,python-sphinx)
12617 ("python-zope-interface" ,python-zope-interface)))
12618 (home-page "https://github.com/python-attrs/attrs/")
12619 (synopsis "Attributes without boilerplate")
12620 (description "@code{attrs} is a Python package with class decorators that
12621ease the chores of implementing the most common attribute-related object
12622protocols.")
12623 (license license:expat)))
12624
12625(define-public python2-attrs
12626 (package-with-python2 python-attrs))
12627
12628(define-public python-attrs-bootstrap
12629 (package
12630 (inherit python-attrs)
12631 (name "python-attrs-bootstrap")
44d10b1f
RW
12632 (native-inputs `())
12633 (arguments `(#:tests? #f))))
12634
12635(define-public python2-attrs-bootstrap
12636 (package-with-python2 python-attrs-bootstrap))
12637
12638(define-public python2-cliapp
12639 (package
12640 (name "python2-cliapp")
9064b84e 12641 (version "1.20180812.1")
44d10b1f
RW
12642 (source
12643 (origin
12644 (method url-fetch)
12645 (uri (string-append
12646 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12647 version ".tar.gz"))
12648 (sha256
12649 (base32
9064b84e 12650 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12651 (build-system python-build-system)
12652 (arguments
12653 `(#:python ,python-2
12654 #:phases
12655 (modify-phases %standard-phases
12656 ;; check phase needs to be run before the build phase. If not,
12657 ;; coverage-test-runner looks for tests for the built source files,
12658 ;; and fails.
12659 (delete 'check)
12660 (add-before 'build 'check
12661 (lambda _
12662 ;; Disable python3 tests
12663 (substitute* "check"
12664 (("python3") "# python3"))
6c826d32 12665 (invoke "./check"))))))
44d10b1f
RW
12666 (native-inputs
12667 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12668 ("python2-pep8" ,python2-pep8)))
12669 (propagated-inputs
12670 `(("python2-pyaml" ,python2-pyaml)))
12671 (home-page "https://liw.fi/cliapp/")
12672 (synopsis "Python framework for command line programs")
12673 (description "@code{python2-cliapp} is a python framework for
12674command line programs. It contains the typical stuff such programs
12675need to do, such as parsing the command line for options, and
12676iterating over input files.")
12677 (license license:gpl2+)))
12678
12679(define-public python2-ttystatus
12680 (package
12681 (name "python2-ttystatus")
e516a9c2 12682 (version "0.36")
44d10b1f
RW
12683 (source
12684 (origin
12685 (method url-fetch)
12686 (uri (string-append
12687 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12688 version ".tar.gz"))
12689 (sha256
12690 (base32
e516a9c2 12691 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12692 (build-system python-build-system)
12693 (native-inputs
12694 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12695 ("python2-pep8" ,python2-pep8)))
12696 (arguments
12697 `(#:python ,python-2
12698 #:phases
12699 (modify-phases %standard-phases
12700 ;; check phase needs to be run before the build phase. If not,
12701 ;; coverage-test-runner looks for tests for the built source files,
12702 ;; and fails.
12703 (delete 'check)
12704 (add-before 'build 'check
cbeee881 12705 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12706 (home-page "https://liw.fi/ttystatus/")
12707 (synopsis "Python library for showing progress reporting and
12708status updates on terminals")
12709 (description "@code{python2-ttystatus} is a python library for
12710showing progress reporting and status updates on terminals, for
12711command line programs. Output is automatically adapted to the width
12712of the terminal: truncated if it does not fit, and resized if the
12713terminal size changes.")
12714 (license license:gpl3+)))
12715
12716(define-public python2-tracing
12717 (package
12718 (name "python2-tracing")
12719 (version "0.10")
12720 (source
12721 (origin
12722 (method url-fetch)
12723 (uri (string-append
12724 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12725 version ".tar.gz"))
12726 (sha256
12727 (base32
12728 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12729 (build-system python-build-system)
12730 (arguments
12731 `(#:python ,python-2))
12732 (home-page "https://liw.fi/tracing/")
12733 (synopsis "Python debug logging helper")
12734 (description "@code{python2-tracing} is a python library for
12735logging debug messages. It provides a way to turn debugging messages
12736on and off, based on the filename they occur in. It is much faster
12737than using @code{logging.Filter} to accomplish the same thing, which
12738matters when code is run in production mode. The actual logging still
12739happens using the @code{logging} library.")
12740 (license license:gpl3+)))
12741
12742(define-public python2-larch
12743 (package
12744 (name "python2-larch")
12745 (version "1.20151025")
12746 (source
12747 (origin
12748 (method url-fetch)
12749 (uri (string-append
12750 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12751 version ".tar.gz"))
12752 (patches (search-patches
12753 "python2-larch-coverage-4.0a6-compatibility.patch"))
12754 (sha256
12755 (base32
12756 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12757 (build-system python-build-system)
12758 (arguments
12759 `(#:python ,python-2
12760 #:phases
12761 (modify-phases %standard-phases
12762 ;; check phase needs to be run before the build phase. If not,
12763 ;; coverage-test-runner looks for tests for the built source files,
12764 ;; and fails.
12765 (delete 'check)
12766 (add-before 'build 'check
204ad455 12767 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12768 (native-inputs
12769 `(("cmdtest" ,cmdtest)
12770 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12771 (propagated-inputs
12772 `(("python2-tracing" ,python2-tracing)))
12773 (home-page "https://liw.fi/larch/")
12774 (synopsis "Python copy-on-write B-tree library")
12775 (description "@code{python2-larch} is an implementation of
12776particular kind of B-tree, based on research by Ohad Rodeh. See
12777@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12778on the data structure.
12779
12780The distinctive feature of this B-tree is that a node is never
12781(conceptually) modified. Instead, all updates are done by
12782copy-on-write. This makes it easy to clone a tree, and modify only the
12783clone, while other processes access the original tree.")
12784 (license license:gpl3+)))
12785
12786(define-public python-astroid
12787 (package
12788 (name "python-astroid")
1c43c698 12789 (version "2.3.3")
44d10b1f
RW
12790 (source
12791 (origin
12792 (method url-fetch)
12793 (uri (pypi-uri "astroid" version))
12794 (sha256
1c43c698 12795 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
12796 (build-system python-build-system)
12797 (propagated-inputs
12798 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12799 ("python-six" ,python-six)
f0935460 12800 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
12801 ("python-wrapt" ,python-wrapt)))
12802 (native-inputs
12803 `(("python-dateutil" ,python-dateutil)
12804 ("python-nose" ,python-nose)
12805 ("python-pytest" ,python-pytest)
12806 ("python-pytest-runner" ,python-pytest-runner)))
12807 (arguments
12808 `(#:phases
12809 (modify-phases %standard-phases
12810 (add-after 'unpack 'remove-spurious-test
12811 (lambda _
12812 ;; This can be removed after upgrading from python-3.7
12813 ;; https://github.com/PyCQA/astroid/issues/593
12814 ;; https://bugs.python.org/issue34056
12815 (delete-file "astroid/tests/unittest_modutils.py")
12816 #t))
12817 (replace 'check
12818 (lambda _
12819 (invoke "pytest" "astroid"))))))
12820 (home-page "https://github.com/PyCQA/astroid")
12821 (synopsis "Common base representation of python source code for pylint and
12822other projects")
12823 (description "@code{python-astroid} provides a common base representation
12824of python source code for projects such as pychecker, pyreverse, pylint, etc.
12825
12826It provides a compatible representation which comes from the _ast module. It
12827rebuilds the tree generated by the builtin _ast module by recursively walking
12828down the AST and building an extended ast. The new node classes have
12829additional methods and attributes for different usages. They include some
12830support for static inference and local name scopes. Furthermore, astroid
12831builds partial trees by inspecting living objects.")
12832 (license license:lgpl2.1+)
12833 (properties `((python2-variant . ,(delay python2-astroid))))))
12834
12835(define-public python2-astroid
12836 (let ((base (package-with-python2
12837 (strip-python2-variant python-astroid))))
12838 (package (inherit base)
12839 ;; Version 2.x removes python2 support.
12840 (version "1.6.5")
12841 (source
12842 (origin
12843 (method url-fetch)
12844 (uri (pypi-uri "astroid" version))
12845 (sha256
12846 (base32
12847 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12848 (arguments
12849 (substitute-keyword-arguments (package-arguments base)
12850 ((#:phases phases)
12851 `(modify-phases ,phases
12852 (add-after 'unpack 'remove-spurious-test
12853 (lambda _
12854 ;; https://github.com/PyCQA/astroid/issues/276
12855 (delete-file "astroid/tests/unittest_brain.py")
12856 #t))
12857 (replace 'check
12858 (lambda _
12859 (invoke"python" "-m" "unittest" "discover"
12860 "-p" "unittest*.py")))))))
12861 (native-inputs `())
12862 (propagated-inputs
12863 `(("python2-backports-functools-lru-cache"
12864 ,python2-backports-functools-lru-cache)
12865 ("python2-enum34" ,python2-enum34)
12866 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
12867 ,@(alist-delete "python-typed-ast"
12868 (package-propagated-inputs base)))))))
44d10b1f
RW
12869
12870(define-public python-isort
12871 (package
12872 (name "python-isort")
e2227b6a 12873 (version "4.3.4")
44d10b1f
RW
12874 (source
12875 (origin
e2227b6a
EF
12876 (method git-fetch)
12877 (uri (git-reference
12878 ;; Tests pass only from the Github sources
12879 (url "https://github.com/timothycrosley/isort")
12880 (commit version)))
12881 (file-name (git-file-name name version))
44d10b1f
RW
12882 (sha256
12883 (base32
e2227b6a 12884 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12885 (build-system python-build-system)
12886 (native-inputs
12887 `(("python-mock" ,python-mock)
12888 ("python-pytest" ,python-pytest)))
12889 (home-page "https://github.com/timothycrosley/isort")
12890 (synopsis "Python utility/library to sort python imports")
12891 (description "@code{python-isort} is a python utility/library to sort
12892imports alphabetically, and automatically separated into sections. It
12893provides a command line utility, a python library and plugins for various
12894editors.")
e2227b6a
EF
12895 (license license:expat)
12896 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12897
12898(define-public python2-isort
e2227b6a
EF
12899 (let ((base (package-with-python2
12900 (strip-python2-variant python-isort))))
12901 (package (inherit base)
12902 (native-inputs
12903 `(("python2-futures" ,python2-futures)
12904 ,@(package-native-inputs base))))))
44d10b1f
RW
12905
12906(define-public python2-backports-functools-lru-cache
12907 (package
12908 (name "python2-backports-functools-lru-cache")
12909 (version "1.5")
12910 (source
12911 (origin
12912 (method url-fetch)
12913 ;; only the pypi tarballs contain the necessary metadata
12914 (uri (pypi-uri "backports.functools_lru_cache" version))
12915 (sha256
12916 (base32
12917 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12918 (build-system python-build-system)
12919 (native-inputs
12920 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12921 (arguments
12922 `(#:python ,python-2))
12923 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12924 (synopsis "Backport of functools.lru_cache from Python 3.3")
12925 (description "@code{python2-backports-functools-lru-cache} is a backport
12926of @code{functools.lru_cache} from python 3.3.")
12927 (license license:expat)))
12928
12929(define-public python-configparser
12930 (package
12931 (name "python-configparser")
84127f8c 12932 (version "3.7.1")
44d10b1f
RW
12933 (source
12934 (origin
12935 (method url-fetch)
84127f8c 12936 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12937 (sha256
12938 (base32
84127f8c 12939 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 12940 (build-system python-build-system)
809f003f 12941 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12942 (synopsis "Backport of configparser from python 3.5")
12943 (description "@code{python-configparser} is a backport of
12944@code{configparser} from Python 3.5 so that it can be used directly
12945in other versions.")
12946 (license license:expat)))
12947
12948(define-public python2-configparser
12949 (package-with-python2 python-configparser))
12950
12951(define-public python-mando
12952 (package
12953 (name "python-mando")
12954 (version "0.6.4")
12955 (source (origin
12956 (method url-fetch)
12957 (uri (pypi-uri "mando" version))
12958 (sha256
12959 (base32
12960 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12961 (build-system python-build-system)
12962 (propagated-inputs
12963 `(("python-rst2ansi" ,python-rst2ansi)
12964 ("python-six" ,python-six)))
12965 (native-inputs
12966 `(("python-pytest" ,python-pytest)))
12967 (home-page "https://mando.readthedocs.org/")
12968 (synopsis
12969 "Wrapper around argparse, allowing creation of complete CLI applications")
12970 (description
12971 "This package is a wrapper around argparse, allowing you to write complete CLI
12972applications in seconds while maintaining all the flexibility.")
12973 (license license:expat)))
12974
12975(define-public python2-mando
12976 (package-with-python2 python-mando))
12977
70daf82f
RW
12978(define-public python2-argparse
12979 (package
12980 (name "python2-argparse")
12981 (version "1.4.0")
12982 (source
12983 (origin
12984 (method url-fetch)
12985 (uri (pypi-uri "argparse" version))
12986 (sha256
12987 (base32
12988 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12989 (build-system python-build-system)
12990 (arguments
12991 `(#:python ,python-2))
12992 (home-page "https://github.com/ThomasWaldmann/argparse/")
12993 (synopsis "Python command-line parsing library")
12994 (description
12995 "This package is mostly for people who want to have @code{argparse} on
12996older Pythons because it was not part of the standard library back then.")
12997 (license license:psfl)))
12998
44d10b1f
RW
12999(define-public python-fudge
13000 (package
13001 (name "python-fudge")
13002 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
13003 ;; package, which is currently the only use of this package.
13004 (version "0.9.6")
13005 (source
13006 (origin
13007 (method url-fetch)
13008 (uri (pypi-uri "fudge" version))
13009 (sha256
13010 (base32
13011 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
13012 (build-system python-build-system)
13013 (arguments
13014 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
13015 (home-page "https://github.com/fudge-py/fudge")
13016 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
13017 (description
13018 "Fudge is a Python module for using fake objects (mocks and stubs) to
13019test real ones.
13020
13021In readable Python code, you declare the methods available on your fake object
13022and how they should be called. Then you inject that into your application and
13023start testing. This declarative approach means you don’t have to record and
13024playback actions and you don’t have to inspect your fakes after running code.
13025If the fake object was used incorrectly then you’ll see an informative
13026exception message with a traceback that points to the culprit.")
13027 (license license:expat)))
13028
13029(define-public python2-fudge
13030 (package-with-python2 python-fudge))
13031
13032(define-public python-mwclient
13033 (package
13034 (name "python-mwclient")
13035 (version "0.8.4")
13036 (source
13037 (origin
13038 (method url-fetch)
13039 ;; The PyPI version wouldn't contain tests.
13040 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
13041 "v" version ".tar.gz"))
13042 (file-name (string-append name "-" version ".tar.gz"))
13043 (sha256
13044 (base32
13045 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
13046 (build-system python-build-system)
13047 (propagated-inputs
13048 `(("python-requests" ,python-requests)
13049 ("python-requests-oauthlib"
13050 ,python-requests-oauthlib)
13051 ("python-six" ,python-six)))
13052 (native-inputs
13053 `(("python-mock" ,python-mock)
13054 ("python-pytest" ,python-pytest)
13055 ("python-pytest-pep8" ,python-pytest-pep8)
13056 ("python-pytest-cache" ,python-pytest-cache)
13057 ("python-pytest-cov" ,python-pytest-cov)
13058 ("python-responses" ,python-responses)))
13059 (home-page "https://github.com/btongminh/mwclient")
13060 (synopsis "MediaWiki API client")
13061 (description "This package provides a MediaWiki API client.")
13062 (license license:expat)))
13063
13064(define-public python2-mwclient
13065 (package-with-python2 python-mwclient))
13066
13067(define-public python-utils
13068 (package
13069 (name "python-utils")
13070 (version "2.1.0")
13071 (source (origin
13072 (method url-fetch)
13073 (uri (pypi-uri "python-utils" version))
13074 (sha256
13075 (base32
13076 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13077 (build-system python-build-system)
13078 (native-inputs
13079 `(("pytest-runner" ,python-pytest-runner)
13080 ("pytest" ,python-pytest)
13081 ("six" ,python-six)))
13082 (home-page "https://github.com/WoLpH/python-utils")
13083 (synopsis "Convenient utilities not included with the standard Python install")
13084 (description
13085 "Python Utils is a collection of small Python functions and classes which
13086make common patterns shorter and easier.")
13087 (license license:bsd-2)))
13088
13089(define-public python2-utils
13090 (package-with-python2 python-utils))
13091
44d10b1f
RW
13092(define-public python-diff-match-patch
13093 (package
13094 (name "python-diff-match-patch")
13095 (version "20121119")
13096 (source
13097 (origin
13098 (method url-fetch)
13099 (uri (pypi-uri "diff-match-patch" version))
13100 (sha256
13101 (base32
13102 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13103 (build-system python-build-system)
13104 (home-page "https://code.google.com/p/google-diff-match-patch")
13105 (synopsis "Synchronize plain text")
13106 (description "Diff Match and Patch libraries offer robust algorithms to
13107perform the operations required for synchronizing plain text.")
13108 (license license:asl2.0)))
13109
13110(define-public python2-diff-match-patch
13111 (package-with-python2 python-diff-match-patch))
13112
13113(define-public python-dirsync
13114 (package
13115 (name "python-dirsync")
13116 (version "2.2.3")
13117 (source
13118 (origin
13119 (method url-fetch)
13120 (uri (pypi-uri "dirsync" version))
13121 (sha256
13122 (base32
13123 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13124 (build-system python-build-system)
13125 (propagated-inputs
13126 `(("six" ,python-six)))
13127 (home-page "https://bitbucket.org/tkhyn/dirsync")
13128 (synopsis "Advanced directory tree synchronisation tool")
13129 (description "Advanced directory tree synchronisation tool.")
13130 (license license:expat)))
13131
13132(define-public python2-dirsync
13133 (package-with-python2 python-dirsync))
13134
13135(define-public python-levenshtein
13136 (package
13137 (name "python-levenshtein")
13138 (version "0.12.0")
13139 (source
13140 (origin
13141 (method url-fetch)
13142 (uri (pypi-uri "python-Levenshtein" version))
13143 (sha256
13144 (base32
13145 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13146 (build-system python-build-system)
13147 (home-page "https://github.com/ztane/python-Levenshtein")
13148 (synopsis "Fast computation of Levenshtein distance and string similarity")
13149 (description
13150 "The Levenshtein Python C extension module contains functions for fast computation of
13151@enumerate
13152@item Levenshtein (edit) distance, and edit operations
13153@item string similarity
13154@item approximate median strings, and generally string averaging
13155@item string sequence and set similarity
13156@end enumerate
13157It supports both normal and Unicode strings.")
13158 (license license:gpl2+)))
13159
13160(define-public python2-levenshtein
13161 (package-with-python2 python-levenshtein))
13162
13163(define-public python-scandir
13164 (package
13165 (name "python-scandir")
13166 (version "1.9.0")
13167 (source
13168 (origin
13169 (method url-fetch)
13170 (uri (pypi-uri "scandir" version))
13171 (sha256
13172 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13173 (build-system python-build-system)
13174 (arguments
13175 `(#:phases (modify-phases %standard-phases
13176 (replace 'check
13177 (lambda _
13178 (invoke "python" "test/run_tests.py"))))))
13179 (home-page "https://github.com/benhoyt/scandir")
13180 (synopsis "Directory iteration function")
13181 (description
13182 "Directory iteration function like os.listdir(), except that instead of
13183returning a list of bare filenames, it yields DirEntry objects that include
13184file type and stat information along with the name. Using scandir() increases
13185the speed of os.walk() by 2-20 times (depending on the platform and file
13186system) by avoiding unnecessary calls to os.stat() in most cases.
13187
13188This package is part of the Python standard library since version 3.5.")
13189 (license license:bsd-3)))
13190
13191(define-public python2-scandir
13192 (package-with-python2 python-scandir))
13193
13194(define-public python2-stemming
13195 (package
13196 (name "python2-stemming")
13197 (version "1.0.1")
13198 (source
13199 (origin
13200 (method url-fetch)
13201 (uri (pypi-uri "stemming" version))
13202 (sha256
13203 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13204 (build-system python-build-system)
13205 (arguments
13206 `(#:python ,python-2))
13207 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13208 (synopsis "Python implementations of various stemming algorithms")
13209 (description
13210 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13211stemming algorithms for English. These implementations are straightforward and
13212efficient, unlike some Python versions of the same algorithms available on the
13213Web. This package is an extraction of the stemming code included in the Whoosh
13214search engine.")
13215 (license license:public-domain)))
13216
13217(define-public python-factory-boy
13218 (package
13219 (name "python-factory-boy")
13220 (version "2.8.1")
13221 (source
13222 (origin
13223 (method url-fetch)
13224 (uri (pypi-uri "factory_boy" version))
13225 (sha256
13226 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13227 (build-system python-build-system)
13228 (arguments
13229 ;; Tests are not included in the tarball.
13230 `(#:tests? #f))
13231 (propagated-inputs
13232 `(("faker" ,python-faker)))
13233 (home-page "https://github.com/benhoyt/scandir")
13234 (synopsis "Versatile test fixtures replacement")
13235 (description
13236 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13237
13238As a fixtures replacement tool, it aims to replace static, hard to maintain
13239fixtures with easy-to-use factories for complex object.
13240
13241Instead of building an exhaustive test setup with every possible combination
13242of corner cases, factory_boy allows you to use objects customized for the
13243current test, while only declaring the test-specific fields")
13244 (license license:expat)))
13245
13246(define-public python2-factory-boy
13247 (package-with-python2 python-factory-boy))
13248
13249(define-public python-translate-toolkit
13250 (package
13251 (name "python-translate-toolkit")
13252 (version "2.1.0")
13253 (source
13254 (origin
13255 (method url-fetch)
13256 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13257 (sha256
13258 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13259 (build-system python-build-system)
13260 (native-inputs
13261 `(("python-pytest" ,python-pytest)
13262 ("python-sphinx" ,python-sphinx)))
13263 (propagated-inputs
13264 `(("python-babel" ,python-babel)
13265 ("python-beautifulsoup4" ,python-beautifulsoup4)
13266 ("python-chardet" ,python-chardet)
13267 ("python-diff-match-patch" ,python-diff-match-patch)
13268 ("python-levenshtein" ,python-levenshtein)
13269 ("python-lxml" ,python-lxml)
13270 ("python-six" ,python-six)
13271 ("python-vobject" ,python-vobject)
13272 ("python-pyyaml" ,python-pyyaml)))
13273 (arguments
13274 ;; TODO: tests are not run, because they end with
13275 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13276 ;; 'parse_funcs'
13277 ;; during test setup.
13278 `(#:tests? #f))
18919cf9 13279 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13280 (synopsis "Tools and API for translation and localization engineering")
13281 (description
13282 "Tools and API for translation and localization engineering. It contains
13283several utilities, as well as an API for building localization tools.")
13284 (license license:gpl2+)))
13285
13286(define-public python2-translate-toolkit
13287 (package-with-python2 python-translate-toolkit))
13288
13289(define-public python-packaging
13290 (package
13291 (name "python-packaging")
94295903 13292 (version "19.0")
44d10b1f
RW
13293 (source
13294 (origin
13295 (method url-fetch)
13296 (uri (pypi-uri "packaging" version))
13297 (sha256
13298 (base32
94295903 13299 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
44d10b1f
RW
13300 (build-system python-build-system)
13301 (arguments
13302 `(#:phases (modify-phases %standard-phases
13303 (replace 'check
13304 (lambda _ (invoke "py.test" "-vv"))))))
13305 (native-inputs
13306 `(("python-pretend" ,python-pretend)
13307 ("python-pytest" ,python-pytest)))
13308 (propagated-inputs
13309 `(("python-pyparsing" ,python-pyparsing)
13310 ("python-six" ,python-six)))
13311 (home-page "https://github.com/pypa/packaging")
13312 (synopsis "Core utilities for Python packages")
13313 (description "Packaging is a Python module for dealing with Python packages.
13314It offers an interface for working with package versions, names, and dependency
13315information.")
13316 ;; From 'LICENSE': This software is made available under the terms of
13317 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13318 ;; Contributions to this software is made under the terms of *both* these
13319 ;; licenses.
13320 (license (list license:asl2.0 license:bsd-2))))
13321
13322(define-public python2-packaging
13323 (package-with-python2 python-packaging))
13324
13325(define-public python-relatorio
13326 (package
13327 (name "python-relatorio")
13328 (version "0.8.0")
13329 (source
13330 (origin
13331 (method url-fetch)
13332 (uri (pypi-uri "relatorio" version))
13333 (sha256
13334 (base32
13335 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13336 (build-system python-build-system)
13337 (propagated-inputs
13338 `(("python-lxml" ,python-lxml)
13339 ("python-genshi" ,python-genshi)))
13340 (native-inputs
13341 `(("python-magic" ,python-magic)))
13342 (home-page "https://relatorio.tryton.org/")
13343 (synopsis "Templating library able to output ODT and PDF files")
13344 (description "Relatorio is a templating library which provides a way to
13345easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13346for more filetypes can be easily added by creating plugins for them.")
13347 (license license:gpl3+)))
13348
13349(define-public python2-relatorio
13350 (package-with-python2 python-relatorio))
13351
13352(define-public python-radon
13353 (package
13354 (name "python-radon")
13355 (version "2.2.0")
13356 (source
13357 (origin
13358 (method url-fetch)
13359 (uri (pypi-uri "radon" version))
13360 (sha256
13361 (base32
13362 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13363 (build-system python-build-system)
13364 (arguments
13365 `(#:phases (modify-phases %standard-phases
13366 (replace 'check
13367 (lambda _
13368 (invoke "python" "radon/tests/run.py"))))))
13369 (propagated-inputs
13370 `(("python-colorama" ,python-colorama)
13371 ("python-flake8-polyfill" ,python-flake8-polyfill)
13372 ("python-mando" ,python-mando)))
13373 (native-inputs
13374 `(("python-pytest" ,python-pytest)
13375 ("python-pytest-mock" ,python-pytest-mock)))
13376 (home-page "https://radon.readthedocs.org/")
13377 (synopsis "Code Metrics in Python")
13378 (description "Radon is a Python tool which computes various code metrics.
13379Supported metrics are:
13380@itemize @bullet
13381@item raw metrics: SLOC, comment lines, blank lines, &c.
13382@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13383@item Halstead metrics (all of them)
13384@item the Maintainability Index (a Visual Studio metric)
13385@end itemize")
13386 (license license:expat)))
13387
13388(define-public python2-radon
13389 (package-with-python2 python-radon))
13390
13391(define-public python-sure
13392 (package
13393 (name "python-sure")
13394 (version "1.4.11")
13395 (source
13396 (origin
13397 (method url-fetch)
13398 (uri (pypi-uri "sure" version))
13399 (sha256
13400 (base32
13401 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13402 (build-system python-build-system)
13403 (propagated-inputs
13404 `(("python-mock" ,python-mock)
13405 ("python-six" ,python-six)))
13406 (native-inputs
13407 `(("python-nose" ,python-nose)))
13408 (home-page "https://github.com/gabrielfalcao/sure")
13409 (synopsis "Automated testing library in python for python")
13410 (description
13411 "Sure is a python library that leverages a DSL for writing assertions.
13412Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13413 (license license:gpl3+)))
13414
13415(define-public python2-sure
13416 (package-with-python2 python-sure))
13417
13418(define-public python2-couleur
13419 ;; This package does not seem to support python3 at all, hence,
13420 ;; only the python2 variant definition is provided.
13421 (package
13422 (name "python2-couleur")
13423 (version "0.6.2")
13424 (source
13425 (origin
13426 (method url-fetch)
13427 (uri (pypi-uri "couleur" version))
13428 (sha256
13429 (base32
13430 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13431 (build-system python-build-system)
13432 (arguments
13433 `(#:python ,python-2))
13434 (home-page "https://github.com/gabrielfalcao/couleur")
13435 (synopsis
13436 "ANSI terminal tool for python, colored shell and other handy fancy features")
13437 (description
13438 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13439terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13440 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13441 ;; https://github.com/gabrielfalcao/couleur/issues/11
13442 (license license:lgpl3+)))
13443
13444(define-public python-misaka
13445 (package
13446 (name "python-misaka")
0dcb3412 13447 (version "2.1.1")
44d10b1f
RW
13448 (source
13449 (origin
13450 (method url-fetch)
13451 (uri (pypi-uri "misaka" version))
13452 (sha256
13453 (base32
0dcb3412 13454 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13455 (build-system python-build-system)
13456 (arguments
13457 `(;; Line 37 of setup.py calls self.run_command('develop')
13458 ;; in the 'check' phase. This command seems to be trying
13459 ;; to write to
13460 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13461 ;; for which it does not have the permission to write.
13462 #:tests? #f))
13463 (propagated-inputs
13464 `(("python-cffi" ,python-cffi)))
13465 (home-page "https://github.com/FSX/misaka")
13466 (synopsis "Python binding for Hoedown")
13467 (description
13468 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13469library written in C. It features a fast HTML renderer and functionality to make custom
13470renderers (e.g. man pages or LaTeX).")
13471 (license license:expat)))
13472
13473(define-public python2-misaka
13474 (package-with-python2 python-misaka))
13475
13476(define-public python2-steadymark
13477 ;; This is forced into being a python2 only variant
13478 ;; due to its dependence on couleur that has no support
13479 ;; for python3
13480 (package
13481 (name "python2-steadymark")
13482 (version "0.7.3")
13483 (source
13484 (origin
13485 (method url-fetch)
13486 (uri (pypi-uri "steadymark" version))
13487 (sha256
13488 (base32
13489 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13490 (build-system python-build-system)
13491 (native-inputs
13492 `(("python-couleur" ,python2-couleur)
13493 ("python-sure" ,python2-sure)
13494 ("python-misaka" ,python2-misaka)))
13495 (arguments
13496 `(#:python ,python-2
13497 #:phases
13498 (modify-phases %standard-phases
13499 (add-before 'build 'patch-setup-py
13500 (lambda _
13501 ;; Update requirements from dependency==version
13502 ;; to dependency>=version
13503 (substitute* "setup.py"
13504 (("==") ">="))
13505 #t)))))
13506 (home-page "https://github.com/gabrielfalcao/steadymark")
13507 (synopsis "Markdown-based test runner for python")
13508 (description
13509 "@code{Steadymark} allows documentation to be written in github-flavoured
13510markdown. The documentation may contain snippets of code surrounded by python
13511code blocks and @code{Steadymark} will find these snippets and run them, making
13512sure that there are no old malfunctional examples in the documentation examples.")
13513 (license license:expat)))
13514
13515(define-public python-jsonpointer
13516 (package
13517 (name "python-jsonpointer")
13518 (version "1.10")
13519 (source
13520 (origin
13521 (method url-fetch)
13522 (uri (pypi-uri "jsonpointer" version))
13523 (sha256
13524 (base32
13525 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13526 (build-system python-build-system)
13527 (home-page "https://github.com/stefankoegl/python-json-pointer")
13528 (synopsis "Identify specific nodes in a JSON document")
13529 (description "@code{jsonpointer} allows you to access specific nodes
13530by path in a JSON document (see RFC 6901).")
13531 (license license:bsd-3)))
13532
13533(define-public python2-jsonpointer
13534 (package-with-python2 python-jsonpointer))
13535
13536(define-public python-jsonpatch
13537 (package
13538 (name "python-jsonpatch")
13539 (version "1.16")
13540 (source
13541 (origin
13542 (method url-fetch)
13543 ;; pypi version lacks tests.js
13544 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13545 "archive/v" version ".tar.gz"))
13546 (file-name (string-append name "-" version ".tar.gz"))
13547 (sha256
13548 (base32
13549 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13550 (build-system python-build-system)
13551 (native-inputs
13552 `(("python-jsonpointer" ,python-jsonpointer)))
13553 (home-page "https://github.com/stefankoegl/python-json-patch")
13554 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13555 (description "@code{jsonpatch} is a library and program that allows
13556applying JSON Patches according to RFC 6902.")
13557 (license license:bsd-3)))
13558
13559(define-public python2-jsonpatch
13560 (package-with-python2 python-jsonpatch))
13561
13562(define-public python-jsonpatch-0.4
13563 (package (inherit python-jsonpatch)
13564 (name "python-jsonpatch")
13565 (version "0.4")
13566 (source
13567 (origin
13568 (method url-fetch)
13569 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13570 "archive/v" version ".tar.gz"))
13571 (file-name (string-append name "-" version ".tar.gz"))
13572 (sha256
13573 (base32
13574 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13575
13576(define-public python2-jsonpatch-0.4
13577 (package-with-python2 python-jsonpatch-0.4))
13578
13579(define-public python-rfc3986
13580 (package
13581 (name "python-rfc3986")
13582 (version "1.1.0")
13583 (source (origin
13584 (method url-fetch)
13585 (uri (pypi-uri "rfc3986" version))
13586 (sha256
13587 (base32
13588 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13589 (build-system python-build-system)
13590 (arguments
13591 `(#:modules ((guix build utils)
13592 (guix build python-build-system)
13593 (ice-9 ftw)
13594 (srfi srfi-1)
13595 (srfi srfi-26))
13596 #:phases
13597 (modify-phases %standard-phases
13598 (replace 'check
13599 (lambda _
13600 (let ((cwd (getcwd)))
13601 (setenv "PYTHONPATH"
13602 (string-append cwd "/build/"
13603 (find (cut string-prefix? "lib" <>)
13604 (scandir (string-append cwd "/build")))
13605 ":"
13606 (getenv "PYTHONPATH")))
13607 (invoke "pytest" "-v")))))))
13608 (native-inputs
13609 `(("python-pytest" ,python-pytest)))
13610 (home-page "https://rfc3986.readthedocs.io/")
13611 (synopsis "Parse and validate URI references")
13612 (description
13613 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13614validation and authority parsing. This module also supports RFC@tie{}6874
13615which adds support for zone identifiers to IPv6 addresses.")
13616 (license license:asl2.0)))
13617
13618(define-public python2-rfc3986
13619 (package-with-python2 python-rfc3986))
13620
13621(define-public python-rfc3987
13622 (package
13623 (name "python-rfc3987")
13624 (version "1.3.7")
13625 (source
13626 (origin
13627 (method url-fetch)
13628 (uri (pypi-uri "rfc3987" version))
13629 (sha256
13630 (base32
13631 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13632 (build-system python-build-system)
13633 (home-page "https://pypi.python.org/pypi/rfc3987")
13634 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13635 (description "@code{rfc3987} provides routines for parsing and
13636validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13637 (license license:gpl3+)))
13638
13639(define-public python2-rfc3987
13640 (package-with-python2 python-rfc3987))
13641
13642(define-public python-validate-email
13643 (package
13644 (name "python-validate-email")
13645 (version "1.3")
13646 (source
13647 (origin
13648 (method url-fetch)
13649 (uri (pypi-uri "validate_email" version))
13650 (sha256
13651 (base32
13652 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13653 (build-system python-build-system)
13654 (home-page "https://github.com/syrusakbary/validate_email")
13655 (synopsis "Verifies if an email address is valid and really exists")
13656 (description "@code{validate_email} can be used to verify if an email
13657address is valid and really exists.")
13658 (license license:lgpl3+)))
13659
13660(define-public python2-validate-email
13661 (package-with-python2 python-validate-email))
13662
13663(define-public python-flex
13664 (package
13665 (name "python-flex")
13666 (version "6.10.0")
13667 (source
13668 (origin
13669 (method url-fetch)
13670 (uri (pypi-uri "flex" version))
13671 (sha256
13672 (base32
13673 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13674 (build-system python-build-system)
13675 (propagated-inputs
13676 `(("python-click" ,python-click)
13677 ("python-iso8601" ,python-iso8601)
13678 ("python-jsonpointer" ,python-jsonpointer)
13679 ("python-pyyaml" ,python-pyyaml)
13680 ("python-requests" ,python-requests)
13681 ("python-rfc3987" ,python-rfc3987)
13682 ("python-six" ,python-six)
13683 ("python-validate-email" ,python-validate-email)))
13684 (home-page "https://github.com/pipermerriam/flex")
13685 (synopsis "Validates Swagger schemata")
13686 (description "@code{flex} can be used to validate Swagger schemata.")
13687 (license license:bsd-3)))
13688
13689(define-public python2-flex
13690 (package-with-python2 python-flex))
13691
13692(define-public python-marshmallow
13693 (package
13694 (name "python-marshmallow")
13695 (version "3.0.0b14")
13696 (source
13697 (origin
13698 (method url-fetch)
13699 (uri (pypi-uri "marshmallow" version))
13700 (sha256
13701 (base32
13702 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13703 (build-system python-build-system)
13704 (propagated-inputs
13705 `(("python-dateutil" ,python-dateutil)
13706 ("python-simplejson" ,python-simplejson)))
13707 (native-inputs
13708 `(("python-pytest" ,python-pytest)
13709 ("python-pytz" ,python-pytz)))
13710 (home-page "https://github.com/marshmallow-code/marshmallow")
13711 (synopsis "Convert complex datatypes to and from native
13712Python datatypes.")
13713 (description "@code{marshmallow} provides a library for converting
13714complex datatypes to and from native Python datatypes.")
13715 (license license:expat)))
13716
13717(define-public python2-marshmallow
13718 (package-with-python2 python-marshmallow))
13719
13720(define-public python-apispec
13721 (package
13722 (name "python-apispec")
13723 (version "0.25.3")
13724 (source
13725 (origin
13726 (method url-fetch)
13727 (uri (pypi-uri "apispec" version))
13728 (sha256
13729 (base32
13730 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13731 (build-system python-build-system)
13732 (propagated-inputs
13733 `(("python-pyyaml" ,python-pyyaml)))
13734 (native-inputs
13735 `(("python-pytest" ,python-pytest)
13736 ("python-flask" ,python-flask)
13737 ("python-marshmallow" ,python-marshmallow)
13738 ("python-tornado" ,python-tornado)
13739 ("python-bottle" ,python-bottle)
13740 ("python-mock" ,python-mock)))
13741 (home-page "https://github.com/marshmallow-code/apispec")
13742 (synopsis "Swagger 2.0 API specification generator")
13743 (description "@code{python-apispec} is a pluggable API specification
13744generator. Currently supports the OpenAPI specification (f.k.a.
13745Swagger 2.0).")
13746 (license license:expat)))
13747
13748(define-public python2-apispec
13749 (package-with-python2 python-apispec))
13750
13751(define-public python-flasgger
13752 (package
13753 (name "python-flasgger")
13754 (version "0.6.3")
13755 (source
13756 (origin
1a04d421
TGR
13757 (method git-fetch)
13758 (uri (git-reference
13759 (url "https://github.com/rochacbruno/flasgger.git")
13760 (commit version)))
13761 (file-name (git-file-name name version))
44d10b1f 13762 (sha256
1a04d421 13763 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13764 (build-system python-build-system)
13765 (arguments
13766 `(#:phases
13767 (modify-phases %standard-phases
13768 (replace 'check
13769 (lambda* (#:key inputs outputs #:allow-other-keys)
13770 (substitute* "Makefile"
13771 (("flake8 flasgger --ignore=F403")
13772 "flake8 flasgger --ignore=E731,F403"))
13773 (setenv "PYTHONPATH" (string-append (getcwd)
13774 ":"
13775 (getenv "PYTHONPATH")))
ac599a09 13776 (invoke "py.test"))))))
44d10b1f
RW
13777 (propagated-inputs
13778 `(("python-flask" ,python-flask)
13779 ("python-pyyaml" ,python-pyyaml)
13780 ("python-jsonschema" ,python-jsonschema)
13781 ("python-mistune" ,python-mistune)
13782 ("python-six" ,python-six)))
13783 (native-inputs
13784 `(("python-decorator" ,python-decorator)
13785 ("python-flake8" ,python-flake8)
13786 ("python-flask-restful" ,python-flask-restful)
13787 ("python-flex" ,python-flex)
13788 ("python-pytest" ,python-pytest)
13789 ("python-pytest-cov" ,python-pytest-cov)
13790 ("python-marshmallow" ,python-marshmallow)
13791 ("python-apispec" ,python-apispec)))
13792 (home-page "https://github.com/rochacbruno/flasgger/")
13793 (synopsis "Extract Swagger specs from your Flask project")
13794 (description "@code{python-flasgger} allows extracting Swagger specs
13795from your Flask project. It is a fork of Flask-Swagger.")
13796 (license license:expat)))
13797
13798(define-public python2-flasgger
13799 (package-with-python2 python-flasgger))
13800
13801(define-public python-swagger-spec-validator
13802 (package
13803 (name "python-swagger-spec-validator")
fe9c5b1d 13804 (version "2.4.3")
44d10b1f
RW
13805 (source
13806 (origin
13807 (method url-fetch)
13808 (uri (pypi-uri "swagger-spec-validator" version))
13809 (sha256
13810 (base32
fe9c5b1d 13811 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13812 (build-system python-build-system)
13813 (propagated-inputs
13814 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13815 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13816 ("python-six" ,python-six)))
13817 (home-page
13818 "https://github.com/Yelp/swagger_spec_validator")
13819 (synopsis "Validation of Swagger specifications")
13820 (description "@code{swagger_spec_validator} provides a library for
13821validating Swagger API specifications.")
13822 (license license:asl2.0)))
13823
13824(define-public python2-swagger-spec-validator
13825 (package-with-python2 python-swagger-spec-validator))
13826
13827(define-public python-apache-libcloud
13828 (package
13829 (name "python-apache-libcloud")
13830 (version "2.4.0")
13831 (source
13832 (origin
13833 (method url-fetch)
13834 (uri (pypi-uri "apache-libcloud" version))
13835 (sha256
13836 (base32
13837 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13838 (build-system python-build-system)
13839 (arguments
13840 `(#:phases
13841 (modify-phases %standard-phases
13842 (add-after 'unpack 'patch-ssh
13843 (lambda* (#:key inputs #:allow-other-keys)
13844 (substitute* "libcloud/compute/ssh.py"
13845 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13846 "/bin/ssh" "'")))
13847 #t))
13848 (add-after 'unpack 'patch-tests
13849 (lambda _
13850 (substitute* "./libcloud/test/test_file_fixtures.py"
13851 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13852 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13853 return (httplib.OK,
13854 \"1234abcd\",
13855 {\"test\": \"value\"},
13856 httplib.responses[httplib.OK])
13857 def _ascii"))
13858 (substitute* "libcloud/test/compute/test_ssh_client.py"
13859 (("class ShellOutSSHClientTests")
13860 "@unittest.skip(\"Guix container doesn't have ssh service\")
13861class ShellOutSSHClientTests")
13862 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13863 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13864 (("'.xF0', '.x90', '.x8D', '.x88'")
13865 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13866 #t))
13867 (add-before 'check 'copy-secret
13868 (lambda _
13869 (copy-file "libcloud/test/secrets.py-dist"
13870 "libcloud/test/secrets.py")
13871 #t)))))
13872 (inputs
13873 `(("openssh" ,openssh)))
13874 (propagated-inputs
13875 `(("python-paramiko" ,python-paramiko)
13876 ("python-requests" ,python-requests)))
13877 (native-inputs
13878 `(("python-lockfile" ,python-lockfile)
13879 ("python-mock" ,python-mock)
13880 ("python-pytest" ,python-pytest)
13881 ("python-pytest-runner" ,python-pytest-runner)
13882 ("python-requests-mock" ,python-requests-mock)))
13883 (home-page "https://libcloud.apache.org/")
13884 (synopsis "Unified Cloud API")
13885 (description "@code{libcloud} is a Python library for interacting with
13886many of the popular cloud service providers using a unified API.")
13887 (license license:asl2.0)))
13888
13889(define-public python2-apache-libcloud
13890 (package-with-python2 python-apache-libcloud))
13891
13892(define-public python-smmap2
13893 (package
13894 (name "python-smmap2")
13895 (version "2.0.3")
13896 (source
13897 (origin
13898 (method url-fetch)
13899 (uri (pypi-uri "smmap2" version))
13900 (sha256
13901 (base32
13902 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13903 (build-system python-build-system)
13904 (native-inputs
13905 `(("python-nosexcover" ,python-nosexcover)))
13906 (home-page "https://github.com/Byron/smmap")
13907 (synopsis "Python sliding window memory map manager")
13908 (description "@code{smmap2} is a pure Python implementation of a sliding
13909window memory map manager.")
13910 (license license:bsd-3)))
13911
13912(define-public python2-smmap2
13913 (package-with-python2 python-smmap2))
13914
13915(define-public python-regex
13916 (package
13917 (name "python-regex")
c187c9d7 13918 (version "2019.04.14")
44d10b1f
RW
13919 (source (origin
13920 (method url-fetch)
13921 (uri (pypi-uri "regex" version))
13922 (sha256
13923 (base32
c187c9d7
BT
13924 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13925 ;; TODO: Fix and enable regex_test.py tests that complain about the
13926 ;; test.support module not existing.
44d10b1f
RW
13927 (build-system python-build-system)
13928 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13929 (synopsis "Alternative regular expression module")
13930 (description "This regular expression implementation is backwards-
13931compatible with the standard @code{re} module, but offers additional
13932functionality like full case-folding for case-insensitive matches in Unicode.")
13933 (license license:psfl)))
13934
13935(define-public python2-regex
13936 (package-with-python2 python-regex))
13937
13938(define-public python2-pyopengl
13939 (package
13940 (name "python2-pyopengl")
13941 (version "3.1.0")
13942 (source
13943 (origin
13944 (method url-fetch)
13945 (uri (pypi-uri "PyOpenGL" version))
13946 (sha256
13947 (base32
13948 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13949 (arguments
13950 `(#:python ,python-2))
13951 (build-system python-build-system)
13952 (home-page "http://pyopengl.sourceforge.net")
13953 (synopsis "Standard OpenGL bindings for Python")
13954 (description
13955 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13956related APIs. The binding is created using the standard @code{ctypes}
13957library.")
13958 (license license:bsd-3)))
13959
13960(define-public python2-pyopengl-accelerate
13961 (package
13962 (inherit python2-pyopengl)
13963 (name "python2-pyopengl-accelerate")
13964 (version "3.1.0")
13965 (source
13966 (origin
13967 (method url-fetch)
13968 (uri (pypi-uri "PyOpenGL-accelerate" version))
13969 (sha256
13970 (base32
13971 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13972 (synopsis "Acceleration code for PyOpenGL")
13973 (description
13974 "This is the Cython-coded accelerator module for PyOpenGL.")))
13975
13976(define-public python-rencode
13977 (package
13978 (name "python-rencode")
13979 (version "1.0.5")
13980 (source
13981 (origin
13982 (method url-fetch)
13983 (uri (pypi-uri "rencode" version))
13984 (sha256
13985 (base32
13986 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13987 (build-system python-build-system)
13988 (arguments
13989 `(#:phases
13990 (modify-phases %standard-phases
13991 (add-before 'check 'delete-bogus-test
13992 ;; This test requires /home/aresch/Downloads, which is not provided by
13993 ;; the build environment.
13994 (lambda _
13995 (delete-file "rencode/t.py")
13996 #t)))))
13997 (native-inputs `(("pkg-config" ,pkg-config)
13998 ("python-cython" ,python-cython)))
13999 (home-page "https://github.com/aresch/rencode")
14000 (synopsis "Serialization of heterogeneous data structures")
14001 (description
14002 "The @code{rencode} module is a data structure serialization library,
14003similar to @code{bencode} from the BitTorrent project. For complex,
14004heterogeneous data structures with many small elements, r-encoding stake up
14005significantly less space than b-encodings. This version of rencode is a
14006complete rewrite in Cython to attempt to increase the performance over the
14007pure Python module.")
14008 (license license:bsd-3)))
14009
14010(define-public python2-rencode
14011 (package-with-python2 python-rencode))
14012
14013(define-public python-xenon
14014 (package
14015 (name "python-xenon")
14016 (version "0.5.4")
14017 (source
14018 (origin
14019 (method url-fetch)
14020 (uri (pypi-uri "xenon" version))
14021 (sha256
14022 (base32
14023 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
14024 (build-system python-build-system)
14025 (native-inputs
14026 `(("python-pyyaml" ,python-pyyaml)
14027 ("python-radon" ,python-radon)
14028 ("python-requests" ,python-requests)
14029 ("python-flake8" ,python-flake8)
14030 ("python-tox" ,python-tox)))
14031 (arguments
14032 `(#:phases
14033 (modify-phases %standard-phases
14034 (add-before 'build 'patch-test-requirements
14035 (lambda _
14036 ;; Remove httpretty dependency for tests.
14037 (substitute* "setup.py"
14038 (("httpretty") ""))
14039 #t)))))
14040 (home-page "https://xenon.readthedocs.org/")
14041 (synopsis "Monitor code metrics for Python on your CI server")
14042 (description
14043 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
14044Ideally, @code{xenon} is run every time code is committed. Through command
14045line options, various thresholds can be set for the complexity of code. It
14046will fail (i.e. it will exit with a non-zero exit code) when any of these
14047requirements is not met.")
14048 (license license:expat)))
14049
14050(define-public python2-xenon
14051 (package-with-python2 python-xenon))
14052
14053(define-public python-pysocks
14054 (package
14055 (name "python-pysocks")
b8725cdf 14056 (version "1.7.0")
44d10b1f
RW
14057 (source
14058 (origin
14059 (method url-fetch)
14060 (uri (pypi-uri "PySocks" version))
14061 (sha256
14062 (base32
b8725cdf 14063 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
14064 (build-system python-build-system)
14065 (arguments `(#:tests? #f))
14066 (home-page "https://github.com/Anorov/PySocks")
14067 (synopsis "SOCKS client module")
14068 (description "@code{pysocks} is an updated and semi-actively maintained
14069version of @code{SocksiPy} with bug fixes and extra features.")
14070 (license license:bsd-3)))
14071
14072(define-public python2-pysocks
14073 (package-with-python2 python-pysocks))
14074
14075(define-public python-pydiff
14076 (package
14077 (name "python-pydiff")
14078 (version "0.2")
14079 (source
14080 (origin
14081 (method url-fetch)
14082 (uri (pypi-uri "pydiff" version))
14083 (sha256
14084 (base32
14085 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14086 (build-system python-build-system)
14087 (home-page "https://github.com/myint/pydiff")
14088 (synopsis "Library to diff two Python files at the bytecode level")
14089 (description
14090 "@code{pydiff} makes it easy to look for actual code changes while
14091ignoring formatting changes.")
14092 (license license:expat)))
14093
14094(define-public python2-pydiff
14095 (package-with-python2 python-pydiff))
14096
14097(define-public python-tqdm
14098 (package
14099 (name "python-tqdm")
14100 (version "4.19.6")
14101 (source
14102 (origin
14103 (method url-fetch)
14104 (uri (pypi-uri "tqdm" version))
14105 (sha256
14106 (base32
14107 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
14108 (build-system python-build-system)
14109 (native-inputs
14110 `(("python-flake8" ,python-flake8)
14111 ("python-nose" ,python-nose)
14112 ("python-coverage" ,python-coverage)))
14113 (home-page "https://github.com/tqdm/tqdm")
14114 (synopsis "Fast, extensible progress meter")
14115 (description
14116 "Make loops show a progress bar on the console by just wrapping any
14117iterable with @code{|tqdm(iterable)|}. Offers many options to define
14118design and layout.")
f875d76f
PL
14119 (license (list license:mpl2.0 license:expat))
14120 (properties `((python2-variant . ,(delay python2-tqdm))))))
44d10b1f
RW
14121
14122(define-public python2-tqdm
f875d76f
PL
14123 (let ((tqdm (package-with-python2
14124 (strip-python2-variant python-tqdm))))
14125 (package (inherit tqdm)
14126 (native-inputs `(("python2-functools32" ,python2-functools32)
14127 ,@(package-native-inputs tqdm))))))
44d10b1f
RW
14128
14129(define-public python-pkginfo
14130 (package
14131 (name "python-pkginfo")
14132 (version "1.4.2")
14133 (source
14134 (origin
14135 (method url-fetch)
14136 (uri (pypi-uri "pkginfo" version))
14137 (sha256
14138 (base32
14139 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14140 (build-system python-build-system)
14141 (arguments
14142 ;; The tests are broken upstream.
14143 '(#:tests? #f))
14144 (home-page
14145 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14146 (synopsis
14147 "Query metadatdata from sdists, bdists, and installed packages")
14148 (description
14149 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14150source distriubtion (an sdist) or a binary distribution (e.g., created by
14151running bdist_egg). It can also query the EGG-INFO directory of an installed
14152distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14153created by running @code{python setup.py develop}).")
14154 (license license:expat)))
14155
14156(define-public python2-pkginfo
14157 (package-with-python2 python-pkginfo))
14158
14159(define-public python-twine
14160 (package
14161 (name "python-twine")
14162 (version "1.9.1")
14163 (source
14164 (origin
14165 (method url-fetch)
14166 (uri (pypi-uri "twine" version))
14167 (sha256
14168 (base32
14169 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14170 (build-system python-build-system)
14171 (propagated-inputs
14172 `(("python-tqdm" ,python-tqdm)
14173 ("python-pkginfo" ,python-pkginfo)
14174 ("python-requests" ,python-requests)
14175 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14176 (home-page "https://github.com/pypa/twine")
14177 (synopsis "Collection of utilities for interacting with PyPI")
14178 (description
14179 "@code{twine} currently supports registering projects and uploading
14180distributions. It authenticates the user over HTTPS, allows them to pre-sign
14181their files and supports any packaging format (including wheels).")
14182 (license license:asl2.0)))
14183
14184(define-public python2-twine
14185 (package-with-python2 python-twine))
14186
14187(define-public python-linecache2
14188 (package
14189 (name "python-linecache2")
14190 (version "1.0.0")
14191 (source
14192 (origin
14193 (method url-fetch)
14194 (uri (pypi-uri "linecache2" version))
14195 (sha256
14196 (base32
14197 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14198 (build-system python-build-system)
14199 (arguments
14200 `(;; The tests depend on unittest2, and our version is a bit too old.
14201 #:tests? #f))
14202 (native-inputs
14203 `(("python-pbr" ,python-pbr-minimal)))
14204 (home-page
14205 "https://github.com/testing-cabal/linecache2")
14206 (synopsis "Backports of the linecache module")
14207 (description
14208 "The linecache module allows one to get any line from any file, while
14209attempting to optimize internally, using a cache, the common case where many
14210lines are read from a single file.")
14211 (license license:psfl)))
14212
14213(define-public python2-linecache2
14214 (package-with-python2 python-linecache2))
14215
14216(define-public python-traceback2
14217 (package
14218 (name "python-traceback2")
14219 (version "1.4.0")
14220 (source
14221 (origin
14222 (method url-fetch)
14223 (uri (pypi-uri "traceback2" version))
14224 (sha256
14225 (base32
14226 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14227 (build-system python-build-system)
14228 (arguments
14229 `(;; python-traceback2 and python-unittest2 depend on one another.
14230 #:tests? #f))
14231 (native-inputs
14232 `(("python-pbr" ,python-pbr-minimal)))
14233 (propagated-inputs
14234 `(("python-linecache2" ,python-linecache2)))
14235 (home-page
14236 "https://github.com/testing-cabal/traceback2")
14237 (synopsis "Backports of the traceback module")
14238 (description
14239 "This module provides a standard interface to extract, format and print
14240stack traces of Python programs. It exactly mimics the behavior of the Python
14241interpreter when it prints a stack trace.")
14242 (license license:psfl)))
14243
14244(define-public python2-traceback2
14245 (package-with-python2 python-traceback2))
14246
14247(define-public python-ratelimiter
14248 (package
14249 (name "python-ratelimiter")
14250 (version "1.2.0")
14251 (source
14252 (origin
14253 (method url-fetch)
14254 (uri (pypi-uri "ratelimiter" version))
14255 (sha256
14256 (base32
14257 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14258 (build-system python-build-system)
14259 (arguments
14260 '(#:tests? #f)) ; There are no tests in the pypi archive.
14261 (home-page "https://github.com/RazerM/ratelimiter")
14262 (synopsis "Simple rate limiting object")
14263 (description
14264 "The @code{ratelimiter} module ensures that an operation will not be
14265executed more than a given number of times during a given period.")
14266 (license license:asl2.0)))
14267
14268(define-public python2-ratelimiter
14269 (package-with-python2 python-ratelimiter))
14270
14271(define-public python-dukpy
14272 (package
14273 (name "python-dukpy")
14274 (version "0.3")
14275 (source
14276 (origin
5b77ebe1
TGR
14277 (method git-fetch)
14278 (uri (git-reference
14279 (url "https://github.com/kovidgoyal/dukpy.git")
14280 (commit (string-append "v" version))))
14281 (file-name (git-file-name name version))
44d10b1f 14282 (sha256
5b77ebe1 14283 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14284 (build-system python-build-system)
14285 (home-page "https://github.com/kovidgoyal/dukpy")
14286 (synopsis "Run JavaScript in python")
14287 (description
14288 "dukpy is a JavaScript runtime environment for Python using the duktape
14289embeddable JavaScript engine.")
14290 ;; Dukpy is licensed under MIT like the embedded duktape library,
14291 ;; with 'errors.c' as GPL3.
14292 (license (list license:expat license:gpl3))))
14293
14294(define-public python2-dukpy
14295 (package-with-python2 python-dukpy))
14296
14297(define-public python-jsonrpclib-pelix
14298 (package
14299 (name "python-jsonrpclib-pelix")
14300 (version "0.3.2")
14301 (source
14302 (origin
14303 (method url-fetch)
14304 (uri (pypi-uri "jsonrpclib-pelix" version))
14305 (sha256
14306 (base32
14307 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14308 (build-system python-build-system)
14309 (arguments
14310 `(#:tests? #f)) ; no tests in PyPI tarball
14311 (home-page "https://github.com/tcalmant/jsonrpclib/")
14312 (synopsis "JSON-RPC 2.0 client library for Python")
14313 (description
14314 "This library implements the JSON-RPC v2.0
14315specification (backwards-compatible) as a client library for Python. This
14316version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14317services.")
14318 (license license:asl2.0)))
14319
14320(define-public python2-jsonrpclib-pelix
14321 (package-with-python2 python-jsonrpclib-pelix))
14322
14323(define-public python-setuptools-scm-git-archive
14324 (package
14325 (name "python-setuptools-scm-git-archive")
14326 (version "1.0")
14327 (source
14328 (origin
14329 (method url-fetch)
14330 (uri (pypi-uri "setuptools_scm_git_archive" version))
14331 (sha256
14332 (base32
14333 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14334 (build-system python-build-system)
14335 (native-inputs
14336 `(("python-pytest" ,python-pytest)))
14337 (propagated-inputs
14338 `(("python-setuptools-scm" ,python-setuptools-scm)))
14339 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14340 (synopsis "Setuptools_scm plugin for git archives")
14341 (description
14342 "The setuptools_scm_git_archive package is a plugin to
14343setuptools_scm, which supports obtaining versions from git archives that
14344belong to tagged versions.")
14345 (license license:expat)))
14346
14347(define-public python2-setuptools-scm-git-archive
14348 (package-with-python2 python-setuptools-scm-git-archive))
14349
724a350c
RW
14350(define-public python-setuptools-git
14351 (package
14352 (name "python-setuptools-git")
14353 (version "1.2")
14354 (source
14355 (origin
14356 (method url-fetch)
14357 (uri (pypi-uri "setuptools-git" version))
14358 (sha256
14359 (base32
14360 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14361 (build-system python-build-system)
14362 (arguments
14363 `(#:phases
14364 (modify-phases %standard-phases
14365 ;; This is needed for tests.
14366 (add-after 'unpack 'configure-git
14367 (lambda _
14368 (setenv "HOME" "/tmp")
14369 (invoke "git" "config" "--global" "user.email" "guix")
14370 (invoke "git" "config" "--global" "user.name" "guix")
14371 #t)))))
14372 (native-inputs
14373 `(("git" ,git-minimal)))
14374 (home-page "https://github.com/msabramo/setuptools-git")
14375 (synopsis "Setuptools revision control system plugin for Git")
14376 (description
14377 "This package provides a plugin for Setuptools for revision control with
14378Git.")
14379 (license license:bsd-3)))
14380
44d10b1f
RW
14381(define-public python-pyclipper
14382 (package
14383 (name "python-pyclipper")
ff3d1b99 14384 (version "1.1.0.post3")
44d10b1f
RW
14385 (source
14386 (origin
14387 (method url-fetch)
14388 (uri (pypi-uri "pyclipper" version ".zip"))
14389 (sha256
ff3d1b99 14390 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14391 (modules '((guix build utils)))
14392 (snippet
14393 '(begin
14394 ;; This file is generated by Cython.
14395 (delete-file "pyclipper/pyclipper.cpp") #t))))
14396 (build-system python-build-system)
14397 (arguments
14398 `(#:phases
14399 (modify-phases %standard-phases
14400 (add-before 'build 'cythonize-sources
14401 (lambda _
14402 (with-directory-excursion "pyclipper"
14403 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14404 (propagated-inputs
14405 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14406 (native-inputs
14407 `(("python-cython" ,python-cython)
14408 ("python-pytest" ,python-pytest)
14409 ("python-pytest-runner" ,python-pytest-runner)
14410 ("python-unittest2" ,python-unittest2)
14411 ("unzip" ,unzip)))
14412 (home-page "https://github.com/greginvm/pyclipper")
14413 (synopsis "Wrapper for Angus Johnson's Clipper library")
14414 (description
14415 "Pyclipper is a Cython wrapper for the C++ translation of the
14416Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14417 (license license:expat)))
14418
14419(define-public python2-pyclipper
14420 (package-with-python2 python-pyclipper))
14421
14422(define-public python2-booleanoperations
14423 (package
14424 (name "python2-booleanoperations")
14425 (version "0.7.1")
14426 (source
14427 (origin
14428 (method url-fetch)
14429 (uri (pypi-uri "booleanOperations" version ".zip"))
14430 (sha256
14431 (base32
14432 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14433 (build-system python-build-system)
14434 (arguments
14435 `(#:python ,python-2))
14436 (native-inputs
14437 `(("unzip" ,unzip)
14438 ("python2-pytest" ,python2-pytest)
14439 ("python2-pytest-runner" ,python2-pytest-runner)))
14440 (propagated-inputs
14441 `(("python-fonttools" ,python2-fonttools)
14442 ("python-pyclipper" ,python2-pyclipper)
14443 ("python-ufolib" ,python2-ufolib)))
14444 (home-page "https://github.com/typemytype/booleanOperations")
14445 (synopsis "Boolean operations on paths")
14446 (description
14447 "BooleanOperations provides a Python library that enables
14448boolean operations on paths.")
14449 (license license:expat)))
14450
14451(define-public python-tempdir
14452 (package
14453 (name "python-tempdir")
14454 (version "0.7.1")
14455 (source
14456 (origin
14457 (method url-fetch)
14458 (uri (pypi-uri "tempdir" version))
14459 (sha256
14460 (base32
14461 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14462 (build-system python-build-system)
14463 (home-page "https://pypi.org/project/tempdir/")
14464 (arguments
14465 ;; the package has no tests
14466 '(#:tests? #f))
14467 (synopsis "Python library for managing temporary directories")
14468 (description
14469 "This library manages temporary directories that are automatically
14470deleted with all their contents when they are no longer needed. It is
14471particularly convenient for use in tests.")
14472 (license license:expat)))
14473
14474(define-public python2-tempdir
14475 (package-with-python2 python-tempdir))
14476
14477(define-public python-activepapers
14478 (package
14479 (name "python-activepapers")
14480 (version "0.2.2")
14481 (source
14482 (origin
14483 (method url-fetch)
14484 (uri (pypi-uri "ActivePapers.Py" version))
14485 (sha256
14486 (base32
14487 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14488 (build-system python-build-system)
14489 (arguments
14490 `(#:modules ((ice-9 ftw)
14491 (srfi srfi-1)
14492 (guix build utils)
14493 (guix build python-build-system))
14494
14495 #:phases
14496 (modify-phases %standard-phases
14497 (add-after 'unpack 'delete-python2-code
14498 (lambda _
14499 (for-each delete-file
14500 '("lib/activepapers/builtins2.py"
14501 "lib/activepapers/standardlib2.py"
14502 "lib/activepapers/utility2.py"))))
14503 (replace 'check
14504 (lambda _
14505 ;; Deactivate the test cases that download files
14506 (setenv "NO_NETWORK_ACCESS" "1")
14507 ;; For some strange reason, some tests fail if nosetests runs all
14508 ;; test modules in a single execution. They pass if each test
14509 ;; module is run individually.
14510 (for-each (lambda (filename)
14511 (invoke "nosetests"
14512 (string-append "tests/" filename)))
14513 (scandir "tests"
14514 (lambda (filename)
14515 (string-suffix? ".py" filename)))))))))
14516 (native-inputs
14517 `(("python-tempdir" ,python-tempdir)
14518 ("python-nose" ,python-nose)))
14519 (propagated-inputs
14520 `(("python-h5py" ,python-h5py)))
14521 (home-page "http://www.activepapers.org/")
14522 (synopsis "Executable papers for scientific computing")
14523 (description
14524 "ActivePapers is a tool for working with executable papers, which
14525combine data, code, and documentation in single-file packages,
14526suitable for publication as supplementary material or on repositories
14527such as figshare or Zenodo.")
14528 (properties `((python2-variant . ,(delay python2-activepapers))))
14529 (license license:bsd-3)))
14530
14531(define-public python2-activepapers
14532 (let ((base (package-with-python2
14533 (strip-python2-variant python-activepapers))))
14534 (package
14535 (inherit base)
14536 (arguments
14537 (substitute-keyword-arguments (package-arguments base)
14538 ((#:phases phases)
14539 `(modify-phases ,phases
14540 (delete 'delete-python2-code)
14541 (add-after 'unpack 'delete-python3-code
14542 (lambda _
14543 (for-each delete-file
14544 '("lib/activepapers/builtins3.py"
14545 "lib/activepapers/standardlib3.py"
14546 "lib/activepapers/utility3.py")))))))))))
14547
14548(define-public python-semver
14549 (package
14550 (name "python-semver")
14551 (version "2.7.9")
14552 (source
14553 (origin
14554 (method url-fetch)
14555 (uri (pypi-uri "semver" version))
14556 (sha256
14557 (base32
14558 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14559 (build-system python-build-system)
14560 (arguments
14561 `(#:phases
14562 (modify-phases %standard-phases
14563 (add-after 'unpack 'patch-test-requirements
14564 (lambda _
14565 (substitute* "setup.py"
14566 ;; Our Python is new enough.
14567 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14568 #t)))))
14569 (native-inputs
14570 `(("python-tox" ,python-tox)
14571 ("python-virtualenv" ,python-virtualenv)))
14572 (home-page "https://github.com/k-bx/python-semver")
14573 (synopsis "Python helper for Semantic Versioning")
14574 (description "This package provides a Python library for
14575@url{Semantic Versioning, http://semver.org/}.")
14576 (license license:bsd-3)))
14577
14578(define-public python2-semver
14579 (package-with-python2 python-semver))
14580
14581(define-public python-pyro4
14582 (package
14583 (name "python-pyro4")
3ce91d44 14584 (version "4.77")
44d10b1f
RW
14585 (source
14586 (origin
14587 (method url-fetch)
14588 (uri (pypi-uri "Pyro4" version))
14589 (sha256
3ce91d44 14590 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 14591 (build-system python-build-system)
3ce91d44
GL
14592 (arguments
14593 '(#:tests? #f)) ;FIXME: Some tests require network access.
14594 (native-inputs
14595 `(("python-cloudpickle" ,python-cloudpickle)
14596 ("python-dill" ,python-dill)
14597 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
14598 (propagated-inputs
14599 `(("python-serpent" ,python-serpent)))
14600 (home-page "https://pyro4.readthedocs.io")
14601 (synopsis "Distributed object middleware for Python")
14602 (description
14603 "Pyro enables you to build applications in which objects can talk to each
14604other over the network. You can just use normal Python method calls to call
14605objects on other machines, also known as remote procedure calls (RPC).")
14606 (license license:expat)))
14607
14608(define-public python2-pyro
14609 (package
14610 (name "python2-pyro")
14611 (version "3.16")
14612 (source
14613 (origin
14614 (method url-fetch)
14615 (uri (pypi-uri "Pyro" version))
14616 (file-name (string-append "Pyro-" version ".tar.gz"))
14617 (sha256
14618 (base32
14619 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14620 (build-system python-build-system)
14621 (arguments
14622 ;; Pyro is not compatible with Python 3
14623 `(#:python ,python-2
14624 ;; Pyro has no test cases for automatic execution
14625 #:tests? #f))
14626 (home-page "http://pythonhosted.org/Pyro/")
14627 (synopsis "Distributed object manager for Python")
14628 (description "Pyro is a Distributed Object Technology system
14629written in Python that is designed to be easy to use. It resembles
14630Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14631which is a system and language independent Distributed Object Technology
14632and has much more to offer than Pyro or RMI. Pyro 3.x is no
14633longer maintained. New projects should use Pyro4 instead, which
14634is the new Pyro version that is actively developed.")
14635 (license license:expat)))
14636
14637(define-public python2-scientific
14638 (package
14639 (name "python2-scientific")
14640 (version "2.9.4")
14641 (source
14642 (origin
c695f011
KH
14643 (method git-fetch)
14644 (uri (git-reference
14645 (url "https://github.com/khinsen/ScientificPython")
14646 (commit (string-append "rel" version))))
14647 (file-name (git-file-name name version))
44d10b1f
RW
14648 (sha256
14649 (base32
c695f011 14650 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
14651 (build-system python-build-system)
14652 (inputs
14653 `(("netcdf" ,netcdf)))
14654 (propagated-inputs
14655 `(("python-numpy" ,python2-numpy-1.8)
14656 ("python-pyro" ,python2-pyro)))
14657 (arguments
14658 ;; ScientificPython is not compatible with Python 3
14659 `(#:python ,python-2
14660 #:tests? #f ; No test suite
14661 #:phases
14662 (modify-phases %standard-phases
14663 (replace 'build
14664 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14665 (invoke "python" "setup.py" "build"
14666 (string-append "--netcdf_prefix="
14667 (assoc-ref inputs "netcdf"))))))))
c695f011 14668 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
14669 (synopsis "Python modules for scientific computing")
14670 (description "ScientificPython is a collection of Python modules that are
14671useful for scientific computing. Most modules are rather general (Geometry,
14672physical units, automatic derivatives, ...) whereas others are more
14673domain-specific (e.g. netCDF and PDB support). The library is currently
14674not actively maintained and works only with Python 2 and NumPy < 1.9.")
14675 (license license:cecill-c)))
14676
14677(define-public python2-mmtk
14678 (package
14679 (name "python2-mmtk")
fe9b72c5 14680 (version "2.7.12")
44d10b1f
RW
14681 (source
14682 (origin
fe9b72c5
KH
14683 (method git-fetch)
14684 (uri (git-reference
14685 (url "https://github.com/khinsen/MMTK")
14686 (commit (string-append "rel" version))))
14687 (file-name (git-file-name name version))
44d10b1f
RW
14688 (sha256
14689 (base32
fe9b72c5 14690 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
14691 (build-system python-build-system)
14692 (native-inputs
14693 `(("netcdf" ,netcdf)))
14694 (propagated-inputs
14695 `(("python-scientific" ,python2-scientific)
14696 ("python-tkinter" ,python-2 "tk")))
14697 (arguments
14698 `(#:python ,python-2
14699 #:tests? #f
14700 #:phases
14701 (modify-phases %standard-phases
14702 (add-before 'build 'includes-from-scientific
14703 (lambda* (#:key inputs #:allow-other-keys)
14704 (mkdir-p "Include/Scientific")
14705 (copy-recursively
14706 (string-append
14707 (assoc-ref inputs "python-scientific")
14708 "/include/python2.7/Scientific")
14709 "Include/Scientific"))))))
14710 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14711 (synopsis "Python library for molecular simulation")
14712 (description "MMTK is a library for molecular simulations with an emphasis
14713on biomolecules. It provides widely used methods such as Molecular Dynamics
14714and normal mode analysis, but also basic routines for implementing new methods
14715for simulation and analysis. The library is currently not actively maintained
14716and works only with Python 2 and NumPy < 1.9.")
14717 (license license:cecill-c)))
14718
14719(define-public python-phonenumbers
14720 (package
14721 (name "python-phonenumbers")
14722 (version "8.9.1")
14723 (source
14724 (origin
14725 (method url-fetch)
14726 (uri (pypi-uri "phonenumbers" version))
14727 (sha256
14728 (base32
14729 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14730 (build-system python-build-system)
14731 (home-page
14732 "https://github.com/daviddrysdale/python-phonenumbers")
14733 (synopsis
14734 "Python library for dealing with international phone numbers")
14735 (description
14736 "This package provides a Python port of Google's libphonenumber library.")
14737 (license license:asl2.0)))
14738
14739(define-public python2-phonenumbers
14740 (package-with-python2 python-phonenumbers))
14741
14742(define-public python-send2trash
14743 (package
14744 (name "python-send2trash")
d9b0216b 14745 (version "1.5.0")
44d10b1f 14746 (source
d9b0216b 14747 (origin (method git-fetch)
44d10b1f 14748 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14749 (uri (git-reference
14750 (url "https://github.com/hsoft/send2trash.git")
14751 (commit version)))
14752 (file-name (git-file-name name version))
44d10b1f
RW
14753 (sha256
14754 (base32
d9b0216b 14755 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14756 (build-system python-build-system)
14757 (arguments
14758 '(#:phases
14759 (modify-phases %standard-phases
14760 (add-before 'check 'pre-check
14761 (lambda _
14762 (mkdir-p "/tmp/foo")
14763 (setenv "HOME" "/tmp/foo")
14764 #t)))))
14765 (home-page "https://github.com/hsoft/send2trash")
14766 (synopsis "Send files to the user's @file{~/Trash} directory")
14767 (description "This package provides a Python library to send files to the
14768user's @file{~/Trash} directory.")
20b3fde7 14769 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14770 (license license:bsd-3)))
14771
14772(define-public python2-send2trash
14773 (package
f32164ab 14774 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14775 (arguments
14776 (substitute-keyword-arguments (package-arguments python-send2trash)
14777 ((#:phases phases)
14778 `(modify-phases ,phases
14779 (add-before 'check 'setenv
14780 (lambda _
14781 (setenv "PYTHONPATH"
14782 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14783 #t))))))))
44d10b1f
RW
14784
14785(define-public python-yapf
14786 (package
14787 (name "python-yapf")
14788 (version "0.24.0")
14789 (source
14790 (origin
14791 (method url-fetch)
14792 (uri (pypi-uri "yapf" version))
14793 (sha256
14794 (base32
14795 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14796 (build-system python-build-system)
14797 (home-page "https://github.com/google/yapf")
14798 (synopsis "Formatter for Python code")
14799 (description "YAPF is a formatter for Python code. It's based off of
14800@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14801takes the code and reformats it to the best formatting that conforms to the
14802style guide, even if the original code didn't violate the style guide.")
14803 (license license:asl2.0)))
14804
14805(define-public python2-yapf
14806 (package-with-python2 python-yapf))
14807
14808(define-public python-gyp
14809 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14810 (revision "0"))
14811 (package
14812 (name "python-gyp")
14813 ;; Google does not release versions,
14814 ;; based on second most recent commit date.
14815 (version (git-version "0.0.0" revision commit))
14816 (source
14817 (origin
14818 ;; Google does not release tarballs,
14819 ;; git checkout is needed.
14820 (method git-fetch)
14821 (uri (git-reference
14822 (url "https://chromium.googlesource.com/external/gyp")
14823 (commit commit)))
14824 (file-name (git-file-name name version))
14825 (sha256
14826 (base32
14827 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14828 (build-system python-build-system)
14829 (home-page "https://gyp.gsrc.io/")
14830 (synopsis "GYP is a Meta-Build system")
14831 (description
14832 "GYP builds build systems for large, cross platform applications.
14833It can be used to generate XCode projects, Visual Studio projects, Ninja build
14834files, and Makefiles.")
14835 (license license:bsd-3))))
14836
14837(define-public python2-gyp
14838 (package-with-python2 python-gyp))
14839
14840(define-public python-whatever
14841 (package
14842 (name "python-whatever")
97610a66 14843 (version "0.6")
44d10b1f
RW
14844 (source
14845 (origin
14846 (method url-fetch)
14847 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14848 ".tar.gz"))
14849 (sha256
97610a66 14850 (base32 "1rchg9hrlvw4sn20lq1zspczr4x1pv57c02gv73igiqx1hqpy2nc"))
44d10b1f
RW
14851 (file-name (string-append name "-" version ".tar.gz"))))
14852 (build-system python-build-system)
14853 (arguments
14854 `(#:phases
14855 (modify-phases %standard-phases
14856 (replace 'check
14857 (lambda _
14858 (invoke "py.test"))))))
14859 (native-inputs
14860 `(("python-pytest" ,python-pytest)))
14861 (home-page "http://github.com/Suor/whatever")
14862 (synopsis "Make anonymous functions by partial application of operators")
14863 (description "@code{whatever} provides an easy way to make anonymous
14864functions by partial application of operators.")
14865 (license license:bsd-3)))
14866
14867(define-public python2-whatever
14868 (package-with-python2 python-whatever))
14869
14870(define-public python-funcy
14871 (package
14872 (name "python-funcy")
9e396ab8 14873 (version "1.11")
44d10b1f
RW
14874 (source
14875 (origin
a85c6027
TGR
14876 (method git-fetch)
14877 (uri (git-reference
14878 (url "https://github.com/Suor/funcy.git")
14879 (commit version)))
44d10b1f 14880 (sha256
a85c6027
TGR
14881 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14882 (file-name (git-file-name name version))))
44d10b1f
RW
14883 (build-system python-build-system)
14884 (arguments
14885 `(#:phases
14886 (modify-phases %standard-phases
14887 (replace 'check
14888 (lambda _
14889 (invoke "py.test"))))))
14890 (native-inputs
14891 `(("python-pytest" ,python-pytest)
14892 ("python-whatever" ,python-whatever)))
14893 (home-page "http://github.com/Suor/funcy")
14894 (synopsis "Functional tools")
14895 (description "@code{funcy} is a library that provides functional tools.
14896Examples are:
14897@enumerate
14898@item merge - Merges collections of the same type
14899@item walk - Type-preserving map
14900@item select - Selects a part of a collection
14901@item take - Takes the first n items of a collection
14902@item first - Takes the first item of a collection
14903@item remove - Predicated-removes items of a collection
14904@item concat - Concatenates two collections
14905@item flatten - Flattens a collection with subcollections
14906@item distinct - Returns only distinct items
14907@item split - Predicated-splits a collection
14908@item split_at - Splits a collection at a given item
14909@item group_by - Groups items by group
14910@item pairwise - Pairs off adjacent items
14911@item partial - Partially-applies a function
14912@item curry - Curries a function
14913@item compose - Composes functions
14914@item complement - Complements a predicate
14915@item all_fn - \"all\" with predicate
14916@end enumerate")
14917 (license license:bsd-3)))
14918
14919(define-public python2-funcy
14920 (package-with-python2 python-funcy))
14921
14922(define-public python-isoweek
14923 (package
14924 (name "python-isoweek")
14925 (version "1.3.3")
14926 (source
14927 (origin
14928 (method url-fetch)
14929 (uri (pypi-uri "isoweek" version))
14930 (sha256
14931 (base32
14932 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14933 (build-system python-build-system)
14934 (home-page "https://github.com/gisle/isoweek")
14935 (synopsis "Objects representing a week")
14936 (description "The @code{isoweek} module provide the class Week that
14937implements the week definition of ISO 8601. This standard also defines
14938a notation for identifying weeks; yyyyWww (where the W is a literal).
14939Week instances stringify to this form.")
14940 (license license:bsd-3)))
14941
14942(define-public python2-isoweek
14943 (package-with-python2 python-isoweek))
14944
14945(define-public python-tokenize-rt
14946 (package
14947 (name "python-tokenize-rt")
14948 (version "2.0.1")
14949 (source
14950 (origin
14951 (method url-fetch)
14952 (uri (pypi-uri "tokenize-rt" version))
14953 (sha256
14954 (base32
14955 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14956 (build-system python-build-system)
14957 (home-page "https://github.com/asottile/tokenize-rt")
14958 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14959 (description
14960 "This Python library is a wrapper around @code{tokenize} from the Python
14961standard library. It provides two additional tokens @code{ESCAPED_NL} and
14962@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14963and @code{tokens_to_src} to roundtrip.")
14964 (license license:expat)))
14965
14966(define-public python-future-fstrings
14967 (package
14968 (name "python-future-fstrings")
14969 (version "0.4.1")
14970 (source
14971 (origin
14972 (method url-fetch)
14973 (uri (pypi-uri "future_fstrings" version))
14974 (sha256
14975 (base32
14976 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14977 (build-system python-build-system)
14978 (propagated-inputs
14979 `(("python-tokenize-rt" ,python-tokenize-rt)))
14980 (home-page "https://github.com/asottile/future-fstrings")
14981 (synopsis "Backport of fstrings to Python < 3.6")
14982 (description
14983 "This package provides a UTF-8 compatible encoding
14984@code{future_fstrings}, which performs source manipulation. It decodes the
14985source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14986@code{f} strings.")
14987 (license license:expat)))
14988
dae2eb1c
MC
14989(define-public python-typed-ast
14990 (package
14991 (name "python-typed-ast")
bae89583 14992 (version "1.4.0")
dae2eb1c
MC
14993 (source
14994 (origin
bae89583
MO
14995 (method git-fetch)
14996 (uri (git-reference
14997 (url "https://github.com/python/typed_ast.git")
14998 (commit version)))
dae2eb1c 14999 (sha256
bae89583
MO
15000 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
15001 (file-name (git-file-name name version))))
dae2eb1c
MC
15002 (build-system python-build-system)
15003 (arguments
15004 `(#:modules ((guix build utils)
15005 (guix build python-build-system)
15006 (ice-9 ftw)
15007 (srfi srfi-1)
15008 (srfi srfi-26))
15009 #:phases
15010 (modify-phases %standard-phases
15011 (replace 'check
15012 (lambda _
15013 (let ((cwd (getcwd)))
15014 (setenv "PYTHONPATH"
15015 (string-append cwd "/build/"
15016 (find (cut string-prefix? "lib" <>)
15017 (scandir (string-append cwd "/build")))
15018 ":"
15019 (getenv "PYTHONPATH"))))
15020 (invoke "pytest")
15021 #t)))))
15022 (native-inputs `(("python-pytest" ,python-pytest)))
15023 (home-page "https://github.com/python/typed_ast")
15024 (synopsis "Fork of Python @code{ast} modules with type comment support")
15025 (description "This package provides a parser similar to the standard
15026@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
15027include PEP 484 type comments and are independent of the version of Python
15028under which they are run. The @code{typed_ast} parsers produce the standard
15029Python AST (plus type comments), and are both fast and correct, as they are
15030based on the CPython 2.7 and 3.7 parsers.")
15031 ;; See the file "LICENSE" for the details.
15032 (license (list license:psfl
15033 license:asl2.0
15034 license:expat)))) ;ast27/Parser/spark.py
15035
44d10b1f
RW
15036(define-public python-typing
15037 (package
15038 (name "python-typing")
15039 (version "3.6.6")
15040 (source
15041 (origin
15042 (method url-fetch)
15043 (uri (pypi-uri "typing" version))
15044 (sha256
15045 (base32
15046 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
15047 (build-system python-build-system)
15048 (home-page "https://docs.python.org/3/library/typing.html")
15049 (synopsis "Type hints for Python")
15050 (description "This is a backport of the standard library @code{typing}
15051module to Python versions older than 3.5. Typing defines a standard notation
15052for Python function and variable type annotations. The notation can be used
15053for documenting code in a concise, standard format, and it has been designed
15054to also be used by static and runtime type checkers, static analyzers, IDEs
15055and other tools.")
15056 (license license:psfl)))
15057
15058(define-public python2-typing
15059 (package-with-python2 python-typing))
15060
f89d443b
VC
15061(define-public python-typing-extensions
15062 (package
15063 (name "python-typing-extensions")
15064 (version "3.7.2")
15065 (source
15066 (origin
15067 (method url-fetch)
15068 (uri (pypi-uri "typing_extensions" version))
15069 (sha256
15070 (base32
15071 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
15072 (build-system python-build-system)
15073 (home-page
15074 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15075 (synopsis "Experimental type hints for Python")
15076 (description
15077 "The typing_extensions module contains additional @code{typing} hints not
15078yet present in the of the @code{typing} standard library.
15079Included are implementations of:
15080@enumerate
15081@item ClassVar
15082@item ContextManager
15083@item Counter
15084@item DefaultDict
15085@item Deque
15086@item NewType
15087@item NoReturn
15088@item overload
15089@item Protocol
15090@item runtime
15091@item Text
15092@item Type
15093@item TYPE_CHECKING
15094@item AsyncGenerator
15095@end enumerate\n")
15096 (license license:psfl)))
15097
44d10b1f
RW
15098(define-public bpython
15099 (package
15100 (name "bpython")
4de93b2f 15101 (version "0.18")
44d10b1f
RW
15102 (source
15103 (origin
15104 (method url-fetch)
15105 (uri (pypi-uri "bpython" version))
15106 (sha256
4de93b2f 15107 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
15108 (build-system python-build-system)
15109 (arguments
15110 `(#:phases
15111 (modify-phases %standard-phases
15112 (add-after 'unpack 'remove-failing-test
15113 (lambda _
15114 ;; Remove failing test. FIXME: make it pass
15115 (delete-file "bpython/test/test_args.py")
15116 #t))
15117 (add-after 'wrap 'add-aliases
15118 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15119 (lambda* (#:key outputs #:allow-other-keys)
15120 (let ((out (assoc-ref outputs "out")))
15121 (for-each
15122 (lambda (old new)
15123 (symlink old (string-append out "/bin/" new)))
15124 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15125 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15126 #t)))))
15127 (propagated-inputs
15128 `(("python-pygments" ,python-pygments)
15129 ("python-requests" ,python-requests)
4de93b2f 15130 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
15131 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15132 ("python-greenlet" ,python-greenlet)
4de93b2f 15133 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
15134 ("python-six" ,python-six)))
15135 (native-inputs
15136 `(("python-sphinx" ,python-sphinx)
15137 ("python-mock" ,python-mock)))
15138 (home-page "https://bpython-interpreter.org/")
15139 (synopsis "Fancy interface to the Python interpreter")
15140 (description "Bpython is a fancy interface to the Python
15141interpreter. bpython's main features are
15142
15143@enumerate
15144@item in-line syntax highlighting,
15145@item readline-like autocomplete with suggestions displayed as you type,
15146@item expected parameter list for any Python function,
15147@item \"rewind\" function to pop the last line of code from memory and
15148 re-evaluate,
15149@item send the code you've entered off to a pastebin,
15150@item save the code you've entered to a file, and
15151@item auto-indentation.
15152@end enumerate")
15153 (license license:expat)))
15154
15155(define-public bpython2
15156 (let ((base (package-with-python2
15157 (strip-python2-variant bpython))))
15158 (package (inherit base)
15159 (name "bpython2")
15160 (arguments
15161 `(#:python ,python-2
15162 #:phases
15163 (modify-phases %standard-phases
15164 (add-after 'unpack 'remove-failing-test
15165 (lambda _
15166 ;; Remove failing test. FIXME: make it pass
15167 (delete-file "bpython/test/test_args.py")
15168 ;; Disable failing test-cases (renaming inhibits they are
15169 ;; discovered)
15170 (substitute* "bpython/test/test_curtsies_repl.py"
15171 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15172 (string-append a "xxx_off_" b))
15173 (("^(\\s*def )(test_complex\\W)" _ a b)
15174 (string-append a "xxx_off_" b)))
15175 #t))
15176 (add-before 'build 'rename-scripts
15177 ;; rename the scripts to bypthon2, bpdb2, etc.
15178 (lambda _
15179 (substitute* "setup.py"
15180 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15181 (string-append name "2" rest "\n"))
15182 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15183 (string-append name "2" (or sub "") rest "\n")))
15184 #t))))))))
15185
15186(define-public python-pyinotify
15187 (package
15188 (name "python-pyinotify")
15189 (version "0.9.6")
15190 (source (origin
15191 (method url-fetch)
15192 (uri (pypi-uri "pyinotify" version))
15193 (sha256
15194 (base32
15195 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15196 (build-system python-build-system)
15197 (arguments `(#:tests? #f)) ;no tests
15198 (home-page "https://github.com/seb-m/pyinotify")
15199 (synopsis "Python library for monitoring inotify events")
15200 (description
15201 "@code{pyinotify} provides a Python interface for monitoring
15202file system events on Linux.")
15203 (license license:expat)))
15204
15205(define-public python2-pyinotify
15206 (package-with-python2 python-pyinotify))
15207
15208;; Ada parser uses this version.
15209(define-public python2-quex-0.67.3
15210 (package
15211 (name "python2-quex")
15212 (version "0.67.3")
15213 (source
15214 (origin
15215 (method url-fetch)
15216 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15217 (version-major+minor version)
15218 "/quex-" version ".zip"))
15219 (sha256
15220 (base32
15221 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15222 (build-system python-build-system)
15223 (native-inputs
15224 `(("unzip" ,unzip)))
15225 (arguments
15226 `(#:python ,python-2
15227 #:tests? #f
15228 #:phases
15229 (modify-phases %standard-phases
15230 (delete 'configure)
15231 (delete 'build)
15232 (replace 'install
15233 (lambda* (#:key outputs #:allow-other-keys)
15234 (let* ((out (assoc-ref outputs "out"))
15235 (share/quex (string-append out "/share/quex"))
15236 (bin (string-append out "/bin")))
15237 (copy-recursively "." share/quex)
15238 (mkdir-p bin)
15239 (symlink (string-append share/quex "/quex-exe.py")
15240 (string-append bin "/quex"))
15241 #t))))))
15242 (native-search-paths
15243 (list (search-path-specification
15244 (variable "QUEX_PATH")
15245 (files '("share/quex")))))
15246 (home-page "http://quex.sourceforge.net/")
15247 (synopsis "Lexical analyzer generator in Python")
15248 (description "@code{quex} is a lexical analyzer generator in Python.")
15249 (license license:lgpl2.1+))) ; Non-military
15250
15251(define-public python2-quex
15252 (package (inherit python2-quex-0.67.3)
15253 (name "python2-quex")
15254 (version "0.68.1")
15255 (source
15256 (origin
15257 (method url-fetch)
15258 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15259 (sha256
15260 (base32
15261 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15262 (file-name (string-append name "-" version ".tar.gz"))))))
15263
15264(define-public python-more-itertools
15265 (package
15266 (name "python-more-itertools")
1b066827 15267 (version "7.1.0")
44d10b1f
RW
15268 (source
15269 (origin
15270 (method url-fetch)
15271 (uri (pypi-uri "more-itertools" version))
15272 (sha256
15273 (base32
1b066827 15274 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15275 (build-system python-build-system)
44d10b1f
RW
15276 (home-page "https://github.com/erikrose/more-itertools")
15277 (synopsis "More routines for operating on iterables, beyond itertools")
15278 (description "Python's built-in @code{itertools} module implements a
15279number of iterator building blocks inspired by constructs from APL, Haskell,
15280and SML. @code{more-itertools} includes additional building blocks for
15281working with iterables.")
47f66348 15282 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15283 (license license:expat)))
15284
47f66348 15285;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15286(define-public python2-more-itertools
47f66348
MB
15287 (package
15288 (inherit python-more-itertools)
15289 (name "python2-more-itertools")
15290 (version "5.0.0")
15291 (source (origin
15292 (method url-fetch)
15293 (uri (pypi-uri "more-itertools" version))
15294 (sha256
15295 (base32
15296 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15297 (arguments
15298 `(#:python ,python2-minimal))
15299 (propagated-inputs
15300 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15301
15302(define-public python-latexcodec
15303 (package
15304 (name "python-latexcodec")
f3415ba5 15305 (version "1.0.7")
44d10b1f
RW
15306 (source
15307 (origin
15308 (method url-fetch)
15309 (uri (pypi-uri "latexcodec" version))
15310 (sha256
f3415ba5 15311 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15312 (build-system python-build-system)
15313 (inputs
15314 `(("python-six" ,python-six)))
15315 (home-page "https://readthedocs.org/projects/latexcodec/")
15316 (synopsis "Work with LaTeX code in Python")
15317 (description "Lexer and codec to work with LaTeX code in Python.")
15318 (license license:expat)))
15319
15320(define-public python-pybtex
15321 (package
15322 (name "python-pybtex")
9441a9c1 15323 (version "0.22.2")
44d10b1f
RW
15324 (source
15325 (origin
15326 (method url-fetch)
15327 (uri (pypi-uri "pybtex" version))
15328 (sha256
9441a9c1 15329 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15330 (build-system python-build-system)
15331 (native-inputs
15332 `(("python-nose" ,python-nose)))
15333 (inputs
15334 `(("python-latexcodec" ,python-latexcodec)
15335 ("python-pyyaml" ,python-pyyaml)
15336 ("python-six" ,python-six)))
15337 (arguments
15338 `(#:test-target "nosetests"))
15339 (home-page "https://pybtex.org/")
15340 (synopsis "BibTeX-compatible bibliography processor")
15341 (description "Pybtex is a BibTeX-compatible bibliography processor written
15342in Python. You can simply type pybtex instead of bibtex.")
15343 (license license:expat)))
15344
15345(define-public python-onetimepass
15346 (package
15347 (name "python-onetimepass")
15348 (version "1.0.1")
15349 (source
15350 (origin
15351 (method url-fetch)
15352 (uri (pypi-uri "onetimepass" version))
15353 (sha256
15354 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15355 (build-system python-build-system)
15356 (propagated-inputs `(("python-six" ,python-six)))
15357 (home-page "https://github.com/tadeck/onetimepass/")
15358 (synopsis "One-time password library")
15359 (description "Python one-time password library for HMAC-based (HOTP) and
15360time-based (TOTP) passwords.")
15361 (license license:expat)))
15362
15363(define-public python-parso
15364 (package
15365 (name "python-parso")
1475094a 15366 (version "0.5.1")
44d10b1f
RW
15367 (source
15368 (origin
15369 (method url-fetch)
15370 (uri (pypi-uri "parso" version))
15371 (sha256
15372 (base32
1475094a 15373 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
44d10b1f
RW
15374 (native-inputs
15375 `(("python-pytest" ,python-pytest)))
15376 (build-system python-build-system)
4eb97c25
MC
15377 (arguments
15378 `(#:phases (modify-phases %standard-phases
15379 (replace 'check
15380 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15381 (home-page "https://github.com/davidhalter/parso")
15382 (synopsis "Python Parser")
15383 (description "Parso is a Python parser that supports error recovery and
15384round-trip parsing for different Python versions (in multiple Python versions).
15385Parso is also able to list multiple syntax errors in your Python file.")
15386 (license license:expat)))
15387
15388(define-public python2-parso
15389 (package-with-python2 python-parso))
15390
15391(define-public python-async-generator
15392 (package
15393 (name "python-async-generator")
94fcbf8d 15394 (version "1.10")
44d10b1f
RW
15395 (source
15396 (origin
15397 (method url-fetch)
15398 (uri (pypi-uri "async_generator" version))
15399 (sha256
15400 (base32
94fcbf8d 15401 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15402 (build-system python-build-system)
15403 (native-inputs
15404 `(("python-pytest" ,python-pytest)))
15405 (home-page "https://github.com/python-trio/async_generator")
15406 (synopsis "Async generators and context managers for Python 3.5+")
15407 (description "@code{async_generator} back-ports Python 3.6's native async
15408generators and Python 3.7's context managers into Python 3.5.")
15409 ;; Dual licensed.
15410 (license (list license:expat license:asl2.0))))
15411
15412(define-public python-async-timeout
15413 (package
15414 (name "python-async-timeout")
15415 (version "3.0.1")
15416 (source
15417 (origin
15418 (method url-fetch)
15419 (uri (pypi-uri "async-timeout" version))
15420 (sha256
15421 (base32
15422 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15423 (build-system python-build-system)
15424 (home-page "https://github.com/aio-libs/async_timeout/")
15425 (synopsis "Timeout context manager for asyncio programs")
15426 (description "@code{async-timeout} provides a timeout timeout context
15427manager compatible with @code{asyncio}.")
15428 (license license:asl2.0)))
15429
15430(define-public python-glob2
15431 (package
15432 (name "python-glob2")
4df49d19 15433 (version "0.7")
8fa2bcc7
TGR
15434 (source
15435 (origin
15436 (method git-fetch)
15437 (uri (git-reference
15438 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15439 (commit (string-append "v" version))))
8fa2bcc7
TGR
15440 (file-name (git-file-name name version))
15441 (sha256
4df49d19 15442 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15443 (build-system python-build-system)
15444 (home-page "https://github.com/miracle2k/python-glob2/")
15445 (synopsis "Extended Version of the python buildin glob module")
15446 (description "This is an extended version of the Python
15447@url{http://docs.python.org/library/glob.html, built-in glob module} which
15448adds:
15449
15450@itemize
15451@item The ability to capture the text matched by glob patterns, and return
15452those matches alongside the file names.
15453@item A recursive @code{**} globbing syntax, akin for example to the
15454@code{globstar} option of Bash.
15455@item The ability to replace the file system functions used, in order to glob
15456on virtual file systems.
15457@item Compatible with Python 2 and Python 3 (tested with 3.3).
15458@end itemize
15459
15460Glob2 currently based on the glob code from Python 3.3.1.")
15461 (license license:bsd-2)))
15462
15463(define-public python2-glob2
15464 (package-with-python2 python-glob2))
15465
15466(define-public python-gipc
15467 (package
15468 (name "python-gipc")
15469 (version "0.6.0")
15470 (source
15471 (origin
15472 (method url-fetch)
15473 (uri (pypi-uri "gipc" version ".zip"))
15474 (sha256
15475 (base32
15476 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15477 (build-system python-build-system)
15478 (native-inputs
15479 `(("unzip" ,unzip)))
15480 (propagated-inputs
15481 `(("python-gevent" ,python-gevent)))
15482 (home-page "http://gehrcke.de/gipc")
15483 (synopsis "Child process management in the context of gevent")
15484 (description "Usage of Python's multiprocessing package in a
15485gevent-powered application may raise problems. With @code{gipc},
15486process-based child processes can safely be created anywhere within a
15487gevent-powered application.")
15488 (license license:expat)))
15489
15490(define-public python2-gipc
15491 (package-with-python2 python-gipc))
15492
15493(define-public python-fusepy
15494 (package
15495 (name "python-fusepy")
15496 (version "2.0.4")
15497 (source
15498 (origin
15499 (method url-fetch)
15500 (uri (pypi-uri "fusepy" version))
15501 (sha256
15502 (base32
15503 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15504 (build-system python-build-system)
15505 (arguments
15506 `(#:phases
15507 (modify-phases %standard-phases
15508 (add-before 'build 'set-library-file-name
15509 (lambda* (#:key inputs #:allow-other-keys)
15510 (let ((fuse (assoc-ref inputs "fuse")))
15511 (substitute* "fuse.py"
15512 (("find_library\\('fuse'\\)")
15513 (string-append "'" fuse "/lib/libfuse.so'")))
15514 #t))))))
15515 (propagated-inputs
15516 `(("fuse" ,fuse)))
15517 (home-page "https://github.com/fusepy/fusepy")
15518 (synopsis "Simple ctypes bindings for FUSE")
15519 (description "Python module that provides a simple interface to FUSE and
15520MacFUSE. The binding is created using the standard @code{ctypes} library.")
15521 (license license:isc)))
15522
15523(define-public python2-fusepy
15524 (package-with-python2 python-fusepy))
15525
15526(define-public python2-gdrivefs
15527 (package
15528 (name "python2-gdrivefs")
15529 (version "0.14.9")
15530 (source
15531 (origin
15532 (method url-fetch)
15533 (uri (pypi-uri "gdrivefs" version))
15534 (sha256
15535 (base32
15536 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15537 (build-system python-build-system)
15538 (arguments
15539 `(#:python ,python-2
15540 #:phases
15541 (modify-phases %standard-phases
15542 (add-before 'build 'patch-setup-py
15543 (lambda _
15544 ;; Update requirements from dependency==version
15545 ;; to dependency>=version
15546 (substitute* "gdrivefs/resources/requirements.txt"
15547 (("==") ">="))
15548 #t)))))
15549 (native-inputs
15550 `(("python2-gipc" ,python2-gipc)
15551 ("python2-gevent" ,python2-gevent)
15552 ("python2-greenlet" ,python2-greenlet)
15553 ("python2-httplib2" ,python2-httplib2)
15554 ("python2-uritemplate" ,python2-uritemplate)
15555 ("python2-oauth2client" ,python2-oauth2client)
15556 ("python2-six" ,python2-six)))
15557 (propagated-inputs
15558 `(("python2-dateutil" ,python2-dateutil)
15559 ("python2-fusepy" ,python2-fusepy)
15560 ("python2-google-api-client" ,python2-google-api-client)))
15561 (home-page "https://github.com/dsoprea/GDriveFS")
15562 (synopsis "Mount Google Drive as a local file system")
15563 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15564under Python 2.7.")
15565 (license license:gpl2)))
15566
15567(define-public pybind11
15568 (package
15569 (name "pybind11")
d478cc04 15570 (version "2.3.0")
44d10b1f
RW
15571 (source (origin
15572 (method git-fetch)
15573 (uri (git-reference
15574 (url "https://github.com/pybind/pybind11.git")
15575 (commit (string-append "v" version))))
15576 (sha256
15577 (base32
d478cc04 15578 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
44d10b1f
RW
15579 (file-name (git-file-name name version))))
15580 (build-system cmake-build-system)
15581 (native-inputs
15582 `(("python" ,python)
15583 ("python-pytest" ,python-pytest)))
15584 (arguments
15585 `(#:test-target "check"))
15586 (home-page "https://github.com/pybind/pybind11/")
15587 (synopsis "Seamless operability between C++11 and Python")
15588 (description "pybind11 is a lightweight header-only library that exposes
15589C++ types in Python and vice versa, mainly to create Python bindings of
15590existing C++ code. Its goals and syntax are similar to the excellent
15591Boost.Python library by David Abrahams: to minimize boilerplate code in
15592traditional extension modules by inferring type information using compile-time
15593introspection.")
15594 (license license:expat)))
15595
15596(define-public python-fasteners
15597 (package
15598 (name "python-fasteners")
15599 (version "0.14.1")
15600 (source
15601 (origin
15602 (method url-fetch)
15603 (uri (pypi-uri "fasteners" version))
15604 (sha256
15605 (base32
15606 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15607 (build-system python-build-system)
15608 (propagated-inputs
15609 `(("python-monotonic" ,python-monotonic)
15610 ("python-six" ,python-six)
15611 ("python-testtools" ,python-testtools)))
15612 (home-page "https://github.com/harlowja/fasteners")
15613 (synopsis "Python package that provides useful locks")
15614 (description
15615 "This package provides a Python program that provides following locks:
15616
15617@itemize
15618@item Locking decorator
15619@item Reader-writer locks
15620@item Inter-process locks
15621@item Generic helpers
15622@end itemize\n")
15623 (properties `((python2-variant . ,(delay python2-fasteners))))
15624 (license license:asl2.0)))
15625
15626(define-public python2-fasteners
15627 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15628 (package
15629 (inherit base)
15630 (propagated-inputs
15631 `(("python2-futures" ,python2-futures)
15632 ,@(package-propagated-inputs base))))))
15633
15634(define-public python-requests-file
15635 (package
15636 (name "python-requests-file")
15637 (version "1.4.3")
15638 (source
15639 (origin
15640 (method url-fetch)
15641 (uri (pypi-uri "requests-file" version))
15642 (sha256
15643 (base32
15644 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15645 (build-system python-build-system)
15646 (propagated-inputs
15647 `(("python-requests" ,python-requests)
15648 ("python-six" ,python-six)))
15649 (home-page
15650 "https://github.com/dashea/requests-file")
15651 (synopsis "File transport adapter for Requests")
15652 (description
15653 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15654library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15655 (license license:asl2.0)))
15656
15657(define-public python2-requests-file
15658 (package-with-python2 python-requests-file))
15659
15660(define-public python-tldextract
15661 (package
15662 (name "python-tldextract")
15663 (version "2.2.0")
15664 (source
15665 (origin
15666 (method url-fetch)
15667 (uri (pypi-uri "tldextract" version))
15668 (sha256
15669 (base32
15670 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15671 (build-system python-build-system)
15672 (native-inputs
15673 `(("python-pytest" ,python-pytest)
15674 ("python-responses" ,python-responses)))
15675 (propagated-inputs
15676 `(("python-idna" ,python-idna)
15677 ("python-requests" ,python-requests)
15678 ("python-requests-file" ,python-requests-file)))
15679 (home-page
15680 "https://github.com/john-kurkowski/tldextract")
15681 (synopsis
15682 "Separate the TLD from the registered domain and subdomains of a URL")
15683 (description
15684 "TLDExtract accurately separates the TLD from the registered domain and
15685subdomains of a URL, using the Public Suffix List. By default, this includes
15686the public ICANN TLDs and their exceptions. It can optionally support the
15687Public Suffix List's private domains as well.")
15688 (license license:bsd-3)))
15689
15690(define-public python2-tldextract
15691 (package-with-python2 python-tldextract))
15692
15693(define-public python-pynamecheap
15694 (package
15695 (name "python-pynamecheap")
15696 (version "0.0.3")
15697 (source
15698 (origin
15699 (method url-fetch)
15700 (uri (pypi-uri "PyNamecheap" version))
15701 (sha256
15702 (base32
15703 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15704 (build-system python-build-system)
15705 (propagated-inputs
15706 `(("python-requests" ,python-requests)))
15707 (home-page
15708 "https://github.com/Bemmu/PyNamecheap")
15709 (synopsis
15710 "Namecheap API client in Python")
15711 (description
15712 "PyNamecheap is a Namecheap API client in Python.")
15713 (license license:expat)))
15714
15715(define-public python2-pynamecheap
15716 (package-with-python2 python-pynamecheap))
15717
15718(define-public python-dns-lexicon
15719 (package
15720 (name "python-dns-lexicon")
15721 (version "2.4.0")
15722 (source
15723 (origin
15724 (method url-fetch)
15725 (uri (pypi-uri "dns-lexicon" version))
15726 (sha256
15727 (base32
15728 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15729 (build-system python-build-system)
15730 (arguments
15731 `(#:tests? #f)) ;requires internet access
15732 (propagated-inputs
15733 `(("python-future" ,python-future)
15734 ("python-pynamecheap" ,python-pynamecheap)
15735 ("python-requests" ,python-requests)
15736 ("python-tldextract" ,python-tldextract)
15737 ("python-urllib3" ,python-urllib3)))
15738 (home-page "https://github.com/AnalogJ/lexicon")
15739 (synopsis
15740 "Manipulate DNS records on various DNS providers")
15741 (description
15742 "Lexicon provides a way to manipulate DNS records on multiple DNS
15743providers in a standardized way. It has a CLI but it can also be used as a
15744Python library. It was designed to be used in automation, specifically with
15745Let's Encrypt.")
15746 (license license:expat)))
15747
15748(define-public python2-dns-lexicon
15749 (package-with-python2 python-dns-lexicon))
15750
15751(define-public python-commandlines
15752 (package
15753 (name "python-commandlines")
15754 (version "0.4.1")
15755 (source
15756 (origin
15757 (method url-fetch)
15758 (uri (pypi-uri "commandlines" version))
15759 (sha256
15760 (base32
15761 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15762 (build-system python-build-system)
15763 (home-page "https://github.com/chrissimpkins/commandlines")
15764 (synopsis "Command line argument to object parsing library")
15765 (description
15766 "@code{Commandlines} is a Python library for command line application
15767development that supports command line argument parsing, command string
15768validation testing and application logic.")
15769 (license license:expat)))
15770
15771;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15772;; python-numba. They have a very unflexible relationship.
15773(define-public python-numba
15774 (package
15775 (name "python-numba")
7757e6d8 15776 (version "0.42.0")
44d10b1f
RW
15777 (source
15778 (origin
15779 (method url-fetch)
15780 (uri (pypi-uri "numba" version))
15781 (sha256
15782 (base32
7757e6d8 15783 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
15784 (build-system python-build-system)
15785 (arguments
15786 `(#:modules ((guix build utils)
15787 (guix build python-build-system)
15788 (ice-9 ftw)
15789 (srfi srfi-1)
15790 (srfi srfi-26))
15791 #:phases
15792 (modify-phases %standard-phases
15793 (add-after 'unpack 'disable-proprietary-features
15794 (lambda _
15795 (setenv "NUMBA_DISABLE_HSA" "1")
15796 (setenv "NUMBA_DISABLE_CUDA" "1")
15797 #t))
15798 (add-after 'unpack 'remove-failing-tests
15799 (lambda _
15800 ;; FIXME: these tests fail for unknown reasons:
15801 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15802 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15803 (substitute* "numba/tests/test_dispatcher.py"
15804 (("def test(_non_writable_pycache)" _ m)
15805 (string-append "def guix_skip" m))
15806 (("def test(_non_creatable_pycache)" _ m)
15807 (string-append "def guix_skip" m))
15808 (("def test(_frozen)" _ m)
15809 (string-append "def guix_skip" m)))
15810
15811 ;; These tests fail because we don't run the tests from the build
15812 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15813 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15814 (substitute* "numba/tests/test_pycc.py"
15815 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15816 (string-append "def guix_skip" m)))
15817 #t))
15818 (replace 'check
15819 (lambda _
15820 (let ((cwd (getcwd)))
15821 (setenv "PYTHONPATH"
15822 (string-append cwd "/build/"
15823 (find (cut string-prefix? "lib" <>)
15824 (scandir (string-append cwd "/build")))
15825 ":"
15826 (getenv "PYTHONPATH")))
15827 ;; Something is wrong with the PYTHONPATH when running the
15828 ;; tests from the build directory, as it complains about not being
15829 ;; able to import certain modules.
15830 (with-directory-excursion "/tmp"
15831 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15832 #t)))))
15833 (propagated-inputs
15834 `(("python-llvmlite" ,python-llvmlite)
15835 ("python-numpy" ,python-numpy)
15836 ("python-singledispatch" ,python-singledispatch)))
15837 ;; Needed for tests.
15838 (inputs
15839 `(("python-jinja2" ,python-jinja2)
15840 ("python-pygments" ,python-pygments)))
15841 (home-page "https://numba.pydata.org")
15842 (synopsis "Compile Python code using LLVM")
15843 (description "Numba gives you the power to speed up your applications with
15844high performance functions written directly in Python. With a few
15845annotations, array-oriented and math-heavy Python code can be just-in-time
15846compiled to native machine instructions, similar in performance to C, C++ and
15847Fortran, without having to switch languages or Python interpreters.
15848
15849Numba works by generating optimized machine code using the LLVM compiler
15850infrastructure at import time, runtime, or statically (using the included pycc
15851tool).")
15852 (license license:bsd-3)))
15853
15854(define-public python-anndata
15855 (package
15856 (name "python-anndata")
8c9372c1 15857 (version "0.6.18")
44d10b1f
RW
15858 (source
15859 (origin
15860 (method url-fetch)
15861 (uri (pypi-uri "anndata" version))
15862 (sha256
15863 (base32
8c9372c1 15864 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15865 (build-system python-build-system)
15866 (propagated-inputs
15867 `(("python-h5py" ,python-h5py)
15868 ("python-natsort" ,python-natsort)
15869 ("python-pandas" ,python-pandas)
15870 ("python-scipy" ,python-scipy)))
15871 (home-page "https://github.com/theislab/anndata")
15872 (synopsis "Annotated data for data analysis pipelines")
15873 (description "Anndata is a package for simple (functional) high-level APIs
15874for data analysis pipelines. In this context, it provides an efficient,
15875scalable way of keeping track of data together with learned annotations and
15876reduces the code overhead typically encountered when using a mostly
15877object-oriented library such as @code{scikit-learn}.")
15878 (license license:bsd-3)))
15879
15880(define-public python-dill
15881 (package
15882 (name "python-dill")
c60b15cc 15883 (version "0.2.9")
44d10b1f
RW
15884 (source
15885 (origin
15886 (method url-fetch)
15887 (uri (pypi-uri "dill" version))
15888 (sha256
c60b15cc 15889 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
44d10b1f 15890 (build-system python-build-system)
c60b15cc 15891 ;; FIXME: The check phase fails with "don't know how to make test from: …".
44d10b1f
RW
15892 (arguments '(#:tests? #f))
15893 (home-page "https://pypi.org/project/dill")
15894 (synopsis "Serialize all of Python")
15895 (description "Dill extends Python's @code{pickle} module for serializing
15896and de-serializing Python objects to the majority of the built-in Python
15897types. Dill provides the user the same interface as the @code{pickle} module,
15898and also includes some additional features. In addition to pickling Python
15899objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15900session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15901interpreter session, close the interpreter, ship the pickled file to another
15902computer, open a new interpreter, unpickle the session and thus continue from
15903the saved state of the original interpreter session.")
15904 (license license:bsd-3)))
15905
15906(define-public python-multiprocess
15907 (package
15908 (name "python-multiprocess")
15909 (version "0.70.6.1")
15910 (source
15911 (origin
15912 (method url-fetch)
15913 (uri (pypi-uri "multiprocess" version))
15914 (sha256
15915 (base32
15916 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15917 (build-system python-build-system)
15918 (propagated-inputs
15919 `(("python-dill" ,python-dill)))
15920 (home-page "https://pypi.org/project/multiprocess")
15921 (synopsis "Multiprocessing and multithreading in Python")
15922 (description
15923 "This package is a fork of the multiprocessing Python package, a package
15924which supports the spawning of processes using the API of the standard
15925library's @code{threading} module.")
15926 (license license:bsd-3)))
15927
15928(define-public python-toolz
15929 (package
15930 (name "python-toolz")
15931 (version "0.9.0")
15932 (source
15933 (origin
15934 (method url-fetch)
15935 (uri (pypi-uri "toolz" version))
15936 (sha256
15937 (base32
15938 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15939 (build-system python-build-system)
15940 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15941 ;; unregistered loader type"
15942 (arguments '(#:tests? #f))
15943 (home-page "https://github.com/pytoolz/toolz/")
15944 (synopsis "List processing tools and functional utilities")
15945 (description
15946 "This package provides a set of utility functions for iterators,
15947functions, and dictionaries.")
15948 (license license:bsd-3)))
15949
15950(define-public python2-toolz
15951 (package-with-python2 python-toolz))
15952
15953(define-public python-cytoolz
15954 (package
15955 (name "python-cytoolz")
15956 (version "0.9.0.1")
15957 (source
15958 (origin
15959 (method url-fetch)
15960 (uri (pypi-uri "cytoolz" version))
15961 (sha256
15962 (base32
15963 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15964 (build-system python-build-system)
15965 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15966 ;; 'exceptions'"
15967 (arguments '(#:tests? #f))
15968 (propagated-inputs
15969 `(("python-toolz" ,python-toolz)))
15970 (native-inputs
15971 `(("python-cython" ,python-cython)))
15972 (home-page "https://github.com/pytoolz/cytoolz")
15973 (synopsis "High performance functional utilities")
15974 (description
15975 "The cytoolz package implements the same API as provided by toolz. The
15976main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15977that is accessible to other projects developed in Cython.")
15978 (license license:bsd-3)))
15979
15980(define-public python-sortedcontainers
15981 (package
15982 (name "python-sortedcontainers")
15983 (version "2.0.4")
15984 (source
15985 (origin
15986 (method url-fetch)
15987 (uri (pypi-uri "sortedcontainers" version))
15988 (sha256
15989 (base32
15990 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15991 (build-system python-build-system)
15992 (native-inputs
15993 `(("python-tox" ,python-tox)))
15994 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15995 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15996 (description
15997 "This package provides a sorted collections library, written in
15998pure-Python.")
15999 (license license:asl2.0)))
16000
16001(define-public python-cloudpickle
16002 (package
16003 (name "python-cloudpickle")
16004 (version "0.6.1")
16005 (source
16006 (origin
16007 (method url-fetch)
16008 (uri (pypi-uri "cloudpickle" version))
16009 (sha256
16010 (base32
16011 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
16012 (build-system python-build-system)
16013 ;; FIXME: there are 5 errors in 122 tests:
16014 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
16015 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
16016 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16017 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16018 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
16019 ;; TypeError: cannot serialize '_io.BufferedRandom' object
16020 (arguments '(#:tests? #f))
16021 (native-inputs
16022 `(("python-pytest" ,python-pytest)
16023 ("python-mock" ,python-mock)
16024 ("python-tornado" ,python-tornado)))
16025 (home-page "https://github.com/cloudpipe/cloudpickle")
16026 (synopsis "Extended pickling support for Python objects")
16027 (description
16028 "Cloudpickle makes it possible to serialize Python constructs not
16029supported by the default pickle module from the Python standard library. It
16030is especially useful for cluster computing where Python expressions are
16031shipped over the network to execute on remote hosts, possibly close to the
16032data.")
16033 (license license:bsd-3)))
16034
16035(define-public python2-cloudpickle
16036 (package-with-python2 python-cloudpickle))
16037
16038(define-public python-locket
16039 (package
16040 (name "python-locket")
16041 (version "0.2.0")
16042 (source
16043 (origin
16044 (method url-fetch)
16045 (uri (pypi-uri "locket" version))
16046 (sha256
16047 (base32
16048 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
16049 (build-system python-build-system)
16050 (home-page "https://github.com/mwilliamson/locket.py")
16051 (synopsis "File-based locks for Python")
16052 (description
16053 "Locket implements a lock that can be used by multiple processes provided
16054they use the same path.")
16055 (license license:bsd-2)))
16056
16057(define-public python2-locket
16058 (package-with-python2 python-locket))
16059
16060(define-public python-blosc
16061 (package
16062 (name "python-blosc")
16063 (version "1.5.1")
16064 (source
16065 (origin
16066 (method url-fetch)
16067 (uri (pypi-uri "blosc" version))
16068 (sha256
16069 (base32
16070 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
16071 (build-system python-build-system)
16072 ;; FIXME: all tests pass, but then this error is printed:
16073 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16074 (arguments '(#:tests? #f))
16075 (propagated-inputs
16076 `(("python-numpy" ,python-numpy)))
16077 (home-page "https://github.com/blosc/python-blosc")
16078 (synopsis "Python wrapper for the Blosc data compressor library")
16079 (description "Blosc is a high performance compressor optimized for binary
16080data. It has been designed to transmit data to the processor cache faster
16081than the traditional, non-compressed, direct memory fetch approach via a
16082@code{memcpy()} system call.
16083
16084Blosc works well for compressing numerical arrays that contains data with
16085relatively low entropy, like sparse data, time series, grids with
16086regular-spaced values, etc.
16087
16088This Python package wraps the Blosc library.")
16089 (license license:bsd-3)))
16090
16091(define-public python2-blosc
16092 (package-with-python2 python-blosc))
16093
16094(define-public python-partd
16095 (package
16096 (name "python-partd")
16097 (version "0.3.9")
16098 (source
16099 (origin
16100 (method url-fetch)
16101 (uri (pypi-uri "partd" version))
16102 (sha256
16103 (base32
16104 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16105 (build-system python-build-system)
16106 (propagated-inputs
16107 `(("python-blosc" ,python-blosc)
16108 ("python-locket" ,python-locket)
16109 ("python-numpy" ,python-numpy)
16110 ("python-pandas" ,python-pandas)
16111 ("python-pyzmq" ,python-pyzmq)
16112 ("python-toolz" ,python-toolz)))
16113 (home-page "https://github.com/dask/partd/")
16114 (synopsis "Appendable key-value storage")
16115 (description "Partd stores key-value pairs. Values are raw bytes. We
16116append on old values. Partd excels at shuffling operations.")
16117 (license license:bsd-3)))
16118
16119(define-public python2-partd
16120 (package-with-python2 python-partd))
16121
16122(define-public python-dask
16123 (package
16124 (name "python-dask")
0998175f 16125 (version "1.2.2")
44d10b1f
RW
16126 (source
16127 (origin
16128 (method url-fetch)
16129 (uri (pypi-uri "dask" version))
16130 (sha256
0998175f 16131 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
44d10b1f
RW
16132 (build-system python-build-system)
16133 ;; A single test out of 5000+ fails. This test is marked as xfail when
16134 ;; pytest-xdist is used.
16135 (arguments
16136 `(#:phases
16137 (modify-phases %standard-phases
16138 (add-after 'unpack 'disable-broken-test
16139 (lambda _
16140 (substitute* "dask/tests/test_threaded.py"
16141 (("def test_interrupt\\(\\)" m)
16142 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16143 m)))
16144 (when (which "python2")
16145 ;; This test fails with recent Pandas:
16146 ;; <https://github.com/dask/dask/issues/3794>.
16147 (substitute* "dask/dataframe/tests/test_dataframe.py"
16148 (("def test_info\\(\\)" m)
16149 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16150 m))))
16151 #t))
16152 (replace 'check
16153 (lambda _ (invoke "pytest" "-vv"))))))
16154 (propagated-inputs
16155 `(("python-cloudpickle" ,python-cloudpickle)
16156 ("python-numpy" ,python-numpy)
16157 ("python-pandas" ,python-pandas)
16158 ("python-partd" ,python-partd)
16159 ("python-toolz" ,python-toolz)
16160 ("python-pyyaml" ,python-pyyaml)))
16161 (native-inputs
16162 `(("python-pytest" ,python-pytest)
16163 ("python-pytest-runner" ,python-pytest-runner)))
16164 (home-page "https://github.com/dask/dask/")
16165 (synopsis "Parallel computing with task scheduling")
16166 (description
16167 "Dask is a flexible parallel computing library for analytics. It
16168consists of two components: dynamic task scheduling optimized for computation,
16169and large data collections like parallel arrays, dataframes, and lists that
16170extend common interfaces like NumPy, Pandas, or Python iterators to
16171larger-than-memory or distributed environments. These parallel collections
16172run on top of the dynamic task schedulers. ")
16173 (license license:bsd-3)))
16174
16175(define-public python2-dask
16176 (package-with-python2 python-dask))
16177
16178(define-public python-ilinkedlist
16179 (package
16180 (name "python-ilinkedlist")
16181 (version "0.4.0")
16182 (source
16183 (origin
16184 (method url-fetch)
16185 (uri (pypi-uri "ilinkedlist" version))
16186 (sha256
16187 (base32
16188 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16189 (build-system python-build-system)
16190 (native-inputs `(("python-pytest" ,python-pytest)))
16191 (inputs `(("python" ,python)))
16192 (home-page "https://github.com/luther9/ilinkedlist-py")
16193 (synopsis "Immutable linked list library")
16194 (description
16195 "This is a implementation of immutable linked lists for Python. It
16196contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16197Since a linked list is treated as immutable, it is hashable, and its length
16198can be retrieved in constant time. Some of the terminology is inspired by
16199LISP. It is possible to create an improper list by creating a @code{Pair}
16200with a non-list @code{cdr}.")
16201 (license license:gpl3+)))
16202
16203(define-public python-readlike
16204 (package
16205 (name "python-readlike")
16206 (version "0.1.3")
16207 (source
16208 (origin
16209 (method url-fetch)
16210 (uri (pypi-uri "readlike" version))
16211 (sha256
16212 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16213 (build-system python-build-system)
16214 (home-page "https://github.com/jangler/readlike")
16215 (synopsis "GNU Readline-like line editing module")
16216 (description
16217 "This Python module provides line editing functions similar to the default
16218Emacs-style ones of GNU Readline. Unlike the Python standard library's
16219@code{readline} package, this one allows access to those capabilties in settings
16220outside of a standard command-line interface. It is especially well-suited to
16221interfacing with Urwid, due to a shared syntax for describing key inputs.
16222
16223Currently, all stateless Readline commands are implemented. Yanking and history
16224are not supported.")
16225 (license license:expat)))
16226
16227(define-public python2-readlike
16228 (package-with-python2 python-readlike))
16229
16230(define-public python-reparser
16231 (package
16232 (name "python-reparser")
16233 (version "1.4.3")
16234 (source
16235 (origin
16236 (method url-fetch)
16237 (uri (pypi-uri "ReParser" version))
16238 (sha256
16239 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16240 (build-system python-build-system)
16241 (home-page "https://github.com/xmikos/reparser")
16242 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16243 (description
16244 "This Python library provides a simple lexer/parser for inline markup based
16245on regular expressions.")
16246 (license license:expat)))
16247
16248(define-public python2-reparser
16249 (let ((reparser (package-with-python2
16250 (strip-python2-variant python-reparser))))
16251 (package (inherit reparser)
16252 (propagated-inputs
16253 `(("python2-enum34" ,python2-enum34)
16254 ,@(package-propagated-inputs reparser))))))
16255
16256(define-public python-precis-i18n
16257 (package
16258 (name "python-precis-i18n")
16259 (version "1.0.0")
16260 (source
16261 (origin
16262 (method url-fetch)
16263 (uri (pypi-uri "precis_i18n" version))
16264 (sha256
16265 (base32
16266 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16267 (build-system python-build-system)
16268 (home-page "https://github.com/byllyfish/precis_i18n")
16269 (synopsis "Implementation of the PRECIS framework")
16270 (description
16271 "This module implements the PRECIS Framework as described in RFC 8264,
16272RFC 8265 and RFC 8266.")
16273 (license license:expat)))
16274
d0446c4b
RW
16275(define-public python-absl-py
16276 (package
16277 (name "python-absl-py")
16278 (version "0.6.1")
16279 (source
16280 (origin
16281 (method url-fetch)
16282 (uri (pypi-uri "absl-py" version))
16283 (sha256
16284 (base32
16285 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16286 (build-system python-build-system)
16287 (propagated-inputs
16288 `(("python-six" ,python-six)))
16289 (home-page "https://github.com/abseil/abseil-py")
16290 (synopsis "Abseil Python common libraries")
16291 (description
16292 "This package provides the Abseil Python Common Libraries, a collection
16293of Python libraries for building Python applications.")
16294 (license license:asl2.0)))
16295
81bed4e9
RW
16296(define-public python-astor
16297 (package
16298 (name "python-astor")
16299 (version "0.7.1")
16300 (source
16301 (origin
16302 (method url-fetch)
16303 (uri (pypi-uri "astor" version))
16304 (sha256
16305 (base32
16306 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16307 (build-system python-build-system)
16308 ;; FIXME: There are two errors and two test failures.
16309 (arguments `(#:tests? #f))
16310 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16311 (synopsis "Read and write Python ASTs")
81bed4e9 16312 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16313source via the Abstract Syntax Tree.")
81bed4e9
RW
16314 (license license:bsd-3)))
16315
39ee82ff
RW
16316(define-public python2-astor
16317 (package-with-python2 python-astor))
16318
22e623ae
RW
16319(define-public python-grpcio
16320 (package
16321 (name "python-grpcio")
16322 (version "1.17.1")
16323 (source
16324 (origin
16325 (method url-fetch)
16326 (uri (pypi-uri "grpcio" version))
16327 (sha256
16328 (base32
16329 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16330 (build-system python-build-system)
16331 (propagated-inputs
16332 `(("python-six" ,python-six)))
16333 (home-page "https://grpc.io")
16334 (synopsis "HTTP/2-based RPC framework")
16335 (description "This package provides a Python library for communicating
16336with the HTTP/2-based RPC framework gRPC.")
16337 (license license:asl2.0)))
16338
79869f80
RW
16339(define-public python-astunparse
16340 (package
16341 (name "python-astunparse")
47d79541 16342 (version "1.6.2")
79869f80
RW
16343 (source
16344 (origin
16345 (method url-fetch)
16346 (uri (pypi-uri "astunparse" version))
16347 (sha256
47d79541 16348 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16349 (build-system python-build-system)
47d79541 16350 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16351 (propagated-inputs
16352 `(("python-six" ,python-six)
16353 ("python-wheel" ,python-wheel)))
16354 (home-page "https://github.com/simonpercivall/astunparse")
16355 (synopsis "AST unparser for Python")
16356 (description "This package provides an AST unparser for Python. It is a
16357factored out version of @code{unparse} found in the Python source
16358distribution.")
16359 (license license:bsd-3)))
16360
2884aac0
RW
16361(define-public python-gast
16362 (package
16363 (name "python-gast")
bd300261 16364 (version "0.2.2")
2884aac0
RW
16365 (source
16366 (origin
16367 (method url-fetch)
16368 (uri (pypi-uri "gast" version))
16369 (sha256
bd300261 16370 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16371 (build-system python-build-system)
16372 (propagated-inputs
16373 `(("python-astunparse" ,python-astunparse)))
16374 (home-page "https://pypi.org/project/gast/")
16375 (synopsis "Generic Python AST that abstracts the underlying Python version")
16376 (description
16377 "GAST provides a compatibility layer between the AST of various Python
16378versions, as produced by @code{ast.parse} from the standard @code{ast}
16379module.")
16380 (license license:bsd-3)))
16381
44d10b1f
RW
16382(define-public python-wikidata
16383 (package
16384 (name "python-wikidata")
16385 (version "0.6.1")
16386 (source
16387 (origin
16388 (method url-fetch)
16389 (uri (pypi-uri "Wikidata" version))
16390 (sha256
16391 (base32
16392 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16393 (build-system python-build-system)
16394 (propagated-inputs
16395 `(("python-babel" ,python-babel)))
16396 (home-page "https://github.com/dahlia/wikidata")
16397 (synopsis "Wikidata client library")
16398 (description
16399 "This package provides a Python interface to
16400@url{https://www.wikidata.org/, Wikidata}.")
16401 (properties '((upstream-name . "Wikidata")))
16402 (license license:gpl3+)))
16403
16404(define-public python-doctest-ignore-unicode
16405 (package
16406 (name "python-doctest-ignore-unicode")
16407 (version "0.1.2")
16408 (source
16409 (origin
16410 (method url-fetch)
16411 (uri (pypi-uri "doctest-ignore-unicode" version))
16412 (sha256
16413 (base32
16414 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16415 (build-system python-build-system)
16416 (native-inputs
16417 `(("python-nose" ,python-nose)))
16418 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16419 (synopsis "Ignore Unicode literal prefixes in doctests")
16420 (description
16421 "This package adds support for a flag to ignore Unicode literal prefixes
16422in doctests.")
16423 (license license:asl2.0)))
16424
16425(define-public python-attr
16426 (package
16427 (name "python-attr")
16428 (version "0.3.1")
16429 (source
16430 (origin
16431 (method url-fetch)
16432 (uri (pypi-uri "attr" version))
16433 (sha256
16434 (base32
16435 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16436 (build-system python-build-system)
16437 (home-page "https://github.com/denis-ryzhkov/attr")
16438 (synopsis "Decorator for attributes of target function or class")
16439 (description "Simple decorator to set attributes of target function or
16440class in a @acronym{DRY, Don't Repeat Yourself} way.")
16441 (license license:expat)))
f98232a3
VC
16442
16443(define-public python-construct
16444 (package
16445 (name "python-construct")
16446 (version "2.9.45")
16447 (source
16448 (origin
16449 (method url-fetch)
16450 (uri (pypi-uri "construct" version))
16451 (sha256
16452 (base32
16453 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16454 (build-system python-build-system)
16455 (arguments
16456 `(#:tests? #f)) ; No tests exist.
16457 (propagated-inputs
16458 `(("python-extras" ,python-extras)
16459 ("python-arrow" ,python-arrow)
16460 ("python-numpy" ,python-numpy)
16461 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16462 (home-page "http://construct.readthedocs.io")
16463 (synopsis "Declarative and symmetrical parser and builder for binary data")
16464 (description
16465 "This package provides both simple, atomic constructs (such as
16466integers of various sizes), as well as composite ones which allow you
16467form hierarchical and sequential structures of increasing complexity.
16468It features bit and byte granularity, easy debugging and testing, an
16469easy-to-extend subclass system, and lots of primitive constructs to
16470make your work easier.")
16471 (license license:expat)))
b742c006
LF
16472
16473(define-public python-humanize
16474 (package
16475 (name "python-humanize")
16476 (version "0.5.1")
16477 (source
16478 (origin
16479 (method url-fetch)
16480 (uri (pypi-uri "humanize" version))
16481 (sha256
16482 (base32
16483 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16484 (arguments
16485 '(#:tests? #f)) ; tests not in pypi archive
16486 (build-system python-build-system)
16487 (home-page "https://github.com/jmoiron/humanize")
16488 (synopsis "Print numerical information in a human-readable form")
16489 (description "This package provides a Python module that displays numbers
16490and dates in \"human readable\" forms. For example, it would display
16491\"12345591313\" as \"12.3 billion\".")
16492 (license license:expat)))
d5bbf66d
LF
16493
16494(define-public python-txaio
16495 (package
16496 (name "python-txaio")
16497 (version "18.8.1")
16498 (source
16499 (origin
16500 (method url-fetch)
16501 (uri (pypi-uri "txaio" version))
16502 (sha256
16503 (base32
16504 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16505 (build-system python-build-system)
16506 (propagated-inputs
16507 `(("python-twisted" ,python-twisted)
16508 ("python-six" ,python-six)))
16509 (home-page "https://github.com/crossbario/txaio")
16510 (synopsis "Compatibility layer between Python asyncio and Twisted")
16511 (description "Txaio provides a compatibility layer between the Python
16512@code{asyncio} module and @code{Twisted}.")
16513 (license license:expat)))
963dfd3a
RW
16514
16515(define-public python-toolshed
16516 (package
16517 (name "python-toolshed")
16518 (version "0.4.6")
16519 (source
16520 (origin
16521 (method url-fetch)
16522 (uri (pypi-uri "toolshed" version))
16523 (sha256
16524 (base32
16525 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16526 (build-system python-build-system)
16527 (native-inputs
16528 `(("python-nose" ,python-nose)))
16529 (home-page "https://github.com/brentp/toolshed/")
16530 (synopsis "Collection of modules and functions for working with data")
16531 (description "This is a collection of well-tested, simple modules and
16532functions that aim to reduce boilerplate when working with data.")
16533 (license license:bsd-2)))
c91ecf2d
RW
16534
16535(define-public python-annoy
16536 (package
16537 (name "python-annoy")
16538 (version "1.15.1")
16539 (source
16540 (origin
16541 (method url-fetch)
16542 (uri (pypi-uri "annoy" version))
16543 (sha256
16544 (base32
16545 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16546 (build-system python-build-system)
16547 (native-inputs
16548 `(("python-nose" ,python-nose)))
16549 (home-page "https://github.com/spotify/annoy/")
16550 (synopsis "Approximate nearest neighbors library")
16551 (description
16552 "Annoy is a C++ library with Python bindings to search for points in
16553space that are close to a given query point. It also creates large read-only
16554file-based data structures that are @code{mmap}ped into memory so that many
16555processes may share the same data.")
16556 (license license:asl2.0)))
412342d1 16557
79bfa422 16558(define-public python-pylzma
412342d1 16559 (package
79bfa422
DM
16560 (name "python-pylzma")
16561 (version "0.5.0")
16562 (source
16563 (origin
16564 (method url-fetch)
16565 (uri (pypi-uri "pylzma" version))
16566 (sha256
16567 (base32
16568 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16569 (build-system python-build-system)
79bfa422
DM
16570 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16571 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16572 (description "This package provides Python bindings for the LZMA library
16573by Igor Pavlov.")
16574 (license license:lgpl2.1+)))
16575
16576(define-public python2-pylzma
16577 (package-with-python2 python-pylzma))
f825e605 16578
6609ebe7
AG
16579(define-public python2-zeroconf
16580 (package
16581 (name "python2-zeroconf")
16582
16583 ;; This is the last version that supports Python 2.x.
16584 (version "0.19.1")
16585 (source
16586 (origin
16587 (method url-fetch)
16588 (uri (pypi-uri "zeroconf" version))
16589 (sha256
16590 (base32
16591 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16592 (build-system python-build-system)
16593 (arguments
16594 `(#:python ,python-2
16595 #:phases
16596 (modify-phases %standard-phases
16597 (add-after 'unpack 'patch-requires
16598 (lambda* (#:key inputs #:allow-other-keys)
16599 (substitute* "setup.py"
16600 (("enum-compat")
16601 "enum34"))
16602 #t)))))
16603 (native-inputs
16604 `(("python2-six" ,python2-six)
16605 ("python2-enum32" ,python2-enum34)
16606 ("python2-netifaces" ,python2-netifaces)
16607 ("python2-typing" ,python2-typing)))
16608 (home-page "https://github.com/jstasiak/python-zeroconf")
16609 (synopsis "Pure Python mDNS service discovery")
16610 (description
16611 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16612compatible).")
16613 (license license:lgpl2.1+)))
16614
f825e605
GLV
16615(define-public python-bsddb3
16616 (package
16617 (name "python-bsddb3")
16618 (version "6.2.6")
16619 (source
16620 (origin
16621 (method url-fetch)
16622 (uri (pypi-uri "bsddb3" version))
16623 (sha256
16624 (base32
16625 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16626 (build-system python-build-system)
16627 (inputs
16628 `(("bdb" ,bdb)))
16629 (arguments
16630 '(#:phases
16631 (modify-phases %standard-phases
16632 (add-after 'unpack 'configure-locations
16633 (lambda* (#:key inputs #:allow-other-keys)
16634 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16635 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16636 #t))
16637 (replace 'check
16638 (lambda _
16639 (invoke "python3" "test3.py" "-v"))))))
16640 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16641 (synopsis "Python bindings for Oracle Berkeley DB")
16642 (description
16643 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16644C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16645Transaction objects, and each of these is exposed as a Python type in the
16646bsddb3.db module. The database objects can use various access methods: btree,
16647hash, recno, and queue. Complete support of Berkeley DB distributed
16648transactions. Complete support for Berkeley DB Replication Manager.
16649Complete support for Berkeley DB Base Replication. Support for RPC.")
16650 (license license:bsd-3)))
edeb04bf
PL
16651
16652(define-public python-dbfread
16653 (package
16654 (name "python-dbfread")
16655 (version "2.0.7")
16656 (source (origin
16657 (method url-fetch)
16658 (uri (pypi-uri "dbfread" version))
16659 (sha256
16660 (base32
16661 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16662 (build-system python-build-system)
16663 (native-inputs
16664 `(("python-pytest" ,python-pytest)))
16665 (home-page "https://dbfread.readthedocs.io")
16666 (synopsis "Read DBF Files with Python")
16667 (description
16668 "This library reads DBF files and returns the data as native Python data
16669types for further processing. It is primarily intended for batch jobs and
16670one-off scripts.")
16671 (license license:expat)))
e308b4f0
JM
16672
16673(define-public python-cached-property
16674 (package
16675 (name "python-cached-property")
16676 (version "1.5.1")
16677 (source
16678 (origin
16679 (method url-fetch)
16680 (uri (pypi-uri "cached-property" version))
16681 (sha256
16682 (base32
16683 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16684 (build-system python-build-system)
16685 (arguments
16686 `(#:phases
16687 (modify-phases %standard-phases
16688 ;; https://github.com/pydanny/cached-property/issues/131
16689 ;; recent versions of freezegun break one test
16690 (add-after 'unpack 'disable-broken-test
16691 (lambda _
16692 (substitute* "tests/test_cached_property.py"
16693 (("def test_threads_ttl_expiry\\(self\\)" m)
16694 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16695 " " m)))
16696 #t)))))
16697 (native-inputs
16698 `(("python-freezegun" ,python-freezegun)))
16699 (home-page
16700 "https://github.com/pydanny/cached-property")
16701 (synopsis
16702 "Decorator for caching properties in classes")
16703 (description
16704 "This package provides a decorator which makes caching
16705time-or-computationally-expensive properties quick and easy and works in Python
167062 or 3.")
16707 (license license:bsd-3)))
dfe8a704
NG
16708
16709(define-public python-folium
16710 (package
16711 (name "python-folium")
16712 (version "0.10.0")
16713 (source
16714 (origin
16715 (method url-fetch)
16716 (uri (pypi-uri "folium" version))
16717 (sha256
16718 (base32
16719 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16720 (build-system python-build-system)
16721 (propagated-inputs
16722 `(("python-branca" ,python-branca)
16723 ("python-jinja2" ,python-jinja2)
16724 ("python-numpy" ,python-numpy)
16725 ("python-requests" ,python-requests)))
16726 (native-inputs
16727 `(("python-pytest" ,python-pytest)))
16728 (home-page "https://github.com/python-visualization/folium")
16729 (synopsis "Make beautiful maps with Leaflet.js & Python")
16730 (description "@code{folium} makes it easy to visualize data that’s been
16731manipulated in Python on an interactive leaflet map. It enables both the
16732binding of data to a map for @code{choropleth} visualizations as well as
16733passing rich vector/raster/HTML visualizations as markers on the map.
16734
16735The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16736Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16737supports Image, Video, GeoJSON and TopoJSON overlays.")
16738 (license license:expat)))
9dd5f475
LC
16739
16740(define-public jube
16741 (package
16742 ;; This is a command-line tool, so no "python-" prefix.
16743 (name "jube")
16744 (version "2.2.2")
16745 (source (origin
16746 (method url-fetch)
16747 (uri (string-append
16748 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16749 version))
16750 (sha256
16751 (base32
16752 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16753 (file-name (string-append "jube-" version ".tar.gz"))))
16754 (build-system python-build-system)
16755 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16756 (synopsis "Benchmarking environment")
16757 (description
16758 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16759benchmarked application, benchmark data is stored in a format that allows JUBE
16760to deduct the desired information. This data can be parsed by automatic pre-
16761and post-processing scripts that draw information and store it more densely
16762for manual interpretation.")
a9f33960 16763 (license license:gpl3+)))
66436424
NG
16764
16765(define-public python-pyroutelib3
16766 (package
16767 (name "python-pyroutelib3")
16768 (version "1.3.post1")
16769 (source
16770 (origin
16771 (method url-fetch)
16772 (uri (pypi-uri "pyroutelib3" version))
16773 (sha256
16774 (base32
16775 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16776 (build-system python-build-system)
16777 (propagated-inputs
16778 `(("python-dateutil" ,python-dateutil)))
16779 (home-page "https://github.com/MKuranowski/pyroutelib3")
16780 (synopsis "Library for simple routing on OSM data")
16781 (description "Library for simple routing on OSM data")
16782 (license license:gpl3+)))
30e7c03a
GL
16783
16784(define-public python-elementpath
16785 (package
16786 (name "python-elementpath")
16787 (version "1.2.0")
16788 (source
16789 (origin
16790 (method url-fetch)
16791 (uri (pypi-uri "elementpath" version))
16792 (sha256
16793 (base32
16794 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16795 (build-system python-build-system)
16796 (home-page
16797 "https://github.com/sissaschool/elementpath")
16798 (synopsis
16799 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16800 (description
16801 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16802for Python's ElementTree XML data structures, both for the standard
16803ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16804
16805For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16806because lxml.etree already has it's own implementation of XPath 1.0.")
16807 (license license:expat)))
c1bbef69
16808
16809(define-public python-bibtexparser
16810 (package
16811 (name "python-bibtexparser")
16812 (version "1.1.0")
16813 (source
16814 (origin
16815 (method url-fetch)
16816 (uri (pypi-uri "bibtexparser" version))
16817 (sha256
16818 (base32
16819 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16820 (build-system python-build-system)
16821 (propagated-inputs
16822 `(("python-pyparsing" ,python-pyparsing)))
16823 (native-inputs
16824 `(("python-future" ,python-future)))
16825 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16826 (synopsis "Python library to parse BibTeX files")
16827 (description "BibtexParser is a Python library to parse BibTeX files.")
16828 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
16829
16830(define-public python-distro
16831 (package
16832 (name "python-distro")
16833 (version "1.4.0")
16834 (source
16835 (origin
16836 (method url-fetch)
16837 (uri (pypi-uri "distro" version))
16838 (sha256
16839 (base32
16840 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16841 (build-system python-build-system)
16842 (native-inputs
16843 `(("python-pytest" ,python-pytest)))
16844 (home-page "https://github.com/nir0s/distro")
16845 (synopsis
16846 "OS platform information API")
16847 (description
16848 "@code{distro} provides information about the OS distribution it runs on,
16849such as a reliable machine-readable ID, or version information.
16850
16851It is the recommended replacement for Python's original
16852`platform.linux_distribution` function (which will be removed in Python 3.8).
16853@code{distro} also provides a command-line interface to output the platform
16854information in various formats.")
16855 (license license:asl2.0)))
f2f41e1a
HG
16856
16857(define-public python-cairosvg
16858 (package
16859 (name "python-cairosvg")
16860 (version "2.4.2")
16861 (source
16862 (origin
16863 (method url-fetch)
16864 (uri (pypi-uri "CairoSVG" version))
16865 (sha256
16866 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16867 (build-system python-build-system)
16868 (arguments
16869 `(#:phases
16870 (modify-phases %standard-phases
16871 (replace 'check
16872 (lambda _ (invoke "pytest"))))))
16873 (propagated-inputs
16874 `(("python-cairocffi" ,python-cairocffi)
16875 ("python-cssselect2" ,python-cssselect2)
16876 ("python-defusedxml" ,python-defusedxml)
16877 ("python-pillow" ,python-pillow)
16878 ("python-tinycss2" ,python-tinycss2)))
16879 (native-inputs
16880 `(("python-pytest-flake8" ,python-pytest-flake8)
16881 ("python-pytest-isort" ,python-pytest-isort)
16882 ("python-pytest-runner" ,python-pytest-runner)))
16883 (home-page "https://cairosvg.org/")
16884 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16885 (description "CairoSVG is a SVG converter based on Cairo. It can export
16886SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16887SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16888parsed, the result is drawn to a Cairo surface that can be exported to
16889qvarious formats: PDF, PostScript, PNG and even SVG.")
16890 (license license:lgpl3+)))
ea1801e0
HG
16891
16892(define-public python-pyphen
16893 (package
16894 (name "python-pyphen")
16895 (version "0.9.5")
16896 (source
16897 (origin
16898 (method url-fetch)
16899 (uri (pypi-uri "Pyphen" version))
16900 (sha256
16901 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16902 (build-system python-build-system)
16903 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16904 ;; embedded set provided by upstream - like Debian does.
16905 (home-page "https://github.com/Kozea/Pyphen")
16906 (synopsis "Pure Python module to hyphenate text")
16907 (description "Pyphen is a pure Python module to hyphenate text using
16908existing Hunspell hyphenation dictionaries.")
16909 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
16910
16911(define-public python-intelhex
16912 (package
16913 (name "python-intelhex")
16914 (version "2.2.1")
16915 (source
16916 (origin
16917 (method url-fetch)
16918 (uri (pypi-uri "intelhex" version))
16919 (sha256
16920 (base32
16921 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16922 (build-system python-build-system)
16923 (arguments '(#:tests? #f)) ;issue with version
16924 (home-page "https://pypi.org/project/IntelHex/")
16925 (synopsis "Python library for Intel HEX files manipulations")
16926 (description "The Intel HEX file format is widely used in microprocessors
16927and microcontrollers area (embedded systems etc.) as the de facto standard for
16928representation of code to be programmed into microelectronic devices. This
16929package provides an intelhex Python library to read, write, create from
16930scratch and manipulate data from Intel HEX file format. It also includes
16931several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16932converters and more, those based on the library itself.")
16933 (license license:bsd-3)))