gnu: Add lziprecover.
[jackhill/guix/guix.git] / gnu / packages / python.scm
CommitLineData
a01b6da7
NK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
28958b64 3;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
8e451885 4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
e99f4211 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
4dcb135e 6;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
da6ce3f1 7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
e99f4211 8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
d95a56c6 9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
d92621cf 10;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
0bdc1671 11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
2b2f2fc1 13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
7637de23 14;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
02a8a187 15;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
b9893908 16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
c5be3467 17;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
1872f1bb 18;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
daeeea71 19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
b31fbea5 20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
88bb4197 21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
b8fdbca3 22;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
0de78c95 23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
9250b0f3 24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
47d0b292 25;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
6bd9ad69 26;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
6eb7af2a 27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
3f641af0 28;;; Copyright © 2016 David Craven <david@craven.ch>
df893a38 29;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
ca0e62bf 30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
b04a52a6 31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
ee5fb7ee 32;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33e9490c 33;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
5220022a 34;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
819939cb 35;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
ec074213 36;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
916aafa4 37;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
1a917fc9 38;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
f9f67fcb 39;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
16fe516e 40;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
a5e8f597 41;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
3015d455 42;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
fa3f5f47 43;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
fa56c773 44;;; Copyright © 2017 Kei Kebreau <kei@openmailbox.org>
f817b4d9 45;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
3fee0039 46;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
a01b6da7
NK
47;;;
48;;; This file is part of GNU Guix.
49;;;
50;;; GNU Guix is free software; you can redistribute it and/or modify it
51;;; under the terms of the GNU General Public License as published by
52;;; the Free Software Foundation; either version 3 of the License, or (at
53;;; your option) any later version.
54;;;
55;;; GNU Guix is distributed in the hope that it will be useful, but
56;;; WITHOUT ANY WARRANTY; without even the implied warranty of
57;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58;;; GNU General Public License for more details.
59;;;
60;;; You should have received a copy of the GNU General Public License
61;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
62
1ffa7090 63(define-module (gnu packages python)
3f641af0 64 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 65 #:use-module (gnu packages)
8e451885 66 #:use-module (gnu packages algebra)
d79a343b 67 #:use-module (gnu packages adns)
89b2e0b0 68 #:use-module (gnu packages attr)
d96034ed 69 #:use-module (gnu packages backup)
3969ca54 70 #:use-module (gnu packages bash)
1ffa7090 71 #:use-module (gnu packages compression)
dc1bd2b5 72 #:use-module (gnu packages crypto)
4ed20663 73 #:use-module (gnu packages databases)
ddc63a56 74 #:use-module (gnu packages django)
5e1c9367 75 #:use-module (gnu packages file)
4ed20663 76 #:use-module (gnu packages fontutils)
4ed20663
AE
77 #:use-module (gnu packages gcc)
78 #:use-module (gnu packages ghostscript)
6eb7af2a 79 #:use-module (gnu packages gl)
4ed20663 80 #:use-module (gnu packages glib)
c227458a 81 #:use-module (gnu packages graphviz)
6eb7af2a 82 #:use-module (gnu packages gstreamer)
4ed20663 83 #:use-module (gnu packages gtk)
421a80a2 84 #:use-module (gnu packages icu4c)
c937562e 85 #:use-module (gnu packages image)
4ed20663 86 #:use-module (gnu packages imagemagick)
d79a343b 87 #:use-module (gnu packages libevent)
b10ab723 88 #:use-module (gnu packages libffi)
89b2e0b0 89 #:use-module (gnu packages linux)
ed118043 90 #:use-module (gnu packages man)
0da98533 91 #:use-module (gnu packages maths)
4ed20663 92 #:use-module (gnu packages multiprecision)
45203542 93 #:use-module (gnu packages networking)
be7134bf 94 #:use-module (gnu packages ncurses)
b04a52a6 95 #:use-module (gnu packages openstack)
d488d5d6 96 #:use-module (gnu packages password-utils)
c9b1b4f9 97 #:use-module (gnu packages pcre)
4ed20663 98 #:use-module (gnu packages perl)
b10ab723 99 #:use-module (gnu packages pkg-config)
06ff0837 100 #:use-module (gnu packages protobuf)
4535a93a 101 #:use-module (gnu packages qt)
4ed20663 102 #:use-module (gnu packages readline)
6eb7af2a 103 #:use-module (gnu packages sdl)
5f94ec91 104 #:use-module (gnu packages search)
80ce42bd 105 #:use-module (gnu packages shells)
7ea498e5 106 #:use-module (gnu packages ssh)
c9b1b4f9 107 #:use-module (gnu packages statistics)
8f9ac901 108 #:use-module (gnu packages tex)
1c65314c 109 #:use-module (gnu packages texinfo)
cc2b77df 110 #:use-module (gnu packages tls)
e25f0174 111 #:use-module (gnu packages version-control)
02f8f804 112 #:use-module (gnu packages video)
8d12be1e 113 #:use-module (gnu packages web)
ce0614dd 114 #:use-module (gnu packages base)
26b307e2 115 #:use-module (gnu packages xml)
6fa14469 116 #:use-module (gnu packages xorg)
0bdc1671 117 #:use-module (gnu packages xdisorg)
afa181ff 118 #:use-module (gnu packages tcl)
63bcec71 119 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
120 #:use-module (guix packages)
121 #:use-module (guix download)
ea5456c8 122 #:use-module (guix git-download)
11bb85a1 123 #:use-module (guix utils)
acc26ff1 124 #:use-module (guix build-system gnu)
d8c4998f 125 #:use-module (guix build-system cmake)
898238b9 126 #:use-module (guix build-system python)
1c65314c
FB
127 #:use-module (guix build-system trivial)
128 #:use-module (srfi srfi-1))
a01b6da7 129
45848023 130(define-public python-2.7
a01b6da7
NK
131 (package
132 (name "python")
49c2a46e 133 (version "2.7.13")
a01b6da7
NK
134 (source
135 (origin
136 (method url-fetch)
9b43a0ff 137 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
138 version "/Python-" version ".tar.xz"))
139 (sha256
140 (base32
49c2a46e 141 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
c3052d6b
ML
142 (patches (search-patches "python-2.7-search-paths.patch"
143 "python-2-deterministic-build-info.patch"
15e57f57 144 "python-2.7-site-prefixes.patch"
dc5cec21
LF
145 "python-2.7-source-date-epoch.patch"
146 "python-2.7-getentropy-on-old-kernels.patch"))
10a42aa2
EF
147 (modules '((guix build utils)))
148 ;; suboptimal to delete failing tests here, but if we delete them in the
149 ;; arguments then we need to make sure to strip out that phase when it
150 ;; gets inherited by python and python-minimal.
151 (snippet
152 '(begin
153 (for-each delete-file
154 '("Lib/test/test_compileall.py"
f0499100 155 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
156 "Lib/test/test_distutils.py"
157 "Lib/test/test_import.py"
158 "Lib/test/test_shutil.py"
159 "Lib/test/test_socket.py"
1bb163b0 160 "Lib/test/test_subprocess.py"))
10a42aa2 161 #t))))
02f0c3b2
LC
162 (outputs '("out"
163 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 164 (build-system gnu-build-system)
3fdc99da 165 (arguments
10a42aa2 166 `(;; 356 tests OK.
e7e7a1eb
EF
167 ;; 6 tests failed:
168 ;; test_compileall test_distutils test_import test_shutil test_socket
169 ;; test_subprocess
170 ;; 39 tests skipped:
ff6f33cf
ED
171 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
172 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
173 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
174 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
175 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
176 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
177 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
178 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
179 ;; test_winreg test_winsound test_zipfile64
180 ;; 4 skips unexpected on linux2:
181 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 182 #:test-target "test"
3fdc99da 183 #:configure-flags
6a20289d
LC
184 (list "--enable-shared" ;allow embedding
185 "--with-system-ffi" ;build ctypes
aaf75c89 186 "--with-ensurepip=install" ;install pip and setuptools
a282d7ff 187 "--enable-unicode=ucs4"
6a20289d
LC
188 (string-append "LDFLAGS=-Wl,-rpath="
189 (assoc-ref %outputs "out") "/lib"))
fd982732 190
d2cc9c7c
LC
191 #:modules ((ice-9 ftw) (ice-9 match)
192 (guix build utils) (guix build gnu-build-system))
fd982732 193 #:phases
46472ecd
MW
194 (modify-phases %standard-phases
195 (add-before
196 'configure 'patch-lib-shells
197 (lambda _
198 ;; Filter for existing files, since some may not exist in all
199 ;; versions of python that are built with this recipe.
200 (substitute* (filter file-exists?
201 '("Lib/subprocess.py"
202 "Lib/popen2.py"
203 "Lib/distutils/tests/test_spawn.py"
204 "Lib/test/test_subprocess.py"))
205 (("/bin/sh") (which "sh")))
dedc8320
LC
206
207 ;; Use zero as the timestamp in .pyc files so that builds are
208 ;; deterministic. TODO: Remove it when this variable is set in
209 ;; gnu-build-system.scm.
a665996f 210 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 211 #t))
5b4e2791
LC
212 (add-before 'configure 'do-not-record-configure-flags
213 (lambda* (#:key configure-flags #:allow-other-keys)
214 ;; Remove configure flags from the installed '_sysconfigdata.py'
215 ;; and 'Makefile' so we don't end up keeping references to the
216 ;; build tools.
217 ;;
218 ;; Preserve at least '--with-system-ffi' since otherwise the
219 ;; thing tries to build libffi, fails, and we end up with a
220 ;; Python that lacks ctypes.
221 (substitute* "configure"
222 (("^CONFIG_ARGS=.*$")
223 (format #f "CONFIG_ARGS='~a'\n"
224 (if (member "--with-system-ffi" configure-flags)
225 "--with-system-ffi"
226 ""))))
227 #t))
46472ecd
MW
228 (add-before
229 'check 'pre-check
230 (lambda _
231 ;; 'Lib/test/test_site.py' needs a valid $HOME
232 (setenv "HOME" (getcwd))
233 #t))
234 (add-after
235 'unpack 'set-source-file-times-to-1980
236 ;; XXX One of the tests uses a ZIP library to pack up some of the
237 ;; source tree, and fails with "ZIP does not support timestamps
238 ;; before 1980". Work around this by setting the file times in the
239 ;; source tree to sometime in early 1980.
240 (lambda _
241 (let ((circa-1980 (* 10 366 24 60 60)))
242 (ftw "." (lambda (file stat flag)
243 (utime file circa-1980 circa-1980)
244 #t))
02f0c3b2 245 #t)))
9ffe61b0
LC
246 (add-after 'install 'remove-tests
247 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
248 ;; because these files are used by some libraries out there.
249 (lambda* (#:key outputs #:allow-other-keys)
250 (let ((out (assoc-ref outputs "out")))
251 (match (scandir (string-append out "/lib")
252 (lambda (name)
253 (string-prefix? "python" name)))
254 ((pythonX.Y)
255 (let ((testdir (string-append out "/lib/" pythonX.Y
256 "/test")))
257 (with-directory-excursion testdir
258 (for-each delete-file-recursively
259 (scandir testdir
260 (match-lambda
261 ((or "." "..") #f)
262 (file
263 (not
264 (string-prefix? "test_support."
265 file))))))
266 (call-with-output-file "__init__.py" (const #t))
267 #t)))))))
216c283b
LC
268 (add-before 'strip 'make-libraries-writable
269 (lambda* (#:key outputs #:allow-other-keys)
270 ;; Make .so files writable so they can be stripped.
271 (let ((out (assoc-ref outputs "out")))
272 (for-each (lambda (file)
273 (chmod file #o755))
274 (find-files (string-append out "/lib")
275 "\\.so"))
276 #t)))
02f0c3b2
LC
277 (add-after 'install 'move-tk-inter
278 (lambda* (#:key outputs #:allow-other-keys)
279 ;; When Tkinter support is built move it to a separate output so
280 ;; that the main output doesn't contain a reference to Tcl/Tk.
281 (let ((out (assoc-ref outputs "out"))
282 (tk (assoc-ref outputs "tk")))
283 (when tk
284 (match (find-files out "tkinter.*\\.so")
285 ((tkinter.so)
286 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
287 ;; want it under TK/lib/pythonX.Y/site-packages.
288 (let* ((len (string-length out))
289 (target (string-append
290 tk "/"
291 (string-drop
292 (dirname (dirname tkinter.so))
293 len)
294 "/site-packages")))
295 (install-file tkinter.so target)
296 (delete-file tkinter.so)))))
297 #t))))))
a01b6da7 298 (inputs
3fdc99da
CR
299 `(("bzip2" ,bzip2)
300 ("gdbm" ,gdbm)
b10ab723 301 ("libffi" ,libffi) ; for ctypes
b88e1b0a 302 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 303 ("openssl" ,openssl)
3fdc99da 304 ("readline" ,readline)
afa181ff
LC
305 ("zlib" ,zlib)
306 ("tcl" ,tcl)
307 ("tk" ,tk))) ; for tkinter
b10ab723
CR
308 (native-inputs
309 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
310 (native-search-paths
311 (list (search-path-specification
312 (variable "PYTHONPATH")
af070955 313 (files '("lib/python2.7/site-packages")))))
f0499100 314 (home-page "https://www.python.org")
afa181ff 315 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
316 (description
317 "Python is a remarkably powerful dynamic programming language that
318is used in a wide variety of application domains. Some of its key
319distinguishing features include: clear, readable syntax; strong
320introspection capabilities; intuitive object orientation; natural
321expression of procedural code; full modularity, supporting hierarchical
322packages; exception-based error handling; and very high level dynamic
323data types.")
3f641af0 324 (license license:psfl)))
acc26ff1 325
45848023
HG
326;; Current 2.x version.
327(define-public python-2 python-2.7)
328
72df6680 329(define-public python-3.5
b24d1cfc 330 (package (inherit python-2)
343cee8a 331 (version "3.5.3")
717003e3
LC
332 (source (origin
333 (method url-fetch)
334 (uri (string-append "https://www.python.org/ftp/python/"
335 version "/Python-" version ".tar.xz"))
fc1adab1
AK
336 (patches (search-patches
337 "python-fix-tests.patch"
72df6680 338 "python-3.5-fix-tests.patch"
e4d34cd0 339 "python-3.5-getentropy-on-old-kernels.patch"
fc1adab1
AK
340 "python-3-deterministic-build-info.patch"
341 "python-3-search-paths.patch"))
717003e3
LC
342 (patch-flags '("-p0"))
343 (sha256
344 (base32
343cee8a 345 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
fd615918
EF
346 (snippet
347 '(delete-file
348 "Lib/ctypes/test/test_win32.py")))) ; fails on aarch64
1f434457
MW
349 (arguments (substitute-keyword-arguments (package-arguments python-2)
350 ((#:tests? _) #t)))
1aebc0cb
AE
351 (native-search-paths
352 (list (search-path-specification
353 (variable "PYTHONPATH")
0e05d01e
SB
354 (files (list (string-append "lib/python"
355 (version-major+minor version)
356 "/site-packages"))))))))
f26a77ff 357
45848023 358;; Current 3.x version.
72df6680 359(define-public python-3 python-3.5)
45848023
HG
360
361;; Current major version.
362(define-public python python-3)
363
95288fcc
LC
364;; Minimal variants of Python, mostly used to break the cycle between Tk and
365;; Python (Tk -> libxcb -> Python.)
366
367(define-public python2-minimal
368 (package (inherit python-2)
369 (name "python-minimal")
02f0c3b2 370 (outputs '("out"))
5927a843
LC
371
372 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
373 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
374 ;; libffi.
375 (inputs `(("libffi" ,libffi)
376 ("zlib" ,zlib)))))
95288fcc
LC
377
378(define-public python-minimal
898238b9 379 (package (inherit python)
95288fcc 380 (name "python-minimal")
02f0c3b2 381 (outputs '("out"))
95288fcc 382
d0b73960 383 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
384 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
385 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
386 (inputs `(("libffi" ,libffi)
387 ("openssl" ,openssl)
95288fcc
LC
388 ("zlib" ,zlib)))))
389
64cb064c
LC
390(define* (wrap-python3 python
391 #:optional
392 (name (string-append (package-name python) "-wrapper")))
898238b9 393 (package (inherit python)
95288fcc 394 (name name)
898238b9
AE
395 (source #f)
396 (build-system trivial-build-system)
02f0c3b2 397 (outputs '("out"))
3969ca54 398 (inputs `(("bash" ,bash)))
3c0f2329 399 (propagated-inputs `(("python" ,python)))
898238b9
AE
400 (arguments
401 `(#:modules ((guix build utils))
402 #:builder
403 (begin
404 (use-modules (guix build utils))
405 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
406 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
407 (mkdir-p bin)
408 (for-each
409 (lambda (old new)
410 (symlink (string-append python old)
411 (string-append bin "/" new)))
3969ca54
SB
412 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
413 `("python" ,"pydoc" ,"idle" ,"pip"))
414 ;; python-config outputs search paths based upon its location,
415 ;; use a bash wrapper to avoid changing its outputs.
416 (let ((bash (string-append (assoc-ref %build-inputs "bash")
417 "/bin/bash"))
418 (old (string-append python "python3-config"))
419 (new (string-append bin "/python-config")))
420 (with-output-to-file new
421 (lambda ()
422 (format #t "#!~a~%" bash)
423 (format #t "exec \"~a\" \"$@\"~%" old)
424 (chmod new #o755)
425 #t)))))))
0d56e3e1
LC
426 (synopsis "Wrapper for the Python 3 commands")
427 (description
428 "This package provides wrappers for the commands of Python@tie{}3.x such
429that they can be invoked under their usual name---e.g., @command{python}
430instead of @command{python3}.")))
431
95288fcc
LC
432(define-public python-wrapper (wrap-python3 python))
433(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 434
aaf625b8
RW
435(define-public python-psutil
436 (package
437 (name "python-psutil")
88535a44 438 (version "4.3.0")
aaf625b8
RW
439 (source
440 (origin
441 (method url-fetch)
f56777be 442 (uri (pypi-uri "psutil" version))
aaf625b8
RW
443 (sha256
444 (base32
88535a44 445 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 446 (build-system python-build-system)
fb08c4fe
MB
447 (arguments
448 ;; FIXME: some tests does not return and times out.
449 '(#:tests? #f))
88535a44 450 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
451 (synopsis "Library for retrieving information on running processes")
452 (description
453 "psutil (Python system and process utilities) is a library for retrieving
454information on running processes and system utilization (CPU, memory, disks,
455network) in Python. It is useful mainly for system monitoring, profiling and
456limiting process resources and management of running processes. It implements
457many functionalities offered by command line tools such as: ps, top, lsof,
458netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
459pidof, tty, taskset, pmap.")
3f641af0 460 (license license:bsd-3)))
aaf625b8
RW
461
462(define-public python2-psutil
463 (package-with-python2 python-psutil))
898238b9 464
f9da1d8a
ED
465(define-public python-passlib
466 (package
467 (name "python-passlib")
3b86a385 468 (version "1.7.1")
f9da1d8a
ED
469 (source
470 (origin
471 (method url-fetch)
690e8c66 472 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
473 (sha256
474 (base32
3b86a385 475 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
f9da1d8a
ED
476 (build-system python-build-system)
477 (native-inputs
f3b98f4f 478 `(("python-nose" ,python-nose)))
f22efa01 479 (propagated-inputs
f9da1d8a
ED
480 `(("python-py-bcrypt" ,python-py-bcrypt)))
481 (arguments
482 `(#:phases
483 (alist-cons-before
484 'check 'set-PYTHON_EGG_CACHE
485 ;; some tests require access to "$HOME/.cython"
486 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
487 %standard-phases)))
488 (home-page "https://bitbucket.org/ecollins/passlib")
489 (synopsis
490 "Comprehensive password hashing framework")
491 (description
492 "Passlib is a password hashing library for Python 2 & 3, which provides
493cross-platform implementations of over 30 password hashing algorithms, as well
494as a framework for managing existing password hashes. It's designed to be
495useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
496to providing full-strength password hashing for multi-user application.")
3f641af0 497 (license license:bsd-3)))
f9da1d8a
ED
498
499(define-public python2-passlib
500 (package-with-python2 python-passlib))
501
feb0d9c3
ED
502(define-public python-py-bcrypt
503 (package
504 (name "python-py-bcrypt")
505 (version "0.4")
506 (source
507 (origin
508 (method url-fetch)
509 (uri (string-append
510 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
511 version
512 ".tar.gz"))
513 (sha256
514 (base32
515 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
516 (build-system python-build-system)
feb0d9c3
ED
517 (home-page "https://code.google.com/p/py-bcrypt")
518 (synopsis
519 "Bcrypt password hashing and key derivation")
520 (description
521 "A python wrapper of OpenBSD's Blowfish password hashing code. This
522system hashes passwords using a version of Bruce Schneier's Blowfish block
523cipher with modifications designed to raise the cost of off-line password
524cracking and frustrate fast hardware implementation. The computation cost of
525the algorithm is parametised, so it can be increased as computers get faster.
526The intent is to make a compromise of a password database less likely to
527result in an attacker gaining knowledge of the plaintext passwords (e.g. using
528John the Ripper).")
529 ;; "sha2.c" is under BSD-3;
530 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
531 ;; the rest is under ISC.
3f641af0 532 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
533
534(define-public python2-py-bcrypt
535 (package-with-python2 python-py-bcrypt))
536
537
429fdea1
ED
538(define-public python-paramiko
539 (package
540 (name "python-paramiko")
b22cdf0c 541 (version "2.1.2")
429fdea1
ED
542 (source
543 (origin
544 (method url-fetch)
81b9bbbd 545 (uri (pypi-uri "paramiko" version))
429fdea1
ED
546 (sha256
547 (base32
b22cdf0c 548 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
429fdea1 549 (build-system python-build-system)
49910e6a 550 (arguments
b22cdf0c
SB
551 '(#:phases
552 (modify-phases %standard-phases
553 (replace 'check
554 (lambda _
555 (zero? (system* "python" "test.py")))))))
a3fc12da 556 (propagated-inputs
b22cdf0c
SB
557 `(("python-pyasn1" ,python-pyasn1)
558 ("python-cryptography" ,python-cryptography)))
429fdea1
ED
559 (home-page "http://www.paramiko.org/")
560 (synopsis "SSHv2 protocol library")
561 (description "Paramiko is a python implementation of the SSHv2 protocol,
562providing both client and server functionality. While it leverages a Python C
563extension for low level cryptography (PyCrypto), Paramiko itself is a pure
564Python interface around SSH networking concepts.")
3f641af0 565 (license license:lgpl2.1+)))
429fdea1
ED
566
567(define-public python2-paramiko
568 (package-with-python2 python-paramiko))
569
570
de73dbf6
ED
571(define-public python-httplib2
572 (package
573 (name "python-httplib2")
286f1bac 574 (version "0.9.2")
de73dbf6
ED
575 (source
576 (origin
577 (method url-fetch)
286f1bac 578 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
579 (sha256
580 (base32
286f1bac 581 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 582 (build-system python-build-system)
286f1bac 583 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
584 (synopsis "Comprehensive HTTP client library")
585 (description
586 "A comprehensive HTTP client library supporting many features left out of
587other HTTP libraries.")
588 (license license:expat)))
589
590(define-public python2-httplib2
591 (package-with-python2 python-httplib2))
592
67039875
ED
593(define-public python-ecdsa
594 (package
595 (name "python-ecdsa")
596 (version "0.13")
597 (source
598 (origin
599 (method url-fetch)
600 (uri (string-append
601 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
602 version
603 ".tar.gz"))
604 (sha256
605 (base32
606 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
607 (build-system python-build-system)
67039875
ED
608 (inputs
609 `(("openssl" ,openssl)))
610 (home-page
7bf837fd 611 "https://github.com/warner/python-ecdsa")
67039875
ED
612 (synopsis
613 "ECDSA cryptographic signature library (pure python)")
614 (description
615 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
616Curve Digital Signature Algorithm), implemented purely in Python. With this
617library, you can quickly create keypairs (signing key and verifying key), sign
618messages, and verify the signatures. The keys and signatures are very short,
619making them easy to handle and incorporate into other protocols.")
620 (license license:expat)))
621
622(define-public python2-ecdsa
623 (package-with-python2 python-ecdsa))
624
52323f32
ED
625(define-public python-ccm
626 (package
627 (name "python-ccm")
db5567f7 628 (version "2.1.6")
52323f32
ED
629 (source
630 (origin
631 (method url-fetch)
db5567f7 632 (uri (pypi-uri "ccm" version))
52323f32
ED
633 (sha256
634 (base32
db5567f7 635 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 636 (build-system python-build-system)
f22efa01 637 (propagated-inputs
52323f32 638 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
639 ;; Not listed in setup.py, but used in ccmlib/node.py for full
640 ;; functionality
641 ("python-psutil" ,python-psutil)
52323f32
ED
642 ("python-six" ,python-six)))
643 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
644 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
645localhost")
646 (description "Cassandra Cluster Manager is a development tool for testing
647local Cassandra clusters. It creates, launches and removes Cassandra clusters
648on localhost.")
3f641af0 649 (license license:asl2.0)))
52323f32
ED
650
651(define-public python2-ccm
652 (package-with-python2 python-ccm))
653
89114f39 654(define-public python-pytz
acc26ff1 655 (package
89114f39 656 (name "python-pytz")
3fee0039 657 (version "2017.2")
acc26ff1
CR
658 (source
659 (origin
660 (method url-fetch)
3fee0039 661 (uri (pypi-uri "pytz" version ".zip"))
acc26ff1
CR
662 (sha256
663 (base32
3fee0039 664 "12cmd3j46d2gcw08bspvp6s9icfcvx88zjz52n1bli9dyvl5dh7m"))))
acc26ff1 665 (build-system python-build-system)
3fee0039
MFM
666 (native-inputs
667 `(("unzip" ,unzip)))
b01bbbcf 668 (home-page "http://pythonhosted.org/pytz")
9e771e3b 669 (synopsis "Python timezone library")
3fee0039
MFM
670 (description "This library brings the Olson tz database into Python. It
671allows accurate and cross platform timezone calculations using Python 2.4 or
672higher. It also solves the issue of ambiguous times at the end of daylight
673saving time. Almost all of the Olson timezones are supported.")
b01bbbcf 674 (license license:expat)))
5ace6e2f 675
89114f39 676(define-public python2-pytz
11bb85a1 677 (package-with-python2 python-pytz))
89114f39 678
1f84ff51
MFM
679(define-public python-clyent
680 (package
681 (name "python-clyent")
682 (version "1.2.1")
683 (source
684 (origin
685 (method url-fetch)
686 (uri (pypi-uri "clyent" version))
687 (sha256
688 (base32
689 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
690 (build-system python-build-system)
691 (native-inputs
692 `(("python-mock" ,python-mock)))
693 (home-page "https://github.com/binstar/clyent")
694 (synopsis "Command line client library")
695 (description "Clyent is a Python command line utiliy library. It is used
696by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
697 (license license:bsd-3)))
698
699(define-public python2-clyent
700 (package-with-python2 python-clyent))
701
89114f39 702(define-public python-babel
5ace6e2f 703 (package
89114f39 704 (name "python-babel")
ffb1e98d 705 (version "2.3.4")
5ace6e2f
CR
706 (source
707 (origin
708 (method url-fetch)
b850a6d8 709 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
710 (sha256
711 (base32
ffb1e98d 712 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
5ace6e2f 713 (build-system python-build-system)
f22efa01 714 (propagated-inputs
f3b98f4f 715 `(("python-pytz" ,python-pytz)))
8498b8cf 716 (arguments `(#:tests? #f)) ; no test target
e1804763 717 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
718 (synopsis
719 "Tools for internationalizing Python applications")
720 (description
721 "Babel is composed of two major parts:
722- tools to build and work with gettext message catalogs
723- a Python interface to the CLDR (Common Locale Data Repository), providing
724access to various locale display names, localized number and date formatting,
725etc. ")
3f641af0 726 (license license:bsd-3)))
89114f39
AE
727
728(define-public python2-babel
11bb85a1 729 (package-with-python2 python-babel))
73adf220 730
ed377cc6
RW
731(define-public python2-backport-ssl-match-hostname
732 (package
733 (name "python2-backport-ssl-match-hostname")
f2d06d46 734 (version "3.5.0.1")
ed377cc6
RW
735 (source
736 (origin
737 (method url-fetch)
738 (uri (string-append
739 "https://pypi.python.org/packages/source/b/"
740 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
741 version ".tar.gz"))
742 (sha256
743 (base32
f2d06d46 744 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 745 (build-system python-build-system)
f2d06d46
EF
746 (arguments
747 `(#:python ,python-2
748 #:tests? #f)) ; no test target
f2d06d46
EF
749 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
750 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
751 (description
752 "This backport brings the ssl.match_hostname() function to users of
753earlier versions of Python. The function checks the hostname in the
754certificate returned by the server to which a connection has been established,
755and verifies that it matches the intended target hostname.")
3f641af0 756 (license license:psfl)))
ed377cc6 757
d205f895
TD
758(define-public python-hdf4
759 (package
760 (name "python-hdf4")
761 (version "0.9")
762 (source
763 (origin
764 (method url-fetch)
765 (uri (pypi-uri name version))
766 (sha256
767 (base32
768 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
769 (build-system python-build-system)
770 (native-inputs `(("nose" ,python-nose)))
771 (propagated-inputs `(("numpy" ,python-numpy)))
772 (inputs
773 `(("hdf4" ,hdf4)
774 ("libjpeg" ,libjpeg)
775 ("zlib" ,zlib)))
776 (arguments
777 `(#:phases
778 (modify-phases %standard-phases
779 (replace 'check
780 (lambda _
781 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
782 ;; on to import numpy. Somehow this works on their CI system.
783 ;; Let's just manage PYTHONPATH here instead.
784 (substitute* "runexamples.sh"
785 (("export PYTHONPATH=.*") ""))
786 (setenv "PYTHONPATH"
787 (string-append (getcwd) ":"
788 (getenv "PYTHONPATH")))
789 (and (zero? (system* "./runexamples.sh"))
790 (zero? (system* "nosetests" "-v"))))))))
791 (home-page "https://github.com/fhs/python-hdf4")
792 (synopsis "Python interface to the NCSA HDF4 library")
793 (description
794 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
795which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
796NetCDF files can also be read and modified. Python-HDF4 is a fork of
797@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
798 (license license:expat)))
799
800(define-public python2-hdf4
801 (package-with-python2 python-hdf4))
802
ef5cbf9b
RW
803(define-public python-h5py
804 (package
805 (name "python-h5py")
fe147c41 806 (version "2.6.0")
ef5cbf9b
RW
807 (source
808 (origin
809 (method url-fetch)
fe147c41 810 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
811 (sha256
812 (base32
fe147c41 813 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 814 (build-system python-build-system)
797e1401
RW
815 (arguments
816 `(#:tests? #f ; no test target
817 #:phases
818 (modify-phases %standard-phases
819 (add-after 'unpack 'fix-hdf5-paths
820 (lambda* (#:key inputs #:allow-other-keys)
821 (let ((prefix (assoc-ref inputs "hdf5")))
822 (substitute* "setup_build.py"
823 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
824 (string-append "['" prefix "/lib" "']"))
825 (("'/opt/local/include', '/usr/local/include'")
826 (string-append "'" prefix "/include" "'")))
827 (substitute* "setup_configure.py"
828 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
829 (string-append "['" prefix "/lib" "']")))
830 #t))))))
3c4010b1 831 (propagated-inputs
69866690
HG
832 `(("python-six" ,python-six)
833 ("python-numpy" ,python-numpy)))
ef5cbf9b 834 (inputs
69866690 835 `(("hdf5" ,hdf5)))
ef5cbf9b 836 (native-inputs
fe147c41
EF
837 `(("python-cython" ,python-cython)
838 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
839 (home-page "http://www.h5py.org/")
840 (synopsis "Read and write HDF5 files from Python")
841 (description
842 "The h5py package provides both a high- and low-level interface to the
843HDF5 library from Python. The low-level interface is intended to be a
844complete wrapping of the HDF5 API, while the high-level component supports
845access to HDF5 files, datasets and groups using established Python and NumPy
846concepts.")
9820a028 847 (license license:bsd-3)))
ef5cbf9b
RW
848
849(define-public python2-h5py
9820a028 850 (package-with-python2 python-h5py))
ef5cbf9b 851
ea8450c8
TD
852(define-public python-netcdf4
853 (package
854 (name "python-netcdf4")
d5a97839 855 (version "1.2.7")
ea8450c8
TD
856 (source
857 (origin
858 (method url-fetch)
859 (uri (pypi-uri "netCDF4" version))
860 (sha256
861 (base32
d5a97839 862 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
ea8450c8
TD
863 (build-system python-build-system)
864 (native-inputs
865 `(("python-cython" ,python-cython)))
866 (propagated-inputs
867 `(("python-numpy" ,python-numpy)))
868 (inputs
869 `(("netcdf" ,netcdf)
870 ("hdf4" ,hdf4)
871 ("hdf5" ,hdf5)))
872 (arguments
873 '(#:phases
874 (modify-phases %standard-phases
875 (replace 'check
876 (lambda _
877 (setenv "NO_NET" "1") ; disable opendap tests
878 (with-directory-excursion "test"
879 (setenv "PYTHONPATH" ; find and add the library we just built
880 (string-append
881 (car (find-files "../build" "lib.*"
882 #:directories? #:t
883 #:fail-on-error? #:t))
884 ":" (getenv "PYTHONPATH")))
885 (zero? (system* "python" "run_all.py"))))))))
886 (home-page
887 "https://github.com/Unidata/netcdf4-python")
888 (synopsis "Python/numpy interface to the netCDF library")
889 (description "Netcdf4-python is a Python interface to the netCDF C
890library. netCDF version 4 has many features not found in earlier
891versions of the library and is implemented on top of HDF5. This module
892can read and write files in both the new netCDF 4 and the old netCDF 3
893format, and can create files that are readable by HDF5 clients. The
894API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
895to users of that module.")
896 ;; The software is mainly ISC, but includes some files covered
897 ;; by the Expat license.
898 (license (list license:isc license:expat))))
899
900(define-public python2-netcdf4
901 (package-with-python2 python-netcdf4))
902
c1448c69
EB
903(define-public python-lockfile
904 (package
905 (name "python-lockfile")
692add53 906 (version "0.12.2")
c1448c69
EB
907 (source
908 (origin
909 (method url-fetch)
910 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
911 "lockfile-" version ".tar.gz"))
912 (sha256
913 (base32
692add53 914 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
915 (build-system python-build-system)
916 (arguments '(#:test-target "check"))
692add53
BW
917 (native-inputs
918 `(("python-pbr" ,python-pbr)))
6a8f26a4 919 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
920 (synopsis "Platform-independent file locking module")
921 (description
922 "The lockfile package exports a LockFile class which provides a simple
923API for locking files.")
f210e944 924 (license license:expat)))
c1448c69
EB
925
926(define-public python2-lockfile
f210e944 927 (package-with-python2 python-lockfile))
c1448c69 928
5a1a4bf6
EB
929(define-public python-mock
930 (package
931 (name "python-mock")
932 (version "1.0.1")
933 (source
934 (origin
935 (method url-fetch)
6b7877e1 936 (uri (pypi-uri "mock" version))
5a1a4bf6
EB
937 (sha256
938 (base32
939 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
940 (build-system python-build-system)
941 (arguments '(#:test-target "check"))
6b7877e1 942 (home-page "https://github.com/testing-cabal/mock")
9e771e3b 943 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
944 (description
945 "Mock is a library for testing in Python. It allows you to replace parts
946of your system under test with mock objects and make assertions about how they
947have been used.")
bd3fa666 948 (license license:expat)))
5a1a4bf6
EB
949
950(define-public python2-mock
951 (package-with-python2 python-mock))
952
731b0c72
LF
953;;; Some packages (notably, certbot and python-acme) rely on this newer version
954;;; of python-mock. However, a large number of packages fail to build with
955;;; mock@2, so we add a new variable for now. Also, there may be a dependency
956;;; cycle between mock and six, so we avoid creating python2-mock@2 for now.
957(define-public python-mock-2
958 (package
959 (inherit python-mock)
960 (version "2.0.0")
961 (source
962 (origin
963 (method url-fetch)
964 (uri (pypi-uri "mock" version))
965 (sha256
966 (base32
967 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
968 (propagated-inputs
969 `(("python-pbr" ,python-pbr-minimal)
970 ,@(package-propagated-inputs python-mock)))))
fc50e9c6 971
73adf220
AE
972(define-public python-setuptools
973 (package
974 (name "python-setuptools")
d660f7be 975 (version "31.0.0")
73adf220
AE
976 (source
977 (origin
978 (method url-fetch)
d660f7be 979 (uri (pypi-uri "setuptools" version))
73adf220
AE
980 (sha256
981 (base32
d660f7be 982 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
983 (modules '((guix build utils)))
984 (snippet
985 '(begin
986 ;; Remove included binaries which are used to build self-extracting
987 ;; installers for Windows.
988 ;; TODO: Find some way to build them ourself so we can include them.
989 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
990 #t))))
73adf220 991 (build-system python-build-system)
d3d656c5
AE
992 ;; FIXME: Tests require pytest, which itself relies on setuptools.
993 ;; One could bootstrap with an internal untested setuptools.
73adf220 994 (arguments
824af8ca 995 `(#:tests? #f))
73adf220
AE
996 (home-page "https://pypi.python.org/pypi/setuptools")
997 (synopsis
998 "Library designed to facilitate packaging Python projects")
999 (description
1000 "Setuptools is a fully-featured, stable library designed to facilitate
1001packaging Python projects, where packaging includes:
1002Python package and module definitions,
1003distribution package metadata,
1004test hooks,
1005project installation,
1006platform-specific details,
1007Python 3 support.")
d660f7be
MB
1008 ;; TODO: setuptools now bundles the following libraries:
1009 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1010 (license (list license:psfl ; setuptools itself
1011 license:expat ; six, appdirs, pyparsing
1012 license:asl2.0 ; packaging is dual ASL2/BSD-2
1013 license:bsd-2))))
73adf220
AE
1014
1015(define-public python2-setuptools
1016 (package-with-python2 python-setuptools))
fc50e9c6 1017
fa56c773
KK
1018(define-public python-uniseg
1019 (package
1020 (name "python-uniseg")
1021 (version "0.7.1")
1022 (source
1023 (origin
1024 (method url-fetch)
1025 (uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
1026 "get/rel-" version ".tar.gz"))
1027 (file-name (string-append name "-" version ".tar.gz"))
1028 (sha256
1029 (base32
1030 "1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
1031 (build-system python-build-system)
1032 (arguments
1033 '(#:tests? #f)) ; The test suite requires network access.
1034 (home-page
1035 "https://bitbucket.org/emptypage/uniseg-python")
1036 (synopsis
1037 "Python library to determine Unicode text segmentations")
1038 (description
1039 "Uniseg is a Python package used to determine Unicode text segmentations.
1040Supported segmentations include:
1041@enumerate
1042@item @dfn{Code point} (any value in the Unicode codespace)
1043@item @dfn{Grapheme cluster} (user-perceived character made of a single or
1044multiple Unicode code points, e.g. \"G\" + acute-accent)
1045@item Word break
1046@item Sentence break
1047@item Line break
1048@end enumerate")
1049 (license license:expat)))
1050
1051(define-public python2-uniseg
1052 (package-with-python2 python-uniseg))
1053
aa21c764 1054;;; Pycrypto is abandoned upstream:
1194575b 1055;;;
aa21c764 1056;;; https://github.com/dlitz/pycrypto/issues/173
1194575b 1057;;;
aa21c764 1058;;; TODO Remove this package from GNU Guix.
cafc3f5a
EB
1059(define-public python-pycrypto
1060 (package
1061 (name "python-pycrypto")
1062 (version "2.6.1")
1063 (source
1064 (origin
1065 (method url-fetch)
aa21c764
LF
1066 (uri (pypi-uri "pycrypto" version))
1067 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
cafc3f5a
EB
1068 (sha256
1069 (base32
1070 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
1071 (build-system python-build-system)
cafc3f5a
EB
1072 (inputs
1073 `(("python" ,python)
1074 ("gmp" ,gmp)))
1075 (arguments
1076 `(#:phases
1077 (alist-cons-before
1078 'build 'set-build-env
1079 ;; pycrypto runs an autoconf configure script behind the scenes
1080 (lambda _
1081 (setenv "CONFIG_SHELL" (which "bash")))
1082 %standard-phases)))
1083 (home-page "http://www.pycrypto.org/")
1084 (synopsis "Cryptographic modules for Python")
1085 (description
1086 "Pycrypto is a collection of both secure hash functions (such as SHA256
1087and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 1088etc.). The package is structured to make adding new modules easy.")
3f641af0 1089 (license license:public-domain)))
cafc3f5a 1090
345f0611 1091(define-public python2-pycrypto
1c0059da
EF
1092 (let ((pycrypto (package-with-python2 python-pycrypto)))
1093 (package (inherit pycrypto)
1094 (inputs
1095 `(("python" ,python-2)
1096 ,@(alist-delete
1097 "python"
1098 (package-inputs pycrypto)))))))
345f0611 1099
de959250 1100(define-public python-eventlet
1101 (package
1102 (name "python-eventlet")
1103 (version "0.20.1")
1104 (source
1105 (origin
1106 (method url-fetch)
1107 (uri (pypi-uri "eventlet" version))
1108 (sha256
1109 (base32
1110 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1111 (build-system python-build-system)
1112 (propagated-inputs
1113 `(("python-greenlet" ,python-greenlet)))
5150d8b4
TGR
1114 (arguments
1115 ;; TODO: Requires unpackaged 'enum-compat'.
1116 '(#:tests? #f))
de959250 1117 (home-page "http://eventlet.net")
1118 (synopsis "Concurrent networking library for Python")
1119 (description
1120 "Eventlet is a concurrent networking library for Python that
1121allows you to change how you run your code, not how you write it.
1122It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1123Coroutines ensure that the developer uses a blocking style of programming
1124that is similar to threading, but provide the benefits of non-blocking I/O.
1125The event dispatch is implicit, which means you can easily use @code{Eventlet}
1126from the Python interpreter, or as a small part of a larger application.")
1127 (license license:expat)))
1128
1129(define-public python2-eventlet
1130 (let ((base (package-with-python2
1131 (strip-python2-variant python-eventlet))))
1132 (package (inherit base)
1133 (propagated-inputs
1134 `(("python2-enum34" ,python2-enum34)
1135 ,@(package-propagated-inputs base))))))
1136
cafc3f5a
EB
1137(define-public python-keyring
1138 (package
1139 (name "python-keyring")
13f3ff35 1140 (version "8.7")
cafc3f5a
EB
1141 (source
1142 (origin
1143 (method url-fetch)
664e6c3a 1144 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
1145 (sha256
1146 (base32
13f3ff35 1147 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
1148 (build-system python-build-system)
1149 (native-inputs
13f3ff35 1150 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1151 (propagated-inputs
cafc3f5a
EB
1152 `(("python-pycrypto" ,python-pycrypto)))
1153 (arguments
664e6c3a 1154 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 1155 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
1156 (synopsis "Store and access your passwords safely")
1157 (description
1158 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 1159service from python. It can be used in any application that needs safe
cafc3f5a
EB
1160password storage.")
1161 ;; "MIT" and PSF dual license
f210e944 1162 (license license:x11)))
cafc3f5a 1163
d7af1069 1164(define-public python2-keyring
f210e944 1165 (package-with-python2 python-keyring))
d7af1069 1166
a480bc41
EB
1167(define-public python-six
1168 (package
1169 (name "python-six")
b6ab89ef 1170 (version "1.10.0")
a480bc41
EB
1171 (source
1172 (origin
1173 (method url-fetch)
b6ab89ef 1174 (uri (pypi-uri "six" version))
a480bc41
EB
1175 (sha256
1176 (base32
b6ab89ef 1177 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 1178 (build-system python-build-system)
4fd129ee
MB
1179 (native-inputs
1180 `(("python-py" ,python-py)
1181 ("python-pytest" ,python-pytest)))
a480bc41
EB
1182 (home-page "http://pypi.python.org/pypi/six/")
1183 (synopsis "Python 2 and 3 compatibility utilities")
1184 (description
35b9e423 1185 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
1186functions for smoothing over the differences between the Python versions with
1187the goal of writing Python code that is compatible on both Python versions.
35b9e423 1188Six supports every Python version since 2.5. It is contained in only one
a480bc41 1189Python file, so it can be easily copied into your project.")
3f641af0 1190 (license license:x11)))
a480bc41 1191
0c20025c
AE
1192(define-public python2-six
1193 (package-with-python2 python-six))
1194
22d7360b 1195(define-public python-dateutil
cafc3f5a
EB
1196 (package
1197 (name "python-dateutil")
e139c7a7 1198 (version "2.6.0")
cafc3f5a
EB
1199 (source
1200 (origin
1201 (method url-fetch)
394b8060 1202 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
1203 (sha256
1204 (base32
e139c7a7 1205 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
cafc3f5a 1206 (build-system python-build-system)
f22efa01 1207 (propagated-inputs
394b8060 1208 `(("python-six" ,python-six)))
b5a5fb19 1209 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
1210 (synopsis "Extensions to the standard datetime module")
1211 (description
1212 "The dateutil module provides powerful extensions to the standard
1213datetime module, available in Python 2.3+.")
f210e944 1214 (license license:bsd-3)))
cafc3f5a 1215
fc50e9c6
AE
1216(define-public python2-dateutil
1217 (package-with-python2 python-dateutil))
1d08c01f 1218
cafc3f5a
EB
1219(define-public python-parsedatetime
1220 (package
1221 (name "python-parsedatetime")
642656a1 1222 (version "2.4")
cafc3f5a
EB
1223 (source
1224 (origin
1225 (method url-fetch)
eebf6f01 1226 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1227 (sha256
1228 (base32
642656a1 1229 "0jxqkjks7z9dn222cqgvskp4wr6d92aglinxq7pd2w4mzdc7r09x"))))
cafc3f5a
EB
1230 (build-system python-build-system)
1231 (native-inputs
eebf6f01 1232 `(("python-nose" ,python-nose)
28958b64
LC
1233 ("python-pyicu" ,python-pyicu)
1234 ("python-pytest" ,python-pytest)
1235 ("python-pytest-runner" ,python-pytest-runner)))
1236 (propagated-inputs
1237 `(("python-future" ,python-future)))
7bf837fd 1238 (home-page "https://github.com/bear/parsedatetime/")
cafc3f5a
EB
1239 (synopsis
1240 "Parse human-readable date/time text")
1241 (description
e881752c 1242 "Parse human-readable date/time text.")
f210e944 1243 (license license:asl2.0)))
cafc3f5a 1244
38b8f9b2 1245(define-public python2-parsedatetime
f210e944 1246 (package-with-python2 python-parsedatetime))
38b8f9b2 1247
d072efcb
RW
1248(define-public python-pandas
1249 (package
1250 (name "python-pandas")
8e086048 1251 (version "0.19.2")
d072efcb
RW
1252 (source
1253 (origin
1b96f069 1254 (method url-fetch)
8e086048 1255 (uri (pypi-uri "pandas" version))
1b96f069 1256 (sha256
b03ee02f
MB
1257 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1258 (patches
1259 (search-patches "python-pandas-skip-failing-tests.patch"))))
d072efcb 1260 (build-system python-build-system)
d072efcb 1261 (propagated-inputs
f22efa01
HG
1262 `(("python-numpy" ,python-numpy)
1263 ("python-pytz" ,python-pytz)
22d7360b 1264 ("python-dateutil" ,python-dateutil)))
d072efcb 1265 (native-inputs
abcc7a0e
HG
1266 `(("python-nose" ,python-nose)
1267 ("python-cython" ,python-cython)))
d072efcb
RW
1268 (home-page "http://pandas.pydata.org")
1269 (synopsis "Data structures for data analysis, time series, and statistics")
1270 (description
1271 "Pandas is a Python package providing fast, flexible, and expressive data
1272structures designed to make working with structured (tabular,
1273multidimensional, potentially heterogeneous) and time series data both easy
1274and intuitive. It aims to be the fundamental high-level building block for
1275doing practical, real world data analysis in Python.")
f210e944 1276 (license license:bsd-3)))
d072efcb
RW
1277
1278(define-public python2-pandas
f210e944 1279 (package-with-python2 python-pandas))
d072efcb 1280
cafc3f5a
EB
1281(define-public python-tzlocal
1282 (package
1283 (name "python-tzlocal")
ed80839b 1284 (version "1.2.2")
cafc3f5a
EB
1285 (source
1286 (origin
1287 (method url-fetch)
226d3331 1288 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1289 (sha256
1290 (base32
ed80839b 1291 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1292 (build-system python-build-system)
f22efa01
HG
1293 (propagated-inputs
1294 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1295 (home-page "https://github.com/regebro/tzlocal")
1296 (synopsis
35b9e423 1297 "Local timezone information for Python")
cafc3f5a
EB
1298 (description
1299 "Tzlocal returns a tzinfo object with the local timezone information.
1300This module attempts to fix a glaring hole in pytz, that there is no way to
1301get the local timezone information, unless you know the zoneinfo name, and
1302under several distributions that's hard or impossible to figure out.")
3f641af0 1303 (license license:cc0)))
cafc3f5a 1304
1d08c01f
AE
1305(define-public python2-pysqlite
1306 (package
1307 (name "python2-pysqlite")
e80aaeb4 1308 (version "2.8.3")
1d08c01f
AE
1309 (source
1310 (origin
1311 (method url-fetch)
fe476868 1312 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1313 (sha256
1314 (base32
e80aaeb4 1315 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1d08c01f
AE
1316 (build-system python-build-system)
1317 (inputs
1318 `(("sqlite" ,sqlite)))
1319 (arguments
1320 `(#:python ,python-2 ; incompatible with Python 3
1321 #:tests? #f)) ; no test target
7bf837fd 1322 (home-page "https://github.com/ghaering/pysqlite")
7a03af70 1323 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1324 (description
1325 "Pysqlite provides SQLite bindings for Python that comply to the
1326Database API 2.0T.")
ed0cdf83 1327 (license license:zlib)))
1d08c01f 1328
2875caf5
AE
1329
1330(define-public python2-mechanize
1331 (package
1332 (name "python2-mechanize")
1333 (version "0.2.5")
1334 (source
1335 (origin
1336 (method url-fetch)
1337 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1338 version ".tar.gz"))
1339 (sha256
1340 (base32
1341 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1342 (build-system python-build-system)
2875caf5
AE
1343 (arguments
1344 `(#:python ,python-2 ; apparently incompatible with Python 3
1345 #:tests? #f))
1346 ;; test fails with message
1347 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1348 ;; (python-3.3.2) or
1349 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1350 ;; (python-2.7.5).
1351 ;; The source code is from March 2011 and probably not up-to-date
1352 ;; with respect to python unit tests.
1353 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1354 (synopsis
1355 "Stateful programmatic web browsing in Python")
1356 (description
1357 "Mechanize implements stateful programmatic web browsing in Python,
1358after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1359 (license (license:non-copyleft
1360 "file://COPYING"
1361 "See COPYING in the distribution."))))
2875caf5 1362
0352532e
AE
1363
1364(define-public python-simplejson
1365 (package
1366 (name "python-simplejson")
b2e6e150 1367 (version "3.10.0")
0352532e
AE
1368 (source
1369 (origin
1370 (method url-fetch)
988d1bad 1371 (uri (pypi-uri "simplejson" version))
0352532e
AE
1372 (sha256
1373 (base32
b2e6e150 1374 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1375 (build-system python-build-system)
1376 (home-page "http://simplejson.readthedocs.org/en/latest/")
1377 (synopsis
1378 "Json library for Python")
1379 (description
e881752c
AK
1380 "JSON (JavaScript Object Notation) is a subset of JavaScript
1381syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1382format.
0352532e
AE
1383
1384Simplejson exposes an API familiar to users of the standard library marshal
1385and pickle modules. It is the externally maintained version of the json
1386library contained in Python 2.6, but maintains compatibility with Python 2.5
1387and (currently) has significant performance advantages, even without using
1388the optional C extension for speedups. Simplejson is also supported on
1389Python 3.3+.")
3f641af0 1390 (license license:x11)))
0352532e
AE
1391
1392(define-public python2-simplejson
1393 (package-with-python2 python-simplejson))
421a80a2
AE
1394
1395
ed07b08d 1396(define-public python-pyicu
421a80a2 1397 (package
ed07b08d 1398 (name "python-pyicu")
2e161eaf 1399 (version "1.9.5")
421a80a2
AE
1400 (source
1401 (origin
1402 (method url-fetch)
2e161eaf 1403 (uri (pypi-uri "PyICU" version))
421a80a2
AE
1404 (sha256
1405 (base32
2e161eaf 1406 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
421a80a2 1407 (build-system python-build-system)
dc027d40
MB
1408 (arguments
1409 '(#:phases
1410 (modify-phases %standard-phases
1411 (add-before 'check 'delete-failing-test
1412 (lambda _
1413 ;; XXX: These tests require locales that are unavailable
1414 ;; in the build environment.
1415 (delete-file "test/test_DateTimeParserGenerator.py")
1416 #t)))))
421a80a2
AE
1417 (inputs
1418 `(("icu4c" ,icu4c)))
421a80a2 1419 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1420 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1421 (description
1422 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1423 (license license:x11)))
ed07b08d
LF
1424
1425(define-public python2-pyicu
f210e944 1426 (package-with-python2 python-pyicu))
cc20a22a
LC
1427
1428(define-public python2-dogtail
1429 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1430 ;; spaces in indentation" with Python 3.
1431 (package
1432 (name "python2-dogtail")
c5be3467 1433 (version "0.9.9")
cc20a22a
LC
1434 (source (origin
1435 (method url-fetch)
c5be3467 1436 (uri (pypi-uri "dogtail" version))
cc20a22a
LC
1437 (sha256
1438 (base32
c5be3467 1439 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
cc20a22a
LC
1440 (build-system python-build-system)
1441 (arguments `(#:python ,python-2
1442 #:tests? #f)) ; invalid command "test"
5ee684ff
EJ
1443 ;; Currently no offical homepage.
1444 (home-page "https://pypi.python.org/pypi/dogtail/")
1003fbcf 1445 (synopsis "GUI test tool and automation framework written in Python")
cc20a22a 1446 (description
35b9e423 1447 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1448It uses Accessibility (a11y) technologies to communicate with desktop
1449applications. dogtail scripts are written in Python and executed like any
1450other Python program.")
3f641af0 1451 (license license:gpl2+)))
515e6878 1452
011b18c3
LC
1453(define-public python2-empy
1454 (package
1455 (name "python2-empy")
1456 (version "3.3")
1457 (source (origin
1458 (method url-fetch)
1459 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1460 version ".tar.gz"))
1461 (sha256
1462 (base32
1463 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1464 (build-system python-build-system)
1465 (arguments
1466 `(#:python ,python-2
1467 #:phases (alist-replace
1468 'check
1469 (lambda _
1470 (zero? (system* "./test.sh")))
1471 %standard-phases)))
1472 (home-page "http://www.alcyone.com/software/empy/")
1473 (synopsis "Templating system for Python")
1474 (description
1475 "EmPy is a system for embedding Python expressions and statements in
1476template text; it takes an EmPy source file, processes it, and produces
1477output. This is accomplished via expansions, which are special signals to the
1cd4027c 1478EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1479EmPy can expand arbitrary Python expressions and statements in this way, as
1480well as a variety of special forms. Textual data not explicitly delimited in
1481this way is sent unaffected to the output, allowing Python to be used in
1482effect as a markup language. Also supported are callbacks via hooks,
1483recording and playback via diversions, and dynamic, chainable filters. The
1484system is highly configurable via command line options and embedded
1485commands.")
3f641af0 1486 (license license:lgpl2.1+)))
011b18c3 1487
8deeda0c
LC
1488(define-public python2-element-tree
1489 (package
1490 (name "python2-element-tree")
1491 (version "1.2.6")
1492 (source (origin
1493 (method url-fetch)
1494 (uri (string-append
1495 "http://effbot.org/media/downloads/elementtree-"
1496 version "-20050316.tar.gz"))
1497 (sha256
1498 (base32
1499 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1500 (build-system python-build-system)
1501 (arguments
1502 `(#:python ,python-2 ; seems to be part of Python 3
1503 #:tests? #f)) ; no 'test' sub-command
1504 (synopsis "Toolkit for XML processing in Python")
1505 (description
1506 "ElementTree is a Python library supporting lightweight XML processing.")
1507 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1508 (license (license:x11-style
1509 "http://docs.python.org/2/license.html"
1510 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1511
1512(define-public python2-pybugz
1513 (package
1514 (name "python2-pybugz")
1515 (version "0.6.11")
1516 (source (origin
1517 (method url-fetch)
1518 (uri (string-append
1519 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1520 version ".tar.gz"))
1521 (sha256
1522 (base32
6f194a1e 1523 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1524 (patches (search-patches "pybugz-stty.patch"
1525 "pybugz-encode-error.patch"))))
8deeda0c
LC
1526 (build-system python-build-system)
1527 (arguments
1528 `(#:python ,python-2 ; SyntaxError with Python 3
1529 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1530 (propagated-inputs
1531 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1532 (synopsis "Python and command-line interface to Bugzilla")
1533 (description
1534 "PyBugz is a Python library and command-line tool to query the Bugzilla
1535bug tracking system. It is meant as an aid to speed up interaction with the
1536bug tracker.")
1537 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1538 (license license:gpl2)))
8deeda0c 1539
a480bc41
EB
1540(define-public python-enum34
1541 (package
1542 (name "python-enum34")
5e923414 1543 (version "1.1.6")
a480bc41
EB
1544 (source
1545 (origin
1546 (method url-fetch)
d39ae1e5 1547 (uri (pypi-uri "enum34" version))
a480bc41
EB
1548 (sha256
1549 (base32
5e923414 1550 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
a480bc41 1551 (build-system python-build-system)
a480bc41
EB
1552 (home-page "https://pypi.python.org/pypi/enum34")
1553 (synopsis "Backported Python 3.4 Enum")
1554 (description
1555 "Enum34 is the new Python stdlib enum module available in Python 3.4
1556backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1557 (license license:bsd-3)))
a480bc41 1558
820acd1b
LF
1559(define-public python2-enum34
1560 (package-with-python2 python-enum34))
1561
a480bc41
EB
1562(define-public python-parse-type
1563 (package
1564 (name "python-parse-type")
1565 (version "0.3.4")
1566 (source
1567 (origin
1568 (method url-fetch)
1569 (uri (string-append "https://pypi.python.org/packages/source/p/"
1570 "parse_type/parse_type-" version ".tar.gz"))
1571 (sha256
1572 (base32
1573 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1574 (build-system python-build-system)
8ed12889
DM
1575 (arguments
1576 `(#:phases
1577 (modify-phases %standard-phases
1578 (add-after 'unpack 'patch-tests
1579 (lambda _
1580 (substitute* "tests/test_parse_type_parse.py"
1581 ;; Newer Python versions don't have the problem this test tests.
1582 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1583 ""))
1584 #t)))))
f22efa01 1585 (propagated-inputs
f3b98f4f 1586 `(("python-six" ,python-six)
68f1cdec 1587 ("python-parse" ,python-parse)))
8ed12889
DM
1588 (native-inputs
1589 `(("python-pytest" ,python-pytest)
1590 ("python-pytest-runner" ,python-pytest-runner)))
a480bc41
EB
1591 (home-page "https://github.com/jenisys/parse_type")
1592 (synopsis "Extended parse module")
1593 (description
1594 "Parse_type extends the python parse module.")
8ed12889
DM
1595 (properties
1596 `((python2-variant . ,(delay python2-parse-type))))
3f641af0 1597 (license license:bsd-3)))
a480bc41 1598
8ed12889
DM
1599(define-public python2-parse-type
1600 (let ((base (package-with-python2
1601 (strip-python2-variant python-parse-type))))
1602 (package (inherit base)
1603 (propagated-inputs
1604 `(("python2-enum34" ,python2-enum34)
1605 ,@(package-propagated-inputs base))))))
1606
a480bc41
EB
1607(define-public python-parse
1608 (package
1609 (name "python-parse")
eb3d3503 1610 (version "1.6.6")
a480bc41
EB
1611 (source
1612 (origin
1613 (method url-fetch)
eb3d3503 1614 (uri (pypi-uri "parse" version))
a480bc41
EB
1615 (sha256
1616 (base32
aa6c09ed
EF
1617 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1618 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1619 (build-system python-build-system)
1620 (arguments
1621 `(#:phases
f9a65318
EF
1622 (modify-phases %standard-phases
1623 (replace 'check
1624 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1625 (home-page "https://github.com/r1chardj0n3s/parse")
1626 (synopsis "Parse strings")
1627 (description
1628 "Parse strings using a specification based on the Python format()
1629syntax.")
3f641af0 1630 (license license:x11)))
a480bc41 1631
d3eff97a
JL
1632(define-public python-polib
1633 (package
1634 (name "python-polib")
1635 (version "1.0.8")
1636 (source (origin
1637 (method url-fetch)
1638 (uri (pypi-uri "polib" version))
1639 (sha256
1640 (base32
1641 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1642 (build-system python-build-system)
1643 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1644 (synopsis "Manipulate, create and modify gettext files")
1645 (description "Polib can manipulate any gettext format (po, pot and mo)
1646files. It can be used to create po files from scratch or to modify
1647existing ones.")
1648 (license license:expat)))
1649
1650(define-public python2-polib
1651 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1652 (package
1653 (inherit base)
1654 (arguments `(,@(package-arguments base)
1655 ;; Tests don't work with python2.
1656 #:tests? #f)))))
a480bc41 1657
515e6878
LC
1658(define-public scons
1659 (package
1660 (name "scons")
76ab3141 1661 (version "2.5.1")
515e6878
LC
1662 (source (origin
1663 (method url-fetch)
de67e922
LF
1664 (uri (string-append "mirror://sourceforge/scons/scons/" version
1665 "/scons-" version ".tar.gz"))
515e6878
LC
1666 (sha256
1667 (base32
76ab3141 1668 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
515e6878
LC
1669 (build-system python-build-system)
1670 (arguments
1671 ;; With Python 3.x, fails to build with a syntax error.
1672 `(#:python ,python-2
b3e8b4bd 1673 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1674 #:tests? #f)) ; no 'python setup.py test' command
1675 (home-page "http://scons.org/")
1676 (synopsis "Software construction tool written in Python")
1677 (description
1678 "SCons is a software construction tool. Think of SCons as an improved,
1679cross-platform substitute for the classic Make utility with integrated
1680functionality similar to autoconf/automake and compiler caches such as ccache.
1681In short, SCons is an easier, more reliable and faster way to build
1682software.")
3f641af0 1683 (license license:x11)))
011b18c3 1684
c15a5c0e
DT
1685(define-public python-extras
1686 (package
1687 (name "python-extras")
1688 (version "0.0.3")
1689 (source
1690 (origin
1691 (method url-fetch)
1692 (uri (string-append
1693 "https://pypi.python.org/packages/source/e/extras/extras-"
1694 version ".tar.gz"))
1695 (sha256
1696 (base32
1697 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1698 (build-system python-build-system)
c15a5c0e
DT
1699 (arguments
1700 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1701 '(#:tests? #f))
1702 (home-page "https://github.com/testing-cabal/extras")
1703 (synopsis "Useful extensions to the Python standard library")
1704 (description
1705 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1706 (license license:expat)))
c15a5c0e
DT
1707
1708(define-public python2-extras
1709 (package-with-python2 python-extras))
1710
56ea0efd
DT
1711(define-public python-mimeparse
1712 (package
1713 (name "python-mimeparse")
1714 (version "0.1.4")
1715 (source
1716 (origin
1717 (method url-fetch)
1718 (uri (string-append
1719 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1720 version ".tar.gz"))
1721 (sha256
1722 (base32
1723 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1724 (build-system python-build-system)
56ea0efd
DT
1725 (arguments
1726 '(#:tests? #f)) ; no setup.py test command
1727 (home-page
1728 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1729 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1730 (description
1731 "Mimeparse provides basic functions for parsing MIME type names and
1732matching them against a list of media-ranges.")
bd3fa666 1733 (license license:expat)))
56ea0efd
DT
1734
1735(define-public python2-mimeparse
1736 (package-with-python2 python-mimeparse))
1737
4435427e
DT
1738(define-public python-nose
1739 (package
1740 (name "python-nose")
f7cb9841 1741 (version "1.3.7")
4435427e
DT
1742 (source
1743 (origin
1744 (method url-fetch)
f7cb9841 1745 (uri (pypi-uri "nose" version))
4435427e
DT
1746 (sha256
1747 (base32
f7cb9841 1748 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1749 (build-system python-build-system)
4435427e
DT
1750 (arguments
1751 '(#:tests? #f)) ; FIXME: test suite fails
1752 (home-page "http://readthedocs.org/docs/nose/")
1753 (synopsis "Python testing library")
1754 (description
1755 "Nose extends the unittest library to make testing easier.")
3f641af0 1756 (license license:lgpl2.0+)))
4435427e
DT
1757
1758(define-public python2-nose
1759 (package-with-python2 python-nose))
1760
0aea283a
EF
1761(define-public python-nose2
1762 (package
1763 (name "python-nose2")
1764 (version "0.6.5")
1765 (source
1766 (origin
1767 (method url-fetch)
1768 (uri (pypi-uri "nose2" version))
1769 (sha256
1770 (base32
1771 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1772 (build-system python-build-system)
1773 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1774 (propagated-inputs
0aea283a
EF
1775 `(("python-cov-core" ,python-cov-core)
1776 ("python-pytest-cov" ,python-pytest-cov)
1777 ("python-six" ,python-six)))
1778 (home-page "https://github.com/nose-devs/nose2")
1779 (synopsis "Next generation of nicer testing for Python")
1780 (description
1781 "Nose2 is the next generation of nicer testing for Python, based on the
1782plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1783better plugin api, being easier for users to configure, and simplifying internal
1784interfaces and processes.")
1785 (license license:bsd-2)))
1786
1787(define-public python2-nose2
1788 (package-with-python2 python-nose2))
1789
6cd9c356
DT
1790(define-public python-unittest2
1791 (package
1792 (name "python-unittest2")
1793 (version "0.5.1")
1794 (source
1795 (origin
1796 (method url-fetch)
1797 (uri (string-append
1798 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1799 version ".tar.gz"))
1800 (sha256
1801 (base32
1802 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1803 (build-system python-build-system)
6cd9c356
DT
1804 (home-page "http://pypi.python.org/pypi/unittest2")
1805 (synopsis "Python unit testing library")
1806 (description
1807 "Unittest2 is a replacement for the unittest module in the Python
1808standard library.")
3f641af0 1809 (license license:psfl)))
6cd9c356
DT
1810
1811(define-public python2-unittest2
1812 (package (inherit python-unittest2)
1813 (name "python2-unittest2")
1814 (version "0.5.1")
1815 (source
1816 (origin
1817 (method url-fetch)
1818 (uri (string-append
1819 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1820 version ".tar.gz"))
1821 (sha256
1822 (base32
1823 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1824 (arguments
1825 `(#:python ,python-2
1826 #:tests? #f)))) ; no setup.py test command
1827
02f8f804 1828(define-public python-pafy
1829 (package
1830 (name "python-pafy")
745d85b7 1831 (version "0.5.3.1")
02f8f804 1832 (source
1833 (origin
1834 (method url-fetch)
1835 (uri (pypi-uri "pafy" version))
1836 (sha256
1837 (base32
745d85b7 1838 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
02f8f804 1839 (build-system python-build-system)
ed3fee5f 1840 (arguments
1841 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1842 (propagated-inputs
1843 ;; Youtube-dl is a python package which is imported in the file
1844 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1845 `(("youtube-dl" ,youtube-dl)))
1846 (home-page "https://np1.github.io/pafy/")
1847 (synopsis "Retrieve YouTube content and metadata")
1848 (description
1849 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1850 (license license:lgpl3+)))
1851
542ad60f
DT
1852(define-public python-py
1853 (package
1854 (name "python-py")
b9463fdb 1855 (version "1.4.32")
542ad60f
DT
1856 (source
1857 (origin
1858 (method url-fetch)
71c8a804 1859 (uri (pypi-uri "py" version))
542ad60f
DT
1860 (sha256
1861 (base32
b9463fdb 1862 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
542ad60f 1863 (build-system python-build-system)
dcb0da7b
MB
1864 (arguments
1865 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1866 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1867 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1868 ;; Is this module globally installed?"
1869 '(#:tests? #f))
542ad60f
DT
1870 (home-page "http://pylib.readthedocs.org/")
1871 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1872 (description
1873 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1874code introspection, and logging.")
bd3fa666 1875 (license license:expat)))
542ad60f
DT
1876
1877(define-public python2-py
1878 (package-with-python2 python-py))
1879
855d4761
DT
1880(define-public python-pytest
1881 (package
1882 (name "python-pytest")
61a4332d 1883 (version "2.7.3")
855d4761
DT
1884 (source
1885 (origin
1886 (method url-fetch)
1887 (uri (string-append
1888 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1889 version ".tar.gz"))
1890 (sha256
1891 (base32
61a4332d 1892 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1893 (modules '((guix build utils)))
1894 (snippet
1895 ;; One of the tests involves the /usr directory, so it fails.
1896 '(substitute* "testing/test_argcomplete.py"
1897 (("def test_remove_dir_prefix\\(self\\):")
1898 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1899 (build-system python-build-system)
482d9591
HG
1900 (propagated-inputs
1901 `(("python-py" ,python-py)))
e7881f3d 1902 (native-inputs
482d9591 1903 `(("python-nose" ,python-nose)
855d4761
DT
1904 ("python-mock" ,python-mock)))
1905 (home-page "http://pytest.org")
1906 (synopsis "Python testing library")
1907 (description
1908 "Pytest is a testing tool that provides auto-discovery of test modules
1909and functions, detailed info on failing assert statements, modular fixtures,
1910and many external plugins.")
bd3fa666 1911 (license license:expat)))
855d4761
DT
1912
1913(define-public python2-pytest
1914 (package-with-python2 python-pytest))
1915
23b9168d
LF
1916;; Some packages require a newer pytest.
1917(define-public python-pytest-3.0
fca4ff35
LF
1918 (package
1919 (inherit python-pytest)
1920 (name "python-pytest")
23b9168d 1921 (version "3.0.7")
fca4ff35
LF
1922 (source (origin
1923 (method url-fetch)
1924 (uri (pypi-uri "pytest" version))
1925 (sha256
1926 (base32
23b9168d 1927 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
fca4ff35
LF
1928 (arguments
1929 `(#:phases
1930 (modify-phases %standard-phases
1931 (add-before 'check 'disable-invalid-test
1932 (lambda _
1933 (substitute* "testing/test_argcomplete.py"
1934 (("def test_remove_dir_prefix" line)
1935 (string-append "@pytest.mark.skip"
1936 "(reason=\"Assumes that /usr exists.\")\n "
1937 line)))
23b9168d 1938 #t)))))
7f71e257
MFM
1939 (native-inputs
1940 `(("python-nose" ,python-nose)
1941 ("python-mock" ,python-mock)
23b9168d
LF
1942 ("python-hypothesis" ,python-hypothesis)))
1943 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1944
1945(define-public python2-pytest-3.0
1946 (let ((base (package-with-python2
1947 (strip-python2-variant python-pytest-3.0))))
1948 (package (inherit base)
1949 (native-inputs
1950 `(("python2-enum34" ,python2-enum34)
1951 ,@(package-native-inputs base))))))
fca4ff35 1952
358c3d61
EF
1953(define-public python-pytest-cov
1954 (package
1955 (name "python-pytest-cov")
1aecfe17 1956 (version "2.4.0")
358c3d61
EF
1957 (source
1958 (origin
1959 (method url-fetch)
1960 (uri (pypi-uri "pytest-cov" version))
1961 (sha256
545f4a1c 1962 (base32
1aecfe17 1963 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
10468636 1964 (build-system python-build-system)
ce40b383
HG
1965 (arguments
1966 `(#:phases
1967 (modify-phases %standard-phases
1968 (replace 'check
1969 (lambda _
1970 ;; options taken from tox.ini
1971 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1972 ;; with "Duplicate implicit target name"
1973 (zero? (system* "python" "./setup.py" "check"
1974 "--strict" "--metadata")))))))
f22efa01 1975 (propagated-inputs
10468636
EF
1976 `(("python-coverage" ,python-coverage)
1977 ("python-pytest" ,python-pytest)))
10468636
EF
1978 (home-page "https://github.com/pytest-dev/pytest-cov")
1979 (synopsis "Pytest plugin for measuring coverage")
1980 (description
1981 "Pytest-cov produces coverage reports. It supports centralised testing and
1982distributed testing in both @code{load} and @code{each} modes. It also
1983supports coverage of subprocesses.")
f210e944 1984 (license license:expat)))
358c3d61
EF
1985
1986(define-public python2-pytest-cov
f210e944 1987 (package-with-python2 python-pytest-cov))
358c3d61 1988
6784f2e3
RW
1989(define-public python-pytest-runner
1990 (package
1991 (name "python-pytest-runner")
047160f2 1992 (version "2.11.1")
6784f2e3
RW
1993 (source
1994 (origin
1995 (method url-fetch)
54cd239b 1996 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1997 (sha256
1998 (base32
047160f2 1999 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
6784f2e3
RW
2000 (build-system python-build-system)
2001 (arguments
2002 `(#:phases
2003 (modify-phases %standard-phases
2004 ;; The fancy way of setting the version with setuptools_scm does not
2005 ;; seem to work here.
2006 (add-after 'unpack 'set-version
2007 (lambda _
2008 (substitute* "docs/conf.py"
2009 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
2010 (string-append "version = \"" ,version "\"")))
2011 #t)))))
2012 (native-inputs
2013 `(("python-pytest" ,python-pytest)
2014 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 2015 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
2016 (synopsis "Invoke py.test as a distutils command")
2017 (description
2018 "This package provides a @command{pytest-runner} command that
2019@file{setup.py} files can use to run tests.")
f210e944 2020 (license license:expat)))
54cd239b
EF
2021
2022(define-public python2-pytest-runner
f210e944 2023 (package-with-python2 python-pytest-runner))
6784f2e3 2024
44547e51
EF
2025(define-public python-pytest-mock
2026 (package
2027 (name "python-pytest-mock")
2028 (version "1.2")
2029 (source
2030 (origin
2031 (method url-fetch)
2032 (uri (pypi-uri "pytest-mock" version ".zip"))
2033 (sha256
2034 (base32
2035 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
2036 (build-system python-build-system)
2037 (native-inputs
2038 `(("unzip" ,unzip)))
f22efa01 2039 (propagated-inputs
d5e41cf2 2040 `(("python-pytest" ,python-pytest)))
44547e51
EF
2041 (home-page "https://github.com/pytest-dev/pytest-mock/")
2042 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
2043 (description
2044 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
2045around the patching API provided by the @code{mock} package, but with the
2046benefit of not having to worry about undoing patches at the end of a test.
2047The mocker fixture has the same API as @code{mock.patch}, supporting the
2048same arguments.")
2049 (properties `((python2-variant . ,(delay python2-pytest-mock))))
2050 (license license:expat)))
2051
2052(define-public python2-pytest-mock
2053 (let ((base (package-with-python2
2054 (strip-python2-variant python-pytest-mock))))
2055 (package (inherit base)
f22efa01 2056 (propagated-inputs
44547e51 2057 `(("python2-mock" ,python2-mock)
f22efa01 2058 ,@(package-propagated-inputs base))))))
44547e51 2059
8fa58fc9
CAW
2060(define-public python-pytest-xdist
2061 (package
2062 (name "python-pytest-xdist")
2063 (version "1.14")
2064 (source
2065 (origin
2066 (method url-fetch)
2067 (uri (pypi-uri "pytest-xdist" version ".zip"))
2068 (sha256
2069 (base32
de585a7e
HG
2070 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
2071 (modules '((guix build utils)))
2072 (snippet
2073 '(begin
2074 ;; Remove pre-compiled .pyc files from source.
2075 (for-each delete-file-recursively
2076 (find-files "." "__pycache__" #:directories? #t))
2077 (for-each delete-file (find-files "." "\\.pyc$"))
2078 #t))))
8fa58fc9 2079 (build-system python-build-system)
4eb385fb
MB
2080 (arguments
2081 '(#:tests? #f)) ;FIXME: Some tests are failing.
2082 ;; #:phases
2083 ;; (modify-phases %standard-phases
2084 ;; (delete 'check)
2085 ;; (add-after 'install 'check
2086 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2087 ;; (add-installed-pythonpath inputs outputs)
2088 ;; (zero? (system* "py.test" "-v")))))
8fa58fc9
CAW
2089 (native-inputs
2090 `(("unzip" ,unzip)
8fa58fc9 2091 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 2092 (propagated-inputs
c4516ad2 2093 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
2094 ("python-pytest" ,python-pytest)
2095 ("python-py" ,python-py)))
2096 (home-page
2097 "https://github.com/pytest-dev/pytest-xdist")
2098 (synopsis
2099 "Plugin for py.test with distributed testing and loop-on-failing modes")
2100 (description
2101 "The pytest-xdist plugin extends py.test with some unique test execution
2102modes: parallelization, running tests in boxed subprocesses, the ability
2103to run tests repeatedly when failed, and the ability to run tests on multiple
2104Python interpreters or platforms. It uses rsync to copy the existing
2105program code to a remote location, executes there, and then syncs the
2106result back.")
f210e944 2107 (license license:expat)))
8fa58fc9
CAW
2108
2109(define-public python2-pytest-xdist
f210e944 2110 (package-with-python2 python-pytest-xdist))
8fa58fc9 2111
84d24017
DT
2112(define-public python-scripttest
2113 (package
2114 (name "python-scripttest")
2115 (version "1.3")
2116 (source
2117 (origin
2118 (method url-fetch)
2119 (uri (string-append
2120 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2121 version ".tar.gz"))
2122 (sha256
2123 (base32
2124 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2125 (build-system python-build-system)
521b7772 2126 (native-inputs
f3b98f4f 2127 `(("python-pytest" ,python-pytest)))
84d24017
DT
2128 (home-page "http://pythonpaste.org/scripttest/")
2129 (synopsis "Python library to test command-line scripts")
2130 (description "Scripttest is a Python helper library for testing
2131interactive command-line applications. With it you can run a script in a
2132subprocess and see the output as well as any file modifications.")
bd3fa666 2133 (license license:expat)))
84d24017
DT
2134
2135(define-public python2-scripttest
2136 (package-with-python2 python-scripttest))
2137
d8fa80e1
DT
2138(define-public python-testtools
2139 (package
2140 (name "python-testtools")
7adb9031 2141 (version "1.4.0")
d8fa80e1
DT
2142 (source
2143 (origin
2144 (method url-fetch)
7adb9031 2145 (uri (pypi-uri "testtools" version))
d8fa80e1
DT
2146 (sha256
2147 (base32
7adb9031 2148 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
d8fa80e1 2149 (build-system python-build-system)
7adb9031
DM
2150 (arguments
2151 `(#:phases
2152 (modify-phases %standard-phases
2153 (add-after 'unpack 'fix-module-imports
2154 (lambda _
2155 (substitute* "setup.py"
2156 (("'unittest2>=0.8.0',") ""))
2157 (substitute* '("testtools/testcase.py"
2158 "testtools/testsuite.py"
2159 "testtools/run.py"
2160 "testtools/tests/test_run.py"
2161 "testtools/tests/test_testsuite.py"
2162 "testtools/tests/test_deferredruntest.py")
2163 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2164 (("import unittest2 as unittest") "import unittest")
2165 (("import unittest2") "import unittest as unittest2")
2166 (("from unittest2 import") "from unittest import"))
2167 (substitute* "testtools/tests/test_testresult.py"
2168 ;; NUL in source code is not allowed (raises ValueError).
2169 (("\\x00\\x04") "\\x04"))
2170 #t)))))
0e88cbf8 2171 (propagated-inputs
f22efa01
HG
2172 `(("python-mimeparse" ,python-mimeparse)
2173 ("python-extras" ,python-extras)))
d8fa80e1
DT
2174 (home-page "https://github.com/testing-cabal/testtools")
2175 (synopsis
2176 "Extensions to the Python standard library unit testing framework")
2177 (description
2178 "Testtools extends the Python standard library unit testing framework to
2179provide matchers, more debugging information, and cross-Python
2180compatibility.")
3f641af0 2181 (license license:psfl)))
d8fa80e1
DT
2182
2183(define-public python2-testtools
2184 (package-with-python2 python-testtools))
2185
5bf3afea
DT
2186(define-public python-testscenarios
2187 (package
2188 (name "python-testscenarios")
2189 (version "0.4")
2190 (source
2191 (origin
2192 (method url-fetch)
2193 (uri (string-append
2194 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2195 version ".tar.gz"))
2196 (sha256
2197 (base32
2198 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2199 (build-system python-build-system)
f22efa01 2200 (propagated-inputs
8e73d3ba 2201 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
2202 (home-page "https://launchpad.net/testscenarios")
2203 (synopsis "Pyunit extension for dependency injection")
2204 (description
2205 "Testscenarios provides clean dependency injection for Python unittest
2206style tests.")
3f641af0 2207 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
2208
2209(define-public python2-testscenarios
2210 (package-with-python2 python-testscenarios))
2211
dac79ecc
DT
2212(define-public python-testresources
2213 (package
2214 (name "python-testresources")
2215 (version "0.2.7")
2216 (source
2217 (origin
2218 (method url-fetch)
2219 (uri (string-append
2220 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2221 version ".tar.gz"))
2222 (sha256
2223 (base32
2224 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2225 (build-system python-build-system)
dac79ecc
DT
2226 (home-page "https://launchpad.net/testresources")
2227 (synopsis
2228 "Pyunit extension for managing test resources")
2229 (description
2230 "Testresources is an extension to Python's unittest to allow declarative
2231use of resources by test cases.")
3f641af0 2232 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
2233
2234(define-public python2-testresources
2235 (package-with-python2 python-testresources))
2236
070ab058
DT
2237(define-public python-subunit
2238 (package
2239 (name "python-subunit")
2240 (version "0.0.21")
2241 (source
2242 (origin
2243 (method url-fetch)
2244 (uri (string-append
2245 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2246 version ".tar.gz"))
2247 (sha256
2248 (base32
2249 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2250 (build-system python-build-system)
f22efa01 2251 (propagated-inputs
b52ad371
HG
2252 `(("python-extras" ,python-extras)
2253 ("python-mimeparse" ,python-mimeparse)))
2254 (native-inputs
2255 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
2256 (home-page "http://launchpad.net/subunit")
2257 (synopsis "Python implementation of the subunit protocol")
2258 (description
2259 "Python-subunit is a Python implementation of the subunit test streaming
2260protocol.")
3f641af0 2261 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2262
2263(define-public python2-subunit
2264 (package-with-python2 python-subunit))
2265
d2a8db92
HG
2266;; Recent versions of python-fixtures and python-testrepository need
2267;; python-pbr for packaging, which itself needs these two packages for
2268;; testing.
2269;; To fix this circular dependency, we use a build of python-pbr, based on the
2270;; same source, just without any test dependencies and with tests disabled.
2271;; python-pbr-minmal is then used to package python-fixtures and
2272;; python-testrepository.
2273;; Strictly speaking we currently could remove the test-requirements from the
2274;; normal python-pbr package (and save this package) since test are disabled
2275;; there anyway. But this may change in future.
2276(define python-pbr-minimal
cd49454b 2277 (package
d2a8db92 2278 (name "python-pbr-minimal")
5bbb2249 2279 (version "1.10.0")
7787ef76
CR
2280 (source
2281 (origin
2282 (method url-fetch)
d2a8db92 2283 (uri (pypi-uri "pbr" version))
7787ef76
CR
2284 (sha256
2285 (base32
a1e3ed6e
DM
2286 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2287 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
7787ef76
CR
2288 (build-system python-build-system)
2289 (arguments
d2a8db92
HG
2290 `(#:tests? #f))
2291 (home-page "http://docs.openstack.org/developer/pbr/")
2292 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2293 (description
d2a8db92 2294 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2295 (license license:asl2.0)))
7787ef76 2296
d2a8db92
HG
2297(define python2-pbr-minimal
2298 (package-with-python2 python-pbr-minimal))
7787ef76 2299
1ef09c0c 2300(define-public python-pbr
e25f0174 2301 (package
d2a8db92 2302 (inherit python-pbr-minimal)
e25f0174 2303 (name "python-pbr")
e25f0174
BW
2304 (arguments
2305 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2306 (propagated-inputs
d2a8db92
HG
2307 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2308 (native-inputs
e25f0174 2309 `(("python-fixtures" ,python-fixtures)
d2a8db92 2310 ;; discover, coverage, hacking, subunit
e25f0174 2311 ("python-mock" ,python-mock)
d2a8db92 2312 ("python-six" ,python-six)
e25f0174
BW
2313 ("python-sphinx" ,python-sphinx)
2314 ("python-testrepository" ,python-testrepository)
2315 ("python-testresources" ,python-testresources)
2316 ("python-testscenarios" ,python-testscenarios)
2317 ("python-testtools" ,python-testtools)
2318 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2319 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2320 (description
2321 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2322and sensible default behaviors into your setuptools run. It will set
2323versions, process requirements files and generate AUTHORS and ChangeLog file
2324from git information.
2325")))
1ef09c0c
BW
2326
2327(define-public python2-pbr
e25f0174 2328 (package-with-python2 python-pbr))
1ef09c0c 2329
7787ef76
CR
2330(define-public python-fixtures
2331 (package
2332 (name "python-fixtures")
13fcc6df 2333 (version "1.4.0")
7787ef76
CR
2334 (source
2335 (origin
2336 (method url-fetch)
13fcc6df 2337 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2338 (sha256
2339 (base32
13fcc6df 2340 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76 2341 (build-system python-build-system)
f6c1ef18
MB
2342 (arguments
2343 '(#:phases
2344 (modify-phases %standard-phases
2345 (replace 'check
2346 (lambda _
2347 (zero? (system* "python" "-m" "testtools.run"
2348 "fixtures.test_suite")))))))
7787ef76 2349 (propagated-inputs
ae92cadd 2350 `(("python-six" ,python-six)))
e7881f3d 2351 (native-inputs
f6c1ef18
MB
2352 `(("python-mock" ,python-mock)
2353 ("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2354 ("python-testtools" ,python-testtools)))
7787ef76
CR
2355 (home-page "https://launchpad.net/python-fixtures")
2356 (synopsis "Python test fixture library")
2357 (description
2358 "Fixtures provides a way to create reusable state, useful when writing
2359Python tests.")
3f641af0 2360 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2361
cd49454b
DT
2362(define-public python2-fixtures
2363 (package-with-python2 python-fixtures))
2364
b24a0c00
DT
2365(define-public python-testrepository
2366 (package
2367 (name "python-testrepository")
2368 (version "0.0.20")
2369 (source
2370 (origin
2371 (method url-fetch)
2372 (uri (string-append
2373 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2374 version ".tar.gz"))
2375 (sha256
2376 (base32
2377 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2378 (build-system python-build-system)
90110ef9
MB
2379 (arguments
2380 ;; FIXME: Many tests are failing.
2381 '(#:tests? #f))
05de40c5 2382 (propagated-inputs
b2e66edf
HG
2383 `(("python-fixtures" ,python-fixtures)
2384 ("python-subunit" ,python-subunit)
b52ad371
HG
2385 ("python-testtools" ,python-testtools)))
2386 (native-inputs
2387 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2388 ("python-mimeparse" ,python-mimeparse)))
2389 (home-page "https://launchpad.net/testrepository")
2390 (synopsis "Database for Python test results")
2391 (description "Testrepository provides a database of test results which can
2392be used as part of a developer's workflow to check things such as what tests
2393have failed since the last commit or what tests are currently failing.")
3f641af0 2394 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2395
2396(define-public python2-testrepository
2397 (package-with-python2 python-testrepository))
2398
243a009a
DT
2399(define-public python-coverage
2400 (package
2401 (name "python-coverage")
4d4cf3dd 2402 (version "4.1")
243a009a
DT
2403 (source
2404 (origin
2405 (method url-fetch)
82a3c582 2406 (uri (pypi-uri "coverage" version))
243a009a
DT
2407 (sha256
2408 (base32
4d4cf3dd 2409 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2410 (build-system python-build-system)
bd10e677
MB
2411 (arguments
2412 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2413 '(#:tests? #f))
243a009a
DT
2414 (home-page "http://nedbatchelder.com/code/coverage")
2415 (synopsis "Code coverage measurement for Python")
2416 (description
2417 "Coverage measures code coverage, typically during test execution. It
2418uses the code analysis tools and tracing hooks provided in the Python standard
2419library to determine which lines are executable, and which have been
2420executed.")
3f641af0 2421 (license license:bsd-3)))
243a009a
DT
2422
2423(define-public python2-coverage
2424 (package-with-python2 python-coverage))
2425
12f839fd
EF
2426(define-public python-cov-core
2427 (package
2428 (name "python-cov-core")
2429 (version "1.15.0")
2430 (source
2431 (origin
2432 (method url-fetch)
2433 (uri (pypi-uri "cov-core" version))
2434 (sha256
2435 (base32
2436 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2437 (build-system python-build-system)
f78e1c27 2438 (propagated-inputs
12f839fd
EF
2439 `(("python-coverage" ,python-coverage)))
2440 (home-page "https://github.com/schlamar/cov-core")
49d5e338 2441 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
12f839fd 2442 (description
49d5e338
TGR
2443 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2444and @code{nose2-cov}. It is useful for developing coverage plugins for these
2445testing frameworks.")
f210e944 2446 (license license:expat)))
12f839fd
EF
2447
2448(define-public python2-cov-core
f210e944 2449 (package-with-python2 python-cov-core))
12f839fd 2450
041358fb
DT
2451(define-public python-discover
2452 (package
2453 (name "python-discover")
2454 (version "0.4.0")
2455 (source
2456 (origin
2457 (method url-fetch)
2458 (uri (string-append
2459 "https://pypi.python.org/packages/source/d/discover/discover-"
2460 version ".tar.gz"))
2461 (sha256
2462 (base32
2463 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2464 (build-system python-build-system)
041358fb
DT
2465 (home-page "http://pypi.python.org/pypi/discover/")
2466 (synopsis
2467 "Python test discovery for unittest")
2468 (description
2469 "Discover provides test discovery for unittest, a feature that has been
e881752c 2470backported from Python 2.7 for Python 2.4+.")
3f641af0 2471 (license license:bsd-3)))
041358fb
DT
2472
2473(define-public python2-discover
2474 (package-with-python2 python-discover))
2475
a480bc41
EB
2476(define-public behave
2477 (package
2478 (name "behave")
287cfd1a 2479 (version "1.2.5")
a480bc41
EB
2480 (source (origin
2481 (method url-fetch)
287cfd1a 2482 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2483 (sha256
2484 (base32
287cfd1a 2485 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2486 (build-system python-build-system)
f22efa01 2487 (propagated-inputs
f3b98f4f 2488 `(("python-six" ,python-six)
a480bc41
EB
2489 ("python-parse" ,python-parse)
2490 ("python-parse-type" ,python-parse-type)))
2491 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2492 ;PyHamcrest>=1.8
7bf837fd 2493 (home-page "https://github.com/behave/behave")
a480bc41
EB
2494 (synopsis "Python behavior-driven development")
2495 (description
2496 "Behave is a tool for behavior-driven development in python.
2497Behavior-driven development (or BDD) is an agile software development
2498technique that encourages collaboration between developers, QA and
2499non-technical or business participants in a software project. Behave uses
2500tests written in a natural language style, backed up by Python code.")
3f641af0 2501 (license license:x11)))
c7303d3c
DT
2502
2503(define-public python-exif-read
2504 (package
2505 (name "python-exif-read")
2a2d0981 2506 (version "2.1.2")
c7303d3c
DT
2507 (source (origin
2508 (method url-fetch)
2a2d0981 2509 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2510 (sha256
2511 (base32
2a2d0981 2512 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2513 (build-system python-build-system)
c7303d3c
DT
2514 (arguments `(#:tests? #f)) ; no tests
2515 (home-page "https://github.com/ianare/exif-py")
2516 (synopsis "Python library to extract EXIF data from image files")
2517 (description
2518 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2519files.")
3f641af0 2520 (license license:bsd-3)))
c7303d3c
DT
2521
2522(define-public python2-exif-read
2523 (package-with-python2 python-exif-read))
d5f89b22
DT
2524
2525(define-public python-pyld
2526 (package
2527 (name "python-pyld")
8957af32 2528 (version "0.7.1")
d5f89b22
DT
2529 (source (origin
2530 (method url-fetch)
af1ab773 2531 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2532 (sha256
2533 (base32
8957af32 2534 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2535 (build-system python-build-system)
d5f89b22 2536 (arguments `(#:tests? #f)) ; no tests
7bf837fd 2537 (home-page "https://github.com/digitalbazaar/pyld")
d5f89b22
DT
2538 (synopsis "Python implementation of the JSON-LD specification")
2539 (description
2540 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2541 (license license:bsd-3)))
d5f89b22
DT
2542
2543(define-public python2-pyld
2544 (package-with-python2 python-pyld))
3a1f9a68
DT
2545
2546(define-public python-certifi
2547 (package
2548 (name "python-certifi")
28576403 2549 (version "2017.1.23")
3a1f9a68
DT
2550 (source (origin
2551 (method url-fetch)
9a41f443 2552 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2553 (sha256
2554 (base32
28576403 2555 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
3a1f9a68 2556 (build-system python-build-system)
28576403 2557 (home-page "https://certifi.io/")
3a1f9a68
DT
2558 (synopsis "Python CA certificate bundle")
2559 (description
2560 "Certifi is a Python library that contains a CA certificate bundle, which
2561is used by the Requests library to verify HTTPS requests.")
3f641af0 2562 (license license:asl2.0)))
3a1f9a68
DT
2563
2564(define-public python2-certifi
2565 (package-with-python2 python-certifi))
e6cfbd36 2566
12c270dd
RW
2567(define-public python-click
2568 (package
2569 (name "python-click")
d4acb6db 2570 (version "6.7")
12c270dd
RW
2571 (source
2572 (origin
2573 (method url-fetch)
375f224b 2574 (uri (pypi-uri "click" version))
12c270dd 2575 (sha256
43accb58 2576 (base32
d4acb6db 2577 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
12c270dd 2578 (build-system python-build-system)
e2ab5a09
BW
2579 (arguments
2580 `(#:phases
2581 (modify-phases %standard-phases
2582 (add-after 'unpack 'fix-paths
2583 (lambda* (#:key inputs #:allow-other-keys)
2584 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2585 "cross-libc" "libc"))))
2586 (substitute* "click/_unicodefun.py"
2587 (("'locale'")
2588 (string-append "'" glibc "/bin/locale'"))))
97be1bc2
MB
2589 #t))
2590 (replace 'check
2591 (lambda _
2592 (zero? (system* "make" "test")))))))
2593 (native-inputs
2594 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2595 (home-page "http://click.pocoo.org")
2596 (synopsis "Command line library for Python")
2597 (description
2598 "Click is a Python package for creating command line interfaces in a
2599composable way with as little code as necessary. Its name stands for
2600\"Command Line Interface Creation Kit\". It's highly configurable but comes
2601with sensible defaults out of the box.")
3f641af0 2602 (license license:bsd-3)))
12c270dd
RW
2603
2604(define-public python2-click
2605 (package-with-python2 python-click))
2606
addc808d
EF
2607(define-public python-wheel
2608 (package
2609 (name "python-wheel")
0e6df70b 2610 (version "0.30.0a0")
e1ba0749
EF
2611 (source
2612 (origin
2613 (method url-fetch)
2614 (uri (pypi-uri "wheel" version))
2615 (sha256
2616 (base32
0e6df70b 2617 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
e1ba0749
EF
2618 (build-system python-build-system)
2619 (native-inputs
f3b98f4f 2620 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2621 ("python-pytest-cov" ,python-pytest-cov)))
2622 (home-page "https://bitbucket.org/pypa/wheel/")
2623 (synopsis "Format for built Python packages")
2624 (description
2625 "A wheel is a ZIP-format archive with a specially formatted filename and
2626the @code{.whl} extension. It is designed to contain all the files for a PEP
2627376 compatible install in a way that is very close to the on-disk format. Many
2628packages will be properly installed with only the @code{Unpack} step and the
2629unpacked archive preserves enough information to @code{Spread} (copy data and
2630scripts to their final locations) at any later time. Wheel files can be
2631installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2632 (license license:expat)
2633 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2634
2635(define-public python2-wheel
8ad4ae20
LF
2636 (let ((wheel (package-with-python2
2637 (strip-python2-variant python-wheel))))
264ae686 2638 (package (inherit wheel)
8ad4ae20
LF
2639 (native-inputs `(("python2-functools32" ,python2-functools32)
2640 ,@(package-native-inputs wheel))))))
2641
addc808d 2642
ae641128 2643(define-public python-requests
e6cfbd36 2644 (package
ae641128 2645 (name "python-requests")
da5db988 2646 (version "2.13.0")
e6cfbd36
DT
2647 (source (origin
2648 (method url-fetch)
5d691657 2649 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2650 (sha256
2651 (base32
da5db988 2652 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
cff0ccf9 2653 ;; TODO: unbundle urllib3 and chardet.
e6cfbd36 2654 (build-system python-build-system)
cff0ccf9
MB
2655 (arguments
2656 ;; FIXME: Some tests require network access.
2657 '(#:tests? #f))
e6cfbd36
DT
2658 (home-page "http://python-requests.org/")
2659 (synopsis "Python HTTP library")
2660 (description
2661 "Requests is a Python HTTP client library. It aims to be easier to use
2662than Python’s urllib2 library.")
3f641af0 2663 (license license:asl2.0)))
864b5211 2664
e9005180
DT
2665;; Some software requires an older version of Requests, notably Docker
2666;; Compose.
2667(define-public python-requests-2.7
2668 (package (inherit python-requests)
2669 (version "2.7.0")
2670 (source (origin
2671 (method url-fetch)
2672 (uri (pypi-uri "requests" version))
2673 (sha256
2674 (base32
2675 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2676
ae641128 2677(define-public python2-requests
8ad4ae20 2678 (package-with-python2 python-requests))
ae641128 2679
ea521b42
DT
2680(define-public python-vcversioner
2681 (package
2682 (name "python-vcversioner")
538fe019 2683 (version "2.16.0.0")
ea521b42
DT
2684 (source
2685 (origin
2686 (method url-fetch)
2687 (uri (pypi-uri "vcversioner" version))
2688 (sha256
2689 (base32
538fe019 2690 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2691 (build-system python-build-system)
ea521b42
DT
2692 (synopsis "Python library for version number discovery")
2693 (description "Vcversioner is a Python library that inspects tagging
2694information in a variety of version control systems in order to discover
2695version numbers.")
2696 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2697 (license license:isc)))
ea521b42
DT
2698
2699(define-public python2-vcversioner
f210e944 2700 (package-with-python2 python-vcversioner))
ae641128 2701
864b5211
DT
2702(define-public python-jsonschema
2703 (package
2704 (name "python-jsonschema")
b3667afb 2705 (version "2.5.1")
864b5211
DT
2706 (source (origin
2707 (method url-fetch)
2708 (uri
2709 (string-append
2710 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2711 version ".tar.gz"))
2712 (sha256
2713 (base32
b3667afb 2714 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2715 (build-system python-build-system)
8bcd6b91
EF
2716 (arguments
2717 '(#:phases
2718 (modify-phases %standard-phases
2719 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2720 (native-inputs
8bcd6b91
EF
2721 `(("python-nose" ,python-nose)
2722 ("python-vcversioner" ,python-vcversioner)))
2723 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2724 (synopsis "Implementation of JSON Schema for Python")
2725 (description
2726 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2727 (license license:expat)
2728 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2729
2730(define-public python2-jsonschema
a14600ec
LF
2731 (let ((jsonschema (package-with-python2
2732 (strip-python2-variant python-jsonschema))))
264ae686 2733 (package (inherit jsonschema)
eaba9d66 2734 (native-inputs
8bcd6b91 2735 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2736 ,@(package-native-inputs jsonschema)))
2737 (propagated-inputs
2738 `(("python2-functools32" ,python2-functools32))))))
850189b8 2739
7734ed7a
OP
2740(define-public python-schema
2741 (package
2742 (name "python-schema")
2743 (version "0.6.6")
2744 (source
2745 (origin
2746 (method url-fetch)
2747 (uri (pypi-uri "schema" version))
2748 (sha256
2749 (base32
2750 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2751 (build-system python-build-system)
2752 (native-inputs
2753 `(("python-pytest" ,python-pytest)))
2754 (home-page "https://github.com/keleshev/schema")
2755 (synopsis "Simple data validation library")
2756 (description
2757 "@code{python-schema} is a library for validating Python data
2758structures, such as those obtained from config-files, forms, external
2759services or command-line parsing, converted from JSON/YAML (or
2760something else) to Python data-types.")
2761 (license license:psfl)))
2762
2763(define-public python2-schema
2764 (package-with-python2 python-schema))
2765
2766(define-public python-schema-0.5
2767 (package (inherit python-schema)
2768 (version "0.5.0")
2769 (source
2770 (origin
2771 (method url-fetch)
2772 (uri (pypi-uri "schema" version))
2773 (sha256
2774 (base32
2775 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2776
2777(define-public python2-schema-0.5
2778 (package-with-python2 python-schema-0.5))
2779
9f21414d 2780(define-public python-kitchen
2781 (package
2782 (name "python-kitchen")
2783 (version "1.2.4")
2784 (source
2785 (origin
2786 (method url-fetch)
2787 (uri (pypi-uri "kitchen" version))
2788 (sha256
2789 (base32
2790 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2791 (build-system python-build-system)
2792 (propagated-inputs
2793 `(("python-chardet" ,python-chardet)))
cb542830 2794 (home-page "https://github.com/fedora-infra/kitchen")
9f21414d 2795 (synopsis "Python API for snippets")
2796 (description "@code{kitchen} module provides a python API for all sorts of
2797little useful snippets of code that everybody ends up writing for their projects
2798but never seem big enough to build an independent release. Use kitchen and stop
2799cutting and pasting that code over and over.")
2800 (license (list license:lgpl2.1+
2801 ;; subprocess.py, test_subprocess.py,
2802 ;; kitchen/pycompat25/defaultdict.py:
2803 license:psfl))))
2804
2805(define-public python2-kitchen
2806 (package-with-python2 python-kitchen))
2807
850189b8
DT
2808(define-public python-unidecode
2809 (package
2810 (name "python-unidecode")
5754fe95 2811 (version "0.04.20")
850189b8
DT
2812 (source (origin
2813 (method url-fetch)
8925d4f3 2814 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2815 (sha256
2816 (base32
5754fe95 2817 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
850189b8 2818 (build-system python-build-system)
850189b8
DT
2819 (home-page "https://pypi.python.org/pypi/Unidecode")
2820 (synopsis "ASCII transliterations of Unicode text")
2821 (description
2822 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2823useful when integrating with legacy code that doesn't support Unicode, or for
2824ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2825machine identifiers from human-readable Unicode strings that should still be
2826somewhat intelligeble.")
3f641af0 2827 (license license:gpl2+)))
850189b8
DT
2828
2829(define-public python2-unidecode
2830 (package-with-python2 python-unidecode))
6d45fef4
DT
2831
2832(define-public python-pyjwt
2833 (package
2834 (name "python-pyjwt")
eb31d4b4 2835 (version "1.4.0")
6d45fef4
DT
2836 (source
2837 (origin
2838 (method url-fetch)
eb31d4b4 2839 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2840 (sha256
2841 (base32
eb31d4b4 2842 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2843 (build-system python-build-system)
eb31d4b4 2844 (native-inputs
130fe994
HG
2845 `(("python-pytest" ,python-pytest)
2846 ("python-pytest-cov" ,python-pytest-cov)
2847 ("python-pytest-runner" ,python-pytest-runner)))
7bf837fd 2848 (home-page "https://github.com/progrium/pyjwt")
6d45fef4
DT
2849 (synopsis "JSON Web Token implementation in Python")
2850 (description
2851 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2852 (license license:expat)))
6d45fef4
DT
2853
2854(define-public python2-pyjwt
2855 (package-with-python2 python-pyjwt))
2856
a80488c2 2857(define-public python-pykka
2858 (package
2859 (name "python-pykka")
2860 (version "1.2.1")
2861 (source
2862 (origin
2863 (method url-fetch)
2864 (uri (pypi-uri "Pykka" version))
2865 (sha256
2866 (base32
2867 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2868 (build-system python-build-system)
2869 (native-inputs
2870 `(("python-mock" ,python-mock)
2871 ("python-nose" ,python-nose)
2872 ("python-gevent" ,python-gevent)
2873 ("python-eventlet" ,python-eventlet)))
2874 (home-page "https://www.pykka.org/")
2875 (synopsis "Pykka is a Python implementation of the actor model")
2876 (description
2877 "Pykka is a Python implementation of the actor model.
2878The actor model introduces some simple rules to control the sharing
2879of state and cooperation between execution units, which makes it
2880easier to build concurrent applications.")
2881 (license license:asl2.0)))
2882
2883(define-public python2-pykka
2884 (package-with-python2 python-pykka))
2885
2cec1f6f
DT
2886(define-public python-oauthlib
2887 (package
2888 (name "python-oauthlib")
bde2171d 2889 (version "1.0.3")
2cec1f6f
DT
2890 (source (origin
2891 (method url-fetch)
bde2171d 2892 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2893 (sha256
2894 (base32
bde2171d 2895 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2896 (build-system python-build-system)
bde2171d 2897 (native-inputs
bb06aa34 2898 `(("python-nose" ,python-nose)
c616b5d3 2899 ("python-mock" ,python-mock)
bde2171d 2900 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2901 ("python-pyjwt" ,python-pyjwt)
2902 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2903 (home-page "https://github.com/idan/oauthlib")
2904 (synopsis "OAuth implementation for Python")
2905 (description
2906 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2907OAuth request-signing logic.")
3f641af0 2908 (license license:bsd-3)
59f151ec 2909 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2910
2911(define-public python2-oauthlib
59f151ec 2912 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2913 (package
2914 (inherit base)
00e10c6e 2915 (native-inputs `(("python2-unittest2" ,python2-unittest2)
59f151ec 2916 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2917
2918(define-public python-itsdangerous
2919 (package
2920 (name "python-itsdangerous")
2921 (version "0.24")
2922 (source
2923 (origin
2924 (method url-fetch)
2925 (uri (string-append
2926 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2927 version ".tar.gz"))
2928 (sha256
2929 (base32
2930 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2931 (build-system python-build-system)
7bf837fd 2932 (home-page "https://github.com/mitsuhiko/itsdangerous")
ec5dbb5c
DT
2933 (synopsis "Python library for passing data to/from untrusted environments")
2934 (description
2935 "Itsdangerous provides various helpers to pass trusted data to untrusted
2936environments and back.")
f210e944 2937 (license license:bsd-3)))
ec5dbb5c
DT
2938
2939(define-public python2-itsdangerous
f210e944 2940 (package-with-python2 python-itsdangerous))
5731cae3 2941
8d12be1e
RW
2942(define-public python-pyyaml
2943 (package
2944 (name "python-pyyaml")
bf5e4bc4 2945 (version "3.12")
8d12be1e
RW
2946 (source
2947 (origin
2948 (method url-fetch)
bf5e4bc4 2949 (uri (pypi-uri "PyYAML" version))
8d12be1e
RW
2950 (sha256
2951 (base32
bf5e4bc4 2952 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
8d12be1e
RW
2953 (build-system python-build-system)
2954 (inputs
2955 `(("libyaml" ,libyaml)))
8d12be1e
RW
2956 (home-page "http://pyyaml.org/wiki/PyYAML")
2957 (synopsis "YAML parser and emitter for Python")
2958 (description
2959 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2960complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2961API, and sensible error messages. PyYAML supports standard YAML tags and
2962provides Python-specific tags that allow to represent an arbitrary Python
2963object.")
2964 (license license:expat)))
2965
2966(define-public python2-pyyaml
2967 (package-with-python2 python-pyyaml))
2968
5731cae3
DT
2969(define-public python-virtualenv
2970 (package
2971 (name "python-virtualenv")
58d04dba 2972 (version "15.0.3")
5731cae3
DT
2973 (source
2974 (origin
2975 (method url-fetch)
17804240 2976 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2977 (sha256
2978 (base32
58d04dba 2979 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2980 (build-system python-build-system)
17804240
EF
2981 (arguments
2982 `(#:phases
2983 (modify-phases %standard-phases
58d04dba
RW
2984 (replace 'check
2985 (lambda _
2986 ;; Disable failing test. See upstream bug report
2987 ;; https://github.com/pypa/virtualenv/issues/957
2988 (substitute* "tests/test_virtualenv.py"
2989 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2990 (zero? (system* "py.test")))))))
e7881f3d 2991 (native-inputs
f3b98f4f 2992 `(("python-mock" ,python-mock)
17804240 2993 ("python-pytest" ,python-pytest)))
5731cae3
DT
2994 (home-page "https://virtualenv.pypa.io/")
2995 (synopsis "Virtual Python environment builder")
2996 (description
2997 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2998 (license license:expat)))
5731cae3
DT
2999
3000(define-public python2-virtualenv
3001 (package-with-python2 python-virtualenv))
8176d4d5
DT
3002
3003(define-public python-markupsafe
3004 (package
3005 (name "python-markupsafe")
3006 (version "0.23")
3007 (source
3008 (origin
3009 (method url-fetch)
3010 (uri (string-append
3011 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
3012 version ".tar.gz"))
3013 (sha256
3014 (base32
3015 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
3016 (build-system python-build-system)
7bf837fd 3017 (home-page "https://github.com/mitsuhiko/markupsafe")
8176d4d5
DT
3018 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3019 (description
3020 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3021for Python.")
3f641af0 3022 (license license:bsd-3)))
8176d4d5
DT
3023
3024(define-public python2-markupsafe
3025 (package-with-python2 python-markupsafe))
fe34f0d1
DT
3026
3027(define-public python-jinja2
3028 (package
3029 (name "python-jinja2")
e98149b3 3030 (version "2.8")
fe34f0d1
DT
3031 (source
3032 (origin
3033 (method url-fetch)
e98149b3 3034 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
3035 (sha256
3036 (base32
e98149b3 3037 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 3038 (build-system python-build-system)
f22efa01 3039 (propagated-inputs
f3b98f4f 3040 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
3041 (home-page "http://jinja.pocoo.org/")
3042 (synopsis "Python template engine")
3043 (description
3044 "Jinja2 is a small but fast and easy to use stand-alone template engine
3045written in pure Python.")
3f641af0 3046 (license license:bsd-3)))
fe34f0d1
DT
3047
3048(define-public python2-jinja2
3049 (package-with-python2 python-jinja2))
3580ab8b 3050
f7d17ac7
EE
3051(define-public python-pystache
3052 (package
3053 (name "python-pystache")
3054 (version "0.5.4")
3055 (source (origin
3056 (method url-fetch)
3057 (uri (pypi-uri "pystache" version))
3058 (sha256
3059 (base32
3060 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3061 (build-system python-build-system)
8bd5164b
MB
3062 (arguments
3063 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
f7d17ac7
EE
3064 (home-page "http://defunkt.io/pystache/")
3065 (synopsis "Python logic-less template engine")
3066 (description
3067 "Pystache is a Python implementation of the framework agnostic,
3068logic-free templating system Mustache.")
8bd5164b
MB
3069 (license license:expat)
3070 (properties `((python2-variant . ,(delay python2-pystache))))))
f7d17ac7
EE
3071
3072(define-public python2-pystache
8bd5164b
MB
3073 (package (inherit (package-with-python2
3074 (strip-python2-variant python-pystache)))
3075 (arguments
3076 `(#:python ,python-2
3077 #:phases
3078 (modify-phases %standard-phases
3079 (replace 'check
3080 (lambda _
3081 (zero? (system* "python" "test_pystache.py")))))))))
f7d17ac7 3082
1285119b
RW
3083(define-public python-joblib
3084 (package
3085 (name "python-joblib")
f34ef331 3086 (version "0.10.3")
1285119b
RW
3087 (source (origin
3088 (method url-fetch)
f34ef331 3089 (uri (pypi-uri "joblib" version))
1285119b
RW
3090 (sha256
3091 (base32
6aa5f1ca
HG
3092 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
3093 (modules '((guix build utils)))
3094 (snippet
3095 '(begin
3096 ;; Remove pre-compiled .pyc files from source.
3097 (for-each delete-file-recursively
3098 (find-files "." "__pycache__" #:directories? #t))
3099 (for-each delete-file (find-files "." "\\.pyc$"))
3100 #t))))
1285119b 3101 (build-system python-build-system)
a8dd960a
RW
3102 (arguments
3103 `(#:phases
3104 (modify-phases %standard-phases
3105 (add-before 'check 'disable-failing-tests
3106 (lambda _
3107 ;; This numpydoc tests fails for unknown reasons
3108 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
3109 ;; This numpydoc test depends on matplotlib, which is not a
3110 ;; required input.
3111 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
3112 ;; These tests fail to execute sys.executable
3113 (substitute* "joblib/test/test_parallel.py"
3114 (("import nose" line)
3115 (string-append "from nose.plugins.skip import SkipTest\n" line))
3116 (("def test_nested_parallel_warnings" line)
3117 (string-append "@SkipTest\n" line))
3118 (("def test_parallel_with_interactively_defined_functions" line)
3119 (string-append "@SkipTest\n" line)))
3120 #t)))))
f052ec9a 3121 ;; Provide nose to enable tests command
1285119b 3122 (native-inputs
f3b98f4f 3123 `(("python-nose" ,python-nose)
f34ef331
RW
3124 ("python-sphinx" ,python-sphinx)
3125 ("python-docutils" ,python-docutils)
3126 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
3127 (home-page "http://pythonhosted.org/joblib/")
3128 (synopsis "Using Python functions as pipeline jobs")
3129 (description
3130 "Joblib is a set of tools to provide lightweight pipelining in Python.
3131In particular, joblib offers: transparent disk-caching of the output values
3132and lazy re-evaluation (memoize pattern), easy simple parallel computing
3133logging and tracing of the execution.")
3f641af0 3134 (license license:bsd-3)))
1285119b
RW
3135
3136(define-public python2-joblib
3137 (package-with-python2 python-joblib))
3138
3580ab8b
DT
3139(define-public python-docutils
3140 (package
3141 (name "python-docutils")
00e0ca7c 3142 (version "0.13.1")
3580ab8b
DT
3143 (source
3144 (origin
3145 (method url-fetch)
00e0ca7c 3146 (uri (pypi-uri "docutils" version))
3580ab8b
DT
3147 (sha256
3148 (base32
00e0ca7c 3149 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3580ab8b 3150 (build-system python-build-system)
3580ab8b
DT
3151 (arguments
3152 '(#:tests? #f)) ; no setup.py test command
3153 (home-page "http://docutils.sourceforge.net/")
3154 (synopsis "Python Documentation Utilities")
3155 (description
3156 "Docutils is a modular system for processing documentation into useful
3157formats, such as HTML, XML, and LaTeX. For input Docutils supports
3158reStructuredText.")
3159 ;; Most of the source code is public domain, but some source files are
3160 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 3161 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
3162
3163(define-public python2-docutils
3164 (package-with-python2 python-docutils))
fb35b7c0
DT
3165
3166(define-public python-pygments
3167 (package
3168 (name "python-pygments")
7d2e758d 3169 (version "2.1.3")
fb35b7c0
DT
3170 (source
3171 (origin
3172 (method url-fetch)
9f442285 3173 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
3174 (sha256
3175 (base32
7d2e758d 3176 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
fb35b7c0 3177 (build-system python-build-system)
995cb99e
MB
3178 (arguments
3179 ;; FIXME: Tests require sphinx, which depends on this.
3180 '(#:tests? #f))
fb35b7c0
DT
3181 (home-page "http://pygments.org/")
3182 (synopsis "Syntax highlighting")
3183 (description
3184 "Pygments is a syntax highlighting package written in Python.")
3f641af0 3185 (license license:bsd-2)))
fb35b7c0
DT
3186
3187(define-public python2-pygments
3188 (package-with-python2 python-pygments))
9dd6078d 3189
5f94ec91
RW
3190(define-public python-sphinxcontrib-websupport
3191 (package
3192 (name "python-sphinxcontrib-websupport")
3193 (version "1.0.1")
3194 (source (origin
3195 (method url-fetch)
3196 (uri (pypi-uri "sphinxcontrib-websupport" version))
3197 (sha256
3198 (base32
3199 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
3200 (build-system python-build-system)
3201 (propagated-inputs
3202 `(("python-mock" ,python-mock)
3203 ("python-pytest" ,python-pytest)
3204 ("python-xapian-bindings" ,python-xapian-bindings)))
3205 ;; Needed for running the test suite
3206 (native-inputs
3207 `(("python-six" ,python-six)
3208 ("python-jinja2" ,python-jinja2)
3209 ("python-docutils" ,python-docutils)
3210 ("python-sphinx" ,python-sphinx)
3211 ("python-sqlalchemy" ,python-sqlalchemy)
3212 ("python-whoosh" ,python-whoosh)))
3213 (home-page "http://sphinx-doc.org/")
3214 (synopsis "Sphinx API for web applications")
3215 (description "This package provides a Python API to easily integrate
3216Sphinx documentation into your web application. It provides tools to
3217integrate Sphinx documents in web templates and to handle searches.")
3218 (license license:bsd-3)))
3219
9dd6078d
DT
3220(define-public python-sphinx
3221 (package
3222 (name "python-sphinx")
c227458a 3223 (version "1.5.1")
9dd6078d
DT
3224 (source
3225 (origin
3226 (method url-fetch)
9a8acd00 3227 (uri (pypi-uri "Sphinx" version))
9dd6078d
DT
3228 (sha256
3229 (base32
c227458a 3230 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
9dd6078d 3231 (build-system python-build-system)
03cb5f9e 3232 (arguments
c227458a
DM
3233 `(#:phases
3234 (modify-phases %standard-phases
3235 (replace 'check
3236 (lambda _
3237 ;; Requires Internet access.
3238 (delete-file "tests/test_build_linkcheck.py")
3239 (zero? (system* "make" "test")))))))
f22efa01 3240 (propagated-inputs
9a8acd00
DM
3241 `(("python-imagesize" ,python-imagesize)
3242 ("python-sphinx-alabaster-theme"
3243 ,python-sphinx-alabaster-theme)
3244 ("python-babel" ,python-babel)
3245 ("python-snowballstemmer" ,python-snowballstemmer)
9dd6078d 3246 ("python-docutils" ,python-docutils)
9a8acd00
DM
3247 ("python-jinja2" ,python-jinja2)
3248 ("python-pygments" ,python-pygments)
a10b9810 3249 ("python-requests" ,python-requests)
9a8acd00 3250 ("python-six" ,python-six)))
c227458a
DM
3251 (native-inputs
3252 `(("graphviz" ,graphviz)
3253 ("python-html5lib" ,python-html5lib)
3254 ("python-mock" ,python-mock)
a10b9810 3255 ("python-nose" ,python-nose)))
9dd6078d
DT
3256 (home-page "http://sphinx-doc.org/")
3257 (synopsis "Python documentation generator")
3258 (description "Sphinx is a tool that makes it easy to create documentation
3259for Python projects or other documents consisting of multiple reStructuredText
3260sources.")
9a8acd00
DM
3261 (license license:bsd-3)
3262 (properties `((python2-variant . ,(delay python2-sphinx))))))
9dd6078d 3263
e7304ab1
RW
3264(define-public python-sphinx-1.6
3265 (package (inherit python-sphinx)
3266 (name "python-sphinx")
3267 (version "1.6.3")
3268 (source (origin
3269 (method url-fetch)
3270 (uri (pypi-uri "Sphinx" version))
3271 (sha256
3272 (base32
3273 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
3274 (arguments
3275 `(#:phases
3276 (modify-phases %standard-phases
3277 (replace 'check
3278 (lambda _
3279 ;; Requires Internet access.
3280 (delete-file "tests/test_build_linkcheck.py")
3281 (substitute* "tests/test_build_latex.py"
3282 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
3283 "@pytest.mark.skip()"))
3284 (zero? (system* "make" "test")))))))
3285 (propagated-inputs
3286 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
3287 ,@(package-propagated-inputs python-sphinx)))
3288 (native-inputs
3289 `(("python-pytest" ,python-pytest-3.0)
3290 ("imagemagick" ,imagemagick) ; for "convert"
3291 ,@(package-native-inputs python-sphinx)))
3292 (properties '())))
3293
3061b331
MFM
3294(define-public python-sphinx-1.5.3
3295 (package
3296 (inherit python-sphinx)
3297 (name "python-sphinx")
3298 (version "1.5.3")
3299 (source
3300 (origin
3301 (method url-fetch)
3302 (uri (pypi-uri "Sphinx" version))
3303 (sha256
3304 (base32
3305 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3306 (native-inputs
23b9168d 3307 `(("python-pytest" ,python-pytest-3.0)
3061b331
MFM
3308 ,@(package-native-inputs python-sphinx)))))
3309
9dd6078d 3310(define-public python2-sphinx
9a8acd00
DM
3311 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3312 (package
3313 (inherit base)
3314 (native-inputs `(("python2-mock" ,python2-mock)
c227458a 3315 ("python2-enum34" ,python2-enum34)
9a8acd00
DM
3316 ,@(package-native-inputs base)))
3317 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3318 ,@(package-propagated-inputs base))))))
6888830b 3319
ad320b20
RW
3320(define-public python-sphinx-rtd-theme
3321 (package
3322 (name "python-sphinx-rtd-theme")
af842d45 3323 (version "0.2.4")
ad320b20
RW
3324 (source
3325 (origin
3326 (method url-fetch)
af842d45 3327 (uri (pypi-uri "sphinx_rtd_theme" version))
ad320b20
RW
3328 (sha256
3329 (base32
af842d45 3330 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
ad320b20 3331 (build-system python-build-system)
9893cff3 3332 (arguments '(#:tests? #f)) ; No tests.
9d3a15b4
LF
3333 (propagated-inputs
3334 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
3335 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3336 (synopsis "ReadTheDocs.org theme for Sphinx")
3337 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 3338 (license license:expat)))
ad320b20
RW
3339
3340(define-public python2-sphinx-rtd-theme
3341 (package-with-python2 python-sphinx-rtd-theme))
3342
fe94cf0c
HG
3343(define-public python-rst.linker
3344 (package
3345 (name "python-rst.linker")
3346 (version "1.7")
3347 (source
3348 (origin
3349 (method url-fetch)
3350 (uri (pypi-uri "rst.linker" version))
3351 (sha256
3352 (base32
3353 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3354 (build-system python-build-system)
3355 (propagated-inputs
22d7360b 3356 `(("python-dateutil" ,python-dateutil)
fe94cf0c
HG
3357 ("python-six" ,python-six)))
3358 (native-inputs
3359 `(("python-setuptools-scm" ,python-setuptools-scm)))
3360 ;; Test would require path.py, which would introduce a cyclic dependence.
3361 (arguments `(#:tests? #f))
3362 ;; Note: As of version 1.7 the documentation is not worth building.
3363 (home-page "https://github.com/jaraco/rst.linker")
3364 (synopsis "Sphinx plugin to add links and timestamps")
3365 (description "rst.linker allows to automatically replace text by a
3366reStructuredText external reference or timestamps. It's primary purpose is to
3367augment the changelog, but it can be used for other documents, too.")
3368 (license license:expat)))
3369
3370(define-public python2-rst.linker
3371 (package-with-python2 python-rst.linker))
3372
f4de5b3b
CAW
3373(define-public python-feedgenerator
3374 (package
3375 (name "python-feedgenerator")
d5c183d1 3376 (version "1.9")
f4de5b3b 3377 (source
f4de5b3b 3378 (origin
f0412aa2
EF
3379 (method url-fetch)
3380 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
3381 (sha256
3382 (base32
d5c183d1 3383 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
7c88bcf4
HG
3384 (modules '((guix build utils)))
3385 (snippet
3386 '(begin
3387 ;; Remove pre-compiled .pyc files from source.
3388 (for-each delete-file-recursively
3389 (find-files "." "__pycache__" #:directories? #t))
3390 (for-each delete-file (find-files "." "\\.pyc$"))
3391 #t))))
f4de5b3b 3392 (build-system python-build-system)
dae73d9b 3393 (propagated-inputs
f3b98f4f 3394 `(("python-pytz" ,python-pytz)
f4de5b3b 3395 ("python-six" ,python-six)))
f0412aa2 3396 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
3397 (synopsis
3398 "Standalone version of Django's Atom/RSS feed generator")
3399 (description
3400 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3401which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 3402 (license license:bsd-3)))
f4de5b3b
CAW
3403
3404(define-public python2-feedgenerator
3405 (package-with-python2 python-feedgenerator))
3406
59ad30e3
CAW
3407(define-public python-blinker
3408 (package
3409 (name "python-blinker")
7fb9ff4d 3410 (version "1.4")
59ad30e3
CAW
3411 (source
3412 (origin
3413 (method url-fetch)
7fb9ff4d 3414 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
3415 (sha256
3416 (base32
7fb9ff4d 3417 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 3418 (build-system python-build-system)
59ad30e3
CAW
3419 (home-page "http://pythonhosted.org/blinker/")
3420 (synopsis "Fast, simple object-to-object and broadcast signaling")
3421 (description
3422 "Blinker provides a fast dispatching system that allows any number of
3423interested parties to subscribe to events, or \"signals\".")
3424 (license license:expat)))
3425
3426(define-public python2-blinker
3427 (package-with-python2 python-blinker))
3428
b8050e71
CAW
3429(define-public pelican
3430 (package
3431 (name "pelican")
11f97c27 3432 (version "3.6.3")
b8050e71
CAW
3433 (source
3434 (origin
3435 (method url-fetch)
11f97c27 3436 (uri (pypi-uri "pelican" version))
b8050e71
CAW
3437 (sha256
3438 (base32
11f97c27 3439 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 3440 (build-system python-build-system)
f22efa01 3441 (propagated-inputs
b8050e71
CAW
3442 `(("python-feedgenerator" ,python-feedgenerator)
3443 ("python-jinja2" ,python-jinja2)
3444 ("python-pygments" ,python-pygments)
3445 ("python-docutils" ,python-docutils)
3446 ("python-pytz" ,python-pytz)
3447 ("python-blinker" ,python-blinker)
3448 ("python-unidecode" ,python-unidecode)
3449 ("python-six" ,python-six)
22d7360b 3450 ("python-dateutil" ,python-dateutil)))
b8050e71
CAW
3451 (home-page "http://getpelican.com/")
3452 (arguments
3453 `(;; XXX Requires a lot more packages to do unit tests :P
3454 #:tests? #f
3455 #:phases (modify-phases %standard-phases
3456 (add-before
3457 'install 'adjust-requires
3458 ;; Since feedgenerator is installed from git, it doesn't
3459 ;; conform to the version requirements.
3460 ;;
3461 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3462 ;; version requirement so setuptools doesn't get confused.
3463 (lambda _
3464 (substitute* "setup.py"
3465 (("['\"]feedgenerator.*?['\"]")
3466 "'feedgenerator'")))))))
3467 (synopsis "Python-based static site publishing system")
3468 (description
3469 "Pelican is a tool to generate a static blog from reStructuredText,
3470Markdown input files, and more. Pelican uses Jinja2 for templating
3471and is very extensible.")
3f641af0 3472 (license license:agpl3+)))
b8050e71 3473
240ca4aa
RW
3474(define-public python-scikit-learn
3475 (package
3476 (name "python-scikit-learn")
8e401ab6 3477 (version "0.18.1")
240ca4aa
RW
3478 (source
3479 (origin
3480 (method url-fetch)
3481 (uri (string-append
3482 "https://github.com/scikit-learn/scikit-learn/archive/"
3483 version ".tar.gz"))
7e21b9fb 3484 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3485 (sha256
3486 (base32
8e401ab6 3487 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
240ca4aa
RW
3488 (build-system python-build-system)
3489 (arguments
3490 `(#:phases
4d25c486
MB
3491 (modify-phases %standard-phases
3492 (delete 'check)
3493 (add-after 'install 'check
3494 ;; Running tests from the source directory requires
3495 ;; an "inplace" build with paths relative to CWD.
3496 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3497 ;; Use the installed version instead.
3498 (lambda* (#:key inputs outputs #:allow-other-keys)
3499 (add-installed-pythonpath inputs outputs)
3500 ;; some tests require access to "$HOME"
3501 (setenv "HOME" "/tmp")
3502 ;; Step out of the source directory just to be sure.
3503 (chdir "..")
3504 (zero? (system* "nosetests" "-v" "sklearn")))))))
240ca4aa 3505 (inputs
328bb95d
HG
3506 `(("openblas" ,openblas)))
3507 (native-inputs
8e401ab6
RW
3508 `(("python-nose" ,python-nose)
3509 ("python-cython" ,python-cython)))
240ca4aa
RW
3510 (propagated-inputs
3511 `(("python-numpy" ,python-numpy)
3512 ("python-scipy" ,python-scipy)))
3513 (home-page "http://scikit-learn.org/")
3514 (synopsis "Machine Learning in Python")
3515 (description
3516 "Scikit-learn provides simple and efficient tools for data
3517mining and data analysis.")
1b5241c5 3518 (license license:bsd-3)))
240ca4aa
RW
3519
3520(define-public python2-scikit-learn
1b5241c5 3521 (package-with-python2 python-scikit-learn))
240ca4aa 3522
12f8f9bb
RW
3523(define-public python-scikit-image
3524 (package
3525 (name "python-scikit-image")
3526 (version "0.11.3")
3527 (source
3528 (origin
3529 (method url-fetch)
3530 (uri (string-append
3531 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3532 version ".tar.gz"))
3533 (sha256
3534 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3535 (build-system python-build-system)
9026e689
MB
3536 (arguments
3537 ;; TODO: Some tests require running X11 server. Disable them?
3538 '(#:tests? #f))
b83e2333 3539 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3540 (propagated-inputs
3541 `(("python-matplotlib" ,python-matplotlib)
3542 ("python-networkx" ,python-networkx)
12f8f9bb 3543 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3544 ("python-pillow" ,python-pillow)))
3545 (native-inputs
b83e2333
HG
3546 `(("python-numpy" ,python-numpy)
3547 ("python-cython" ,python-cython)
3548 ("python-six" ,python-six)))
12f8f9bb
RW
3549 (home-page "http://scikit-image.org/")
3550 (synopsis "Image processing in Python")
3551 (description
e881752c 3552 "Scikit-image is a collection of algorithms for image processing.")
12733594 3553 (license license:bsd-3)))
12f8f9bb
RW
3554
3555(define-public python2-scikit-image
12733594 3556 (package-with-python2 python-scikit-image))
12f8f9bb 3557
5394a6a6
RW
3558(define-public python-redis
3559 (package
3560 (name "python-redis")
911a8faf 3561 (version "2.10.5")
5394a6a6
RW
3562 (source
3563 (origin
3564 (method url-fetch)
911a8faf 3565 (uri (pypi-uri "redis" version))
5394a6a6 3566 (sha256
911a8faf 3567 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
5394a6a6
RW
3568 (build-system python-build-system)
3569 ;; Tests require a running Redis server
3570 (arguments '(#:tests? #f))
cf8124b0
HG
3571 ;; As long as we are not running test, we do not need this input :-)
3572 ;;(native-inputs
3573 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3574 (home-page "https://github.com/andymccurdy/redis-py")
3575 (synopsis "Redis Python client")
3576 (description
3577 "This package provides a Python interface to the Redis key-value store.")
3578 (license license:expat)))
3579
3580(define-public python2-redis
3581 (package-with-python2 python-redis))
3582
748cef5b
RW
3583(define-public python-rq
3584 (package
3585 (name "python-rq")
eed206cb 3586 (version "0.7.1")
748cef5b
RW
3587 (source
3588 (origin
3589 (method url-fetch)
eed206cb 3590 (uri (pypi-uri "rq" version))
748cef5b 3591 (sha256
eed206cb 3592 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
748cef5b
RW
3593 (build-system python-build-system)
3594 (propagated-inputs
3595 `(("python-click" ,python-click)
3596 ("python-redis" ,python-redis)))
748cef5b
RW
3597 (home-page "http://python-rq.org/")
3598 (synopsis "Simple job queues for Python")
3599 (description
3600 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3601processing them in the background with workers. It is backed by Redis and it
3602is designed to have a low barrier to entry.")
3f641af0 3603 (license license:bsd-2)))
748cef5b
RW
3604
3605(define-public python2-rq
3606 (package-with-python2 python-rq))
3607
6888830b
FB
3608(define-public python-cython
3609 (package
3610 (name "python-cython")
cd158a2b 3611 (version "0.25.2")
6888830b
FB
3612 (source
3613 (origin
3614 (method url-fetch)
56918e26 3615 (uri (pypi-uri "Cython" version))
a3dea991 3616 (patches (search-patches "python-cython-fix-tests-32bit.patch"))
6888830b
FB
3617 (sha256
3618 (base32
cd158a2b 3619 "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"))))
6888830b
FB
3620 (build-system python-build-system)
3621 ;; we need the full python package and not just the python-wrapper
3622 ;; because we need libpython3.3m.so
3623 (inputs
3624 `(("python" ,python)))
3625 (arguments
3626 `(#:phases
b92f651b
EF
3627 (modify-phases %standard-phases
3628 (add-before 'check 'set-HOME
3629 ;; some tests require access to "$HOME/.cython"
3630 (lambda _ (setenv "HOME" "/tmp")))
3631 (replace 'check
3632 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3633 (home-page "http://cython.org/")
3634 (synopsis "C extensions for Python")
3635 (description "Cython is an optimising static compiler for both the Python
3636programming language and the extended Cython programming language. It makes
3637writing C extensions for Python as easy as Python itself.")
3f641af0 3638 (license license:asl2.0)
48b311b1 3639 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3640
3641(define-public python2-cython
48b311b1
LC
3642 (package (inherit (package-with-python2
3643 (strip-python2-variant python-cython)))
6888830b
FB
3644 (name "python2-cython")
3645 (inputs
3646 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3647
ee5fb7ee
AV
3648;; The RPython toolchain currently does not support Python 3.
3649(define-public python2-rpython
3650 (package
3651 (name "python2-rpython")
3652 (version "0.1.4")
3653 (source
3654 (origin
3655 (method url-fetch)
3656 (uri (pypi-uri "rpython" version))
3657 (sha256
3658 (base32
3659 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3660 (build-system python-build-system)
3661 (arguments `(#:python ,python-2))
3662 (native-inputs
f3b98f4f 3663 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3664 (home-page "https://rpython.readthedocs.org")
3665 (synopsis "Framework for implementing interpreters and virtual machines")
3666 (description "RPython is a translation and support framework for
3667producing implementations of dynamic languages, emphasizing a clean separation
3668between language specification and implementation aspects.")
3669 (license license:expat)))
3670
7ccb71e0 3671(define-public python-numpy
0da98533 3672 (package
7ccb71e0
TD
3673 (name "python-numpy")
3674 (version "1.12.0")
0da98533
FB
3675 (source
3676 (origin
3677 (method url-fetch)
7ccb71e0
TD
3678 (uri (string-append
3679 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3680 (file-name (string-append name "-" version ".tar.gz"))
0da98533
FB
3681 (sha256
3682 (base32
7ccb71e0 3683 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
0da98533
FB
3684 (build-system python-build-system)
3685 (inputs
328bb95d 3686 `(("openblas" ,openblas)
cba256f8 3687 ("lapack" ,lapack)))
0da98533 3688 (native-inputs
7ccb71e0
TD
3689 `(("python-cython" ,python-cython)
3690 ("python-nose" ,python-nose)
2efabc55 3691 ("gfortran" ,gfortran)))
0da98533
FB
3692 (arguments
3693 `(#:phases
2efabc55
HG
3694 (modify-phases %standard-phases
3695 (add-before 'build 'set-environment-variables
3696 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3697 (call-with-output-file "site.cfg"
3698 (lambda (port)
cba256f8
RW
3699 (format port
3700 "[openblas]
dbdfe515
RW
3701libraries = openblas
3702library_dirs = ~a/lib
3703include_dirs = ~a/include
cba256f8 3704
2efabc55
HG
3705# backslash-n to make emacs happy
3706\n[lapack]
cba256f8
RW
3707lapack_libs = lapack
3708library_dirs = ~a/lib
3709include_dirs = ~a/include
3710"
3711 (assoc-ref inputs "openblas")
3712 (assoc-ref inputs "openblas")
3713 (assoc-ref inputs "lapack")
3714 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3715 ;; Use "gcc" executable, not "cc".
3716 (substitute* "numpy/distutils/system_info.py"
3717 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3718 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3719 #t))
6a843168
FB
3720 ;; Tests can only be run after the library has been installed and not
3721 ;; within the source directory.
2efabc55
HG
3722 (delete 'check)
3723 (add-after 'install 'check
3724 (lambda* (#:key outputs inputs #:allow-other-keys)
3725 ;; Make installed package available for running the tests
3726 (add-installed-pythonpath inputs outputs)
6a843168 3727 (with-directory-excursion "/tmp"
89b5c60e 3728 (zero? (system* "python" "-c"
2efabc55 3729 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3730 (home-page "http://www.numpy.org/")
3731 (synopsis "Fundamental package for scientific computing with Python")
3732 (description "NumPy is the fundamental package for scientific computing
e881752c 3733with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3734object, sophisticated (broadcasting) functions, tools for integrating C/C++
3735and Fortran code, useful linear algebra, Fourier transform, and random number
3736capabilities.")
3f641af0 3737 (license license:bsd-3)))
0da98533 3738
7ccb71e0
TD
3739(define-public python2-numpy
3740 (package-with-python2 python-numpy))
15bfe6d6 3741
460fccd4 3742(define-public python-munch
3743 (package
3744 (name "python-munch")
3745 (version "2.0.4")
3746 (source
3747 (origin
3748 (method url-fetch)
3749 (uri (pypi-uri "munch" version))
3750 (sha256
3751 (base32
3752 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3753 (build-system python-build-system)
3754 (home-page "https://github.com/Infinidat/munch")
3755 (synopsis "Dot-accessible dictionary")
3756 (description "Munch is a dot-accessible dictionary similar to JavaScript
3757objects.")
3758 (license license:expat)))
3759
3760(define-public python2-munch
3761 (package-with-python2 python-munch))
3762
3a1bfe18
RW
3763(define-public python2-fastlmm
3764 (package
3765 (name "python2-fastlmm")
154d0016 3766 (version "0.2.21")
3a1bfe18
RW
3767 (source
3768 (origin
3769 (method url-fetch)
b074e7d4 3770 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3771 (sha256
3772 (base32
154d0016 3773 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3774 (build-system python-build-system)
3775 (arguments
3776 `(#:python ,python-2)) ; only Python 2.7 is supported
3777 (propagated-inputs
3778 `(("python2-numpy" ,python2-numpy)
3779 ("python2-scipy" ,python2-scipy)
3780 ("python2-matplotlib" ,python2-matplotlib)
3781 ("python2-pandas" ,python2-pandas)
3782 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3783 ("python2-pysnptools" ,python2-pysnptools)))
3784 (native-inputs
3785 `(("unzip" ,unzip)
2efabc55 3786 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3787 ("python2-mock" ,python2-mock)
3788 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3789 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3790 (synopsis "Perform genome-wide association studies on large data sets")
3791 (description
3792 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3793Models, is a program for performing both single-SNP and SNP-set genome-wide
3794association studies (GWAS) on extremely large data sets.")
3f641af0 3795 (license license:asl2.0)))
3a1bfe18 3796
7ccb71e0
TD
3797(define-public python-numpy-documentation
3798 (package
3799 (name "python-numpy-documentation")
3800 (version (package-version python-numpy))
3801 (source (package-source python-numpy))
3802 (build-system python-build-system)
2ee8869a 3803 (native-inputs
7ccb71e0
TD
3804 `(("python-matplotlib" ,python-matplotlib)
3805 ("python-numpy" ,python-numpy)
3806 ("pkg-config" ,pkg-config)
2efabc55
HG
3807 ("python-sphinx" ,python-sphinx)
3808 ("python-numpydoc" ,python-numpydoc)
8b89c171
RW
3809 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3810 texlive-fonts-ec
3811 texlive-generic-ifxetex
3812 texlive-generic-pdftex
3813 texlive-latex-amsfonts
3814 texlive-latex-capt-of
3815 texlive-latex-cmap
3816 texlive-latex-environ
3817 texlive-latex-eqparbox
3818 texlive-latex-etoolbox
3819 texlive-latex-expdlist
3820 texlive-latex-fancyhdr
3821 texlive-latex-fancyvrb
3822 texlive-latex-fncychap
3823 texlive-latex-float
3824 texlive-latex-framed
3825 texlive-latex-geometry
3826 texlive-latex-graphics
3827 texlive-latex-hyperref
3828 texlive-latex-mdwtools
3829 texlive-latex-multirow
3830 texlive-latex-oberdiek
3831 texlive-latex-parskip
3832 texlive-latex-preview
3833 texlive-latex-tabulary
3834 texlive-latex-threeparttable
3835 texlive-latex-titlesec
3836 texlive-latex-trimspaces
3837 texlive-latex-ucs
3838 texlive-latex-upquote
3839 texlive-latex-url
3840 texlive-latex-varwidth
3841 texlive-latex-wrapfig)))
2ee8869a
FB
3842 ("texinfo" ,texinfo)
3843 ("perl" ,perl)
7ccb71e0
TD
3844 ("scipy-sphinx-theme"
3845 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3846 (method git-fetch)
3847 (uri (git-reference
3848 (url "https://github.com/scipy/scipy-sphinx-theme.git")
67416769 3849 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
7ccb71e0
TD
3850 (sha256
3851 (base32
67416769 3852 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
7ccb71e0 3853 ,@(package-native-inputs python-numpy)))
2ee8869a 3854 (arguments
7ccb71e0
TD
3855 `(#:tests? #f ; we're only generating the documentation
3856 #:phases
3857 (modify-phases %standard-phases
3858 (delete 'build)
3859 (replace 'install
3860 (lambda* (#:key inputs outputs #:allow-other-keys)
3861 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3862 (doc (string-append
3863 data "/doc/" ,name "-"
3864 ,(package-version python-numpy)))
3865 (info-reader (string-append data "/info"))
3866 (html (string-append doc "/html"))
3867 (scipy-sphinx-theme "scipy-sphinx-theme")
3868 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3869 (pyver ,(string-append "PYVER=")))
8b89c171
RW
3870
3871 ;; FIXME: this is needed to for texlive-union to generate
3872 ;; fonts, which are not found.
3873 (setenv "HOME" "/tmp")
3874
7ccb71e0
TD
3875 (with-directory-excursion "doc"
3876 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3877 (mkdir-p html)
3878 (system* "make" "html" pyver)
3879 (system* "make" "latex" "PAPER=a4" pyver)
3880 (system* "make" "-C" "build/latex"
3881 "all-pdf" "PAPER=a4" pyver)
3882 ;; FIXME: Generation of the info file fails.
3883 ;; (system* "make" "info" pyver)
3884 ;; (mkdir-p info)
3885 ;; (copy-file "build/texinfo/numpy.info"
3886 ;; (string-append info "/numpy.info"))
3887 (for-each (lambda (file)
3888 (copy-file (string-append "build/latex" file)
3889 (string-append doc file)))
3890 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3891 (with-directory-excursion "build/html"
3892 (for-each (lambda (file)
3893 (let* ((dir (dirname file))
3894 (tgt-dir (string-append html "/" dir)))
3895 (unless (equal? "." dir)
3896 (mkdir-p tgt-dir))
3897 (install-file file html)))
3898 (find-files "." ".*")))))
3899 #t)))))
3900 (home-page (package-home-page python-numpy))
3901 (synopsis "Documentation for the python-numpy package")
3902 (description (package-description python-numpy))
3903 (license (package-license python-numpy))))
2ee8869a 3904
7ccb71e0
TD
3905(define-public python2-numpy-documentation
3906 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3907 (package
3908 (inherit numpy-documentation)
3909 (native-inputs `(("python2-functools32" ,python2-functools32)
3910 ,@(package-native-inputs numpy-documentation))))))
2ee8869a 3911
0151a8df 3912(define-public python-pygit2
3913 (package
3914 (name "python-pygit2")
022c9772 3915 (version "0.25.0")
0151a8df 3916 (source
3917 (origin
3918 (method url-fetch)
3919 (uri (pypi-uri "pygit2" version))
3920 (sha256
3921 (base32
bb6043fe
MB
3922 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3923 (patches
3924 (search-patches "python-pygit2-disable-network-tests.patch"))))
0151a8df 3925 (build-system python-build-system)
3926 (propagated-inputs
3927 `(("python-six" ,python-six)
3928 ("python-cffi" ,python-cffi)
3929 ("libgit2" ,libgit2)
3930 ("python-tox" ,python-tox)))
3931 (home-page "https://github.com/libgit2/pygit2")
3932 (synopsis "Python bindings for libgit2")
3933 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3934library, libgit2 implements Git plumbing.")
3935 ;; GPL2.0 only, with linking exception.
3936 (license license:gpl2)))
3937
3938(define-public python2-pygit2
3939 (package-with-python2 python-pygit2))
3940
15bfe6d6
FB
3941(define-public python-pyparsing
3942 (package
3943 (name "python-pyparsing")
9e5ee6b6 3944 (version "2.2.0")
15bfe6d6
FB
3945 (source
3946 (origin
3947 (method url-fetch)
de67e922
LF
3948 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3949 "/pyparsing-" version
15bfe6d6
FB
3950 "/pyparsing-" version ".tar.gz"))
3951 (sha256
3952 (base32
9e5ee6b6 3953 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
15bfe6d6
FB
3954 (build-system python-build-system)
3955 (outputs '("out" "doc"))
3956 (arguments
3957 `(#:tests? #f ; no test target
15bfe6d6 3958 #:phases
007176e7
MB
3959 (modify-phases %standard-phases
3960 (add-after 'install 'install-doc
3961 (lambda* (#:key outputs #:allow-other-keys)
3962 (let* ((doc (string-append (assoc-ref outputs "doc")
3963 "/share/doc/" ,name "-" ,version))
3964 (html-doc (string-append doc "/html"))
3965 (examples (string-append doc "/examples")))
3966 (mkdir-p html-doc)
3967 (mkdir-p examples)
3968 (for-each
3969 (lambda (dir tgt)
3970 (map (lambda (file)
3971 (install-file file tgt))
3972 (find-files dir ".*")))
3973 (list "docs" "htmldoc" "examples")
3974 (list doc html-doc examples))
3975 #t))))))
15bfe6d6
FB
3976 (home-page "http://pyparsing.wikispaces.com")
3977 (synopsis "Python parsing class library")
3978 (description
3979 "The pyparsing module is an alternative approach to creating and
3980executing simple grammars, vs. the traditional lex/yacc approach, or the use
3981of regular expressions. The pyparsing module provides a library of classes
3982that client code uses to construct the grammar directly in Python code.")
bd3fa666 3983 (license license:expat)))
15bfe6d6
FB
3984
3985(define-public python2-pyparsing
3986 (package-with-python2 python-pyparsing))
3987
ec00de35
FB
3988(define-public python-numpydoc
3989 (package
3990 (name "python-numpydoc")
3991 (version "0.5")
3992 (source
3993 (origin
3994 (method url-fetch)
89b5c60e 3995 (uri (string-append
ec00de35
FB
3996 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3997 version ".tar.gz"))
3998 (sha256
3999 (base32
5e4d8f67
AE
4000 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
4001 (modules '((guix build utils)))
4002 (snippet
4003 '(begin
4004 ;; Drop a test requiring matplotlib, which we cannot add as an
4005 ;; input since it would create a circular dependency: Extend the
4006 ;; test for Python 3, where it is already dropped, to Python 2.
4007 (substitute* "numpydoc/tests/test_plot_directive.py"
4008 (("3") "2"))))))
ec00de35 4009 (build-system python-build-system)
fe4a8da4 4010 (propagated-inputs
213d1745
HG
4011 `(("python-sphinx" ,python-sphinx)))
4012 (native-inputs
4013 `(("python-nose" ,python-nose)))
ec00de35
FB
4014 (home-page "https://pypi.python.org/pypi/numpydoc")
4015 (synopsis
4016 "Numpy's Sphinx extensions")
4017 (description
4018 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 4019 (license license:bsd-2)))
ec00de35
FB
4020
4021(define-public python2-numpydoc
5e4d8f67 4022 (package-with-python2 python-numpydoc))
1c65314c 4023
1e656049
RW
4024(define-public python-numexpr
4025 (package
4026 (name "python-numexpr")
2ee57340 4027 (version "2.6.1")
1e656049
RW
4028 (source
4029 (origin
4030 (method url-fetch)
26112c0a 4031 (uri (pypi-uri "numexpr" version))
1e656049
RW
4032 (sha256
4033 (base32
2ee57340 4034 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
1e656049
RW
4035 (build-system python-build-system)
4036 (arguments `(#:tests? #f)) ; no tests included
4037 (propagated-inputs
4038 `(("python-numpy" ,python-numpy)))
4039 (home-page "https://github.com/pydata/numexpr")
4040 (synopsis "Fast numerical expression evaluator for NumPy")
4041 (description
4042 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4043expressions that operate on arrays are accelerated and use less memory than
4044doing the same calculation in Python. In addition, its multi-threaded
4045capabilities can make use of all your cores, which may accelerate
4046computations, most specially if they are not memory-bounded (e.g. those using
4047transcendental functions).")
f210e944 4048 (license license:expat)))
1e656049
RW
4049
4050(define-public python2-numexpr
f210e944 4051 (package-with-python2 python-numexpr))
1e656049 4052
361d982c
MB
4053(define-public python-cycler
4054 (package
4055 (name "python-cycler")
4056 (version "0.10.0")
4057 (source (origin
4058 (method url-fetch)
4059 (uri (pypi-uri "cycler" version))
4060 (sha256
4061 (base32
4062 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4063 (build-system python-build-system)
4064 (arguments
4065 ;; XXX: The current version requires 'coveralls' which we don't have.
4066 ;; Enable this for the next release which uses 'python-pytest'.
4067 '(#:tests? #f))
4068 (propagated-inputs
4069 `(("python-six" ,python-six)))
4070 (home-page "http://matplotlib.org/cycler/")
4071 (synopsis "Composable keyword argument iterator")
4072 (description
4073 "When using @code{matplotlib} and plotting more than one line, it is
4074common to want to be able to want to be able to cycle over one or more artist
4075styles; but the plotting logic can quickly become involved.
4076To address this and enable easy cycling over arbitrary @code{kwargs}, the
4077@code{Cycler} class was developed.")
4078 (license license:bsd-3)))
4079
4080(define-public python2-cycler
4081 (package-with-python2 python-cycler))
4082
2aa6d3ae
TD
4083(define-public python-colorspacious
4084 (package
4085 (name "python-colorspacious")
4086 (version "1.1.0")
4087 (source
4088 (origin
4089 (method url-fetch)
4090 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
4091 version ".tar.gz"))
4092 (file-name (string-append name "-" version))
4093 (sha256
4094 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
4095 (build-system python-build-system)
4096 (propagated-inputs
4097 `(("python-numpy" ,python-numpy)))
ba062b3e
TD
4098 (native-inputs
4099 `(("python-nose" ,python-nose)))
4100 (arguments
4101 `(#:phases
4102 (modify-phases %standard-phases
4103 (replace 'check
4104 (lambda _
4105 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
2aa6d3ae
TD
4106 (home-page "https://github.com/njsmith/colorspacious")
4107 (synopsis "Python library for colorspace conversions")
4108 (description "@code{colorspacious} is a Python library that lets you
4109convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4110 (license license:expat)))
4111
4112(define-public python2-colorspacious
4113 (package-with-python2 python-colorspacious))
4114
1c65314c
FB
4115(define-public python-matplotlib
4116 (package
4117 (name "python-matplotlib")
71d20587 4118 (version "2.0.2")
1c65314c
FB
4119 (source
4120 (origin
4121 (method url-fetch)
71d20587 4122 (uri (pypi-uri "matplotlib" version))
1c65314c
FB
4123 (sha256
4124 (base32
71d20587 4125 "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg"))))
1c65314c 4126 (build-system python-build-system)
25f9a068 4127 (propagated-inputs ; the following packages are all needed at run time
4535a93a
TD
4128 `(("python-cycler" ,python-cycler)
4129 ("python-pyparsing" ,python-pyparsing)
25f9a068
FB
4130 ("python-pygobject" ,python-pygobject)
4131 ("gobject-introspection" ,gobject-introspection)
1bbc659f 4132 ("python-tkinter" ,python "tk")
22d7360b 4133 ("python-dateutil" ,python-dateutil)
7ccb71e0 4134 ("python-numpy" ,python-numpy)
ca33a3ad
HG
4135 ("python-pillow" ,python-pillow)
4136 ("python-pytz" ,python-pytz)
4137 ("python-six" ,python-six)
25f9a068
FB
4138 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
4139 ;; from 'gtk+') provides the required 'typelib' files used by
4140 ;; 'gobject-introspection'. The location of these files is set with the
4141 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
4142 ;; is done automatically by a 'native-search-path' procedure. However,
4143 ;; at run-time the user must set this variable as follows:
4144 ;;
4145 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
4146 ("gtk+" ,gtk+)
4147 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4148 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4149 ;; object. For this reason we need to import both libraries.
4150 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
4151 ("python-pycairo" ,python-pycairo)
4152 ("python-cairocffi" ,python-cairocffi)))
1c65314c 4153 (inputs
ca33a3ad 4154 `(("libpng" ,libpng)
1c65314c
FB
4155 ("imagemagick" ,imagemagick)
4156 ("freetype" ,freetype)
25f9a068
FB
4157 ("cairo" ,cairo)
4158 ("glib" ,glib)
1c65314c 4159 ;; FIXME: Add backends when available.
1c65314c 4160 ;("python-wxpython" ,python-wxpython)
4535a93a 4161 ("python-pyqt" ,python-pyqt)
1bbc659f
FB
4162 ("tcl" ,tcl)
4163 ("tk" ,tk)))
1c65314c
FB
4164 (native-inputs
4165 `(("pkg-config" ,pkg-config)
ca33a3ad 4166 ("python-nose" ,python-nose)
4535a93a 4167 ("python-mock" ,python-mock)))
1c65314c
FB
4168 (arguments
4169 `(#:phases
42b7009a
DM
4170 (modify-phases %standard-phases
4171 (add-before 'build 'configure-environment
4172 (lambda* (#:key outputs inputs #:allow-other-keys)
4173 (let ((cairo (assoc-ref inputs "cairo"))
4174 (gtk+ (assoc-ref inputs "gtk+")))
4175 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
4176 ;; has not effect.
4177 (setenv "LD_LIBRARY_PATH"
4178 (string-append cairo "/lib:" gtk+ "/lib"))
4179 (setenv "HOME" (getcwd))
4180 (call-with-output-file "setup.cfg"
4181 (lambda (port)
4182 (format port "[directories]~%
1bbc659f 4183basedirlist = ~a,~a~%
57b7b8cd 4184 [rc_options]~%
1bbc659f
FB
4185backend = TkAgg~%"
4186 (assoc-ref inputs "tcl")
4535a93a
TD
4187 (assoc-ref inputs "tk")))))
4188 #t)))))
1c65314c
FB
4189 (home-page "http://matplotlib.org")
4190 (synopsis "2D plotting library for Python")
4191 (description
4192 "Matplotlib is a Python 2D plotting library which produces publication
4193quality figures in a variety of hardcopy formats and interactive environments
4194across platforms. Matplotlib can be used in Python scripts, the python and
4195ipython shell, web application servers, and six graphical user interface
4196toolkits.")
3f641af0 4197 (license license:psfl)
57b7b8cd 4198 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 4199
764c077b 4200(define-public python2-matplotlib
57b7b8cd
LC
4201 (let ((matplotlib (package-with-python2
4202 (strip-python2-variant python-matplotlib))))
764c077b 4203 (package (inherit matplotlib)
88c26834
AE
4204 ;; Make sure to use special packages for Python 2 instead
4205 ;; of those automatically rewritten by package-with-python2.
89b5c60e 4206 (propagated-inputs
7ca0dbc3 4207 `(("python2-pycairo" ,python2-pycairo)
4535a93a 4208 ("python2-functools32" ,python2-functools32)
764c077b 4209 ("python2-pygobject-2" ,python2-pygobject-2)
4535a93a 4210 ("python2-subprocess32" ,python2-subprocess32)
1bbc659f
FB
4211 ("python2-tkinter" ,python-2 "tk")
4212 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4213 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 4214
4535a93a
TD
4215(define-public python-matplotlib-documentation
4216 (package
4217 (name "python-matplotlib-documentation")
4218 (version (package-version python-matplotlib))
4219 (source (package-source python-matplotlib))
4220 (build-system python-build-system)
4221 (native-inputs
4222 `(("python-matplotlib" ,python-matplotlib)
4223 ("python-colorspacious" ,python-colorspacious)
4224 ("python-sphinx" ,python-sphinx)
4225 ("python-numpydoc" ,python-numpydoc)
4226 ("python-ipython" ,python-ipython)
1eaaea41
TD
4227 ("python-mock" ,python-mock)
4228 ("graphviz" ,graphviz)
4535a93a
TD
4229 ("texlive" ,texlive)
4230 ("texinfo" ,texinfo)
4231 ,@(package-native-inputs python-matplotlib)))
4232 (arguments
4233 `(#:tests? #f ; we're only generating documentation
4234 #:phases
4235 (modify-phases %standard-phases
1eaaea41
TD
4236 (replace 'build
4237 (lambda _
4238 (chdir "doc")
4239 ;; Produce pdf in 'A4' format.
4240 (substitute* "conf.py"
4241 (("latex_paper_size = 'letter'") "")
4242 ;; latex_paper_size is deprecated -> set paper size using
4243 ;; latex_elements
4244 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4245 ;; insert at a point where latex_elements{} is defined:
4246 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4247 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4535a93a 4248 (replace 'install
42b7009a 4249 (lambda* (#:key inputs outputs #:allow-other-keys)
4535a93a 4250 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
1eaaea41 4251 (doc (string-append data "/doc/python-matplotlib-" ,version))
42b7009a
DM
4252 (info (string-append data "/info"))
4253 (html (string-append doc "/html")))
1eaaea41
TD
4254 (mkdir-p html)
4255 (mkdir-p info)
4256 (copy-recursively "build/html" html)
4257 (symlink (string-append html "/_images")
4258 (string-append info "/matplotlib-figures"))
4259 (with-directory-excursion "build/texinfo"
4260 (substitute* "matplotlib.texi"
4261 (("@image\\{([^,]*)" all file)
4262 (string-append "@image{matplotlib-figures/" file)))
18b31516 4263 (symlink (string-append html "/_images")
1eaaea41
TD
4264 "./matplotlib-figures")
4265 (system* "makeinfo" "--no-split"
4266 "-o" "matplotlib.info" "matplotlib.texi"))
4267 (copy-file "build/texinfo/matplotlib.info"
4268 (string-append info "/matplotlib.info"))
4269 (copy-file "build/latex/Matplotlib.pdf"
4270 (string-append doc "/Matplotlib.pdf")))
4535a93a
TD
4271 #t)))))
4272 (home-page (package-home-page python-matplotlib))
4273 (synopsis "Documentation for the python-matplotlib package")
4274 (description (package-description python-matplotlib))
4275 (license (package-license python-matplotlib))))
1c65314c 4276
4535a93a
TD
4277(define-public python2-matplotlib-documentation
4278 (package-with-python2 python-matplotlib-documentation))
94914805 4279
0dde6232
RW
4280(define-public python2-pysnptools
4281 (package
4282 (name "python2-pysnptools")
a800018e 4283 (version "0.3.9")
0dde6232
RW
4284 (source
4285 (origin
4286 (method url-fetch)
3f2e9675 4287 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
4288 (sha256
4289 (base32
a800018e 4290 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
4291 (build-system python-build-system)
4292 (arguments
4293 `(#:python ,python-2)) ; only Python 2.7 is supported
4294 (propagated-inputs
4295 `(("python2-numpy" ,python2-numpy)
4296 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
4297 ("python2-pandas" ,python2-pandas)))
4298 (native-inputs
4299 `(("python2-cython" ,python2-cython)))
0dde6232 4300 (native-inputs
f3b98f4f 4301 `(("unzip" ,unzip)))
0dde6232
RW
4302 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4303 (synopsis "Library for reading and manipulating genetic data")
4304 (description
4305 "PySnpTools is a library for reading and manipulating genetic data. It
4306can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4307those files. It can also efficiently manipulate ranges of integers using set
4308operators such as union, intersection, and difference.")
3f641af0 4309 (license license:asl2.0)))
0dde6232 4310
c9b1b4f9
RW
4311(define-public python-rpy2
4312 (package
4313 (name "python-rpy2")
ec3bcbc7 4314 (version "2.7.6")
c9b1b4f9
RW
4315 (source
4316 (origin
4317 (method url-fetch)
ec3bcbc7 4318 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
4319 (sha256
4320 (base32
ec3bcbc7 4321 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 4322 (build-system python-build-system)
444464ec
MB
4323 (arguments
4324 '(#:phases
4325 (modify-phases %standard-phases
4326 (delete 'check)
4327 (add-after 'install 'check
4328 (lambda* (#:key outputs inputs #:allow-other-keys)
4329 ;; It's easier to run tests after install.
4330 ;; Make installed package available for running the tests
4331 (add-installed-pythonpath inputs outputs)
4332 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
482d9591
HG
4333 (propagated-inputs
4334 `(("python-six" ,python-six)))
c9b1b4f9 4335 (inputs
482d9591 4336 `(("readline" ,readline)
c9b1b4f9
RW
4337 ("icu4c" ,icu4c)
4338 ("pcre" ,pcre)
2d7c4ae3 4339 ("r-minimal" ,r-minimal)
aeb64f3c 4340 ("r-survival" ,r-survival)))
c9b1b4f9 4341 (native-inputs
f3b98f4f 4342 `(("zlib" ,zlib)))
c9b1b4f9
RW
4343 (home-page "http://rpy.sourceforge.net/")
4344 (synopsis "Python interface to the R language")
4345 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4346low-level interface to R from Python, a proposed high-level interface,
4347including wrappers to graphical libraries, as well as R-like structures and
4348functions.")
3f641af0 4349 (license license:gpl3+)))
c9b1b4f9
RW
4350
4351(define-public python2-rpy2
4352 (let ((rpy2 (package-with-python2 python-rpy2)))
4353 (package (inherit rpy2)
d6abd094 4354 (propagated-inputs
c9b1b4f9 4355 `(("python2-singledispatch" ,python2-singledispatch)
d6abd094 4356 ,@(package-propagated-inputs rpy2))))))
c9b1b4f9 4357
bb986599
FB
4358(define-public python-scipy
4359 (package
4360 (name "python-scipy")
09efef33 4361 (version "0.19.1")
bb986599
FB
4362 (source
4363 (origin
4364 (method url-fetch)
09efef33 4365 (uri (pypi-uri "scipy" version))
bb986599
FB
4366 (sha256
4367 (base32
09efef33 4368 "1rl411bvla6q7qfdb47fpdnyjhfgzl6smpha33n9ar1klykjr6m1"))))
bb986599 4369 (build-system python-build-system)
dd86c0d1 4370 (propagated-inputs
bb986599
FB
4371 `(("python-numpy" ,python-numpy)
4372 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
4373 ("python-pyparsing" ,python-pyparsing)))
4374 (inputs
4375 `(("lapack" ,lapack)
719b01c1 4376 ("openblas" ,openblas)))
bb986599 4377 (native-inputs
35093253
TD
4378 `(("python-cython" ,python-cython)
4379 ("python-nose" ,python-nose)
dd86c0d1 4380 ("python-sphinx" ,python-sphinx)
5248d49e 4381 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 4382 ("gfortran" ,gfortran)
bb986599
FB
4383 ("perl" ,perl)))
4384 (outputs '("out" "doc"))
4385 (arguments
4386 `(#:phases
16ca6aaa 4387 (modify-phases %standard-phases
16ca6aaa
MB
4388 (add-before 'build 'configure-openblas
4389 (lambda* (#:key inputs #:allow-other-keys)
4390 (call-with-output-file "site.cfg"
4391 (lambda (port)
4392 (format port
4393 "[blas]
719b01c1
RW
4394libraries = openblas
4395library_dirs = ~a/lib
4396include_dirs = ~a/include
d548e6aa
HG
4397
4398# backslash-n to make emacs happy
4399\n[atlas]
719b01c1
RW
4400library_dirs = ~a/lib
4401atlas_libs = openblas
4402"
16ca6aaa
MB
4403 (assoc-ref inputs "openblas")
4404 (assoc-ref inputs "openblas")
4405 (assoc-ref inputs "openblas"))))
db967b64 4406 #t))
35093253
TD
4407 (add-after 'install 'install-doc
4408 (lambda* (#:key inputs outputs #:allow-other-keys)
4409 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4410 (doc (string-append data "/doc/" ,name "-" ,version))
4411 (html (string-append doc "/html"))
4412 (pyver ,(string-append "PYVER=")))
4413 ;; Make installed package available for building the
4414 ;; documentation
4415 (add-installed-pythonpath inputs outputs)
4416 (with-directory-excursion "doc"
4417 ;; Fix generation of images for mathematical expressions.
4418 (substitute* (find-files "source" "conf\\.py")
4419 (("pngmath_use_preview = True")
4420 "pngmath_use_preview = False"))
4421 (mkdir-p html)
4422 (system* "make" "html" pyver)
4423 (with-directory-excursion "build/html"
4424 (for-each (lambda (file)
4425 (let* ((dir (dirname file))
4426 (tgt-dir (string-append html "/" dir)))
4427 (install-file file html)))
4428 (find-files "." ".*")))))
4429 #t))
4430 (add-after 'unpack 'fix-tests
4431 (lambda _
4432 (substitute* "scipy/integrate/tests/test_quadpack.py"
4433 (("libm.so") "libm.so.6"))
4434 #t))
4435 ;; Tests can only be run after the library has been installed and not
4436 ;; within the source directory.
4437 (delete 'check)
4438 (add-after 'install 'check
4439 (lambda* (#:key inputs outputs #:allow-other-keys)
d548e6aa 4440 (add-installed-pythonpath inputs outputs)
35093253
TD
4441 (with-directory-excursion "/tmp"
4442 (zero? (system* "python" "-c"
4443 "import scipy; scipy.test('full')")))
4444 #t)))))
bb986599
FB
4445 (home-page "http://www.scipy.org/")
4446 (synopsis "The Scipy library provides efficient numerical routines")
4447 (description "The SciPy library is one of the core packages that make up
4448the SciPy stack. It provides many user-friendly and efficient numerical
4449routines such as routines for numerical integration and optimization.")
9200fe14 4450 (properties `((python2-variant . ,(delay python2-scipy))))
3f641af0 4451 (license license:bsd-3)))
bb986599 4452
764c077b 4453(define-public python2-scipy
35093253
TD
4454 (package-with-python2
4455 (strip-python2-variant python-scipy)))
bb986599 4456
e537c917
CB
4457(define-public python-sockjs-tornado
4458 (package
4459 (name "python-sockjs-tornado")
4460 (version "1.0.3")
4461 (source
4462 (origin
4463 (method url-fetch)
4464 (uri (pypi-uri "sockjs-tornado" version))
4465 (sha256
4466 (base32
4467 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4468 (build-system python-build-system)
4469 (arguments
4470 `(;; There are no tests, and running the test phase requires missing
4471 ;; dependencies
4472 #:tests? #f))
4473 (propagated-inputs
4474 `(("python-tornado" ,python-tornado)))
4475 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4476 (synopsis
4477 "SockJS python server implementation on top of Tornado framework")
4478 (description
4479 "SockJS-tornado provides the server side counterpart to a SockJS client
4480library, through the Tornado framework.
4481
4482SockJS provides a low latency, full duplex, cross-domain communication channel
4483between a web browser and web server.")
4484 (license license:expat)))
4485
4486(define-public python2-sockjs-tornado
4487 (package-with-python2 python-sockjs-tornado))
4488
73acc193 4489(define-public python-socksipy-branch
4490 (package
4491 (name "python-socksipy-branch")
4492 (version "1.01")
4493 (source
4494 (origin
4495 (method url-fetch)
4496 (uri (pypi-uri "SocksiPy-branch" version))
4497 (sha256
4498 (base32
4499 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4500 (build-system python-build-system)
4501 (arguments
4502 `(#:tests? #f)) ; There are no tests
4503 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4504 (synopsis "Python SOCKS module")
4505 (description
4506 "SocksiPy - A Python SOCKS client module. It provides a
4507socket-like interface that supports connections to any TCP
4508service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4509The original version was developed by Dan Haim, this is a
4510branch created by Mario Vilas to address some open issues,
4511as the original project seems to have been abandoned circa 2007.")
4512 (license license:bsd-3)))
4513
4514(define-public python2-socksipy-branch
4515 (package-with-python2 python-socksipy-branch))
4516
94914805
EB
4517(define-public python-sqlalchemy
4518 (package
4519 (name "python-sqlalchemy")
a4ba286b 4520 (version "1.0.12")
94914805
EB
4521 (source
4522 (origin
4523 (method url-fetch)
4524 (uri (string-append "https://pypi.python.org/packages/source/S/"
4525 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4526 (sha256
4527 (base32
a4ba286b 4528 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
4529 (build-system python-build-system)
4530 (native-inputs
4531 `(("python-cython" ,python-cython) ;for c extensions
4532 ("python-pytest" ,python-pytest)
4533 ("python-mock" ,python-mock))) ;for tests
4534 (arguments
4535 `(#:phases (alist-replace
4536 'check
4537 (lambda _ (zero? (system* "py.test")))
4538 %standard-phases)))
4539 (home-page "http://www.sqlalchemy.org")
4540 (synopsis "Database abstraction library")
4541 (description
4542 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4543gives application developers the full power and flexibility of SQL. It
4544provides a full suite of well known enterprise-level persistence patterns,
4545designed for efficient and high-performing database access, adapted into a
4546simple and Pythonic domain language.")
3f641af0 4547 (license license:x11)))
94914805
EB
4548
4549(define-public python2-sqlalchemy
4550 (package-with-python2 python-sqlalchemy))
c937562e 4551
4a093330
DM
4552(define-public python-pycodestyle
4553 (package
4554 (name "python-pycodestyle")
9b801661 4555 (version "2.3.1")
4a093330
DM
4556 (source
4557 (origin
4558 (method url-fetch)
4559 (uri (pypi-uri "pycodestyle" version))
4560 (sha256
4561 (base32
9b801661 4562 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
4a093330
DM
4563 (build-system python-build-system)
4564 (home-page "https://pycodestyle.readthedocs.io/")
4565 (synopsis "Python style guide checker")
4566 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4567Python code against some of the style conventions in
4568@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 4569 (license license:expat)))
4a093330
DM
4570
4571(define-public python2-pycodestyle
f210e944 4572 (package-with-python2 python-pycodestyle))
b91912c4
DM
4573
4574(define-public python-orderedmultidict
4575 (package
4576 (name "python-orderedmultidict")
9e2802cb 4577 (version "0.7.11")
b91912c4
DM
4578 (source
4579 (origin
4580 (method url-fetch)
4581 (uri (pypi-uri "orderedmultidict" version))
4582 (sha256
4583 (base32
9e2802cb 4584 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
b91912c4
DM
4585 (build-system python-build-system)
4586 (arguments
4587 `(#:phases
4588 (modify-phases %standard-phases
4589 (add-after 'unpack 'fix-tests
4590 (lambda _
4591 ;; The package uses nosetest for running the tests.
4592 ;; Adding this initfile allows to run the test suite
4593 ;; without requiring nosetest.
4594 (zero? (system* "touch" "tests/__init__.py")))))))
4595 (propagated-inputs
4596 `(("python-six" ,python-six)))
4597 (native-inputs
4598 `(("python-pycodestyle" ,python-pycodestyle)))
4599 (home-page "https://github.com/gruns/orderedmultidict")
4600 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4601 (description "This package contains a library for ordered multivalue
4602dictionaries. A multivalue dictionary is a dictionary that can store
4603multiple values for the same key. An ordered multivalue dictionary is a
4604multivalue dictionary that retains the order of insertions and deletions.")
f210e944 4605 (license license:unlicense)))
b91912c4
DM
4606
4607(define-public python2-orderedmultidict
f210e944 4608 (package-with-python2 python-orderedmultidict))
9dede065
DM
4609
4610(define-public python-furl
4611 (package
4612 (name "python-furl")
4613 (version "0.5.6")
4614 (source
4615 (origin
4616 (method url-fetch)
4617 (uri (pypi-uri "furl" version))
4618 (sha256
4619 (base32
4620 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4621 (build-system python-build-system)
4622 (propagated-inputs
4623 `(("python-six" ,python-six)
4624 ("python-orderedmultidict" ,python-orderedmultidict)))
4625 (native-inputs
4626 `(("python-pycodestyle" ,python-pycodestyle)))
4627 (home-page "https://github.com/gruns/furl")
4628 (synopsis "URL manipulation in Python")
4629 (description "Furl provides an easy-to-use alternative to the
4630@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 4631 (license license:unlicense)))
9dede065
DM
4632
4633(define-public python2-furl
f210e944 4634 (package-with-python2 python-furl))
462bf271 4635
4e52739c
MB
4636(define-public python-flaky
4637 (package
4638 (name "python-flaky")
4639 (version "3.4.0")
4640 (source (origin
4641 (method url-fetch)
4642 (uri (pypi-uri "flaky" version))
4643 (sha256
4644 (base32
4645 "18pkmf79rfkfpy1d2rrx3v55nxj762ilyk9rvd6s6dccxw58imsa"))))
4646 (build-system python-build-system)
4647 (arguments
4648 ;; TODO: Tests require 'coveralls' and 'genty' which are not in Guix yet.
4649 '(#:tests? #f))
4650 (home-page "https://github.com/box/flaky")
4651 (synopsis "Automatically rerun flaky tests")
4652 (description
4653 "Flaky is a plugin for @code{nose} or @code{py.test} that automatically
4654reruns flaky tests.
4655
4656Ideally, tests reliably pass or fail, but sometimes test fixtures must rely
4657on components that aren't 100% reliable. With flaky, instead of removing
f1ddfe4f 4658those tests or marking them to @code{@@skip}, they can be automatically
4e52739c
MB
4659retried.")
4660 (license license:asl2.0)))
4661
4662(define-public python2-flaky
4663 (package-with-python2 python-flaky))
4664
462bf271
DM
4665(define-public python-flask-babel
4666 (package
4667 (name "python-flask-babel")
4668 (version "0.11.1")
4669 (source
4670 (origin
4671 (method url-fetch)
4672 (uri (pypi-uri "Flask-Babel" version))
4673 (sha256
4674 (base32
4675 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4676 (build-system python-build-system)
4677 (propagated-inputs
4678 `(("python-flask" ,python-flask)
4679 ("python-babel" ,python-babel)
4680 ("python-jinja2" ,python-jinja2)
4681 ("python-pytz" ,python-pytz)))
4682 (home-page "https://github.com/python-babel/flask-babel")
4683 (synopsis "Add i18n/l10n support to Flask applications")
4684 (description "This package implements internationalization and localization
4685support for Flask. This is based on the Python babel module as well as pytz -
4686both of which are installed automatically if you install this library.")
f210e944 4687 (license license:bsd-3)))
462bf271
DM
4688
4689(define-public python2-flask-babel
f210e944 4690 (package-with-python2 python-flask-babel))
4a093330 4691
de2966cf
EF
4692(define-public python-sqlalchemy-utils
4693 (package
4694 (name "python-sqlalchemy-utils")
fd2662e9 4695 (version "0.32.13")
de2966cf
EF
4696 (source
4697 (origin
4698 (method url-fetch)
4699 (uri (pypi-uri "SQLAlchemy-Utils" version))
4700 (sha256
4701 (base32
fd2662e9 4702 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
de2966cf 4703 (build-system python-build-system)
35d56b7b
MB
4704 (arguments
4705 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4706 ;; #:phases
4707 ;; (modify-phases %standard-phases
4708 ;; (replace 'check
4709 ;; (lambda _
4710 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
c22b4f87 4711 (propagated-inputs
de2966cf
EF
4712 `(("python-six" ,python-six)
4713 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb 4714 (native-inputs
22d7360b 4715 `(("python-dateutil" ,python-dateutil)
35d56b7b
MB
4716 ("python-flexmock" ,python-flexmock)
4717 ("python-psycopg2" ,python-psycopg2)
4718 ("python-pytest" ,python-pytest)
4719 ("python-pytz" ,python-pytz)))
de2966cf
EF
4720 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4721 (synopsis "Various utility functions for SQLAlchemy")
4722 (description
4723 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4724for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4725
4726You might also want to install the following optional dependencies:
4727@enumerate
4728@item @code{python-passlib}
4729@item @code{python-babel}
4730@item @code{python-cryptography}
4731@item @code{python-pytz}
4732@item @code{python-psycopg2}
4733@item @code{python-furl}
4734@item @code{python-flask-babel}
4735@end enumerate
4736")
de2966cf
EF
4737 (license license:bsd-3)))
4738
4739(define-public python2-sqlalchemy-utils
f210e944 4740 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4741
af5a4602
CAW
4742(define-public python-alembic
4743 (package
4744 (name "python-alembic")
4418990d 4745 (version "0.8.10")
af5a4602
CAW
4746 (source
4747 (origin
4748 (method url-fetch)
4749 (uri (pypi-uri "alembic" version))
4750 (sha256
4751 (base32
4418990d 4752 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
af5a4602
CAW
4753 (build-system python-build-system)
4754 (native-inputs
4755 `(("python-mock" ,python-mock)
4756 ("python-pytest-cov" ,python-pytest-cov)))
4757 (propagated-inputs
4758 `(("python-sqlalchemy" ,python-sqlalchemy)
4759 ("python-mako" ,python-mako)
4760 ("python-editor" ,python-editor)))
4761 (home-page "http://bitbucket.org/zzzeek/alembic")
4762 (synopsis
4763 "Database migration tool for SQLAlchemy")
4764 (description
4765 "Alembic is a lightweight database migration tool for usage with the
4766SQLAlchemy Database Toolkit for Python.")
f210e944 4767 (license license:expat)))
af5a4602
CAW
4768
4769(define-public python2-alembic
f210e944 4770 (package-with-python2 python-alembic))
af5a4602 4771
138adbbe
TD
4772(define-public python-autopep8
4773 (package
4774 (name "python-autopep8")
4775 (version "1.2.4")
4776 (source
4777 (origin
4778 (method url-fetch)
4779 (uri (pypi-uri "autopep8" version))
4780 (sha256
4781 (base32
4782 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4783 (build-system python-build-system)
4784 (propagated-inputs
4785 `(("python-pep8" ,python-pep8)))
4786 (home-page "https://github.com/hhatto/autopep8")
4787 (synopsis "Format Python code according to the PEP 8 style guide")
4788 (description
4789 "@code{autopep8} automatically formats Python code to conform to
4790the PEP 8 style guide. It uses the pycodestyle utility to determine
4791what parts of the code needs to be formatted. @code{autopep8} is
4792capable of fixing most of the formatting issues that can be reported
4793by pycodestyle.")
4794 (license (license:non-copyleft
4795 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4796
4797(define-public python2-autopep8
4798 (package-with-python2 python-autopep8))
4799
1671c07c
EB
4800(define-public python-distutils-extra
4801 (package
4802 (name "python-distutils-extra")
4803 (version "2.38")
4804 (source
4805 (origin
4806 (method url-fetch)
4807 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4808 version "/+download/python-distutils-extra-"
4809 version ".tar.gz"))
4810 (sha256
4811 (base32
4812 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4813 (build-system python-build-system)
1671c07c
EB
4814 (home-page "https://launchpad.net/python-distutils-extra/")
4815 (synopsis "Enhancements to Python's distutils")
4816 (description
4817 "The python-distutils-extra module enables you to easily integrate
4818gettext support, themed icons, and scrollkeeper-based documentation into
4819Python's distutils.")
3f641af0 4820 (license license:gpl2)))
1671c07c
EB
4821
4822(define-public python2-distutils-extra
4823 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4824
4825(define-public python2-elib.intl
4826 (package
4827 (name "python2-elib.intl")
4828 (version "0.0.3")
4829 (source
4830 (origin
4831 ;; This project doesn't tag releases or publish tarballs, so we take
4832 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4833 (method git-fetch)
4834 (uri (git-reference
4835 (url "https://github.com/dieterv/elib.intl.git")
4836 (commit "d09997cfef")))
4837 (sha256
4838 (base32
4839 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4840 (build-system python-build-system)
ea5456c8
EB
4841 (arguments
4842 ;; incompatible with Python 3 (exception syntax)
4843 `(#:python ,python-2
b41a05ce 4844 #:tests? #f))
ea5456c8
EB
4845 (home-page "https://github.com/dieterv/elib.intl")
4846 (synopsis "Enhanced internationalization for Python")
4847 (description
4848 "The elib.intl module provides enhanced internationalization (I18N)
4849services for your Python modules and applications.")
3f641af0 4850 (license license:lgpl3+)))
ea5456c8 4851
c937562e
EB
4852(define-public python-pillow
4853 (package
4854 (name "python-pillow")
aba5182c 4855 (version "3.3.3")
c937562e
EB
4856 (source
4857 (origin
4858 (method url-fetch)
f1d9231d 4859 (uri (pypi-uri "Pillow" version))
a9681c74 4860 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
c937562e
EB
4861 (sha256
4862 (base32
aba5182c 4863 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4864 (build-system python-build-system)
4865 (native-inputs
f3b98f4f 4866 `(("python-nose" ,python-nose)))
c937562e 4867 (inputs
5ff408d9
SB
4868 `(("freetype" ,freetype)
4869 ("lcms" ,lcms)
c937562e
EB
4870 ("zlib" ,zlib)
4871 ("libjpeg" ,libjpeg)
4872 ("openjpeg" ,openjpeg)
5ff408d9
SB
4873 ("libtiff" ,libtiff)
4874 ("libwebp" ,libwebp)))
c937562e 4875 (arguments
e5358a6b 4876 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4877 (add-after
4878 'install 'check-installed
6151120a 4879 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4880 (begin
4881 (setenv "HOME" (getcwd))
6151120a
HG
4882 ;; Make installed package available for running the
4883 ;; tests
4884 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4885 (and (zero? (system* "python" "selftest.py"
4886 "--installed"))
4887 (zero? (system* "python" "test-installed.py"))))))
4888 (delete 'check))))
c937562e
EB
4889 (home-page "https://pypi.python.org/pypi/Pillow")
4890 (synopsis "Fork of the Python Imaging Library")
4891 (description
4892 "The Python Imaging Library adds image processing capabilities to your
4893Python interpreter. This library provides extensive file format support, an
4894efficient internal representation, and fairly powerful image processing
4895capabilities. The core image library is designed for fast access to data
4896stored in a few basic pixel formats. It should provide a solid foundation for
4897a general image processing tool.")
3f641af0 4898 (license (license:x11-style
c937562e
EB
4899 "http://www.pythonware.com/products/pil/license.htm"
4900 "The PIL Software License"))))
4901
4902(define-public python2-pillow
4903 (package-with-python2 python-pillow))
bb986599 4904
a415f036
FB
4905(define-public python-pycparser
4906 (package
4907 (name "python-pycparser")
5043b20d 4908 (version "2.17")
a415f036
FB
4909 (source
4910 (origin
4911 (method url-fetch)
38eb6919 4912 (uri (pypi-uri "pycparser" version))
a415f036
FB
4913 (sha256
4914 (base32
5043b20d 4915 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
a415f036
FB
4916 (outputs '("out" "doc"))
4917 (build-system python-build-system)
4918 (native-inputs
f3b98f4f 4919 `(("pkg-config" ,pkg-config)))
a415f036 4920 (arguments
89b5c60e 4921 `(#:phases
819939cb
TGR
4922 (modify-phases %standard-phases
4923 (replace 'check
4924 (lambda _
4925 (with-directory-excursion "tests"
4926 (zero? (system* "python" "all_tests.py")))))
4927 (add-after 'install 'install-doc
4928 (lambda* (#:key outputs #:allow-other-keys)
4929 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4930 (doc (string-append data "/doc/" ,name "-" ,version))
4931 (examples (string-append doc "/examples")))
4932 (mkdir-p examples)
4933 (for-each (lambda (file)
4934 (copy-file (string-append "." file)
4935 (string-append doc file)))
4936 '("/README.rst" "/CHANGES" "/LICENSE"))
4937 (copy-recursively "examples" examples)))))))
a415f036
FB
4938 (home-page "https://github.com/eliben/pycparser")
4939 (synopsis "C parser in Python")
4940 (description
4941 "Pycparser is a complete parser of the C language, written in pure Python
4942using the PLY parsing library. It parses C code into an AST and can serve as
4943a front-end for C compilers or analysis tools.")
3f641af0 4944 (license license:bsd-3)))
a415f036
FB
4945
4946(define-public python2-pycparser
4947 (package-with-python2 python-pycparser))
57c3f716
FB
4948
4949(define-public python-cffi
4950 (package
4951 (name "python-cffi")
029933cf 4952 (version "1.10.0")
57c3f716
FB
4953 (source
4954 (origin
4955 (method url-fetch)
2d3a437c 4956 (uri (pypi-uri "cffi" version))
89b5c60e 4957 (sha256
029933cf 4958 (base32 "1mffyilq4qycm8gs4wkgb18rnqil8a9blqq77chdlshzxc8jkc5k"))))
57c3f716
FB
4959 (build-system python-build-system)
4960 (outputs '("out" "doc"))
4961 (inputs
4962 `(("libffi" ,libffi)))
4963 (propagated-inputs ; required at run-time
4964 `(("python-pycparser" ,python-pycparser)))
4965 (native-inputs
4966 `(("pkg-config" ,pkg-config)
4967 ("python-sphinx" ,python-sphinx)
f3b98f4f 4968 ("python-pytest" ,python-pytest)))
57c3f716 4969 (arguments
295f32f3
MB
4970 `(#:modules ((ice-9 ftw)
4971 (srfi srfi-26)
4972 (guix build utils)
4973 (guix build python-build-system))
4974 #:phases
4975 (modify-phases %standard-phases
4976 (replace 'check
4977 (lambda _
4978 (setenv "PYTHONPATH"
4979 (string-append
4980 (getenv "PYTHONPATH")
4981 ":" (getcwd) "/build/"
4982 (car (scandir "build" (cut string-prefix? "lib." <>)))))
029933cf
MB
4983
4984 ;; XXX The "normal" approach of setting CC and friends does
4985 ;; not work here. Is this the correct way of doing things?
4986 (substitute* "testing/embedding/test_basic.py"
4987 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4988 (string-append "c = distutils.ccompiler.new_compiler();"
4989 "c.set_executables(compiler='gcc',"
4990 "compiler_so='gcc',linker_exe='gcc',"
4991 "linker_so='gcc -shared')")))
4992 (substitute* "testing/cffi0/test_ownlib.py"
4993 (("'cc testownlib") "'gcc testownlib"))
4994 (zero? (system* "py.test" "-v" "c/" "testing/"))))
295f32f3
MB
4995 (add-after 'install 'install-doc
4996 (lambda* (#:key outputs #:allow-other-keys)
4997 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4998 (doc (string-append data "/doc/" ,name "-" ,version))
4999 (html (string-append doc "/html")))
5000 (with-directory-excursion "doc"
5001 (system* "make" "html")
5002 (mkdir-p html)
5003 (copy-recursively "build/html" html))
5004 (copy-file "LICENSE" (string-append doc "/LICENSE"))
5005 #t))))))
57c3f716
FB
5006 (home-page "http://cffi.readthedocs.org")
5007 (synopsis "Foreign function interface for Python")
5008 (description
5009 "Foreign Function Interface for Python calling C code.")
bd3fa666 5010 (license license:expat)))
57c3f716
FB
5011
5012(define-public python2-cffi
5013 (package-with-python2 python-cffi))
6fa14469
FB
5014
5015(define-public python-xcffib
5016 (package
5017 (name "python-xcffib")
8347c122 5018 (version "0.5.1")
6fa14469
FB
5019 (source
5020 (origin
5021 (method url-fetch)
8347c122 5022 (uri (pypi-uri "xcffib" version))
6fa14469
FB
5023 (sha256
5024 (base32
8347c122 5025 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
6fa14469
FB
5026 (build-system python-build-system)
5027 (inputs
482d9591 5028 `(("libxcb" ,libxcb)))
6fa14469 5029 (propagated-inputs
482d9591
HG
5030 `(("python-cffi" ,python-cffi) ; used at run time
5031 ("python-six" ,python-six)))
6fa14469 5032 (arguments
e46bf223 5033 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
e2816ac7
MB
5034 #:tests? #f
5035 #:phases
c8cd850c 5036 (modify-phases %standard-phases
e46bf223
JMSG
5037 (add-after 'unpack 'fix-libxcb-path
5038 (lambda* (#:key inputs #:allow-other-keys)
5039 (let ((libxcb (assoc-ref inputs "libxcb")))
5040 (substitute* '("xcffib/__init__.py")
5041 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5042 #t)))
c8cd850c
MB
5043 (add-after 'install 'install-doc
5044 (lambda* (#:key outputs #:allow-other-keys)
5045 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5046 "/doc/" ,name "-" ,version)))
5047 (mkdir-p doc)
5048 (copy-file "README.md"
5049 (string-append doc "/README.md"))
5050 #t))))))
6fa14469
FB
5051 (home-page "https://github.com/tych0/xcffib")
5052 (synopsis "XCB Python bindings")
5053 (description
5054 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5055support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 5056 (license license:expat)))
6fa14469
FB
5057
5058(define-public python2-xcffib
5059 (package-with-python2 python-xcffib))
5060
9e099723
FB
5061(define-public python-cairocffi
5062 (package
5063 (name "python-cairocffi")
80f78e8f 5064 (version "0.8.0")
9e099723
FB
5065 (source
5066 (origin
5067 (method url-fetch)
5068 ;; The archive on pypi is missing the 'utils' directory!
3015d455 5069 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
9e099723 5070 version ".tar.gz"))
f586c877 5071 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
5072 (sha256
5073 (base32
80f78e8f 5074 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
9e099723
FB
5075 (build-system python-build-system)
5076 (outputs '("out" "doc"))
5077 (inputs
5078 `(("gdk-pixbuf" ,gdk-pixbuf)
5079 ("cairo" ,cairo)))
5080 (native-inputs
5081 `(("pkg-config" ,pkg-config)
5082 ("python-sphinx" ,python-sphinx)
f3b98f4f 5083 ("python-docutils" ,python-docutils)))
9e099723
FB
5084 (propagated-inputs
5085 `(("python-xcffib" ,python-xcffib))) ; used at run time
5086 (arguments
a792e1aa
MB
5087 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
5088 #:tests? #f
5089 #:phases
6734c7ba
MB
5090 (modify-phases %standard-phases
5091 (add-after 'install 'install-doc
5092 (lambda* (#:key inputs outputs #:allow-other-keys)
5093 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5094 (doc (string-append data "/doc/" ,name "-" ,version))
5095 (html (string-append doc "/html")))
5096 (setenv "LD_LIBRARY_PATH"
5097 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5098 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5099 (setenv "LANG" "en_US.UTF-8")
5100 (mkdir-p html)
5101 (for-each (lambda (file)
5102 (copy-file (string-append "." file)
5103 (string-append doc file)))
5104 '("/README.rst" "/CHANGES" "/LICENSE"))
5105 (system* "python" "setup.py" "build_sphinx")
5106 (copy-recursively "docs/_build/html" html)
5107 #t))))))
3015d455 5108 (home-page "https://github.com/Kozea/cairocffi")
9e099723
FB
5109 (synopsis "Python bindings and object-oriented API for Cairo")
5110 (description
5111 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5112Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5113graphics library with support for multiple backends including image buffers,
5114PNG, PostScript, PDF, and SVG file output.")
3f641af0 5115 (license license:bsd-3)))
9e099723
FB
5116
5117(define-public python2-cairocffi
5118 (package-with-python2 python-cairocffi))
5119
3cff95cb
RW
5120(define-public python-decorator
5121 (package
5122 (name "python-decorator")
d79fa7da 5123 (version "4.0.10")
3cff95cb
RW
5124 (source
5125 (origin
5126 (method url-fetch)
e21338be 5127 (uri (pypi-uri "decorator" version))
3cff95cb 5128 (sha256
d79fa7da 5129 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
3cff95cb
RW
5130 (build-system python-build-system)
5131 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 5132 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
5133 (synopsis "Python module to simplify usage of decorators")
5134 (description
5135 "The aim of the decorator module is to simplify the usage of decorators
5136for the average programmer, and to popularize decorators usage giving examples
5137of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5138etc. The core of this module is a decorator factory.")
5139 (license license:expat)))
5140
5141(define-public python2-decorator
5142 (package-with-python2 python-decorator))
5143
2c0499ad
RW
5144(define-public python-drmaa
5145 (package
5146 (name "python-drmaa")
7c427932 5147 (version "0.7.7")
2c0499ad
RW
5148 (source
5149 (origin
5150 (method url-fetch)
d92621cf 5151 (uri (pypi-uri "drmaa" version))
2c0499ad 5152 (sha256
7c427932 5153 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
2c0499ad
RW
5154 (build-system python-build-system)
5155 ;; The test suite requires libdrmaa which is provided by the cluster
5156 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5157 ;; should be set to the path of the libdrmaa library.
5158 (arguments '(#:tests? #f))
5159 (native-inputs
f3b98f4f 5160 `(("python-nose" ,python-nose)))
2c0499ad
RW
5161 (home-page "https://pypi.python.org/pypi/drmaa")
5162 (synopsis "Python bindings for the DRMAA library")
5163 (description
5164 "A Python package for Distributed Resource Management (DRM) job
5165submission and control. This package is an implementation of the DRMAA 1.0
5166Python language binding specification.")
3f641af0 5167 (license license:bsd-3)))
2c0499ad
RW
5168
5169(define-public python2-drmaa
5170 (package-with-python2 python-drmaa))
5171
d05c6da0
RW
5172(define-public python-gridmap
5173 (package
5174 (name "python-gridmap")
5175 (version "0.13.0")
5176 (source
5177 (origin
5178 (method url-fetch)
5179 (uri (string-append
5180 "https://github.com/pygridtools/gridmap/archive/v"
5181 version ".tar.gz"))
5182 (file-name (string-append name "-" version ".tar.gz"))
5183 (sha256
5184 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
5185 (build-system python-build-system)
ad348f9f
MB
5186 (arguments
5187 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
f22efa01 5188 (propagated-inputs
d05c6da0
RW
5189 `(("python-psutil" ,python-psutil)
5190 ("python-drmaa" ,python-drmaa)
5191 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
5192 (home-page "https://github.com/pygridtools/gridmap")
5193 (synopsis "Create jobs on a cluster directly from Python")
5194 (description
5195 "Gridmap is a Python package to allow you to easily create jobs on the
5196cluster directly from Python. You can directly map Python functions onto the
5197cluster without needing to write any wrapper code yourself.")
3f641af0 5198 (license license:gpl3+)))
d05c6da0
RW
5199
5200(define-public python2-gridmap
5201 (package-with-python2 python-gridmap))
5202
cb6d5c54
RW
5203(define-public python-pexpect
5204 (package
5205 (name "python-pexpect")
ed118043 5206 (version "4.2.1")
cb6d5c54
RW
5207 (source
5208 (origin
5209 (method url-fetch)
ed118043 5210 (uri (pypi-uri "pexpect" version))
cb6d5c54 5211 (sha256
ed118043 5212 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
cb6d5c54
RW
5213 (build-system python-build-system)
5214 (arguments
5215 `(#:phases
5216 (modify-phases %standard-phases
ed118043
MB
5217 (add-before 'check 'prepare-tests
5218 (lambda _
5219 (substitute* (find-files "tests")
5220 (("/bin/ls") (which "ls"))
5221 (("/bin/echo") (which "echo"))
5222 (("/bin/which") (which "which"))
5223 ;; Many tests try to use the /bin directory which
5224 ;; is not present in the build environment.
5225 ;; Use one that's non-empty and unlikely to change.
5226 (("/bin'") "/dev'"))
5227 ;; XXX: Socket connection test gets "Connection reset by peer".
5228 ;; Why does it not work? Delete for now.
5229 (delete-file "tests/test_socket.py")
5230 #t))
3ee9355e 5231 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
cb6d5c54 5232 (native-inputs
ed118043 5233 `(("python-nose" ,python-nose)
350a3084 5234 ("python-pytest" ,python-pytest-3.0)
ed118043
MB
5235 ("man-db" ,man-db)
5236 ("which" ,which)))
5237 (propagated-inputs
5238 `(("python-ptyprocess" ,python-ptyprocess)))
cb6d5c54
RW
5239 (home-page "http://pexpect.readthedocs.org/")
5240 (synopsis "Controlling interactive console applications")
5241 (description
5242 "Pexpect is a pure Python module for spawning child applications;
5243controlling them; and responding to expected patterns in their output.
5244Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5245child application and control it as if a human were typing commands.")
3f641af0 5246 (license license:isc)))
cb6d5c54
RW
5247
5248(define-public python2-pexpect
5249 (package-with-python2 python-pexpect))
5250
229ad120
RW
5251(define-public python-setuptools-scm
5252 (package
5253 (name "python-setuptools-scm")
5b1f31ff 5254 (version "1.15.0")
229ad120
RW
5255 (source (origin
5256 (method url-fetch)
383af6b0 5257 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
5258 (sha256
5259 (base32
5b1f31ff 5260 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
229ad120
RW
5261 (build-system python-build-system)
5262 (home-page "https://github.com/pypa/setuptools_scm/")
5263 (synopsis "Manage Python package versions in SCM metadata")
5264 (description
383af6b0 5265 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
5266@dfn{software configuration management} (SCM) metadata instead of declaring
5267them as the version argument or in a SCM managed file.")
5268 (license license:expat)))
5269
5270(define-public python2-setuptools-scm
5271 (package-with-python2 python-setuptools-scm))
5272
b74270ee
RW
5273(define-public python-pathpy
5274 (package
5275 (name "python-pathpy")
5276 (version "8.1.1")
5277 (source
5278 (origin
5279 (method url-fetch)
5280 (uri (string-append "https://pypi.python.org/packages/source/p/"
5281 "path.py/path.py-" version ".tar.gz"))
5282 (sha256
5283 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 5284 (outputs '("out" "doc"))
b74270ee
RW
5285 (build-system python-build-system)
5286 (propagated-inputs
5287 `(("python-appdirs" ,python-appdirs)))
5288 (native-inputs
f3b98f4f 5289 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
5290 ("python-sphinx" ,python-sphinx)
5291 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
5292 ("python-pytest" ,python-pytest)
5293 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
5294 (arguments
5295 `(#:phases
5296 (modify-phases %standard-phases
5297 (add-after 'build 'build-doc
5298 (lambda _
5299 (setenv "LANG" "en_US.UTF-8")
5300 (zero? (system* "python" "setup.py" "build_sphinx"))))
5301 (add-after 'install 'install-doc
5302 (lambda* (#:key outputs #:allow-other-keys)
5303 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5304 (doc (string-append data "/doc/" ,name "-" ,version))
5305 (html (string-append doc "/html")))
5306 (mkdir-p html)
5307 (for-each (lambda (file)
5308 (copy-file file (string-append doc "/" file)))
5309 '("README.rst" "CHANGES.rst"))
5310 (copy-recursively "build/sphinx/html" html)))))))
7bf837fd 5311 (home-page "https://github.com/jaraco/path.py")
b74270ee
RW
5312 (synopsis "Python module wrapper for built-in os.path")
5313 (description
5314 "@code{path.py} implements path objects as first-class entities, allowing
5315common operations on files to be invoked on those path objects directly.")
5316 (license license:expat)))
5317
5318(define-public python2-pathpy
5319 (package-with-python2 python-pathpy))
5320
0d34e01b
RW
5321(define-public python-pickleshare
5322 (package
5323 (name "python-pickleshare")
5324 (version "0.5")
5325 (source
5326 (origin
5327 (method url-fetch)
5328 (uri (string-append "https://pypi.python.org/packages/source/p/"
5329 "pickleshare/pickleshare-" version ".tar.gz"))
5330 (sha256
5331 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5332 (build-system python-build-system)
5333 (propagated-inputs
5334 `(("python-pathpy" ,python-pathpy)))
5335 (home-page "https://github.com/vivainio/pickleshare")
5336 (synopsis "Tiny key value database with concurrency support")
5337 (description
5338 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5339Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5340shelve, many processes can access the database simultaneously. Changing a
5341value in database is immediately visible to other processes accessing the same
5342database. Concurrency is possible because the values are stored in separate
5343files. Hence the “database” is a directory where all files are governed by
5344PickleShare.")
5345 (license license:expat)))
5346
5347(define-public python2-pickleshare
5348 (package-with-python2 python-pickleshare))
5349
cd6e5189
RW
5350(define-public python-simplegeneric
5351 (package
5352 (name "python-simplegeneric")
5353 (version "0.8.1")
5354 (source
5355 (origin
5356 (method url-fetch)
5357 (uri (string-append "https://pypi.python.org/packages/source/s/"
5358 "simplegeneric/simplegeneric-" version ".zip"))
5359 (sha256
5360 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5361 (build-system python-build-system)
5362 (native-inputs
f3b98f4f 5363 `(("unzip" ,unzip)))
cd6e5189
RW
5364 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5365 (synopsis "Python module for simple generic functions")
5366 (description
5367 "The simplegeneric module lets you define simple single-dispatch generic
5368functions, akin to Python’s built-in generic functions like @code{len()},
5369@code{iter()} and so on. However, instead of using specially-named methods,
5370these generic functions use simple lookup tables, akin to those used by
5371e.g. @code{pickle.dump()} and other generic functions found in the Python
5372standard library.")
3f641af0 5373 (license license:zpl2.1)))
cd6e5189
RW
5374
5375(define-public python2-simplegeneric
5376 (package-with-python2 python-simplegeneric))
5377
ddc7d8ed 5378(define-public python-ipython-genutils
c4abbac3 5379 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
5380 (package
5381 (name "python-ipython-genutils")
5382 (version "0.1.0")
5383 (source
5384 (origin
5385 (method url-fetch)
5386 (uri (string-append "https://pypi.python.org/packages/source/i/"
5387 "ipython_genutils/ipython_genutils-"
5388 version ".tar.gz"))
5389 (sha256
5390 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5391 (build-system python-build-system)
5392 (arguments `(#:tests? #f)) ; no tests
5393 (home-page "http://ipython.org")
5394 (synopsis "Vestigial utilities from IPython")
5395 (description
c4abbac3
HG
5396 "This package provides retired utilities from IPython. No packages
5397outside IPython/Jupyter should depend on it.
5398
5399This package shouldn't exist. It contains some common utilities shared by
5400Jupyter and IPython projects during The Big Split. As soon as possible, those
5401packages will remove their dependency on this, and this package will go
5402away.")
3f641af0 5403 (license license:bsd-3)))
ddc7d8ed
RW
5404
5405(define-public python2-ipython-genutils
5406 (package-with-python2 python-ipython-genutils))
5407
2b10eb48
RW
5408(define-public python-traitlets
5409 (package
5410 (name "python-traitlets")
a5ba1481 5411 (version "4.2.0")
2b10eb48
RW
5412 (source
5413 (origin
5414 (method url-fetch)
cc0c4fde 5415 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
5416 (sha256
5417 (base32
a5ba1481 5418 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
5419 (build-system python-build-system)
5420 (arguments
5421 `(#:phases
5422 (modify-phases %standard-phases
5423 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5424 (propagated-inputs
5425 `(("python-ipython-genutils" ,python-ipython-genutils)
5426 ("python-decorator" ,python-decorator)))
5427 (native-inputs
cc0c4fde
EF
5428 `(("python-mock" ,python-mock)
5429 ("python-nose" ,python-nose)))
2b10eb48
RW
5430 (home-page "http://ipython.org")
5431 (synopsis "Configuration system for Python applications")
5432 (description
5433 "Traitlets is a framework that lets Python classes have attributes with
5434type checking, dynamically calculated default values, and ‘on change’
5435callbacks. The package also includes a mechanism to use traitlets for
5436configuration, loading values from files or from command line arguments. This
5437is a distinct layer on top of traitlets, so you can use traitlets in your code
5438without using the configuration machinery.")
3f641af0 5439 (license license:bsd-3)))
2b10eb48
RW
5440
5441(define-public python2-traitlets
5442 (package-with-python2 python-traitlets))
5443
4263b06f
RW
5444(define-public python-jupyter-core
5445 (package
5446 (name "python-jupyter-core")
45cc957c 5447 (version "4.2.1")
4263b06f
RW
5448 (source
5449 (origin
5450 (method url-fetch)
5451 (uri (string-append (pypi-uri "jupyter_core" version)))
5452 (sha256
5453 (base32
45cc957c 5454 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4263b06f
RW
5455 (build-system python-build-system)
5456 ;; FIXME: not sure how to run the tests
5457 (arguments `(#:tests? #f))
5458 (propagated-inputs
5459 `(("python-traitlets" ,python-traitlets)))
5460 (home-page "http://jupyter.org/")
5461 (synopsis "Jupyter base package")
5462 (description
5463 "Jupyter core is the base package on which Jupyter projects rely.")
5464 (license license:bsd-3)))
5465
5466(define-public python2-jupyter-core
5467 (package-with-python2 python-jupyter-core))
5468
9ff01f2d
RW
5469(define-public python-jupyter-client
5470 (package
5471 (name "python-jupyter-client")
5472 (version "4.4.0")
5473 (source
5474 (origin
5475 (method url-fetch)
5476 (uri (pypi-uri "jupyter_client" version))
5477 (sha256
5478 (base32
5479 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5480 (build-system python-build-system)
5481 ;; Tests fail because of missing native python kernel which I assume is
5482 ;; provided by the ipython package, which we cannot use because it would
5483 ;; cause a dependency cycle.
5484 (arguments `(#:tests? #f))
5485 (propagated-inputs
5486 `(("python-pyzmq" ,python-pyzmq)
5487 ("python-traitlets" ,python-traitlets)
5488 ("python-jupyter-core" ,python-jupyter-core)))
5489 (home-page "http://jupyter.org/")
5490 (synopsis "Jupyter protocol implementation and client libraries")
5491 (description
5492 "The @code{jupyter_client} package contains the reference implementation
5493of the Jupyter protocol. It also provides client and kernel management APIs
5494for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5495installing @code{kernelspec}s for use with Jupyter frontends.")
5496 (license license:bsd-3)))
5497
5498(define-public python2-jupyter-client
5499 (package-with-python2 python-jupyter-client))
5500
ab526102
RW
5501(define-public python-ipykernel
5502 (package
5503 (name "python-ipykernel")
f165648e 5504 (version "4.5.2")
ab526102
RW
5505 (source
5506 (origin
5507 (method url-fetch)
5508 (uri (pypi-uri "ipykernel" version))
5509 (sha256
f165648e 5510 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
ab526102
RW
5511 (build-system python-build-system)
5512 ;; The tests load a submodule of IPython. However, IPython itself depends
5513 ;; on ipykernel.
5514 (arguments `(#:tests? #f))
5515 (propagated-inputs
5516 ;; imported at runtime during connect
5517 `(("python-jupyter-client" ,python-jupyter-client)))
5518 (home-page "http://ipython.org")
5519 (synopsis "IPython Kernel for Jupyter")
5520 (description
5521 "This package provides the IPython kernel for Jupyter.")
5522 (license license:bsd-3)))
5523
5524(define-public python2-ipykernel
5525 (package-with-python2 python-ipykernel))
5526
5ff6effc
RW
5527(define-public python-testpath
5528 (package
5529 (name "python-testpath")
5530 (version "0.2")
5531 (source
5532 (origin
5533 (method url-fetch)
5534 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5535 version ".tar.gz"))
5536 (file-name (string-append name "-" version ".tar.gz"))
5537 (sha256
5538 (base32
5539 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5540 (build-system python-build-system)
5541 (arguments
5542 `(#:tests? #f ; this package does not even have a setup.py
b320f7bf
TD
5543 #:modules ((guix build python-build-system)
5544 (guix build utils)
5545 (srfi srfi-1))
5546 #:imported-modules (,@%python-build-system-modules
5547 (srfi srfi-1))
5ff6effc
RW
5548 #:phases
5549 (modify-phases %standard-phases
5550 (delete 'install)
5551 (replace 'build
b320f7bf
TD
5552 (lambda* (#:key inputs outputs #:allow-other-keys)
5553 (let* ((version (last
5554 (string-split (assoc-ref inputs "python") #\-)))
5555 (x.y (string-join (take (string-split version #\.) 2)
5556 "."))
5557 (dir (string-append
5558 (assoc-ref outputs "out")
5559 "/lib/python" x.y "/site-packages/testpath")))
5560 (mkdir-p dir)
5561 (copy-recursively "testpath" dir))
5562 #t)))))
5ff6effc
RW
5563 (home-page "https://github.com/takluyver/testpath")
5564 (synopsis "Test utilities for code working with files and commands")
5565 (description
5566 "Testpath is a collection of utilities for Python code working with files
5567and commands. It contains functions to check things on the filesystem, and
5568tools for mocking system commands and recording calls to those.")
5569 (license license:expat)))
5570
5571(define-public python2-testpath
5572 (package-with-python2 python-testpath))
5573
ae1ab9fe
FB
5574(define-public python-ipython
5575 (package
5576 (name "python-ipython")
fb25d348 5577 (version "5.2.2")
ae1ab9fe
FB
5578 (source
5579 (origin
fceac880 5580 (method url-fetch)
accd5f99 5581 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 5582 (sha256
fb25d348 5583 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
ae1ab9fe
FB
5584 (build-system python-build-system)
5585 (outputs '("out" "doc"))
3a0b1b9a
FB
5586 (propagated-inputs
5587 `(("python-pyzmq" ,python-pyzmq)
fb25d348 5588 ("python-prompt-toolkit" ,python-prompt-toolkit)
accd5f99 5589 ("python-terminado" ,python-terminado)
ae1ab9fe 5590 ("python-matplotlib" ,python-matplotlib)
5d26e542 5591 ("python-numpy" ,python-numpy)
ae1ab9fe 5592 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
5593 ("python-jinja2" ,python-jinja2)
5594 ("python-mistune" ,python-mistune)
accd5f99
RW
5595 ("python-pexpect" ,python-pexpect)
5596 ("python-pickleshare" ,python-pickleshare)
5597 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 5598 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
5599 ("python-traitlets" ,python-traitlets)
5600 ("python-ipykernel" ,python-ipykernel)
fb25d348 5601 ("python-nbformat" ,python-nbformat)
accd5f99
RW
5602 ("python-pygments" ,python-pygments)))
5603 (inputs
5604 `(("readline" ,readline)
5605 ("which" ,which)))
ae1ab9fe 5606 (native-inputs
fb25d348
TD
5607 `(("graphviz" ,graphviz)
5608 ("pkg-config" ,pkg-config)
accd5f99
RW
5609 ("python-requests" ,python-requests) ;; for tests
5610 ("python-testpath" ,python-testpath)
5611 ("python-nose" ,python-nose)
ae1ab9fe 5612 ("python-sphinx" ,python-sphinx)
fb25d348 5613 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
2584beae
RW
5614 ;; FIXME: It's possible that a smaller union would work just as well.
5615 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5616 texlive-fonts-ec
5617 texlive-generic-ifxetex
5618 texlive-generic-pdftex
5619 texlive-latex-amsfonts
5620 texlive-latex-capt-of
5621 texlive-latex-cmap
5622 texlive-latex-environ
5623 texlive-latex-eqparbox
5624 texlive-latex-etoolbox
5625 texlive-latex-expdlist
5626 texlive-latex-fancyhdr
5627 texlive-latex-fancyvrb
5628 texlive-latex-fncychap
5629 texlive-latex-float
5630 texlive-latex-framed
5631 texlive-latex-geometry
5632 texlive-latex-graphics
5633 texlive-latex-hyperref
5634 texlive-latex-mdwtools
5635 texlive-latex-multirow
5636 texlive-latex-oberdiek
5637 texlive-latex-parskip
5638 texlive-latex-preview
5639 texlive-latex-tabulary
5640 texlive-latex-threeparttable
5641 texlive-latex-titlesec
5642 texlive-latex-trimspaces
5643 texlive-latex-ucs
5644 texlive-latex-upquote
5645 texlive-latex-url
5646 texlive-latex-varwidth
5647 texlive-latex-wrapfig)))
f3b98f4f 5648 ("texinfo" ,texinfo)))
ae1ab9fe 5649 (arguments
89b5c60e 5650 `(#:phases
3a0b1b9a
FB
5651 (modify-phases %standard-phases
5652 (add-after
5653 'install 'install-doc
5654 (lambda* (#:key inputs outputs #:allow-other-keys)
5655 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5656 (doc (string-append data "/doc/" ,name "-" ,version))
5657 (html (string-append doc "/html"))
5658 (man1 (string-append data "/man/man1"))
5659 (info (string-append data "/info"))
fb25d348
TD
5660 (examples (string-append doc "/examples"))
5661 (python-arg (string-append "PYTHON=" (which "python"))))
afd3d931 5662 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
5663 ;; Make installed package available for running the tests
5664 (add-installed-pythonpath inputs outputs)
3a0b1b9a 5665 (with-directory-excursion "docs"
accd5f99
RW
5666 ;; FIXME: pdf fails to build
5667 ;;(system* "make" "pdf" "PAPER=a4")
fb25d348
TD
5668 (system* "make" python-arg "html")
5669 (system* "make" python-arg "info"))
3a0b1b9a
FB
5670 (copy-recursively "docs/man" man1)
5671 (copy-recursively "examples" examples)
accd5f99 5672 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
5673 ;; (copy-file "docs/build/latex/ipython.pdf"
5674 ;; (string-append doc "/ipython.pdf"))
5675 (mkdir-p info)
5676 (copy-file "docs/build/texinfo/ipython.info"
5677 (string-append info "/ipython.info"))
5678 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5679 ;; Tests can only be run after the library has been installed and not
5680 ;; within the source directory.
5681 (delete 'check)
5682 (add-after
5683 'install 'check
eee5cd04 5684 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
5685 (if tests?
5686 (with-directory-excursion "/tmp"
eee5cd04
HG
5687 ;; Make installed package available for running the tests
5688 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
5689 (setenv "HOME" "/tmp/") ;; required by a test
5690 (zero? (system* (string-append (assoc-ref outputs "out")
5691 "/bin/iptest"))))
5692 #t)))
5693 (add-before
5694 'install 'fix-tests
5695 (lambda* (#:key inputs #:allow-other-keys)
5696 (substitute* "./IPython/utils/_process_posix.py"
5697 (("/usr/bin/env', 'which") (which "which")))
5698 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5699 (("#!/usr/bin/env python")
5700 (string-append "#!" (which "python"))))
5701 ;; Disable 1 failing test
5702 (substitute* "./IPython/core/tests/test_magic.py"
5703 (("def test_dirops\\(\\):" all)
5704 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
5705 (home-page "http://ipython.org")
5706 (synopsis "IPython is a tool for interactive computing in Python")
5707 (description
5708 "IPython provides a rich architecture for interactive computing with:
5709Powerful interactive shells, a browser-based notebook, support for interactive
5710data visualization, embeddable interpreters and tools for parallel
5711computing.")
135ba811
EF
5712 (license license:bsd-3)
5713 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
5714
5715(define-public python2-ipython
135ba811 5716 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
5717 (package
5718 (inherit ipython)
3a0b1b9a 5719 ;; FIXME: add pyreadline once available.
fb25d348
TD
5720 (propagated-inputs
5721 `(("python2-backports-shutil-get-terminal-size"
5722 ,python2-backports-shutil-get-terminal-size)
5723 ("python2-pathlib2" ,python2-pathlib2)
5724 ,@(package-propagated-inputs ipython)))
e62600fe 5725 (native-inputs
135ba811 5726 `(("python2-mock" ,python2-mock)
77a6932a 5727 ,@(package-native-inputs ipython))))))
03411993
AE
5728
5729(define-public python-isodate
5730 (package
5731 (name "python-isodate")
b6785c2e 5732 (version "0.5.4")
03411993
AE
5733 (source
5734 (origin
5735 (method url-fetch)
b6785c2e 5736 (uri (pypi-uri "isodate" version))
03411993
AE
5737 (sha256
5738 (base32
b6785c2e 5739 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 5740 (build-system python-build-system)
03411993
AE
5741 (home-page
5742 "http://cheeseshop.python.org/pypi/isodate")
5743 (synopsis
5744 "Python date parser and formatter")
5745 (description
5746 "Python-isodate is a python module for parsing and formatting
5747ISO 8601 dates, time and duration.")
3f641af0 5748 (license license:bsd-3)))
03411993
AE
5749
5750(define-public python2-isodate
5751 (package-with-python2 python-isodate))
673ab897
AE
5752
5753(define-public python-html5lib
5754 (package
5755 (name "python-html5lib")
a14061aa 5756 (version "1.0b10")
673ab897
AE
5757 (source
5758 (origin
5759 (method url-fetch)
fee04c19 5760 (uri (pypi-uri "html5lib" version))
673ab897
AE
5761 (sha256
5762 (base32
a14061aa 5763 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 5764 (build-system python-build-system)
3dd75476 5765 (propagated-inputs
4eb6ed28
MB
5766 `(("python-six" ,python-six)
5767 ("python-webencodings" ,python-webencodings)))
673ab897
AE
5768 (arguments
5769 `(#:test-target "check"))
5770 (home-page
5771 "https://github.com/html5lib/html5lib-python")
5772 (synopsis
5773 "Python HTML parser based on the WHATWG HTML specifcation")
5774 (description
5775 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5776and written in Python.")
bd3fa666 5777 (license license:expat)))
673ab897
AE
5778
5779(define-public python2-html5lib
5780 (package-with-python2 python-html5lib))
e99f4211 5781
8ee62c97
RW
5782;; Needed for python-bleach, a dependency of python-notebook
5783(define-public python-html5lib-0.9
5784 (package
5785 (inherit python-html5lib)
5786 (version "0.999")
5787 (source
5788 (origin
5789 (method url-fetch)
5790 (uri (pypi-uri "html5lib" version))
5791 (sha256
5792 (base32
5793 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5794
5795(define-public python2-html5lib-0.9
5796 (package-with-python2 python-html5lib-0.9))
5797
adbca19e
MB
5798(define-public python-webencodings
5799 (package
5800 (name "python-webencodings")
5801 (version "0.5")
5802 (source (origin
5803 (method url-fetch)
5804 (uri (pypi-uri "webencodings" version))
5805 (sha256
5806 (base32
5807 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5808 (build-system python-build-system)
5809 (arguments
5810 '(#:phases
5811 (modify-phases %standard-phases
5812 (replace 'check
5813 (lambda _
5814 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5815 (native-inputs
5816 `(("python-pytest" ,python-pytest)))
5817 (home-page "https://github.com/SimonSapin/python-webencodings")
5818 (synopsis "Character encoding aliases for legacy web content")
5819 (description
5820 "In order to be compatible with legacy web content when interpreting
5821something like @code{Content-Type: text/html; charset=latin1}, tools need
5822to use a particular set of aliases for encoding labels as well as some
5823overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5824the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5825or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5826The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5827defines all such details so that implementations do not have to
5828reverse-engineer each other.
5829
5830This module implements the Encoding standard and has encoding labels and
5831BOM detection, but the actual implementation for encoders and decoders
5832is Python’s.")
5833 (license license:bsd-3)))
5834
5835(define-public python2-webencodings
5836 (package-with-python2 python-webencodings))
5837
e99f4211
MW
5838(define-public python-urwid
5839 (package
5840 (name "python-urwid")
51ff41f6 5841 (version "1.3.1")
e99f4211
MW
5842 (source
5843 (origin
5844 (method url-fetch)
b97c1bfd 5845 (uri (pypi-uri "urwid" version))
e99f4211
MW
5846 (sha256
5847 (base32
51ff41f6 5848 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5849 (build-system python-build-system)
b97c1bfd
LF
5850 (arguments
5851 `(#:phases
5852 (modify-phases %standard-phases
5853 ;; Disable failing test. Bug filed upstream:
5854 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5855 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5856 (add-after 'unpack 'disable-failing-test
5857 (lambda _
5858 (substitute* "urwid/tests/test_event_loops.py"
5859 (("test_remove_watch_file")
5860 "disable_remove_watch_file")))))))
e99f4211
MW
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.")
3f641af0 5866 (license license:lgpl2.1+)))
e99f4211
MW
5867
5868(define-public python2-urwid
e9379305
MC
5869 (let ((python2-urwid (package-with-python2 python-urwid)))
5870 (package
5871 (inherit python2-urwid)
5872 (arguments
5873 (append
4fdab173
KK
5874 `(;; Explicitly using Python 2 is necessary due the argument list being
5875 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
5876 ;; package arguments, which by default assumes the use of Python 3.
5877 #:python ,python-2
5878 #:phases
e9379305
MC
5879 (modify-phases %standard-phases
5880 ;; Disable the vterm tests because of non-deterministic failures
5881 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
5882 (add-after 'unpack 'delete-test_vterm.py
5883 (delete-file "urwid/tests/test_vterm.py"))))
5884 (package-arguments python-urwid))))))
d95a56c6 5885
5220022a
JL
5886(define-public python-openid
5887 (package
5888 (name "python-openid")
5889 (version "3.0.10")
5890 (source
5891 (origin
5892 (method url-fetch)
5893 (uri (pypi-uri "python3-openid" version))
5894 (sha256
5895 (base32
5896 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5897 (build-system python-build-system)
0660d327
DM
5898 (arguments
5899 `(#:phases
5900 (modify-phases %standard-phases
5901 (replace 'check
5902 (lambda _
5903 (zero? (system* "./admin/runtests")))))))
f048db5a 5904 (properties `((python2-variant . ,(delay python2-openid))))
0660d327
DM
5905 (propagated-inputs
5906 `(("python-defusedxml" ,python-defusedxml)))
5907 (native-inputs
5908 `(("python-psycopg2" ,python-psycopg2)
5909 ("python-django" ,python-django)))
5220022a
JL
5910 (home-page "https://github.com/necaris/python3-openid")
5911 (synopsis "OpenID support for servers and consumers")
5912 (description "This library provides OpenID authentication for Python, both
5913for clients and servers.")
5914 (license license:asl2.0)))
5915
3ef00f56 5916(define-public python2-openid
5917 (package
5918 (name "python2-openid")
5919 (version "2.2.5")
5920 (source
5921 (origin
5922 (method url-fetch)
5923 (uri (pypi-uri "python-openid" version))
5924 (sha256
5925 (base32
5926 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5927 (build-system python-build-system)
5928 (arguments
5929 ;; Python 3 support is in `python3-openid`, a separate package.
5930 `(#:python ,python-2))
5931 (home-page "https://github.com/openid/python-openid")
5932 (synopsis "OpenID support for servers and consumers")
5933 (description "This library provides OpenID authentication for Python, both
5934for clients and servers.")
5935 (license license:asl2.0)))
5936
47d0b292
TS
5937(define-public python-urwidtrees
5938 (package
5939 (name "python-urwidtrees")
37ec4623 5940 (version "1.0.2")
47d0b292
TS
5941 (source
5942 (origin
5943 (method url-fetch)
37ec4623
TS
5944 ;; package author intends on distributing via github rather than pypi:
5945 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5946 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5947 version ".tar.gz"))
5948 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5949 (sha256
5950 (base32
37ec4623 5951 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5952 (build-system python-build-system)
5953 (arguments
5954 '(#:tests? #f)) ; no tests
f22efa01 5955 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5956 (home-page "https://github.com/pazz/urwidtrees")
5957 (synopsis "Tree widgets for urwid")
5958 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5959toolkit. Use it to build trees of widgets.")
3f641af0 5960 (license license:gpl3+)))
47d0b292
TS
5961
5962(define-public python2-urwidtrees
5963 (package-with-python2 python-urwidtrees))
5964
d95a56c6
PAR
5965(define-public python-dbus
5966 (package
5967 (name "python-dbus")
5968 (version "1.2.0")
5969 (source
5970 (origin
5971 (method url-fetch)
5972 (uri (string-append
5cc3096c 5973 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5974 version ".tar.gz"))
5975 (sha256
5976 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5977 (build-system gnu-build-system)
6717c879
SB
5978 (arguments
5979 '(#:phases
5980 (modify-phases %standard-phases
5981 (add-before
5982 'check 'pre-check
5983 (lambda _
5984 ;; XXX: For the missing '/etc/machine-id'.
5985 (substitute* "test/run-test.sh"
5986 (("DBUS_FATAL_WARNINGS=1")
5987 "DBUS_FATAL_WARNINGS=0"))
5988 #t)))))
d95a56c6
PAR
5989 (native-inputs
5990 `(("pkg-config" ,pkg-config)))
5991 (inputs
5992 `(("python" ,python)
2e88d113 5993 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5994 (synopsis "Python bindings for D-bus")
5995 (description "python-dbus provides bindings for libdbus, the reference
5996implementation of D-Bus.")
5997 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5998 (license license:expat)))
b52af02b
MW
5999
6000(define-public python2-dbus
6001 (package (inherit python-dbus)
6002 (name "python2-dbus")
6003 (inputs `(("python" ,python-2)
6004 ,@(alist-delete "python"
6005 (package-inputs python-dbus)
6006 equal?)))
6007 ;; FIXME: on Python 2, the test_utf8 fails with:
6008 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
6009 (arguments `(#:tests? #f))))
a6ac8332
AE
6010
6011(define-public python-apsw
6012 (package
6013 (name "python-apsw")
917708c2 6014 (version "3.9.2-r1")
a6ac8332
AE
6015 (source
6016 (origin
6017 (method url-fetch)
917708c2 6018 (uri (pypi-uri "apsw" version))
a6ac8332
AE
6019 (sha256
6020 (base32
917708c2 6021 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
6022 (build-system python-build-system)
6023 (inputs
f3b98f4f 6024 `(("sqlite" ,sqlite)))
a6ac8332
AE
6025 (arguments
6026 `(#:phases
154d207c
MB
6027 (modify-phases %standard-phases
6028 (delete 'check)
6029 (add-after 'install 'check
6030 (lambda* (#:key inputs outputs #:allow-other-keys)
6031 (add-installed-pythonpath inputs outputs)
6032 (zero? (system* "python" "setup.py" "test")))))))
a6ac8332
AE
6033 (home-page "https://github.com/rogerbinns/apsw/")
6034 (synopsis "Another Python SQLite Wrapper")
6035 (description "APSW is a Python wrapper for the SQLite
6036embedded relational database engine. In contrast to other wrappers such as
6037pysqlite it focuses on being a minimal layer over SQLite attempting just to
6038translate the complete SQLite API into Python.")
abde5f37 6039 (license license:zlib)))
a6ac8332
AE
6040
6041(define-public python2-apsw
6042 (package-with-python2 python-apsw))
26b307e2
AE
6043
6044(define-public python-lxml
6045 (package
6046 (name "python-lxml")
d58a3203 6047 (version "3.6.0")
26b307e2
AE
6048 (source
6049 (origin
6050 (method url-fetch)
97bbc480 6051 (uri (pypi-uri "lxml" version))
26b307e2 6052 (sha256
d58a3203
EF
6053 (base32
6054 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
6055 (build-system python-build-system)
6056 (inputs
6057 `(("libxml2" ,libxml2)
f3b98f4f 6058 ("libxslt" ,libxslt)))
26b307e2
AE
6059 (home-page "http://lxml.de/")
6060 (synopsis
6061 "Python XML processing library")
6062 (description
6063 "The lxml XML toolkit is a Pythonic binding for the C libraries
6064libxml2 and libxslt.")
3f641af0 6065 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
6066
6067(define-public python2-lxml
6068 (package-with-python2 python-lxml))
4ed20663 6069
b32a1e47
CAW
6070;; beautifulsoup4 has a totally different namespace than 3.x,
6071;; and pypi seems to put it under its own name, so I guess we should too
6072(define-public python-beautifulsoup4
6073 (package
6074 (name "python-beautifulsoup4")
80e8d851 6075 (version "4.5.3")
b32a1e47
CAW
6076 (source
6077 (origin
6078 (method url-fetch)
6079 (uri (pypi-uri "beautifulsoup4" version))
6080 (sha256
6081 (base32
80e8d851 6082 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
b32a1e47 6083 (build-system python-build-system)
5f37f0b6
LF
6084 (arguments
6085 `(#:phases
6086 (modify-phases %standard-phases
6087 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6088 ;; must use this conversion script when building with Python 3. The
6089 ;; conversion script also runs the tests.
6090 ;; For more information, see the file 'convert-py3k' in the source
6091 ;; distribution.
6092 (replace 'check
6093 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
6094 (home-page
6095 "http://www.crummy.com/software/BeautifulSoup/bs4/")
6096 (synopsis
6097 "Python screen-scraping library")
6098 (description
6099 "Beautiful Soup is a Python library designed for rapidly setting up
6100screen-scraping projects. It offers Pythonic idioms for navigating,
6101searching, and modifying a parse tree, providing a toolkit for
6102dissecting a document and extracting what you need. It automatically
6103converts incoming documents to Unicode and outgoing documents to UTF-8.")
ee94ca11
MB
6104 (license license:expat)
6105 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
b32a1e47
CAW
6106
6107(define-public python2-beautifulsoup4
6108 (package
6109 (inherit (package-with-python2
6110 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 6111 (arguments `(#:python ,python-2))))
b32a1e47 6112
4dcb135e 6113(define-public python-cssutils
092e86f5 6114 (package
4dcb135e 6115 (name "python-cssutils")
58d1d816 6116 (version "1.0.1")
092e86f5
AE
6117 (source
6118 (origin
6119 (method url-fetch)
58d1d816 6120 (uri (pypi-uri "cssutils" version))
092e86f5 6121 (sha256
58d1d816
EF
6122 (base32
6123 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
6124 (build-system python-build-system)
6125 (native-inputs
4dcb135e 6126 `(("unzip" ,unzip))) ; for unpacking the source
092e86f5 6127 (arguments
4dcb135e 6128 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
092e86f5
AE
6129 (home-page "http://cthedot.de/cssutils/")
6130 (synopsis
6131 "CSS Cascading Style Sheets library for Python")
6132 (description
6133 "Cssutils is a Python package for parsing and building CSS
6134Cascading Style Sheets. Currently it provides a DOM only and no rendering
6135options.")
3f641af0 6136 (license license:lgpl3+)))
880ff77c 6137
4dcb135e
EB
6138(define-public python2-cssutils
6139 (package-with-python2 python-cssutils))
6140
880ff77c
AE
6141(define-public python-cssselect
6142 (package
6143 (name "python-cssselect")
d5ccd9ab 6144 (version "0.9.2")
880ff77c
AE
6145 (source
6146 (origin
6147 (method url-fetch)
d5ccd9ab 6148 (uri (pypi-uri "cssselect" version))
880ff77c 6149 (sha256
d5ccd9ab
EF
6150 (base32
6151 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 6152 (build-system python-build-system)
880ff77c
AE
6153 (arguments
6154 ;; tests fail with message
6155 ;; AttributeError: 'module' object has no attribute 'tests'
6156 `(#:tests? #f))
6157 (home-page
6158 "https://pythonhosted.org/cssselect/")
6159 (synopsis
6160 "CSS3 selector parser and translator to XPath 1.0")
6161 (description
6162 "Cssselect ia a Python module that parses CSS3 Selectors and translates
6163them to XPath 1.0 expressions. Such expressions can be used in lxml or
6164another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 6165 (license license:bsd-3)))
880ff77c
AE
6166
6167(define-public python2-cssselect
6168 (package-with-python2 python-cssselect))
60357f99 6169
03702173 6170(define-public python-openid-cla
6171 (package
6172 (name "python-openid-cla")
6173 (version "1.2")
6174 (source
6175 (origin
6176 (method url-fetch)
6177 (uri (pypi-uri "python-openid-cla" version))
6178 (sha256
6179 (base32
6180 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
6181 (build-system python-build-system)
019ccdb6 6182 (arguments '(#:tests? #f)) ; No tests.
03702173 6183 (home-page "https://github.com/puiterwijk/python-openid-cla/")
6184 (synopsis "Implementation of the OpenID CLA extension for python-openid")
6185 (description "@code{openid-cla} is an implementation of the OpenID
6186contributor license agreement extension for python-openid.")
6187 (license license:bsd-3)))
6188
6189(define-public python2-openid-cla
6190 (package-with-python2 python-openid-cla))
6191
a0e41de4 6192(define-public python-openid-teams
6193 (package
6194 (name "python-openid-teams")
6195 (version "1.1")
6196 (source
6197 (origin
6198 (method url-fetch)
6199 (uri (pypi-uri "python-openid-teams" version))
6200 (sha256
6201 (base32
6202 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
6203 (build-system python-build-system)
ac72d3d2 6204 (arguments '(#:tests? #f)) ; No tests.
a0e41de4 6205 (home-page "https://github.com/puiterwijk/python-openid-teams/")
6206 (synopsis "Implementation of the OpenID teams extension for python-openid")
6207 (description
6208 "@code{openid-teams} is an implementation of the OpenID
6209teams extension for python-openid.")
6210 (license license:bsd-3)))
6211
6212(define-public python2-openid-teams
6213 (package-with-python2 python-openid-teams))
6214
60357f99
AE
6215(define-public python-netifaces
6216 (package
6217 (name "python-netifaces")
6218 (version "0.10.4")
6219 (source
6220 (origin
6221 (method url-fetch)
6222 (uri (string-append
6223 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
6224 version
6225 ".tar.gz"))
6226 (sha256
6227 (base32
6228 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
6229 (build-system python-build-system)
60357f99
AE
6230 (home-page
6231 "https://bitbucket.org/al45tair/netifaces")
6232 (synopsis
6233 "Python module for portable network interface information")
6234 (description
6235 "Netifaces is a Python module providing information on network
6236interfaces in an easy and portable manner.")
6237 (license license:expat)))
6238
6239(define-public python2-netifaces
6240 (package-with-python2 python-netifaces))
92cb152b 6241
32f77c04
RW
6242(define-public python-networkx
6243 (package
6244 (name "python-networkx")
a4d9609c 6245 (version "1.11")
32f77c04
RW
6246 (source
6247 (origin
6248 (method url-fetch)
a4d9609c 6249 (uri (pypi-uri "networkx" version))
32f77c04 6250 (sha256
a4d9609c 6251 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
6252 (build-system python-build-system)
6253 ;; python-decorator is needed at runtime
6254 (propagated-inputs
6255 `(("python-decorator" ,python-decorator)))
6256 (native-inputs
f3b98f4f 6257 `(("python-nose" ,python-nose)))
32f77c04
RW
6258 (home-page "http://networkx.github.io/")
6259 (synopsis "Python module for creating and manipulating graphs and networks")
6260 (description
6261 "NetworkX is a Python package for the creation, manipulation, and study
6262of the structure, dynamics, and functions of complex networks.")
3f641af0 6263 (license license:bsd-3)))
32f77c04
RW
6264
6265(define-public python2-networkx
6266 (package-with-python2 python-networkx))
6267
92cb152b
RW
6268(define-public snakemake
6269 (package
6270 (name "snakemake")
1fb9b678 6271 (version "3.13.3")
92cb152b
RW
6272 (source
6273 (origin
6274 (method url-fetch)
7b93d866 6275 (uri (pypi-uri "snakemake" version))
92cb152b 6276 (sha256
1fb9b678 6277 (base32 "1nixb944r4hlskwkzc4wjs34b40xpxpw9gmhhm5p09gvmm22ap5d"))))
92cb152b 6278 (build-system python-build-system)
7b93d866
MB
6279 (arguments
6280 ;; TODO: Package missing test dependencies.
e61bc976
RW
6281 '(#:tests? #f
6282 #:phases
6283 (modify-phases %standard-phases
6284 ;; For cluster execution Snakemake will call Python. Since there is
6285 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6286 ;; this by calling the snakemake wrapper instead.
6287 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6288 (lambda* (#:key outputs #:allow-other-keys)
6289 (substitute* "snakemake/executors.py"
6290 (("\\{sys.executable\\} -m snakemake")
6291 (string-append (assoc-ref outputs "out")
6292 "/bin/snakemake")))
6293 #t)))))
4f9998c6
RW
6294 (propagated-inputs
6295 `(("python-wrapt" ,python-wrapt)
6296 ("python-requests" ,python-requests)))
7b93d866 6297 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
6298 (synopsis "Python-based execution environment for make-like workflows")
6299 (description
6300 "Snakemake aims to reduce the complexity of creating workflows by
6301providing a clean and modern domain specific specification language (DSL) in
6302Python style, together with a fast and comfortable execution environment.")
6303 (license license:expat)))
a1920bc9 6304
35de1fbd
RW
6305(define-public python-seaborn
6306 (package
6307 (name "python-seaborn")
ccc18762 6308 (version "0.7.1")
35de1fbd
RW
6309 (source
6310 (origin
6311 (method url-fetch)
fc899d4f 6312 (uri (pypi-uri "seaborn" version))
35de1fbd 6313 (sha256
ccc18762 6314 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
35de1fbd 6315 (build-system python-build-system)
6f976df6
MB
6316 (arguments
6317 '(#:tests? #f)) ; Tests requires a running X11 server.
35de1fbd
RW
6318 (propagated-inputs
6319 `(("python-pandas" ,python-pandas)
6320 ("python-matplotlib" ,python-matplotlib)
6321 ("python-scipy" ,python-scipy)))
35de1fbd
RW
6322 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6323 (synopsis "Statistical data visualization")
6324 (description
6325 "Seaborn is a library for making attractive and informative statistical
6326graphics in Python. It is built on top of matplotlib and tightly integrated
6327with the PyData stack, including support for numpy and pandas data structures
6328and statistical routines from scipy and statsmodels.")
3f641af0 6329 (license license:bsd-3)
fc899d4f 6330 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
6331
6332(define-public python2-seaborn
fc899d4f
EF
6333 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6334 (package
6335 (inherit base)
6336 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 6337 ,@(package-propagated-inputs base))))))
35de1fbd 6338
58a35665
MB
6339(define-public python-mpmath
6340 (package
6341 (name "python-mpmath")
6342 (version "0.19")
6343 (source (origin
6344 (method url-fetch)
6345 (uri (string-append "http://mpmath.org/files/mpmath-"
6346 version ".tar.gz"))
6347 (sha256
6348 (base32
6349 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6350 (build-system python-build-system)
6351 (arguments
6352 '(#:phases
6353 (modify-phases %standard-phases
6354 (replace 'check
6355 (lambda _
6356 (zero?
6357 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6358 (home-page "http://mpmath.org")
6359 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6360 (description
6361 "@code{mpmath} can be used as an arbitrary-precision substitute for
6362Python's float/complex types and math/cmath modules, but also does much
6363more advanced mathematics.")
6364 (license license:bsd-3)))
6365
6366(define-public python2-mpmath
6367 (package-with-python2 python-mpmath))
35de1fbd 6368
90fc547f
RW
6369(define-public python-sympy
6370 (package
6371 (name "python-sympy")
52f622ef 6372 (version "1.0")
90fc547f
RW
6373 (source
6374 (origin
6375 (method url-fetch)
6376 (uri (string-append
6377 "https://github.com/sympy/sympy/releases/download/sympy-"
6378 version "/sympy-" version ".tar.gz"))
6379 (sha256
52f622ef 6380 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
90fc547f 6381 (build-system python-build-system)
52f622ef
MB
6382 (propagated-inputs
6383 `(("python-mpmath" ,python-mpmath)))
90fc547f
RW
6384 (home-page "http://www.sympy.org/")
6385 (synopsis "Python library for symbolic mathematics")
6386 (description
6387 "SymPy is a Python library for symbolic mathematics. It aims to become a
6388full-featured computer algebra system (CAS) while keeping the code as simple
6389as possible in order to be comprehensible and easily extensible.")
3f641af0 6390 (license license:bsd-3)))
90fc547f
RW
6391
6392(define-public python2-sympy
6393 (package-with-python2 python-sympy))
6394
e8c9b010
SR
6395(define-public python-q
6396 (package
6397 (name "python-q")
6398 (version "2.6")
6399 (source
6400 (origin
6401 (method url-fetch)
6402 (uri (pypi-uri "q" version))
6403 (sha256
6404 (base32
6405 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6406 (build-system python-build-system)
6407 (home-page "https://github.com/zestyping/q")
6408 (synopsis "Quick-and-dirty debugging output for tired programmers")
6409 (description
6410 "q is a Python module for \"print\" style of debugging Python code. It
6411provides convenient short API for print out of values, tracebacks, and
6412falling into the Python interpreter.")
f210e944 6413 (license license:asl2.0)))
e8c9b010
SR
6414
6415(define-public python2-q
f210e944 6416 (package-with-python2 python-q))
e8c9b010 6417
a1920bc9
FB
6418(define-public python-testlib
6419 (package
6420 (name "python-testlib")
6421 (version "0.6.5")
6422 (source
6423 (origin
6424 (method url-fetch)
6425 (uri (string-append
6426 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6427 version ".zip"))
6428 (sha256
6429 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6430 (build-system python-build-system)
a1920bc9 6431 (native-inputs
632735f2 6432 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
6433 (synopsis "Python micro test suite harness")
6434 (description "A micro unittest suite harness for Python.")
6435 (home-page "https://github.com/trentm/testlib")
1cb9c006 6436 (license license:expat)))
a1920bc9
FB
6437
6438(define-public python2-testlib
6439 (package-with-python2 python-testlib))
db62afa5
LC
6440
6441(define-public python2-xlib
6442 (package
6443 (name "python2-xlib")
6444 (version "0.14")
6445 (source (origin
6446 (method url-fetch)
de67e922
LF
6447 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6448 "/" version "/"
db62afa5
LC
6449 "python-xlib-" version ".tar.gz"))
6450 (sha256
6451 (base32
6452 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6453 (build-system python-build-system)
6454 (arguments
6455 `(#:python ,python-2 ;Python 2 only
6456 #:tests? #f)) ;no tests
db62afa5
LC
6457 (home-page "http://python-xlib.sourceforge.net/")
6458 (synopsis "Python X11 client library")
6459 (description
6460 "The Python X Library is intended to be a fully functional X client
6461library for Python programs. It is useful to implement low-level X clients.
6462It is written entirely in Python.")
3f641af0 6463 (license license:gpl2+)))
0234ca06
DT
6464
6465(define-public python-singledispatch
6466 (package
6467 (name "python-singledispatch")
6468 (version "3.4.0.3")
6469 (source
6470 (origin
6471 (method url-fetch)
bdb67d84 6472 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
6473 (sha256
6474 (base32
6475 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6476 (build-system python-build-system)
5e1c9d24
HG
6477 (native-inputs
6478 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
6479 (home-page
6480 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6481 (synopsis "Backport of singledispatch feature from Python 3.4")
6482 (description
6483 "This library brings functools.singledispatch from Python 3.4 to Python
64842.6-3.3.")
6485 (license license:expat)))
6486
6487(define-public python2-singledispatch
6488 (package-with-python2 python-singledispatch))
feaae484 6489
310d218f
RW
6490(define-public python-tornado
6491 (package
6492 (name "python-tornado")
6fdeb324 6493 (version "4.5.1")
310d218f
RW
6494 (source
6495 (origin
6496 (method url-fetch)
a724924b 6497 (uri (pypi-uri "tornado" version))
310d218f 6498 (sha256
6fdeb324 6499 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
310d218f 6500 (build-system python-build-system)
3fe2c209
MB
6501 (arguments
6502 '(;; FIXME: Two tests error out with:
6503 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6504 ;; #:phases
6505 ;; (modify-phases %standard-phases
6506 ;; (replace 'check
6507 ;; (lambda _
6508 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6509 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6510 ;; (zero? (system* "python" "-m" "tornado.test")))))
6511 #:tests? #f))
310d218f 6512 (native-inputs
b455439b 6513 `(("python-certifi" ,python-certifi)))
f22efa01 6514 (propagated-inputs
b455439b 6515 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 6516 (home-page "http://www.tornadoweb.org/")
310d218f
RW
6517 (synopsis "Python web framework and asynchronous networking library")
6518 (description
6519 "Tornado is a Python web framework and asynchronous networking library,
6520originally developed at FriendFeed. By using non-blocking network I/O,
6521Tornado can scale to tens of thousands of open connections, making it ideal
6522for long polling, WebSockets, and other applications that require a long-lived
6523connection to each user.")
3f641af0 6524 (license license:asl2.0)
b455439b 6525 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
6526
6527(define-public python2-tornado
b455439b 6528 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 6529 (package (inherit tornado)
f22efa01 6530 (propagated-inputs
310d218f
RW
6531 `(("python2-backport-ssl-match-hostname"
6532 ,python2-backport-ssl-match-hostname)
b455439b 6533 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 6534 ,@(package-propagated-inputs tornado))))))
310d218f 6535
6b59fc10
EF
6536;; the python- version can be removed with python-3.5
6537(define-public python-backports-abc
6538 (package
6539 (name "python-backports-abc")
27f9148e 6540 (version "0.5")
6b59fc10
EF
6541 (source
6542 (origin
6543 (method url-fetch)
6544 (uri (pypi-uri "backports_abc" version))
6545 (sha256
6546 (base32
27f9148e 6547 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6b59fc10 6548 (build-system python-build-system)
6b59fc10 6549 (home-page "https://github.com/cython/backports_abc")
66e07664 6550 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
6551 (description
6552 "Python-backports-abc provides a backport of additions to the
6553'collections.abc' module in Python-3.5.")
3f641af0 6554 (license license:psfl)))
6b59fc10
EF
6555
6556(define-public python2-backports-abc
6557 (package-with-python2 python-backports-abc))
6558
4ff9e868
OP
6559(define-public python-backports-csv
6560 (package
6561 (name "python-backports-csv")
6562 (version "1.0.5")
6563 (source
6564 (origin
6565 (method url-fetch)
6566 (uri (pypi-uri "backports.csv" version))
6567 (sha256
6568 (base32
6569 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6570 (build-system python-build-system)
6571 (home-page "https://github.com/ryanhiebert/backports.csv")
6572 (synopsis "Backport of Python 3's csv module for Python 2")
6573 (description
6574 "Provides a backport of Python 3's @code{csv} module for parsing
6575comma separated values. The API of the @code{csv} module in Python 2
6576is drastically different from the @code{csv} module in Python 3.
6577This is due, for the most part, to the difference between str in
6578Python 2 and Python 3.")
6579 (license license:psfl)))
6580
6581(define-public python2-backports-csv
6582 (package-with-python2 python-backports-csv))
6583
ec074213
TD
6584(define-public python2-backports-shutil-get-terminal-size
6585 (package
6586 (name "python2-backports-shutil-get-terminal-size")
6587 (version "1.0.0")
6588 (source
6589 (origin
6590 (method url-fetch)
6591 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6592 (sha256
6593 (base32
6594 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6595 (build-system python-build-system)
6596 (arguments
c0446791
MB
6597 `(#:python ,python-2
6598 #:phases
6599 (modify-phases %standard-phases
6600 (replace 'check
6601 (lambda _
6602 (zero? (system* "py.test" "-v")))))))
6603 (native-inputs
6604 `(("python2-pytest" ,python2-pytest)))
ec074213
TD
6605 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6606 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6607 (description
6608 "This package provides a backport of the @code{get_terminal_size
6609function} from Python 3.3's @code{shutil}.
6610Unlike the original version it is written in pure Python rather than C,
6611so it might be a tiny bit slower.")
6612 (license license:expat)))
6613
feaae484
SB
6614(define-public python-waf
6615 (package
6616 (name "python-waf")
27bf00e6 6617 (version "1.9.8")
feaae484
SB
6618 (source (origin
6619 (method url-fetch)
bae67829 6620 (uri (string-append "https://waf.io/"
feaae484
SB
6621 "waf-" version ".tar.bz2"))
6622 (sha256
6623 (base32
27bf00e6 6624 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
feaae484
SB
6625 (build-system python-build-system)
6626 (arguments
6627 '(#:phases
6628 (modify-phases %standard-phases
6629 (replace 'build
7dd55dfe
EF
6630 (lambda _
6631 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 6632 (replace 'check
7dd55dfe
EF
6633 (lambda _
6634 (zero? (system* "python" "waf" "--version"))))
feaae484 6635 (replace 'install
7dd55dfe
EF
6636 (lambda _
6637 (copy-file "waf" %output))))))
27bf00e6 6638 (home-page "https://waf.io/")
feaae484
SB
6639 (synopsis "Python-based build system")
6640 (description
6641 "Waf is a Python-based framework for configuring, compiling and installing
6642applications.")
3f641af0 6643 (license license:bsd-3)))
feaae484
SB
6644
6645(define-public python2-waf
6646 (package-with-python2 python-waf))
45203542
RW
6647
6648(define-public python-pyzmq
6649 (package
6650 (name "python-pyzmq")
3655ee76 6651 (version "15.1.0")
45203542
RW
6652 (source
6653 (origin
6654 (method url-fetch)
3655ee76 6655 (uri (pypi-uri "pyzmq" version))
45203542 6656 (sha256
3655ee76 6657 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
6658 (build-system python-build-system)
6659 (arguments
6660 `(#:configure-flags
6661 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6662 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6663 ;; --inplace' for 'python setup.py test' to work.
6664 #:tests? #f))
6665 (inputs
6666 `(("zeromq" ,zeromq)))
6667 (native-inputs
6668 `(("pkg-config" ,pkg-config)
f3b98f4f 6669 ("python-nose" ,python-nose)))
7bf837fd 6670 (home-page "https://github.com/zeromq/pyzmq")
45203542
RW
6671 (synopsis "Python bindings for 0MQ")
6672 (description
6673 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 6674 (license license:bsd-4)))
45203542
RW
6675
6676(define-public python2-pyzmq
6677 (package-with-python2 python-pyzmq))
d889e6c4
CR
6678
6679(define-public python-pep8
6680 (package
6681 (name "python-pep8")
db251311 6682 (version "1.7.0")
d889e6c4
CR
6683 (source
6684 (origin
6685 (method url-fetch)
db251311 6686 (uri (pypi-uri "pep8" version))
d889e6c4
CR
6687 (sha256
6688 (base32
db251311 6689 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 6690 (build-system python-build-system)
d889e6c4
CR
6691 (home-page "http://pep8.readthedocs.org/")
6692 (synopsis "Python style guide checker")
6693 (description
6694 "This tools checks Python code against some of the style conventions in
6695PEP 8.")
6696 (license license:expat)))
6697
6698(define-public python2-pep8
6699 (package-with-python2 python-pep8))
e31d7f44
CR
6700
6701(define-public python-pyflakes
6702 (package
6703 (name "python-pyflakes")
2abc3972 6704 (version "1.0.0")
e31d7f44
CR
6705 (source
6706 (origin
6707 (method url-fetch)
2abc3972 6708 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
6709 (sha256
6710 (base32
2abc3972 6711 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 6712 (build-system python-build-system)
e31d7f44
CR
6713 (home-page
6714 "https://github.com/pyflakes/pyflakes")
6715 (synopsis "Passive checker of Python programs")
6716 (description
6717 "Pyflakes statically checks Python source code for common errors.")
6718 (license license:expat)))
a59e017c 6719
7261d9eb
CR
6720(define-public python2-pyflakes
6721 (package-with-python2 python-pyflakes))
6722
a59e017c
CR
6723(define-public python-mccabe
6724 (package
6725 (name "python-mccabe")
c6ebd40d 6726 (version "0.4.0")
a59e017c
CR
6727 (source
6728 (origin
6729 (method url-fetch)
c6ebd40d 6730 (uri (pypi-uri "mccabe" version))
a59e017c
CR
6731 (sha256
6732 (base32
c6ebd40d 6733 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 6734 (build-system python-build-system)
328bb95d 6735 (native-inputs
c6ebd40d 6736 `(("python-pytest" ,python-pytest)
f3b98f4f 6737 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
6738 (home-page "https://github.com/flintwork/mccabe")
6739 (synopsis "McCabe checker, plugin for flake8")
6740 (description
6741 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6742complexity of Python source code.")
7362371d 6743 (license license:expat)))
a59e017c
CR
6744
6745(define-public python2-mccabe
6746 (package-with-python2 python-mccabe))
e8df8f47 6747
7477fbb1
CR
6748(define-public python-mccabe-0.2.1
6749 (package (inherit python-mccabe)
6750 (version "0.2.1")
6751 (source
6752 (origin
6753 (method url-fetch)
6754 (uri (pypi-uri "mccabe" version))
6755 (sha256
6756 (base32
f3b98f4f 6757 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
6758
6759(define-public python2-mccabe-0.2.1
6760 (package-with-python2 python-mccabe-0.2.1))
6761
e8df8f47
CR
6762;; Flake8 2.4.1 requires an older version of pep8.
6763;; This should be removed ASAP.
6764(define-public python-pep8-1.5.7
6765 (package (inherit python-pep8)
6766 (version "1.5.7")
6767 (source
6768 (origin
6769 (method url-fetch)
6770 (uri (string-append
6771 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6772 version
6773 ".tar.gz"))
6774 (sha256
6775 (base32
73e3060d
MB
6776 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6777 (arguments
6778 ;; XXX Tests not compatible with Python 3.5.
6779 '(#:tests? #f))))
e8df8f47
CR
6780
6781(define-public python2-pep8-1.5.7
6782 (package-with-python2 python-pep8-1.5.7))
6783
6784;; Flake8 2.4.1 requires an older version of pyflakes.
6785;; This should be removed ASAP.
6786(define-public python-pyflakes-0.8.1
6787 (package (inherit python-pyflakes)
6788 (version "0.8.1")
6789 (source
6790 (origin
6791 (method url-fetch)
6792 (uri (string-append
6793 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6794 version
6795 ".tar.gz"))
6796 (sha256
6797 (base32
0d84e1ef
MB
6798 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6799 (arguments
6800 ;; XXX Tests not compatible with Python 3.5.
6801 '(#:tests? #f))))
e8df8f47
CR
6802
6803(define-public python2-pyflakes-0.8.1
7261d9eb 6804 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
6805
6806(define-public python-flake8
6807 (package
6808 (name "python-flake8")
43789136 6809 (version "2.5.4")
e8df8f47
CR
6810 (source
6811 (origin
6812 (method url-fetch)
1b995533 6813 (uri (pypi-uri "flake8" version))
e8df8f47
CR
6814 (sha256
6815 (base32
011271c7
HG
6816 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6817 (modules '((guix build utils)))
6818 (snippet
6819 '(begin
6820 ;; Remove pre-compiled .pyc files from source.
6821 (for-each delete-file-recursively
6822 (find-files "." "__pycache__" #:directories? #t))
6823 (for-each delete-file (find-files "." "\\.pyc$"))
6824 #t))))
e8df8f47 6825 (build-system python-build-system)
482d9591 6826 (propagated-inputs
f3b98f4f 6827 `(("python-pep8" ,python-pep8)
43789136 6828 ("python-pyflakes" ,python-pyflakes)
482d9591 6829 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
6830 (native-inputs
6831 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
6832 ("python-nose" ,python-nose)))
6833 (home-page "https://gitlab.com/pycqa/flake8")
6834 (synopsis
6835 "The modular source code checker: pep8, pyflakes and co")
6836 (description
6837 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6838 (license license:expat)))
6839
6840(define-public python2-flake8
6841 (package-with-python2 python-flake8))
61b9ac53 6842
1f42d824
MFM
6843(define-public python-flake8-polyfill
6844 (package
6845 (name "python-flake8-polyfill")
6846 (version "1.0.1")
6847 (source
6848 (origin
6849 (method url-fetch)
6850 (uri (pypi-uri "flake8-polyfill" version))
6851 (sha256
6852 (base32
6853 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6854 (build-system python-build-system)
2c1cad7a
MB
6855 (arguments
6856 '(#:phases
6857 (modify-phases %standard-phases
6858 (replace 'check
6859 (lambda _
6860 (setenv "PYTHONPATH"
6861 (string-append (getcwd) "/build/lib:"
6862 (getenv "PYTHONPATH")))
6863 (zero? (system* "py.test" "-v")))))))
6864 (native-inputs
6865 `(("python-flake8" ,python-flake8)
6866 ("python-mock" ,python-mock)
6867 ("python-pycodestyle" ,python-pycodestyle)
6868 ("python-pytest" ,python-pytest)))
1f42d824
MFM
6869 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6870 (synopsis "Polyfill package for Flake8 plugins")
6871 (description
6872 "This package that provides some compatibility helpers for Flake8
6873plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6874 (license license:expat)))
6875
6876(define-public python2-flake8-polyfill
6877 (package-with-python2 python-flake8-polyfill))
6878
61b9ac53
FB
6879(define-public python-mistune
6880 (package
6881 (name "python-mistune")
08b81336 6882 (version "0.7.3")
61b9ac53
FB
6883 (source
6884 (origin
6885 (method url-fetch)
eff8d773 6886 (uri (pypi-uri "mistune" version))
61b9ac53
FB
6887 (sha256
6888 (base32
08b81336 6889 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
61b9ac53 6890 (build-system python-build-system)
328bb95d 6891 (native-inputs
f3b98f4f 6892 `(("python-nose" ,python-nose)
61b9ac53
FB
6893 ("python-cython" ,python-cython)))
6894 (home-page "https://github.com/lepture/mistune")
6895 (synopsis "Markdown parser in pure Python")
6896 (description "This package provides a fast markdown parser in pure
6897Python.")
3f641af0 6898 (license license:bsd-3)))
61b9ac53
FB
6899
6900(define-public python2-mistune
6901 (package-with-python2 python-mistune))
6d992d07 6902
b9893908
EE
6903(define-public python-markdown
6904 (package
6905 (name "python-markdown")
4ffbe8c6 6906 (version "2.6.8")
b9893908
EE
6907 (source
6908 (origin
6909 (method url-fetch)
6910 (uri (pypi-uri "Markdown" version))
6911 (sha256
6912 (base32
4ffbe8c6 6913 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
b9893908
EE
6914 (build-system python-build-system)
6915 (arguments
6916 `(#:phases
6917 (modify-phases %standard-phases
6918 (replace 'check
6919 (lambda _
6920 (zero? (system* "python" "run-tests.py")))))))
6921 (native-inputs
6922 `(("python-nose" ,python-nose)
6923 ("python-pyyaml" ,python-pyyaml)))
6924 (home-page "https://pythonhosted.org/Markdown/")
6925 (synopsis "Python implementation of Markdown")
6926 (description
6927 "This package provides a Python implementation of John Gruber's
6928Markdown. The library features international input, various Markdown
6929extensions, and several HTML output formats. A command line wrapper
6930markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 6931 (license license:bsd-3)))
b9893908
EE
6932
6933(define-public python2-markdown
6934 (package-with-python2 python-markdown))
6935
6d992d07
FB
6936(define-public python-ptyprocess
6937 (package
6938 (name "python-ptyprocess")
70fc93cb 6939 (version "0.5.1")
6d992d07
FB
6940 (source
6941 (origin
6942 (method url-fetch)
6943 (uri (string-append
6944 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6945 version ".tar.gz"))
6946 (sha256
6947 (base32
70fc93cb 6948 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6d992d07 6949 (build-system python-build-system)
328bb95d 6950 (native-inputs
f3b98f4f 6951 `(("python-nose" ,python-nose)))
6d992d07
FB
6952 (arguments
6953 `(#:phases
6954 (modify-phases %standard-phases
6955 (replace 'check
6956 (lambda _
6957 (zero? (system* "nosetests")))))))
6958 (home-page "https://github.com/pexpect/ptyprocess")
6959 (synopsis "Run a subprocess in a pseudo terminal")
6960 (description
6961 "This package provides a Python library used to launch a subprocess in a
6962pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 6963 (license license:isc)))
6d992d07
FB
6964
6965(define-public python2-ptyprocess
6966 (package-with-python2 python-ptyprocess))
4aadb1df 6967
df893a38
MB
6968(define-public python-cram
6969 (package
6970 (name "python-cram")
6971 (version "0.7")
6972 (home-page "https://bitheap.org/cram/")
6973 (source (origin
6974 (method url-fetch)
6975 (uri (list (string-append home-page "cram-"
6976 version ".tar.gz")
6977 (pypi-uri "cram" version)))
6978 (sha256
6979 (base32
6980 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6981 (arguments
6982 '(#:phases
6983 (modify-phases %standard-phases
6984 (add-after 'unpack 'patch-source
6985 (lambda _
6986 (substitute* (find-files "cram" ".*\\.py$")
6987 ;; Replace default shell path.
6988 (("/bin/sh") (which "sh")))
6989 (substitute* (find-files "tests" ".*\\.t$")
6990 (("md5") "md5sum")
6991 (("/bin/bash") (which "bash"))
6992 (("/bin/sh") (which "sh")))
6993 (substitute* "cram/_test.py"
6994 ;; This hack works around a bug triggered by substituting
6995 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6996 ;; "cram -h", which breaks the output at 80 characters. This
6997 ;; causes the line showing the default shell to break into two
6998 ;; lines, but the test expects a single line...
6999 (("env\\['COLUMNS'\\] = '80'")
7000 "env['COLUMNS'] = '160'"))
7001 #t))
7002 (delete 'check)
7003 (add-after 'install 'check
7004 ;; The test phase uses the built library and executable.
7005 ;; It's easier to run it after install since the build
7006 ;; directory contains version-specific PATH.
7007 (lambda* (#:key inputs outputs #:allow-other-keys)
7008 (add-installed-pythonpath inputs outputs)
7009 (setenv "PATH" (string-append (getenv "PATH") ":"
7010 (assoc-ref outputs "out") "/bin"))
7011 (zero? (system* "make" "test")))))))
7012 (build-system python-build-system)
7013 (native-inputs
7014 `(("python-coverage" ,python-coverage)
7015 ("which" ,which)))
7016 (synopsis "Simple testing framework for command line applications")
7017 (description
7018 "Cram is a functional testing framework for command line applications.
7019Cram tests look like snippets of interactive shell sessions. Cram runs each
7020command and compares the command output in the test with the command’s actual
7021output.")
7022 (license license:gpl2+)))
7023
7024(define-public python2-cram
7025 (package-with-python2 python-cram))
7026
4aadb1df
FB
7027(define-public python-terminado
7028 (package
7029 (name "python-terminado")
783fb0a3 7030 (version "0.6")
4aadb1df
FB
7031 (source
7032 (origin
7033 (method url-fetch)
783fb0a3 7034 (uri (pypi-uri "terminado" version))
4aadb1df
FB
7035 (sha256
7036 (base32
783fb0a3 7037 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
7038 (build-system python-build-system)
7039 (propagated-inputs
7040 `(("python-tornado" ,python-tornado)
7041 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
7042 (native-inputs
7043 `(("python-nose" ,python-nose)))
4aadb1df
FB
7044 (arguments
7045 `(#:phases
7046 (modify-phases %standard-phases
7047 (replace 'check
7048 (lambda _
7049 (zero? (system* "nosetests")))))))
7050 (home-page "https://github.com/takluyver/terminado")
7051 (synopsis "Terminals served to term.js using Tornado websockets")
7052 (description "This package provides a Tornado websocket backend for the
7053term.js Javascript terminal emulator library.")
3f641af0 7054 (license license:bsd-2)
783fb0a3 7055 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
7056
7057(define-public python2-terminado
783fb0a3 7058 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 7059 (package (inherit terminado)
783fb0a3
EF
7060 (propagated-inputs
7061 `(("python2-backport-ssl-match-hostname"
7062 ,python2-backport-ssl-match-hostname)
00e10c6e 7063 ,@(package-propagated-inputs terminado))))))
5faa5ce4 7064
789de5e2 7065(define-public python-straight-plugin
7066 (package
7067 (name "python-straight-plugin")
7068 (version "1.4.1")
7069 (source
7070 (origin
7071 (method url-fetch)
7072 (uri (pypi-uri "straight.plugin" version))
7073 (sha256
7074 (base32
7075 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7076 (build-system python-build-system)
7077 (home-page "https://github.com/ironfroggy/straight.plugin")
7078 (synopsis "Simple namespaced plugin facility")
7079 (description "Straight Plugin provides a type of plugin you can create from
7080almost any existing Python modules, and an easy way for outside developers to
7081add functionality and customization to your projects with their own plugins.")
7082 (license license:expat)))
7083
7084(define-public python2-straight-plugin
7085 (package-with-python2 python-straight-plugin))
7086
d582eaac
SB
7087(define-public python-fonttools
7088 (package
7089 (name "python-fonttools")
7090 (version "2.5")
7091 (source (origin
7092 (method url-fetch)
7093 (uri (string-append
7094 "https://pypi.python.org/packages/source/F/FontTools/"
7095 "fonttools-" version ".tar.gz"))
7096 (sha256
7097 (base32
7098 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
7099 (build-system python-build-system)
9e8c6a37
HG
7100 (arguments
7101 '(#:test-target "check"
7102 #:phases
7103 (modify-phases %standard-phases
7104 (add-after 'unpack 'patch-setuppy
7105 ;; Remove the undocumented "extra_path" argument, which adds an
7106 ;; intervening directories between site-packages and the package
7107 ;; directory.
7108 (lambda _
7109 (substitute* "setup.py"
7110 (("^[ \t]*extra_path *= *'FontTools',") ""))
7111 #t)))))
7bf837fd 7112 (home-page "https://github.com/behdad/fonttools")
d582eaac
SB
7113 (synopsis "Tools to manipulate font files")
7114 (description
7115 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 7116supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
7117of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7118also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7119from an XML-based format.")
3f641af0
DC
7120 (license (license:non-copyleft
7121 "file://LICENSE.txt"
7122 "See LICENSE.txt in the distribution."))))
d582eaac
SB
7123
7124(define-public python2-fonttools
7125 (package-with-python2 python-fonttools))
75710da6 7126
5faa5ce4
RW
7127(define-public python-ly
7128 (package
7129 (name "python-ly")
5135354f 7130 (version "0.9.4")
5faa5ce4
RW
7131 (source
7132 (origin
7133 (method url-fetch)
5135354f
RW
7134 (uri (string-append "https://pypi.python.org/packages/57/4f/"
7135 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
7136 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
7137 (sha256
7138 (base32
5135354f 7139 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 7140 (build-system python-build-system)
972cf9be
MB
7141 (arguments
7142 ;; FIXME: Some tests need network access.
7143 '(#:tests? #f))
5faa5ce4
RW
7144 (synopsis "Tool and library for manipulating LilyPond files")
7145 (description "This package provides a Python library to parse, manipulate
7146or create documents in LilyPond format. A command line program ly is also
7147provided that can be used to do various manipulations with LilyPond files.")
7148 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 7149 (license license:gpl2+)))
7e7b27d9
CR
7150
7151(define-public python-appdirs
7152 (package
7153 (name "python-appdirs")
543782e1 7154 (version "1.4.3")
7e7b27d9
CR
7155 (source
7156 (origin
7157 (method url-fetch)
26b16fd9 7158 (uri (pypi-uri "appdirs" version))
7e7b27d9
CR
7159 (sha256
7160 (base32
543782e1 7161 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7e7b27d9 7162 (build-system python-build-system)
7bf837fd 7163 (home-page "https://github.com/ActiveState/appdirs")
7e7b27d9
CR
7164 (synopsis
7165 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7166 (description
7167 "This module provides a portable way of finding out where user data
7168should be stored on various operating systems.")
7169 (license license:expat)))
7170
7171(define-public python2-appdirs
7172 (package-with-python2 python-appdirs))
89b2e0b0
LF
7173
7174(define-public python-llfuse
7175 (package
7176 (name "python-llfuse")
4d31d143 7177 (version "1.2")
89b2e0b0
LF
7178 (source (origin
7179 (method url-fetch)
7180 (uri (string-append
7181 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7182 "llfuse-" version ".tar.bz2"))
7183 (sha256
7184 (base32
4d31d143 7185 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
89b2e0b0
LF
7186 (build-system python-build-system)
7187 (inputs
7188 `(("fuse" ,fuse)
7189 ("attr" ,attr)))
7190 (native-inputs
f3b98f4f 7191 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
7192 (synopsis "Python bindings for FUSE")
7193 (description
7194 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7195 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 7196 (license license:lgpl2.0+)
cd0569c4 7197 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
7198
7199(define-public python2-llfuse
cd0569c4
LF
7200 (package (inherit (package-with-python2
7201 (strip-python2-variant python-llfuse)))
7202 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7203
7204;; For attic-0.16
7205(define-public python-llfuse-0.41
7206 (package (inherit python-llfuse)
229b3661 7207 (version "0.41.1")
cd0569c4
LF
7208 (source (origin
7209 (method url-fetch)
7210 (uri (string-append
7211 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7212 "llfuse-" version ".tar.bz2"))
7213 (sha256
7214 (base32
229b3661 7215 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
7216 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7217 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 7218 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
7219
7220(define-public python-msgpack
7221 (package
7222 (name "python-msgpack")
aed625bd 7223 (version "0.4.8")
641c9871
LF
7224 (source (origin
7225 (method url-fetch)
ae831df4 7226 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
7227 (sha256
7228 (base32
aed625bd 7229 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 7230 (build-system python-build-system)
641c9871
LF
7231 (synopsis "MessagePack (de)serializer")
7232 (description "MessagePack is a fast, compact binary serialization format,
7233suitable for similar data to JSON. This package provides CPython bindings for
7234reading and writing MessagePack data.")
7235 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 7236 (license license:asl2.0)))
bd74be7b
LF
7237
7238(define-public python2-msgpack
f210e944 7239 (package-with-python2 python-msgpack))
641c9871 7240
6e5e39f4
CR
7241(define-public python-netaddr
7242 (package
7243 (name "python-netaddr")
7244 (version "0.7.18")
7245 (source
7246 (origin
7247 (method url-fetch)
7248 (uri (string-append
7249 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
7250 version
7251 ".tar.gz"))
7252 (sha256
7253 (base32
7254 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
7255 (build-system python-build-system)
7256 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
7257 (home-page "https://github.com/drkjam/netaddr/")
7258 (synopsis "Pythonic manipulation of network addresses")
7259 (description
7260 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7261and MAC network addresses.")
3f641af0 7262 (license license:bsd-3)))
6e5e39f4
CR
7263
7264(define-public python2-netaddr
7265 (package-with-python2 python-netaddr))
8c692a52
CR
7266
7267(define-public python-wrapt
7268 (package
7269 (name "python-wrapt")
d25bee26 7270 (version "1.10.8")
8c692a52
CR
7271 (source
7272 (origin
7273 (method url-fetch)
d25bee26 7274 (uri (pypi-uri "wrapt" version))
8c692a52
CR
7275 (sha256
7276 (base32
d25bee26 7277 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
8c692a52
CR
7278 (build-system python-build-system)
7279 (arguments
7280 ;; Tests are not included in the tarball, they are only available in the
7281 ;; git repository.
7282 `(#:tests? #f))
8c692a52
CR
7283 (home-page "https://github.com/GrahamDumpleton/wrapt")
7284 (synopsis "Module for decorators, wrappers and monkey patching")
7285 (description
7286 "The aim of the wrapt module is to provide a transparent object proxy for
7287 Python, which can be used as the basis for the construction of function
7288 wrappers and decorator functions.")
3f641af0 7289 (license license:bsd-2)))
8c692a52
CR
7290
7291(define-public python2-wrapt
7292 (package-with-python2 python-wrapt))
b85c85be
CR
7293
7294(define-public python-iso8601
7295 (package
7296 (name "python-iso8601")
fe84bc9a 7297 (version "0.1.11")
b85c85be
CR
7298 (source
7299 (origin
7300 (method url-fetch)
fe84bc9a 7301 (uri (pypi-uri "iso8601" version))
b85c85be 7302 (sha256
fe84bc9a
EF
7303 (base32
7304 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 7305 (build-system python-build-system)
63b02364
MB
7306 (native-inputs
7307 `(("python-pytest" ,python-pytest)))
b85c85be
CR
7308 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7309 (synopsis "Module to parse ISO 8601 dates")
7310 (description
7311 "This module parses the most common forms of ISO 8601 date strings (e.g.
7312@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7313 (license license:expat)))
7314
7315(define-public python2-iso8601
7316 (package-with-python2 python-iso8601))
5e412b63
CR
7317
7318(define-public python-monotonic
7319 (package
7320 (name "python-monotonic")
7321 (version "0.3")
7322 (source
7323 (origin
7324 (method url-fetch)
7325 (uri (string-append
7326 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7327 version
7328 ".tar.gz"))
7329 (sha256
7330 (base32
7331 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7332 (build-system python-build-system)
5e412b63
CR
7333 (home-page "https://github.com/atdt/monotonic")
7334 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7335 (description
7336 "This module provides a monotonic() function which returns the value (in
7337fractional seconds) of a clock which never goes backwards.")
3f641af0 7338 (license license:asl2.0)))
5e412b63
CR
7339
7340(define-public python2-monotonic
7341 (package-with-python2 python-monotonic))
de34afac
CR
7342
7343(define-public python-webob
7344 (package
7345 (name "python-webob")
b8834c21 7346 (version "1.5.1")
de34afac
CR
7347 (source
7348 (origin
7349 (method url-fetch)
b8834c21 7350 (uri (pypi-uri "WebOb" version))
de34afac
CR
7351 (sha256
7352 (base32
b8834c21 7353 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 7354 (build-system python-build-system)
328bb95d 7355 (native-inputs
f3b98f4f 7356 `(("python-nose" ,python-nose)))
de34afac
CR
7357 (home-page "http://webob.org/")
7358 (synopsis "WSGI request and response object")
7359 (description
7360 "WebOb provides wrappers around the WSGI request environment, and an
7361object to help create WSGI responses.")
7362 (license license:expat)))
7363
7364(define-public python2-webob
7365 (package-with-python2 python-webob))
350ba0a3 7366
02a8a187
BW
7367(define-public python-xlrd
7368 (package
7369 (name "python-xlrd")
c2ad4d70 7370 (version "1.0.0")
02a8a187
BW
7371 (source (origin
7372 (method url-fetch)
e775f48e 7373 (uri (pypi-uri "xlrd" version))
02a8a187
BW
7374 (sha256
7375 (base32
c2ad4d70 7376 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
7377 (build-system python-build-system)
7378 (arguments
7379 `(#:phases
7380 (modify-phases %standard-phases
c2ad4d70 7381 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
7382 ;; run tests instead for now.
7383 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 7384 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
7385 (home-page "http://www.python-excel.org/")
7386 (synopsis "Library for extracting data from Excel files")
7387 (description "This packages provides a library to extract data from
c598e35c 7388spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
7389@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7390Unicode-aware. It is not intended as an end-user tool.")
3f641af0 7391 (license license:bsd-3)))
02a8a187
BW
7392
7393(define-public python2-xlrd
7394 (package-with-python2 python-xlrd))
7395
350ba0a3
CR
7396(define-public python-prettytable
7397 (package
7398 (name "python-prettytable")
7399 (version "0.7.2")
7400 (source
7401 (origin
7402 (method url-fetch)
7403 (uri (string-append
7404 "https://pypi.python.org/packages/source/P/PrettyTable/"
7405 "prettytable-" version ".tar.bz2"))
7406 (sha256
7407 (base32
7408 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7409 (build-system python-build-system)
350ba0a3
CR
7410 (home-page "http://code.google.com/p/prettytable/")
7411 (synopsis "Display tabular data in an ASCII table format")
7412 (description
7413 "A library designed to represent tabular data in visually appealing ASCII
7414tables. PrettyTable allows for selection of which columns are to be printed,
7415independent alignment of columns (left or right justified or centred) and
7416printing of sub-tables by specifying a row range.")
3f641af0 7417 (license license:bsd-3)))
350ba0a3
CR
7418
7419(define-public python2-prettytable
7420 (package-with-python2 python-prettytable))
7a8ac75a 7421
9f8ee3fe
RW
7422(define-public python-tables
7423 (package
7424 (name "python-tables")
7425 (version "3.2.2")
7426 (source
7427 (origin
7428 (method url-fetch)
7429 (uri (pypi-uri "tables" version))
7430 (sha256
7431 (base32
bac23672
HG
7432 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7433 (modules '((guix build utils)))
7434 (snippet
7435 '(begin
7436 ;; Remove pre-compiled .pyc files from source.
7437 (for-each delete-file-recursively
7438 (find-files "." "__pycache__" #:directories? #t))
7439 (for-each delete-file (find-files "." "\\.pyc$"))
7440 #t))))
9f8ee3fe
RW
7441 (build-system python-build-system)
7442 (arguments
7443 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7444 ;; or "check", so we must override the build and check phases.
7445 #:phases
7446 (modify-phases %standard-phases
7447 (add-after 'unpack 'use-gcc
7448 (lambda _
7449 (substitute* "setup.py"
7450 (("compiler = new_compiler\\(\\)" line)
7451 (string-append line
7452 "\ncompiler.set_executables(compiler='gcc',"
7453 "compiler_so='gcc',"
7454 "linker_exe='gcc',"
7455 "linker_so='gcc -shared')")))
7456 #t))
7457 (replace 'build
7458 (lambda* (#:key inputs #:allow-other-keys)
7459 (zero? (system* "python" "setup.py" "build"
7460 (string-append "--hdf5="
7461 (assoc-ref inputs "hdf5"))))))
7462 (replace 'check
7463 (lambda* (#:key inputs #:allow-other-keys)
7464 (zero? (system* "python" "setup.py" "check"
7465 (string-append "--hdf5="
7466 (assoc-ref inputs "hdf5")))))))))
7467 (propagated-inputs
7468 `(("python-numexpr" ,python-numexpr)
7469 ("python-numpy" ,python-numpy)))
7470 (native-inputs
f3b98f4f 7471 `(("python-cython" ,python-cython)
9f8ee3fe
RW
7472 ("pkg-config" ,pkg-config)))
7473 (inputs
7474 `(("hdf5" ,hdf5)
7475 ("bzip2" ,bzip2)
7476 ("zlib" ,zlib)))
7477 (home-page "http://www.pytables.org/")
7478 (synopsis "Hierarchical datasets for Python")
7479 (description "PyTables is a package for managing hierarchical datasets and
d1e4ad1b 7480designed to efficiently cope with extremely large amounts of data.")
3f641af0 7481 (license license:bsd-3)))
9f8ee3fe
RW
7482
7483(define-public python2-tables
7484 (package-with-python2 python-tables))
7485
7a8ac75a
RW
7486(define-public python-pyasn1
7487 (package
7488 (name "python-pyasn1")
5e0ddfba 7489 (version "0.2.3")
7a8ac75a
RW
7490 (source
7491 (origin
7492 (method url-fetch)
caa0edb3 7493 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
7494 (sha256
7495 (base32
5e0ddfba 7496 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7a8ac75a
RW
7497 (build-system python-build-system)
7498 (home-page "http://pyasn1.sourceforge.net/")
7499 (synopsis "ASN.1 types and codecs")
7500 (description
7501 "This is an implementation of ASN.1 types and codecs in Python. It is
7502suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 7503 (license license:bsd-2)))
7a8ac75a
RW
7504
7505(define-public python2-pyasn1
7506 (package-with-python2 python-pyasn1))
9a49a535 7507
5988c299
EF
7508(define-public python-pyasn1-modules
7509 (package
7510 (name "python-pyasn1-modules")
7511 (version "0.0.8")
7512 (source
7513 (origin
7514 (method url-fetch)
7515 (uri (pypi-uri "pyasn1-modules" version))
7516 (sha256
7517 (base32
7518 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7519 (build-system python-build-system)
5988c299
EF
7520 (propagated-inputs
7521 `(("python-pyasn1" ,python-pyasn1)))
3b3b60d0 7522 (home-page "https://sourceforge.net/projects/pyasn1/")
5988c299
EF
7523 (synopsis "ASN.1 codec implementations")
7524 (description
7525 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7526implementations of ASN.1-based codecs and protocols.")
3f641af0 7527 (license license:bsd-3)))
5988c299
EF
7528
7529(define-public python2-pyasn1-modules
7530 (package-with-python2 python-pyasn1-modules))
7531
520af157 7532(define-public python-ipaddress
9a49a535 7533 (package
520af157 7534 (name "python-ipaddress")
36e0d9db 7535 (version "1.0.18")
520af157
DC
7536 (source (origin
7537 (method url-fetch)
7538 (uri (pypi-uri "ipaddress" version))
7539 (sha256
7540 (base32
36e0d9db 7541 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
9a49a535 7542 (build-system python-build-system)
9a49a535
RW
7543 (home-page "https://github.com/phihag/ipaddress")
7544 (synopsis "IP address manipulation library")
7545 (description
520af157
DC
7546 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7547 in Python. This library is used to create, poke at, and manipulate IPv4 and
7548 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7549 module to older versions of Python.")
f210e944 7550 (license license:psfl)))
520af157
DC
7551
7552(define-public python2-ipaddress
f210e944 7553 (package-with-python2 python-ipaddress))
3f00e078 7554
4a238186
HG
7555(define-public python2-ipaddr
7556 (package
7557 (name "python2-ipaddr")
7558 (version "2.1.11")
7559 (source
7560 (origin
7561 (method url-fetch)
7562 (uri (pypi-uri "ipaddr" version))
7563 (sha256
7564 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7565 (build-system python-build-system)
7566 (arguments
7567 `(#:python ,python-2 ;version 2 only
7568 #:phases
7569 (modify-phases %standard-phases
7570 (replace 'check
7571 (lambda* _
7572 (zero? (system* "python" "ipaddr_test.py")))))))
7573 (home-page "https://github.com/google/ipaddr-py")
7574 (synopsis "IP address manipulation library")
7575 (description
7576 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7577IPv6 addresses and networks.
7578
7579For new implementations you may prefer to use the standard module
7580@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7581versions of Python.")
3f641af0 7582 (license license:asl2.0)))
4a238186 7583
3f00e078
RW
7584(define-public python-idna
7585 (package
7586 (name "python-idna")
37c04f91 7587 (version "2.5")
3f00e078
RW
7588 (source
7589 (origin
7590 (method url-fetch)
37c04f91 7591 (uri (pypi-uri "idna" version))
3f00e078
RW
7592 (sha256
7593 (base32
37c04f91 7594 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
3f00e078 7595 (build-system python-build-system)
3f00e078
RW
7596 (home-page "https://github.com/kjd/idna")
7597 (synopsis "Internationalized domain names in applications")
7598 (description
7599 "This is a library to support the Internationalised Domain Names in
7600Applications (IDNA) protocol as specified in RFC 5891. This version of the
7601protocol is often referred to as “IDNA2008” and can produce different results
7602from the earlier standard from 2003. The library is also intended to act as a
7603suitable drop-in replacement for the “encodings.idna” module that comes with
7604the Python standard library but currently only supports the older 2003
7605specification.")
3f641af0 7606 (license license:bsd-4)))
3f00e078
RW
7607
7608(define-public python2-idna
7609 (package-with-python2 python-idna))
36ebf972
RW
7610
7611(define-public python-pretend
7612 (package
7613 (name "python-pretend")
7614 (version "1.0.8")
7615 (source
7616 (origin
7617 (method url-fetch)
7618 (uri (string-append "https://pypi.python.org/packages/source/p/"
7619 "pretend/pretend-" version ".tar.gz"))
7620 (sha256
7621 (base32
7622 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7623 (build-system python-build-system)
36ebf972
RW
7624 (home-page "https://github.com/alex/pretend")
7625 (synopsis "Library for stubbing in Python")
7626 (description
7627 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7628technique for writing tests. You may hear the term mixed up with mocks,
7629fakes, or doubles. Basically, a stub is an object that returns pre-canned
7630responses, rather than doing any computation.")
3f641af0 7631 (license license:bsd-3)))
36ebf972
RW
7632
7633(define-public python2-pretend
7634 (package-with-python2 python-pretend))
aa759a51
RW
7635
7636(define-public python-cryptography-vectors
7637 (package
7638 (name "python-cryptography-vectors")
27305769 7639 (version "2.0")
aa759a51
RW
7640 (source
7641 (origin
7642 (method url-fetch)
9c509ca9 7643 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
7644 (sha256
7645 (base32
27305769 7646 "0qadys01517k5wy0rifxip02p08kzrqxm5j0lmmlp0kr07h9jc7h"))))
aa759a51 7647 (build-system python-build-system)
aa759a51 7648 (home-page "https://github.com/pyca/cryptography")
66e07664 7649 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
7650 (description
7651 "This package contains test vectors for the cryptography package.")
7652 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7653 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
7654
7655(define-public python2-cryptography-vectors
7656 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
7657
7658(define-public python-cryptography
7659 (package
7660 (name "python-cryptography")
27305769 7661 (version "2.0")
88b47cb0
RW
7662 (source
7663 (origin
7664 (method url-fetch)
9c509ca9 7665 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
7666 (sha256
7667 (base32
27305769 7668 "1c40qlxyn1jgg99f3pqi7146d3561rn9zdqc7w8f7kwr9ysm696k"))))
88b47cb0
RW
7669 (build-system python-build-system)
7670 (inputs
7671 `(("openssl" ,openssl)))
7672 (propagated-inputs
dc1bd2b5
LF
7673 `(("python-asn1crypto" ,python-asn1crypto)
7674 ("python-cffi" ,python-cffi)
88b47cb0 7675 ("python-six" ,python-six)
88b47cb0
RW
7676 ("python-idna" ,python-idna)
7677 ("python-iso8601" ,python-iso8601)))
7678 (native-inputs
7679 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 7680 ("python-hypothesis" ,python-hypothesis)
88b47cb0 7681 ("python-pretend" ,python-pretend)
912dcbad 7682 ("python-pytz" ,python-pytz)
23b9168d 7683 ("python-pytest" ,python-pytest-3.0)))
88b47cb0
RW
7684 (home-page "https://github.com/pyca/cryptography")
7685 (synopsis "Cryptographic recipes and primitives for Python")
7686 (description
7687 "cryptography is a package which provides cryptographic recipes and
7688primitives to Python developers. It aims to be the “cryptographic standard
7689library” for Python. The package includes both high level recipes, and low
7690level interfaces to common cryptographic algorithms such as symmetric ciphers,
7691message digests and key derivation functions.")
7692 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7693 (license (list license:bsd-3 license:asl2.0))
519e2f4f 7694 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
7695
7696(define-public python2-cryptography
519e2f4f
LF
7697 (let ((crypto (package-with-python2
7698 (strip-python2-variant python-cryptography))))
88b47cb0
RW
7699 (package (inherit crypto)
7700 (propagated-inputs
7701 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
7702 ("python2-backport-ssl-match-hostname"
7703 ,python2-backport-ssl-match-hostname)
68f1cdec 7704 ("python2-enum34" ,python2-enum34)
88b47cb0 7705 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
7706
7707(define-public python-pyopenssl
7708 (package
7709 (name "python-pyopenssl")
2580c2f0 7710 (version "17.2.0")
5af999b8
RW
7711 (source
7712 (origin
7713 (method url-fetch)
eb68d268 7714 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
7715 (sha256
7716 (base32
2580c2f0 7717 "0d283g4zi0hr9papd24mjl70mi15gyzq6fx618rizi87dgipqqax"))))
5af999b8 7718 (build-system python-build-system)
30e0229a 7719 (arguments
7c6bf660
MB
7720 '(#:phases
7721 (modify-phases %standard-phases
7722 (delete 'check)
7723 (add-after 'install 'check
7724 (lambda* (#:key inputs outputs #:allow-other-keys)
7725 (add-installed-pythonpath inputs outputs)
96bbc41f
MB
7726 (zero? (system* "py.test" "-v" "-k"
7727 (string-append
7728 ;; This test tries to look up certificates from
7729 ;; the compiled-in default path in OpenSSL, which
7730 ;; does not exist in the build environment.
7731 "not test_fallback_default_verify_paths "
7732 ;; This test attempts to make a connection to
7733 ;; an external web service.
7734 "and not test_set_default_verify_paths"))))))))
5af999b8
RW
7735 (propagated-inputs
7736 `(("python-cryptography" ,python-cryptography)
7737 ("python-six" ,python-six)))
7738 (inputs
7739 `(("openssl" ,openssl)))
30e0229a 7740 (native-inputs
2580c2f0
MB
7741 `(("python-flaky" ,python-flaky)
7742 ("python-pretend" ,python-pretend)
96bbc41f 7743 ("python-pytest" ,python-pytest-3.0)))
5af999b8
RW
7744 (home-page "https://github.com/pyca/pyopenssl")
7745 (synopsis "Python wrapper module around the OpenSSL library")
7746 (description
7747 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7748library.")
3f641af0 7749 (license license:asl2.0)))
5af999b8
RW
7750
7751(define-public python2-pyopenssl
519e2f4f 7752 (package-with-python2 python-pyopenssl))
643725a1
CR
7753
7754(define-public python-pip
7755 (package
7756 (name "python-pip")
392c26b0 7757 (version "9.0.1")
643725a1
CR
7758 (source
7759 (origin
7760 (method url-fetch)
6fb54e3b 7761 (uri (pypi-uri "pip" version))
643725a1
CR
7762 (sha256
7763 (base32
392c26b0 7764 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
643725a1 7765 (build-system python-build-system)
392c26b0
MC
7766 (arguments
7767 '(#:tests? #f)) ; there are no tests in the pypi archive.
643725a1 7768 (home-page "https://pip.pypa.io/")
392c26b0 7769 (synopsis "Package manager for Python software")
643725a1 7770 (description
392c26b0 7771 "Pip is a package manager for Python software, that finds packages on the
643725a1
CR
7772Python Package Index (PyPI).")
7773 (license license:expat)))
7774
7775(define-public python2-pip
7776 (package-with-python2 python-pip))
d8c4998f
LC
7777
7778(define-public python-tlsh
7779 (package
7780 (name "python-tlsh")
99b00dc7 7781 (version "3.4.4")
d8c4998f
LC
7782 (home-page "https://github.com/trendmicro/tlsh")
7783 (source (origin
99b00dc7
EF
7784 (method url-fetch)
7785 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7786 version ".tar.gz"))
d8c4998f
LC
7787 (sha256
7788 (base32
99b00dc7
EF
7789 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7790 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
7791 (build-system cmake-build-system)
7792 (arguments
7793 '(#:out-of-source? #f
7794 #:phases (modify-phases %standard-phases
7795 (replace
7796 'install
7797 (lambda* (#:key outputs #:allow-other-keys)
7798 ;; Build and install the Python bindings. The underlying
7799 ;; C++ library is apparently not meant to be installed.
7800 (let ((out (assoc-ref outputs "out")))
7801 (with-directory-excursion "py_ext"
7802 (and (system* "python" "setup.py" "build")
7803 (system* "python" "setup.py" "install"
7804 (string-append "--prefix=" out))))))))))
7805 (inputs `(("python" ,python-wrapper))) ;for the bindings
7806 (synopsis "Fuzzy matching library for Python")
7807 (description
7808 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7809Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7810value which can be used for similarity comparisons. Similar objects have
7811similar hash values, which allows for the detection of similar objects by
7812comparing their hash values. The byte stream should have a sufficient amount
7813of complexity; for example, a byte stream of identical bytes will not generate
7814a hash value.")
3f641af0 7815 (license license:asl2.0)))
d8c4998f
LC
7816
7817(define-public python2-tlsh
7818 (package
7819 (inherit python-tlsh)
7820 (name "python2-tlsh")
7821 (inputs `(("python" ,python-2)))))
d96034ed 7822
67f66812
BW
7823(define-public python-termcolor
7824 (package
7825 (name "python-termcolor")
7826 (version "1.1.0")
7827 (source
7828 (origin
7829 (method url-fetch)
a5e8f597 7830 (uri (pypi-uri "termcolor" version))
67f66812
BW
7831 (sha256
7832 (base32
7833 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7834 (build-system python-build-system)
7835 (arguments
7836 ;; There are no tests.
7837 `(#:tests? #f))
7838 (home-page "http://pypi.python.org/pypi/termcolor")
7839 (synopsis "ANSII Color formatting for terminal output")
7840 (description
7841 "This package provides ANSII Color formatting for output in terminals.")
7842 (license license:expat)))
7843
7844(define-public python2-termcolor
7845 (package-with-python2 python-termcolor))
7846
d96034ed
LC
7847(define-public python-libarchive-c
7848 (package
7849 (name "python-libarchive-c")
03fd001c 7850 (version "2.2")
d96034ed
LC
7851 (source (origin
7852 (method url-fetch)
03fd001c 7853 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
7854 (sha256
7855 (base32
03fd001c 7856 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
7857 (build-system python-build-system)
7858 (arguments
7859 '(#:phases (modify-phases %standard-phases
7860 (add-before
7861 'build 'reference-libarchive
7862 (lambda* (#:key inputs #:allow-other-keys)
7863 ;; Retain the absolute file name of libarchive.so.
7864 (let ((libarchive (assoc-ref inputs "libarchive")))
7865 (substitute* "libarchive/ffi.py"
7866 (("find_library\\('archive'\\)")
7867 (string-append "'" libarchive
b41a05ce 7868 "/lib/libarchive.so'")))))))))
d96034ed 7869 (inputs
f3b98f4f 7870 `(("libarchive" ,libarchive)))
d96034ed
LC
7871 (home-page "https://github.com/Changaco/python-libarchive-c")
7872 (synopsis "Python interface to libarchive")
7873 (description
7874 "This package provides Python bindings to libarchive, a C library to
7875access possibly compressed archives in many different formats. It uses
7876Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 7877 (license license:lgpl2.0+)))
d96034ed
LC
7878
7879(define-public python2-libarchive-c
7880 (package-with-python2 python-libarchive-c))
5e1c9367
LC
7881
7882(define-public python-file
7883 (package
7884 (inherit file)
7885 (name "python-file")
7ffa5d4a
LF
7886 (source (origin
7887 (inherit (package-source file))
7888 ;; This patch should not be applied to python2-file.
7889 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
7890 (build-system python-build-system)
7891 (arguments
7892 '(#:tests? #f ;no tests
00bf74be 7893 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
7894 #:phases (modify-phases %standard-phases
7895 (add-before 'build 'change-directory
7896 (lambda _
7897 (chdir "python")
7898 #t))
7899 (add-before 'build 'set-library-file-name
7900 (lambda* (#:key inputs #:allow-other-keys)
7901 (let ((file (assoc-ref inputs "file")))
7902 (substitute* "magic.py"
7903 (("find_library\\('magic'\\)")
7904 (string-append "'" file "/lib/libmagic.so'")))
7905 #t))))))
7906 (inputs `(("file" ,file)))
7907 (self-native-input? #f)
daeeea71
CM
7908 (synopsis "Python bindings to the libmagic file type guesser. Note that
7909this module and the python-magic module both provide a \"magic.py\" file;
7910these two modules, which are different and were developed separately, both
f210e944 7911serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
7912
7913(define-public python2-file
f210e944 7914 (package-with-python2 python-file))
85d4aeac
LC
7915
7916(define-public python-debian
7917 (package
7918 (name "python-debian")
02d7f337 7919 (version "0.1.28")
85d4aeac
LC
7920 (source
7921 (origin
7922 (method url-fetch)
5e217a8b 7923 (uri (pypi-uri name version))
85d4aeac
LC
7924 (sha256
7925 (base32
02d7f337 7926 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
85d4aeac 7927 (build-system python-build-system)
f22efa01 7928 (propagated-inputs
85d4aeac 7929 `(("python-six" ,python-six)))
85d4aeac
LC
7930 (home-page "http://packages.debian.org/sid/python-debian")
7931 (synopsis "Debian package related modules")
7932 (description
5c7bdc9a
LC
7933 ;; XXX: Use @enumerate instead of @itemize to work around
7934 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
7935 "This package provides Python modules that abstract many formats of
7936Debian-related files, such as:
7937
5c7bdc9a 7938@enumerate
85d4aeac
LC
7939@item Debtags information;
7940@item @file{debian/changelog} files;
7941@item packages files, pdiffs;
7942@item control files of single or multiple RFC822-style paragraphs---e.g.
7943 @file{debian/control}, @file{.changes}, @file{.dsc};
7944@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7945 contained files and meta-information.
5c7bdc9a 7946@end enumerate\n")
85d4aeac
LC
7947
7948 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 7949 (license license:gpl3+)))
85d4aeac
LC
7950
7951(define-public python2-debian
7952 (package-with-python2 python-debian))
816a6538 7953
2d321bb2
RW
7954(define-public python-nbformat
7955 (package
7956 (name "python-nbformat")
7957 (version "4.1.0")
7958 (source
7959 (origin
7960 (method url-fetch)
7961 (uri (pypi-uri "nbformat" version))
7962 (sha256
7963 (base32
7964 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7965 (build-system python-build-system)
7966 (arguments `(#:tests? #f)) ; no test target
7967 (propagated-inputs
7968 `(("python-ipython-genutils" ,python-ipython-genutils)
7969 ("python-jsonschema" ,python-jsonschema)
7970 ("python-jupyter-core" ,python-jupyter-core)
7971 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
7972 (home-page "http://jupyter.org")
7973 (synopsis "Jupyter Notebook format")
7974 (description "This package provides the reference implementation of the
7975Jupyter Notebook format and Python APIs for working with notebooks.")
7976 (license license:bsd-3)))
7977
7978(define-public python2-nbformat
7979 (package-with-python2 python-nbformat))
7980
55436048
RW
7981(define-public python-bleach
7982 (package
7983 (name "python-bleach")
7984 (version "1.4.3")
7985 (source
7986 (origin
7987 (method url-fetch)
7988 (uri (pypi-uri "bleach" version))
7989 (sha256
7990 (base32
7991 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7992 (build-system python-build-system)
7993 (propagated-inputs
7994 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
7995 ("python-six" ,python-six)))
7996 (native-inputs
7997 `(("python-nose" ,python-nose)))
7bf837fd 7998 (home-page "https://github.com/jsocol/bleach")
55436048
RW
7999 (synopsis "Whitelist-based HTML-sanitizing tool")
8000 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8001 (license license:asl2.0)))
8002
8003(define-public python2-bleach
8004 (package-with-python2 python-bleach))
8005
60590a3a
RW
8006(define-public python-entrypoints
8007 (package
8008 (name "python-entrypoints")
8009 (version "0.2.2")
8010 (source
8011 (origin
8012 (method url-fetch)
8013 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
8014 version ".tar.gz"))
8015 (file-name (string-append name "-" version ".tar.gz"))
8016 (sha256
8017 (base32
8018 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
8019 (build-system python-build-system)
8020 ;; The package does not come with a setup.py file, so we have to generate
8021 ;; one ourselves.
8022 (arguments
8023 `(#:tests? #f
8024 #:phases
8025 (modify-phases %standard-phases
8026 (add-after 'unpack 'create-setup.py
8027 (lambda _
8028 (call-with-output-file "setup.py"
8029 (lambda (port)
8030 (format port "\
8031from setuptools import setup
8032setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8033" ,version))))))))
8034 (home-page "https://github.com/takluyver/entrypoints")
8035 (synopsis "Discover and load entry points from installed Python packages")
8036 (description "Entry points are a way for Python packages to advertise
8037objects with some common interface. The most common examples are
8038@code{console_scripts} entry points, which define shell commands by
8039identifying a Python function to run. The @code{entrypoints} module contains
8040functions to find and load entry points.")
8041 (license license:expat)))
8042
8043(define-public python2-entrypoints
8044 (package-with-python2 python-entrypoints))
8045
c60898a8
RW
8046(define-public python-nbconvert
8047 (package
8048 (name "python-nbconvert")
8049 (version "5.0.0b1")
8050 (source
8051 (origin
8052 (method url-fetch)
8053 (uri (pypi-uri "nbconvert" version))
8054 (sha256
8055 (base32
8056 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8057 (build-system python-build-system)
497355dc
MB
8058 (arguments
8059 `(;; The "bdist_egg" target is disabled by default, causing the installation
8060 ;; to fail.
8061 #:configure-flags (list "bdist_egg")
8062 ;; FIXME: 5 failures, 40 errors.
8063 #:tests? #f))
8064 ;; #:phases
8065 ;; (modify-phases %standard-phases
8066 ;; (replace 'check
8067 ;; (lambda _
8068 ;; (zero? (system* "py.test" "-v")))))
8069 (native-inputs
8070 `(("python-pytest" ,python-pytest)))
c60898a8
RW
8071 (propagated-inputs
8072 `(("python-bleach" ,python-bleach)
8073 ("python-entrypoints" ,python-entrypoints)
8074 ("python-jinja2" ,python-jinja2)
8075 ("python-jupyter-core" ,python-jupyter-core)
8076 ("python-mistune" ,python-mistune)
8077 ("python-nbformat" ,python-nbformat)
8078 ("python-pygments" ,python-pygments)
c60898a8
RW
8079 ("python-traitlets" ,python-traitlets)))
8080 (home-page "http://jupyter.org")
8081 (synopsis "Converting Jupyter Notebooks")
8082 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8083notebooks to various other formats via Jinja templates. It allows you to
8084convert an @code{.ipynb} notebook file into various static formats including:
8085
8086@enumerate
8087@item HTML
8088@item LaTeX
8089@item PDF
8090@item Reveal JS
8091@item Markdown (md)
8092@item ReStructured Text (rst)
8093@item executable script
8094@end enumerate\n")
8095 (license license:bsd-3)))
8096
8097(define-public python2-nbconvert
8098 (package-with-python2 python-nbconvert))
8099
a0d62280
RW
8100(define-public python-notebook
8101 (package
8102 (name "python-notebook")
8103 (version "4.2.3")
8104 (source (origin
8105 (method url-fetch)
8106 (uri (pypi-uri "notebook" version))
8107 (sha256
8108 (base32
8109 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
8110 (build-system python-build-system)
8111 (arguments
8112 `(#:phases
8113 (modify-phases %standard-phases
8114 (replace 'check
8115 (lambda _
8116 ;; HOME must be set for tests
8117 (setenv "HOME" "/tmp")
8118 (zero? (system* "nosetests")))))))
8119 (propagated-inputs
8120 `(("python-jupyter-core" ,python-jupyter-core)
8121 ("python-nbformat" ,python-nbformat)
8122 ("python-nbconvert" ,python-nbconvert)
8123 ("python-ipython" ,python-ipython)))
8124 (native-inputs
8125 `(("python-nose" ,python-nose)
8126 ("python-sphinx" ,python-sphinx)
8127 ("python-requests" ,python-requests)))
8128 (home-page "http://jupyter.org/")
8129 (synopsis "Web-based notebook environment for interactive computing")
8130 (description
8131 "The Jupyter HTML notebook is a web-based notebook environment for
8132interactive computing.")
3a735ecf 8133 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
8134 (license license:bsd-3)))
8135
8136(define-public python2-notebook
3a735ecf
HG
8137 (let ((base (package-with-python2
8138 (strip-python2-variant python-notebook))))
8139 (package (inherit base)
8140 (native-inputs
8141 `(("python2-mock" ,python2-mock)
8142 ,@(package-native-inputs base)))
8143 (arguments
8144 (substitute-keyword-arguments (package-arguments base)
8145 ((#:phases phases)
8146 `(modify-phases ,phases
8147 (add-before 'check 'disable-test-case
8148 ;; The test requires network access to localhost. Curiously it
8149 ;; fails with Python 2 only. Simply make the test-case return
8150 ;; immediately.
8151 (lambda _
8152 (substitute*
8153 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8154 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 8155
d55724ed
RW
8156(define-public python-widgetsnbextension
8157 (package
8158 (name "python-widgetsnbextension")
8159 (version "1.2.6")
8160 (source
8161 (origin
8162 (method url-fetch)
8163 (uri (pypi-uri "widgetsnbextension" version))
8164 (sha256
8165 (base32
8166 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
8167 (build-system python-build-system)
8168 (propagated-inputs
8169 `(("python-notebook" ,python-notebook)))
8170 (native-inputs
58f5fae7
MB
8171 `(("python-certifi" ,python-certifi)
8172 ("python-nose" ,python-nose)))
d55724ed
RW
8173 (home-page "http://ipython.org")
8174 (synopsis "IPython HTML widgets for Jupyter")
8175 (description "This package provides interactive HTML widgets for Jupyter
8176notebooks.")
8177 (license license:bsd-3)))
8178
8179(define-public python2-widgetsnbextension
8180 (package-with-python2 python-widgetsnbextension))
8181
4fe2e344
RW
8182(define-public python-ipywidgets
8183 (package
8184 (name "python-ipywidgets")
8185 (version "5.2.2")
8186 (source
8187 (origin
8188 (method url-fetch)
8189 (uri (pypi-uri "ipywidgets" version))
8190 (sha256
8191 (base32
8192 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8193 (build-system python-build-system)
8194 ;; FIXME: it's not clear how to run the tests.
8195 (arguments `(#:tests? #f))
8196 (propagated-inputs
8197 `(("python-ipykernel" ,python-ipykernel)
8198 ("python-ipython" ,python-ipython)
4fe2e344
RW
8199 ("python-traitlets" ,python-traitlets)
8200 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8201 (home-page "http://ipython.org")
8202 (synopsis "IPython HTML widgets for Jupyter")
8203 (description "Ipywidgets are interactive HTML widgets for Jupyter
8204notebooks and the IPython kernel. Notebooks come alive when interactive
8205widgets are used. Users gain control of their data and can visualize changes
8206in the data.")
8207 (license license:bsd-3)))
8208
8209(define-public python2-ipywidgets
8210 (package-with-python2 python-ipywidgets))
8211
8ceebf8f
RW
8212(define-public python-jupyter-console
8213 (package
8214 (name "python-jupyter-console")
8215 (version "5.0.0")
8216 (source
8217 (origin
8218 (method url-fetch)
8219 (uri (pypi-uri "jupyter_console" version))
8220 (sha256
8221 (base32
8222 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
8223 (build-system python-build-system)
8224 ;; FIXME: it's not clear how to run the tests.
8225 (arguments `(#:tests? #f))
8226 (propagated-inputs
8227 `(("python-ipykernel" ,python-ipykernel)
8228 ("python-ipython" ,python-ipython)
8229 ("python-jupyter-client" ,python-jupyter-client)
8230 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 8231 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
8232 (home-page "https://jupyter.org")
8233 (synopsis "Jupyter terminal console")
8234 (description "This package provides a terminal-based console frontend for
8235Jupyter kernels. It also allows for console-based interaction with non-Python
8236Jupyter kernels such as IJulia and IRKernel.")
8237 (license license:bsd-3)))
8238
8239(define-public python2-jupyter-console
8240 (package-with-python2 python-jupyter-console))
8241
c27ae827
RW
8242(define-public jupyter
8243 (package
8244 (name "jupyter")
8245 (version "1.0.0")
8246 (source
8247 (origin
8248 (method url-fetch)
8249 (uri (pypi-uri "jupyter" version))
8250 (sha256
8251 (base32
8252 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8253 (build-system python-build-system)
8254 ;; FIXME: it's not clear how to run the tests.
8255 (arguments `(#:tests? #f))
8256 (propagated-inputs
8257 `(("python-ipykernel" ,python-ipykernel)
8258 ("python-ipywidgets" ,python-ipywidgets)
8259 ("python-jupyter-console" ,python-jupyter-console)
8260 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 8261 ("python-notebook" ,python-notebook)))
c27ae827
RW
8262 (home-page "http://jupyter.org")
8263 (synopsis "Web application for interactive documents")
8264 (description
8265 "The Jupyter Notebook is a web application that allows you to create and
8266share documents that contain live code, equations, visualizations and
8267explanatory text. Uses include: data cleaning and transformation, numerical
8268simulation, statistical modeling, machine learning and much more.")
8269 (license license:bsd-3)))
8270
816a6538
LC
8271(define-public python-chardet
8272 (package
8273 (name "python-chardet")
8274 (version "2.3.0")
8275 (source
8276 (origin
8277 (method url-fetch)
8278 (uri (string-append
8279 "https://pypi.python.org/packages/source/c/chardet/chardet-"
8280 version
8281 ".tar.gz"))
8282 (sha256
8283 (base32
8284 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
8285 (build-system python-build-system)
816a6538
LC
8286 (home-page "https://github.com/chardet/chardet")
8287 (synopsis "Universal encoding detector for Python 2 and 3")
8288 (description
8289 "This package provides @code{chardet}, a Python module that can
8290automatically detect a wide range of file encodings.")
3f641af0 8291 (license license:lgpl2.1+)))
816a6538
LC
8292
8293(define-public python2-chardet
8294 (package-with-python2 python-chardet))
2fc5f186 8295
1872f1bb
KM
8296(define-public python-docopt
8297 (package
8298 (name "python-docopt")
8299 (version "0.6.2")
8300 (source
8301 (origin
8302 (method url-fetch)
8303 ;; The release on PyPI does not include tests.
8304 (uri (string-append
8305 "https://github.com/docopt/docopt/archive/"
8306 version ".tar.gz"))
8307 (file-name (string-append name "-" version ".tar.gz"))
8308 (sha256
8309 (base32
8310 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8311 (build-system python-build-system)
8312 (native-inputs
f3b98f4f 8313 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
8314 (arguments
8315 `(#:phases (alist-replace
8316 'check
8317 (lambda _ (zero? (system* "py.test")))
8318 %standard-phases)))
8319 (home-page "http://docopt.org")
8320 (synopsis "Command-line interface description language for Python")
8321 (description "This library allows the user to define a command-line
8322interface from a program's help message rather than specifying it
8323programatically with command-line parsers like @code{getopt} and
8324@code{argparse}.")
8325 (license license:expat)))
8326
8327(define-public python2-docopt
8328 (package-with-python2 python-docopt))
8329
2fc5f186
LF
8330(define-public python-zope-event
8331 (package
8332 (name "python-zope-event")
8333 (version "4.1.0")
8334 (source
8335 (origin
8336 (method url-fetch)
8337 (uri (string-append "https://pypi.python.org/packages/source/z"
8338 "/zope.event/zope.event-" version ".tar.gz"))
8339 (sha256
8340 (base32
8341 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8342 (build-system python-build-system)
2fc5f186
LF
8343 (home-page "http://pypi.python.org/pypi/zope.event")
8344 (synopsis "Event publishing system for Python")
8345 (description "Zope.event provides an event publishing API, intended for
8346use by applications which are unaware of any subscribers to their events. It
8347is a simple event-dispatching system on which more sophisticated event
8348dispatching systems can be built.")
3f641af0 8349 (license license:zpl2.1)))
2fc5f186
LF
8350
8351(define-public python2-zope-event
8352 (package-with-python2 python-zope-event))
97abe268
LF
8353
8354(define-public python-zope-interface
8355 (package
8356 (name "python-zope-interface")
8357 (version "4.1.3")
8358 (source
8359 (origin
8360 (method url-fetch)
8361 (uri (string-append "https://pypi.python.org/packages/source/z"
8362 "/zope.interface/zope.interface-" version ".tar.gz"))
8363 (sha256
8364 (base32
8365 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8366 (build-system python-build-system)
38d480a8 8367 (native-inputs
97abe268
LF
8368 `(("python-zope-event" ,python-zope-event)))
8369 (home-page "https://github.com/zopefoundation/zope.interface")
8370 (synopsis "Python implementation of the \"design by contract\"
8371methodology")
8372 (description "Zope.interface provides an implementation of \"object
8373interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8374conforming to a given API or contract.")
3f641af0 8375 (license license:zpl2.1)))
97abe268
LF
8376
8377(define-public python2-zope-interface
8378 (package-with-python2 python-zope-interface))
81f2373c
LF
8379
8380(define-public python-zope-exceptions
8381 (package
8382 (name "python-zope-exceptions")
8383 (version "4.0.8")
8384 (source
8385 (origin
8386 (method url-fetch)
8387 (uri (string-append "https://pypi.python.org/packages/source/z"
8388 "/zope.exceptions/zope.exceptions-"
8389 version ".tar.gz"))
8390 (sha256
8391 (base32
8392 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8393 (build-system python-build-system)
8394 (arguments
8395 '(#:tests? #f)) ; circular dependency with zope.testrunner
8396 (propagated-inputs
8397 `(("python-zope-interface" ,python-zope-interface)))
8398 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8399 (synopsis "Zope exceptions")
8400 (description "Zope.exceptions provides general-purpose exception types
8401that have uses outside of the Zope framework.")
3f641af0 8402 (license license:zpl2.1)))
81f2373c
LF
8403
8404(define-public python2-zope-exceptions
8405 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
8406
8407(define-public python-zope-testing
8408 (package
8409 (name "python-zope-testing")
8410 (version "4.5.0")
8411 (source
8412 (origin
8413 (method url-fetch)
8414 (uri (string-append "https://pypi.python.org/packages/source/z"
8415 "/zope.testing/zope.testing-" version ".tar.gz"))
8416 (sha256
8417 (base32
b02f7a21
HG
8418 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8419 (modules '((guix build utils)))
8420 (snippet
8421 '(begin
8422 ;; Remove pre-compiled .pyc files backup files from source.
8423 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8424 #t))))
900e3c0e
LF
8425 (build-system python-build-system)
8426 (native-inputs
8427 `(("python-zope-exceptions" ,python-zope-exceptions)))
8428 (propagated-inputs
8429 `(("python-zope-interface" ,python-zope-interface)))
8430 (home-page "http://pypi.python.org/pypi/zope.testing")
8431 (synopsis "Zope testing helpers")
8432 (description "Zope.testing provides a number of testing utilities for HTML
8433forms, HTTP servers, regular expressions, and more.")
3f641af0 8434 (license license:zpl2.1)))
900e3c0e
LF
8435
8436(define-public python2-zope-testing
8437 (package-with-python2 python-zope-testing))
01614c4f
LF
8438
8439(define-public python-zope-testrunner
8440 (package
8441 (name "python-zope-testrunner")
8442 (version "4.4.9")
8443 (source
8444 (origin
8445 (method url-fetch)
8446 (uri (string-append "https://pypi.python.org/packages/source/z"
8447 "/zope.testrunner/zope.testrunner-"
8448 version ".zip"))
8449 (sha256
8450 (base32
8451 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8452 (build-system python-build-system)
385871e5
MB
8453 (arguments
8454 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
8455 (native-inputs
8456 `(("python-six" ,python-six)
e408ffc3 8457 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
8458 ("python-zope-exceptions" ,python-zope-exceptions)
8459 ("python-zope-testing" ,python-zope-testing)
8460 ("unzip" ,unzip)))
8461 (propagated-inputs
8462 `(("python-zope-interface" ,python-zope-interface)))
8463 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8464 (synopsis "Zope testrunner script")
8465 (description "Zope.testrunner provides a script for running Python
8466tests.")
3f641af0 8467 (license license:zpl2.1)))
01614c4f
LF
8468
8469(define-public python2-zope-testrunner
8470 (let ((base (package-with-python2 python-zope-testrunner)))
8471 (package
8472 (inherit base)
8473 (native-inputs
8474 (append (package-native-inputs base)
8475 `(("python2-subunit" ,python2-subunit)
8476 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
8477
8478(define-public python-zope-i18nmessageid
8479 (package
8480 (name "python-zope-i18nmessageid")
8481 (version "4.0.3")
8482 (source
8483 (origin
8484 (method url-fetch)
8485 (uri (string-append
8486 "https://pypi.python.org/packages/source/z"
8487 "/zope.i18nmessageid/zope.i18nmessageid-"
8488 version ".tar.gz"))
8489 (sha256
8490 (base32
8491 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8492 (build-system python-build-system)
6a5c710c
LF
8493 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8494 (synopsis "Message identifiers for internationalization")
8495 (description "Zope.i18nmessageid provides facilities for declaring
8496internationalized messages within program source text.")
3f641af0 8497 (license license:zpl2.1)))
6a5c710c
LF
8498
8499(define-public python2-zope-i18nmessageid
8500 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
8501
8502(define-public python-zope-schema
8503 (package
8504 (name "python-zope-schema")
8505 (version "4.4.2")
8506 (source
8507 (origin
8508 (method url-fetch)
8509 (uri (string-append "https://pypi.python.org/packages/source/z"
8510 "/zope.schema/zope.schema-" version ".tar.gz"))
8511 (sha256
8512 (base32
8513 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8514 (build-system python-build-system)
22dba2ef
MB
8515 (arguments
8516 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
8517 (propagated-inputs
8518 `(("python-zope-event" ,python-zope-event)
2b9e4bea 8519 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
8520 ("python-zope-interface" ,python-zope-interface)))
8521 (native-inputs
47f77210
HG
8522 `(("python-zope-testing" ,python-zope-testing)
8523 ("python-coverage" ,python-coverage)
8524 ("python-nose" ,python-nose)))
71fb09f3
LF
8525 (home-page "http://pypi.python.org/pypi/zope.schema")
8526 (synopsis "Zope data schemas")
8527 (description "Zope.scheme provides extensions to zope.interface for
8528defining data schemas.")
3f641af0 8529 (license license:zpl2.1)))
71fb09f3
LF
8530
8531(define-public python2-zope-schema
8532 (package-with-python2 python-zope-schema))
fbac9b17
LF
8533
8534(define-public python-zope-configuration
8535 (package
8536 (name "python-zope-configuration")
8537 (version "4.0.3")
8538 (source (origin
8539 (method url-fetch)
8540 (uri (string-append "https://pypi.python.org/packages/source/z"
8541 "/zope.configuration/zope.configuration-"
8542 version ".tar.gz"))
8543 (sha256
8544 (base32
8545 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8546 (build-system python-build-system)
7e8b1bfa
MB
8547 (arguments
8548 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
8549 (propagated-inputs
8550 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8551 ("python-zope-schema" ,python-zope-schema)))
8552 (home-page "http://pypi.python.org/pypi/zope.configuration")
8553 (synopsis "Zope Configuration Markup Language")
8554 (description "Zope.configuration implements ZCML, the Zope Configuration
8555Markup Language.")
3f641af0 8556 (license license:zpl2.1)))
fbac9b17
LF
8557
8558(define-public python2-zope-configuration
8559 (package-with-python2 python-zope-configuration))
2ad52086
LF
8560
8561(define-public python-zope-proxy
8562 (package
8563 (name "python-zope-proxy")
8564 (version "4.1.6")
8565 (source
8566 (origin
8567 (method url-fetch)
8568 (uri (string-append "https://pypi.python.org/packages/source/z"
8569 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8570 (sha256
8571 (base32
8572 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8573 (build-system python-build-system)
66b3aadb
MB
8574 (arguments
8575 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
8576 (propagated-inputs
8577 `(("python-zope-interface" ,python-zope-interface)))
8578 (home-page "http://pypi.python.org/pypi/zope.proxy")
8579 (synopsis "Generic, transparent proxies")
8580 (description "Zope.proxy provides generic, transparent proxies for Python.
8581Proxies are special objects which serve as mostly-transparent wrappers around
8582another object, intervening in the apparent behavior of the wrapped object
8583only when necessary to apply the policy (e.g., access checking, location
8584brokering, etc.) for which the proxy is responsible.")
3f641af0 8585 (license license:zpl2.1)))
2ad52086
LF
8586
8587(define-public python2-zope-proxy
8588 (package-with-python2 python-zope-proxy))
f404b5ea
LF
8589
8590(define-public python-zope-location
8591 (package
8592 (name "python-zope-location")
8593 (version "4.0.3")
8594 (source
8595 (origin
8596 (method url-fetch)
8597 (uri (string-append "https://pypi.python.org/packages/source/z"
8598 "/zope.location/zope.location-" version ".tar.gz"))
8599 (sha256
8600 (base32
8601 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8602 (build-system python-build-system)
40bb8e07
MB
8603 (arguments
8604 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 8605 (propagated-inputs
f404b5ea
LF
8606 `(("python-zope-proxy" ,python-zope-proxy)
8607 ("python-zope-schema" ,python-zope-schema)))
8608 (home-page "http://pypi.python.org/pypi/zope.location/")
8609 (synopsis "Zope location library")
8610 (description "Zope.location implements the concept of \"locations\" in
8611Zope3, which are are special objects that have a structural location.")
3f641af0 8612 (license license:zpl2.1)))
f404b5ea
LF
8613
8614(define-public python2-zope-location
8615 (package-with-python2 python-zope-location))
d4b77f36
LF
8616
8617(define-public python-zope-security
8618 (package
8619 (name "python-zope-security")
8620 (version "4.0.3")
8621 (source
8622 (origin
8623 (method url-fetch)
8624 (uri (string-append "https://pypi.python.org/packages/source/z"
8625 "/zope.security/zope.security-" version ".tar.gz"))
8626 (sha256
8627 (base32
8628 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8629 (build-system python-build-system)
a74f9b12
MB
8630 (arguments
8631 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
8632 (propagated-inputs
8633 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 8634 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 8635 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
8636 (native-inputs
8637 `(("python-six" ,python-six)
8638 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
8639 ("python-zope-configuration" ,python-zope-configuration)
8640 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
8641 ("python-zope-testrunner" ,python-zope-testrunner)
8642 ("python-zope-testing" ,python-zope-testing)))
8643 (home-page "http://pypi.python.org/pypi/zope.security")
8644 (synopsis "Zope security framework")
8645 (description "Zope.security provides a generic mechanism to implement
8646security policies on Python objects.")
3f641af0 8647 (license license:zpl2.1)))
d4b77f36
LF
8648
8649(define-public python2-zope-security
04417662
EF
8650 (let ((zope-security (package-with-python2 python-zope-security)))
8651 (package (inherit zope-security)
8652 (propagated-inputs
8653 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8654 ,@(alist-delete
8655 "python-zope-testrunner"
8656 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
8657
8658(define-public python-zope-component
8659 (package
8660 (name "python-zope-component")
35e1a0f1 8661 (version "4.3.0")
a6b61b27
LF
8662 (source
8663 (origin
8664 (method url-fetch)
35e1a0f1 8665 (uri (pypi-uri "zope.component" version))
a6b61b27
LF
8666 (sha256
8667 (base32
35e1a0f1 8668 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
a6b61b27
LF
8669 (build-system python-build-system)
8670 (arguments
8671 ;; Skip tests due to circular dependency with python-zope-security.
8672 '(#:tests? #f))
8673 (native-inputs
8674 `(("python-zope-testing" ,python-zope-testing)))
8675 (propagated-inputs
8676 `(("python-zope-event" ,python-zope-event)
8677 ("python-zope-interface" ,python-zope-interface)
8678 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8679 ("python-zope-configuration" ,python-zope-configuration)))
8680 (home-page "https://github.com/zopefoundation/zope.component")
8681 (synopsis "Zope Component Architecture")
8682 (description "Zope.component represents the core of the Zope Component
8683Architecture. Together with the zope.interface package, it provides
8684facilities for defining, registering and looking up components.")
3f641af0 8685 (license license:zpl2.1)))
a6b61b27
LF
8686
8687(define-public python2-zope-component
8688 (package-with-python2 python-zope-component))
3859ac12 8689
1ae44b80 8690(define-public python-pythondialog
b5f218be 8691 (package
1ae44b80 8692 (name "python-pythondialog")
42c4b246 8693 (version "3.4.0")
b5f218be
LF
8694 (source
8695 (origin
8696 (method url-fetch)
1ae44b80 8697 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
8698 (sha256
8699 (base32
1ae44b80 8700 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
8701 (build-system python-build-system)
8702 (arguments
8703 `(#:phases
8704 (modify-phases %standard-phases
8705 (add-after 'unpack 'patch-path
8706 (lambda* (#:key inputs #:allow-other-keys)
8707 (let* ((dialog (assoc-ref inputs "dialog")))
8708 ;; Since this library really wants to grovel the search path, we
8709 ;; must hardcode dialog's store path into it.
8710 (substitute* "dialog.py"
8711 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8712 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8713 #t))))
b5f218be
LF
8714 #:tests? #f)) ; no test suite
8715 (propagated-inputs
8716 `(("dialog" ,dialog)))
8717 (home-page "http://pythondialog.sourceforge.net/")
8718 (synopsis "Python interface to the UNIX dialog utility")
8719 (description "A Python wrapper for the dialog utility. Its purpose is to
8720provide an easy to use, pythonic and comprehensive Python interface to dialog.
8721This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 8722 (license license:lgpl2.1)
1ae44b80
LF
8723 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8724
8725(define-public python2-pythondialog
8726 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8727 (package
8728 (inherit base)
8729 (version (package-version python-pythondialog))
8730 (source (origin
8731 (method url-fetch)
8732 (uri (pypi-uri "python2-pythondialog" version))
8733 (sha256
8734 (base32
8735 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 8736
3859ac12
LF
8737(define-public python-pyrfc3339
8738 (package
8739 (name "python-pyrfc3339")
d9aa097b 8740 (version "1.0")
3859ac12
LF
8741 (source
8742 (origin
8743 (method url-fetch)
d9aa097b 8744 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
8745 (sha256
8746 (base32
d9aa097b 8747 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
8748 (build-system python-build-system)
8749 (propagated-inputs
8750 `(("python-pytz" ,python-pytz)))
8751 (native-inputs
f3b98f4f 8752 `(("python-nose" ,python-nose)))
3859ac12
LF
8753 (home-page "https://github.com/kurtraschke/pyRFC3339")
8754 (synopsis "Python timestamp library")
8755 (description "Python library for generating and parsing RFC 3339-compliant
8756timestamps.")
8757 (license license:expat)))
8758
8759(define-public python2-pyrfc3339
8760 (package-with-python2 python-pyrfc3339))
5eea2005
LF
8761
8762(define-public python-werkzeug
8763 (package
8764 (name "python-werkzeug")
bbb99d6b 8765 (version "0.11.15")
5eea2005
LF
8766 (source
8767 (origin
8768 (method url-fetch)
4b47cbfa 8769 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
8770 (sha256
8771 (base32
bbb99d6b 8772 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
5eea2005
LF
8773 (build-system python-build-system)
8774 (native-inputs
8775 `(("python-pytest" ,python-pytest)))
8776 (home-page "http://werkzeug.pocoo.org/")
8777 (synopsis "Utilities for WSGI applications")
8778 (description "One of the most advanced WSGI utility modules. It includes a
8779powerful debugger, full-featured request and response objects, HTTP utilities to
8780handle entity tags, cache control headers, HTTP dates, cookie handling, file
8781uploads, a powerful URL routing system and a bunch of community-contributed
8782addon modules.")
3f641af0 8783 (license license:x11)))
5eea2005
LF
8784
8785(define-public python2-werkzeug
8786 (package-with-python2 python-werkzeug))
99fffa8a
LF
8787
8788(define-public python-configobj
8789 (package
8790 (name "python-configobj")
8791 (version "5.0.6")
8792 (source (origin
8793 (method url-fetch)
8794 (uri (string-append
8795 "https://pypi.python.org/packages/source/c/configobj/"
8796 "configobj-" version ".tar.gz"))
8797 (sha256
8798 (base32
8799 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8800 ;; Patch setup.py so it looks for python-setuptools, which is
8801 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 8802 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 8803 (build-system python-build-system)
861f70c9 8804 (propagated-inputs
f3b98f4f 8805 `(("python-six" ,python-six)))
99fffa8a
LF
8806 (synopsis "Config file reading, writing and validation")
8807 (description "ConfigObj is a simple but powerful config file reader and
8808writer: an ini file round tripper. Its main feature is that it is very easy to
8809use, with a straightforward programmer’s interface and a simple syntax for
8810config files.")
8811 (home-page "https://github.com/DiffSK/configobj")
3f641af0 8812 (license license:bsd-3)))
99fffa8a
LF
8813
8814(define-public python2-configobj
8815 (package-with-python2 python-configobj))
79e8a291
LF
8816
8817(define-public python-configargparse
8818 (package
8819 (name "python-configargparse")
8820 (version "0.10.0")
8821 (source (origin
8822 (method url-fetch)
8823 (uri (string-append
8824 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8825 "ConfigArgParse-" version ".tar.gz"))
8826 (sha256
8827 (base32
8828 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8829 (build-system python-build-system)
8830 (arguments
8831 ;; FIXME: Bug in test suite filed upstream:
8832 ;; https://github.com/bw2/ConfigArgParse/issues/32
8833 '(#:tests? #f))
8834 (synopsis "Replacement for argparse")
8835 (description "A drop-in replacement for argparse that allows options to also
8836be set via config files and/or environment variables.")
8837 (home-page "https://github.com/bw2/ConfigArgParse")
8838 (license license:expat)))
8839
8840(define-public python2-configargparse
8841 (package-with-python2 python-configargparse))
ab41f979
LF
8842
8843(define-public python-ndg-httpsclient
8844 (package
8845 (name "python-ndg-httpsclient")
ae476d01 8846 (version "0.4.2")
ab41f979
LF
8847 (source (origin
8848 (method url-fetch)
7be13d00 8849 (uri (pypi-uri "ndg_httpsclient" version))
ab41f979
LF
8850 (sha256
8851 (base32
ae476d01 8852 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
ab41f979 8853 (build-system python-build-system)
a39cc016
LF
8854 (arguments
8855 '(;; The tests appear to require networking.
8856 #:tests? #f))
ab41f979
LF
8857 (propagated-inputs
8858 `(("python-pyopenssl" ,python-pyopenssl)))
8859 (synopsis "HTTPS support for Python's httplib and urllib2")
8860 (description "This is a HTTPS client implementation for httplib and urllib2
8861based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8862over the default provided with Python and importantly enables full verification
8863of the SSL peer.")
8864 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 8865 (license license:bsd-3)))
ab41f979
LF
8866
8867;; python2-openssl requires special care, so package-with-python2 is
8868;; insufficient.
8869(define-public python2-ndg-httpsclient
8870 (package (inherit python-ndg-httpsclient)
8871 (name "python2-ndg-httpsclient")
8872 (arguments `(#:python ,python-2))
8873 (propagated-inputs
8874 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
8875
8876(define-public python-contextlib2
8877 (package
8878 (name "python-contextlib2")
8879 (version "0.4.0")
8880 (source
8881 (origin
8882 (method url-fetch)
8883 (uri (pypi-uri "contextlib2" version))
8884 (sha256
8885 (base32
8886 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8887 (build-system python-build-system)
8888 (arguments
8889 `(#:phases
8890 (modify-phases %standard-phases
8891 (replace 'check
8892 (lambda _ (zero?
8893 (system*
b3546174 8894 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
8895 (home-page "http://contextlib2.readthedocs.org/")
8896 (synopsis "Tools for decorators and context managers")
8897 (description "This module is primarily a backport of the Python
88983.2 contextlib to earlier Python versions. Like contextlib, it
8899provides utilities for common tasks involving decorators and context
8900managers. It also contains additional features that are not part of
8901the standard library.")
3f641af0 8902 (license license:psfl)))
03f964a5
CM
8903
8904(define-public python2-contextlib2
8905 (package-with-python2 python-contextlib2))
210bf497
DT
8906
8907(define-public python-texttable
8908 (package
8909 (name "python-texttable")
4c4d4df3 8910 (version "0.8.7")
210bf497
DT
8911 (source
8912 (origin
8913 (method url-fetch)
8914 (uri (pypi-uri "texttable" version))
8915 (sha256
8916 (base32
4c4d4df3 8917 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
210bf497
DT
8918 (build-system python-build-system)
8919 (arguments '(#:tests? #f)) ; no tests
8920 (home-page "https://github.com/foutaise/texttable/")
8921 (synopsis "Python module for creating simple ASCII tables")
8922 (description "Texttable is a Python module for creating simple ASCII
8923tables.")
3f641af0 8924 (license license:lgpl2.1+)))
210bf497
DT
8925
8926(define-public python2-texttable
8927 (package-with-python2 python-texttable))
67c52bb3
DT
8928
8929(define-public python-websocket-client
8930 (package
8931 (name "python-websocket-client")
6b810897 8932 (version "0.37.0")
67c52bb3
DT
8933 (source
8934 (origin
8935 (method url-fetch)
6b810897 8936 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
8937 (sha256
8938 (base32
6b810897 8939 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 8940 (build-system python-build-system)
a5333f7c
HG
8941 (propagated-inputs
8942 `(("python-six" ,python-six)))
67c52bb3
DT
8943 (home-page "https://github.com/liris/websocket-client")
8944 (synopsis "WebSocket client for Python")
8945 (description "The Websocket-client module provides the low level APIs for
8946WebSocket usage in Python programs.")
3f641af0 8947 (license license:lgpl2.1+)))
67c52bb3
DT
8948
8949(define-public python2-websocket-client
8950 (package-with-python2 python-websocket-client))
5c6eea2a
LF
8951
8952(define-public python-atomicwrites
8953 (package
8954 (name "python-atomicwrites")
c56ad5e2 8955 (version "1.1.5")
5c6eea2a
LF
8956 (source (origin
8957 (method url-fetch)
8958 (uri (pypi-uri "atomicwrites" version))
8959 (sha256
8960 (base32
c56ad5e2 8961 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
5c6eea2a
LF
8962 (build-system python-build-system)
8963 (synopsis "Atomic file writes in Python")
8964 (description "Library for atomic file writes using platform dependent tools
8f65585b 8965for atomic file system operations.")
5c6eea2a 8966 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 8967 (license license:expat)))
9bb6d184
LF
8968
8969(define-public python2-atomicwrites
f210e944 8970 (package-with-python2 python-atomicwrites))
561bb3cb
LF
8971
8972(define-public python-requests-toolbelt
8973 (package
8974 (name "python-requests-toolbelt")
c02af1c8 8975 (version "0.6.2")
561bb3cb
LF
8976 (source (origin
8977 (method url-fetch)
c02af1c8
LF
8978 (uri (string-append
8979 "https://pypi.python.org/packages/"
8980 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8981 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
8982 (sha256
8983 (base32
c02af1c8 8984 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 8985 (build-system python-build-system)
759aadd4
LF
8986 (native-inputs
8987 `(("python-betamax" ,python-betamax)
8988 ("python-mock" ,python-mock)
8989 ("python-pytest" ,python-pytest)))
561bb3cb
LF
8990 (propagated-inputs
8991 `(("python-requests" ,python-requests)))
8992 (synopsis "Extensions to python-requests")
8993 (description "This is a toolbelt of useful classes and functions to be used
8994with python-requests.")
8995 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 8996 (license license:asl2.0)))
d1deb90b
LF
8997
8998(define-public python-click-threading
8999 (package
9000 (name "python-click-threading")
3d2e0dbc 9001 (version "0.2.0")
d1deb90b
LF
9002 (source (origin
9003 (method url-fetch)
3d2e0dbc
LF
9004 (uri (string-append
9005 "https://pypi.python.org/packages/"
9006 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
9007 "click-threading-" version ".tar.gz"))
d1deb90b
LF
9008 (sha256
9009 (base32
3d2e0dbc 9010 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
9011 (build-system python-build-system)
9012 (propagated-inputs
9013 `(("python-click" ,python-click)))
9014 (synopsis "Utilities for multithreading in Click")
9015 (description "This package provides utilities for multithreading in Click
9016applications.")
9017 (home-page "https://github.com/click-contrib/click-threading")
9018 (license license:expat)))
7b17cab9
LF
9019
9020(define-public python-click-log
9021 (package
9022 (name "python-click-log")
42734b9a 9023 (version "0.1.8")
7b17cab9
LF
9024 (source (origin
9025 (method url-fetch)
9026 (uri (pypi-uri "click-log" version))
9027 (sha256
9028 (base32
42734b9a 9029 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
7b17cab9
LF
9030 (build-system python-build-system)
9031 (propagated-inputs
9032 `(("python-click" ,python-click)))
9033 (synopsis "Logging for click applications")
9034 (description "This package provides a Python library for logging Click
9035applications.")
9036 (home-page "https://github.com/click-contrib/click-log")
9037 (license license:expat)))
7b3a4ee4
LF
9038
9039(define-public python-apipkg
9040 (package
9041 (name "python-apipkg")
9042 (version "1.4")
9043 (source (origin
9044 (method url-fetch)
9045 (uri (pypi-uri "apipkg" version))
9046 (sha256
9047 (base32
9048 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
9049 (build-system python-build-system)
328bb95d 9050 (native-inputs
7b3a4ee4
LF
9051 `(("python-pytest" ,python-pytest)))
9052 (synopsis "Namespace control and lazy-import mechanism")
9053 (description "With apipkg you can control the exported namespace of a Python
9054package and greatly reduce the number of imports for your users. It is a small
9055pure Python module that works on virtually all Python versions.")
9056 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 9057 (license license:expat)))
e08739c3
CAW
9058
9059(define-public python2-apipkg
f210e944 9060 (package-with-python2 python-apipkg))
848964fe
LF
9061
9062(define-public python-execnet
9063 (package
9064 (name "python-execnet")
9065 (version "1.4.1")
9066 (source (origin
9067 (method url-fetch)
9068 (uri (pypi-uri "execnet" version))
9069 (sha256
9070 (base32
9071 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9072 (build-system python-build-system)
ca0eee9d
LF
9073 (arguments
9074 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9075 ;; The two test failures are caused by the lack of an `ssh` executable.
9076 ;; The test suite can be run with pytest after the 'install' phase.
9077 #:tests? #f))
848964fe 9078 (native-inputs
ca0eee9d
LF
9079 `(("python-pytest" ,python-pytest)
9080 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 9081 (propagated-inputs
848964fe
LF
9082 `(("python-apipkg" ,python-apipkg)))
9083 (synopsis "Rapid multi-Python deployment")
9084 (description "Execnet provides a share-nothing model with
9085channel-send/receive communication for distributing execution across many
9086Python interpreters across version, platform and network barriers. It has a
d1e4ad1b 9087minimal and fast API targeting the following uses:
848964fe
LF
9088@enumerate
9089@item distribute tasks to (many) local or remote CPUs
9090@item write and deploy hybrid multi-process applications
9091@item write scripts to administer multiple environments
9092@end enumerate")
9093 (home-page "http://codespeak.net/execnet/")
f210e944 9094 (license license:expat)))
16c84f90
CAW
9095
9096(define-public python2-execnet
f210e944 9097 (package-with-python2 python-execnet))
6720dbb4 9098
d5bbf806 9099(define-public python-trollius-redis
9100 (package
9101 (name "python-trollius-redis")
9102 (version "0.1.4")
9103 (source
9104 (origin
9105 (method url-fetch)
9106 (uri (pypi-uri "trollius_redis" version))
9107 (sha256
9108 (base32
9109 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
9110 (build-system python-build-system)
97b62eb0
MB
9111 ;; TODO: Tests require packaging 'hiredis'.
9112 (arguments '(#:tests? #f))
d5bbf806 9113 (home-page "https://github.com/benjolitz/trollius-redis")
9114 (synopsis "Port of asyncio-redis to trollius")
9115 (description "@code{trollius-redis} is a Redis client for Python
9116 trollius. It is an asynchronious IO (PEP 3156) implementation of the
9117 Redis protocol.")
9118 (license license:bsd-2)))
9119
9120(define-public python2-trollius-redis
9121 (package-with-python2 python-trollius-redis))
9122
6720dbb4
LF
9123;;; The software provided by this package was integrated into pytest 2.8.
9124(define-public python-pytest-cache
9125 (package
9126 (name "python-pytest-cache")
9127 (version "1.0")
9128 (source (origin
9129 (method url-fetch)
9130 (uri (pypi-uri "pytest-cache" version))
9131 (sha256
9132 (base32
9133 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
9134 (build-system python-build-system)
f22efa01 9135 (propagated-inputs
630d938f
EF
9136 `(("python-apipkg" ,python-apipkg)
9137 ("python-execnet" ,python-execnet)
9138 ("python-py" ,python-py)
9139 ("python-pytest" ,python-pytest)))
6720dbb4
LF
9140 (synopsis "Py.test plugin with mechanisms for caching across test runs")
9141 (description "The pytest-cache plugin provides tools to rerun failures from
9142the last py.test invocation.")
9143 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 9144 (license license:expat)))
0adc21c2
EF
9145
9146(define-public python2-pytest-cache
f210e944 9147 (package-with-python2 python-pytest-cache))
d7e729fe
LF
9148
9149(define-public python-pytest-localserver
9150 (package
9151 (name "python-pytest-localserver")
29f20168 9152 (version "0.3.5")
d7e729fe
LF
9153 (source (origin
9154 (method url-fetch)
29f20168 9155 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
9156 (sha256
9157 (base32
29f20168 9158 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
9159 (build-system python-build-system)
9160 (arguments
9161 `(#:phases (modify-phases %standard-phases
9162 (replace 'check
9163 (lambda _
9164 (zero? (system* "py.test" "--genscript=runtests.py"))
9165 (zero? (system* "py.test")))))))
9166 (native-inputs
d7e729fe
LF
9167 `(("python-pytest" ,python-pytest)
9168 ("python-requests" ,python-requests)
9ba40f05 9169 ("python-six" ,python-six)))
f22efa01 9170 (propagated-inputs
9ba40f05 9171 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
9172 (synopsis "Py.test plugin to test server connections locally")
9173 (description "Pytest-localserver is a plugin for the pytest testing
9174framework which enables you to test server connections locally.")
9175 (home-page "https://pypi.python.org/pypi/pytest-localserver")
9176 (license license:expat)))
28cecbb7
LF
9177
9178(define-public python-wsgi-intercept
9179 (package
9180 (name "python-wsgi-intercept")
909fbd2b 9181 (version "1.2.2")
28cecbb7
LF
9182 (source (origin
9183 (method url-fetch)
909fbd2b
LF
9184 (uri (string-append
9185 "https://pypi.python.org/packages/"
9186 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
9187 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
9188 (sha256
9189 (base32
909fbd2b 9190 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 9191 (build-system python-build-system)
b9fc496f
HG
9192 (propagated-inputs
9193 `(("python-six" ,python-six)))
28cecbb7 9194 (native-inputs
9d813ec1 9195 `(("python-pytest" ,python-pytest)
b9fc496f
HG
9196 ("python-httplib2" ,python-httplib2)
9197 ("python-requests" ,python-requests)
8757f050 9198 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
9199 (synopsis "Puts a WSGI application in place of a real URI for testing")
9200 (description "Wsgi_intercept installs a WSGI application in place of a real
9201URI for testing. Testing a WSGI application normally involves starting a
9202server at a local host and port, then pointing your test code to that address.
9203Instead, this library lets you intercept calls to any specific host/port
9204combination and redirect them into a WSGI application importable by your test
9205program. Thus, you can avoid spawning multiple processes or threads to test
9206your Web app.")
9207 (home-page "https://github.com/cdent/wsgi-intercept")
9208 (license license:expat)))
89b8a551
LF
9209
9210(define-public python-pytest-xprocess
9211 (package
9212 (name "python-pytest-xprocess")
9213 (version "0.9.1")
9214 (source (origin
9215 (method url-fetch)
9216 (uri (pypi-uri "pytest-xprocess" version))
9217 (sha256
9218 (base32
9219 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
9220 (build-system python-build-system)
9221 (propagated-inputs
9222 `(("python-pytest" ,python-pytest)
9223 ("python-pytest-cache" ,python-pytest-cache)
9224 ("python-psutil" ,python-psutil)))
9225 (synopsis "Pytest plugin to manage external processes across test runs")
9226 (description "Pytest-xprocess is an experimental py.test plugin for managing
9227processes across test runs.")
9228 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
9229 (license license:expat)))
5c299bf0
LF
9230
9231(define-public python-icalendar
9232 (package
9233 (name "python-icalendar")
93013f1e 9234 (version "3.11.5")
5c299bf0
LF
9235 (source (origin
9236 (method url-fetch)
9237 (uri (pypi-uri "icalendar" version))
9238 (sha256
9239 (base32
93013f1e 9240 "0y6f2js983ag0d138xx4pzyc71gf44hyqmjsdvw6pq2xrkpj8jzk"))))
5c299bf0
LF
9241 (build-system python-build-system)
9242 (propagated-inputs
22d7360b 9243 `(("python-dateutil" ,python-dateutil)
5c299bf0
LF
9244 ("python-pytz" ,python-pytz)))
9245 (synopsis "Python library for parsing iCalendar files")
9246 (description "The icalendar package is a parser/generator of iCalendar
9247files for use with Python.")
9248 (home-page "https://github.com/collective/icalendar")
3f641af0 9249 (license license:bsd-2)))
6bbbb53e
LF
9250
9251(define-public python-sphinxcontrib-newsfeed
9252 (package
9253 (name "python-sphinxcontrib-newsfeed")
9254 (version "0.1.4")
9255 (source (origin
9256 (method url-fetch)
9257 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
9258 (sha256
9259 (base32
9260 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
3d2a544c 9261 (arguments '(#:tests? #f)) ; No tests.
6bbbb53e
LF
9262 (build-system python-build-system)
9263 (propagated-inputs
251ed7f2 9264 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
9265 (synopsis "News Feed extension for Sphinx")
9266 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
9267Blog, News or Announcements section to a Sphinx website.")
9268 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 9269 (license license:bsd-2)))
2216e15c
SB
9270
9271(define-public python-args
9272 (package
9273 (name "python-args")
9274 (version "0.1.0")
9275 (source (origin
9276 (method url-fetch)
9277 (uri (pypi-uri "args" version))
9278 (sha256
9279 (base32
9280 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9281 (build-system python-build-system)
2216e15c
SB
9282 (home-page "https://github.com/kennethreitz/args")
9283 (synopsis "Command-line argument parser")
9284 (description
9285 "This library provides a Python module to parse command-line arguments.")
3f641af0 9286 (license license:bsd-3)))
2216e15c
SB
9287
9288(define-public python2-args
9289 (package-with-python2 python-args))
c06a3de9
SB
9290
9291(define-public python-clint
9292 (package
9293 (name "python-clint")
9294 (version "0.5.1")
9295 (source (origin
9296 (method url-fetch)
9297 (uri (pypi-uri "clint" version))
9298 (sha256
9299 (base32
9300 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9301 (build-system python-build-system)
6145b604
MB
9302 (arguments
9303 '(#:phases
9304 (modify-phases %standard-phases
9305 (replace 'check
9306 (lambda _
9307 (zero? (system* "py.test" "-v")))))))
9308 (native-inputs
9309 `(("python-pytest" ,python-pytest)))
f22efa01 9310 (propagated-inputs
f3b98f4f 9311 `(("python-args" ,python-args)))
c06a3de9
SB
9312 (home-page "https://github.com/kennethreitz/clint")
9313 (synopsis "Command-line interface tools")
9314 (description
9315 "Clint is a Python module filled with a set of tools for developing
9316command-line applications, including tools for colored and indented
9317output, progress bar display, and pipes.")
3f641af0 9318 (license license:isc)))
c06a3de9
SB
9319
9320(define-public python2-clint
9321 (package-with-python2 python-clint))
4ecdeef8
SB
9322
9323(define-public python-astor
9324 (package
9325 (name "python-astor")
9326 (version "0.5")
9327 (source (origin
9328 (method url-fetch)
9329 (uri (pypi-uri "astor" version))
9330 (sha256
9331 (base32
9332 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9333 (build-system python-build-system)
4ecdeef8
SB
9334 (home-page "https://github.com/berkerpeksag/astor")
9335 (synopsis "Read and write Python ASTs")
9336 (description
9337 "Astor is designed to allow easy manipulation of Python source via the
9338Abstract Syntax Tree.")
3f641af0 9339 (license license:bsd-3)))
4ecdeef8
SB
9340
9341(define-public python2-astor
9342 (package-with-python2 python-astor))
e224b7d0
SB
9343
9344(define-public python-rply
9345 (package
9346 (name "python-rply")
9347 (version "0.7.4")
9348 (source (origin
9349 (method url-fetch)
9350 (uri (pypi-uri "rply" version))
9351 (sha256
9352 (base32
9353 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9354 (build-system python-build-system)
f22efa01 9355 (propagated-inputs
f3b98f4f 9356 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
9357 (home-page "https://github.com/alex/rply")
9358 (synopsis "Parser generator for Python")
9359 (description
9360 "This package provides a pure Python based parser generator, that also
9361works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9362with a new public API, and RPython support.")
3f641af0 9363 (license license:bsd-3)))
e224b7d0
SB
9364
9365(define-public python2-rply
9366 (package-with-python2 python-rply))
c3e919d7
SB
9367
9368(define-public python-hy
9369 (package
9370 (name "python-hy")
9371 (version "0.11.1")
9372 (source (origin
9373 (method url-fetch)
9374 (uri (pypi-uri "hy" version))
9375 (sha256
9376 (base32
9377 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9378 (build-system python-build-system)
15c37077
MB
9379 (arguments
9380 '(#:phases
9381 (modify-phases %standard-phases
9382 (replace 'check
9383 (lambda _
9384 ;; Tests require write access to HOME.
9385 (setenv "HOME" "/tmp")
9386 (zero? (system* "nosetests")))))))
9387 (native-inputs
9388 `(("python-coverage" ,python-coverage)
9389 ("python-nose" ,python-nose)))
f22efa01 9390 (propagated-inputs
c3e919d7
SB
9391 `(("python-astor" ,python-astor)
9392 ("python-clint" ,python-clint)
f3b98f4f 9393 ("python-rply" ,python-rply)))
c3e919d7
SB
9394 (home-page "http://hylang.org/")
9395 (synopsis "Lisp frontend to Python")
9396 (description
9397 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9398its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9399Python at your fingertips, in Lisp form.")
9400 (license license:expat)))
9401
9402(define-public python2-hy
9403 (package-with-python2 python-hy))
7a5b944e 9404
81f7f297
EF
9405(define-public python-rauth
9406 (package
9407 (name "python-rauth")
06fe79f2 9408 (version "0.7.3")
81f7f297
EF
9409 (source
9410 (origin
9411 (method url-fetch)
9412 (uri (pypi-uri "rauth" version))
9413 (sha256
9414 (base32
06fe79f2 9415 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
81f7f297
EF
9416 (build-system python-build-system)
9417 (arguments
9418 `(#:test-target "check"))
f22efa01 9419 (propagated-inputs
81f7f297
EF
9420 `(("python-requests" ,python-requests)))
9421 (home-page "https://github.com/litl/rauth")
9422 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9423 (description
9424 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9425provides service wrappers for convenient connection initialization and
9426authenticated session objects providing things like keep-alive.")
0848d8d3
EF
9427 (license license:expat)
9428 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
9429
9430(define-public python2-rauth
0848d8d3
EF
9431 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9432 (package
9433 (inherit base)
00e10c6e 9434 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 9435 ,@(package-native-inputs base))))))
81f7f297 9436
1abe448d
EF
9437(define-public python2-functools32
9438 (package
9439 (name "python2-functools32")
9440 (version "3.2.3-2")
9441 (source
9442 (origin
9443 (method url-fetch)
9444 (uri (pypi-uri "functools32" version))
9445 (sha256
9446 (base32
9447 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9448 (build-system python-build-system)
9449 (arguments
9450 `(#:python ,python-2
9451 #:tests? #f)) ; no test target
1abe448d
EF
9452 (home-page "https://github.com/MiCHiLU/python-functools32")
9453 (synopsis
9454 "Backport of the functools module from Python 3.2.3")
9455 (description
9456 "This package is a backport of the @code{functools} module from Python
94573.2.3 for use with older versions of Python and PyPy.")
9458 (license license:expat)))
9459
550bd98b
MB
9460(define-public python2-subprocess32
9461 (package
9462 (name "python2-subprocess32")
9463 (version "3.2.7")
9464 (source (origin
9465 (method url-fetch)
9466 (uri (pypi-uri "subprocess32" version))
9467 (sha256
9468 (base32
9469 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9470 (patches
9471 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9472 (build-system python-build-system)
9473 (arguments
9474 `(#:python ,python-2
9475 #:phases
9476 (modify-phases %standard-phases
9477 (add-after 'unpack 'patch-/bin/sh
9478 (lambda _
9479 (substitute* '("subprocess32.py"
9480 "test_subprocess32.py")
9481 (("/bin/sh") (which "sh")))
9482 #t))
9483 (delete 'check)
9484 (add-after 'install 'check
9485 (lambda* (#:key inputs outputs #:allow-other-keys)
9486 ;; For some reason this package fails to import
9487 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9488 ;; directory. Running tests after install is easier.
9489 (add-installed-pythonpath inputs outputs)
9490 (zero? (system* "python" "test_subprocess32.py")))))))
9491 (home-page "https://github.com/google/python-subprocess32")
9492 (synopsis "Backport of the subprocess module from Python 3.2")
9493 (description
9494 "This is a backport of the @code{subprocess} standard library module
9495from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9496new features. On POSIX systems it is guaranteed to be reliable when used
9497in threaded applications. It includes timeout support from Python 3.3 but
9498otherwise matches 3.2’s API.")
9499 (license license:psfl)))
9500
877889f3 9501(define-public python2-futures
7a5b944e 9502 (package
877889f3 9503 (name "python2-futures")
e17a1248 9504 (version "3.0.5")
7a5b944e
EF
9505 (source
9506 (origin
9507 (method url-fetch)
9508 (uri (pypi-uri "futures" version))
9509 (sha256
9510 (base32
e17a1248 9511 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7a5b944e 9512 (build-system python-build-system)
877889f3 9513 (arguments `(#:python ,python-2))
7a5b944e
EF
9514 (home-page "https://github.com/agronholm/pythonfutures")
9515 (synopsis
9516 "Backport of the concurrent.futures package from Python 3.2")
9517 (description
9518 "The concurrent.futures module provides a high-level interface for
9519asynchronously executing callables. This package backports the
9520concurrent.futures package from Python 3.2")
3f641af0 9521 (license license:bsd-3)))
7a5b944e 9522
5cb2fe44
EF
9523(define-public python-promise
9524 (package
9525 (name "python-promise")
9526 (version "0.4.2")
9527 (source
9528 (origin
9529 (method url-fetch)
9530 (uri (pypi-uri "promise" version))
9531 (sha256
9532 (base32
9533 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9534 (build-system python-build-system)
9535 ;; Tests wants python-futures, which is a python2 only program, and
9536 ;; can't be found by python-promise at test time.
9537 (arguments `(#:tests? #f))
9538 (home-page "https://github.com/syrusakbary/promise")
9539 (synopsis "Promises/A+ implementation for Python")
9540 (description
9541 "Promises/A+ implementation for Python")
9542 (properties `((python2-variant . ,(delay python2-promise))))
9543 (license license:expat)))
9544
9545(define-public python2-promise
9546 (let ((promise (package-with-python2
9547 (strip-python2-variant python-promise))))
9548 (package (inherit promise)
9549 (arguments (substitute-keyword-arguments (package-arguments promise)
9550 ((#:tests? _) #t)))
9551 (native-inputs
9552 `(("python2-futures" ,python2-futures)
9553 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
9554 ,@(package-native-inputs promise))))))
9555
c18f6368
EF
9556(define-public python-urllib3
9557 (package
9558 (name "python-urllib3")
6178274d 9559 (version "1.18.1")
c18f6368
EF
9560 (source
9561 (origin
9562 (method url-fetch)
9563 (uri (pypi-uri "urllib3" version))
9564 (sha256
9565 (base32
6178274d 9566 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
9567 (build-system python-build-system)
9568 (arguments `(#:tests? #f))
9569 (native-inputs
f3b98f4f 9570 `(;; some packages for tests
c18f6368
EF
9571 ("python-nose" ,python-nose)
9572 ("python-mock" ,python-mock)
9573 ("python-tornado" ,python-tornado)))
9574 (propagated-inputs
8322749a 9575 `(;; extra packages for https security
c18f6368
EF
9576 ("python-certifi" ,python-certifi)
9577 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9578 ("python-pyasn1" ,python-pyasn1)
9579 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 9580 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
9581 (synopsis "HTTP library with thread-safe connection pooling")
9582 (description
9583 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9584can reuse the same socket connection for multiple requests, it can POST files,
9585supports url redirection and retries, and also gzip and deflate decoding.")
9586 (license license:expat)))
9587
9588(define-public python2-urllib3
9589 (package-with-python2 python-urllib3))
2b2f2fc1
DT
9590
9591(define-public python-colorama
9592 (package
9593 (name "python-colorama")
f92576f9 9594 (version "0.3.7")
2b2f2fc1
DT
9595 (source
9596 (origin
9597 (method url-fetch)
9598 (uri (pypi-uri "colorama" version))
9599 (sha256
9600 (base32
f92576f9 9601 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
2b2f2fc1 9602 (build-system python-build-system)
46e110cc 9603 (synopsis "Colored terminal text rendering for Python")
2b2f2fc1
DT
9604 (description "Colorama is a Python library for rendering colored terminal
9605text.")
9606 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 9607 (license license:bsd-3)))
2b2f2fc1
DT
9608
9609(define-public python2-colorama
9610 (package-with-python2 python-colorama))
f5bcec6e
DT
9611
9612(define-public python-rsa
9613 (package
9614 (name "python-rsa")
ecd68c53 9615 (version "3.4.2")
f5bcec6e
DT
9616 (source
9617 (origin
9618 (method url-fetch)
9619 (uri (pypi-uri "rsa" version))
9620 (sha256
9621 (base32
ecd68c53 9622 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 9623 (build-system python-build-system)
f22efa01 9624 (propagated-inputs
f3b98f4f 9625 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
9626 (synopsis "Pure-Python RSA implementation")
9627 (description "Python-RSA is a pure-Python RSA implementation. It supports
9628encryption and decryption, signing and verifying signatures, and key
9629generation according to PKCS#1 version 1.5. It can be used as a Python
9630library as well as on the command line.")
9631 (home-page "http://stuvel.eu/rsa")
3f641af0 9632 (license license:asl2.0)))
f5bcec6e
DT
9633
9634(define-public python2-rsa
9635 (package-with-python2 python-rsa))
c0aacfa5
DT
9636
9637(define-public python-pluggy
9638 (package
9639 (name "python-pluggy")
9640 (version "0.3.1")
9641 (source
9642 (origin
9643 (method url-fetch)
9644 (uri (pypi-uri "pluggy" version))
9645 (sha256
9646 (base32
9647 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9648 (build-system python-build-system)
c0aacfa5
DT
9649 (synopsis "Plugin and hook calling mechanism for Python")
9650 (description "Pluggy is an extraction of the plugin manager as used by
9651Pytest but stripped of Pytest specific details.")
9652 (home-page "https://pypi.python.org/pypi/pluggy")
9653 (license license:expat)))
9654
9655(define-public python2-pluggy
9656 (package-with-python2 python-pluggy))
a4af21ca
DT
9657
9658(define-public python-tox
9659 (package
9660 (name "python-tox")
9661 (version "2.3.1")
9662 (source
9663 (origin
9664 (method url-fetch)
9665 (uri (pypi-uri "tox" version))
9666 (sha256
9667 (base32
9668 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9669 (build-system python-build-system)
9670 (arguments
7ba07edf
HG
9671 ;; FIXME: Tests require pytest-timeout, which itself requires
9672 ;; pytest>=2.8.0 for installation.
a4af21ca 9673 '(#:tests? #f))
482d9591
HG
9674 (propagated-inputs
9675 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 9676 ("python-py" ,python-py)
482d9591 9677 ("python-virtualenv" ,python-virtualenv)))
328bb95d 9678 (native-inputs
7ba07edf
HG
9679 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9680 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
9681 (home-page "http://tox.testrun.org/")
9682 (synopsis "Virtualenv-based automation of test activities")
9683 (description "Tox is a generic virtualenv management and test command line
9684tool. It can be used to check that a package installs correctly with
9685different Python versions and interpreters, or run tests in each type of
9686supported environment, or act as a frontend to continuous integration
9687servers.")
9688 (license license:expat)))
9689
9690(define-public python2-tox
9691 (package-with-python2 python-tox))
ba9da248
DT
9692
9693(define-public python-jmespath
9694 (package
9695 (name "python-jmespath")
9696 (version "0.9.0")
9697 (source
9698 (origin
9699 (method url-fetch)
9700 (uri (pypi-uri "jmespath" version))
9701 (sha256
9702 (base32
9703 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9704 (build-system python-build-system)
52a75a83
MB
9705 (native-inputs
9706 `(("python-nose" ,python-nose)))
ba9da248
DT
9707 (synopsis "JSON Matching Expressions")
9708 (description "JMESPath (pronounced “james path”) is a Python library that
9709allows one to declaratively specify how to extract elements from a JSON
9710document.")
9711 (home-page "https://github.com/jmespath/jmespath.py")
9712 (license license:expat)))
9713
9714(define-public python2-jmespath
9715 (package-with-python2 python-jmespath))
935fcd5c
DT
9716
9717(define-public python-botocore
9718 (package
9719 (name "python-botocore")
d93985fe 9720 (version "1.5.26")
935fcd5c
DT
9721 (source
9722 (origin
9723 (method url-fetch)
9724 (uri (pypi-uri "botocore" version))
9725 (sha256
9726 (base32
d93985fe 9727 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
935fcd5c 9728 (build-system python-build-system)
877fdac9
MB
9729 (arguments
9730 ;; FIXME: Many tests are failing.
9731 '(#:tests? #f))
482d9591 9732 (propagated-inputs
22d7360b 9733 `(("python-dateutil" ,python-dateutil)
935fcd5c 9734 ("python-docutils" ,python-docutils)
482d9591 9735 ("python-jmespath" ,python-jmespath)))
8fa6890b 9736 (native-inputs
482d9591 9737 `(("python-mock" ,python-mock)
935fcd5c 9738 ("python-nose" ,python-nose)
482d9591 9739 ("behave" ,behave)
935fcd5c 9740 ("python-tox" ,python-tox)
482d9591 9741 ("python-wheel" ,python-wheel)))
935fcd5c
DT
9742 (home-page "https://github.com/boto/botocore")
9743 (synopsis "Low-level interface to AWS")
9744 (description "Botocore is a Python library that provides a low-level
9745interface to the Amazon Web Services (AWS) API.")
3f641af0 9746 (license license:asl2.0)))
935fcd5c
DT
9747
9748(define-public python2-botocore
9749 (package-with-python2 python-botocore))
f861b8b8
DT
9750
9751(define-public awscli
9752 (package
9753 (name "awscli")
192b887a 9754 (version "1.11.63")
f861b8b8
DT
9755 (source
9756 (origin
9757 (method url-fetch)
d5ccf71e 9758 (uri (pypi-uri name version))
f861b8b8
DT
9759 (sha256
9760 (base32
192b887a 9761 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
f861b8b8 9762 (build-system python-build-system)
482d9591 9763 (propagated-inputs
f861b8b8 9764 `(("python-colorama" ,python-colorama)
482d9591
HG
9765 ("python-botocore" ,python-botocore)
9766 ("python-s3transfer" ,python-s3transfer)
f861b8b8 9767 ("python-docutils" ,python-docutils)
0cb9fba3 9768 ("python-pyyaml" ,python-pyyaml)
482d9591 9769 ("python-rsa" ,python-rsa)))
619bfd81
MB
9770 (arguments
9771 ;; FIXME: The 'pypi' release does not contain tests.
9772 '(#:tests? #f))
60a8be3a 9773 (home-page "https://aws.amazon.com/cli/")
f861b8b8
DT
9774 (synopsis "Command line client for AWS")
9775 (description "AWS CLI provides a unified command line interface to the
9776Amazon Web Services (AWS) API.")
3f641af0 9777 (license license:asl2.0)))
6a44697d
LF
9778
9779(define-public python-hypothesis
9780 (package
9781 (name "python-hypothesis")
bea6d94d 9782 (version "3.1.0")
6a44697d
LF
9783 (source (origin
9784 (method url-fetch)
9785 (uri (pypi-uri "hypothesis" version))
9786 (sha256
9787 (base32
bea6d94d 9788 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 9789 (build-system python-build-system)
bd100c71 9790 (native-inputs
6a44697d
LF
9791 `(("python-flake8" ,python-flake8)
9792 ("python-pytest" ,python-pytest)))
9793 (synopsis "Library for property based testing")
9794 (description "Hypothesis is a library for testing your Python code against a
9795much larger range of examples than you would ever want to write by hand. It’s
9796based on the Haskell library, Quickcheck, and is designed to integrate
9797seamlessly into your existing Python unit testing work flow.")
9798 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 9799 (license license:mpl2.0)
6f068e08 9800 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
9801
9802(define-public python2-hypothesis
6f068e08
EF
9803 (let ((hypothesis (package-with-python2
9804 (strip-python2-variant python-hypothesis))))
9805 (package (inherit hypothesis)
9806 (native-inputs
bd100c71
MB
9807 `(("python2-enum34" ,python2-enum34)
9808 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
9809
9810(define-public python-pytest-subtesthack
9811 (package
9812 (name "python-pytest-subtesthack")
9813 (version "0.1.1")
9814 (source (origin
9815 (method url-fetch)
9816 (uri (pypi-uri "pytest-subtesthack" version))
9817 (sha256
9818 (base32
9819 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9820 (build-system python-build-system)
7517e73c
LF
9821 (propagated-inputs
9822 `(("python-pytest" ,python-pytest)))
9823 (synopsis "Set-up and tear-down fixtures for unit tests")
9824 (description "This plugin allows you to set up and tear down fixtures within
9825unit test functions that use @code{py.test}. This is useful for using
9826@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9827function multiple times, without setting up or tearing down fixture state as is
9828normally the case.")
9829 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 9830 (license license:unlicense)))
7517e73c
LF
9831
9832(define-public python2-pytest-subtesthack
9833 (package-with-python2 python-pytest-subtesthack))
0bdc1671 9834
7637de23 9835(define-public python-xdo
0bdc1671 9836 (package
7637de23 9837 (name "python-xdo")
e871c332 9838 (version "0.3")
0bdc1671
CAW
9839 (source (origin
9840 (method url-fetch)
9841 (uri (string-append
9842 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9843 "python-xdo_" version ".orig.tar.gz"))
9844 (sha256
9845 (base32
e871c332 9846 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
0bdc1671
CAW
9847 (build-system python-build-system)
9848 (arguments
736cfc10
SB
9849 '(#:phases
9850 (modify-phases %standard-phases
9851 (add-before 'install 'patch-libxdo-path
9852 ;; Hardcode the path of dynamically loaded libxdo library.
9853 (lambda* (#:key inputs #:allow-other-keys)
9854 (let ((libxdo (string-append
9855 (assoc-ref inputs "xdotool")
9856 "/lib/libxdo.so")))
9857 (substitute* "xdo/_xdo.py"
9858 (("find_library\\(\"xdo\"\\)")
9859 (simple-format #f "\"~a\"" libxdo)))
9860 #t))))
9861 #:tests? #f)) ; no tests provided
0b5e0863
SB
9862 (propagated-inputs
9863 `(("python-six" ,python-six)))
0bdc1671
CAW
9864 (inputs
9865 `(("xdotool" ,xdotool)
9866 ("libX11" ,libx11)))
9867 (home-page "https://tracker.debian.org/pkg/python-xdo")
9868 (synopsis "Python library for simulating X11 keyboard/mouse input")
9869 (description "Provides bindings to libxdo for manipulating X11 via simulated
9870input. (Note that this is mostly a legacy library; you may wish to look at
9871python-xdo for newer bindings.)")
3f641af0 9872 (license license:bsd-3)))
0bdc1671 9873
7637de23
LF
9874(define-public python2-xdo
9875 (package-with-python2 python-xdo))
9876
cb34dc6c
CAW
9877(define-public python-wtforms
9878 (package
9879 (name "python-wtforms")
9880 (version "2.1")
9881 (source
9882 (origin
9883 (method url-fetch)
9884 (uri (pypi-uri "WTForms" version ".zip"))
9885 (sha256
9886 (base32
9887 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9888 (build-system python-build-system)
13c4d874
EF
9889 (arguments
9890 '(#:phases
9891 (modify-phases %standard-phases
9892 (add-after 'unpack 'remove-django-test
9893 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9894 (lambda _
9895 (substitute*
9896 "tests/runtests.py"
9897 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9898 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9899 #t)))))
cb34dc6c
CAW
9900 (native-inputs
9901 `(("unzip" ,unzip)))
9902 (home-page "http://wtforms.simplecodes.com/")
9903 (synopsis
9904 "Form validation and rendering library for Python web development")
9905 (description
9906 "WTForms is a flexible forms validation and rendering library
9907for Python web development. It is very similar to the web form API
9908available in Django, but is a standalone package.")
f210e944 9909 (license license:bsd-3)))
cb34dc6c
CAW
9910
9911(define-public python2-wtforms
f210e944 9912 (package-with-python2 python-wtforms))
50aaec25
DT
9913
9914(define-public python-mako
9915 (package
9916 (name "python-mako")
3753f2e6 9917 (version "1.0.6")
50aaec25
DT
9918 (source
9919 (origin
9920 (method url-fetch)
9921 (uri (pypi-uri "Mako" version))
9922 (sha256
9923 (base32
3753f2e6 9924 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
50aaec25 9925 (build-system python-build-system)
482d9591
HG
9926 (propagated-inputs
9927 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 9928 (native-inputs
482d9591 9929 `(("python-mock" ,python-mock)
e435af5c
MB
9930 ("python-nose" ,python-nose)
9931 ("python-pytest" ,python-pytest)))
50aaec25
DT
9932 (home-page "http://www.makotemplates.org/")
9933 (synopsis "Templating language for Python")
9934 (description "Mako is a templating language for Python that compiles
9935templates into Python modules.")
f210e944 9936 (license license:expat)))
50aaec25
DT
9937
9938(define-public python2-mako
f210e944 9939 (package-with-python2 python-mako))
ae00a41f
CAW
9940
9941(define-public python-waitress
9942 (package
9943 (name "python-waitress")
9944 (version "0.8.10")
9945 (source
9946 (origin
9947 (method url-fetch)
9948 (uri (pypi-uri "waitress" version))
9949 (sha256
9950 (base32
9951 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9952 (build-system python-build-system)
9953 (home-page "https://github.com/Pylons/waitress")
9954 (synopsis "Waitress WSGI server")
9955 (description "Waitress is meant to be a production-quality pure-Python WSGI
9956server with very acceptable performance.")
f210e944 9957 (license license:zpl2.1)))
ae00a41f
CAW
9958
9959(define-public python2-waitress
f210e944 9960 (package-with-python2 python-waitress))
778a284b
CAW
9961
9962(define-public python-wsgiproxy2
9963 (package
9964 (name "python-wsgiproxy2")
9965 (version "0.4.2")
9966 (source
9967 (origin
9968 (method url-fetch)
9969 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9970 (sha256
9971 (base32
9972 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9973 (build-system python-build-system)
e359b31a
LF
9974 (arguments
9975 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9976 ;; support Python 3:
9977 ;; https://github.com/benoitc/restkit/issues/140
9978 #:tests? #f))
778a284b
CAW
9979 (native-inputs
9980 `(("unzip" ,unzip)
9981 ("python-nose" ,python-nose)
9982 ("python-coverage" ,python-coverage)))
9983 (propagated-inputs
9984 `(("python-six" ,python-six)
9985 ("python-webob" ,python-webob)))
9986 (home-page
9987 "https://github.com/gawel/WSGIProxy2/")
9988 (synopsis "WSGI Proxy with various http client backends")
9989 (description "WSGI turns HTTP requests into WSGI function calls.
9990WSGIProxy turns WSGI function calls into HTTP requests.
9991It also includes code to sign requests and pass private data,
9992and to spawn subprocesses to handle requests.")
f210e944 9993 (license license:expat)))
778a284b
CAW
9994
9995(define-public python2-wsgiproxy2
f210e944 9996 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
9997
9998(define-public python-pastedeploy
9999 (package
10000 (name "python-pastedeploy")
10001 (version "1.5.2")
10002 (source
10003 (origin
10004 (method url-fetch)
10005 (uri (pypi-uri "PasteDeploy" version))
10006 (sha256
10007 (base32
10008 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
10009 (build-system python-build-system)
10010 (native-inputs
10011 `(("python-nose" ,python-nose)))
bb7518b1
CAW
10012 (home-page "http://pythonpaste.org/deploy/")
10013 (synopsis
10014 "Load, configure, and compose WSGI applications and servers")
10015 (description
10016 "This tool provides code to load WSGI applications and servers from URIs;
10017these URIs can refer to Python Eggs for INI-style configuration files. Paste
10018Script provides commands to serve applications based on this configuration
10019file.")
10020 (license license:expat)))
10021
10022(define-public python2-pastedeploy
10023 (package-with-python2 python-pastedeploy))
1cf53652 10024
c4a7904c
CAW
10025(define-public python-paste
10026 (package
10027 (name "python-paste")
ba1731da 10028 (version "2.0.3")
c4a7904c
CAW
10029 (source
10030 (origin
10031 (method url-fetch)
10032 (uri (pypi-uri "Paste" version))
10033 (sha256
10034 (base32
ba1731da 10035 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
fc1adab1
AK
10036 (patches (search-patches "python-paste-remove-website-test.patch"
10037 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
10038 (build-system python-build-system)
10039 (native-inputs
10040 `(("python-nose" ,python-nose)))
10041 (propagated-inputs
f3b98f4f 10042 `(("python-six" ,python-six)))
c4a7904c
CAW
10043 (home-page "http://pythonpaste.org")
10044 (synopsis
10045 "Python web development tools, focusing on WSGI")
10046 (description
10047 "Paste provides a variety of web development tools and middleware which
10048can be nested together to build web applications. Paste's design closely
10049follows ideas flowing from WSGI (Web Standard Gateway Interface).")
ba1731da 10050 (license license:expat)))
c4a7904c
CAW
10051
10052(define-public python2-paste
ba1731da 10053 (package-with-python2 python-paste))
c4a7904c 10054
a8f20f63
CAW
10055(define-public python-pastescript
10056 (package
10057 (name "python-pastescript")
10058 (version "2.0.2")
10059 (source
10060 (origin
10061 (method url-fetch)
10062 (uri (pypi-uri "PasteScript" version))
10063 (sha256
10064 (base32
10065 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
10066 (build-system python-build-system)
10067 (native-inputs
10068 `(("python-nose" ,python-nose)))
10069 (propagated-inputs
f3b98f4f 10070 `(("python-paste" ,python-paste)
a8f20f63
CAW
10071 ("python-pastedeploy" ,python-pastedeploy)))
10072 (home-page "http://pythonpaste.org/script/")
10073 (arguments
10074 '(;; Unfortunately, this requires the latest unittest2,
10075 ;; but that requires traceback2 which requires linecache2 which requires
10076 ;; unittest2. So we're skipping tests for now.
10077 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
10078 ;; so in theory we could get around this situation somehow.)
10079 #:tests? #f))
10080 (synopsis
10081 "Pluggable command line tool for serving web applications and more")
10082 (description
10083 "PasteScript is a plugin-friendly command line tool which provides a
10084variety of features, from launching web applications to bootstrapping project
10085layouts.")
10086 (license license:expat)))
10087
10088(define-public python2-pastescript
10089 (package-with-python2 python-pastescript))
10090
1cf53652
CAW
10091(define-public python-pyquery
10092 (package
10093 (name "python-pyquery")
ab0c3429 10094 (version "1.2.17")
1cf53652
CAW
10095 (source
10096 (origin
10097 (method url-fetch)
10098 (uri (pypi-uri "pyquery" version))
10099 (sha256
10100 (base32
ab0c3429 10101 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
1cf53652 10102 (build-system python-build-system)
2ddbfa8c
LF
10103 (native-inputs
10104 `(("python-webob" ,python-webob)
10105 ("python-webtest" ,python-webtest)))
1cf53652
CAW
10106 (propagated-inputs
10107 `(("python-lxml" ,python-lxml)
10108 ("python-cssselect" ,python-cssselect)))
10109 (home-page "https://github.com/gawel/pyquery")
10110 (synopsis "Make jQuery-like queries on xml documents")
10111 (description "pyquery allows you to make jQuery queries on xml documents.
10112The API is as much as possible the similar to jQuery. pyquery uses lxml for
10113fast xml and html manipulation.")
f210e944 10114 (license license:bsd-3)))
1cf53652
CAW
10115
10116(define-public python2-pyquery
f210e944 10117 (package-with-python2 python-pyquery))
aa6313d6
CAW
10118
10119(define-public python-webtest
10120 (package
10121 (name "python-webtest")
10122 (version "2.0.20")
10123 (source
10124 (origin
10125 (method url-fetch)
10126 (uri (pypi-uri "WebTest" version))
10127 (sha256
10128 (base32
10129 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
10130 (build-system python-build-system)
10131 (arguments
10132 `(;; Unfortunately we have to disable tests!
10133 ;; This release of WebTest is pinned to python-nose < 1.3,
10134 ;; but older versions of python-nose are plagued with the following
10135 ;; bug(s), which rears its ugly head during test execution:
10136 ;; https://github.com/nose-devs/nose/issues/759
10137 ;; https://github.com/nose-devs/nose/pull/811
10138 #:tests? #f))
10139 ;; Commented out code is no good, but in this case, once tests
10140 ;; are ready to be enabled again, we should put the following
10141 ;; in place:
10142 ;; (native-inputs
10143 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
10144 ;; ; but see above comment
10145 ;; ("python-coverage" ,python-coverage)
10146 ;; ("python-mock" ,python-mock)
10147 ;; ("python-pastedeploy" ,python-pastedeploy)
10148 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
10149 ;; ("python-pyquery" ,python-pyquery)))
10150 (propagated-inputs
10151 `(("python-waitress" ,python-waitress)
10152 ("python-webob" ,python-webob)
10153 ("python-six" ,python-six)
10154 ("python-beautifulsoup4" ,python-beautifulsoup4)))
10155 (home-page "http://webtest.pythonpaste.org/")
10156 (synopsis "Helper to test WSGI applications")
10157 (description "Webtest allows you to test your Python web applications
10158without starting an HTTP server. It supports anything that supports the
10159minimum of WSGI.")
f210e944 10160 (license license:expat)))
aa6313d6
CAW
10161
10162(define-public python2-webtest
f210e944 10163 (package-with-python2 python-webtest))
4cb122cd
CAW
10164
10165(define-public python-anyjson
10166 (package
10167 (name "python-anyjson")
10168 (version "0.3.3")
10169 (source
10170 (origin
10171 (method url-fetch)
10172 (uri (pypi-uri "anyjson" version))
10173 (sha256
10174 (base32
10175 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
10176 (build-system python-build-system)
10177 (arguments
10178 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
10179 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
10180 ;; whatever) so this transformation needs to be done before the tests
10181 ;; can be run. Maybe we could add a build step to transform beforehand
10182 ;; but it could be annoying/difficult.
10183 ;; We can enable tests for the Python 2 version, though, and do below.
10184 #:tests? #f))
10185 (home-page "http://bitbucket.org/runeh/anyjson/")
10186 (synopsis
10187 "Wraps best available JSON implementation in a common interface")
10188 (description
10189 "Anyjson loads whichever is the fastest JSON module installed
10190and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 10191 (license license:bsd-3)
4cb122cd
CAW
10192 (properties `((python2-variant . ,(delay python2-anyjson))))))
10193
10194(define-public python2-anyjson
10195 (let ((anyjson (package-with-python2
10196 (strip-python2-variant python-anyjson))))
10197 (package
10198 (inherit anyjson)
10199 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10200 #:tests? #t
10201 ,@(package-arguments anyjson)))
00e10c6e 10202 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
10203
10204(define-public python-amqp
10205 (package
10206 (name "python-amqp")
10207 (version "1.4.9")
10208 (source
10209 (origin
10210 (method url-fetch)
10211 (uri (pypi-uri "amqp" version))
10212 (sha256
10213 (base32
10214 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
10215 (build-system python-build-system)
10216 (native-inputs
10217 `(("python-nose" ,python-nose)
10218 ("python-mock" ,python-mock)))
7bf837fd 10219 (home-page "https://github.com/celery/py-amqp")
8dfceab7
CAW
10220 (synopsis
10221 "Low-level AMQP client for Python (fork of amqplib)")
10222 (description
10223 "This is a fork of amqplib which was originally written by Barry Pederson.
10224It is maintained by the Celery project, and used by kombu as a pure python
10225alternative when librabbitmq is not available.")
3f641af0 10226 (license license:lgpl2.1+)
8dfceab7
CAW
10227 (properties `((python2-variant . ,(delay python2-amqp))))))
10228
10229(define-public python2-amqp
10230 (let ((amqp (package-with-python2
10231 (strip-python2-variant python-amqp))))
10232 (package
10233 (inherit amqp)
10234 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10235 ;; unmaintained. Weirdly, does not do this on the python 3
10236 ;; version?
10237 #:tests? #f
00e10c6e 10238 ,@(package-arguments amqp))))))
7d387305
CAW
10239
10240(define-public python-kombu
10241 (package
10242 (name "python-kombu")
0cb59822 10243 (version "3.0.37")
7d387305
CAW
10244 (source
10245 (origin
10246 (method url-fetch)
10247 (uri (pypi-uri "kombu" version))
10248 (sha256
10249 (base32
0cb59822 10250 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
10251 (build-system python-build-system)
10252 (native-inputs
10253 `(("python-mock" ,python-mock)
10254 ("python-nose" ,python-nose)))
10255 (propagated-inputs
10256 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
10257 ("python-amqp" ,python-amqp)
10258 ("python-redis" ,python-redis)))
7d387305
CAW
10259 (home-page "http://kombu.readthedocs.org")
10260 (synopsis "Message passing library for Python")
10261 (description "The aim of Kombu is to make messaging in Python as easy as
10262possible by providing an idiomatic high-level interface for the AMQ protocol,
10263and also provide proven and tested solutions to common messaging problems.
10264AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10265message orientation, queuing, routing, reliability and security, for which the
10266RabbitMQ messaging server is the most popular implementation.")
3f641af0 10267 (license license:bsd-3)
7d387305
CAW
10268 (properties `((python2-variant . ,(delay python2-kombu))))))
10269
10270(define-public python2-kombu
10271 (let ((kombu (package-with-python2
10272 (strip-python2-variant python-kombu))))
10273 (package
10274 (inherit kombu)
752eb9e0
MB
10275 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10276 ;; It works fine on the python3 variant.
10277 #:tests? #f
10278 ,@(package-arguments kombu)))
328bb95d
HG
10279 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10280 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
10281
10282(define-public python-billiard
10283 (package
10284 (name "python-billiard")
a6bb9e44 10285 (version "3.3.0.23")
b6f0b9fb
CAW
10286 (source
10287 (origin
10288 (method url-fetch)
10289 (uri (pypi-uri "billiard" version))
10290 (sha256
10291 (base32
a6bb9e44 10292 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
10293 (build-system python-build-system)
10294 (native-inputs
10295 `(("python-nose" ,python-nose)))
7bf837fd 10296 (home-page "https://github.com/celery/billiard")
b6f0b9fb
CAW
10297 (synopsis
10298 "Python multiprocessing fork with improvements and bugfixes")
10299 (description
10300 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10301multiprocessing package itself is a renamed and updated version of R Oudkerk's
10302pyprocessing package. This standalone variant is intended to be compatible with
10303Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 10304 (license license:bsd-3)
b6f0b9fb
CAW
10305 (properties `((python2-variant . ,(delay python2-billiard))))))
10306
10307(define-public python2-billiard
10308 (let ((billiard (package-with-python2
10309 (strip-python2-variant python-billiard))))
10310 (package
10311 (inherit billiard)
00e10c6e 10312 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
10313 ("python2-mock" ,python2-mock)
10314 ,@(package-native-inputs billiard))))))
22df6419
CAW
10315
10316(define-public python-celery
10317 (package
10318 (name "python-celery")
9ebe87fe 10319 (version "3.1.24")
22df6419
CAW
10320 (source
10321 (origin
10322 (method url-fetch)
10323 (uri (pypi-uri "celery" version))
10324 (sha256
10325 (base32
9ebe87fe 10326 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 10327 (build-system python-build-system)
9ebe87fe
LF
10328 (arguments
10329 `(#:phases
10330 (modify-phases %standard-phases
10331 ;; These tests break with Python 3.5:
10332 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10333 (replace 'check
10334 (lambda _
10335 (zero?
10336 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
10337 (native-inputs
10338 `(("python-nose" ,python-nose)))
f22efa01 10339 (propagated-inputs
22df6419
CAW
10340 `(("python-pytz" ,python-pytz)
10341 ("python-billiard" ,python-billiard)
10342 ("python-kombu" ,python-kombu)))
10343 (home-page "http://celeryproject.org")
10344 (synopsis "Distributed Task Queue")
10345 (description "Celery is an asynchronous task queue/job queue based on
10346distributed message passing. It is focused on real-time operation, but
10347supports scheduling as well. The execution units, called tasks, are executed
10348concurrently on a single or more worker servers using multiprocessing,
10349Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10350synchronously (wait until ready).")
3f641af0 10351 (license license:bsd-3)
22df6419
CAW
10352 (properties `((python2-variant . ,(delay python2-celery))))))
10353
10354(define-public python2-celery
10355 (let ((celery (package-with-python2
10356 (strip-python2-variant python-celery))))
10357 (package
10358 (inherit celery)
00e10c6e 10359 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
10360 ("python2-mock" ,python2-mock)
10361 ,@(package-native-inputs celery))))))
97e32948
CAW
10362
10363(define-public python-translitcodec
10364 (package
10365 (name "python-translitcodec")
10366 (version "0.4.0")
10367 (source
10368 (origin
10369 (method url-fetch)
10370 (uri (pypi-uri "translitcodec" version))
10371 (sha256
10372 (base32
10373 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10374 (build-system python-build-system)
10375 (arguments
10376 `(#:tests? #f)) ; no tests provided
10377 (home-page
10378 "https://github.com/claudep/translitcodec")
10379 (synopsis
10380 "Unicode to 8-bit charset transliteration codec")
10381 (description
10382 "This package contains codecs for transliterating ISO 10646 texts into
10383best-effort representations using smaller coded character sets (ASCII,
10384ISO 8859, etc.).")
f210e944 10385 (license license:expat)))
97e32948
CAW
10386
10387(define-public python2-translitcodec
f210e944 10388 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
10389
10390(define-public python-editor
10391 (package
10392 (name "python-editor")
10393 (version "0.5")
10394 (source
10395 (origin
10396 (method url-fetch)
10397 (uri (pypi-uri "python-editor" version))
10398 (sha256
10399 (base32
10400 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10401 (build-system python-build-system)
10402 (home-page
10403 "https://github.com/fmoo/python-editor")
10404 (synopsis
10405 "Programmatically open an editor, capture the result")
10406 (description
10407 "python-editor is a library that provides the editor module for
10408programmatically interfacing with your system's $EDITOR.")
f210e944 10409 (license license:asl2.0)))
0c3b90d4
CAW
10410
10411(define-public python2-editor
f210e944 10412 (package-with-python2 python-editor))
3276517c
LF
10413
10414(define-public python-sphinxcontrib-programoutput
10415 (package
10416 (name "python-sphinxcontrib-programoutput")
b9ce9eca 10417 (version "0.10")
3276517c
LF
10418 (source (origin
10419 (method url-fetch)
10420 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10421 (sha256
10422 (base32
b9ce9eca 10423 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
3276517c 10424 (build-system python-build-system)
e2cb140e
MB
10425 (arguments
10426 ;; FIXME: Many tests are failing and the upstream is gone.
10427 '(#:tests? #f))
3276517c 10428 (propagated-inputs
a0a09859 10429 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
10430 (synopsis "Sphinx extension to include program output")
10431 (description "A Sphinx extension to literally insert the output of arbitrary
10432commands into documents, helping you to keep your command examples up to date.")
10433 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 10434 (license license:bsd-2)))
3276517c
LF
10435
10436(define-public python2-sphinxcontrib-programoutput
f210e944 10437 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
10438
10439(define-public python-sphinx-repoze-autointerface
10440 (package
10441 (name "python-sphinx-repoze-autointerface")
328ae341 10442 (version "0.8")
548d7165
LF
10443 (source (origin
10444 (method url-fetch)
10445 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10446 (sha256
10447 (base32
328ae341 10448 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165 10449 (build-system python-build-system)
5b3c3d4b 10450 (arguments '(#:tests? #f)) ; No tests.
548d7165 10451 (propagated-inputs
47c7dc4a 10452 `(("python-sphinx" ,python-sphinx)
548d7165
LF
10453 ("python-zope-interface" ,python-zope-interface)))
10454 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10455 (description "This package defines an extension for the Sphinx documentation
10456system. The extension allows generation of API documentation by
10457introspection of @code{zope.interface} instances in code.")
10458 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 10459 (license license:repoze)))
548d7165
LF
10460
10461(define-public python2-sphinx-repoze-autointerface
10462 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
10463
10464(define-public python-psycopg2
10465 (package
10466 (name "python-psycopg2")
8e718963 10467 (version "2.6.2")
b31fbea5
DM
10468 (source
10469 (origin
10470 (method url-fetch)
10471 (uri (pypi-uri "psycopg2" version))
10472 (sha256
10473 (base32
8e718963 10474 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
b31fbea5
DM
10475 (build-system python-build-system)
10476 (arguments
10477 ;; Tests would require a postgresql database "psycopg2_test"
10478 ;; and a running postgresql database management service.
10479 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10480 (inputs
10481 `(("postgresql" ,postgresql))) ; libpq
10482 (home-page "http://initd.org/psycopg/")
10483 (synopsis "Python PostgreSQL adapter")
10484 (description
10485 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 10486 (license license:lgpl3+)))
b31fbea5
DM
10487
10488(define-public python2-psycopg2
f210e944 10489 (package-with-python2 python-psycopg2))
eed1a61f
LF
10490
10491(define-public python-vobject
10492 (package
10493 (name "python-vobject")
e00a5909 10494 (version "0.9.5")
eed1a61f
LF
10495 (source (origin
10496 (method url-fetch)
10497 (uri (pypi-uri "vobject" version))
10498 (sha256
10499 (base32
e00a5909 10500 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
eed1a61f 10501 (build-system python-build-system)
a9871b7b
LF
10502 (arguments
10503 '(;; The test suite relies on some non-portable Windows interfaces.
10504 #:tests? #f))
f22efa01 10505 (propagated-inputs
22d7360b 10506 `(("python-dateutil" ,python-dateutil)
eed1a61f
LF
10507 ("python-pyicu" ,python-pyicu)))
10508 (synopsis "Parse and generate vCard and vCalendar files")
10509 (description "Vobject is intended to be a full featured Python package for
10510parsing and generating vCard and vCalendar files. Currently, iCalendar files
10511are supported and well tested. vCard 3.0 files are supported, and all data
10512should be imported, but only a few components are understood in a sophisticated
10513way.")
10514 (home-page "http://eventable.github.io/vobject/")
f210e944 10515 (license license:asl2.0)))
eed1a61f
LF
10516
10517(define-public python2-vobject
f210e944 10518 (package-with-python2 python-vobject))
cedac813
LF
10519
10520(define-public python-munkres
10521 (package
10522 (name "python-munkres")
38e81a2c 10523 (version "1.0.8")
cedac813
LF
10524 (source (origin
10525 (method url-fetch)
10526 (uri (pypi-uri "munkres" version))
10527 (sha256
10528 (base32
38e81a2c 10529 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
10530 (build-system python-build-system)
10531 (arguments
10532 '(#:tests? #f)) ; no test suite
10533 (home-page "http://software.clapper.org/munkres/")
10534 (synopsis "Implementation of the Munkres algorithm")
10535 (description "The Munkres module provides an implementation of the Munkres
10536algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10537useful for solving the Assignment Problem.")
3f641af0 10538 (license license:bsd-3)))
cedac813
LF
10539
10540(define-public python2-munkres
10541 (package-with-python2 python-munkres))
f3b3d78f
LF
10542
10543(define-public python-flask
10544 (package
10545 (name "python-flask")
c6c80104 10546 (version "0.11.1")
f3b3d78f
LF
10547 (source (origin
10548 (method url-fetch)
10549 (uri (pypi-uri "Flask" version))
10550 (sha256
10551 (base32
c6c80104 10552 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
10553 (build-system python-build-system)
10554 (propagated-inputs
10555 `(("python-itsdangerous" ,python-itsdangerous)
10556 ("python-jinja2" ,python-jinja2)
8f35c030 10557 ("python-click" ,python-click)
f3b3d78f
LF
10558 ("python-werkzeug" ,python-werkzeug)))
10559 (home-page "https://github.com/mitsuhiko/flask/")
10560 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10561 (description "Flask is a micro web framework based on the Werkzeug toolkit
10562and Jinja2 template engine. It is called a micro framework because it does not
10563presume or force a developer to use a particular tool or library.")
f210e944 10564 (license license:bsd-3)))
f3b3d78f
LF
10565
10566(define-public python2-flask
f210e944 10567 (package-with-python2 python-flask))
603d665b 10568
a7ad802b 10569(define-public python-flask-wtf
10570 (package
10571 (name "python-flask-wtf")
10572 (version "0.13.1")
10573 (source
10574 (origin
10575 (method url-fetch)
10576 (uri (pypi-uri "Flask-WTF" version))
10577 (sha256
10578 (base32
10579 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10580 (build-system python-build-system)
d296d300
MB
10581 (arguments
10582 '(#:phases
10583 (modify-phases %standard-phases
10584 (add-before 'check 'drop-failing-test
10585 (lambda _
10586 ;; FIXME: This file tries resolving an external server, which
10587 ;; fails. Try to patch out the offending section instead of
10588 ;; deleting the whole thing.
10589 (delete-file "tests/test_recaptcha.py")
10590 #t)))))
a7ad802b 10591 (propagated-inputs
10592 `(("python-flask-babel" ,python-flask-babel)
10593 ("python-babel" ,python-babel)
10594 ("python-wtforms" ,python-wtforms)))
10595 (native-inputs
10596 `(("python-nose" ,python-nose)))
10597 (home-page "https://github.com/lepture/flask-wtf")
10598 (synopsis "Simple integration of Flask and WTForms")
10599 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10600upload, and reCAPTCHA.")
10601 (license license:bsd-3)))
10602
10603(define-public python2-flask-wtf
10604 (package-with-python2 python-flask-wtf))
10605
a2c7d88e 10606(define-public python-flask-multistatic
10607 (package
10608 (name "python-flask-multistatic")
10609 (version "1.0")
10610 (source
10611 (origin
10612 (method url-fetch)
10613 (uri (pypi-uri "flask-multistatic" version))
10614 (sha256
10615 (base32
10616 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10617 (build-system python-build-system)
10618 (propagated-inputs
10619 `(("python-flask" ,python-flask)))
10620 (home-page "https://pagure.io/flask-multistatic")
10621 (synopsis "Flask plugin to allow overriding static files")
10622 (description "@code{flask-multistatic} is a flask plugin that adds support
10623for overriding static files.")
10624 (license license:gpl3+)))
10625
10626(define-public python2-flask-multistatic
10627 (package-with-python2 python-flask-multistatic))
10628
603d665b
LF
10629(define-public python-cookies
10630 (package
10631 (name "python-cookies")
10632 (version "2.2.1")
10633 (source (origin
10634 (method url-fetch)
10635 (uri (pypi-uri "cookies" version))
10636 (sha256
10637 (base32
10638 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10639 (build-system python-build-system)
10640 (arguments
10641 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10642 #:tests? #f))
10643 (native-inputs
10644 `(("python-pytest" ,python2-pytest)))
10645 (synopsis "HTTP cookie parser and renderer")
10646 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10647Python.")
10648 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 10649 (license license:expat)))
603d665b
LF
10650
10651(define-public python2-cookies
f210e944 10652 (package-with-python2 python-cookies))
0efde7d6
LF
10653
10654(define-public python-responses
10655 (package
10656 (name "python-responses")
10657 (version "0.5.1")
10658 (source (origin
10659 (method url-fetch)
10660 (uri (pypi-uri "responses" version))
10661 (sha256
10662 (base32
10663 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10664 (build-system python-build-system)
10665 (arguments
10666 `(;; Test suite is not distributed:
10667 ;; https://github.com/getsentry/responses/issues/38
10668 #:tests? #f))
10669 (native-inputs
d8ea5f2f 10670 `(("python-mock" ,python-mock)))
0efde7d6
LF
10671 (propagated-inputs
10672 `(("python-requests" ,python-requests)
d8ea5f2f 10673 ("python-cookies" ,python-cookies)
0efde7d6
LF
10674 ("python-six" ,python-six)))
10675 (home-page "https://github.com/getsentry/responses")
10676 (synopsis "Utility for mocking out the `requests` Python library")
10677 (description "A utility library for mocking out the `requests` Python
10678library.")
f210e944 10679 (license license:asl2.0)))
0efde7d6
LF
10680
10681(define-public python2-responses
f210e944 10682 (package-with-python2 python-responses))
76b94885 10683
b7afd018
RW
10684(define-public python-whoosh
10685 (package
10686 (name "python-whoosh")
10687 (version "2.7.4")
10688 (source
10689 (origin
10690 (method url-fetch)
10691 (uri (pypi-uri "Whoosh" version))
10692 (sha256
10693 (base32
10694 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10695 (build-system python-build-system)
10696 (native-inputs
f3b98f4f 10697 `(("python-pytest" ,python-pytest)))
b7afd018
RW
10698 (home-page "http://bitbucket.org/mchaput/whoosh")
10699 (synopsis "Full text indexing, search, and spell checking library")
10700 (description
10701 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10702checking library.")
10703 (license license:bsd-2)))
10704
10705(define-public python2-whoosh
10706 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10707 (package (inherit whoosh)
10708 (propagated-inputs
10709 `(("python2-backport-ssl-match-hostname"
10710 ,python2-backport-ssl-match-hostname)
10711 ,@(package-propagated-inputs whoosh))))))
10712
76b94885
LF
10713(define-public python-pathlib
10714 (package
10715 (name "python-pathlib")
10716 (version "1.0.1")
10717 (source (origin
10718 (method url-fetch)
10719 (uri (pypi-uri "pathlib" version))
10720 (sha256
10721 (base32
10722 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10723 (build-system python-build-system)
92a312dc
RW
10724 ;; The tests depend on the internal "test" module, which does not provide
10725 ;; a stable interface.
10726 (arguments `(#:tests? #f))
76b94885 10727 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
10728 (synopsis "Object-oriented file system paths")
10729 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
10730It offers the following advantages over using string objects:
10731
10732@enumerate
10733@item No more cumbersome use of os and os.path functions. Everything can
10734be done easily through operators, attribute accesses, and method calls.
10735@item Embodies the semantics of different path types. For example,
10736comparing Windows paths ignores casing.
10737@item Well-defined semantics, eliminating any inconsistencies or
10738ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
10739@end enumerate
10740
10741Note: In Python 3.4, pathlib is now part of the standard library. For other
10742Python versions please consider python-pathlib2 instead, which tracks the
10743standard library module. This module (python-pathlib) isn't maintained
10744anymore.")
76b94885
LF
10745 (license license:expat)))
10746
10747(define-public python2-pathlib
10748 (package-with-python2 python-pathlib))
25a7db0a 10749
b7703c81
HG
10750(define-public python2-pathlib2
10751 (package
10752 (name "python2-pathlib2")
10753 (version "2.1.0")
10754 (source (origin
10755 (method url-fetch)
10756 (uri (pypi-uri "pathlib2" version))
10757 (sha256
10758 (base32
10759 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10760 (build-system python-build-system)
49a531f5
HG
10761 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10762 ;; version is 3.4 which already includes this package as part of the
10763 ;; standard library.
b7703c81
HG
10764 (arguments
10765 `(#:python ,python-2))
10766 (native-inputs
f3b98f4f 10767 `(("python2-six" ,python2-six)))
b7703c81
HG
10768 (home-page "http://pypi.python.org/pypi/pathlib2/")
10769 (synopsis "Object-oriented file system paths - backport of standard
10770pathlib module")
10771 (description "The goal of pathlib2 is to provide a backport of standard
10772pathlib module which tracks the standard library module, so all the newest
10773features of the standard pathlib can be used also on older Python versions.
10774
10775Pathlib offers a set of classes to handle file system paths. It offers the
10776following advantages over using string objects:
10777
10778@enumerate
10779@item No more cumbersome use of os and os.path functions. Everything can
10780be done easily through operators, attribute accesses, and method calls.
10781@item Embodies the semantics of different path types. For example,
10782comparing Windows paths ignores casing.
10783@item Well-defined semantics, eliminating any inconsistencies or
10784ambiguities (forward vs. backward slashes, etc.).
10785@end enumerate")
10786 (license license:expat)))
10787
25a7db0a
LF
10788(define-public python-jellyfish
10789 (package
10790 (name "python-jellyfish")
8c4964dd 10791 (version "0.5.6")
25a7db0a
LF
10792 (source (origin
10793 (method url-fetch)
10794 (uri (pypi-uri "jellyfish" version))
10795 (sha256
10796 (base32
8c4964dd 10797 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
10798 (build-system python-build-system)
10799 (native-inputs
10800 `(("python-pytest" ,python-pytest)))
10801 (home-page "https://github.com/jamesturk/jellyfish")
10802 (synopsis "Approximate and phonetic matching of strings")
10803 (description "Jellyfish uses a variety of string comparison and phonetic
10804encoding algorithms to do fuzzy string matching.")
3f641af0 10805 (license license:bsd-2)
25a7db0a
LF
10806 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10807
10808(define-public python2-jellyfish
10809 (let ((jellyfish (package-with-python2
10810 (strip-python2-variant python-jellyfish))))
10811 (package (inherit jellyfish)
00e10c6e 10812 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 10813 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
10814
10815(define-public python2-unicodecsv
10816 (package
10817 (name "python2-unicodecsv")
10818 (version "0.14.1")
10819 (source (origin
10820 (method url-fetch)
10821 ;; The test suite is not included in the PyPi release.
10822 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10823 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10824 "archive/" version ".tar.gz"))
10825 (file-name (string-append name "-" version ".tar.gz"))
10826 (sha256
10827 (base32
10828 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10829 (build-system python-build-system)
10830 (arguments
10831 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10832 #:python ,python-2))
10833 (native-inputs
f3b98f4f 10834 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
10835 (home-page "https://github.com/jdunck/python-unicodecsv")
10836 (synopsis "Unicode CSV module for Python 2")
10837 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10838module, adding support for Unicode strings.")
3f641af0 10839 (license license:bsd-2)))
064503aa
LF
10840
10841(define-public python-rarfile
10842 (package
10843 (name "python-rarfile")
67824447 10844 (version "2.8")
064503aa
LF
10845 (source (origin
10846 (method url-fetch)
10847 (uri (pypi-uri "rarfile" version))
10848 (sha256
10849 (base32
67824447 10850 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
10851 (build-system python-build-system)
10852 (arguments
10853 '(#:phases
10854 (modify-phases %standard-phases
10855 (replace 'check
10856 ;; Many tests fail, but the installation proceeds.
10857 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10858 (native-inputs
10859 `(("which" ,which))) ; required for tests
10860 (propagated-inputs
10861 `(("libarchive" ,libarchive)))
10862 (home-page "https://github.com/markokr/rarfile")
10863 (synopsis "RAR archive reader for Python")
10864 (description "This is Python module for RAR archive reading. The interface
10865is made as zipfile like as possible.")
3f641af0 10866 (license license:isc)))
064503aa
LF
10867
10868(define-public python2-rarfile
10869 (package-with-python2 python-rarfile))
daeeea71
CM
10870
10871(define-public python-magic
10872 (package
10873 (name "python-magic")
10874 (version "0.4.3")
10875 (source
10876 (origin
10877 (method url-fetch)
10878 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10879 version ".tar.gz"))
10880 (sha256
10881 (base32
10882 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10883 (file-name (string-append name "-" version "-checkout"))))
10884 (build-system python-build-system)
10885 (arguments
10886 ;; The tests are unreliable, so don't run them. The tests fail
10887 ;; under Python3 because they were written for Python2 and
10888 ;; contain import statements that do not work in Python3. One of
10889 ;; the tests fails under Python2 because its assertions are
10890 ;; overly stringent; it relies on comparing output strings which
10891 ;; are brittle and can change depending on the version of
10892 ;; libmagic being used and the system on which the test is
10893 ;; running. In my case, under GuixSD 0.10.0, only one test
10894 ;; failed, and it seems to have failed only because the version
10895 ;; of libmagic that is packaged in Guix outputs a slightly
10896 ;; different (but not wrong) string than the one that the test
10897 ;; expected.
10898 '(#:tests? #f
10899 #:phases (modify-phases %standard-phases
10900 ;; Replace a specific method call with a hard-coded
10901 ;; path to the necessary libmagic.so file in the
10902 ;; store. If we don't do this, then the method call
10903 ;; will fail to find the libmagic.so file, which in
10904 ;; turn will cause any application using
10905 ;; python-magic to fail.
10906 (add-before 'build 'hard-code-path-to-libmagic
10907 (lambda* (#:key inputs #:allow-other-keys)
10908 (let ((file (assoc-ref inputs "file")))
10909 (substitute* "magic.py"
10910 (("ctypes.util.find_library\\('magic'\\)")
10911 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
10912 #t)))
10913 (add-before 'install 'disable-egg-compression
10914 (lambda _
10915 (let ((port (open-file "setup.cfg" "a")))
10916 (display "\n[easy_install]\nzip_ok = 0\n"
10917 port)
10918 (close-port port)
10919 #t))))))
daeeea71
CM
10920 (inputs
10921 ;; python-magic needs to be able to find libmagic.so.
10922 `(("file" ,file)))
10923 (home-page "https://github.com/ahupp/python-magic")
10924 (synopsis "File type identification using libmagic")
10925 (description
10926 "This module uses ctypes to access the libmagic file type
10927identification library. It makes use of the local magic database and
10928supports both textual and MIME-type output. Note that this module and
10929the python-file module both provide a \"magic.py\" file; these two
10930modules, which are different and were developed separately, both serve
10931the same purpose: to provide Python bindings for libmagic.")
10932 (license license:expat)))
10933
10934(define-public python2-magic
10935 (package-with-python2 python-magic))
12af303f
CM
10936
10937(define-public python2-s3cmd
10938 (package
10939 (name "python2-s3cmd")
10940 (version "1.6.1")
10941 (source
10942 (origin
10943 (method url-fetch)
de67e922 10944 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
10945 "s3cmd-" version ".tar.gz"))
10946 (sha256
10947 (base32
10948 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10949 (build-system python-build-system)
10950 (arguments
10951 ;; s3cmd is written for python2 only and contains no tests.
10952 `(#:python ,python-2
10953 #:tests? #f))
f22efa01 10954 (propagated-inputs
12af303f
CM
10955 `(("python2-dateutil" ,python2-dateutil)
10956 ;; The python-file package also provides a magic.py module.
10957 ;; This is an unfortunate state of affairs; however, s3cmd
10958 ;; fails to install if it cannot find specifically the
10959 ;; python-magic package. Thus we include it, instead of using
10960 ;; python-file. Ironically, s3cmd sometimes works better
10961 ;; without libmagic bindings at all:
10962 ;; https://github.com/s3tools/s3cmd/issues/198
10963 ("python2-magic" ,python2-magic)))
10964 (home-page "http://s3tools.org/s3cmd")
10965 (synopsis "Command line tool for S3-compatible storage services")
10966 (description
10967 "S3cmd is a command line tool for uploading, retrieving and managing data
10968in storage services that are compatible with the Amazon Simple Storage
10969Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10970GnuPG encryption, and more. It also supports management of Amazon's
10971CloudFront content delivery network.")
3f641af0 10972 (license license:gpl2+)))
4323a5f0
AE
10973
10974(define-public python-pkgconfig
10975 (package
10976 (name "python-pkgconfig")
10977 (version "1.1.0")
10978 (source
10979 (origin
10980 (method url-fetch)
10981 (uri (pypi-uri "pkgconfig" version))
10982 (sha256
10983 (base32
10984 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10985 (build-system python-build-system)
10986 (native-inputs
f3b98f4f 10987 `(("python-nose" ,python-nose)))
4323a5f0
AE
10988 (inputs
10989 `(("pkg-config" ,pkg-config)))
10990 (arguments
10991 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10992 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10993 #:tests? #f
4323a5f0
AE
10994 ;; Hard-code the path to pkg-config.
10995 #:phases
10996 (modify-phases %standard-phases
10997 (add-before
10998 'build 'patch
10999 (lambda _
11000 (substitute* "pkgconfig/pkgconfig.py"
11001 (("cmd = 'pkg-config")
11002 (string-append "cmd = '" (which "pkg-config"))))
11003 #t)))))
7bf837fd 11004 (home-page "https://github.com/matze/pkgconfig")
4323a5f0
AE
11005 (synopsis "Python interface for pkg-config")
11006 (description "This module provides a Python interface to pkg-config. It
11007can be used to find all pkg-config packages, check if a package exists,
11008check if a package meets certain version requirements, query CFLAGS and
11009LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 11010 (license license:expat)))
4323a5f0
AE
11011
11012(define-public python2-pkgconfig
11013 (package-with-python2 python-pkgconfig))
11014
2e697322
BW
11015(define-public python-bz2file
11016 (package
11017 (name "python-bz2file")
11018 (version "0.98")
11019 (source
11020 (origin
11021 (method url-fetch)
11022 (uri (pypi-uri "bz2file" version))
11023 (sha256
11024 (base32
11025 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11026 (build-system python-build-system)
11027 (arguments
124df723 11028 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
11029 (home-page "https://github.com/nvawda/bz2file")
11030 (synopsis "Read and write bzip2-compressed files")
11031 (description
11032 "Bz2file is a Python library for reading and writing bzip2-compressed
11033files. It contains a drop-in replacement for the I/O interface in the
11034standard library's @code{bz2} module, including features from the latest
11035development version of CPython that are not available in older releases.")
3f641af0 11036 (license license:asl2.0)
2e697322
BW
11037 (properties `((python2-variant . ,(delay python2-bz2file))))))
11038
11039(define-public python2-bz2file
11040 (let ((base (package-with-python2
11041 (strip-python2-variant python-bz2file))))
11042 (package
11043 (inherit base)
124df723 11044 (arguments
752bb447
BW
11045 `(#:python ,python-2
11046 #:phases
124df723
BW
11047 (modify-phases %standard-phases
11048 ;; 'python setup.py test' does not work as of 0.98.
11049 ;; There is only the one test file, so we run it directly.
11050 (replace 'check
11051 (lambda _ (zero? (system* "python"
11052 "test_bz2file.py"))))))))))
2e697322 11053
da4ac1aa
BW
11054(define-public python-future
11055 (package
11056 (name "python-future")
c522f57e 11057 (version "0.16.0")
da4ac1aa
BW
11058 (source
11059 (origin
11060 (method url-fetch)
11061 (uri (pypi-uri "future" version))
11062 (sha256
11063 (base32
c522f57e 11064 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
da4ac1aa
BW
11065 (build-system python-build-system)
11066 ;; Many tests connect to the network or are otherwise flawed.
11067 ;; https://github.com/PythonCharmers/python-future/issues/210
11068 (arguments
11069 `(#:tests? #f))
11070 (home-page "http://python-future.org")
11071 (synopsis "Single-source support for Python 3 and 2")
11072 (description
11073 "@code{python-future} is the missing compatibility layer between Python 2 and
11074Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
11075to support both Python 2 and Python 3 with minimal overhead.")
f210e944 11076 (license license:expat)))
da4ac1aa
BW
11077
11078(define-public python2-future
f210e944 11079 (package-with-python2 python-future))
da4ac1aa 11080
8e451885
AE
11081(define-public python-cysignals
11082 (package
11083 (name "python-cysignals")
11084 (version "1.1.0")
11085 (source
11086 (origin
11087 (method url-fetch)
11088 (uri (pypi-uri "cysignals" version ".tar.bz2"))
11089 (sha256
11090 (base32
11091 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
11092 (build-system python-build-system)
11093 (native-inputs
11094 `(("python-cython" ,python-cython)
8e451885
AE
11095 ("python-sphinx" ,python-sphinx)))
11096 (inputs
11097 `(("pari-gp" ,pari-gp)))
11098 (arguments
11099 `(#:modules ((guix build python-build-system)
11100 ((guix build gnu-build-system) #:prefix gnu:)
11101 (guix build utils))
11102 ;; FIXME: Tests are executed after installation and currently fail
11103 ;; when not installing into standard locations; the author is working
11104 ;; on a fix.
11105 #:tests? #f
11106 #:phases
11107 (modify-phases %standard-phases
11108 (add-before
11109 'build 'configure
11110 (assoc-ref gnu:%standard-phases 'configure)))))
11111 (home-page
11112 "https://github.com/sagemath/cysignals")
11113 (synopsis
11114 "Handling of interrupts and signals for Cython")
11115 (description
11116 "The cysignals package provides mechanisms to handle interrupts (and
11117other signals and errors) in Cython code, using two related approaches,
11118for mixed Cython/Python code or external C libraries and pure Cython code,
11119respectively.")
3f641af0 11120 (license license:lgpl3+)))
8e451885
AE
11121
11122(define-public python2-cysignals
11123 (package-with-python2 python-cysignals))
11124
63bcec71
DM
11125(define-public python2-shedskin
11126 (package
11127 (name "python2-shedskin")
11128 (version "0.9.4")
11129 (source
11130 (origin
11131 (method url-fetch)
11132 (uri (string-append "https://github.com/shedskin/shedskin/"
11133 "releases/download/v" version
11134 "/shedskin-" version ".tgz"))
11135 (sha256
11136 (base32
11137 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
11138 (build-system python-build-system)
11139 (arguments
11140 `(#:python ,python-2
11141 #:phases (modify-phases %standard-phases
11142 (add-after 'unpack 'fix-resulting-include-libs
11143 (lambda* (#:key inputs #:allow-other-keys)
11144 (let ((libgc (assoc-ref inputs "libgc"))
11145 (pcre (assoc-ref inputs "pcre")))
11146 (substitute* "shedskin/makefile.py"
11147 (("variable == 'CCFLAGS':[ ]*")
11148 (string-append "variable == 'CCFLAGS':\n"
11149 " line += ' -I " pcre "/include"
11150 " -I " libgc "/include'"))
11151 (("variable == 'LFLAGS':[ ]*")
11152 (string-append "variable == 'LFLAGS':\n"
11153 " line += ' -L" pcre "/lib"
11154 " -L " libgc "/lib'")))
11155 #t))))))
63bcec71
DM
11156 (inputs `(("pcre" ,pcre)
11157 ("libgc" ,libgc)))
11158 (home-page "https://shedskin.github.io/")
11159 (synopsis "Experimental Python-2 to C++ Compiler")
11160 (description (string-append "This is an experimental compiler for a subset of
11161Python. It generates C++ code and a Makefile."))
3f641af0 11162 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
11163
11164(define-public python2-rope
11165 (package
11166 (name "python2-rope")
11167 (version "0.10.3")
11168 (source
11169 (origin
11170 (method url-fetch)
11171 (uri (pypi-uri "rope" version))
11172 (sha256
11173 (base32
11174 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
11175 (arguments
11176 ;; Rope is currently python-2 only.
11177 ;; https://github.com/python-rope/rope/issues/57
11178 `(#:python ,python-2))
11179 (build-system python-build-system)
11180 (native-inputs
f3b98f4f 11181 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
11182 (home-page "https://github.com/python-rope/rope")
11183 (synopsis "Refactoring library for Python")
11184 (description "Rope is a refactoring library for Python. It facilitates
11185the renaming, moving and extracting of attributes, functions, modules, fields
11186and parameters in Python 2 source code. These refactorings can also be applied
d1e4ad1b 11187to occurrences in strings and comments.")
3f641af0 11188 (license license:gpl2)))
6ba8ca17
11189
11190(define-public python-py3status
11191 (package
11192 (name "python-py3status")
d2262d70 11193 (version "3.1")
6ba8ca17
11194 (source
11195 (origin
11196 (method url-fetch)
11197 (uri (pypi-uri "py3status" version))
11198 (sha256
11199 (base32
d2262d70 11200 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 11201 (build-system python-build-system)
8653c1d5
MB
11202 (arguments
11203 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
6ba8ca17
11204 (home-page "https://github.com/ultrabug/py3status")
11205 (synopsis "Extensible i3status wrapper written in Python")
11206 (description "py3status is an i3status wrapper which extends i3status
11207functionality in a modular way, allowing you to extend your panel with your
11208own code, responding to click events and updating clock every second.")
3f641af0 11209 (license license:bsd-3)))
b8fdbca3
HG
11210
11211(define-public python-tblib
11212 (package
11213 (name "python-tblib")
11214 (version "1.3.0")
11215 (source (origin
11216 (method url-fetch)
11217 (uri (pypi-uri "tblib" version))
11218 (sha256 (base32
11219 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
11220 (build-system python-build-system)
11221 (arguments
11222 `(#:phases
11223 (modify-phases %standard-phases
11224 (replace 'check
11225 (lambda _
11226 ;; Upstream runs tests after installation and the package itself
11227 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11228 ;; found.
11229 (setenv "PYTHONPATH"
11230 (string-append (getcwd) "/build/lib:"
11231 (getenv "PYTHONPATH")))
11232 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
11233 (native-inputs
11234 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
11235 ("python-six" ,python-six)))
11236 (home-page "https://github.com/ionelmc/python-tblib")
11237 (synopsis "Traceback serialization library")
11238 (description
11239 "Traceback serialization allows you to:
11240
11241@enumerate
11242@item Pickle tracebacks and raise exceptions with pickled tracebacks in
11243different processes. This allows better error handling when running code over
11244multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11245
11246@item Parse traceback strings and raise with the parsed tracebacks.
9657aeb1 11247@end enumerate\n")
3f641af0 11248 (license license:bsd-3)))
b8fdbca3
HG
11249
11250(define-public python2-tblib
11251 (package-with-python2 python-tblib))
1a024de4
HG
11252
11253(define-public python-sqlparse
11254 (package
11255 (name "python-sqlparse")
11256 (version "0.1.19")
11257 (source (origin
11258 (method url-fetch)
11259 (uri (pypi-uri "sqlparse" version))
11260 (sha256
11261 (base32
11262 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
11263 (build-system python-build-system)
11264 (arguments
11265 `(#:phases
11266 (modify-phases %standard-phases
11267 (replace 'check
11268 (lambda* _
11269 ;; setup.py-integrated 2to3 only affects the build files, but
11270 ;; py.test is using the source files. So we need to convert them
11271 ;; manually.
11272 (when (zero? (system* "python3"))
11273 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
11274 (zero? (system* "py.test")))))))
11275 (native-inputs
f3b98f4f 11276 `(("python-pytest" ,python-pytest)))
1a024de4
HG
11277 (home-page "https://github.com/andialbrecht/sqlparse")
11278 (synopsis "Non-validating SQL parser")
11279 (description "Sqlparse is a non-validating SQL parser for Python. It
11280provides support for parsing, splitting and formatting SQL statements.")
3f641af0 11281 (license license:bsd-3)))
1a024de4
HG
11282
11283(define-public python2-sqlparse
11284 (package-with-python2 python-sqlparse))
68b9d242
SB
11285
11286(define-public python-greenlet
11287 (package
11288 (name "python-greenlet")
1f89fb16 11289 (version "0.4.11")
68b9d242
SB
11290 (source (origin
11291 (method url-fetch)
11292 (uri (pypi-uri "greenlet" version))
11293 (sha256
11294 (base32
1f89fb16 11295 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
68b9d242 11296 (build-system python-build-system)
68b9d242
SB
11297 (home-page "https://greenlet.readthedocs.io/")
11298 (synopsis "Lightweight in-process concurrent programming")
11299 (description
11300 "Greenlet package is a spin-off of Stackless, a version of CPython
11301that supports micro-threads called \"tasklets\". Tasklets run
11302pseudo-concurrently (typically in a single or a few OS-level threads) and
11303are synchronized with data exchanges on \"channels\".")
3f641af0 11304 (license (list license:psfl license:expat))))
68b9d242
SB
11305
11306(define-public python2-greenlet
11307 (package-with-python2 python-greenlet))
d79a343b
SB
11308
11309(define-public python-gevent
11310 (package
11311 (name "python-gevent")
11312 (version "1.1.1")
11313 (source (origin
11314 (method url-fetch)
11315 (uri (pypi-uri "gevent" version))
11316 (sha256
11317 (base32
11318 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11319 (modules '((guix build utils)))
11320 (snippet
11321 '(begin
11322 ;; unbunding libev and c-ares
11323 (for-each delete-file-recursively '("libev" "c-ares"))
11324 ;; fixing testsuite
11325 (call-with-output-file "greentest/__init__.py" noop)
11326 (substitute* "greentest/testrunner.py"
11327 (("import util") "from . import util")
11328 (("from util import log") "from .util import log"))))))
11329 (build-system python-build-system)
11330 (propagated-inputs
11331 `(("python-greenlet" ,python-greenlet)))
11332 (native-inputs
f3b98f4f 11333 `(("python-six" ,python-six)))
d79a343b
SB
11334 (inputs
11335 `(("c-ares" ,c-ares)
11336 ("libev" ,libev)))
11337 (home-page "http://www.gevent.org/")
11338 (synopsis "Coroutine-based network library")
11339 (description
11340 "gevent is a coroutine-based Python networking library that uses greenlet
11341to provide a high-level synchronous API on top of the libev event loop.")
11342 (license license:expat)))
11343
11344(define-public python2-gevent
11345 (package-with-python2 python-gevent))
da3aeeb6 11346
c9a18125
MB
11347(define-public python-geventhttpclient
11348 (package
11349 (name "python-geventhttpclient")
11350 (version "1.3.1")
11351 (source (origin
11352 (method url-fetch)
11353 (uri (pypi-uri "geventhttpclient" version))
11354 (sha256
11355 (base32
11356 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11357 (modules '((guix build utils)))
11358 (snippet
11359 '(begin
11360 ;; Delete pre-compiled files.
11361 (for-each delete-file (find-files "src/geventhttpclient"
11362 ".*\\.pyc"))
11363 #t))))
11364 (build-system python-build-system)
11365 (arguments
11366 '(#:phases
11367 (modify-phases %standard-phases
11368 (add-after 'unpack 'delete-network-tests
11369 (lambda _
11370 (delete-file "src/geventhttpclient/tests/test_client.py")
11371 #t))
11372 (delete 'check)
11373 (add-after 'install 'check
11374 (lambda* (#:key inputs outputs #:allow-other-keys)
11375 (add-installed-pythonpath inputs outputs)
11376 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11377 (native-inputs
11378 `(("python-pytest" ,python-pytest)))
11379 (propagated-inputs
11380 `(("python-certifi" ,python-certifi)
11381 ("python-gevent" ,python-gevent)
11382 ("python-six" ,python-six)))
11383 (home-page "https://github.com/gwik/geventhttpclient")
11384 (synopsis "HTTP client library for gevent")
11385 (description "@code{python-geventhttpclient} is a high performance,
11386concurrent HTTP client library for python using @code{gevent}.")
11387 (license license:expat)))
11388
11389(define-public python2-geventhttpclient
11390 (package-with-python2 python-geventhttpclient))
11391
b585e361
DM
11392(define-public python-fastimport
11393 (package
11394 (name "python-fastimport")
11395 (version "0.9.6")
11396 (source
11397 (origin
11398 (method url-fetch)
11399 (uri (pypi-uri "fastimport" version))
11400 (sha256
11401 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11402 (build-system python-build-system)
11403 (home-page "https://github.com/jelmer/python-fastimport")
11404 (synopsis "VCS fastimport parser and generator in Python")
11405 (description "This package provides a parser for and generator of the Git
11406@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11407format.")
11408 (license license:gpl2+)))
11409
11410(define-public python2-fastimport
11411 (package-with-python2 python-fastimport))
11412
da3aeeb6
SB
11413(define-public python-twisted
11414 (package
11415 (name "python-twisted")
11416 (version "16.2.0")
11417 (source (origin
11418 (method url-fetch)
8ea8e8d3 11419 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
11420 (sha256
11421 (base32
11422 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11423 (build-system python-build-system)
a960e73f
MB
11424 (arguments
11425 '(#:tests? #f)) ; FIXME: Some tests are failing.
11426 ;; #:phases
11427 ;; (modify-phases %standard-phases
11428 ;; (replace 'check
11429 ;; (lambda _
11430 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170
SB
11431 (propagated-inputs
11432 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
11433 (home-page "https://twistedmatrix.com/")
11434 (synopsis "Asynchronous networking framework written in Python")
11435 (description
11436 "Twisted is an extensible framework for Python programming, with special
11437focus on event-based network programming and multiprotocol integration.")
11438 (license license:expat)))
11439
11440(define-public python2-twisted
11441 (package-with-python2 python-twisted))
d0b6fed6 11442
4d3fa5a4
EF
11443(define-public python-pika
11444 (package
11445 (name "python-pika")
11446 (version "0.10.0")
11447 (source
11448 (origin
11449 (method url-fetch)
11450 (uri (pypi-uri "pika" version))
11451 (sha256
11452 (base32
11453 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11454 (build-system python-build-system)
11455 (native-inputs
269d9172
LF
11456 `(("python-pyev" ,python-pyev)
11457 ("python-tornado" ,python-tornado)
11458 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
11459 (home-page "https://pika.readthedocs.org")
11460 (synopsis "Pure Python AMQP Client Library")
11461 (description
11462 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11463Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11464network support library.")
11465 (license license:bsd-3)))
11466
11467(define-public python2-pika
11468 (package-with-python2 python-pika))
11469
d0b6fed6
DM
11470(define-public python-ply
11471 (package
11472 (name "python-ply")
234ade2d 11473 (version "3.9")
d0b6fed6
DM
11474 (source
11475 (origin
11476 (method url-fetch)
234ade2d 11477 (uri (pypi-uri "ply" version))
d0b6fed6
DM
11478 (sha256
11479 (base32
234ade2d 11480 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
d0b6fed6
DM
11481 (build-system python-build-system)
11482 (home-page "http://www.dabeaz.com/ply/")
11483 (synopsis "Python Lex & Yacc")
11484 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11485It uses LR parsing and does extensive error checking.")
f210e944 11486 (license license:bsd-3)))
d0b6fed6
DM
11487
11488(define-public python2-ply
f210e944 11489 (package-with-python2 python-ply))
d951bd54
SB
11490
11491(define-public python-tabulate
11492 (package
11493 (name "python-tabulate")
e6ace98d 11494 (version "0.7.7")
d951bd54
SB
11495 (source (origin
11496 (method url-fetch)
11497 (uri (pypi-uri "tabulate" version))
11498 (sha256
11499 (base32
fe2ba3a8 11500 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
d951bd54 11501 (build-system python-build-system)
fe2ba3a8
MB
11502 (arguments
11503 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11504 ;; and the latest release is not tagged in the upstream repository.
11505 '(#:tests? #f))
d951bd54
SB
11506 (home-page "https://bitbucket.org/astanin/python-tabulate")
11507 (synopsis "Pretty-print tabular data")
11508 (description
11509 "Tabulate is a library and command-line utility to pretty-print tabular
11510data in Python.")
11511 (license license:expat)))
11512
11513(define-public python2-tabulate
11514 (package-with-python2 python-tabulate))
1c4c8a33
SB
11515
11516(define-public python-kazoo
11517 (package
11518 (name "python-kazoo")
11519 (version "2.2.1")
11520 (source
11521 (origin
11522 (method url-fetch)
11523 (uri (pypi-uri "kazoo" version))
11524 (sha256
11525 (base32
11526 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11527 (build-system python-build-system)
11528 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
11529 (propagated-inputs
11530 `(("python-six" ,python-six)))
1c4c8a33
SB
11531 (home-page "https://kazoo.readthedocs.org")
11532 (synopsis "High-level Zookeeper client library")
11533 (description
11534 "Kazoo is a Python client library for the Apache Zookeeper distributed
11535application service. It is designed to be easy to use and to avoid common
11536programming errors.")
3f641af0 11537 (license license:asl2.0)))
1c4c8a33
SB
11538
11539(define-public python2-kazoo
11540 (package-with-python2 python-kazoo))
45dda35e
SB
11541
11542(define-public python-pykafka
11543 (package
11544 (name "python-pykafka")
11545 (version "2.4.0")
11546 (source (origin
11547 (method url-fetch)
c6bccf71
EF
11548 (uri (string-append
11549 "https://pypi.python.org/packages/8b/3e/"
11550 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11551 "pykafka-" version ".tar.gz"))
45dda35e
SB
11552 (sha256
11553 (base32
11554 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11555 (build-system python-build-system)
11556 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 11557 (propagated-inputs
45dda35e
SB
11558 `(("python-gevent" ,python-gevent)
11559 ("python-kazoo" ,python-kazoo)
45dda35e
SB
11560 ("python-tabulate" ,python-tabulate)))
11561 (inputs
11562 `(("librdkafka" ,librdkafka)))
11563 (home-page "https://pykafka.readthedocs.io/")
11564 (synopsis "Apache Kafka client for Python")
11565 (description
11566 "PyKafka is a client for the Apache Kafka distributed messaging system.
11567It includes Python implementations of Kafka producers and consumers, which
11568are optionally backed by a C extension built on librdkafka.")
3f641af0 11569 (license license:asl2.0)))
45dda35e
SB
11570
11571(define-public python2-pykafka
11572 (package-with-python2 python-pykafka))
a44fd439
DM
11573
11574(define-public python-wcwidth
11575 (package
11576 (name "python-wcwidth")
9e59478f 11577 (version "0.1.7")
a44fd439
DM
11578 (source
11579 (origin
11580 (method url-fetch)
9e59478f 11581 (uri (pypi-uri "wcwidth" version))
a44fd439
DM
11582 (sha256
11583 (base32
9e59478f 11584 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
a44fd439
DM
11585 (build-system python-build-system)
11586 (home-page "https://github.com/jquast/wcwidth")
66e07664 11587 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
11588 (description "Wcwidth measures the number of terminal column cells of
11589wide-character codes. It is useful for those implementing a terminal emulator,
11590or programs that carefully produce output to be interpreted by one. It is a
11591Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11592specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 11593 (license license:expat)))
a44fd439
DM
11594
11595(define-public python2-wcwidth
f210e944 11596 (package-with-python2 python-wcwidth))
0de78c95
DP
11597
11598(define-public python2-jsonrpclib
11599 (package
11600 (name "python2-jsonrpclib")
11601 (version "0.1.7")
11602 (source (origin
11603 (method url-fetch)
11604 (uri (string-append
11605 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11606 "jsonrpclib-" version ".tar.gz"))
11607 (sha256
11608 (base32
11609 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11610 (build-system python-build-system)
0de78c95
DP
11611 (arguments
11612 `(#:tests? #f
11613 #:python ,python-2))
11614 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11615 (synopsis "Implementation of JSON-RPC specification for Python")
11616 (description
11617 "This library is an implementation of the JSON-RPC specification.
11618It supports both the original 1.0 specification, as well as the
11619new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11620etc.")
3f641af0 11621 (license license:asl2.0)))
9250b0f3
SB
11622
11623(define-public python-chai
11624 (package
11625 (name "python-chai")
11626 (version "1.1.1")
11627 (source (origin
11628 (method url-fetch)
11629 (uri (pypi-uri "chai" version))
11630 (sha256
11631 (base32
11632 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11633 (build-system python-build-system)
9250b0f3
SB
11634 (home-page "https://github.com/agoragames/chai")
11635 (synopsis "Mocking framework for Python")
11636 (description
11637 "Chai provides an api for mocking, stubbing and spying your python
11638objects, patterned after the Mocha library for Ruby.")
3f641af0 11639 (license license:bsd-3)))
9250b0f3
SB
11640
11641(define-public python2-chai
11642 (package-with-python2 python-chai))
11643
ae43baa8
SB
11644(define-public python-arrow
11645 (package
11646 (name "python-arrow")
11647 (version "0.8.0")
11648 (source (origin
11649 (method url-fetch)
11650 (uri (pypi-uri "arrow" version))
11651 (sha256
11652 (base32
11653 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11654 (build-system python-build-system)
11655 (native-inputs
f3b98f4f 11656 `(;; For testing
ae43baa8
SB
11657 ("python-chai" ,python-chai)
11658 ("python-simplejson" ,python-simplejson)))
36aed736 11659 (propagated-inputs
22d7360b 11660 `(("python-dateutil" ,python-dateutil)))
ae43baa8
SB
11661 (home-page "https://github.com/crsmithdev/arrow/")
11662 (synopsis "Dates and times for Python")
11663 (description
11664 "Arrow is a Python library to creating, manipulating, formatting and
11665converting dates, times, and timestamps. It implements and updates the
11666datetime type.")
3f641af0 11667 (license license:asl2.0)))
ae43baa8
SB
11668
11669(define-public python2-arrow
11670 (package-with-python2 python-arrow))
11671
1f2b62a4
SB
11672(define-public python-inflection
11673 (package
11674 (name "python-inflection")
11675 (version "0.3.1")
11676 (source
11677 (origin (method url-fetch)
11678 (uri (pypi-uri "inflection" version))
11679 (sha256
11680 (base32
11681 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11682 (build-system python-build-system)
e9127525
MB
11683 (native-inputs
11684 `(("python-pytest" ,python-pytest)))
7bf837fd 11685 (home-page "https://github.com/jpvanhal/inflection")
1f2b62a4
SB
11686 (synopsis "Python string transformation library")
11687 (description
11688 "Inflection is a string transformation library. It singularizes
11689and pluralizes English words, and transforms strings from CamelCase to
11690underscored string.")
11691 (license license:expat)))
11692
11693(define-public python2-inflection
11694 (package-with-python2 python-inflection))
11695
18995566
SB
11696(define-public python-pylev
11697 (package
11698 (name "python-pylev")
11699 (version "1.3.0")
11700 (source (origin
11701 (method url-fetch)
11702 (uri (pypi-uri "pylev" version))
11703 (sha256
11704 (base32
11705 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11706 (build-system python-build-system)
7bf837fd 11707 (home-page "https://github.com/toastdriven/pylev")
18995566
SB
11708 (synopsis "Levenshtein distance implementation in Python")
11709 (description "Pure Python Levenshtein implementation, based off the
11710Wikipedia code samples at
11711@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 11712 (license license:bsd-3)))
18995566
SB
11713
11714(define-public python2-pylev
11715 (package-with-python2 python-pylev))
11716
f5deff7a
SB
11717(define-public python-cleo
11718 (package
11719 (name "python-cleo")
11720 (version "0.4.1")
11721 (source (origin
11722 (method url-fetch)
11723 (uri (pypi-uri "cleo" version))
11724 (sha256
11725 (base32
11726 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11727 (build-system python-build-system)
11728 (native-inputs
f3b98f4f 11729 `(;; For testing
f5deff7a
SB
11730 ("python-mock" ,python-mock)
11731 ("python-pytest" ,python-pytest)))
9403150a
SB
11732 (propagated-inputs
11733 `(("python-psutil" ,python-psutil)
11734 ("python-pylev" ,python-pylev)))
f5deff7a
SB
11735 (home-page "https://github.com/sdispater/cleo")
11736 (synopsis "Command-line arguments library for Python")
11737 (description
11738 "Cleo allows you to create command-line commands with signature in
11739docstring and colored output.")
11740 (license license:expat)))
11741
11742(define-public python2-cleo
11743 (package-with-python2 python-cleo))
11744
77cadb43
SB
11745(define-public python-lazy-object-proxy
11746 (package
11747 (name "python-lazy-object-proxy")
11748 (version "1.2.2")
11749 (source (origin
11750 (method url-fetch)
11751 (uri (pypi-uri "lazy-object-proxy" version))
11752 (sha256
11753 (base32
11754 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11755 (build-system python-build-system)
77cadb43
SB
11756 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11757 (synopsis "Lazy object proxy for python")
11758 (description
11759 "Lazy object proxy is an object that wraps a callable but defers the call
11760until the object is actually required, and caches the result of said call.")
3f641af0 11761 (license license:bsd-2)))
77cadb43
SB
11762
11763(define-public python2-lazy-object-proxy
11764 (package-with-python2 python-lazy-object-proxy))
11765
5477e05f
SB
11766(define-public python-dnspython
11767 (package
11768 (name "python-dnspython")
6c514128 11769 (version "1.15.0")
5477e05f
SB
11770 (source (origin
11771 (method url-fetch)
11772 (uri (string-append "http://www.dnspython.org/kits/"
11773 version "/dnspython-" version ".tar.gz"))
11774 (sha256
11775 (base32
6c514128 11776 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
11777 (build-system python-build-system)
11778 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
11779 (home-page "http://www.dnspython.org")
11780 (synopsis "DNS toolkit for Python")
11781 (description
11782 "dnspython is a DNS toolkit for Python. It supports almost all record
11783types. It can be used for queries, zone transfers, and dynamic updates.
11784It supports TSIG authenticated messages and EDNS0.")
11785 (license license:expat)))
11786
11787(define-public python2-dnspython
11788 (package-with-python2 python-dnspython))
11789
22711e25
SB
11790(define-public python-email-validator
11791 (package
11792 (name "python-email-validator")
b165c215 11793 (version "1.0.2")
22711e25
SB
11794 (source
11795 (origin (method url-fetch)
11796 (uri (pypi-uri "email_validator" version))
11797 (sha256
11798 (base32
b165c215 11799 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
22711e25
SB
11800 (build-system python-build-system)
11801 (arguments
11802 '(#:phases
11803 (modify-phases %standard-phases
11804 (add-before 'build 'use-dnspython
11805 (lambda _
11806 (substitute* "setup.py"
11807 (("dnspython3") "dnspython"))
11808 #t)))))
d42560bd 11809 (propagated-inputs
22711e25 11810 `(("python-dnspython" ,python-dnspython)
d42560bd 11811 ("python-idna" ,python-idna)))
22711e25
SB
11812 (home-page "https://github.com/JoshData/python-email-validator")
11813 (synopsis "Email address validation library for Python")
11814 (description
11815 "This library validates email address syntax and deliverability.")
3f641af0 11816 (license license:cc0)))
22711e25
SB
11817
11818(define-public python2-email-validator
11819 (package-with-python2 python-email-validator))
11820
8987d91e
SB
11821(define-public python-ukpostcodeparser
11822 (package
11823 (name "python-ukpostcodeparser")
11824 (version "1.0.3")
11825 (source (origin
11826 (method url-fetch)
11827 (uri (pypi-uri "UkPostcodeParser" version))
11828 (sha256
11829 (base32
11830 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11831 (build-system python-build-system)
8987d91e
SB
11832 (home-page "https://github.com/hamstah/ukpostcodeparser")
11833 (synopsis "UK Postcode parser for Python")
11834 (description
11835 "This library provides the @code{parse_uk_postcode} function for
11836parsing UK postcodes.")
11837 (license license:expat)))
11838
11839(define-public python2-ukpostcodeparser
11840 (package-with-python2 python-ukpostcodeparser))
ea92ae01 11841
ce7911dd
MB
11842(define-public python-faker
11843 (package
11844 (name "python-faker")
11845 (version "0.7.9")
11846 (source (origin
11847 (method url-fetch)
11848 (uri (pypi-uri "Faker" version))
11849 (sha256
11850 (base32
11851 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11852 (patches
11853 (search-patches "python-faker-fix-build-32bit.patch"))
11854 (modules '((guix build utils)))
11855 (snippet
11856 '(begin
11857 (for-each delete-file (find-files "." "\\.pyc$"))
11858 #t))))
11859 (build-system python-build-system)
11860 (arguments
11861 '(#:phases
11862 (modify-phases %standard-phases
11863 (replace 'check
11864 (lambda _
11865 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11866 (native-inputs
11867 `(;; For testing
11868 ("python-email-validator" ,python-email-validator)
11869 ("python-mock" ,python-mock)
11870 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11871 (propagated-inputs
11872 `(("python-dateutil" ,python-dateutil)
11873 ("python-six" ,python-six)))
11874 (home-page "https://github.com/joke2k/faker")
11875 (synopsis "Python package that generates fake data")
11876 (description
11877 "Faker is a Python package that generates fake data such as names,
11878addresses, and phone numbers.")
11879 (license license:expat)
11880 (properties `((python2-variant . ,(delay python2-faker))))))
11881
11882(define-public python2-faker
11883 (let ((base (package-with-python2 (strip-python2-variant
11884 python-faker))))
11885 (package
11886 (inherit base)
11887 (propagated-inputs
11888 `(("python2-ipaddress" ,python2-ipaddress)
11889 ,@(package-propagated-inputs base))))))
11890
b49504fd
SB
11891(define-public python-pyaml
11892 (package
11893 (name "python-pyaml")
11894 (version "15.8.2")
11895 (source (origin
11896 (method url-fetch)
11897 (uri (pypi-uri "pyaml" version))
11898 (sha256
11899 (base32
11900 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11901 (build-system python-build-system)
f620311a
MB
11902 (native-inputs
11903 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
11904 (propagated-inputs
11905 `(("python-pyyaml" ,python-pyyaml)))
11906 (home-page "https://github.com/mk-fg/pretty-yaml")
11907 (synopsis "YAML pretty-print library for Python")
11908 (description
11909 "pyaml is a PyYAML based python module to produce pretty and readable
11910YAML-serialized data.")
3f641af0 11911 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
11912
11913(define-public python2-pyaml
11914 (package-with-python2 python-pyaml))
11915
347175a2
SB
11916(define-public python-flexmock
11917 (package
11918 (name "python-flexmock")
11919 (version "0.10.2")
11920 (source (origin
11921 (method url-fetch)
11922 (uri (pypi-uri "flexmock" version))
11923 (sha256
11924 (base32
11925 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11926 (build-system python-build-system)
347175a2
SB
11927 (home-page "https://flexmock.readthedocs.org")
11928 (synopsis "Testing library for Python")
11929 (description
11930 "flexmock is a testing library for Python that makes it easy to create
11931mocks, stubs and fakes.")
3f641af0 11932 (license license:bsd-3)))
347175a2
SB
11933
11934(define-public python2-flexmock
11935 (package-with-python2 python-flexmock))
11936
5a744191
SB
11937(define-public python-orator
11938 (package
11939 (name "python-orator")
11940 (version "0.8.2")
11941 (source (origin
11942 (method url-fetch)
11943 (uri (pypi-uri "orator" version))
11944 (sha256
11945 (base32
11946 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11947 (build-system python-build-system)
11948 (arguments '(#:tests? #f)) ; no tests
b2676030 11949 (propagated-inputs
5a744191
SB
11950 `(("python-arrow" ,python-arrow)
11951 ("python-blinker" ,python-blinker)
11952 ("python-cleo" ,python-cleo)
ce7911dd 11953 ("python-faker" ,python-faker)
5a744191
SB
11954 ("python-inflection" ,python-inflection)
11955 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11956 ("python-pyaml" ,python-pyaml)
5a744191
SB
11957 ("python-simplejson" ,python-simplejson)
11958 ("python-wrapt" ,python-wrapt)))
11959 (home-page "https://orator-orm.com/")
11960 (synopsis "ActiveRecord ORM for Python")
11961 (description
11962 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11963implementation for Python.")
11964 (license license:expat)
11965 (properties `((python2-variant . ,(delay python2-orator))))))
11966
11967(define-public python2-orator
11968 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11969 (package
11970 (inherit base)
06961617 11971 (propagated-inputs
5a744191 11972 `(("python2-ipaddress" ,python2-ipaddress)
06961617 11973 ,@(package-propagated-inputs base))))))
f4155188
DM
11974
11975(define-public python-prompt-toolkit
11976 (package
11977 (name "python-prompt-toolkit")
6a34f4cc 11978 (version "1.0.9")
f4155188
DM
11979 (source
11980 (origin
11981 (method url-fetch)
d15e2ef0 11982 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
11983 (sha256
11984 (base32
6a34f4cc 11985 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
f4155188 11986 (build-system python-build-system)
bae18710
LF
11987 (arguments
11988 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
11989 (propagated-inputs
11990 `(("python-wcwidth" ,python-wcwidth)
2c199b55 11991 ("python-six" ,python-six)
f22efa01 11992 ("python-pygments" ,python-pygments)))
f4155188
DM
11993 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11994 (synopsis "Library for building command line interfaces in Python")
11995 (description
11996 "Prompt-Toolkit is a library for building interactive command line
11997interfaces in Python. It's like GNU Readline but it also features syntax
11998highlighting while typing, out-of-the-box multi-line input editing, advanced
11999code completion, incremental search, support for Chinese double-width
12000characters, mouse support, and auto suggestions.")
f210e944 12001 (license license:bsd-3)))
f4155188
DM
12002
12003(define-public python2-prompt-toolkit
f210e944 12004 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
12005
12006(define-public python-jedi
12007 (package
12008 (name "python-jedi")
12009 (version "0.9.0")
12010 (source
12011 (origin
12012 (method url-fetch)
12013 (uri (pypi-uri "jedi" version))
12014 (sha256
12015 (base32
12016 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
12017 (build-system python-build-system)
bfce8a34
MB
12018 (arguments
12019 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
12020 '(#:tests? #f))
12021 (native-inputs
12022 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
12023 (home-page "https://github.com/davidhalter/jedi")
12024 (synopsis
12025 "Autocompletion for Python that can be used for text editors")
12026 (description
12027 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 12028 (license license:expat)))
a502dfbf
DM
12029
12030(define-public python2-jedi
f210e944 12031 (package-with-python2 python-jedi))
c2f0dc6e
DM
12032
12033(define-public ptpython
12034 (package
12035 (name "ptpython")
12036 (version "0.34")
12037 (source (origin
12038 (method url-fetch)
12039 (uri (pypi-uri "ptpython" version))
12040 (sha256
12041 (base32
12042 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
12043 (build-system python-build-system)
32955348
MB
12044 (arguments
12045 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
f22efa01 12046 (propagated-inputs
c2f0dc6e
DM
12047 `(("python-docopt" ,python-docopt)
12048 ("python-jedi" ,python-jedi)
12049 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 12050 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
12051 (home-page "https://github.com/jonathanslenders/ptpython")
12052 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
12053 (description
12054 "ptpython is a Python read-eval-print loop with IDE-like features.
12055It supports syntax highlighting, multiline editing, autocompletion, mouse,
12056color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
12057etc.")
3f641af0 12058 (license license:bsd-3)
c2f0dc6e
DM
12059 (properties `((python2-variant . ,(delay ptpython-2))))))
12060
12061(define-public ptpython-2
12062 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
12063 (package
12064 (inherit base)
12065 (name "ptpython2"))))
b227f0be 12066
b04a52a6
DJ
12067(define-public python-requests-oauthlib
12068 (package
12069 (name "python-requests-oauthlib")
12070 (version "0.6.2")
12071 (source
12072 (origin
12073 (method url-fetch)
12074 (uri (pypi-uri "requests-oauthlib" version))
12075 (sha256
12076 (base32
12077 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
12078 (build-system python-build-system)
12079 (arguments
12080 `(#:phases
12081 (modify-phases %standard-phases
12082 ;; removes tests that require network access
12083 (add-before 'check 'pre-check
12084 (lambda _
12085 (delete-file "tests/test_core.py")
12086 #t)))))
12087 (native-inputs
12088 `(("python-requests-mock" ,python-requests-mock)
12089 ("python-mock" ,python-mock)))
f22efa01 12090 (propagated-inputs
b04a52a6
DJ
12091 `(("python-oauthlib" ,python-oauthlib)
12092 ("python-requests" ,python-requests)))
12093 (home-page
12094 "https://github.com/requests/requests-oauthlib")
12095 (synopsis
12096 "OAuthlib authentication support for Requests")
12097 (description
12098 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
12099provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 12100 (license license:isc)))
b04a52a6
DJ
12101
12102(define-public python2-requests-oauthlib
f210e944 12103 (package-with-python2 python-requests-oauthlib))
b04a52a6 12104
b227f0be 12105(define-public python-stem
12106 (package
12107 (name "python-stem")
0bb1c35a 12108 (version "1.5.4")
b227f0be 12109 (source
12110 (origin
12111 (method url-fetch)
c976b319 12112 (uri (pypi-uri "stem" version))
b227f0be 12113 (sha256
12114 (base32
0bb1c35a 12115 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
b227f0be 12116 (build-system python-build-system)
12117 (arguments
12118 `(#:phases
12119 (modify-phases %standard-phases
12120 (replace 'check
12121 (lambda _
12122 (zero? (system* "./run_tests.py" "--unit")))))))
12123 (native-inputs
12124 `(("python-mock" ,python-mock)
12125 ("python-pep8" ,python-pep8)
12126 ("python-pyflakes" ,python-pyflakes)))
b227f0be 12127 (home-page "https://stem.torproject.org/")
12128 (synopsis
12129 "Python controller library that allows applications to interact with Tor")
12130 (description
12131 "Stem is a Python controller library for Tor. With it you can use Tor's
12132control protocol to script against the Tor process and read descriptor data
12133relays publish about themselves.")
3f641af0 12134 (license license:lgpl3)))
b227f0be 12135
12136(define-public python2-stem
12137 (package-with-python2 python-stem))
517a6c0c
DM
12138
12139(define-public python-pyserial
12140 (package
12141 (name "python-pyserial")
12142 (version "3.1.1")
12143 (source
12144 (origin
12145 (method url-fetch)
12146 (uri (pypi-uri "pyserial" version))
12147 (sha256
12148 (base32
12149 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
12150 (build-system python-build-system)
0a702009
MB
12151 (arguments
12152 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12153 ;; #:phases
12154 ;; (modify-phases %standard-phases
12155 ;; (replace 'check
12156 ;; (lambda _
12157 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
517a6c0c
DM
12158 (home-page
12159 "https://github.com/pyserial/pyserial")
12160 (synopsis "Python Serial Port Bindings")
12161 (description "@code{pyserial} provide serial port bindings for Python. It
12162supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12163and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 12164 (license license:bsd-3)))
517a6c0c
DM
12165
12166(define-public python2-pyserial
f210e944 12167 (package-with-python2 python-pyserial))
6eb7af2a
DJ
12168
12169(define-public python-kivy
12170 (package
12171 (name "python-kivy")
12172 (version "1.9.1")
12173 (source
12174 (origin
12175 (method url-fetch)
12176 (uri (pypi-uri "kivy" version))
12177 (file-name (string-append name "-" version ".tar.gz"))
12178 (sha256
12179 (base32
12180 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
12181 (build-system python-build-system)
12182 (arguments
12183 `(#:tests? #f ; Tests require many optional packages
12184 #:phases
12185 (modify-phases %standard-phases
12186 (replace 'build (lambda _ (zero? (system* "make" "force"))))
12187 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12188 (lambda* (#:key inputs #:allow-other-keys)
12189 (setenv "KIVY_SDL2_PATH"
12190 (string-append (assoc-ref inputs "sdl-union")
12191 "/include/SDL2"))
12192 #t)))))
12193 (native-inputs
f2516de2
HG
12194 `(("pkg-config" ,pkg-config)
12195 ("python-cython" ,python-cython)))
6eb7af2a 12196 (inputs
f2516de2 12197 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
12198 ("mesa" ,mesa)
12199 ("sdl-union"
12200 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12201 (home-page "http://kivy.org")
12202 (synopsis
12203 "Multitouch application framework")
12204 (description
12205 "A software library for rapid development of
12206hardware-accelerated multitouch applications.")
12207 (license license:expat)))
12208
12209(define-public python2-kivy
12210 (package-with-python2 python-kivy))
12211
12212(define-public python-kivy-next
12213 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
12214 (revision "1"))
12215 (package (inherit python-kivy)
12216 (name "python-kivy-next")
d80a71eb 12217 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
12218 (string-take commit 7)))
12219 (source
12220 (origin
12221 (method git-fetch)
12222 (uri (git-reference
12223 (url "https://github.com/kivy/kivy")
12224 (commit commit)))
12225 (file-name (string-append name "-" version "-checkout"))
12226 (sha256
12227 (base32
12228 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
12229
12230(define-public python2-kivy-next
12231 (package-with-python2 python-kivy-next))
8794bd8b
DC
12232
12233(define-public python-binaryornot
12234 (package
12235 (name "python-binaryornot")
12236 (version "0.4.0")
12237 (source (origin
12238 (method url-fetch)
12239 (uri (pypi-uri "binaryornot" version))
12240 (sha256
12241 (base32
12242 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
12243 (build-system python-build-system)
f22efa01 12244 (propagated-inputs
8794bd8b
DC
12245 `(("python-chardet" ,python-chardet)
12246 ("python-hypothesis" ,python-hypothesis)))
12247 (home-page "https://github.com/audreyr/binaryornot")
12248 (synopsis "Package to check if a file is binary or text")
12249 (description "Ultra-lightweight pure Python package to check if a file is
12250binary or text.")
12251 (license license:bsd-3)
12252 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12253
12254(define-public python2-binaryornot
12255 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12256 (package (inherit base)
f22efa01 12257 (propagated-inputs
8794bd8b 12258 `(("python2-enum34" ,python2-enum34)
f22efa01 12259 ,@(package-propagated-inputs base))))))
a9ac982a
DC
12260
12261(define-public python-nltk
12262 (package
12263 (name "python-nltk")
12264 (version "3.2.1")
12265 (source (origin
12266 (method url-fetch)
12267 (uri (pypi-uri "nltk" version))
12268 (sha256
12269 (base32
12270 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12271 (build-system python-build-system)
59f12985
LF
12272 (arguments
12273 '(;; The tests require some extra resources to be downloaded.
12274 ;; TODO Try packaging these resources.
12275 #:tests? #f))
a9ac982a
DC
12276 (home-page "http://nltk.org/")
12277 (synopsis "Natural Language Toolkit")
12278 (description "It provides interfaces to over 50 corpora and lexical
12279resources such as WordNet, along with a suite of text processing libraries
12280for classification, tokenization, stemming, tagging, parsing, and semantic
12281reasoning, wrappers for natural language processing libraries.")
f210e944 12282 (license license:asl2.0)))
a9ac982a
DC
12283
12284(define-public python2-nltk
f210e944 12285 (package-with-python2 python-nltk))
691cd90d
DC
12286
12287(define-public python-pymongo
12288 (package
12289 (name "python-pymongo")
12290 (version "3.3.0")
12291 (source (origin
12292 (method url-fetch)
12293 (uri (pypi-uri "pymongo" version))
12294 (sha256
12295 (base32
12296 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12297 (build-system python-build-system)
f22efa01 12298 (propagated-inputs
691cd90d 12299 `(("python-certifi" ,python-certifi)))
7bf837fd 12300 (home-page "https://github.com/mongodb/mongo-python-driver")
691cd90d
DC
12301 (synopsis "Python driver for MongoDB")
12302 (description "Python driver for MongoDB.")
f210e944 12303 (license license:asl2.0)))
691cd90d
DC
12304
12305(define-public python2-pymongo
f210e944 12306 (package-with-python2 python-pymongo))
6a6c9d43
DC
12307
12308(define-public python-sh
12309 (package
12310 (name "python-sh")
12311 (version "1.11")
12312 (source (origin
12313 (method url-fetch)
12314 (uri (pypi-uri "sh" version))
12315 (sha256
12316 (base32
12317 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12318 (build-system python-build-system)
12319 (arguments
12320 `(#:tests? #f)) ; no tests
12321 (home-page "https://github.com/amoffat/sh")
12322 (synopsis "Python subprocess interface")
12323 (description "Abstracts process invocation by providing a function
12324interface for programs.")
f210e944 12325 (license license:expat)))
6a6c9d43
DC
12326
12327(define-public python2-sh
f210e944 12328 (package-with-python2 python-sh))
05b59190 12329
25702397
EF
12330(define-public python-consul
12331 (package
12332 (name "python-consul")
12333 (version "0.6.1")
12334 (source
12335 (origin
12336 (method url-fetch)
12337 (uri (pypi-uri "python-consul" version))
12338 (sha256
12339 (base32
12340 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12341 (build-system python-build-system)
12342 (native-inputs
fd1d6de7
HG
12343 `(("python-pytest" ,python-pytest)))
12344 (propagated-inputs
12345 `(("python-requests" ,python-requests)
25702397
EF
12346 ("python-six" ,python-six)))
12347 (home-page "https://github.com/cablehead/python-consul")
12348 (synopsis "Python client for Consul")
12349 (description
12350 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12351discovery, monitoring and configuration.")
12352 (license license:expat)))
12353
12354(define-public python2-consul
f210e944 12355 (package-with-python2 python-consul))
25702397 12356
05b59190
DC
12357(define-public python-schematics
12358 (package
12359 (name "python-schematics")
12360 (version "1.1.1")
12361 (source
12362 (origin
12363 (method url-fetch)
12364 (uri (string-append
12365 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12366 (file-name (string-append name "-" version ".tar.gz"))
12367 (sha256
12368 (base32
12369 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12370 (build-system python-build-system)
f22efa01 12371 (propagated-inputs
05b59190
DC
12372 `(("python-six" ,python-six)))
12373 (arguments
12374 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12375 ; version requirements (eg python-coveralls)
12376 (home-page "https://github.com/schematics/schematics")
12377 (synopsis "Python Data Structures for Humans")
12378 (description "Python Data Structures for Humans.")
f210e944 12379 (license license:bsd-3)))
05b59190
DC
12380
12381(define-public python2-schematics
f210e944 12382 (package-with-python2 python-schematics))
d6907ff7
DC
12383
12384(define-public python-publicsuffix
12385 (package
12386 (name "python-publicsuffix")
12387 (version "1.1.0")
12388 (source (origin
12389 (method url-fetch)
12390 (uri (pypi-uri "publicsuffix" version))
12391 (sha256
12392 (base32
12393 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12394 (build-system python-build-system)
12395 (arguments
12396 `(#:tests? #f)) ; tests use the internet
12397 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12398 (synopsis "Get suffix for a domain name")
12399 (description "Get a public suffix for a domain name using the Public Suffix
12400List.")
f210e944 12401 (license license:expat)))
d6907ff7
DC
12402
12403(define-public python2-publicsuffix
f210e944 12404 (package-with-python2 python-publicsuffix))
b2319996
DC
12405
12406(define-public python-publicsuffix2
12407 (package
12408 (name "python-publicsuffix2")
91862162 12409 (version "2.20160818")
b2319996
DC
12410 (source
12411 (origin
12412 (method url-fetch)
12413 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12414 (sha256
12415 (base32
91862162 12416 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
b2319996 12417 (build-system python-build-system)
10797a0a
LF
12418 (arguments
12419 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
12420 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12421 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12422 (description "Get a public suffix for a domain name using the Public Suffix
12423List. Forked from and using the same API as the publicsuffix package.")
f210e944 12424 (license (list license:expat license:mpl2.0))))
b2319996
DC
12425
12426(define-public python2-publicsuffix2
f210e944 12427 (package-with-python2 python-publicsuffix2))
81f1515d
DC
12428
12429(define-public python-url
12430 (package
12431 (name "python-url")
12432 (version "0.2.0")
12433 (source (origin
12434 (method url-fetch)
12435 (uri (pypi-uri "url" version))
12436 (sha256
12437 (base32
12438 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12439 (build-system python-build-system)
f22efa01 12440 (propagated-inputs
81f1515d
DC
12441 `(("python-publicsuffix" ,python-publicsuffix)))
12442 (native-inputs
12443 `(("python-coverage" ,python-coverage)
12444 ("python-nose" ,python-nose)))
12445 (arguments
12446 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
7bf837fd 12447 (home-page "https://github.com/seomoz/url-py")
81f1515d
DC
12448 (synopsis "URL Parsing")
12449 (description "Library for parsing urls.")
12450 (license license:expat)
12451 (properties `((python2-variant . ,(delay python2-url))))))
12452
12453(define-public python2-url
12454 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12455 (package (inherit base)
f22efa01 12456 (propagated-inputs
f210e944 12457 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
12458
12459(define-public python-freezegun
12460 (package
12461 (name "python-freezegun")
0c315fb3 12462 (version "0.3.8")
974ee2c1
TS
12463 (source
12464 (origin
12465 (method url-fetch)
12466 (uri (pypi-uri "freezegun" version))
12467 (sha256
12468 (base32
0c315fb3 12469 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
974ee2c1
TS
12470 (build-system python-build-system)
12471 (native-inputs
12472 `(("python-mock" ,python-mock)
12473 ("python-nose" ,python-nose)
4e096968 12474 ("python-coverage" ,python-coverage)))
f22efa01 12475 (propagated-inputs
4e096968 12476 `(("python-six" ,python-six)
22d7360b 12477 ("python-dateutil" ,python-dateutil)))
974ee2c1
TS
12478 (arguments
12479 `(#:phases (modify-phases %standard-phases
12480 ;; The tests are normally executed via `make test`, but the PyPi
12481 ;; package does not include the Makefile.
12482 (replace 'check
12483 (lambda _
12484 (zero? (system* "nosetests" "./tests/")))))))
12485 (home-page "https://github.com/spulec/freezegun")
12486 (synopsis "Test utility for mocking the datetime module")
12487 (description
12488 "FreezeGun is a library that allows your python tests to travel through
12489time by mocking the datetime module.")
12490 (license license:asl2.0)))
12491
12492(define-public python2-freezegun
f210e944
HG
12493 (package-with-python2 python-freezegun))
12494
dddcb25c
MB
12495
12496(define-public python-odfpy
12497 (package
12498 (name "python-odfpy")
12499 (version "1.3.3")
12500 (source (origin
12501 (method url-fetch)
12502 (uri (pypi-uri "odfpy" version))
12503 (sha256
12504 (base32
12505 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12506 (arguments
12507 `(#:modules ((srfi srfi-1)
12508 (guix build python-build-system)
12509 (guix build utils))
12510 #:phases
12511 (modify-phases %standard-phases
12512 (replace 'check
12513 ;; The test runner invokes python2 and python3 for test*.py.
12514 ;; To avoid having both in inputs, we replicate it here.
12515 (lambda _
12516 (every (lambda (test-file)
12517 (zero? (system* "python" test-file)))
12518 (find-files "tests" "^test.*\\.py$")))))))
12519 (build-system python-build-system)
12520 (home-page "https://github.com/eea/odfpy")
12521 (synopsis "Python API and tools to manipulate OpenDocument files")
12522 (description "Collection of libraries and utility programs written in
12523Python to manipulate OpenDocument 1.2 files.")
12524 (license
12525 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12526 ;; number of files with other licenses.
12527 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12528
12529(define-public python2-odfpy
12530 (package-with-python2 python-odfpy))
b30565bd
MB
12531
12532(define-public python-cachecontrol
12533 (package
12534 (name "python-cachecontrol")
12535 (version "0.11.6")
12536 (source
12537 (origin
12538 (method url-fetch)
12539 ;; Pypi does not have tests.
12540 (uri (string-append
12541 "https://github.com/ionrock/cachecontrol/archive/v"
12542 version ".tar.gz"))
12543 (file-name (string-append name "-" version ".tar.gz"))
12544 (sha256
12545 (base32
12546 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12547 (build-system python-build-system)
12548 (arguments
12549 `(#:phases
12550 (modify-phases %standard-phases
12551 (replace 'check
12552 (lambda _
12553 ;; Drop test that requires internet access.
12554 (delete-file "tests/test_regressions.py")
12555 (setenv "PYTHONPATH"
12556 (string-append (getcwd) "/build/lib:"
12557 (getenv "PYTHONPATH")))
12558 (zero? (system* "py.test" "-vv")))))))
12559 (native-inputs
12560 `(("python-pytest" ,python-pytest)
12561 ("python-redis" ,python-redis)
12562 ("python-webtest" ,python-webtest)
12563 ("python-mock" ,python-mock)))
12564 (propagated-inputs
12565 `(("python-requests" ,python-requests)
12566 ("python-lockfile" ,python-lockfile)))
12567 (home-page "https://github.com/ionrock/cachecontrol")
12568 (synopsis "The httplib2 caching algorithms for use with requests")
12569 (description "CacheControl is a port of the caching algorithms in
12570@code{httplib2} for use with @code{requests} session objects.")
f210e944 12571 (license license:asl2.0)))
b30565bd
MB
12572
12573(define-public python2-cachecontrol
f210e944 12574 (package-with-python2 python-cachecontrol))
243db824
DM
12575
12576(define-public python-lit
12577 (package
12578 (name "python-lit")
12579 (version "0.5.0")
12580 (source
12581 (origin
12582 (method url-fetch)
12583 (uri (pypi-uri "lit" version))
12584 (sha256
12585 (base32
12586 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12587 (build-system python-build-system)
12588 (home-page "http://llvm.org/")
12589 (synopsis "LLVM Software Testing Tool")
12590 (description "@code{lit} is a portable tool for executing LLVM and Clang
12591style test suites, summarizing their results, and providing indication of
12592failures.")
f210e944 12593 (license license:ncsa)))
243db824
DM
12594
12595(define-public python2-lit
f210e944 12596 (package-with-python2 python-lit))
66f95b20
MB
12597
12598(define-public python-pytest-pep8
12599 (package
12600 (name "python-pytest-pep8")
12601 (version "1.0.6")
12602 (source (origin
12603 (method url-fetch)
12604 (uri (pypi-uri "pytest-pep8" version))
12605 (sha256
12606 (base32
12607 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12608 (build-system python-build-system)
12609 (arguments
b41a05ce 12610 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
12611 (native-inputs
12612 `(("python-pytest" ,python-pytest)))
12613 (propagated-inputs
12614 `(("python-pep8" ,python-pep8)))
12615 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12616 (synopsis "Py.test plugin to check PEP8 requirements")
12617 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 12618 (license license:expat)))
66f95b20
MB
12619
12620(define-public python2-pytest-pep8
f210e944 12621 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
12622
12623(define-public python-pytest-flakes
12624 (package
12625 (name "python-pytest-flakes")
12626 (version "1.0.1")
12627 (source (origin
12628 (method url-fetch)
12629 (uri (pypi-uri "pytest-flakes" version))
12630 (sha256
12631 (base32
12632 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12633 (build-system python-build-system)
12634 (arguments
b41a05ce 12635 `(#:phases
df94a6b5
MB
12636 (modify-phases %standard-phases
12637 (delete 'check)
12638 (add-after 'install 'check
05c2fd36
HG
12639 (lambda* (#:key outputs inputs #:allow-other-keys)
12640 ;; It's easier to run tests after install.
12641 ;; Make installed package available for running the tests
12642 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
12643 (zero? (system* "py.test" "-vv")))))))
12644 (native-inputs
12645 `(("python-coverage" ,python-coverage)
12646 ("python-pytest" ,python-pytest)
12647 ("python-pytest-cache" ,python-pytest-cache)
12648 ("python-pytest-pep8" ,python-pytest-pep8)))
12649 (propagated-inputs
12650 `(("python-pyflakes" ,python-pyflakes)))
12651 (home-page "https://github.com/fschulze/pytest-flakes")
12652 (synopsis "Py.test plugin to check source code with pyflakes")
12653 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 12654 (license license:expat)))
df94a6b5
MB
12655
12656(define-public python2-pytest-flakes
f210e944 12657 (package-with-python2 python-pytest-flakes))
5467ea62
MB
12658
12659(define-public python-natsort
12660 (package
12661 (name "python-natsort")
a06cd95a 12662 (version "5.0.2")
5467ea62
MB
12663 (source (origin
12664 (method url-fetch)
12665 (uri (pypi-uri "natsort" version))
12666 (sha256
12667 (base32
a06cd95a 12668 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
5467ea62
MB
12669 (build-system python-build-system)
12670 (arguments
12671 `(#:phases
12672 (modify-phases %standard-phases
12673 (add-before 'check 'set-cachedir
12674 ;; Tests require write access to $HOME by default
12675 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12676 (native-inputs
12677 `(("python-hypothesis" ,python-hypothesis)
12678 ("python-pytest-cache" ,python-pytest-cache)
12679 ("python-pytest-cov" ,python-pytest-cov)
12680 ("python-pytest-flakes" ,python-pytest-flakes)
12681 ("python-pytest-pep8" ,python-pytest-pep8)))
12682 (propagated-inputs ; TODO: Add python-fastnumbers.
12683 `(("python-pyicu" ,python-pyicu)))
12684 (home-page "https://github.com/SethMMorton/natsort")
12685 (synopsis "Natural sorting for python and shell")
12686 (description
12687 "Natsort lets you apply natural sorting on lists instead of
12688lexicographical. If you use the built-in @code{sorted} method in python
12689on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12690returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12691function @code{natsorted} that identifies numbers and sorts them separately
12692from strings. It can also sort version numbers, real numbers, mixed types
12693and more, and comes with a shell command @command{natsort} that exposes this
12694functionality in the command line.")
12695 (license license:expat)
12696 (properties `((python2-variant . ,(delay python2-natsort))))))
12697
12698(define-public python2-natsort
12699 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12700 (package (inherit base)
12701 (native-inputs
00e10c6e 12702 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
12703 ("python2-mock" ,python2-mock)
12704 ("python2-enum34" ,python2-enum34)
12705 ,@(package-native-inputs base))))))
4efb9c54
SR
12706
12707(define-public python-glances
12708 (package
12709 (name "python-glances")
12710 (version "2.7.1")
12711 (source
12712 (origin
12713 (method url-fetch)
12714 (uri (pypi-uri "Glances" version))
12715 (sha256
12716 (base32
12717 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12718 (build-system python-build-system)
f22efa01 12719 (propagated-inputs
4efb9c54
SR
12720 `(("python-psutil" ,python-psutil)))
12721 (home-page
12722 "https://github.com/nicolargo/glances")
12723 (synopsis
12724 "A cross-platform curses-based monitoring tool")
12725 (description
12726 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12727Glances uses the PsUtil library to get information from your system. It monitors
12728CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 12729 (license license:lgpl3+)))
4efb9c54
SR
12730
12731(define-public python2-glances
f210e944 12732 (package-with-python2 python-glances))
05b7a593
EF
12733
12734(define-public python-graphql-core
12735 (package
12736 (name "python-graphql-core")
12737 (version "0.5.3")
12738 (source
12739 (origin
12740 (method url-fetch)
12741 (uri (pypi-uri "graphql-core" version))
12742 (sha256
12743 (base32
12744 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12745 (build-system python-build-system)
12746 (arguments
326f8285
LF
12747 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12748 #:phases
05b7a593
EF
12749 (modify-phases %standard-phases
12750 (add-after 'unpack 'patch-hardcoded-version
12751 (lambda _ (substitute*
12752 "setup.py"
12753 (("'gevent==1.1rc1'") "'gevent'"))
12754 #t)))))
12755 (native-inputs
12756 `(("python-gevent" ,python-gevent)
12757 ("python-mock" ,python-mock)
12758 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 12759 (propagated-inputs
05b7a593
EF
12760 `(("python-promise" ,python-promise)
12761 ("python-six" ,python-six)))
12762 (home-page "https://github.com/graphql-python/graphql-core")
12763 (synopsis "GraphQL implementation for Python")
12764 (description
12765 "GraphQL implementation for Python. GraphQL is a data query language and
12766runtime designed and used to request and deliver data to mobile and web apps.
12767This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12768to Python.")
05b7a593
EF
12769 (license license:expat)))
12770
12771(define-public python2-graphql-core
f210e944 12772 (package-with-python2 python-graphql-core))
7ee51575
EF
12773
12774(define-public python-graphql-relay
12775 (package
12776 (name "python-graphql-relay")
b13a5b4d 12777 (version "0.4.5")
7ee51575
EF
12778 (source
12779 (origin
12780 (method url-fetch)
12781 (uri (pypi-uri "graphql-relay" version))
12782 (sha256
12783 (base32
b13a5b4d 12784 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
7ee51575
EF
12785 (build-system python-build-system)
12786 (native-inputs
12787 `(("python-pytest" ,python-pytest)))
f22efa01 12788 (propagated-inputs
7ee51575
EF
12789 `(("python-graphql-core" ,python-graphql-core)
12790 ("python-promise" ,python-promise)
12791 ("python-six" ,python-six)))
12792 (home-page "https://github.com/graphql-python/graphql-relay-py")
12793 (synopsis "Relay implementation for Python")
12794 (description
12795 "This is a library to allow the easy creation of Relay-compliant servers
12796using the GraphQL Python reference implementation of a GraphQL server. It
12797should be noted that the code is a exact port of the original
12798@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12799from Facebook.")
7ee51575
EF
12800 (license license:expat)))
12801
12802(define-public python2-graphql-relay
f210e944 12803 (package-with-python2 python-graphql-relay))
ddc63a56
EF
12804
12805(define-public python-graphene
12806 (package
12807 (name "python-graphene")
12808 (version "0.10.2")
12809 (source
12810 (origin
12811 (method url-fetch)
12812 (uri (pypi-uri "graphene" version))
12813 (sha256
12814 (base32
12815 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12816 (build-system python-build-system)
12817 (native-inputs
12818 `(("python-django-filter" ,python-django-filter)
12819 ("python-mock" ,python-mock)
12820 ("python-psycopg2" ,python-psycopg2)
12821 ("python-pytest-django" ,python-pytest-django)
12822 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 12823 (propagated-inputs
ddc63a56
EF
12824 `(("python-graphql-core" ,python-graphql-core)
12825 ("python-graphql-relay" ,python-graphql-relay)
12826 ("python-iso8601" ,python-iso8601)
12827 ("python-promise" ,python-promise)
12828 ("python-six" ,python-six)))
12829 (home-page "http://graphene-python.org/")
12830 (synopsis "GraphQL Framework for Python")
12831 (description
12832 "Graphene is a Python library for building GraphQL schemas/types.
12833A GraphQL schema describes your data model, and provides a GraphQL server
12834with an associated set of resolve methods that know how to fetch data.")
12835 (properties `((python2-variant . ,(delay python2-graphene))))
12836 (license license:expat)))
12837
12838(define-public python2-graphene
12839 (let ((base (package-with-python2
12840 (strip-python2-variant python-graphene))))
12841 (package (inherit base)
12842 (native-inputs
00e10c6e 12843 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 12844 ,@(package-native-inputs base))))))
d488d5d6
EF
12845
12846(define-public python-nautilus
12847 (package
12848 (name "python-nautilus")
12849 (version "0.4.9")
12850 (source
12851 (origin
12852 (method url-fetch)
12853 (uri (pypi-uri "nautilus" version))
12854 (sha256
12855 (base32
12856 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12857 (build-system python-build-system)
12858 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 12859 (propagated-inputs
d488d5d6
EF
12860 `(("python-bcrypt" ,python-bcrypt)
12861 ("python-click" ,python-click)
12862 ("python-consul" ,python-consul)
d488d5d6
EF
12863 ("python-graphene" ,python-graphene)
12864 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
12865 ("python-peewee" ,python-peewee)
12866 ("python-pika" ,python-pika)
d488d5d6
EF
12867 ("python-tornado" ,python-tornado)
12868 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
12869 (native-inputs
12870 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
12871 (home-page "https://github.com/AlecAivazis/nautilus")
12872 (synopsis "Library for creating microservice applications")
12873 (description
12874 "Nautilus is a framework for flux based microservices that looks to
12875provide extendible implementations of common aspects of a cloud so that you can
12876focus on building massively scalable web applications.")
12877 (license license:expat)))
94cffc63 12878
89cd988b
DM
12879(define-public python-snowballstemmer
12880 (package
12881 (name "python-snowballstemmer")
12882 (version "1.2.1")
12883 (source (origin
1bd858cc
MB
12884 (method url-fetch)
12885 (uri (pypi-uri "snowballstemmer" version))
12886 (sha256
12887 (base32
12888 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
89cd988b
DM
12889 (build-system python-build-system)
12890 (arguments
12891 `(;; No tests exist
12892 #:tests? #f))
12893 (home-page "https://github.com/shibukawa/snowball_py")
12894 (synopsis "Snowball stemming library collection for Python")
12895 (description "This package provides 16 word stemmer algorithms generated
12896from Snowball algorithms. It includes the 15 original ones plus the Poerter
12897English stemmer.")
12898 (license license:bsd-3)))
12899
12900(define-public python2-snowballstemmer
12901 (package-with-python2 python-snowballstemmer))
12902
754bfd70
DM
12903(define-public python-sphinx-cloud-sptheme
12904 (package
12905 (name "python-sphinx-cloud-sptheme")
5095bc7d 12906 (version "1.8.0")
754bfd70 12907 (source (origin
1bd858cc
MB
12908 (method url-fetch)
12909 (uri (pypi-uri "cloud_sptheme" version))
12910 (sha256
12911 (base32
5095bc7d 12912 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
1bd858cc 12913 (build-system python-build-system)
a31e2f1a
MB
12914 ;; FIXME: The 'pypi' release archive does not contain tests.
12915 (arguments '(#:tests? #f))
1bd858cc
MB
12916 (native-inputs
12917 `(("python-sphinx" ,python-sphinx)))
12918 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12919 (synopsis "'Cloud' theme for Sphinx documenter")
12920 (description "This package contains the \"Cloud\" theme for Sphinx and some
754bfd70 12921related extensions.")
1bd858cc 12922 (license license:bsd-3)))
754bfd70
DM
12923
12924(define-public python2-sphinx-cloud-sptheme
12925 (package-with-python2 python-sphinx-cloud-sptheme))
12926
807a5b32
DM
12927(define-public python-sphinx-alabaster-theme
12928 (package
12929 (name "python-sphinx-alabaster-theme")
12930 (version "0.7.9")
1bd858cc
MB
12931 (source (origin
12932 (method url-fetch)
12933 (uri (pypi-uri "alabaster" version))
12934 (sha256
12935 (base32
12936 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
807a5b32
DM
12937 (build-system python-build-system)
12938 (propagated-inputs
12939 `(("python-pygments" ,python-pygments)))
12940 (home-page "https://alabaster.readthedocs.io/")
12941 (synopsis "Configurable sidebar-enabled Sphinx theme")
12942 (description "Alabaster is a visually (c)lean, responsive, configurable
12943theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12944 (license license:bsd-3)))
12945
12946(define-public python2-sphinx-alabaster-theme
12947 (package-with-python2 python-sphinx-alabaster-theme))
12948
66d3f50a
LF
12949(define-public python-betamax
12950 (package
12951 (name "python-betamax")
12952 (version "0.8.0")
12953 (source
12954 (origin
12955 (method url-fetch)
12956 (uri (pypi-uri "betamax" version))
12957 (sha256
12958 (base32
12959 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12960 (build-system python-build-system)
12961 (arguments
12962 '(;; Many tests fail because they require networking.
12963 #:tests? #f))
c415f763 12964 (propagated-inputs
66d3f50a
LF
12965 `(("python-requests" ,python-requests)))
12966 (home-page "https://github.com/sigmavirus24/betamax")
12967 (synopsis "Record HTTP interactions with python-requests")
12968 (description "Betamax will record your test suite's HTTP interactions and
12969replay them during future tests. It is designed to work with python-requests.")
f210e944 12970 (license license:expat)))
66d3f50a
LF
12971
12972(define-public python2-betamax
f210e944 12973 (package-with-python2 python-betamax))
ca0635b4 12974
94cffc63
LF
12975(define-public python-s3transfer
12976 (package
12977 (name "python-s3transfer")
1b5ea092 12978 (version "0.1.10")
94cffc63
LF
12979 (source (origin
12980 (method url-fetch)
12981 (uri (pypi-uri "s3transfer" version))
12982 (sha256
12983 (base32
1b5ea092 12984 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
94cffc63 12985 (build-system python-build-system)
fad8bf97
LF
12986 (arguments
12987 `(#:phases
12988 (modify-phases %standard-phases
12989 (replace 'check
12990 (lambda _
12991 ;; 7 of the 'integration' tests require network access or login
12992 ;; credentials.
12993 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 12994 (native-inputs
fad8bf97
LF
12995 `(("python-docutils" ,python-docutils)
12996 ("python-mock" ,python-mock)
12997 ("python-nose" ,python-nose)))
f22efa01 12998 (propagated-inputs
94cffc63
LF
12999 `(("python-botocore" ,python-botocore)))
13000 (synopsis "Amazon S3 Transfer Manager")
13001 (description "S3transfer is a Python library for managing Amazon S3
13002transfers.")
13003 (home-page "https://github.com/boto/s3transfer")
13004 (license license:asl2.0)
13005 (properties `((python2-variant . ,(delay python2-s3transfer))))))
13006
13007(define-public python2-s3transfer
13008 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
13009 (package
13010 (inherit base)
13011 (native-inputs
13012 `(("python2-futures" ,python2-futures)
94cffc63 13013 ,@(package-native-inputs base))))))
8ab59181
HG
13014
13015(define-public python-setproctitle
13016(package
13017 (name "python-setproctitle")
13018 (version "1.1.10")
13019 (source
13020 (origin
13021 (method url-fetch)
13022 (uri (pypi-uri "setproctitle" version))
13023 (sha256
13024 (base32
13025 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
13026 (build-system python-build-system)
13027 (arguments
13028 '(#:phases
13029 (modify-phases %standard-phases
13030 (add-before 'check 'patch-Makefile
13031 ;; Stricly this is only required for the python2 variant.
13032 ;; But adding a phase in an inherited package seems to be
13033 ;; cumbersum. So we patch even for python3.
13034 (lambda _
13035 (let ((nose (assoc-ref %build-inputs "python2-nose")))
13036 (when nose
13037 (substitute* "Makefile"
13038 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
13039 (string-append nose "/bin/nosetests "))))
13040 #t)))
13041 (replace 'check
13042 (lambda _
13043 (setenv "PYTHON" (or (which "python3") (which "python")))
13044 (setenv "PYCONFIG" (or (which "python3-config")
13045 (which "python-config")))
13046 (setenv "CC" "gcc")
13047 ;; No need to extend PYTHONPATH to find the built package, since
13048 ;; the Makefile will build anyway
13049 (zero? (system* "make" "check")))))))
13050 (native-inputs
13051 `(("procps" ,procps))) ; required for tests
13052 (home-page
13053 "https://github.com/dvarrazzo/py-setproctitle")
13054 (synopsis
13055 "Setproctitle implementation for Python to customize the process title")
13056 (description "The library allows a process to change its title (as displayed
13057by system tools such as ps and top).
13058
13059Changing the title is mostly useful in multi-process systems, for
13060example when a master process is forked: changing the children's title
13061allows to identify the task each process is busy with. The technique
13062is used by PostgreSQL and the OpenSSH Server for example.")
13063 (license license:bsd-3)
13064 (properties `((python2-variant . ,(delay python2-setproctitle))))))
13065
13066(define-public python2-setproctitle
13067 (let ((base (package-with-python2
13068 (strip-python2-variant python-setproctitle))))
13069 (package
13070 (inherit base)
13071 (native-inputs `(("python2-nose" ,python2-nose)
13072 ,@(package-native-inputs base))))))
162e42d8
HG
13073
13074(define-public python-validictory
13075 (package
13076 (name "python-validictory")
13077 (version "1.0.1")
13078 (source
13079 (origin
13080 (method url-fetch)
13081 (uri (pypi-uri "validictory" version))
13082 (sha256
13083 (base32
13084 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
13085 (build-system python-build-system)
13086 (arguments
13087 '(#:phases
13088 (modify-phases %standard-phases
13089 (add-after 'unpack 'bootstrap
13090 ;; Move the tests out of the package directory to avoid
13091 ;; packaging them.
13092 (lambda* _
13093 (rename-file "validictory/tests" "tests")
13094 (delete-file "tests/__init__.py")))
13095 (replace 'check
13096 (lambda _
13097 ;; Extend PYTHONPATH so the built package will be found.
13098 (setenv "PYTHONPATH"
13099 (string-append (getcwd) "/build/lib:"
13100 (getenv "PYTHONPATH")))
13101 (zero? (system* "py.test" "-vv" )))))))
13102 (native-inputs
13103 `(("python-pytest" ,python-pytest)))
13104 (home-page
13105 "https://github.com/jamesturk/validictory")
13106 (synopsis "General purpose Python data validator")
13107 (description "It allows validation of arbitrary Python data structures.
13108
13109The schema format is based on the JSON Schema
13110proposal (http://json-schema.org), so combined with json the library is also
13111useful as a validator for JSON data.")
f210e944 13112 (license license:expat)))
162e42d8
HG
13113
13114(define-public python2-validictory
f210e944 13115 (package-with-python2 python-validictory))
0990edfe
DM
13116
13117(define-public python-aniso8601
13118 (package
13119 (name "python-aniso8601")
13120 (version "1.1.0")
13121 (source
13122 (origin
13123 (method url-fetch)
13124 (uri (pypi-uri "aniso8601" version))
13125 (sha256
13126 (base32
13127 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
13128 (build-system python-build-system)
13129 (propagated-inputs
22d7360b 13130 `(("python-dateutil" ,python-dateutil)))
0990edfe
DM
13131 (home-page
13132 "https://bitbucket.org/nielsenb/aniso8601")
13133 (synopsis
13134 "Python library for parsing ISO 8601 strings")
13135 (description
13136 "This package contains a library for parsing ISO 8601 datetime strings.")
13137 (license license:bsd-3)))
999d964d
DM
13138
13139(define-public python-flask-restful
13140 (package
13141 (name "python-flask-restful")
13142 (version "0.3.5")
13143 (source
13144 (origin
13145 (method url-fetch)
13146 (uri (pypi-uri "Flask-RESTful" version))
13147 (sha256
13148 (base32
13149 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
13150 (build-system python-build-system)
13151 (propagated-inputs
13152 `(("python-aniso8601" ,python-aniso8601)
13153 ("python-flask" ,python-flask)
13154 ("python-pycrypto" ,python-pycrypto)
13155 ("python-pytz" ,python-pytz)))
13156 (native-inputs
13157 `(;; Optional dependency of Flask. Tests need it.
13158 ("python-blinker" ,python-blinker)
13159 ("python-mock" ,python-mock) ; For tests
13160 ("python-nose" ,python-nose) ; For tests
13161 ("python-sphinx" ,python-sphinx)))
13162 (home-page
13163 "https://www.github.com/flask-restful/flask-restful/")
13164 (synopsis
13165 "Flask module for creating REST APIs")
13166 (description
13167 "This package contains a Flask module for creating REST APIs.")
13168 (license license:bsd-3)))
31288222
DM
13169
13170(define-public python-flask-basicauth
13171 (package
13172 (name "python-flask-basicauth")
13173 (version "0.2.0")
13174 (source
13175 (origin
13176 (method url-fetch)
13177 (uri (pypi-uri "Flask-BasicAuth" version))
13178 (sha256
13179 (base32
13180 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
13181 (build-system python-build-system)
13182 (propagated-inputs
13183 `(("python-flask" ,python-flask)))
13184 (home-page
13185 "https://github.com/jpvanhal/flask-basicauth")
13186 (synopsis
13187 "HTTP basic access authentication for Flask")
13188 (description
13189 "This package provides HTTP basic access authentication for Flask.")
13190 (license license:bsd-3)))
903276d0
DM
13191
13192(define-public python-flask-sqlalchemy
13193 (package
13194 (name "python-flask-sqlalchemy")
13195 (version "2.1")
13196 (source
13197 (origin
13198 (method url-fetch)
13199 (uri (pypi-uri "Flask-SQLAlchemy" version))
13200 (sha256
13201 (base32
13202 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
13203 (build-system python-build-system)
13204 (propagated-inputs
13205 `(("python-flask" ,python-flask)
13206 ("python-sqlalchemy" ,python-sqlalchemy)))
13207 (home-page
7bf837fd 13208 "https://github.com/mitsuhiko/flask-sqlalchemy")
903276d0
DM
13209 (synopsis
13210 "Module adding SQLAlchemy support to your Flask application")
13211 (description
13212 "This package adds SQLAlchemy support to your Flask application.")
13213 (license license:bsd-3)))
329b4b3b
LF
13214
13215(define-public python-pyev
13216 (package
13217 (name "python-pyev")
13218 (version "0.9.0")
13219 (source
13220 (origin
13221 (method url-fetch)
13222 (uri (pypi-uri "pyev" version))
13223 (sha256
13224 (base32
13225 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13226 (build-system python-build-system)
13227 (arguments
13228 `(#:tests? #f ; no test suite
13229 #:phases
13230 (modify-phases %standard-phases
13231 (add-after 'unpack 'patch
13232 (lambda* (#:key inputs #:allow-other-keys)
13233 (let ((libev (string-append (assoc-ref inputs "libev")
13234 "/lib/libev.so.4")))
13235 (substitute* "setup.py"
13236 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13237 (string-append "libev_dll_name = \"" libev "\"")))))))))
13238 (inputs
13239 `(("libev" ,libev)))
13240 (home-page "http://pythonhosted.org/pyev/")
13241 (synopsis "Python libev interface")
13242 (description "Pyev provides a Python interface to libev.")
13243 (license license:gpl3)))
13244
13245(define-public python2-pyev
13246 (package-with-python2 python-pyev))
45b4f127
DM
13247
13248(define-public python-imagesize
13249 (package
13250 (name "python-imagesize")
13251 (version "0.7.1")
13252 (source
13253 (origin
13254 (method url-fetch)
13255 (uri (pypi-uri "imagesize" version))
13256 (sha256
13257 (base32
13258 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
13259 (build-system python-build-system)
9422c98a
LF
13260 (arguments
13261 '(;; Test files are not distributed on PyPi:
13262 ;; https://github.com/shibukawa/imagesize_py/issues/7
13263 #:tests? #f))
45b4f127
DM
13264 (home-page "https://github.com/shibukawa/imagesize_py")
13265 (synopsis "Gets image size of files in variaous formats in Python")
13266 (description
13267 "This package allows determination of image size from
13268PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 13269 (license license:expat)))
45b4f127
DM
13270
13271(define-public python2-imagesize
f210e944 13272 (package-with-python2 python-imagesize))
2f6dd9cd
AI
13273
13274(define-public python-axolotl-curve25519
13275 (package
13276 (name "python-axolotl-curve25519")
13277 (version "0.1")
13278 (source
13279 (origin
13280 (method git-fetch)
13281 (uri (git-reference
13282 (url "git://github.com/tgalal/python-axolotl-curve25519")
13283 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13284 (file-name (string-append name "-" version "-checkout"))
13285 (sha256
13286 (base32
13287 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13288 (build-system python-build-system)
13289 (arguments
13290 `(;; Prevent creation of the egg. This works around
13291 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13292 #:configure-flags '("--root=/")))
2f6dd9cd
AI
13293 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13294 (synopsis "Python wrapper for curve25519 library")
13295 (description "This is a python wrapper for the curve25519 library
13296with ed25519 signatures. The C code was pulled from
13297libaxolotl-android. At the moment this wrapper is meant for use by
13298python-axolotl.")
13299 (license (list license:gpl3 ; Most files
683cdbf5 13300 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
13301
13302(define-public python2-axolotl-curve25519
13303 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
13304
13305(define-public python-axolotl
13306 (package
13307 (name "python-axolotl")
13308 (version "0.1.35")
13309 (source
13310 (origin
13311 (method url-fetch)
13312 (uri (string-append
13313 "https://github.com/tgalal/python-axolotl/archive/"
13314 version ".tar.gz"))
13315 (file-name (string-append name "-" version ".tar.gz"))
13316 (sha256
13317 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13318 (build-system python-build-system)
13319 (arguments
13320 `(#:phases
13321 (modify-phases %standard-phases
13322 ;; Don't install tests
13323 (add-before 'install 'remove-tests
13324 (lambda _
13325 (for-each delete-file-recursively
13326 '("axolotl/tests" "build/lib/axolotl/tests"))
01fb9f66 13327 #t)))))
06ff0837
AI
13328 (propagated-inputs
13329 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13330 ("python-dateutil" ,python-dateutil)
13331 ("python-protobuf" ,python-protobuf)
13332 ("python-pycrypto" ,python-pycrypto)))
13333 (home-page "https://github.com/tgalal/python-axolotl")
13334 (synopsis "Python port of libaxolotl-android")
13335 (description "This is a python port of libaxolotl-android. This
13336is a ratcheting forward secrecy protocol that works in synchronous and
13337asynchronous messaging environments.")
13338 (license license:gpl3)))
13339
13340(define-public python2-axolotl
13341 (package-with-python2 python-axolotl))
e2fca490
DM
13342
13343(define-public python-termstyle
13344 (package
13345 (name "python-termstyle")
13346 (version "0.1.11")
13347 (source
13348 (origin
13349 (method url-fetch)
13350 (uri (pypi-uri "termstyle" version))
13351 (sha256
13352 (base32
13353 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13354 (build-system python-build-system)
7917a135
MB
13355 (arguments
13356 '(#:phases
13357 (modify-phases %standard-phases
13358 (replace 'check
13359 (lambda _
13360 (zero? (system* "python" "test3.py")))))))
7bf837fd 13361 (home-page "https://github.com/gfxmonk/termstyle")
e2fca490
DM
13362 (synopsis "Console text coloring for Python")
13363 (description "This package provides console text coloring for Python.")
13364 (license license:bsd-3)))
1e6112d8
DM
13365
13366(define-public python-rednose
13367 (package
13368 (name "python-rednose")
13369 (version "1.2.1")
13370 (source
13371 (origin
13372 (method url-fetch)
13373 (uri (pypi-uri "rednose" version))
13374 (sha256
13375 (base32
13376 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13377 (build-system python-build-system)
13378 (arguments
13379 `(#:phases
13380 (modify-phases %standard-phases
13381 (add-after 'unpack 'fix-deps
13382 (lambda _
13383 ;; See <https://github.com/JBKahn/rednose/issues/12>
13384 (substitute* "setup.py"
13385 (("python-termstyle") "termstyle"))
13386 #t)))))
13387 (propagated-inputs
13388 `(("python-colorama" ,python-colorama)
13389 ("python-termstyle" ,python-termstyle)))
13390 (native-inputs
13391 `(("python-six" ,python-six)
13392 ("python-nose" ,python-nose)))
13393 (home-page "https://github.com/JBKahn/rednose")
13394 (synopsis "Colored output for Python nosetests")
13395 (description "This package provides colored output for the
13396@command{nosetests} command of the Python Nose unit test framework.")
13397 (license license:bsd-3)))
0a7f17f0 13398
ef74a425
MFM
13399(define-public python2-rednose
13400 (package-with-python2 python-rednose))
13401
0a7f17f0
DM
13402(define-public python-flask-restplus
13403 (package
13404 (name "python-flask-restplus")
13405 (version "0.9.2")
13406 (source
13407 (origin
13408 (method url-fetch)
13409 (uri (pypi-uri "flask-restplus" version))
13410 (sha256
13411 (base32
13412 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13413 (build-system python-build-system)
59f74825
MB
13414 (arguments
13415 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13416 ;; #:phases
13417 ;; (modify-phases %standard-phases
13418 ;; (replace 'check
13419 ;; (lambda _
13420 ;; (zero? (system* "nosetests")))))))
0a7f17f0
DM
13421 (propagated-inputs
13422 `(("python-aniso8601" ,python-aniso8601)
13423 ("python-flask" ,python-flask)
13424 ("python-jsonschema" ,python-jsonschema)
13425 ("python-pytz" ,python-pytz)
13426 ("python-six" ,python-six)))
13427 (native-inputs
13428 `(("python-tzlocal" ,python-tzlocal)
13429 ("python-blinker" ,python-blinker)
13430 ("python-nose" ,python-nose)
13431 ("python-rednose" ,python-rednose)))
13432 (home-page "https://github.com/noirbizarre/flask-restplus")
13433 (synopsis "Framework for documented API development with Flask")
13434 (description "This package provides a framework for API development with
13435the Flask web framework in Python. It is similar to package
13436@code{python-flask-restful} but supports the @code{python-swagger}
13437documentation builder.")
13438 (license license:expat)))
1ed21519
DM
13439
13440(define-public python-sadisplay
13441 (package
13442 (name "python-sadisplay")
13443 (version "0.4.6")
13444 (source
13445 (origin
13446 (method url-fetch)
13447 (uri (pypi-uri "sadisplay" version))
13448 (sha256
13449 (base32
13450 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13451 (build-system python-build-system)
13452 (propagated-inputs
13453 `(("python-sqlalchemy" ,python-sqlalchemy)))
13454 (native-inputs
13455 `(("python-nose" ,python-nose)))
13456 (home-page "https://bitbucket.org/estin/sadisplay")
13457 (synopsis "SQLAlchemy schema displayer")
13458 (description "This package provides a program to build Entity
13459Relationship diagrams from a SQLAlchemy model (or directly from the
13460database).")
13461 (license license:bsd-3)))
13462
13463(define-public python2-sadisplay
13464 (package-with-python2 python-sadisplay))
444a79b6
DM
13465
13466(define-public python-flask-restful-swagger
13467 (package
13468 (name "python-flask-restful-swagger")
13469 (version "0.19")
13470 (source
13471 (origin
13472 (method url-fetch)
13473 (uri (pypi-uri "flask-restful-swagger" version))
13474 (sha256
13475 (base32
13476 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13477 (build-system python-build-system)
13478 (propagated-inputs
13479 `(("python-flask-restful" ,python-flask-restful)))
13480 (home-page "https://github.com/rantav/flask-restful-swagger")
13481 (synopsis "Extract Swagger specs from Flask-Restful projects")
13482 (description "This package lets you extract Swagger API documentation
13483specs from your Flask-Restful projects.")
13484 (license license:expat)))
13485
13486(define-public python2-flask-restful-swagger
13487 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
13488
13489(define-public python-argcomplete
13490 (package
13491 (name "python-argcomplete")
13492 (version "1.7.0")
13493 (source
13494 (origin
13495 (method url-fetch)
13496 (uri (pypi-uri "argcomplete" version))
13497 (sha256
13498 (base32
13499 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13500 (build-system python-build-system)
80ce42bd
MB
13501 (native-inputs
13502 `(("python-pexpect" ,python-pexpect)
13503 ("tcsh" ,tcsh)))
6c2e82bc
TGR
13504 (home-page "https://github.com/kislyuk/argcomplete")
13505 (synopsis "Shell tab completion for Python argparse")
13506 (description "argcomplete provides extensible command line tab completion
13507of arguments and options for Python scripts using @code{argparse}. It's
13508particularly useful for programs with many options or sub-parsers that can
13509dynamically suggest completions; for example, when browsing resources over the
13510network.")
13511 (license license:asl2.0)))
13512
13513(define-public python2-argcomplete
13514 (package-with-python2 python-argcomplete))
361a2fcf
TGR
13515
13516(define-public python-xopen
13517 (package
13518 (name "python-xopen")
13519 (version "0.1.1")
13520 (source
13521 (origin
13522 (method url-fetch)
13523 (uri (pypi-uri "xopen" version))
13524 (sha256
13525 (base32
13526 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13527 (file-name (string-append name "-" version ".tar.gz"))))
13528 (build-system python-build-system)
13529 (home-page "https://github.com/marcelm/xopen/")
13530 (synopsis "Open compressed files transparently")
13531 (description "This module provides an @code{xopen} function that works like
13532Python's built-in @code{open} function, but can also deal with compressed files.
13533Supported compression formats are gzip, bzip2 and, xz, and are automatically
13534recognized by their file extensions. The focus is on being as efficient as
13535possible on all supported Python versions.")
13536 (license license:expat)))
13537
13538(define-public python2-xopen
13539 (package-with-python2 python-xopen))
8d67610b
DM
13540
13541(define-public python2-cheetah
13542 (package
13543 (name "python2-cheetah")
13544 (version "2.4.4")
13545 (source
13546 (origin
13547 (method url-fetch)
13548 (uri (pypi-uri "Cheetah" version))
13549 (sha256
13550 (base32
13551 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13552 (build-system python-build-system)
13553 (arguments
13554 `(#:python ,python-2))
13555 (propagated-inputs
13556 `(("python2-markdown" ,python2-markdown)))
13557 (home-page "https://pythonhosted.org/Cheetah/")
13558 (synopsis "Template engine")
13559 (description "Cheetah is a text-based template engine and Python code
13560generator.
13561
13562Cheetah can be used as a standalone templating utility or referenced as
13563a library from other Python applications. It has many potential uses,
13564but web developers looking for a viable alternative to ASP, JSP, PHP and
13565PSP are expected to be its principle user group.
13566
13567Features:
13568@enumerate
13569@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13570 text-based format.
13571@item Cleanly separates content, graphic design, and program code.
13572@item Blends the power and flexibility of Python with a simple template language
13573 that non-programmers can understand.
13574@item Gives template writers full access to any Python data structure, module,
13575 function, object, or method in their templates.
13576@item Makes code reuse easy by providing an object-orientated interface to
13577 templates that is accessible from Python code or other Cheetah templates.
13578 One template can subclass another and selectively reimplement sections of it.
13579@item Provides a simple, yet powerful, caching mechanism that can dramatically
13580 improve the performance of a dynamic website.
13581@item Compiles templates into optimized, yet readable, Python code.
13582@end enumerate")
13583 (license (license:x11-style "file://LICENSE"))))
916aafa4 13584
d83d8722
DM
13585(define-public python-dulwich
13586 (package
13587 (name "python-dulwich")
13588 (version "0.16.3")
13589 (source
13590 (origin
13591 (method url-fetch)
13592 (uri (list (string-append "https://www.dulwich.io/releases/"
13593 "dulwich-" version ".tar.gz")
13594 (pypi-uri "dulwich" version)))
13595 (sha256
13596 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13597 (build-system python-build-system)
13598 (arguments
13599 `(#:phases
13600 (modify-phases %standard-phases
13601 (add-before 'check 'fix-tests
13602 (lambda* (#:key inputs #:allow-other-keys)
13603 ;; The tests use Popen with a custom environment which doesn't
13604 ;; include PATH.
13605 (substitute* "dulwich/tests/compat/utils.py"
13606 (("'git'") (string-append "'"
13607 (which "git")
13608 "'")))
13609 (substitute* '("dulwich/tests/test_repository.py"
13610 "dulwich/tests/test_hooks.py")
13611 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13612 (setenv "TEST_RUNNER" "unittest")
13613 (setenv "PYTHONHASHSEED" "random")
13614 #t)))))
13615 (propagated-inputs
13616 `(("python-fastimport" ,python-fastimport)))
13617 (native-inputs
13618 `(("python-mock" ,python-mock)
13619 ("python-geventhttpclient" ,python-geventhttpclient)
13620 ("git" ,git)))
13621 (home-page "https://www.dulwich.io/")
13622 (synopsis "Git implementation in Python")
13623 (description "Dulwich is an implementation of the Git file formats and
13624protocols written in pure Python.")
13625 ;; Can be used with either license.
13626 (license (list license:asl2.0 license:gpl2+))))
13627
13628(define-public python2-dulwich
13629 (package-with-python2 python-dulwich))
424b1ae7 13630
916aafa4
CZ
13631(define-public python-pbkdf2
13632 (package
13633 (name "python-pbkdf2")
13634 (version "1.3")
13635 (source
13636 (origin
13637 (method url-fetch)
13638 (uri (pypi-uri "pbkdf2" version))
13639 (sha256
13640 (base32
13641 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13642 (build-system python-build-system)
fffcd8b8
MB
13643 (arguments
13644 '(#:phases
13645 (modify-phases %standard-phases
13646 (replace 'check
13647 (lambda _
13648 (setenv "PYTHONPATH"
13649 (string-append (getcwd) "/build/lib:"
13650 (getenv "PYTHONPATH")))
13651 (zero? (system* "python" "test/test_pbkdf2.py")))))))
916aafa4
CZ
13652 (propagated-inputs
13653 `(("python-pycrypto" ,python-pycrypto))) ; optional
13654 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13655 (synopsis "Password-based key derivation")
13656 (description "This module implements the password-based key derivation
13657function, PBKDF2, specified in RSA PKCS#5 v2.0.
13658
13659PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13660is part of the RSA Public Key Cryptography Standards series. The provided
13661implementation takes a password or a passphrase and a salt value (and
13662optionally a iteration count, a digest module, and a MAC module) and provides
13663a file-like object from which an arbitrarly-sized key can be read.")
13664 (license license:expat)))
13665
13666(define-public python2-pbkdf2
13667 (package-with-python2 python-pbkdf2))
cba84a38
CZ
13668
13669(define-public python-qrcode
13670 (package
13671 (name "python-qrcode")
13672 (version "5.3")
13673 (source
13674 (origin
13675 (method url-fetch)
13676 (uri (pypi-uri "qrcode" version))
13677 (sha256
13678 (base32
13679 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13680 (build-system python-build-system)
6925cd78
MB
13681 (arguments
13682 ;; FIXME: Tests require packaging 'pymaging'.
13683 '(#:tests? #f))
cba84a38
CZ
13684 (propagated-inputs
13685 `(("python-lxml" ,python-lxml) ; for SVG output
13686 ("python-pillow" ,python-pillow) ; for PNG output
13687 ("python-six" ,python-six)))
13688 (home-page "https://github.com/lincolnloop/python-qrcode")
13689 (synopsis "QR Code image generator")
13690 (description "This package provides a pure Python QR Code generator
13691module. It uses the Python Imaging Library (PIL) to allow for the generation
13692of QR Codes.
13693
13694In addition this package provides a command line tool to generate QR codes and
13695either write these QR codes to a file or do the output as ascii art at the
13696console.")
13697 (license license:bsd-3)))
13698
13699(define-public python2-qrcode
13700 (package-with-python2 python-qrcode))
af7caada
CZ
13701
13702;; SlowAES isn't compatible with Python 3.
13703(define-public python2-slowaes
13704 (package
13705 (name "python2-slowaes")
13706 (version "0.1a1")
13707 (source
13708 (origin
13709 (method url-fetch)
13710 (uri (pypi-uri "slowaes" version))
13711 (sha256
13712 (base32
13713 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13714 (build-system python-build-system)
13715 (arguments `(#:python ,python-2))
13716 (home-page "http://code.google.com/p/slowaes/")
13717 (synopsis "Implementation of AES in Python")
13718 (description "This package contains an implementation of AES in Python.
13719This implementation is slow (hence the project name) but still useful when
13720faster ones are not available.")
13721 (license license:asl2.0)))
1a917fc9
MFM
13722
13723(define-public python-rst2ansi
13724 (package
13725 (name "python-rst2ansi")
13726 (version "0.1.5")
13727 (source
13728 (origin
13729 (method url-fetch)
13730 (uri (pypi-uri "rst2ansi" version))
13731 (sha256
13732 (base32
13733 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13734 (build-system python-build-system)
13735 (propagated-inputs
13736 `(("python-docutils" ,python-docutils)))
13737 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13738 (synopsis "Convert RST to ANSI-decorated console output")
13739 (description
13740 "Python module dedicated to rendering RST (reStructuredText) documents
13741to ansi-escaped strings suitable for display in a terminal.")
13742 (license license:expat)))
2f4623db 13743
ca0e62bf
SR
13744(define-public python-ansi2html
13745 (package
13746 (name "python-ansi2html")
13747 (version "1.2.0")
13748 (source
13749 (origin
13750 (method url-fetch)
13751 (uri (pypi-uri "ansi2html" version))
13752 (sha256
13753 (base32
13754 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13755 (build-system python-build-system)
13756 (native-inputs
13757 `(("python-mock" ,python-mock)
13758 ("python-nose" ,python-nose)))
13759 (propagated-inputs
13760 `(("python-six" ,python-six)))
13761 (home-page "http://github.com/ralphbean/ansi2html")
13762 (synopsis "Convert ANSI-decorated console output to HTML")
13763 (description
13764 "@command{ansi2html} is a Python library and command line utility for
13765convering text with ANSI color codes to HTML or LaTeX.")
13766 (license license:gpl3+)))
13767
13768(define-public python2-ansi2html
13769 (package-with-python2 python-ansi2html))
13770
2f4623db
MFM
13771(define-public python-ddt
13772 (package
13773 (name "python-ddt")
13774 (version "1.1.1")
13775 (source
13776 (origin
13777 (method url-fetch)
13778 (uri (pypi-uri "ddt" version))
13779 (sha256
13780 (base32
13781 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13782 (build-system python-build-system)
13783 (native-inputs
13784 `(("python-mock" ,python-mock)
13785 ("python-nose" ,python-nose)))
13786 (propagated-inputs
13787 `(("python-six" ,python-six)
13788 ("python-pyyaml" ,python-pyyaml)))
13789 (home-page "https://github.com/txels/ddt")
13790 (synopsis "Data-Driven Tests")
13791 (description
13792 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13793it with different test data, and make it appear as multiple test cases.")
13794 (license license:expat)))
13795
13796(define-public python2-ddt
13797 (package-with-python2 python-ddt))
2299b137
MFM
13798
13799(define-public python-pycosat
13800 (package
13801 (name "python-pycosat")
13802 (version "0.6.1")
13803 (source
13804 (origin
13805 (method url-fetch)
13806 (uri (pypi-uri "pycosat" version))
13807 (sha256
13808 (base32
13809 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13810 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13811 (build-system python-build-system)
13812 (home-page "https://github.com/ContinuumIO/pycosat")
13813 (synopsis "Bindings to picosat (a SAT solver)")
13814 (description
13815 "This package provides efficient Python bindings to @code{picosat} on
13816the C level. When importing pycosat, the @code{picosat} solver becomes part
13817of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13818Problem} (SAT) solver.")
13819 (license license:expat)))
13820
13821(define-public python2-pycosat
13822 (package-with-python2 python-pycosat))
8fd68504
MFM
13823
13824(define-public python2-ruamel.ordereddict
13825 (package
13826 (name "python2-ruamel.ordereddict")
13827 (version "0.4.9")
13828 (source
13829 (origin
13830 (method url-fetch)
13831 (uri (pypi-uri "ruamel.ordereddict" version))
13832 (sha256
13833 (base32
13834 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13835 (build-system python-build-system)
13836 (arguments
13837 `(#:python ,python-2
13838 #:phases
13839 (modify-phases %standard-phases
13840 (delete 'check)
13841 (add-after 'install 'check
13842 (lambda* (#:key inputs outputs #:allow-other-keys)
13843 (add-installed-pythonpath inputs outputs)
13844 (zero? (system* "python" "test/testordereddict.py")))))))
13845 (home-page "https://bitbucket.org/ruamel/ordereddict")
13846 (synopsis "Version of dict that keeps keys in insertion order")
13847 (description
13848 "This is an implementation of an ordered dictionary with @dfn{Key
13849Insertion Order} (KIO: updates of values do not affect the position of the
13850key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13851removed and put at the back). The standard library module @code{OrderedDict},
13852implemented later, implements a subset of @code{ordereddict} functionality.
13853Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13854Order} (KSO, no sorting function can be specified, but a transform can be
13855specified to apply on the key before comparison (e.g. @code{string.lower})).")
13856 (license license:expat)))
d8768e31
EB
13857
13858(define-public python-pypeg2
13859 (package
13860 (name "python-pypeg2")
13861 (version "2.15.2")
13862 (source
13863 (origin
13864 (method url-fetch)
13865 (uri (pypi-uri "pyPEG2" version))
13866 (sha256
13867 (base32
13868 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13869 (build-system python-build-system)
13870 (propagated-inputs `(("python-lxml" ,python-lxml)))
13871 (arguments
13872 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13873 '(#:tests? #f))
13874 (home-page "https://fdik.org/pyPEG/")
13875 (synopsis "Parsering Expression Grammars in Python")
13876 (description "PyPEG is an intrinsic parser interpreter framework for
13877Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13878parse many formal languages.")
13879 (license license:gpl2)))
33e9490c
AI
13880
13881(define-public python2-cliapp
13882 (package
13883 (name "python2-cliapp")
13884 (version "1.20160724")
13885 (source
13886 (origin
13887 (method url-fetch)
13888 (uri (string-append
13889 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13890 version ".tar.gz"))
13891 (sha256
13892 (base32
13893 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13894 (build-system python-build-system)
13895 (arguments
13896 `(#:python ,python-2))
13897 (propagated-inputs
13898 `(("python2-pyaml" ,python2-pyaml)))
13899 (home-page "https://liw.fi/cliapp/")
13900 (synopsis "Python framework for command line programs")
13901 (description "@code{python2-cliapp} is a python framework for
13902command line programs. It contains the typical stuff such programs
13903need to do, such as parsing the command line for options, and
13904iterating over input files.")
13905 (license license:gpl2+)))
13906
77e99411
AI
13907(define-public python2-ttystatus
13908 (package
13909 (name "python2-ttystatus")
13910 (version "0.32")
13911 (source
13912 (origin
13913 (method url-fetch)
13914 (uri (string-append
13915 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13916 version ".tar.gz"))
13917 (sha256
13918 (base32
13919 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13920 (build-system python-build-system)
13921 (arguments
13922 `(#:python ,python-2))
13923 (home-page "https://liw.fi/ttystatus/")
13924 (synopsis "Python library for showing progress reporting and
13925status updates on terminals")
13926 (description "@code{python2-ttystatus} is a python library for
13927showing progress reporting and status updates on terminals, for
13928command line programs. Output is automatically adapted to the width
13929of the terminal: truncated if it does not fit, and resized if the
13930terminal size changes.")
13931 (license license:gpl3+)))
c220f0b4
AI
13932
13933(define-public python2-tracing
13934 (package
13935 (name "python2-tracing")
13936 (version "0.10")
13937 (source
13938 (origin
13939 (method url-fetch)
13940 (uri (string-append
13941 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13942 version ".tar.gz"))
13943 (sha256
13944 (base32
13945 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13946 (build-system python-build-system)
13947 (arguments
13948 `(#:python ,python-2))
13949 (home-page "https://liw.fi/tracing/")
13950 (synopsis "Python debug logging helper")
13951 (description "@code{python2-tracing} is a python library for
13952logging debug messages. It provides a way to turn debugging messages
13953on and off, based on the filename they occur in. It is much faster
13954than using @code{logging.Filter} to accomplish the same thing, which
13955matters when code is run in production mode. The actual logging still
13956happens using the @code{logging} library.")
13957 (license license:gpl3+)))
b6b2ca5d
AI
13958
13959(define-public python2-larch
13960 (package
13961 (name "python2-larch")
13962 (version "1.20151025")
13963 (source
13964 (origin
13965 (method url-fetch)
13966 (uri (string-append
13967 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13968 version ".tar.gz"))
13969 (sha256
13970 (base32
13971 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13972 (build-system python-build-system)
13973 (arguments
13974 `(#:python ,python-2))
13975 (propagated-inputs
13976 `(("python2-tracing" ,python2-tracing)))
13977 (home-page "https://liw.fi/larch/")
13978 (synopsis "Python copy-on-write B-tree library")
13979 (description "@code{python2-larch} is an implementation of
13980particular kind of B-tree, based on research by Ohad Rodeh. See
13981@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13982on the data structure.
13983
13984The distinctive feature of this B-tree is that a node is never
13985(conceptually) modified. Instead, all updates are done by
13986copy-on-write. This makes it easy to clone a tree, and modify only the
13987clone, while other processes access the original tree.")
13988 (license license:gpl3+)))
35db2d3c
AP
13989
13990(define-public python-htmlmin
13991 (package
13992 (name "python-htmlmin")
13993 (version "0.1.10")
13994 (source
13995 (origin
13996 (method url-fetch)
13997 (uri (pypi-uri "htmlmin" version))
13998 (sha256
13999 (base32
14000 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
14001 (arguments
14002 `(#:tests? #f)) ;htmlmin has no tests
14003 (build-system python-build-system)
14004 (home-page "https://htmlmin.readthedocs.org/en/latest/")
14005 (synopsis "HTML minifier")
14006 (description "@code{htmlmin} is an HTML minifier that just works.
14007It comes with safe defaults and easily configurable options.")
14008 (license license:bsd-3)))
14009
14010(define-public python2-htmlmin
14011 (package-with-python2 python-htmlmin))
78c55663
AP
14012
14013(define-public python-flask-htmlmin
14014 (package
14015 (name "python-flask-htmlmin")
14016 (version "1.2")
14017 (source
14018 (origin
14019 (method url-fetch)
14020 (uri (pypi-uri "Flask-HTMLmin" version))
14021 (sha256
14022 (base32
14023 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
14024 (propagated-inputs
14025 `(("python-flask" ,python-flask)
14026 ("python-htmlmin" ,python-htmlmin)))
14027 (build-system python-build-system)
14028 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
14029 (synopsis "HTML response minifier for Flask")
14030 (description
14031 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
14032 (license license:bsd-3)))
14033
14034(define-public python2-flask-htmlmin
14035 (package-with-python2 python-flask-htmlmin))
a71c8638
AP
14036
14037(define-public python-flask-login
14038 (package
14039 (name "python-flask-login")
14040 (version "0.4.0")
14041 (source
14042 (origin
14043 (method url-fetch)
14044 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
14045 version ".tar.gz"))
14046 (file-name (string-append name "-" version ".tar.gz"))
14047 (sha256
14048 (base32
14049 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
14050 (arguments
14051 ;; Tests fail PEP8 compliance. See:
14052 ;; https://github.com/maxcountryman/flask-login/issues/340
14053 `(#:tests? #f))
14054 (build-system python-build-system)
14055 (home-page "https://github.com/maxcountryman/flask-login")
14056 (synopsis "User session management for Flask")
14057 (description
14058 "@code{Flask-Login} provides user session management for Flask. It
14059handles the common tasks of logging in, logging out, and remembering your
14060users' sessions over extended periods of time.")
14061 (license license:expat)))
14062
14063(define-public python2-flask-login
14064 (package-with-python2 python-flask-login))
d5ef113c
AI
14065
14066(define-public python-astroid
14067 (package
14068 (name "python-astroid")
de2f56cf 14069 (version "1.5.3")
d5ef113c
AI
14070 (source
14071 (origin
14072 (method url-fetch)
14073 (uri (string-append
14074 "https://github.com/PyCQA/astroid/archive/astroid-"
14075 version ".tar.gz"))
14076 (sha256
14077 (base32
de2f56cf 14078 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
d5ef113c
AI
14079 (build-system python-build-system)
14080 (propagated-inputs
14081 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
14082 ("python-six" ,python-six)
14083 ("python-wrapt" ,python-wrapt)))
14084 (arguments
14085 `(#:phases
14086 (modify-phases %standard-phases
14087 (replace 'check
14088 (lambda _
14089 (zero? (system* "python" "-m" "unittest" "discover"
14090 "-p" "unittest*.py")))))))
14091 (home-page "https://github.com/PyCQA/astroid")
14092 (synopsis "Common base representation of python source code for pylint and
14093other projects")
14094 (description "@code{python-astroid} provides a common base representation
14095of python source code for projects such as pychecker, pyreverse, pylint, etc.
14096
14097It provides a compatible representation which comes from the _ast module. It
14098rebuilds the tree generated by the builtin _ast module by recursively walking
14099down the AST and building an extended ast. The new node classes have
14100additional methods and attributes for different usages. They include some
14101support for static inference and local name scopes. Furthermore, astroid
14102builds partial trees by inspecting living objects.")
de2f56cf
MB
14103 (license license:lgpl2.1+)
14104 (properties `((python2-variant . ,(delay python2-astroid))))))
d5ef113c
AI
14105
14106(define-public python2-astroid
de2f56cf
MB
14107 (let ((base (package-with-python2
14108 (strip-python2-variant python-astroid))))
14109 (package (inherit base)
14110 (propagated-inputs
14111 `(("python2-backports-functools-lru-cache"
14112 ,python2-backports-functools-lru-cache)
14113 ("python2-enum34" ,python2-enum34)
14114 ("python2-singledispatch" ,python2-singledispatch)
14115 ,@(package-propagated-inputs base))))))
6ba0af79
AI
14116
14117(define-public python-isort
14118 (package
14119 (name "python-isort")
14120 (version "4.2.5")
14121 (source
14122 (origin
14123 (method url-fetch)
14124 (uri (string-append
14125 "https://github.com/timothycrosley/isort/archive/"
14126 version ".tar.gz"))
14127 (file-name (string-append name "-" version ".tar.gz"))
14128 (sha256
14129 (base32
14130 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
14131 (build-system python-build-system)
14132 (native-inputs
14133 `(("python-mock" ,python-mock)
14134 ("python-pytest" ,python-pytest)))
14135 (home-page "https://github.com/timothycrosley/isort")
14136 (synopsis "Python utility/library to sort python imports")
14137 (description "@code{python-isort} is a python utility/library to sort
14138imports alphabetically, and automatically separated into sections. It
14139provides a command line utility, a python library and plugins for various
14140editors.")
14141 (license license:expat)))
14142
14143(define-public python2-isort
14144 (package-with-python2 python-isort))
965a083e
AI
14145
14146(define-public python2-backports-functools-lru-cache
14147 (package
14148 (name "python2-backports-functools-lru-cache")
14149 (version "1.3")
14150 (source
14151 (origin
14152 (method url-fetch)
14153 ;; only the pypi tarballs contain the necessary metadata
14154 (uri (pypi-uri "backports.functools_lru_cache" version))
14155 (sha256
14156 (base32
14157 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
14158 (build-system python-build-system)
14159 (native-inputs
14160 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14161 (arguments
14162 `(#:python ,python-2))
14163 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14164 (synopsis "Backport of functools.lru_cache from Python 3.3")
14165 (description "@code{python2-backports-functools-lru-cache} is a backport
14166of @code{functools.lru_cache} from python 3.3.")
14167 (license license:expat)))
23db3fc6
AI
14168
14169(define-public python-configparser
14170 (package
14171 (name "python-configparser")
14172 (version "3.5.0")
14173 (source
14174 (origin
14175 (method url-fetch)
14176 (uri (string-append
14177 "https://bitbucket.org/ambv/configparser/get/"
14178 version ".tar.bz2"))
14179 (file-name (string-append name "-" version ".tar.gz"))
14180 (sha256
14181 (base32
14182 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
14183 (build-system python-build-system)
14184 (home-page "http://docs.python.org/py3k/library/configparser.html")
14185 (synopsis "Backport of configparser from python 3.5")
14186 (description "@code{python-configparser} is a backport of
14187@code{configparser} from Python 3.5 so that it can be used directly
14188in other versions.")
14189 (license license:expat)))
14190
14191(define-public python2-configparser
14192 (package-with-python2 python-configparser))
61550ded
AI
14193
14194(define-public python2-coverage-test-runner
14195 (package
14196 (name "python2-coverage-test-runner")
14197 (version "1.11")
14198 (source
14199 (origin
14200 (method url-fetch)
14201 (uri (string-append
14202 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
14203 "coverage-test-runner/snapshot/coverage-test-runner-"
14204 version ".tar.gz"))
14205 (sha256
14206 (base32
14207 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
14208 (build-system python-build-system)
14209 (arguments
14210 `(#:python ,python-2
14211 #:phases
14212 (modify-phases %standard-phases
14213 (replace 'check
14214 (lambda _
14215 (zero? (system* "./testrun")))))))
14216 (propagated-inputs
14217 `(("python2-coverage" ,python2-coverage)))
14218 (home-page "https://liw.fi/coverage-test-runner/")
14219 (synopsis "Python module for running unit tests")
14220 (description "@code{CoverageTestRunner} is a python module for running
d1e4ad1b 14221unit tests and failing them if the unit test module does not exercise all
61550ded
AI
14222statements in the module it tests.")
14223 (license license:gpl3+)))
315944a3
AI
14224
14225(define-public python-pylint
14226 (package
14227 (name "python-pylint")
a8a964db 14228 (version "1.7.2")
315944a3
AI
14229 (source
14230 (origin
14231 (method url-fetch)
14232 (uri (string-append
14233 "https://github.com/PyCQA/pylint/archive/pylint-"
14234 version ".tar.gz"))
14235 (sha256
14236 (base32
a8a964db 14237 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
315944a3
AI
14238 (build-system python-build-system)
14239 (native-inputs
a8a964db
MB
14240 `(("python-pytest" ,python-pytest)
14241 ("python-pytest-runner" ,python-pytest-runner)
14242 ("python-tox" ,python-tox)))
315944a3
AI
14243 (propagated-inputs
14244 `(("python-astroid" ,python-astroid)
14245 ("python-isort" ,python-isort)
14246 ("python-mccabe" ,python-mccabe)
14247 ("python-six" ,python-six)))
14248 (arguments
14249 `(#:phases
14250 (modify-phases %standard-phases
14251 (replace 'check
14252 (lambda _
14253 ;; Somehow, tests for python2-pylint
14254 ;; fail if run from the build directory
14255 (let ((work "/tmp/work"))
14256 (mkdir-p work)
14257 (setenv "PYTHONPATH"
14258 (string-append (getenv "PYTHONPATH") ":" work))
14259 (copy-recursively "." work)
14260 (with-directory-excursion "/tmp"
14261 (zero? (system* "python" "-m" "unittest" "discover"
14262 "-s" (string-append work "/pylint/test")
14263 "-p" "*test_*.py")))))))))
14264 (home-page "https://github.com/PyCQA/pylint")
14265 (synopsis "Python source code analyzer which looks for coding standard
14266errors")
14267 (description "Pylint is a Python source code analyzer which looks
14268for programming errors, helps enforcing a coding standard and sniffs
14269for some code smells (as defined in Martin Fowler's Refactoring book).
14270
14271Pylint has many rules enabled by default, way too much to silence them
14272all on a minimally sized program. It's highly configurable and handle
14273pragmas to control it from within your code. Additionally, it is
14274possible to write plugins to add your own checks.")
14275 (license license:gpl2+)))
14276
14277(define-public python2-pylint
14278 (let ((pylint (package-with-python2 python-pylint)))
14279 (package (inherit pylint)
14280 (propagated-inputs
14281 `(("python2-backports-functools-lru-cache"
14282 ,python2-backports-functools-lru-cache)
14283 ("python2-configparser" ,python2-configparser)
14284 ,@(package-propagated-inputs pylint))))))
5d0c3ba8
MFM
14285
14286(define-public python-paramunittest
14287 (package
14288 (name "python-paramunittest")
14289 (version "0.2")
14290 (source
14291 (origin
14292 (method url-fetch)
14293 (uri (pypi-uri "ParamUnittest" version))
14294 (sha256
14295 (base32
14296 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14297 (build-system python-build-system)
14298 (home-page
14299 "https://github.com/rik0/ParamUnittest")
14300 (synopsis
14301 "Simple extension to have parametrized unit tests")
14302 (description
14303 "This package allows to create parametrized unit-tests that work with the standard
14304unittest package. A parametrized test case is automatically converted to multiple test
14305cases. Since they are TestCase subclasses, they work with other test suites that
14306recognize TestCases.")
14307 (license license:bsd-2)))
14308
14309(define-public python2-python-paramunittest
14310 (package-with-python2 python-paramunittest))
eec21d4b
MFM
14311
14312(define-public python-mando
14313 (package
14314 (name "python-mando")
14315 (version "0.5")
14316 (source
14317 (origin
14318 (method url-fetch)
14319 (uri (pypi-uri "mando" version))
14320 (sha256
14321 (base32
14322 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14323 (build-system python-build-system)
14324 (propagated-inputs
14325 `(("python-rst2ansi" ,python-rst2ansi)))
14326 (native-inputs
14327 `(("python-sphinx" ,python-sphinx-1.5.3)
14328 ("python-paramunittest" ,python-paramunittest)))
14329 (home-page "https://mando.readthedocs.org/")
14330 (synopsis
14331 "Wrapper around argparse, allowing creation of complete CLI applications")
14332 (description
14333 "This package is a wrapper around argparse, allowing you to write complete CLI
14334 applications in seconds while maintaining all the flexibility.")
14335 (license license:expat)))
14336
14337(define-public python2-mando
14338 (package-with-python2 python-mando))
b98d4ec0
MFM
14339
14340(define-public python-mando-0.3.1
14341 ;; python-radon (version 1.5.0) has a requirement
14342 ;; for mando<0.4,>=0.3
14343 (package
14344 (inherit python-mando)
14345 (name "python-mando")
14346 (version "0.3.1")
14347 (source
14348 (origin
14349 (method url-fetch)
14350 (uri (string-append "https://github.com/rubik/mando/archive/v"
14351 version
14352 ".tar.gz"))
14353 (sha256
14354 (base32
14355 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
16fe516e
BS
14356
14357(define-public python-fudge
14358 (package
14359 (name "python-fudge")
14360 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14361 ;; package, which is currently the only use of this package.
14362 (version "0.9.6")
14363 (source
14364 (origin
14365 (method url-fetch)
14366 (uri (pypi-uri "fudge" version))
14367 (sha256
14368 (base32
14369 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14370 (build-system python-build-system)
14371 (arguments
14372 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14373 (home-page "https://github.com/fudge-py/fudge")
14374 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14375 (description
14376 "Fudge is a Python module for using fake objects (mocks and stubs) to
14377test real ones.
14378
14379In readable Python code, you declare the methods available on your fake object
14380and how they should be called. Then you inject that into your application and
14381start testing. This declarative approach means you don’t have to record and
14382playback actions and you don’t have to inspect your fakes after running code.
14383If the fake object was used incorrectly then you’ll see an informative
14384exception message with a traceback that points to the culprit.")
14385 (license license:expat)))
14386
14387(define-public python2-fudge
14388 (package-with-python2 python-fudge))
f3f8d159
DM
14389
14390(define-public python-oauth2client
14391 (package
14392 (name "python-oauth2client")
14393 (version "4.0.0")
14394 (source
14395 (origin
14396 (method url-fetch)
14397 (uri (pypi-uri "oauth2client" version))
14398 (sha256
14399 (base32
14400 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14401 (build-system python-build-system)
14402 (arguments
14403 `(#:tests? #f))
14404 (propagated-inputs
14405 `(("python-httplib2" ,python-httplib2)
14406 ("python-pyasn1" ,python-pyasn1)
14407 ("python-pyasn1-modules" ,python-pyasn1-modules)
14408 ("python-rsa" ,python-rsa)
14409 ("python-six" ,python-six)))
14410 (home-page "http://github.com/google/oauth2client/")
14411 (synopsis "OAuth 2.0 client library")
14412 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14413library for Python")
14414 (license license:asl2.0)))
6e7302e9
DM
14415
14416(define-public python-flask-oidc
14417 (package
14418 (name "python-flask-oidc")
14419 (version "1.1.1")
14420 (source
14421 (origin
14422 (method url-fetch)
14423 (uri (pypi-uri "flask-oidc" version))
14424 (sha256
14425 (base32
14426 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14427 (build-system python-build-system)
14428 (propagated-inputs
14429 `(("python-flask" ,python-flask)
14430 ("python-itsdangerous" ,python-itsdangerous)
14431 ("python-oauth2client" ,python-oauth2client)
14432 ("python-six" ,python-six)))
14433 (native-inputs
14434 `(("python-nose" ,python-nose)
14435 ("python-mock" ,python-mock)))
14436 (home-page "https://github.com/puiterwijk/flask-oidc")
14437 (synopsis "OpenID Connect extension for Flask")
14438 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14439for Flask.")
14440 (license license:bsd-2)))
7e16478f
DM
14441
14442(define-public python-mwclient
14443 (package
14444 (name "python-mwclient")
14445 (version "0.8.4")
14446 (source
14447 (origin
14448 (method url-fetch)
14449 ;; The PyPI version wouldn't contain tests.
14450 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14451 "v" version ".tar.gz"))
14452 (sha256
14453 (base32
14454 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14455 (build-system python-build-system)
14456 (propagated-inputs
14457 `(("python-requests" ,python-requests)
14458 ("python-requests-oauthlib"
14459 ,python-requests-oauthlib)
14460 ("python-six" ,python-six)))
14461 (native-inputs
14462 `(("python-mock" ,python-mock)
14463 ("python-pytest" ,python-pytest)
14464 ("python-pytest-pep8" ,python-pytest-pep8)
14465 ("python-pytest-cache" ,python-pytest-cache)
14466 ("python-pytest-cov" ,python-pytest-cov)
14467 ("python-responses" ,python-responses)))
14468 (home-page "https://github.com/btongminh/mwclient")
14469 (synopsis "MediaWiki API client")
14470 (description "This package provides a MediaWiki API client.")
14471 (license license:expat)))
14472
14473(define-public python2-mwclient
14474 (package-with-python2 python-mwclient))
59a97288
JL
14475
14476(define-public python-pytest-warnings
14477 (package
14478 (name "python-pytest-warnings")
14479 (version "0.2.0")
14480 (source
14481 (origin
14482 (method url-fetch)
14483 (uri (pypi-uri "pytest-warnings" version))
14484 (sha256
14485 (base32
14486 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14487 (build-system python-build-system)
14488 (propagated-inputs
14489 `(("pytest" ,python-pytest-3.0)))
14490 (home-page "https://github.com/fschulze/pytest-warnings")
14491 (synopsis "Pytest plugin to list Python warnings in pytest report")
14492 (description
14493 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14494pytest report.")
14495 (license license:expat)))
14496
14497(define-public python2-pytest-warnings
14498 (package-with-python2 python-pytest-warnings))
2d6e56ba 14499
a12b30a0
DM
14500(define-public python-pytest-capturelog
14501 (package
14502 (name "python-pytest-capturelog")
14503 (version "0.7")
14504 (source
14505 (origin
14506 (method url-fetch)
14507 (uri (pypi-uri "pytest-capturelog" version ".tar.gz"))
14508 (sha256
14509 (base32
14510 "038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
14511 (build-system python-build-system)
14512 (propagated-inputs
14513 `(("pytest" ,python-pytest-3.0)))
14514 (home-page "http://bitbucket.org/memedough/pytest-capturelog/overview")
14515 (synopsis "Pytest plugin to catch log messages")
14516 (description
14517 "Python-pytest-catchlog is a pytest plugin to catch log messages.")
14518 (license license:expat)))
14519
14520(define-public python2-pytest-capturelog
14521 (package-with-python2 python-pytest-capturelog))
14522
2d6e56ba
JL
14523(define-public python-pytest-catchlog
14524 (package
14525 (name "python-pytest-catchlog")
14526 (version "1.2.2")
14527 (source
14528 (origin
14529 (method url-fetch)
14530 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14531 (sha256
14532 (base32
14533 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14534 (build-system python-build-system)
14535 (native-inputs
14536 `(("unzip" ,unzip)))
14537 (propagated-inputs
14538 `(("pytest" ,python-pytest-3.0)))
14539 (home-page "https://github.com/eisensheng/pytest-catchlog")
14540 (synopsis "Pytest plugin to catch log messages")
14541 (description
14542 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14543a fork of pytest-capturelog.")
14544 (license license:expat)))
14545
14546(define-public python2-pytest-catchlog
14547 (package-with-python2 python-pytest-catchlog))
75805449
JL
14548
14549(define-public python-utils
14550 (package
14551 (name "python-utils")
14552 (version "2.1.0")
14553 (source (origin
14554 (method url-fetch)
14555 (uri (pypi-uri "python-utils" version))
14556 (sha256
14557 (base32
14558 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14559 (build-system python-build-system)
14560 (native-inputs
14561 `(("pytest-runner" ,python-pytest-runner)
14562 ("pytest" ,python-pytest)
14563 ("six" ,python-six)))
14564 (home-page "https://github.com/WoLpH/python-utils")
14565 (synopsis "Convenient utilities not included with the standard Python install")
14566 (description
14567 "Python Utils is a collection of small Python functions and classes which
14568make common patterns shorter and easier.")
14569 (license license:bsd-2)))
14570
14571(define-public python2-utils
14572 (package-with-python2 python-utils))
709a5a93
JL
14573
14574(define-public python-webassets
14575 (package
14576 (name "python-webassets")
14577 (version "0.12.1")
14578 (source
14579 (origin
14580 (method url-fetch)
14581 (uri (pypi-uri "webassets" version))
14582 (sha256
14583 (base32
14584 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14585 (build-system python-build-system)
14586 (native-inputs
14587 `(("python-jinja2" ,python-jinja2)
14588 ("python-mock" ,python-mock)
14589 ("python-nose" ,python-nose)
14590 ("python-pytest" ,python-pytest)))
14591 (home-page "https://github.com/miracle2k/webassets")
14592 (synopsis "Media asset management")
14593 (description "Merges, minifies and compresses Javascript and CSS files,
14594supporting a variety of different filters, including YUI, jsmin, jspacker or
14595CSS tidy. Also supports URL rewriting in CSS files.")
14596 (license license:bsd-2)))
4c066b72
JL
14597
14598(define-public python-sphinx-me
14599 (package
14600 (name "python-sphinx-me")
14601 (version "0.3")
14602 (source
14603 (origin
14604 (method url-fetch)
14605 (uri (pypi-uri "sphinx-me" version))
14606 (sha256
14607 (base32
14608 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14609 (build-system python-build-system)
14610 (home-page "https://github.com/stephenmcd/sphinx-me")
14611 (synopsis "Create a Sphinx documentation shell")
14612 (description
14613 "Create a Sphinx documentation shell for your project and include the
14614README file as the documentation index. It handles extracting the required
14615meta data such as the project name, author and version from your project for
14616use in your Sphinx docs.")
14617 (license license:bsd-2)))
14618
14619(define-public python2-sphinx-me
14620 (package-with-python2 python-sphinx-me))
03ded2fd
JL
14621
14622(define-public python-cssmin
14623 (package
14624 (name "python-cssmin")
14625 (version "0.2.0")
14626 (source
14627 (origin
14628 (method url-fetch)
14629 (uri (pypi-uri "cssmin" version))
14630 (sha256
14631 (base32
14632 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14633 (build-system python-build-system)
14634 (home-page "https://github.com/zacharyvoase/cssmin")
14635 (synopsis "Python port of the YUI CSS Compressor")
14636 (description "Python port of the YUI CSS Compressor.")
14637 (license (list license:expat license:bsd-3))))
14638
14639(define-public python2-cssmin
14640 (package-with-python2 python-cssmin))
186d4f8d
JL
14641
14642(define-public python-diff-match-patch
14643 (package
14644 (name "python-diff-match-patch")
14645 (version "20121119")
14646 (source
14647 (origin
14648 (method url-fetch)
14649 (uri (pypi-uri "diff-match-patch" version))
14650 (sha256
14651 (base32
14652 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14653 (build-system python-build-system)
14654 (home-page "https://code.google.com/p/google-diff-match-patch")
14655 (synopsis "Synchronize plain text")
14656 (description "Diff Match and Patch libraries offer robust algorithms to
14657perform the operations required for synchronizing plain text.")
14658 (license license:asl2.0)))
14659
14660(define-public python2-diff-match-patch
14661 (package-with-python2 python-diff-match-patch))
d15a4791
JL
14662
14663(define-public python-dirsync
14664 (package
14665 (name "python-dirsync")
14666 (version "2.2.2")
14667 (source
14668 (origin
14669 (method url-fetch)
14670 (uri (pypi-uri "dirsync" version ".zip"))
14671 (sha256
14672 (base32
14673 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14674 (build-system python-build-system)
14675 (native-inputs
14676 `(("unzip" ,unzip)))
14677 (propagated-inputs
14678 `(("six" ,python-six)))
14679 (home-page "https://bitbucket.org/tkhyn/dirsync")
14680 (synopsis "Advanced directory tree synchronisation tool")
14681 (description "Advanced directory tree synchronisation tool.")
14682 (license license:expat)))
14683
14684(define-public python2-dirsync
14685 (package-with-python2 python-dirsync))
1b16f1ec
JL
14686
14687(define-public python-nosexcover
14688 (package
14689 (name "python-nosexcover")
14690 (version "1.0.11")
14691 (source (origin
14692 (method url-fetch)
14693 (uri (pypi-uri "nosexcover" version))
14694 (sha256
14695 (base32
14696 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
14697 (build-system python-build-system)
14698 (propagated-inputs
14699 `(("python-coverage" ,python-coverage)
14700 ("python-nose" ,python-nose)))
14701 (home-page "http://github.com/cmheisel/nose-xcover")
14702 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
14703 (description "Nose-xcover is a companion to the built-in
14704@code{nose.plugins.cover}. This plugin will write out an XML coverage report
14705to a file named coverage.xml.
14706
14707It will honor all the options you pass to the Nose coverage plugin,
14708especially -cover-package.")
14709 (license license:expat)))
14710
14711(define-public python2-nosexcover
14712 (package-with-python2 python-nosexcover))
afdfbb1d
JL
14713
14714(define-public python-elasticsearch
14715 (package
14716 (name "python-elasticsearch")
14717 (version "1.0.0")
14718 (source
14719 (origin
14720 (method url-fetch)
14721 (uri (pypi-uri "elasticsearch" version))
14722 (sha256
14723 (base32
14724 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
14725 (build-system python-build-system)
14726 (native-inputs
14727 `(("python-mock" ,python-mock)
14728 ("python-nosexcover" ,python-nosexcover)
14729 ("python-pyaml" ,python-pyaml)
14730 ("python-requests" ,python-requests)))
14731 (propagated-inputs
14732 `(("urllib3" ,python-urllib3)))
14733 (arguments
14734 ;; tests require the test_elasticsearch module but it is not distributed.
14735 `(#:tests? #f))
14736 (home-page "https://github.com/elastic/elasticsearch-py")
14737 (synopsis "Low-level client for Elasticsearch")
14738 (description "Official low-level client for Elasticsearch. Its goal is to
14739provide common ground for all Elasticsearch-related code in Python; because of
14740this it tries to be opinion-free and very extendable.")
14741 (license license:expat)))
14742
14743(define-public python2-elasticsearch
14744 (package-with-python2 python-elasticsearch))
a17ccbbb
JL
14745
14746(define-public python-levenshtein
14747 (package
14748 (name "python-levenshtein")
14749 (version "0.12.0")
14750 (source
14751 (origin
14752 (method url-fetch)
14753 (uri (pypi-uri "python-Levenshtein" version))
14754 (sha256
14755 (base32
14756 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14757 (build-system python-build-system)
14758 (home-page "https://github.com/ztane/python-Levenshtein")
14759 (synopsis "Fast computation of Levenshtein distance and string similarity")
14760 (description
14761 "The Levenshtein Python C extension module contains functions for fast computation of
14762@enumerate
14763@item Levenshtein (edit) distance, and edit operations
14764@item string similarity
14765@item approximate median strings, and generally string averaging
14766@item string sequence and set similarity
14767@end enumerate
14768It supports both normal and Unicode strings.")
14769 (license license:gpl2+)))
14770
14771(define-public python2-levenshtein
14772 (package-with-python2 python-levenshtein))
38a370d2
JL
14773
14774(define-public python-scandir
14775 (package
14776 (name "python-scandir")
14777 (version "1.4")
14778 (source
14779 (origin
14780 (method url-fetch)
14781 (uri (pypi-uri "scandir" version))
14782 (sha256
14783 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
14784 (build-system python-build-system)
14785 (home-page "https://github.com/benhoyt/scandir")
14786 (synopsis "Directory iteration function")
14787 (description
14788 "Directory iteration function like os.listdir(), except that instead of
14789returning a list of bare filenames, it yields DirEntry objects that include
14790file type and stat information along with the name. Using scandir() increases
14791the speed of os.walk() by 2-20 times (depending on the platform and file
14792system) by avoiding unnecessary calls to os.stat() in most cases.")
14793 (license license:bsd-3)))
14794
14795(define-public python2-scandir
14796 (package-with-python2 python-scandir))
18c25460
JL
14797
14798(define-public python2-stemming
14799 (package
14800 (name "python2-stemming")
14801 (version "1.0.1")
14802 (source
14803 (origin
14804 (method url-fetch)
14805 (uri (pypi-uri "stemming" version))
14806 (sha256
14807 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14808 (build-system python-build-system)
14809 (arguments
14810 `(#:python ,python-2))
14811 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14812 (synopsis "Python implementations of various stemming algorithms")
14813 (description
14814 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14815stemming algorithms for English. These implementations are straightforward and
14816efficient, unlike some Python versions of the same algorithms available on the
14817Web. This package is an extraction of the stemming code included in the Whoosh
14818search engine.")
14819 (license license:public-domain)))
54153b85
JL
14820
14821(define-public python-factory-boy
14822 (package
14823 (name "python-factory-boy")
14824 (version "2.8.1")
14825 (source
14826 (origin
14827 (method url-fetch)
14828 (uri (pypi-uri "factory_boy" version))
14829 (sha256
14830 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14831 (build-system python-build-system)
14832 (arguments
14833 ;; Tests are not included in the tarball.
14834 `(#:tests? #f))
14835 (propagated-inputs
14836 `(("faker" ,python-faker)))
14837 (home-page "https://github.com/benhoyt/scandir")
14838 (synopsis "Versatile test fixtures replacement")
14839 (description
14840 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14841
14842As a fixtures replacement tool, it aims to replace static, hard to maintain
14843fixtures with easy-to-use factories for complex object.
14844
14845Instead of building an exhaustive test setup with every possible combination
14846of corner cases, factory_boy allows you to use objects customized for the
14847current test, while only declaring the test-specific fields")
14848 (license license:expat)))
14849
14850(define-public python2-factory-boy
14851 (package-with-python2 python-factory-boy))
5f25fd69
JL
14852
14853(define-public python-translate-toolkit
14854 (package
14855 (name "python-translate-toolkit")
14856 (version "2.1.0")
14857 (source
14858 (origin
14859 (method url-fetch)
14860 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14861 (sha256
14862 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14863 (build-system python-build-system)
14864 (native-inputs
14865 `(("python-pytest" ,python-pytest)
14866 ("python-sphinx" ,python-sphinx)))
14867 (propagated-inputs
14868 `(("python-babel" ,python-babel)
14869 ("python-beautifulsoup4" ,python-beautifulsoup4)
14870 ("python-chardet" ,python-chardet)
14871 ("python-diff-match-patch" ,python-diff-match-patch)
14872 ("python-levenshtein" ,python-levenshtein)
14873 ("python-lxml" ,python-lxml)
14874 ("python-six" ,python-six)
14875 ("python-vobject" ,python-vobject)
14876 ("python-pyyaml" ,python-pyyaml)))
14877 (arguments
14878 ;; TODO: tests are not run, because they end with
14879 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14880 ;; 'parse_funcs'
14881 ;; during test setup.
14882 `(#:tests? #f))
14883 (home-page "http://toolkit.translatehouse.org")
14884 (synopsis "Tools and API for translation and localization engineering")
14885 (description
14886 "Tools and API for translation and localization engineering. It contains
14887several utilities, as well as an API for building localization tools.")
14888 (license license:gpl2+)))
14889
14890(define-public python2-translate-toolkit
14891 (package-with-python2 python-translate-toolkit))
3b08d1a6
JL
14892
14893(define-public python-mysqlclient
14894 (package
14895 (name "python-mysqlclient")
14896 (version "1.3.10")
14897 (source
14898 (origin
14899 (method url-fetch)
14900 (uri (pypi-uri "mysqlclient" version))
14901 (sha256
14902 (base32
14903 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
14904 (build-system python-build-system)
14905 (native-inputs
14906 `(("mariadb" ,mariadb)
14907 ("nose" ,python-nose)
14908 ("mock" ,python-mock)
14909 ("py.test" ,python-pytest)))
14910 (inputs
14911 `(("mysql" ,mysql)
14912 ("libz" ,zlib)
14913 ("openssl" ,openssl)))
14914 (home-page "https://github.com/PyMySQL/mysqlclient-python")
14915 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
14916 (description "MySQLdb is an interface to the popular MySQL database server
14917for Python. The design goals are:
14918@enumerate
14919@item Compliance with Python database API version 2.0 [PEP-0249],
14920@item Thread-safety,
14921@item Thread-friendliness (threads will not block each other).
14922@end enumerate")
14923 (license license:gpl2)))
14924
14925(define-public python2-mysqlclient
14926 (package-with-python2 python-mysqlclient))
c009e934
JL
14927
14928(define-public python-hiredis
14929 (package
14930 (name "python-hiredis")
14931 (version "0.2.0")
14932 (source
14933 (origin
14934 (method url-fetch)
14935 (uri (pypi-uri "hiredis" version))
14936 (sha256
14937 (base32
14938 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
14939 (build-system python-build-system)
14940 (arguments
14941 ;; no tests
14942 `(#:tests? #f))
14943 (home-page "https://github.com/redis/hiredis-py")
14944 (synopsis "Python extension that wraps protocol parsing code in hiredis")
14945 (description "Python-hiredis is a python extension that wraps protocol
14946parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
14947 (license license:bsd-3)))
14948
14949(define-public python2-hiredis
14950 (package-with-python2 python-hiredis))
91154d4a
JL
14951
14952(define-public python-fakeredis
14953 (package
14954 (name "python-fakeredis")
14955 (version "0.8.2")
14956 (source
14957 (origin
14958 (method url-fetch)
14959 (uri (pypi-uri "fakeredis" version))
14960 (sha256
14961 (base32
14962 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
14963 (build-system python-build-system)
14964 (arguments
14965 ;; no tests
14966 `(#:tests? #f))
14967 (home-page "https://github.com/jamesls/fakeredis")
14968 (synopsis "Fake implementation of redis API for testing purposes")
14969 (description "Fakeredis is a pure python implementation of the redis-py
14970python client that simulates talking to a redis server. This was created for a
14971single purpose: to write unittests. Setting up redis is not hard, but many time
14972 you want to write unittests that do not talk to an external server (such as
14973redis). This module now allows tests to simply use this module as a reasonable
14974substitute for redis.")
14975 (license license:bsd-3)))
14976
14977(define-public python2-fakeredis
14978 (package-with-python2 python-fakeredis))
d1693269
DM
14979
14980(define-public python-behave-web-api
14981 (package
14982 (name "python-behave-web-api")
14983 (version "1.0.6")
14984 (source
14985 (origin
14986 (method url-fetch)
14987 (uri (pypi-uri "behave-web-api" version))
14988 (sha256
14989 (base32
14990 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
14991 (build-system python-build-system)
14992 (arguments
14993 `(#:phases
14994 (modify-phases %standard-phases
14995 (add-after 'unpack 'fix-dependencies
14996 (lambda _
14997 (substitute* "setup.py"
14998 (("'wheel'") "") ; We don't use it.
14999 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
15000 (propagated-inputs
15001 `(("behave" ,behave)
15002 ("python-requests" ,python-requests)))
15003 (home-page "https://github.com/jefersondaniel/behave-web-api")
15004 (synopsis "Provides testing for JSON APIs with Behave for Python")
15005 (description "This package provides testing utility modules for testing
15006JSON APIs with Behave.")
15007 (license license:expat)))
15008
15009(define-public python2-behave-web-api
15010 (package-with-python2 python-behave-web-api))
75baf319
DM
15011
15012(define-public python-flask-script
15013 (package
15014 (name "python-flask-script")
15015 (version "2.0.5")
15016 (source
15017 (origin
15018 (method url-fetch)
15019 (uri (pypi-uri "Flask-Script" version))
15020 (sha256
15021 (base32
15022 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
15023 (build-system python-build-system)
15024 (propagated-inputs
15025 `(("python-flask" ,python-flask)
15026 ("python-argcomplete" ,python-argcomplete)
15027 ("python-werkzeug" ,python-werkzeug)))
15028 (native-inputs
15029 `(("python-pytest" ,python-pytest)))
15030 (home-page
15031 "http://github.com/smurfix/flask-script")
15032 (synopsis "Scripting support for Flask")
15033 (description "The Flask-Script extension provides support for writing
15034external scripts in Flask. This includes running a development server,
15035a customised Python shell, scripts to set up your database, cronjobs,
15036and other command-line tasks that belong outside the web application
15037itself.")
15038 (license license:bsd-3)))
15039
15040(define-public python2-flask-script
15041 (package-with-python2 python-flask-script))
013e1e85
DM
15042
15043(define-public python-flask-migrate
15044 (package
15045 (name "python-flask-migrate")
15046 (version "2.0.3")
15047 (source
15048 (origin
15049 (method url-fetch)
15050 (uri (pypi-uri "Flask-Migrate" version))
15051 (sha256
15052 (base32
15053 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
15054 (build-system python-build-system)
15055 (propagated-inputs
15056 `(("python-flask" ,python-flask)
15057 ("python-alembic" ,python-alembic)
15058 ("python-sqlalchemy" ,python-sqlalchemy)
15059 ("python-flask-script" ,python-flask-script)
15060 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
15061 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
15062 (synopsis "SQLAlchemy database migrations for Flask programs using
15063Alembic")
15064 (description "This package contains SQLAlchemy database migration tools
15065for Flask programs that are using @code{python-alembic}.")
15066 (license license:expat)))
15067
15068(define-public python2-flask-migrate
15069 (package-with-python2 python-flask-migrate))
c0f5b802
LF
15070
15071(define-public python-packaging
15072 (package
15073 (name "python-packaging")
15074 (version "16.8")
15075 (source
15076 (origin
15077 (method url-fetch)
15078 (uri (pypi-uri "packaging" version))
15079 (sha256
15080 (base32
15081 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
15082 (build-system python-build-system)
15083 (native-inputs
15084 `(("python-pretend" ,python-pretend)
15085 ("python-pytest" ,python-pytest)))
15086 (propagated-inputs
15087 `(("python-pyparsing" ,python-pyparsing)
15088 ("python-six" ,python-six)))
15089 (home-page "https://github.com/pypa/packaging")
15090 (synopsis "Core utilities for Python packages")
15091 (description "Packaging is a Python module for dealing with Python packages.
15092It offers an interface for working with package versions, names, and dependency
15093information.")
15094 ;; From 'LICENSE': This software is made available under the terms of
15095 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15096 ;; Contributions to this software is made under the terms of *both* these
15097 ;; licenses.
15098 (license (list license:asl2.0 license:bsd-2))))
15099
15100(define-public python2-packaging
15101 (package-with-python2 python-packaging))
ad2ef260
AP
15102
15103(define-public python-sql
15104 (package
15105 (name "python-sql")
15106 (version "0.9")
15107 (source
15108 (origin
15109 (method url-fetch)
15110 (uri (pypi-uri "python-sql" version))
15111 (sha256
15112 (base32
15113 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
15114 (build-system python-build-system)
15115 (home-page "https://python-sql.tryton.org/")
15116 (synopsis "Library to write SQL queries in a pythonic way")
15117 (description "@code{python-sql} is a library to write SQL queries, that
15118transforms idiomatic python function calls to well-formed SQL queries.")
15119 (license license:bsd-3)))
15120
15121(define-public python2-sql
15122 (package-with-python2 python-sql))
b208f71b
AP
15123
15124(define-public python-genshi
15125 (package
15126 (name "python-genshi")
15127 (version "0.7")
15128 (source
15129 (origin
15130 (method url-fetch)
15131 (uri (string-append
15132 "https://ftp.edgewall.org/pub/genshi/Genshi-"
15133 version ".tar.gz"))
15134 (patches
15135 (search-patches
15136 ;; The first 4 patches are in the master branch upstream.
15137 ;; See this as a reference https://genshi.edgewall.org/ticket/582
15138 ;; The last 2 are NOT in any branch.
15139 ;; They were sent as attachments to a ticket opened at
15140 ;; https://genshi.edgewall.org/ticket/602#no1
15141 "python-genshi-stripping-of-unsafe-script-tags.patch"
15142 "python-genshi-disable-speedups-on-python-3.3.patch"
15143 "python-genshi-isstring-helper.patch"
15144 "python-genshi-add-support-for-python-3.4-AST.patch"
15145 "python-genshi-fix-tests-on-python-3.5.patch"
15146 "python-genshi-buildable-on-python-2.7.patch"))
15147 (sha256
15148 (base32
15149 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
15150 (build-system python-build-system)
15151 (home-page "https://genshi.edgewall.org/")
15152 (synopsis "Toolkit for generation of output for the web")
15153 (description "Genshi is a Python library that provides an integrated set
15154of components for parsing, generating, and processing HTML, XML or other
15155textual content for output generation on the web.")
15156 (license license:bsd-3)))
15157
15158;; The linter here claims that patch file names should start with the package
15159;; name. But, in this case the patches are inherited from python-genshi with
15160;; the "python-genshi-" prefix instead of "python2-genshi-".
15161(define-public python2-genshi
15162 (package-with-python2 python-genshi))
ecca63b6
AP
15163
15164(define-public python-relatorio
15165 (package
15166 (name "python-relatorio")
15167 (version "0.6.4")
15168 (source
15169 (origin
15170 (method url-fetch)
15171 (uri (pypi-uri "relatorio" version))
15172 (sha256
15173 (base32
15174 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
15175 (build-system python-build-system)
15176 (propagated-inputs
15177 `(("python-lxml" ,python-lxml)
15178 ("python-genshi" ,python-genshi)))
15179 (home-page "https://relatorio.tryton.org/")
15180 (synopsis "Templating library able to output ODT and PDF files")
15181 (description "Relatorio is a templating library which provides a way to
15182easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15183for more filetypes can be easily added by creating plugins for them.")
15184 (license license:gpl3+)))
15185
15186(define-public python2-relatorio
15187 (package-with-python2 python-relatorio))
65e7d52a
MFM
15188
15189(define-public python-radon
15190 (package
15191 (name "python-radon")
15192 (version "1.5.0")
15193 (source
15194 (origin
15195 (method url-fetch)
15196 (uri (pypi-uri "radon" version))
15197 (sha256
15198 (base32
15199 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
15200 (build-system python-build-system)
15201 (propagated-inputs
15202 `(("python-colorama" ,python-colorama)
15203 ("python-flake8-polyfill" ,python-flake8-polyfill)
15204 ("python-mando" ,python-mando-0.3.1)))
15205 (native-inputs
15206 `(("python-flake8" ,python-flake8)
15207 ("python-tox" ,python-tox)
15208 ("python-pytest" ,python-pytest)
15209 ("python-paramunittest" ,python-paramunittest)))
15210 (home-page "https://radon.readthedocs.org/")
15211 (synopsis "Code Metrics in Python")
15212 (description "Radon is a Python tool which computes various code metrics.
15213Supported metrics are:
15214@itemize @bullet
15215@item raw metrics: SLOC, comment lines, blank lines, &c.
15216@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15217@item Halstead metrics (all of them)
15218@item the Maintainability Index (a Visual Studio metric)
15219@end itemize")
15220 (license license:expat)))
15221
15222(define-public python2-radon
15223 (package-with-python2 python-radon))
50d586f6
MFM
15224
15225(define-public python-sure
15226 (package
15227 (name "python-sure")
15228 (version "1.4.6")
15229 (source
15230 (origin
15231 (method url-fetch)
15232 (uri (pypi-uri "sure" version))
15233 (sha256
15234 (base32
15235 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
15236 (build-system python-build-system)
15237 (propagated-inputs
15238 `(("python-mock" ,python-mock)
15239 ("python-six" ,python-six)))
15240 (native-inputs
15241 `(("python-nose" ,python-nose)))
15242 (home-page "https://github.com/gabrielfalcao/sure")
15243 (synopsis "Automated testing library in python for python")
15244 (description
15245 "Sure is a python library that leverages a DSL for writing assertions.
15246Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15247 (license license:gpl3+)))
15248
15249(define-public python2-sure
15250 (package-with-python2 python-sure))
a0ffc701
MFM
15251
15252(define-public python2-couleur
15253 ;; This package does not seem to support python3 at all, hence,
15254 ;; only the python2 variant definition is provided.
15255 (package
15256 (name "python2-couleur")
15257 (version "0.6.2")
15258 (source
15259 (origin
15260 (method url-fetch)
15261 (uri (pypi-uri "couleur" version))
15262 (sha256
15263 (base32
15264 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15265 (build-system python-build-system)
15266 (arguments
15267 `(#:python ,python-2))
15268 (home-page "https://github.com/gabrielfalcao/couleur")
15269 (synopsis
15270 "ANSI terminal tool for python, colored shell and other handy fancy features")
15271 (description
15272 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15273terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15274 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15275 ;; https://github.com/gabrielfalcao/couleur/issues/11
15276 (license license:lgpl3+)))
511b47de
MFM
15277
15278(define-public python-misaka
15279 (package
15280 (name "python-misaka")
15281 (version "2.1.0")
15282 (source
15283 (origin
15284 (method url-fetch)
15285 (uri (pypi-uri "misaka" version))
15286 (sha256
15287 (base32
15288 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
15289 (build-system python-build-system)
15290 (arguments
15291 `(;; Line 37 of setup.py calls self.run_command('develop')
15292 ;; in the 'check' phase. This command seems to be trying
15293 ;; to write to
15294 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15295 ;; for which it does not have the permission to write.
15296 #:tests? #f))
15297 (propagated-inputs
15298 `(("python-cffi" ,python-cffi)))
15299 (home-page "https://github.com/FSX/misaka")
15300 (synopsis "Python binding for Hoedown")
15301 (description
15302 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15303library written in C. It features a fast HTML renderer and functionality to make custom
15304renderers (e.g. man pages or LaTeX).")
15305 (license license:expat)))
15306
15307(define-public python2-misaka
15308 (package-with-python2 python-misaka))
5786b47c
MFM
15309
15310(define-public python2-steadymark
15311 ;; This is forced into being a python2 only variant
15312 ;; due to its dependence on couleur that has no support
15313 ;; for python3
15314 (package
15315 (name "python2-steadymark")
15316 (version "0.7.3")
15317 (source
15318 (origin
15319 (method url-fetch)
15320 (uri (pypi-uri "steadymark" version))
15321 (sha256
15322 (base32
15323 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15324 (build-system python-build-system)
15325 (native-inputs
15326 `(("python-couleur" ,python2-couleur)
15327 ("python-sure" ,python2-sure)
15328 ("python-misaka" ,python2-misaka)))
15329 (arguments
15330 `(#:python ,python-2
15331 #:phases
15332 (modify-phases %standard-phases
15333 (add-before 'build 'patch-setup-py
15334 (lambda _
15335 ;; Update requirements from dependency==version
15336 ;; to dependency>=version
15337 (substitute* "setup.py"
15338 (("==") ">="))
15339 #t)))))
15340 (home-page "https://github.com/gabrielfalcao/steadymark")
15341 (synopsis "Markdown-based test runner for python")
15342 (description
15343 "@code{Steadymark} allows documentation to be written in github-flavoured
15344markdown. The documentation may contain snippets of code surrounded by python
15345code blocks and @code{Steadymark} will find these snippets and run them, making
15346sure that there are no old malfunctional examples in the documentation examples.")
15347 (license license:expat)))
7e488f99
MFM
15348
15349(define-public python-nose-randomly
15350 (package
15351 (name "python-nose-randomly")
15352 (version "1.2.5")
15353 (source
15354 (origin
15355 (method url-fetch)
15356 (uri (pypi-uri "nose-randomly" version))
15357 (sha256
15358 (base32
15359 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15360 (build-system python-build-system)
15361 (native-inputs
15362 `(("python-nose" ,python-nose)
15363 ("python-numpy" ,python-numpy)))
15364 (home-page "https://github.com/adamchainz/nose-randomly")
15365 (synopsis
15366 "Nose plugin to randomly order tests and control random.seed")
15367 (description
15368 "This is a @code{Nose} plugin to randomly order tests which can be quite
15369powerful in discovering hidden flaws in the tests themselves, while helping to
15370reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15371by resetting it to a repeatable number for each test, enabling the tests to
15372create data based on random numbers and yet remain repeatable.")
15373 (license license:bsd-3)))
15374
15375(define-public python2-nose-randomly
15376 (package-with-python2 python-nose-randomly))
1e92287d
DM
15377
15378(define-public python-jsonpointer
15379 (package
15380 (name "python-jsonpointer")
15381 (version "1.10")
15382 (source
15383 (origin
15384 (method url-fetch)
15385 (uri (pypi-uri "jsonpointer" version))
15386 (sha256
15387 (base32
15388 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15389 (build-system python-build-system)
15390 (home-page "https://github.com/stefankoegl/python-json-pointer")
15391 (synopsis "Identify specific nodes in a JSON document")
15392 (description "@code{jsonpointer} allows you to access specific nodes
15393by path in a JSON document (see RFC 6901).")
15394 (license license:bsd-3)))
15395
15396(define-public python2-jsonpointer
15397 (package-with-python2 python-jsonpointer))
7d88093f 15398
841e5908
OP
15399(define-public python-jsonpatch
15400 (package
15401 (name "python-jsonpatch")
15402 (version "1.16")
15403 (source
15404 (origin
15405 (method url-fetch)
15406 ;; pypi version lacks tests.js
15407 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15408 "archive/v" version ".tar.gz"))
15409 (file-name (string-append name "-" version ".tar.gz"))
15410 (sha256
15411 (base32
15412 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
15413 (build-system python-build-system)
15414 (native-inputs
15415 `(("python-jsonpointer" ,python-jsonpointer)))
15416 (home-page "https://github.com/stefankoegl/python-json-patch")
15417 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
15418 (description "@code{jsonpatch} is a library and program that allows
15419applying JSON Patches according to RFC 6902.")
15420 (license license:bsd-3)))
15421
15422(define-public python2-jsonpatch
15423 (package-with-python2 python-jsonpatch))
15424
15425(define-public python-jsonpatch-0.4
15426 (package (inherit python-jsonpatch)
15427 (name "python-jsonpatch")
15428 (version "0.4")
15429 (source
15430 (origin
15431 (method url-fetch)
15432 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15433 "archive/v" version ".tar.gz"))
15434 (file-name (string-append name "-" version ".tar.gz"))
15435 (sha256
15436 (base32
15437 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
15438
15439(define-public python2-jsonpatch-0.4
15440 (package-with-python2 python-jsonpatch-0.4))
15441
7d88093f
DM
15442(define-public python-rfc3987
15443 (package
15444 (name "python-rfc3987")
15445 (version "1.3.7")
15446 (source
15447 (origin
15448 (method url-fetch)
15449 (uri (pypi-uri "rfc3987" version))
15450 (sha256
15451 (base32
15452 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15453 (build-system python-build-system)
15454 (home-page "http://pypi.python.org/pypi/rfc3987")
15455 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15456 (description "@code{rfc3987} provides routines for parsing and
15457validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15458 (license license:gpl3+)))
15459
15460(define-public python2-rfc3987
15461 (package-with-python2 python-rfc3987))
0960bf8b
DM
15462
15463(define-public python-validate-email
15464 (package
15465 (name "python-validate-email")
15466 (version "1.3")
15467 (source
15468 (origin
15469 (method url-fetch)
15470 (uri (pypi-uri "validate_email" version))
15471 (sha256
15472 (base32
15473 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15474 (build-system python-build-system)
15475 (home-page "http://github.com/syrusakbary/validate_email")
15476 (synopsis "Verifies if an email address is valid and really exists")
15477 (description "@code{validate_email} can be used to verify if an email
15478address is valid and really exists.")
15479 (license license:lgpl3+)))
15480
15481(define-public python2-validate-email
15482 (package-with-python2 python-validate-email))
620b59ea
DM
15483
15484(define-public python-flex
15485 (package
15486 (name "python-flex")
15487 (version "6.10.0")
15488 (source
15489 (origin
15490 (method url-fetch)
15491 (uri (pypi-uri "flex" version))
15492 (sha256
15493 (base32
15494 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15495 (build-system python-build-system)
15496 (propagated-inputs
15497 `(("python-click" ,python-click)
15498 ("python-iso8601" ,python-iso8601)
15499 ("python-jsonpointer" ,python-jsonpointer)
15500 ("python-pyyaml" ,python-pyyaml)
15501 ("python-requests" ,python-requests)
15502 ("python-rfc3987" ,python-rfc3987)
15503 ("python-six" ,python-six)
15504 ("python-validate-email" ,python-validate-email)))
15505 (home-page "https://github.com/pipermerriam/flex")
15506 (synopsis "Validates Swagger schemata")
15507 (description "@code{flex} can be used to validate Swagger schemata.")
15508 (license license:bsd-3)))
15509
15510(define-public python2-flex
15511 (package-with-python2 python-flex))
235bc01b
DM
15512
15513(define-public python-marshmallow
15514 (package
15515 (name "python-marshmallow")
15516 (version "3.0.0b2")
15517 (source
15518 (origin
15519 (method url-fetch)
15520 (uri (pypi-uri "marshmallow" version))
15521 (sha256
15522 (base32
15523 "11bnpvfdbczr74177p295zbkdrax2cahvbj5bqhhlprgz2xxi5d9"))))
15524 (build-system python-build-system)
15525 (propagated-inputs
15526 `(("python-dateutil" ,python-dateutil)
15527 ("python-simplejson" ,python-simplejson)))
15528 (native-inputs
15529 `(("python-pytest-3.0" ,python-pytest-3.0)
15530 ("python-pytz" ,python-pytz)))
15531 (home-page "https://github.com/marshmallow-code/marshmallow")
15532 (synopsis "Convert complex datatypes to and from native
15533Python datatypes.")
15534 (description "@code{marshmallow} provides a library for converting
15535complex datatypes to and from native Python datatypes.")
15536 (license license:expat)))
15537
15538(define-public python2-marshmallow
15539 (package-with-python2 python-marshmallow))
d270df8d
DM
15540
15541(define-public python-bottle
15542 (package
15543 (name "python-bottle")
15544 (version "0.12.13")
15545 (source
15546 (origin
15547 (method url-fetch)
15548 (uri (pypi-uri "bottle" version))
15549 (sha256
15550 (base32
15551 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
15552 (build-system python-build-system)
15553 (home-page "http://bottlepy.org/")
15554 (synopsis "WSGI framework for small web-applications.")
15555 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
15556 (license license:expat)))
15557
15558(define-public python2-bottle
15559 (package-with-python2 python-bottle))
635b3636
DM
15560
15561(define-public python-apispec
15562 (package
15563 (name "python-apispec")
15564 (version "0.22.0")
15565 (source
15566 (origin
15567 (method url-fetch)
15568 (uri (pypi-uri "apispec" version))
15569 (sha256
15570 (base32
15571 "0y3jxmgp2d24am3hxl40f5rw9abb0r8037sagax3dv64h4n1azwq"))))
15572 (build-system python-build-system)
15573 (propagated-inputs
15574 `(("python-pyyaml" ,python-pyyaml)))
15575 (native-inputs
15576 `(("python-pytest-3.0" ,python-pytest-3.0)
15577 ("python-flask" ,python-flask)
15578 ("python-marshmallow" ,python-marshmallow)
15579 ("python-tornado" ,python-tornado)
15580 ("python-bottle" ,python-bottle)
15581 ("python-mock" ,python-mock)))
15582 (home-page "https://github.com/marshmallow-code/apispec")
15583 (synopsis "Swagger 2.0 API specification generator")
15584 (description "@code{python-apispec} is a pluggable API specification
15585generator. Currently supports the OpenAPI specification (f.k.a.
15586Swagger 2.0).")
15587 (license license:expat)))
15588
15589(define-public python2-apispec
15590 (package-with-python2 python-apispec))
543c5f3f
DM
15591
15592(define-public python-flasgger
15593 (package
15594 (name "python-flasgger")
15595 (version "0.6.3")
15596 (source
15597 (origin
15598 (method url-fetch)
15599 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
15600 version ".tar.gz"))
15601 (file-name (string-append name "-" version ".tar.gz"))
15602 (sha256
15603 (base32
15604 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
15605 (build-system python-build-system)
15606 (arguments
15607 `(#:phases
15608 (modify-phases %standard-phases
15609 (replace 'check
15610 (lambda* (#:key inputs outputs #:allow-other-keys)
15611 (substitute* "Makefile"
15612 (("flake8 flasgger --ignore=F403")
15613 "flake8 flasgger --ignore=E731,F403"))
15614 (setenv "PYTHONPATH" (string-append (getcwd)
15615 ":"
15616 (getenv "PYTHONPATH")))
15617 (zero? (system* "py.test")))))))
15618 (propagated-inputs
15619 `(("python-flask" ,python-flask)
15620 ("python-pyyaml" ,python-pyyaml)
15621 ("python-jsonschema" ,python-jsonschema)
15622 ("python-mistune" ,python-mistune)
15623 ("python-six" ,python-six)))
15624 (native-inputs
15625 `(("python-decorator" ,python-decorator)
15626 ("python-flake8" ,python-flake8)
15627 ("python-flask-restful" ,python-flask-restful)
15628 ("python-flex" ,python-flex)
15629 ("python-pytest-3.0" ,python-pytest-3.0)
15630 ("python-pytest-cov" ,python-pytest-cov)
15631 ("python-marshmallow" ,python-marshmallow)
15632 ("python-apispec" ,python-apispec)))
15633 (home-page "https://github.com/rochacbruno/flasgger/")
15634 (synopsis "Extract Swagger specs from your Flask project")
15635 (description "@code{python-flasgger} allows extracting Swagger specs
15636from your Flask project. It is a fork of Flask-Swagger.")
15637 (license license:expat)))
15638
15639(define-public python2-flasgger
15640 (package-with-python2 python-flasgger))
4eadc8b9
DM
15641
15642(define-public python-swagger-spec-validator
15643 (package
15644 (name "python-swagger-spec-validator")
15645 (version "2.1.0")
15646 (source
15647 (origin
15648 (method url-fetch)
15649 (uri (pypi-uri "swagger-spec-validator" version))
15650 (sha256
15651 (base32
15652 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
15653 (build-system python-build-system)
15654 (propagated-inputs
15655 `(("python-jsonschema" ,python-jsonschema)
15656 ("python-six" ,python-six)))
15657 (home-page
15658 "http://github.com/Yelp/swagger_spec_validator")
15659 (synopsis "Validation of Swagger specifications")
15660 (description "@code{swagger_spec_validator} provides a library for
15661validating Swagger API specifications.")
15662 (license license:asl2.0)))
15663
15664(define-public python2-swagger-spec-validator
15665 (package-with-python2 python-swagger-spec-validator))
7ea498e5
DM
15666
15667(define-public python-apache-libcloud
15668 (package
15669 (name "python-apache-libcloud")
15670 (version "2.0.0")
15671 (source
15672 (origin
15673 (method url-fetch)
15674 (uri (pypi-uri "apache-libcloud" version))
15675 (sha256
15676 (base32
15677 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
15678 (build-system python-build-system)
15679 (arguments
15680 `(#:phases
15681 (modify-phases %standard-phases
15682 (add-after 'unpack 'patch-ssh
15683 (lambda* (#:key inputs #:allow-other-keys)
15684 (substitute* "libcloud/compute/ssh.py"
15685 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15686 "/bin/ssh" "'")))
15687 #t))
15688 (add-after 'unpack 'patch-tests
15689 (lambda _
15690 (substitute* "./libcloud/test/test_file_fixtures.py"
15691 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15692 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15693 return (httplib.OK,
15694 \"1234abcd\",
15695 {\"test\": \"value\"},
15696 httplib.responses[httplib.OK])
15697 def _ascii"))
15698 (substitute* "libcloud/test/compute/test_ssh_client.py"
15699 (("class ShellOutSSHClientTests")
15700 "@unittest.skip(\"Guix container doesn't have ssh service\")
15701class ShellOutSSHClientTests")
15702 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
15703 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
15704 (("'.xF0', '.x90', '.x8D', '.x88'")
15705 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
15706 #t)))))
15707 (inputs
15708 `(("openssh" ,openssh)))
15709 (propagated-inputs
15710 `(("python-paramiko" ,python-paramiko)
15711 ("python-requests" ,python-requests)))
15712 (native-inputs
15713 `(("python-lockfile" ,python-lockfile)
15714 ("python-mock" ,python-mock)
15715 ("python-requests-mock" ,python-requests-mock)))
15716 (home-page "https://libcloud.apache.org/")
15717 (synopsis "Unified Cloud API")
15718 (description "@code{libcloud} is a Python library for interacting with
15719many of the popular cloud service providers using a unified API.")
15720 (license license:asl2.0)))
15721
15722(define-public python2-apache-libcloud
15723 (package-with-python2 python-apache-libcloud))
7fadeab4
DM
15724
15725(define-public python-smmap2
15726 (package
15727 (name "python-smmap2")
15728 (version "2.0.3")
15729 (source
15730 (origin
15731 (method url-fetch)
15732 (uri (pypi-uri "smmap2" version))
15733 (sha256
15734 (base32
15735 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
15736 (build-system python-build-system)
15737 (native-inputs
15738 `(("python-nosexcover" ,python-nosexcover)))
15739 (home-page "https://github.com/Byron/smmap")
15740 (synopsis "Python sliding window memory map manager")
15741 (description "@code{smmap2} is a pure Python implementation of a sliding
15742window memory map manager.")
15743 (license license:bsd-3)))
15744
15745(define-public python2-smmap2
15746 (package-with-python2 python-smmap2))
fa3f5f47
RJ
15747
15748(define-public python-regex
15749 (package
15750 (name "python-regex")
15751 (version "2017.06.07")
15752 (source (origin
15753 (method url-fetch)
15754 (uri (pypi-uri "regex" version))
15755 (sha256
15756 (base32
15757 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
15758 (build-system python-build-system)
15759 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
15760 (synopsis "Alternative regular expression module")
15761 (description "This regular expression implementation is backwards-
15762compatible with the standard @code{re} module, but offers additional
15763functionality like full case-folding for case-insensitive matches in Unicode.")
15764 (license license:psfl)))
15765
15766(define-public python2-regex
15767 (package-with-python2 python-regex))
f817b4d9
RH
15768
15769(define-public python2-pyopengl
15770 (package
15771 (name "python2-pyopengl")
15772 (version "3.1.0")
15773 (source
15774 (origin
15775 (method url-fetch)
15776 (uri (pypi-uri "PyOpenGL" version))
15777 (sha256
15778 (base32
15779 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
15780 (arguments
15781 `(#:python ,python-2))
15782 (build-system python-build-system)
15783 (home-page "http://pyopengl.sourceforge.net")
15784 (synopsis "Standard OpenGL bindings for Python")
15785 (description
15786 "PyOpenGL is the most common cross platform Python binding to OpenGL and
15787related APIs. The binding is created using the standard @code{ctypes}
15788library.")
15789 (license license:bsd-3)))
7efd98be
RH
15790
15791(define-public python-rencode
15792 (package
15793 (name "python-rencode")
15794 (version "1.0.3")
15795 (source
15796 (origin
15797 (method url-fetch)
15798 (uri (pypi-uri "rencode" version))
15799 (sha256
15800 (base32
15801 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
15802 (build-system python-build-system)
15803 (native-inputs `(("pkg-config" ,pkg-config)
15804 ("python-cython", python-cython)))
15805 (home-page "https://github.com/aresch/rencode")
15806 (synopsis "Serialization of heterogeneous data structures")
15807 (description
15808 "The @code{rencode} module is a data structure serialization library,
15809similar to @code{bencode} from the BitTorrent project. For complex,
15810heterogeneous data structures with many small elements, r-encoding stake up
15811significantly less space than b-encodings. This version of rencode is a
15812complete rewrite in Cython to attempt to increase the performance over the
15813pure Python module.")
15814 (license license:bsd-3)))
15815
15816(define-public python2-rencode
15817 (package-with-python2 python-rencode))