gnu: Add python-jsonpatch.
[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>
a01b6da7
NK
46;;;
47;;; This file is part of GNU Guix.
48;;;
49;;; GNU Guix is free software; you can redistribute it and/or modify it
50;;; under the terms of the GNU General Public License as published by
51;;; the Free Software Foundation; either version 3 of the License, or (at
52;;; your option) any later version.
53;;;
54;;; GNU Guix is distributed in the hope that it will be useful, but
55;;; WITHOUT ANY WARRANTY; without even the implied warranty of
56;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57;;; GNU General Public License for more details.
58;;;
59;;; You should have received a copy of the GNU General Public License
60;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
61
1ffa7090 62(define-module (gnu packages python)
3f641af0 63 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 64 #:use-module (gnu packages)
8e451885 65 #:use-module (gnu packages algebra)
d79a343b 66 #:use-module (gnu packages adns)
89b2e0b0 67 #:use-module (gnu packages attr)
d96034ed 68 #:use-module (gnu packages backup)
3969ca54 69 #:use-module (gnu packages bash)
1ffa7090 70 #:use-module (gnu packages compression)
dc1bd2b5 71 #:use-module (gnu packages crypto)
4ed20663 72 #:use-module (gnu packages databases)
ddc63a56 73 #:use-module (gnu packages django)
5e1c9367 74 #:use-module (gnu packages file)
4ed20663 75 #:use-module (gnu packages fontutils)
4ed20663
AE
76 #:use-module (gnu packages gcc)
77 #:use-module (gnu packages ghostscript)
6eb7af2a 78 #:use-module (gnu packages gl)
4ed20663 79 #:use-module (gnu packages glib)
c227458a 80 #:use-module (gnu packages graphviz)
6eb7af2a 81 #:use-module (gnu packages gstreamer)
4ed20663 82 #:use-module (gnu packages gtk)
421a80a2 83 #:use-module (gnu packages icu4c)
c937562e 84 #:use-module (gnu packages image)
4ed20663 85 #:use-module (gnu packages imagemagick)
d79a343b 86 #:use-module (gnu packages libevent)
b10ab723 87 #:use-module (gnu packages libffi)
89b2e0b0 88 #:use-module (gnu packages linux)
ed118043 89 #:use-module (gnu packages man)
0da98533 90 #:use-module (gnu packages maths)
4ed20663 91 #:use-module (gnu packages multiprecision)
45203542 92 #:use-module (gnu packages networking)
be7134bf 93 #:use-module (gnu packages ncurses)
b04a52a6 94 #:use-module (gnu packages openstack)
d488d5d6 95 #:use-module (gnu packages password-utils)
c9b1b4f9 96 #:use-module (gnu packages pcre)
4ed20663 97 #:use-module (gnu packages perl)
b10ab723 98 #:use-module (gnu packages pkg-config)
06ff0837 99 #:use-module (gnu packages protobuf)
4535a93a 100 #:use-module (gnu packages qt)
4ed20663 101 #:use-module (gnu packages readline)
6eb7af2a 102 #:use-module (gnu packages sdl)
80ce42bd 103 #:use-module (gnu packages shells)
7ea498e5 104 #:use-module (gnu packages ssh)
c9b1b4f9 105 #:use-module (gnu packages statistics)
8f9ac901 106 #:use-module (gnu packages tex)
1c65314c 107 #:use-module (gnu packages texinfo)
cc2b77df 108 #:use-module (gnu packages tls)
e25f0174 109 #:use-module (gnu packages version-control)
02f8f804 110 #:use-module (gnu packages video)
8d12be1e 111 #:use-module (gnu packages web)
ce0614dd 112 #:use-module (gnu packages base)
26b307e2 113 #:use-module (gnu packages xml)
6fa14469 114 #:use-module (gnu packages xorg)
0bdc1671 115 #:use-module (gnu packages xdisorg)
afa181ff 116 #:use-module (gnu packages tcl)
63bcec71 117 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
118 #:use-module (guix packages)
119 #:use-module (guix download)
ea5456c8 120 #:use-module (guix git-download)
11bb85a1 121 #:use-module (guix utils)
acc26ff1 122 #:use-module (guix build-system gnu)
d8c4998f 123 #:use-module (guix build-system cmake)
898238b9 124 #:use-module (guix build-system python)
1c65314c
FB
125 #:use-module (guix build-system trivial)
126 #:use-module (srfi srfi-1))
a01b6da7 127
45848023 128(define-public python-2.7
a01b6da7
NK
129 (package
130 (name "python")
49c2a46e 131 (version "2.7.13")
a01b6da7
NK
132 (source
133 (origin
134 (method url-fetch)
9b43a0ff 135 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
136 version "/Python-" version ".tar.xz"))
137 (sha256
138 (base32
49c2a46e 139 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
c3052d6b
ML
140 (patches (search-patches "python-2.7-search-paths.patch"
141 "python-2-deterministic-build-info.patch"
15e57f57 142 "python-2.7-site-prefixes.patch"
dc5cec21
LF
143 "python-2.7-source-date-epoch.patch"
144 "python-2.7-getentropy-on-old-kernels.patch"))
10a42aa2
EF
145 (modules '((guix build utils)))
146 ;; suboptimal to delete failing tests here, but if we delete them in the
147 ;; arguments then we need to make sure to strip out that phase when it
148 ;; gets inherited by python and python-minimal.
149 (snippet
150 '(begin
151 (for-each delete-file
152 '("Lib/test/test_compileall.py"
f0499100 153 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
154 "Lib/test/test_distutils.py"
155 "Lib/test/test_import.py"
156 "Lib/test/test_shutil.py"
157 "Lib/test/test_socket.py"
1bb163b0 158 "Lib/test/test_subprocess.py"))
10a42aa2 159 #t))))
02f0c3b2
LC
160 (outputs '("out"
161 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 162 (build-system gnu-build-system)
3fdc99da 163 (arguments
10a42aa2 164 `(;; 356 tests OK.
e7e7a1eb
EF
165 ;; 6 tests failed:
166 ;; test_compileall test_distutils test_import test_shutil test_socket
167 ;; test_subprocess
168 ;; 39 tests skipped:
ff6f33cf
ED
169 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
170 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
171 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
172 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
173 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
174 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
175 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
176 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
177 ;; test_winreg test_winsound test_zipfile64
178 ;; 4 skips unexpected on linux2:
179 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 180 #:test-target "test"
3fdc99da 181 #:configure-flags
6a20289d
LC
182 (list "--enable-shared" ;allow embedding
183 "--with-system-ffi" ;build ctypes
aaf75c89 184 "--with-ensurepip=install" ;install pip and setuptools
a282d7ff 185 "--enable-unicode=ucs4"
6a20289d
LC
186 (string-append "LDFLAGS=-Wl,-rpath="
187 (assoc-ref %outputs "out") "/lib"))
fd982732 188
d2cc9c7c
LC
189 #:modules ((ice-9 ftw) (ice-9 match)
190 (guix build utils) (guix build gnu-build-system))
fd982732 191 #:phases
46472ecd
MW
192 (modify-phases %standard-phases
193 (add-before
194 'configure 'patch-lib-shells
195 (lambda _
196 ;; Filter for existing files, since some may not exist in all
197 ;; versions of python that are built with this recipe.
198 (substitute* (filter file-exists?
199 '("Lib/subprocess.py"
200 "Lib/popen2.py"
201 "Lib/distutils/tests/test_spawn.py"
202 "Lib/test/test_subprocess.py"))
203 (("/bin/sh") (which "sh")))
dedc8320
LC
204
205 ;; Use zero as the timestamp in .pyc files so that builds are
206 ;; deterministic. TODO: Remove it when this variable is set in
207 ;; gnu-build-system.scm.
a665996f 208 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 209 #t))
5b4e2791
LC
210 (add-before 'configure 'do-not-record-configure-flags
211 (lambda* (#:key configure-flags #:allow-other-keys)
212 ;; Remove configure flags from the installed '_sysconfigdata.py'
213 ;; and 'Makefile' so we don't end up keeping references to the
214 ;; build tools.
215 ;;
216 ;; Preserve at least '--with-system-ffi' since otherwise the
217 ;; thing tries to build libffi, fails, and we end up with a
218 ;; Python that lacks ctypes.
219 (substitute* "configure"
220 (("^CONFIG_ARGS=.*$")
221 (format #f "CONFIG_ARGS='~a'\n"
222 (if (member "--with-system-ffi" configure-flags)
223 "--with-system-ffi"
224 ""))))
225 #t))
46472ecd
MW
226 (add-before
227 'check 'pre-check
228 (lambda _
229 ;; 'Lib/test/test_site.py' needs a valid $HOME
230 (setenv "HOME" (getcwd))
231 #t))
232 (add-after
233 'unpack 'set-source-file-times-to-1980
234 ;; XXX One of the tests uses a ZIP library to pack up some of the
235 ;; source tree, and fails with "ZIP does not support timestamps
236 ;; before 1980". Work around this by setting the file times in the
237 ;; source tree to sometime in early 1980.
238 (lambda _
239 (let ((circa-1980 (* 10 366 24 60 60)))
240 (ftw "." (lambda (file stat flag)
241 (utime file circa-1980 circa-1980)
242 #t))
02f0c3b2 243 #t)))
9ffe61b0
LC
244 (add-after 'install 'remove-tests
245 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
246 ;; because these files are used by some libraries out there.
247 (lambda* (#:key outputs #:allow-other-keys)
248 (let ((out (assoc-ref outputs "out")))
249 (match (scandir (string-append out "/lib")
250 (lambda (name)
251 (string-prefix? "python" name)))
252 ((pythonX.Y)
253 (let ((testdir (string-append out "/lib/" pythonX.Y
254 "/test")))
255 (with-directory-excursion testdir
256 (for-each delete-file-recursively
257 (scandir testdir
258 (match-lambda
259 ((or "." "..") #f)
260 (file
261 (not
262 (string-prefix? "test_support."
263 file))))))
264 (call-with-output-file "__init__.py" (const #t))
265 #t)))))))
216c283b
LC
266 (add-before 'strip 'make-libraries-writable
267 (lambda* (#:key outputs #:allow-other-keys)
268 ;; Make .so files writable so they can be stripped.
269 (let ((out (assoc-ref outputs "out")))
270 (for-each (lambda (file)
271 (chmod file #o755))
272 (find-files (string-append out "/lib")
273 "\\.so"))
274 #t)))
02f0c3b2
LC
275 (add-after 'install 'move-tk-inter
276 (lambda* (#:key outputs #:allow-other-keys)
277 ;; When Tkinter support is built move it to a separate output so
278 ;; that the main output doesn't contain a reference to Tcl/Tk.
279 (let ((out (assoc-ref outputs "out"))
280 (tk (assoc-ref outputs "tk")))
281 (when tk
282 (match (find-files out "tkinter.*\\.so")
283 ((tkinter.so)
284 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
285 ;; want it under TK/lib/pythonX.Y/site-packages.
286 (let* ((len (string-length out))
287 (target (string-append
288 tk "/"
289 (string-drop
290 (dirname (dirname tkinter.so))
291 len)
292 "/site-packages")))
293 (install-file tkinter.so target)
294 (delete-file tkinter.so)))))
295 #t))))))
a01b6da7 296 (inputs
3fdc99da
CR
297 `(("bzip2" ,bzip2)
298 ("gdbm" ,gdbm)
b10ab723 299 ("libffi" ,libffi) ; for ctypes
b88e1b0a 300 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 301 ("openssl" ,openssl)
3fdc99da 302 ("readline" ,readline)
afa181ff
LC
303 ("zlib" ,zlib)
304 ("tcl" ,tcl)
305 ("tk" ,tk))) ; for tkinter
b10ab723
CR
306 (native-inputs
307 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
308 (native-search-paths
309 (list (search-path-specification
310 (variable "PYTHONPATH")
af070955 311 (files '("lib/python2.7/site-packages")))))
f0499100 312 (home-page "https://www.python.org")
afa181ff 313 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
314 (description
315 "Python is a remarkably powerful dynamic programming language that
316is used in a wide variety of application domains. Some of its key
317distinguishing features include: clear, readable syntax; strong
318introspection capabilities; intuitive object orientation; natural
319expression of procedural code; full modularity, supporting hierarchical
320packages; exception-based error handling; and very high level dynamic
321data types.")
3f641af0 322 (license license:psfl)))
acc26ff1 323
45848023
HG
324;; Current 2.x version.
325(define-public python-2 python-2.7)
326
72df6680 327(define-public python-3.5
b24d1cfc 328 (package (inherit python-2)
343cee8a 329 (version "3.5.3")
717003e3
LC
330 (source (origin
331 (method url-fetch)
332 (uri (string-append "https://www.python.org/ftp/python/"
333 version "/Python-" version ".tar.xz"))
fc1adab1
AK
334 (patches (search-patches
335 "python-fix-tests.patch"
72df6680 336 "python-3.5-fix-tests.patch"
e4d34cd0 337 "python-3.5-getentropy-on-old-kernels.patch"
fc1adab1
AK
338 "python-3-deterministic-build-info.patch"
339 "python-3-search-paths.patch"))
717003e3
LC
340 (patch-flags '("-p0"))
341 (sha256
342 (base32
343cee8a 343 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
fd615918
EF
344 (snippet
345 '(delete-file
346 "Lib/ctypes/test/test_win32.py")))) ; fails on aarch64
1f434457
MW
347 (arguments (substitute-keyword-arguments (package-arguments python-2)
348 ((#:tests? _) #t)))
1aebc0cb
AE
349 (native-search-paths
350 (list (search-path-specification
351 (variable "PYTHONPATH")
0e05d01e
SB
352 (files (list (string-append "lib/python"
353 (version-major+minor version)
354 "/site-packages"))))))))
f26a77ff 355
45848023 356;; Current 3.x version.
72df6680 357(define-public python-3 python-3.5)
45848023
HG
358
359;; Current major version.
360(define-public python python-3)
361
95288fcc
LC
362;; Minimal variants of Python, mostly used to break the cycle between Tk and
363;; Python (Tk -> libxcb -> Python.)
364
365(define-public python2-minimal
366 (package (inherit python-2)
367 (name "python-minimal")
02f0c3b2 368 (outputs '("out"))
5927a843
LC
369
370 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
371 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
372 ;; libffi.
373 (inputs `(("libffi" ,libffi)
374 ("zlib" ,zlib)))))
95288fcc
LC
375
376(define-public python-minimal
898238b9 377 (package (inherit python)
95288fcc 378 (name "python-minimal")
02f0c3b2 379 (outputs '("out"))
95288fcc 380
d0b73960 381 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
382 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
383 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
384 (inputs `(("libffi" ,libffi)
385 ("openssl" ,openssl)
95288fcc
LC
386 ("zlib" ,zlib)))))
387
64cb064c
LC
388(define* (wrap-python3 python
389 #:optional
390 (name (string-append (package-name python) "-wrapper")))
898238b9 391 (package (inherit python)
95288fcc 392 (name name)
898238b9
AE
393 (source #f)
394 (build-system trivial-build-system)
02f0c3b2 395 (outputs '("out"))
3969ca54 396 (inputs `(("bash" ,bash)))
3c0f2329 397 (propagated-inputs `(("python" ,python)))
898238b9
AE
398 (arguments
399 `(#:modules ((guix build utils))
400 #:builder
401 (begin
402 (use-modules (guix build utils))
403 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
404 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
405 (mkdir-p bin)
406 (for-each
407 (lambda (old new)
408 (symlink (string-append python old)
409 (string-append bin "/" new)))
3969ca54
SB
410 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
411 `("python" ,"pydoc" ,"idle" ,"pip"))
412 ;; python-config outputs search paths based upon its location,
413 ;; use a bash wrapper to avoid changing its outputs.
414 (let ((bash (string-append (assoc-ref %build-inputs "bash")
415 "/bin/bash"))
416 (old (string-append python "python3-config"))
417 (new (string-append bin "/python-config")))
418 (with-output-to-file new
419 (lambda ()
420 (format #t "#!~a~%" bash)
421 (format #t "exec \"~a\" \"$@\"~%" old)
422 (chmod new #o755)
423 #t)))))))
0d56e3e1
LC
424 (synopsis "Wrapper for the Python 3 commands")
425 (description
426 "This package provides wrappers for the commands of Python@tie{}3.x such
427that they can be invoked under their usual name---e.g., @command{python}
428instead of @command{python3}.")))
429
95288fcc
LC
430(define-public python-wrapper (wrap-python3 python))
431(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 432
aaf625b8
RW
433(define-public python-psutil
434 (package
435 (name "python-psutil")
88535a44 436 (version "4.3.0")
aaf625b8
RW
437 (source
438 (origin
439 (method url-fetch)
f56777be 440 (uri (pypi-uri "psutil" version))
aaf625b8
RW
441 (sha256
442 (base32
88535a44 443 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 444 (build-system python-build-system)
fb08c4fe
MB
445 (arguments
446 ;; FIXME: some tests does not return and times out.
447 '(#:tests? #f))
88535a44 448 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
449 (synopsis "Library for retrieving information on running processes")
450 (description
451 "psutil (Python system and process utilities) is a library for retrieving
452information on running processes and system utilization (CPU, memory, disks,
453network) in Python. It is useful mainly for system monitoring, profiling and
454limiting process resources and management of running processes. It implements
455many functionalities offered by command line tools such as: ps, top, lsof,
456netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
457pidof, tty, taskset, pmap.")
3f641af0 458 (license license:bsd-3)))
aaf625b8
RW
459
460(define-public python2-psutil
461 (package-with-python2 python-psutil))
898238b9 462
f9da1d8a
ED
463(define-public python-passlib
464 (package
465 (name "python-passlib")
3b86a385 466 (version "1.7.1")
f9da1d8a
ED
467 (source
468 (origin
469 (method url-fetch)
690e8c66 470 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
471 (sha256
472 (base32
3b86a385 473 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
f9da1d8a
ED
474 (build-system python-build-system)
475 (native-inputs
f3b98f4f 476 `(("python-nose" ,python-nose)))
f22efa01 477 (propagated-inputs
f9da1d8a
ED
478 `(("python-py-bcrypt" ,python-py-bcrypt)))
479 (arguments
480 `(#:phases
481 (alist-cons-before
482 'check 'set-PYTHON_EGG_CACHE
483 ;; some tests require access to "$HOME/.cython"
484 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
485 %standard-phases)))
486 (home-page "https://bitbucket.org/ecollins/passlib")
487 (synopsis
488 "Comprehensive password hashing framework")
489 (description
490 "Passlib is a password hashing library for Python 2 & 3, which provides
491cross-platform implementations of over 30 password hashing algorithms, as well
492as a framework for managing existing password hashes. It's designed to be
493useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
494to providing full-strength password hashing for multi-user application.")
3f641af0 495 (license license:bsd-3)))
f9da1d8a
ED
496
497(define-public python2-passlib
498 (package-with-python2 python-passlib))
499
feb0d9c3
ED
500(define-public python-py-bcrypt
501 (package
502 (name "python-py-bcrypt")
503 (version "0.4")
504 (source
505 (origin
506 (method url-fetch)
507 (uri (string-append
508 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
509 version
510 ".tar.gz"))
511 (sha256
512 (base32
513 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
514 (build-system python-build-system)
feb0d9c3
ED
515 (home-page "https://code.google.com/p/py-bcrypt")
516 (synopsis
517 "Bcrypt password hashing and key derivation")
518 (description
519 "A python wrapper of OpenBSD's Blowfish password hashing code. This
520system hashes passwords using a version of Bruce Schneier's Blowfish block
521cipher with modifications designed to raise the cost of off-line password
522cracking and frustrate fast hardware implementation. The computation cost of
523the algorithm is parametised, so it can be increased as computers get faster.
524The intent is to make a compromise of a password database less likely to
525result in an attacker gaining knowledge of the plaintext passwords (e.g. using
526John the Ripper).")
527 ;; "sha2.c" is under BSD-3;
528 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
529 ;; the rest is under ISC.
3f641af0 530 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
531
532(define-public python2-py-bcrypt
533 (package-with-python2 python-py-bcrypt))
534
535
429fdea1
ED
536(define-public python-paramiko
537 (package
538 (name "python-paramiko")
b22cdf0c 539 (version "2.1.2")
429fdea1
ED
540 (source
541 (origin
542 (method url-fetch)
81b9bbbd 543 (uri (pypi-uri "paramiko" version))
429fdea1
ED
544 (sha256
545 (base32
b22cdf0c 546 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
429fdea1 547 (build-system python-build-system)
49910e6a 548 (arguments
b22cdf0c
SB
549 '(#:phases
550 (modify-phases %standard-phases
551 (replace 'check
552 (lambda _
553 (zero? (system* "python" "test.py")))))))
a3fc12da 554 (propagated-inputs
b22cdf0c
SB
555 `(("python-pyasn1" ,python-pyasn1)
556 ("python-cryptography" ,python-cryptography)))
429fdea1
ED
557 (home-page "http://www.paramiko.org/")
558 (synopsis "SSHv2 protocol library")
559 (description "Paramiko is a python implementation of the SSHv2 protocol,
560providing both client and server functionality. While it leverages a Python C
561extension for low level cryptography (PyCrypto), Paramiko itself is a pure
562Python interface around SSH networking concepts.")
3f641af0 563 (license license:lgpl2.1+)))
429fdea1
ED
564
565(define-public python2-paramiko
566 (package-with-python2 python-paramiko))
567
568
de73dbf6
ED
569(define-public python-httplib2
570 (package
571 (name "python-httplib2")
286f1bac 572 (version "0.9.2")
de73dbf6
ED
573 (source
574 (origin
575 (method url-fetch)
286f1bac 576 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
577 (sha256
578 (base32
286f1bac 579 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 580 (build-system python-build-system)
286f1bac 581 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
582 (synopsis "Comprehensive HTTP client library")
583 (description
584 "A comprehensive HTTP client library supporting many features left out of
585other HTTP libraries.")
586 (license license:expat)))
587
588(define-public python2-httplib2
589 (package-with-python2 python-httplib2))
590
67039875
ED
591(define-public python-ecdsa
592 (package
593 (name "python-ecdsa")
594 (version "0.13")
595 (source
596 (origin
597 (method url-fetch)
598 (uri (string-append
599 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
600 version
601 ".tar.gz"))
602 (sha256
603 (base32
604 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
605 (build-system python-build-system)
67039875
ED
606 (inputs
607 `(("openssl" ,openssl)))
608 (home-page
7bf837fd 609 "https://github.com/warner/python-ecdsa")
67039875
ED
610 (synopsis
611 "ECDSA cryptographic signature library (pure python)")
612 (description
613 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
614Curve Digital Signature Algorithm), implemented purely in Python. With this
615library, you can quickly create keypairs (signing key and verifying key), sign
616messages, and verify the signatures. The keys and signatures are very short,
617making them easy to handle and incorporate into other protocols.")
618 (license license:expat)))
619
620(define-public python2-ecdsa
621 (package-with-python2 python-ecdsa))
622
52323f32
ED
623(define-public python-ccm
624 (package
625 (name "python-ccm")
db5567f7 626 (version "2.1.6")
52323f32
ED
627 (source
628 (origin
629 (method url-fetch)
db5567f7 630 (uri (pypi-uri "ccm" version))
52323f32
ED
631 (sha256
632 (base32
db5567f7 633 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 634 (build-system python-build-system)
f22efa01 635 (propagated-inputs
52323f32 636 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
637 ;; Not listed in setup.py, but used in ccmlib/node.py for full
638 ;; functionality
639 ("python-psutil" ,python-psutil)
52323f32
ED
640 ("python-six" ,python-six)))
641 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
642 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
643localhost")
644 (description "Cassandra Cluster Manager is a development tool for testing
645local Cassandra clusters. It creates, launches and removes Cassandra clusters
646on localhost.")
3f641af0 647 (license license:asl2.0)))
52323f32
ED
648
649(define-public python2-ccm
650 (package-with-python2 python-ccm))
651
89114f39 652(define-public python-pytz
acc26ff1 653 (package
89114f39 654 (name "python-pytz")
a5f92ca0 655 (version "2016.10")
acc26ff1
CR
656 (source
657 (origin
658 (method url-fetch)
61c9babb 659 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
660 (sha256
661 (base32
a5f92ca0 662 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
acc26ff1 663 (build-system python-build-system)
8498b8cf 664 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 665 (home-page "http://pythonhosted.org/pytz")
9e771e3b 666 (synopsis "Python timezone library")
acc26ff1
CR
667 (description
668 "This library allows accurate and cross platform timezone calculations
669using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 670 (license license:expat)))
5ace6e2f 671
89114f39 672(define-public python2-pytz
11bb85a1 673 (package-with-python2 python-pytz))
89114f39 674
fc50e9c6 675
89114f39 676(define-public python-babel
5ace6e2f 677 (package
89114f39 678 (name "python-babel")
ffb1e98d 679 (version "2.3.4")
5ace6e2f
CR
680 (source
681 (origin
682 (method url-fetch)
b850a6d8 683 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
684 (sha256
685 (base32
ffb1e98d 686 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
5ace6e2f 687 (build-system python-build-system)
f22efa01 688 (propagated-inputs
f3b98f4f 689 `(("python-pytz" ,python-pytz)))
8498b8cf 690 (arguments `(#:tests? #f)) ; no test target
e1804763 691 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
692 (synopsis
693 "Tools for internationalizing Python applications")
694 (description
695 "Babel is composed of two major parts:
696- tools to build and work with gettext message catalogs
697- a Python interface to the CLDR (Common Locale Data Repository), providing
698access to various locale display names, localized number and date formatting,
699etc. ")
3f641af0 700 (license license:bsd-3)))
89114f39
AE
701
702(define-public python2-babel
11bb85a1 703 (package-with-python2 python-babel))
73adf220 704
ed377cc6
RW
705(define-public python2-backport-ssl-match-hostname
706 (package
707 (name "python2-backport-ssl-match-hostname")
f2d06d46 708 (version "3.5.0.1")
ed377cc6
RW
709 (source
710 (origin
711 (method url-fetch)
712 (uri (string-append
713 "https://pypi.python.org/packages/source/b/"
714 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
715 version ".tar.gz"))
716 (sha256
717 (base32
f2d06d46 718 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 719 (build-system python-build-system)
f2d06d46
EF
720 (arguments
721 `(#:python ,python-2
722 #:tests? #f)) ; no test target
f2d06d46
EF
723 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
724 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
725 (description
726 "This backport brings the ssl.match_hostname() function to users of
727earlier versions of Python. The function checks the hostname in the
728certificate returned by the server to which a connection has been established,
729and verifies that it matches the intended target hostname.")
3f641af0 730 (license license:psfl)))
ed377cc6 731
d205f895
TD
732(define-public python-hdf4
733 (package
734 (name "python-hdf4")
735 (version "0.9")
736 (source
737 (origin
738 (method url-fetch)
739 (uri (pypi-uri name version))
740 (sha256
741 (base32
742 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
743 (build-system python-build-system)
744 (native-inputs `(("nose" ,python-nose)))
745 (propagated-inputs `(("numpy" ,python-numpy)))
746 (inputs
747 `(("hdf4" ,hdf4)
748 ("libjpeg" ,libjpeg)
749 ("zlib" ,zlib)))
750 (arguments
751 `(#:phases
752 (modify-phases %standard-phases
753 (replace 'check
754 (lambda _
755 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
756 ;; on to import numpy. Somehow this works on their CI system.
757 ;; Let's just manage PYTHONPATH here instead.
758 (substitute* "runexamples.sh"
759 (("export PYTHONPATH=.*") ""))
760 (setenv "PYTHONPATH"
761 (string-append (getcwd) ":"
762 (getenv "PYTHONPATH")))
763 (and (zero? (system* "./runexamples.sh"))
764 (zero? (system* "nosetests" "-v"))))))))
765 (home-page "https://github.com/fhs/python-hdf4")
766 (synopsis "Python interface to the NCSA HDF4 library")
767 (description
768 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
769which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
770NetCDF files can also be read and modified. Python-HDF4 is a fork of
771@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
772 (license license:expat)))
773
774(define-public python2-hdf4
775 (package-with-python2 python-hdf4))
776
ef5cbf9b
RW
777(define-public python-h5py
778 (package
779 (name "python-h5py")
fe147c41 780 (version "2.6.0")
ef5cbf9b
RW
781 (source
782 (origin
783 (method url-fetch)
fe147c41 784 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
785 (sha256
786 (base32
fe147c41 787 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 788 (build-system python-build-system)
797e1401
RW
789 (arguments
790 `(#:tests? #f ; no test target
791 #:phases
792 (modify-phases %standard-phases
793 (add-after 'unpack 'fix-hdf5-paths
794 (lambda* (#:key inputs #:allow-other-keys)
795 (let ((prefix (assoc-ref inputs "hdf5")))
796 (substitute* "setup_build.py"
797 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
798 (string-append "['" prefix "/lib" "']"))
799 (("'/opt/local/include', '/usr/local/include'")
800 (string-append "'" prefix "/include" "'")))
801 (substitute* "setup_configure.py"
802 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
803 (string-append "['" prefix "/lib" "']")))
804 #t))))))
3c4010b1 805 (propagated-inputs
69866690
HG
806 `(("python-six" ,python-six)
807 ("python-numpy" ,python-numpy)))
ef5cbf9b 808 (inputs
69866690 809 `(("hdf5" ,hdf5)))
ef5cbf9b 810 (native-inputs
fe147c41
EF
811 `(("python-cython" ,python-cython)
812 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
813 (home-page "http://www.h5py.org/")
814 (synopsis "Read and write HDF5 files from Python")
815 (description
816 "The h5py package provides both a high- and low-level interface to the
817HDF5 library from Python. The low-level interface is intended to be a
818complete wrapping of the HDF5 API, while the high-level component supports
819access to HDF5 files, datasets and groups using established Python and NumPy
820concepts.")
9820a028 821 (license license:bsd-3)))
ef5cbf9b
RW
822
823(define-public python2-h5py
9820a028 824 (package-with-python2 python-h5py))
ef5cbf9b 825
ea8450c8
TD
826(define-public python-netcdf4
827 (package
828 (name "python-netcdf4")
d5a97839 829 (version "1.2.7")
ea8450c8
TD
830 (source
831 (origin
832 (method url-fetch)
833 (uri (pypi-uri "netCDF4" version))
834 (sha256
835 (base32
d5a97839 836 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
ea8450c8
TD
837 (build-system python-build-system)
838 (native-inputs
839 `(("python-cython" ,python-cython)))
840 (propagated-inputs
841 `(("python-numpy" ,python-numpy)))
842 (inputs
843 `(("netcdf" ,netcdf)
844 ("hdf4" ,hdf4)
845 ("hdf5" ,hdf5)))
846 (arguments
847 '(#:phases
848 (modify-phases %standard-phases
849 (replace 'check
850 (lambda _
851 (setenv "NO_NET" "1") ; disable opendap tests
852 (with-directory-excursion "test"
853 (setenv "PYTHONPATH" ; find and add the library we just built
854 (string-append
855 (car (find-files "../build" "lib.*"
856 #:directories? #:t
857 #:fail-on-error? #:t))
858 ":" (getenv "PYTHONPATH")))
859 (zero? (system* "python" "run_all.py"))))))))
860 (home-page
861 "https://github.com/Unidata/netcdf4-python")
862 (synopsis "Python/numpy interface to the netCDF library")
863 (description "Netcdf4-python is a Python interface to the netCDF C
864library. netCDF version 4 has many features not found in earlier
865versions of the library and is implemented on top of HDF5. This module
866can read and write files in both the new netCDF 4 and the old netCDF 3
867format, and can create files that are readable by HDF5 clients. The
868API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
869to users of that module.")
870 ;; The software is mainly ISC, but includes some files covered
871 ;; by the Expat license.
872 (license (list license:isc license:expat))))
873
874(define-public python2-netcdf4
875 (package-with-python2 python-netcdf4))
876
c1448c69
EB
877(define-public python-lockfile
878 (package
879 (name "python-lockfile")
692add53 880 (version "0.12.2")
c1448c69
EB
881 (source
882 (origin
883 (method url-fetch)
884 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
885 "lockfile-" version ".tar.gz"))
886 (sha256
887 (base32
692add53 888 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
889 (build-system python-build-system)
890 (arguments '(#:test-target "check"))
692add53
BW
891 (native-inputs
892 `(("python-pbr" ,python-pbr)))
6a8f26a4 893 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
894 (synopsis "Platform-independent file locking module")
895 (description
896 "The lockfile package exports a LockFile class which provides a simple
897API for locking files.")
f210e944 898 (license license:expat)))
c1448c69
EB
899
900(define-public python2-lockfile
f210e944 901 (package-with-python2 python-lockfile))
c1448c69 902
5a1a4bf6
EB
903(define-public python-mock
904 (package
905 (name "python-mock")
906 (version "1.0.1")
907 (source
908 (origin
909 (method url-fetch)
6b7877e1 910 (uri (pypi-uri "mock" version))
5a1a4bf6
EB
911 (sha256
912 (base32
913 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
914 (build-system python-build-system)
915 (arguments '(#:test-target "check"))
6b7877e1 916 (home-page "https://github.com/testing-cabal/mock")
9e771e3b 917 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
918 (description
919 "Mock is a library for testing in Python. It allows you to replace parts
920of your system under test with mock objects and make assertions about how they
921have been used.")
bd3fa666 922 (license license:expat)))
5a1a4bf6
EB
923
924(define-public python2-mock
925 (package-with-python2 python-mock))
926
731b0c72
LF
927;;; Some packages (notably, certbot and python-acme) rely on this newer version
928;;; of python-mock. However, a large number of packages fail to build with
929;;; mock@2, so we add a new variable for now. Also, there may be a dependency
930;;; cycle between mock and six, so we avoid creating python2-mock@2 for now.
931(define-public python-mock-2
932 (package
933 (inherit python-mock)
934 (version "2.0.0")
935 (source
936 (origin
937 (method url-fetch)
938 (uri (pypi-uri "mock" version))
939 (sha256
940 (base32
941 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
942 (propagated-inputs
943 `(("python-pbr" ,python-pbr-minimal)
944 ,@(package-propagated-inputs python-mock)))))
fc50e9c6 945
73adf220
AE
946(define-public python-setuptools
947 (package
948 (name "python-setuptools")
d660f7be 949 (version "31.0.0")
73adf220
AE
950 (source
951 (origin
952 (method url-fetch)
d660f7be 953 (uri (pypi-uri "setuptools" version))
73adf220
AE
954 (sha256
955 (base32
d660f7be 956 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
957 (modules '((guix build utils)))
958 (snippet
959 '(begin
960 ;; Remove included binaries which are used to build self-extracting
961 ;; installers for Windows.
962 ;; TODO: Find some way to build them ourself so we can include them.
963 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
964 #t))))
73adf220 965 (build-system python-build-system)
d3d656c5
AE
966 ;; FIXME: Tests require pytest, which itself relies on setuptools.
967 ;; One could bootstrap with an internal untested setuptools.
73adf220 968 (arguments
824af8ca 969 `(#:tests? #f))
73adf220
AE
970 (home-page "https://pypi.python.org/pypi/setuptools")
971 (synopsis
972 "Library designed to facilitate packaging Python projects")
973 (description
974 "Setuptools is a fully-featured, stable library designed to facilitate
975packaging Python projects, where packaging includes:
976Python package and module definitions,
977distribution package metadata,
978test hooks,
979project installation,
980platform-specific details,
981Python 3 support.")
d660f7be
MB
982 ;; TODO: setuptools now bundles the following libraries:
983 ;; packaging, pyparsing, six and appdirs. How to unbundle?
984 (license (list license:psfl ; setuptools itself
985 license:expat ; six, appdirs, pyparsing
986 license:asl2.0 ; packaging is dual ASL2/BSD-2
987 license:bsd-2))))
73adf220
AE
988
989(define-public python2-setuptools
990 (package-with-python2 python-setuptools))
fc50e9c6 991
fa56c773
KK
992(define-public python-uniseg
993 (package
994 (name "python-uniseg")
995 (version "0.7.1")
996 (source
997 (origin
998 (method url-fetch)
999 (uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
1000 "get/rel-" version ".tar.gz"))
1001 (file-name (string-append name "-" version ".tar.gz"))
1002 (sha256
1003 (base32
1004 "1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
1005 (build-system python-build-system)
1006 (arguments
1007 '(#:tests? #f)) ; The test suite requires network access.
1008 (home-page
1009 "https://bitbucket.org/emptypage/uniseg-python")
1010 (synopsis
1011 "Python library to determine Unicode text segmentations")
1012 (description
1013 "Uniseg is a Python package used to determine Unicode text segmentations.
1014Supported segmentations include:
1015@enumerate
1016@item @dfn{Code point} (any value in the Unicode codespace)
1017@item @dfn{Grapheme cluster} (user-perceived character made of a single or
1018multiple Unicode code points, e.g. \"G\" + acute-accent)
1019@item Word break
1020@item Sentence break
1021@item Line break
1022@end enumerate")
1023 (license license:expat)))
1024
1025(define-public python2-uniseg
1026 (package-with-python2 python-uniseg))
1027
aa21c764 1028;;; Pycrypto is abandoned upstream:
1194575b 1029;;;
aa21c764 1030;;; https://github.com/dlitz/pycrypto/issues/173
1194575b 1031;;;
aa21c764 1032;;; TODO Remove this package from GNU Guix.
cafc3f5a
EB
1033(define-public python-pycrypto
1034 (package
1035 (name "python-pycrypto")
1036 (version "2.6.1")
1037 (source
1038 (origin
1039 (method url-fetch)
aa21c764
LF
1040 (uri (pypi-uri "pycrypto" version))
1041 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
cafc3f5a
EB
1042 (sha256
1043 (base32
1044 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
1045 (build-system python-build-system)
cafc3f5a
EB
1046 (inputs
1047 `(("python" ,python)
1048 ("gmp" ,gmp)))
1049 (arguments
1050 `(#:phases
1051 (alist-cons-before
1052 'build 'set-build-env
1053 ;; pycrypto runs an autoconf configure script behind the scenes
1054 (lambda _
1055 (setenv "CONFIG_SHELL" (which "bash")))
1056 %standard-phases)))
1057 (home-page "http://www.pycrypto.org/")
1058 (synopsis "Cryptographic modules for Python")
1059 (description
1060 "Pycrypto is a collection of both secure hash functions (such as SHA256
1061and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 1062etc.). The package is structured to make adding new modules easy.")
3f641af0 1063 (license license:public-domain)))
cafc3f5a 1064
345f0611 1065(define-public python2-pycrypto
1c0059da
EF
1066 (let ((pycrypto (package-with-python2 python-pycrypto)))
1067 (package (inherit pycrypto)
1068 (inputs
1069 `(("python" ,python-2)
1070 ,@(alist-delete
1071 "python"
1072 (package-inputs pycrypto)))))))
345f0611 1073
de959250 1074(define-public python-eventlet
1075 (package
1076 (name "python-eventlet")
1077 (version "0.20.1")
1078 (source
1079 (origin
1080 (method url-fetch)
1081 (uri (pypi-uri "eventlet" version))
1082 (sha256
1083 (base32
1084 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1085 (build-system python-build-system)
1086 (propagated-inputs
1087 `(("python-greenlet" ,python-greenlet)))
5150d8b4
TGR
1088 (arguments
1089 ;; TODO: Requires unpackaged 'enum-compat'.
1090 '(#:tests? #f))
de959250 1091 (home-page "http://eventlet.net")
1092 (synopsis "Concurrent networking library for Python")
1093 (description
1094 "Eventlet is a concurrent networking library for Python that
1095allows you to change how you run your code, not how you write it.
1096It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1097Coroutines ensure that the developer uses a blocking style of programming
1098that is similar to threading, but provide the benefits of non-blocking I/O.
1099The event dispatch is implicit, which means you can easily use @code{Eventlet}
1100from the Python interpreter, or as a small part of a larger application.")
1101 (license license:expat)))
1102
1103(define-public python2-eventlet
1104 (let ((base (package-with-python2
1105 (strip-python2-variant python-eventlet))))
1106 (package (inherit base)
1107 (propagated-inputs
1108 `(("python2-enum34" ,python2-enum34)
1109 ,@(package-propagated-inputs base))))))
1110
cafc3f5a
EB
1111(define-public python-keyring
1112 (package
1113 (name "python-keyring")
13f3ff35 1114 (version "8.7")
cafc3f5a
EB
1115 (source
1116 (origin
1117 (method url-fetch)
664e6c3a 1118 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
1119 (sha256
1120 (base32
13f3ff35 1121 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
1122 (build-system python-build-system)
1123 (native-inputs
13f3ff35 1124 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1125 (propagated-inputs
cafc3f5a
EB
1126 `(("python-pycrypto" ,python-pycrypto)))
1127 (arguments
664e6c3a 1128 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 1129 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
1130 (synopsis "Store and access your passwords safely")
1131 (description
1132 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 1133service from python. It can be used in any application that needs safe
cafc3f5a
EB
1134password storage.")
1135 ;; "MIT" and PSF dual license
f210e944 1136 (license license:x11)))
cafc3f5a 1137
d7af1069 1138(define-public python2-keyring
f210e944 1139 (package-with-python2 python-keyring))
d7af1069 1140
a480bc41
EB
1141(define-public python-six
1142 (package
1143 (name "python-six")
b6ab89ef 1144 (version "1.10.0")
a480bc41
EB
1145 (source
1146 (origin
1147 (method url-fetch)
b6ab89ef 1148 (uri (pypi-uri "six" version))
a480bc41
EB
1149 (sha256
1150 (base32
b6ab89ef 1151 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 1152 (build-system python-build-system)
4fd129ee
MB
1153 (native-inputs
1154 `(("python-py" ,python-py)
1155 ("python-pytest" ,python-pytest)))
a480bc41
EB
1156 (home-page "http://pypi.python.org/pypi/six/")
1157 (synopsis "Python 2 and 3 compatibility utilities")
1158 (description
35b9e423 1159 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
1160functions for smoothing over the differences between the Python versions with
1161the goal of writing Python code that is compatible on both Python versions.
35b9e423 1162Six supports every Python version since 2.5. It is contained in only one
a480bc41 1163Python file, so it can be easily copied into your project.")
3f641af0 1164 (license license:x11)))
a480bc41 1165
0c20025c
AE
1166(define-public python2-six
1167 (package-with-python2 python-six))
1168
22d7360b 1169(define-public python-dateutil
cafc3f5a
EB
1170 (package
1171 (name "python-dateutil")
e139c7a7 1172 (version "2.6.0")
cafc3f5a
EB
1173 (source
1174 (origin
1175 (method url-fetch)
394b8060 1176 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
1177 (sha256
1178 (base32
e139c7a7 1179 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
cafc3f5a 1180 (build-system python-build-system)
f22efa01 1181 (propagated-inputs
394b8060 1182 `(("python-six" ,python-six)))
b5a5fb19 1183 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
1184 (synopsis "Extensions to the standard datetime module")
1185 (description
1186 "The dateutil module provides powerful extensions to the standard
1187datetime module, available in Python 2.3+.")
f210e944 1188 (license license:bsd-3)))
cafc3f5a 1189
fc50e9c6
AE
1190(define-public python2-dateutil
1191 (package-with-python2 python-dateutil))
1d08c01f 1192
cafc3f5a
EB
1193(define-public python-parsedatetime
1194 (package
1195 (name "python-parsedatetime")
642656a1 1196 (version "2.4")
cafc3f5a
EB
1197 (source
1198 (origin
1199 (method url-fetch)
eebf6f01 1200 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1201 (sha256
1202 (base32
642656a1 1203 "0jxqkjks7z9dn222cqgvskp4wr6d92aglinxq7pd2w4mzdc7r09x"))))
cafc3f5a
EB
1204 (build-system python-build-system)
1205 (native-inputs
eebf6f01 1206 `(("python-nose" ,python-nose)
28958b64
LC
1207 ("python-pyicu" ,python-pyicu)
1208 ("python-pytest" ,python-pytest)
1209 ("python-pytest-runner" ,python-pytest-runner)))
1210 (propagated-inputs
1211 `(("python-future" ,python-future)))
7bf837fd 1212 (home-page "https://github.com/bear/parsedatetime/")
cafc3f5a
EB
1213 (synopsis
1214 "Parse human-readable date/time text")
1215 (description
e881752c 1216 "Parse human-readable date/time text.")
f210e944 1217 (license license:asl2.0)))
cafc3f5a 1218
38b8f9b2 1219(define-public python2-parsedatetime
f210e944 1220 (package-with-python2 python-parsedatetime))
38b8f9b2 1221
d072efcb
RW
1222(define-public python-pandas
1223 (package
1224 (name "python-pandas")
8e086048 1225 (version "0.19.2")
d072efcb
RW
1226 (source
1227 (origin
1b96f069 1228 (method url-fetch)
8e086048 1229 (uri (pypi-uri "pandas" version))
1b96f069 1230 (sha256
b03ee02f
MB
1231 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1232 (patches
1233 (search-patches "python-pandas-skip-failing-tests.patch"))))
d072efcb 1234 (build-system python-build-system)
d072efcb 1235 (propagated-inputs
f22efa01
HG
1236 `(("python-numpy" ,python-numpy)
1237 ("python-pytz" ,python-pytz)
22d7360b 1238 ("python-dateutil" ,python-dateutil)))
d072efcb 1239 (native-inputs
abcc7a0e
HG
1240 `(("python-nose" ,python-nose)
1241 ("python-cython" ,python-cython)))
d072efcb
RW
1242 (home-page "http://pandas.pydata.org")
1243 (synopsis "Data structures for data analysis, time series, and statistics")
1244 (description
1245 "Pandas is a Python package providing fast, flexible, and expressive data
1246structures designed to make working with structured (tabular,
1247multidimensional, potentially heterogeneous) and time series data both easy
1248and intuitive. It aims to be the fundamental high-level building block for
1249doing practical, real world data analysis in Python.")
f210e944 1250 (license license:bsd-3)))
d072efcb
RW
1251
1252(define-public python2-pandas
f210e944 1253 (package-with-python2 python-pandas))
d072efcb 1254
cafc3f5a
EB
1255(define-public python-tzlocal
1256 (package
1257 (name "python-tzlocal")
ed80839b 1258 (version "1.2.2")
cafc3f5a
EB
1259 (source
1260 (origin
1261 (method url-fetch)
226d3331 1262 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1263 (sha256
1264 (base32
ed80839b 1265 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1266 (build-system python-build-system)
f22efa01
HG
1267 (propagated-inputs
1268 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1269 (home-page "https://github.com/regebro/tzlocal")
1270 (synopsis
35b9e423 1271 "Local timezone information for Python")
cafc3f5a
EB
1272 (description
1273 "Tzlocal returns a tzinfo object with the local timezone information.
1274This module attempts to fix a glaring hole in pytz, that there is no way to
1275get the local timezone information, unless you know the zoneinfo name, and
1276under several distributions that's hard or impossible to figure out.")
3f641af0 1277 (license license:cc0)))
cafc3f5a 1278
1d08c01f
AE
1279(define-public python2-pysqlite
1280 (package
1281 (name "python2-pysqlite")
e80aaeb4 1282 (version "2.8.3")
1d08c01f
AE
1283 (source
1284 (origin
1285 (method url-fetch)
fe476868 1286 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1287 (sha256
1288 (base32
e80aaeb4 1289 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1d08c01f
AE
1290 (build-system python-build-system)
1291 (inputs
1292 `(("sqlite" ,sqlite)))
1293 (arguments
1294 `(#:python ,python-2 ; incompatible with Python 3
1295 #:tests? #f)) ; no test target
7bf837fd 1296 (home-page "https://github.com/ghaering/pysqlite")
7a03af70 1297 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1298 (description
1299 "Pysqlite provides SQLite bindings for Python that comply to the
1300Database API 2.0T.")
ed0cdf83 1301 (license license:zlib)))
1d08c01f 1302
2875caf5
AE
1303
1304(define-public python2-mechanize
1305 (package
1306 (name "python2-mechanize")
1307 (version "0.2.5")
1308 (source
1309 (origin
1310 (method url-fetch)
1311 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1312 version ".tar.gz"))
1313 (sha256
1314 (base32
1315 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1316 (build-system python-build-system)
2875caf5
AE
1317 (arguments
1318 `(#:python ,python-2 ; apparently incompatible with Python 3
1319 #:tests? #f))
1320 ;; test fails with message
1321 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1322 ;; (python-3.3.2) or
1323 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1324 ;; (python-2.7.5).
1325 ;; The source code is from March 2011 and probably not up-to-date
1326 ;; with respect to python unit tests.
1327 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1328 (synopsis
1329 "Stateful programmatic web browsing in Python")
1330 (description
1331 "Mechanize implements stateful programmatic web browsing in Python,
1332after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1333 (license (license:non-copyleft
1334 "file://COPYING"
1335 "See COPYING in the distribution."))))
2875caf5 1336
0352532e
AE
1337
1338(define-public python-simplejson
1339 (package
1340 (name "python-simplejson")
b2e6e150 1341 (version "3.10.0")
0352532e
AE
1342 (source
1343 (origin
1344 (method url-fetch)
988d1bad 1345 (uri (pypi-uri "simplejson" version))
0352532e
AE
1346 (sha256
1347 (base32
b2e6e150 1348 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1349 (build-system python-build-system)
1350 (home-page "http://simplejson.readthedocs.org/en/latest/")
1351 (synopsis
1352 "Json library for Python")
1353 (description
e881752c
AK
1354 "JSON (JavaScript Object Notation) is a subset of JavaScript
1355syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1356format.
0352532e
AE
1357
1358Simplejson exposes an API familiar to users of the standard library marshal
1359and pickle modules. It is the externally maintained version of the json
1360library contained in Python 2.6, but maintains compatibility with Python 2.5
1361and (currently) has significant performance advantages, even without using
1362the optional C extension for speedups. Simplejson is also supported on
1363Python 3.3+.")
3f641af0 1364 (license license:x11)))
0352532e
AE
1365
1366(define-public python2-simplejson
1367 (package-with-python2 python-simplejson))
421a80a2
AE
1368
1369
ed07b08d 1370(define-public python-pyicu
421a80a2 1371 (package
ed07b08d 1372 (name "python-pyicu")
2e161eaf 1373 (version "1.9.5")
421a80a2
AE
1374 (source
1375 (origin
1376 (method url-fetch)
2e161eaf 1377 (uri (pypi-uri "PyICU" version))
421a80a2
AE
1378 (sha256
1379 (base32
2e161eaf 1380 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
421a80a2 1381 (build-system python-build-system)
dc027d40
MB
1382 (arguments
1383 '(#:phases
1384 (modify-phases %standard-phases
1385 (add-before 'check 'delete-failing-test
1386 (lambda _
1387 ;; XXX: These tests require locales that are unavailable
1388 ;; in the build environment.
1389 (delete-file "test/test_DateTimeParserGenerator.py")
1390 #t)))))
421a80a2
AE
1391 (inputs
1392 `(("icu4c" ,icu4c)))
421a80a2 1393 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1394 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1395 (description
1396 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1397 (license license:x11)))
ed07b08d
LF
1398
1399(define-public python2-pyicu
f210e944 1400 (package-with-python2 python-pyicu))
cc20a22a
LC
1401
1402(define-public python2-dogtail
1403 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1404 ;; spaces in indentation" with Python 3.
1405 (package
1406 (name "python2-dogtail")
c5be3467 1407 (version "0.9.9")
cc20a22a
LC
1408 (source (origin
1409 (method url-fetch)
c5be3467 1410 (uri (pypi-uri "dogtail" version))
cc20a22a
LC
1411 (sha256
1412 (base32
c5be3467 1413 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
cc20a22a
LC
1414 (build-system python-build-system)
1415 (arguments `(#:python ,python-2
1416 #:tests? #f)) ; invalid command "test"
5ee684ff
EJ
1417 ;; Currently no offical homepage.
1418 (home-page "https://pypi.python.org/pypi/dogtail/")
1003fbcf 1419 (synopsis "GUI test tool and automation framework written in Python")
cc20a22a 1420 (description
35b9e423 1421 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1422It uses Accessibility (a11y) technologies to communicate with desktop
1423applications. dogtail scripts are written in Python and executed like any
1424other Python program.")
3f641af0 1425 (license license:gpl2+)))
515e6878 1426
011b18c3
LC
1427(define-public python2-empy
1428 (package
1429 (name "python2-empy")
1430 (version "3.3")
1431 (source (origin
1432 (method url-fetch)
1433 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1434 version ".tar.gz"))
1435 (sha256
1436 (base32
1437 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1438 (build-system python-build-system)
1439 (arguments
1440 `(#:python ,python-2
1441 #:phases (alist-replace
1442 'check
1443 (lambda _
1444 (zero? (system* "./test.sh")))
1445 %standard-phases)))
1446 (home-page "http://www.alcyone.com/software/empy/")
1447 (synopsis "Templating system for Python")
1448 (description
1449 "EmPy is a system for embedding Python expressions and statements in
1450template text; it takes an EmPy source file, processes it, and produces
1451output. This is accomplished via expansions, which are special signals to the
1cd4027c 1452EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1453EmPy can expand arbitrary Python expressions and statements in this way, as
1454well as a variety of special forms. Textual data not explicitly delimited in
1455this way is sent unaffected to the output, allowing Python to be used in
1456effect as a markup language. Also supported are callbacks via hooks,
1457recording and playback via diversions, and dynamic, chainable filters. The
1458system is highly configurable via command line options and embedded
1459commands.")
3f641af0 1460 (license license:lgpl2.1+)))
011b18c3 1461
8deeda0c
LC
1462(define-public python2-element-tree
1463 (package
1464 (name "python2-element-tree")
1465 (version "1.2.6")
1466 (source (origin
1467 (method url-fetch)
1468 (uri (string-append
1469 "http://effbot.org/media/downloads/elementtree-"
1470 version "-20050316.tar.gz"))
1471 (sha256
1472 (base32
1473 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1474 (build-system python-build-system)
1475 (arguments
1476 `(#:python ,python-2 ; seems to be part of Python 3
1477 #:tests? #f)) ; no 'test' sub-command
1478 (synopsis "Toolkit for XML processing in Python")
1479 (description
1480 "ElementTree is a Python library supporting lightweight XML processing.")
1481 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1482 (license (license:x11-style
1483 "http://docs.python.org/2/license.html"
1484 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1485
1486(define-public python2-pybugz
1487 (package
1488 (name "python2-pybugz")
1489 (version "0.6.11")
1490 (source (origin
1491 (method url-fetch)
1492 (uri (string-append
1493 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1494 version ".tar.gz"))
1495 (sha256
1496 (base32
6f194a1e 1497 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1498 (patches (search-patches "pybugz-stty.patch"
1499 "pybugz-encode-error.patch"))))
8deeda0c
LC
1500 (build-system python-build-system)
1501 (arguments
1502 `(#:python ,python-2 ; SyntaxError with Python 3
1503 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1504 (propagated-inputs
1505 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1506 (synopsis "Python and command-line interface to Bugzilla")
1507 (description
1508 "PyBugz is a Python library and command-line tool to query the Bugzilla
1509bug tracking system. It is meant as an aid to speed up interaction with the
1510bug tracker.")
1511 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1512 (license license:gpl2)))
8deeda0c 1513
a480bc41
EB
1514(define-public python-enum34
1515 (package
1516 (name "python-enum34")
5e923414 1517 (version "1.1.6")
a480bc41
EB
1518 (source
1519 (origin
1520 (method url-fetch)
d39ae1e5 1521 (uri (pypi-uri "enum34" version))
a480bc41
EB
1522 (sha256
1523 (base32
5e923414 1524 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
a480bc41 1525 (build-system python-build-system)
a480bc41
EB
1526 (home-page "https://pypi.python.org/pypi/enum34")
1527 (synopsis "Backported Python 3.4 Enum")
1528 (description
1529 "Enum34 is the new Python stdlib enum module available in Python 3.4
1530backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1531 (license license:bsd-3)))
a480bc41 1532
820acd1b
LF
1533(define-public python2-enum34
1534 (package-with-python2 python-enum34))
1535
a480bc41
EB
1536(define-public python-parse-type
1537 (package
1538 (name "python-parse-type")
1539 (version "0.3.4")
1540 (source
1541 (origin
1542 (method url-fetch)
1543 (uri (string-append "https://pypi.python.org/packages/source/p/"
1544 "parse_type/parse_type-" version ".tar.gz"))
1545 (sha256
1546 (base32
1547 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1548 (build-system python-build-system)
8ed12889
DM
1549 (arguments
1550 `(#:phases
1551 (modify-phases %standard-phases
1552 (add-after 'unpack 'patch-tests
1553 (lambda _
1554 (substitute* "tests/test_parse_type_parse.py"
1555 ;; Newer Python versions don't have the problem this test tests.
1556 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1557 ""))
1558 #t)))))
f22efa01 1559 (propagated-inputs
f3b98f4f 1560 `(("python-six" ,python-six)
68f1cdec 1561 ("python-parse" ,python-parse)))
8ed12889
DM
1562 (native-inputs
1563 `(("python-pytest" ,python-pytest)
1564 ("python-pytest-runner" ,python-pytest-runner)))
a480bc41
EB
1565 (home-page "https://github.com/jenisys/parse_type")
1566 (synopsis "Extended parse module")
1567 (description
1568 "Parse_type extends the python parse module.")
8ed12889
DM
1569 (properties
1570 `((python2-variant . ,(delay python2-parse-type))))
3f641af0 1571 (license license:bsd-3)))
a480bc41 1572
8ed12889
DM
1573(define-public python2-parse-type
1574 (let ((base (package-with-python2
1575 (strip-python2-variant python-parse-type))))
1576 (package (inherit base)
1577 (propagated-inputs
1578 `(("python2-enum34" ,python2-enum34)
1579 ,@(package-propagated-inputs base))))))
1580
a480bc41
EB
1581(define-public python-parse
1582 (package
1583 (name "python-parse")
eb3d3503 1584 (version "1.6.6")
a480bc41
EB
1585 (source
1586 (origin
1587 (method url-fetch)
eb3d3503 1588 (uri (pypi-uri "parse" version))
a480bc41
EB
1589 (sha256
1590 (base32
aa6c09ed
EF
1591 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1592 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1593 (build-system python-build-system)
1594 (arguments
1595 `(#:phases
f9a65318
EF
1596 (modify-phases %standard-phases
1597 (replace 'check
1598 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1599 (home-page "https://github.com/r1chardj0n3s/parse")
1600 (synopsis "Parse strings")
1601 (description
1602 "Parse strings using a specification based on the Python format()
1603syntax.")
3f641af0 1604 (license license:x11)))
a480bc41 1605
d3eff97a
JL
1606(define-public python-polib
1607 (package
1608 (name "python-polib")
1609 (version "1.0.8")
1610 (source (origin
1611 (method url-fetch)
1612 (uri (pypi-uri "polib" version))
1613 (sha256
1614 (base32
1615 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1616 (build-system python-build-system)
1617 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1618 (synopsis "Manipulate, create and modify gettext files")
1619 (description "Polib can manipulate any gettext format (po, pot and mo)
1620files. It can be used to create po files from scratch or to modify
1621existing ones.")
1622 (license license:expat)))
1623
1624(define-public python2-polib
1625 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1626 (package
1627 (inherit base)
1628 (arguments `(,@(package-arguments base)
1629 ;; Tests don't work with python2.
1630 #:tests? #f)))))
a480bc41 1631
515e6878
LC
1632(define-public scons
1633 (package
1634 (name "scons")
76ab3141 1635 (version "2.5.1")
515e6878
LC
1636 (source (origin
1637 (method url-fetch)
de67e922
LF
1638 (uri (string-append "mirror://sourceforge/scons/scons/" version
1639 "/scons-" version ".tar.gz"))
515e6878
LC
1640 (sha256
1641 (base32
76ab3141 1642 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
515e6878
LC
1643 (build-system python-build-system)
1644 (arguments
1645 ;; With Python 3.x, fails to build with a syntax error.
1646 `(#:python ,python-2
b3e8b4bd 1647 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1648 #:tests? #f)) ; no 'python setup.py test' command
1649 (home-page "http://scons.org/")
1650 (synopsis "Software construction tool written in Python")
1651 (description
1652 "SCons is a software construction tool. Think of SCons as an improved,
1653cross-platform substitute for the classic Make utility with integrated
1654functionality similar to autoconf/automake and compiler caches such as ccache.
1655In short, SCons is an easier, more reliable and faster way to build
1656software.")
3f641af0 1657 (license license:x11)))
011b18c3 1658
c15a5c0e
DT
1659(define-public python-extras
1660 (package
1661 (name "python-extras")
1662 (version "0.0.3")
1663 (source
1664 (origin
1665 (method url-fetch)
1666 (uri (string-append
1667 "https://pypi.python.org/packages/source/e/extras/extras-"
1668 version ".tar.gz"))
1669 (sha256
1670 (base32
1671 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1672 (build-system python-build-system)
c15a5c0e
DT
1673 (arguments
1674 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1675 '(#:tests? #f))
1676 (home-page "https://github.com/testing-cabal/extras")
1677 (synopsis "Useful extensions to the Python standard library")
1678 (description
1679 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1680 (license license:expat)))
c15a5c0e
DT
1681
1682(define-public python2-extras
1683 (package-with-python2 python-extras))
1684
56ea0efd
DT
1685(define-public python-mimeparse
1686 (package
1687 (name "python-mimeparse")
1688 (version "0.1.4")
1689 (source
1690 (origin
1691 (method url-fetch)
1692 (uri (string-append
1693 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1694 version ".tar.gz"))
1695 (sha256
1696 (base32
1697 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1698 (build-system python-build-system)
56ea0efd
DT
1699 (arguments
1700 '(#:tests? #f)) ; no setup.py test command
1701 (home-page
1702 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1703 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1704 (description
1705 "Mimeparse provides basic functions for parsing MIME type names and
1706matching them against a list of media-ranges.")
bd3fa666 1707 (license license:expat)))
56ea0efd
DT
1708
1709(define-public python2-mimeparse
1710 (package-with-python2 python-mimeparse))
1711
4435427e
DT
1712(define-public python-nose
1713 (package
1714 (name "python-nose")
f7cb9841 1715 (version "1.3.7")
4435427e
DT
1716 (source
1717 (origin
1718 (method url-fetch)
f7cb9841 1719 (uri (pypi-uri "nose" version))
4435427e
DT
1720 (sha256
1721 (base32
f7cb9841 1722 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1723 (build-system python-build-system)
4435427e
DT
1724 (arguments
1725 '(#:tests? #f)) ; FIXME: test suite fails
1726 (home-page "http://readthedocs.org/docs/nose/")
1727 (synopsis "Python testing library")
1728 (description
1729 "Nose extends the unittest library to make testing easier.")
3f641af0 1730 (license license:lgpl2.0+)))
4435427e
DT
1731
1732(define-public python2-nose
1733 (package-with-python2 python-nose))
1734
0aea283a
EF
1735(define-public python-nose2
1736 (package
1737 (name "python-nose2")
1738 (version "0.6.5")
1739 (source
1740 (origin
1741 (method url-fetch)
1742 (uri (pypi-uri "nose2" version))
1743 (sha256
1744 (base32
1745 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1746 (build-system python-build-system)
1747 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1748 (propagated-inputs
0aea283a
EF
1749 `(("python-cov-core" ,python-cov-core)
1750 ("python-pytest-cov" ,python-pytest-cov)
1751 ("python-six" ,python-six)))
1752 (home-page "https://github.com/nose-devs/nose2")
1753 (synopsis "Next generation of nicer testing for Python")
1754 (description
1755 "Nose2 is the next generation of nicer testing for Python, based on the
1756plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1757better plugin api, being easier for users to configure, and simplifying internal
1758interfaces and processes.")
1759 (license license:bsd-2)))
1760
1761(define-public python2-nose2
1762 (package-with-python2 python-nose2))
1763
6cd9c356
DT
1764(define-public python-unittest2
1765 (package
1766 (name "python-unittest2")
1767 (version "0.5.1")
1768 (source
1769 (origin
1770 (method url-fetch)
1771 (uri (string-append
1772 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1773 version ".tar.gz"))
1774 (sha256
1775 (base32
1776 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1777 (build-system python-build-system)
6cd9c356
DT
1778 (home-page "http://pypi.python.org/pypi/unittest2")
1779 (synopsis "Python unit testing library")
1780 (description
1781 "Unittest2 is a replacement for the unittest module in the Python
1782standard library.")
3f641af0 1783 (license license:psfl)))
6cd9c356
DT
1784
1785(define-public python2-unittest2
1786 (package (inherit python-unittest2)
1787 (name "python2-unittest2")
1788 (version "0.5.1")
1789 (source
1790 (origin
1791 (method url-fetch)
1792 (uri (string-append
1793 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1794 version ".tar.gz"))
1795 (sha256
1796 (base32
1797 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1798 (arguments
1799 `(#:python ,python-2
1800 #:tests? #f)))) ; no setup.py test command
1801
02f8f804 1802(define-public python-pafy
1803 (package
1804 (name "python-pafy")
745d85b7 1805 (version "0.5.3.1")
02f8f804 1806 (source
1807 (origin
1808 (method url-fetch)
1809 (uri (pypi-uri "pafy" version))
1810 (sha256
1811 (base32
745d85b7 1812 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
02f8f804 1813 (build-system python-build-system)
ed3fee5f 1814 (arguments
1815 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1816 (propagated-inputs
1817 ;; Youtube-dl is a python package which is imported in the file
1818 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1819 `(("youtube-dl" ,youtube-dl)))
1820 (home-page "https://np1.github.io/pafy/")
1821 (synopsis "Retrieve YouTube content and metadata")
1822 (description
1823 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1824 (license license:lgpl3+)))
1825
542ad60f
DT
1826(define-public python-py
1827 (package
1828 (name "python-py")
b9463fdb 1829 (version "1.4.32")
542ad60f
DT
1830 (source
1831 (origin
1832 (method url-fetch)
71c8a804 1833 (uri (pypi-uri "py" version))
542ad60f
DT
1834 (sha256
1835 (base32
b9463fdb 1836 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
542ad60f 1837 (build-system python-build-system)
dcb0da7b
MB
1838 (arguments
1839 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1840 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1841 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1842 ;; Is this module globally installed?"
1843 '(#:tests? #f))
542ad60f
DT
1844 (home-page "http://pylib.readthedocs.org/")
1845 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1846 (description
1847 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1848code introspection, and logging.")
bd3fa666 1849 (license license:expat)))
542ad60f
DT
1850
1851(define-public python2-py
1852 (package-with-python2 python-py))
1853
855d4761
DT
1854(define-public python-pytest
1855 (package
1856 (name "python-pytest")
61a4332d 1857 (version "2.7.3")
855d4761
DT
1858 (source
1859 (origin
1860 (method url-fetch)
1861 (uri (string-append
1862 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1863 version ".tar.gz"))
1864 (sha256
1865 (base32
61a4332d 1866 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1867 (modules '((guix build utils)))
1868 (snippet
1869 ;; One of the tests involves the /usr directory, so it fails.
1870 '(substitute* "testing/test_argcomplete.py"
1871 (("def test_remove_dir_prefix\\(self\\):")
1872 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1873 (build-system python-build-system)
482d9591
HG
1874 (propagated-inputs
1875 `(("python-py" ,python-py)))
e7881f3d 1876 (native-inputs
482d9591 1877 `(("python-nose" ,python-nose)
855d4761
DT
1878 ("python-mock" ,python-mock)))
1879 (home-page "http://pytest.org")
1880 (synopsis "Python testing library")
1881 (description
1882 "Pytest is a testing tool that provides auto-discovery of test modules
1883and functions, detailed info on failing assert statements, modular fixtures,
1884and many external plugins.")
bd3fa666 1885 (license license:expat)))
855d4761
DT
1886
1887(define-public python2-pytest
1888 (package-with-python2 python-pytest))
1889
23b9168d
LF
1890;; Some packages require a newer pytest.
1891(define-public python-pytest-3.0
fca4ff35
LF
1892 (package
1893 (inherit python-pytest)
1894 (name "python-pytest")
23b9168d 1895 (version "3.0.7")
fca4ff35
LF
1896 (source (origin
1897 (method url-fetch)
1898 (uri (pypi-uri "pytest" version))
1899 (sha256
1900 (base32
23b9168d 1901 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
fca4ff35
LF
1902 (arguments
1903 `(#:phases
1904 (modify-phases %standard-phases
1905 (add-before 'check 'disable-invalid-test
1906 (lambda _
1907 (substitute* "testing/test_argcomplete.py"
1908 (("def test_remove_dir_prefix" line)
1909 (string-append "@pytest.mark.skip"
1910 "(reason=\"Assumes that /usr exists.\")\n "
1911 line)))
23b9168d 1912 #t)))))
7f71e257
MFM
1913 (native-inputs
1914 `(("python-nose" ,python-nose)
1915 ("python-mock" ,python-mock)
23b9168d
LF
1916 ("python-hypothesis" ,python-hypothesis)))
1917 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1918
1919(define-public python2-pytest-3.0
1920 (let ((base (package-with-python2
1921 (strip-python2-variant python-pytest-3.0))))
1922 (package (inherit base)
1923 (native-inputs
1924 `(("python2-enum34" ,python2-enum34)
1925 ,@(package-native-inputs base))))))
fca4ff35 1926
358c3d61
EF
1927(define-public python-pytest-cov
1928 (package
1929 (name "python-pytest-cov")
1aecfe17 1930 (version "2.4.0")
358c3d61
EF
1931 (source
1932 (origin
1933 (method url-fetch)
1934 (uri (pypi-uri "pytest-cov" version))
1935 (sha256
545f4a1c 1936 (base32
1aecfe17 1937 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
10468636 1938 (build-system python-build-system)
ce40b383
HG
1939 (arguments
1940 `(#:phases
1941 (modify-phases %standard-phases
1942 (replace 'check
1943 (lambda _
1944 ;; options taken from tox.ini
1945 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1946 ;; with "Duplicate implicit target name"
1947 (zero? (system* "python" "./setup.py" "check"
1948 "--strict" "--metadata")))))))
f22efa01 1949 (propagated-inputs
10468636
EF
1950 `(("python-coverage" ,python-coverage)
1951 ("python-pytest" ,python-pytest)))
10468636
EF
1952 (home-page "https://github.com/pytest-dev/pytest-cov")
1953 (synopsis "Pytest plugin for measuring coverage")
1954 (description
1955 "Pytest-cov produces coverage reports. It supports centralised testing and
1956distributed testing in both @code{load} and @code{each} modes. It also
1957supports coverage of subprocesses.")
f210e944 1958 (license license:expat)))
358c3d61
EF
1959
1960(define-public python2-pytest-cov
f210e944 1961 (package-with-python2 python-pytest-cov))
358c3d61 1962
6784f2e3
RW
1963(define-public python-pytest-runner
1964 (package
1965 (name "python-pytest-runner")
047160f2 1966 (version "2.11.1")
6784f2e3
RW
1967 (source
1968 (origin
1969 (method url-fetch)
54cd239b 1970 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1971 (sha256
1972 (base32
047160f2 1973 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
6784f2e3
RW
1974 (build-system python-build-system)
1975 (arguments
1976 `(#:phases
1977 (modify-phases %standard-phases
1978 ;; The fancy way of setting the version with setuptools_scm does not
1979 ;; seem to work here.
1980 (add-after 'unpack 'set-version
1981 (lambda _
1982 (substitute* "docs/conf.py"
1983 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1984 (string-append "version = \"" ,version "\"")))
1985 #t)))))
1986 (native-inputs
1987 `(("python-pytest" ,python-pytest)
1988 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1989 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1990 (synopsis "Invoke py.test as a distutils command")
1991 (description
1992 "This package provides a @command{pytest-runner} command that
1993@file{setup.py} files can use to run tests.")
f210e944 1994 (license license:expat)))
54cd239b
EF
1995
1996(define-public python2-pytest-runner
f210e944 1997 (package-with-python2 python-pytest-runner))
6784f2e3 1998
44547e51
EF
1999(define-public python-pytest-mock
2000 (package
2001 (name "python-pytest-mock")
2002 (version "1.2")
2003 (source
2004 (origin
2005 (method url-fetch)
2006 (uri (pypi-uri "pytest-mock" version ".zip"))
2007 (sha256
2008 (base32
2009 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
2010 (build-system python-build-system)
2011 (native-inputs
2012 `(("unzip" ,unzip)))
f22efa01 2013 (propagated-inputs
d5e41cf2 2014 `(("python-pytest" ,python-pytest)))
44547e51
EF
2015 (home-page "https://github.com/pytest-dev/pytest-mock/")
2016 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
2017 (description
2018 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
2019around the patching API provided by the @code{mock} package, but with the
2020benefit of not having to worry about undoing patches at the end of a test.
2021The mocker fixture has the same API as @code{mock.patch}, supporting the
2022same arguments.")
2023 (properties `((python2-variant . ,(delay python2-pytest-mock))))
2024 (license license:expat)))
2025
2026(define-public python2-pytest-mock
2027 (let ((base (package-with-python2
2028 (strip-python2-variant python-pytest-mock))))
2029 (package (inherit base)
f22efa01 2030 (propagated-inputs
44547e51 2031 `(("python2-mock" ,python2-mock)
f22efa01 2032 ,@(package-propagated-inputs base))))))
44547e51 2033
8fa58fc9
CAW
2034(define-public python-pytest-xdist
2035 (package
2036 (name "python-pytest-xdist")
2037 (version "1.14")
2038 (source
2039 (origin
2040 (method url-fetch)
2041 (uri (pypi-uri "pytest-xdist" version ".zip"))
2042 (sha256
2043 (base32
de585a7e
HG
2044 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
2045 (modules '((guix build utils)))
2046 (snippet
2047 '(begin
2048 ;; Remove pre-compiled .pyc files from source.
2049 (for-each delete-file-recursively
2050 (find-files "." "__pycache__" #:directories? #t))
2051 (for-each delete-file (find-files "." "\\.pyc$"))
2052 #t))))
8fa58fc9 2053 (build-system python-build-system)
4eb385fb
MB
2054 (arguments
2055 '(#:tests? #f)) ;FIXME: Some tests are failing.
2056 ;; #:phases
2057 ;; (modify-phases %standard-phases
2058 ;; (delete 'check)
2059 ;; (add-after 'install 'check
2060 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2061 ;; (add-installed-pythonpath inputs outputs)
2062 ;; (zero? (system* "py.test" "-v")))))
8fa58fc9
CAW
2063 (native-inputs
2064 `(("unzip" ,unzip)
8fa58fc9 2065 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 2066 (propagated-inputs
c4516ad2 2067 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
2068 ("python-pytest" ,python-pytest)
2069 ("python-py" ,python-py)))
2070 (home-page
2071 "https://github.com/pytest-dev/pytest-xdist")
2072 (synopsis
2073 "Plugin for py.test with distributed testing and loop-on-failing modes")
2074 (description
2075 "The pytest-xdist plugin extends py.test with some unique test execution
2076modes: parallelization, running tests in boxed subprocesses, the ability
2077to run tests repeatedly when failed, and the ability to run tests on multiple
2078Python interpreters or platforms. It uses rsync to copy the existing
2079program code to a remote location, executes there, and then syncs the
2080result back.")
f210e944 2081 (license license:expat)))
8fa58fc9
CAW
2082
2083(define-public python2-pytest-xdist
f210e944 2084 (package-with-python2 python-pytest-xdist))
8fa58fc9 2085
84d24017
DT
2086(define-public python-scripttest
2087 (package
2088 (name "python-scripttest")
2089 (version "1.3")
2090 (source
2091 (origin
2092 (method url-fetch)
2093 (uri (string-append
2094 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2095 version ".tar.gz"))
2096 (sha256
2097 (base32
2098 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2099 (build-system python-build-system)
521b7772 2100 (native-inputs
f3b98f4f 2101 `(("python-pytest" ,python-pytest)))
84d24017
DT
2102 (home-page "http://pythonpaste.org/scripttest/")
2103 (synopsis "Python library to test command-line scripts")
2104 (description "Scripttest is a Python helper library for testing
2105interactive command-line applications. With it you can run a script in a
2106subprocess and see the output as well as any file modifications.")
bd3fa666 2107 (license license:expat)))
84d24017
DT
2108
2109(define-public python2-scripttest
2110 (package-with-python2 python-scripttest))
2111
d8fa80e1
DT
2112(define-public python-testtools
2113 (package
2114 (name "python-testtools")
7adb9031 2115 (version "1.4.0")
d8fa80e1
DT
2116 (source
2117 (origin
2118 (method url-fetch)
7adb9031 2119 (uri (pypi-uri "testtools" version))
d8fa80e1
DT
2120 (sha256
2121 (base32
7adb9031 2122 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
d8fa80e1 2123 (build-system python-build-system)
7adb9031
DM
2124 (arguments
2125 `(#:phases
2126 (modify-phases %standard-phases
2127 (add-after 'unpack 'fix-module-imports
2128 (lambda _
2129 (substitute* "setup.py"
2130 (("'unittest2>=0.8.0',") ""))
2131 (substitute* '("testtools/testcase.py"
2132 "testtools/testsuite.py"
2133 "testtools/run.py"
2134 "testtools/tests/test_run.py"
2135 "testtools/tests/test_testsuite.py"
2136 "testtools/tests/test_deferredruntest.py")
2137 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2138 (("import unittest2 as unittest") "import unittest")
2139 (("import unittest2") "import unittest as unittest2")
2140 (("from unittest2 import") "from unittest import"))
2141 (substitute* "testtools/tests/test_testresult.py"
2142 ;; NUL in source code is not allowed (raises ValueError).
2143 (("\\x00\\x04") "\\x04"))
2144 #t)))))
0e88cbf8 2145 (propagated-inputs
f22efa01
HG
2146 `(("python-mimeparse" ,python-mimeparse)
2147 ("python-extras" ,python-extras)))
d8fa80e1
DT
2148 (home-page "https://github.com/testing-cabal/testtools")
2149 (synopsis
2150 "Extensions to the Python standard library unit testing framework")
2151 (description
2152 "Testtools extends the Python standard library unit testing framework to
2153provide matchers, more debugging information, and cross-Python
2154compatibility.")
3f641af0 2155 (license license:psfl)))
d8fa80e1
DT
2156
2157(define-public python2-testtools
2158 (package-with-python2 python-testtools))
2159
5bf3afea
DT
2160(define-public python-testscenarios
2161 (package
2162 (name "python-testscenarios")
2163 (version "0.4")
2164 (source
2165 (origin
2166 (method url-fetch)
2167 (uri (string-append
2168 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2169 version ".tar.gz"))
2170 (sha256
2171 (base32
2172 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2173 (build-system python-build-system)
f22efa01 2174 (propagated-inputs
8e73d3ba 2175 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
2176 (home-page "https://launchpad.net/testscenarios")
2177 (synopsis "Pyunit extension for dependency injection")
2178 (description
2179 "Testscenarios provides clean dependency injection for Python unittest
2180style tests.")
3f641af0 2181 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
2182
2183(define-public python2-testscenarios
2184 (package-with-python2 python-testscenarios))
2185
dac79ecc
DT
2186(define-public python-testresources
2187 (package
2188 (name "python-testresources")
2189 (version "0.2.7")
2190 (source
2191 (origin
2192 (method url-fetch)
2193 (uri (string-append
2194 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2195 version ".tar.gz"))
2196 (sha256
2197 (base32
2198 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2199 (build-system python-build-system)
dac79ecc
DT
2200 (home-page "https://launchpad.net/testresources")
2201 (synopsis
2202 "Pyunit extension for managing test resources")
2203 (description
2204 "Testresources is an extension to Python's unittest to allow declarative
2205use of resources by test cases.")
3f641af0 2206 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
2207
2208(define-public python2-testresources
2209 (package-with-python2 python-testresources))
2210
070ab058
DT
2211(define-public python-subunit
2212 (package
2213 (name "python-subunit")
2214 (version "0.0.21")
2215 (source
2216 (origin
2217 (method url-fetch)
2218 (uri (string-append
2219 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2220 version ".tar.gz"))
2221 (sha256
2222 (base32
2223 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2224 (build-system python-build-system)
f22efa01 2225 (propagated-inputs
b52ad371
HG
2226 `(("python-extras" ,python-extras)
2227 ("python-mimeparse" ,python-mimeparse)))
2228 (native-inputs
2229 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
2230 (home-page "http://launchpad.net/subunit")
2231 (synopsis "Python implementation of the subunit protocol")
2232 (description
2233 "Python-subunit is a Python implementation of the subunit test streaming
2234protocol.")
3f641af0 2235 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2236
2237(define-public python2-subunit
2238 (package-with-python2 python-subunit))
2239
d2a8db92
HG
2240;; Recent versions of python-fixtures and python-testrepository need
2241;; python-pbr for packaging, which itself needs these two packages for
2242;; testing.
2243;; To fix this circular dependency, we use a build of python-pbr, based on the
2244;; same source, just without any test dependencies and with tests disabled.
2245;; python-pbr-minmal is then used to package python-fixtures and
2246;; python-testrepository.
2247;; Strictly speaking we currently could remove the test-requirements from the
2248;; normal python-pbr package (and save this package) since test are disabled
2249;; there anyway. But this may change in future.
2250(define python-pbr-minimal
cd49454b 2251 (package
d2a8db92 2252 (name "python-pbr-minimal")
5bbb2249 2253 (version "1.10.0")
7787ef76
CR
2254 (source
2255 (origin
2256 (method url-fetch)
d2a8db92 2257 (uri (pypi-uri "pbr" version))
7787ef76
CR
2258 (sha256
2259 (base32
a1e3ed6e
DM
2260 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2261 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
7787ef76
CR
2262 (build-system python-build-system)
2263 (arguments
d2a8db92
HG
2264 `(#:tests? #f))
2265 (home-page "http://docs.openstack.org/developer/pbr/")
2266 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2267 (description
d2a8db92 2268 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2269 (license license:asl2.0)))
7787ef76 2270
d2a8db92
HG
2271(define python2-pbr-minimal
2272 (package-with-python2 python-pbr-minimal))
7787ef76 2273
1ef09c0c 2274(define-public python-pbr
e25f0174 2275 (package
d2a8db92 2276 (inherit python-pbr-minimal)
e25f0174 2277 (name "python-pbr")
e25f0174
BW
2278 (arguments
2279 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2280 (propagated-inputs
d2a8db92
HG
2281 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2282 (native-inputs
e25f0174 2283 `(("python-fixtures" ,python-fixtures)
d2a8db92 2284 ;; discover, coverage, hacking, subunit
e25f0174 2285 ("python-mock" ,python-mock)
d2a8db92 2286 ("python-six" ,python-six)
e25f0174
BW
2287 ("python-sphinx" ,python-sphinx)
2288 ("python-testrepository" ,python-testrepository)
2289 ("python-testresources" ,python-testresources)
2290 ("python-testscenarios" ,python-testscenarios)
2291 ("python-testtools" ,python-testtools)
2292 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2293 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2294 (description
2295 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2296and sensible default behaviors into your setuptools run. It will set
2297versions, process requirements files and generate AUTHORS and ChangeLog file
2298from git information.
2299")))
1ef09c0c
BW
2300
2301(define-public python2-pbr
e25f0174 2302 (package-with-python2 python-pbr))
1ef09c0c 2303
7787ef76
CR
2304(define-public python-fixtures
2305 (package
2306 (name "python-fixtures")
13fcc6df 2307 (version "1.4.0")
7787ef76
CR
2308 (source
2309 (origin
2310 (method url-fetch)
13fcc6df 2311 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2312 (sha256
2313 (base32
13fcc6df 2314 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76 2315 (build-system python-build-system)
f6c1ef18
MB
2316 (arguments
2317 '(#:phases
2318 (modify-phases %standard-phases
2319 (replace 'check
2320 (lambda _
2321 (zero? (system* "python" "-m" "testtools.run"
2322 "fixtures.test_suite")))))))
7787ef76 2323 (propagated-inputs
ae92cadd 2324 `(("python-six" ,python-six)))
e7881f3d 2325 (native-inputs
f6c1ef18
MB
2326 `(("python-mock" ,python-mock)
2327 ("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2328 ("python-testtools" ,python-testtools)))
7787ef76
CR
2329 (home-page "https://launchpad.net/python-fixtures")
2330 (synopsis "Python test fixture library")
2331 (description
2332 "Fixtures provides a way to create reusable state, useful when writing
2333Python tests.")
3f641af0 2334 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2335
cd49454b
DT
2336(define-public python2-fixtures
2337 (package-with-python2 python-fixtures))
2338
b24a0c00
DT
2339(define-public python-testrepository
2340 (package
2341 (name "python-testrepository")
2342 (version "0.0.20")
2343 (source
2344 (origin
2345 (method url-fetch)
2346 (uri (string-append
2347 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2348 version ".tar.gz"))
2349 (sha256
2350 (base32
2351 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2352 (build-system python-build-system)
90110ef9
MB
2353 (arguments
2354 ;; FIXME: Many tests are failing.
2355 '(#:tests? #f))
05de40c5 2356 (propagated-inputs
b2e66edf
HG
2357 `(("python-fixtures" ,python-fixtures)
2358 ("python-subunit" ,python-subunit)
b52ad371
HG
2359 ("python-testtools" ,python-testtools)))
2360 (native-inputs
2361 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2362 ("python-mimeparse" ,python-mimeparse)))
2363 (home-page "https://launchpad.net/testrepository")
2364 (synopsis "Database for Python test results")
2365 (description "Testrepository provides a database of test results which can
2366be used as part of a developer's workflow to check things such as what tests
2367have failed since the last commit or what tests are currently failing.")
3f641af0 2368 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2369
2370(define-public python2-testrepository
2371 (package-with-python2 python-testrepository))
2372
243a009a
DT
2373(define-public python-coverage
2374 (package
2375 (name "python-coverage")
4d4cf3dd 2376 (version "4.1")
243a009a
DT
2377 (source
2378 (origin
2379 (method url-fetch)
82a3c582 2380 (uri (pypi-uri "coverage" version))
243a009a
DT
2381 (sha256
2382 (base32
4d4cf3dd 2383 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2384 (build-system python-build-system)
bd10e677
MB
2385 (arguments
2386 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2387 '(#:tests? #f))
243a009a
DT
2388 (home-page "http://nedbatchelder.com/code/coverage")
2389 (synopsis "Code coverage measurement for Python")
2390 (description
2391 "Coverage measures code coverage, typically during test execution. It
2392uses the code analysis tools and tracing hooks provided in the Python standard
2393library to determine which lines are executable, and which have been
2394executed.")
3f641af0 2395 (license license:bsd-3)))
243a009a
DT
2396
2397(define-public python2-coverage
2398 (package-with-python2 python-coverage))
2399
12f839fd
EF
2400(define-public python-cov-core
2401 (package
2402 (name "python-cov-core")
2403 (version "1.15.0")
2404 (source
2405 (origin
2406 (method url-fetch)
2407 (uri (pypi-uri "cov-core" version))
2408 (sha256
2409 (base32
2410 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2411 (build-system python-build-system)
f78e1c27 2412 (propagated-inputs
12f839fd
EF
2413 `(("python-coverage" ,python-coverage)))
2414 (home-page "https://github.com/schlamar/cov-core")
49d5e338 2415 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
12f839fd 2416 (description
49d5e338
TGR
2417 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2418and @code{nose2-cov}. It is useful for developing coverage plugins for these
2419testing frameworks.")
f210e944 2420 (license license:expat)))
12f839fd
EF
2421
2422(define-public python2-cov-core
f210e944 2423 (package-with-python2 python-cov-core))
12f839fd 2424
041358fb
DT
2425(define-public python-discover
2426 (package
2427 (name "python-discover")
2428 (version "0.4.0")
2429 (source
2430 (origin
2431 (method url-fetch)
2432 (uri (string-append
2433 "https://pypi.python.org/packages/source/d/discover/discover-"
2434 version ".tar.gz"))
2435 (sha256
2436 (base32
2437 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2438 (build-system python-build-system)
041358fb
DT
2439 (home-page "http://pypi.python.org/pypi/discover/")
2440 (synopsis
2441 "Python test discovery for unittest")
2442 (description
2443 "Discover provides test discovery for unittest, a feature that has been
e881752c 2444backported from Python 2.7 for Python 2.4+.")
3f641af0 2445 (license license:bsd-3)))
041358fb
DT
2446
2447(define-public python2-discover
2448 (package-with-python2 python-discover))
2449
a480bc41
EB
2450(define-public behave
2451 (package
2452 (name "behave")
287cfd1a 2453 (version "1.2.5")
a480bc41
EB
2454 (source (origin
2455 (method url-fetch)
287cfd1a 2456 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2457 (sha256
2458 (base32
287cfd1a 2459 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2460 (build-system python-build-system)
f22efa01 2461 (propagated-inputs
f3b98f4f 2462 `(("python-six" ,python-six)
a480bc41
EB
2463 ("python-parse" ,python-parse)
2464 ("python-parse-type" ,python-parse-type)))
2465 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2466 ;PyHamcrest>=1.8
7bf837fd 2467 (home-page "https://github.com/behave/behave")
a480bc41
EB
2468 (synopsis "Python behavior-driven development")
2469 (description
2470 "Behave is a tool for behavior-driven development in python.
2471Behavior-driven development (or BDD) is an agile software development
2472technique that encourages collaboration between developers, QA and
2473non-technical or business participants in a software project. Behave uses
2474tests written in a natural language style, backed up by Python code.")
3f641af0 2475 (license license:x11)))
c7303d3c
DT
2476
2477(define-public python-exif-read
2478 (package
2479 (name "python-exif-read")
2a2d0981 2480 (version "2.1.2")
c7303d3c
DT
2481 (source (origin
2482 (method url-fetch)
2a2d0981 2483 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2484 (sha256
2485 (base32
2a2d0981 2486 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2487 (build-system python-build-system)
c7303d3c
DT
2488 (arguments `(#:tests? #f)) ; no tests
2489 (home-page "https://github.com/ianare/exif-py")
2490 (synopsis "Python library to extract EXIF data from image files")
2491 (description
2492 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2493files.")
3f641af0 2494 (license license:bsd-3)))
c7303d3c
DT
2495
2496(define-public python2-exif-read
2497 (package-with-python2 python-exif-read))
d5f89b22
DT
2498
2499(define-public python-pyld
2500 (package
2501 (name "python-pyld")
8957af32 2502 (version "0.7.1")
d5f89b22
DT
2503 (source (origin
2504 (method url-fetch)
af1ab773 2505 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2506 (sha256
2507 (base32
8957af32 2508 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2509 (build-system python-build-system)
d5f89b22 2510 (arguments `(#:tests? #f)) ; no tests
7bf837fd 2511 (home-page "https://github.com/digitalbazaar/pyld")
d5f89b22
DT
2512 (synopsis "Python implementation of the JSON-LD specification")
2513 (description
2514 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2515 (license license:bsd-3)))
d5f89b22
DT
2516
2517(define-public python2-pyld
2518 (package-with-python2 python-pyld))
3a1f9a68
DT
2519
2520(define-public python-certifi
2521 (package
2522 (name "python-certifi")
28576403 2523 (version "2017.1.23")
3a1f9a68
DT
2524 (source (origin
2525 (method url-fetch)
9a41f443 2526 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2527 (sha256
2528 (base32
28576403 2529 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
3a1f9a68 2530 (build-system python-build-system)
28576403 2531 (home-page "https://certifi.io/")
3a1f9a68
DT
2532 (synopsis "Python CA certificate bundle")
2533 (description
2534 "Certifi is a Python library that contains a CA certificate bundle, which
2535is used by the Requests library to verify HTTPS requests.")
3f641af0 2536 (license license:asl2.0)))
3a1f9a68
DT
2537
2538(define-public python2-certifi
2539 (package-with-python2 python-certifi))
e6cfbd36 2540
12c270dd
RW
2541(define-public python-click
2542 (package
2543 (name "python-click")
d4acb6db 2544 (version "6.7")
12c270dd
RW
2545 (source
2546 (origin
2547 (method url-fetch)
375f224b 2548 (uri (pypi-uri "click" version))
12c270dd 2549 (sha256
43accb58 2550 (base32
d4acb6db 2551 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
12c270dd 2552 (build-system python-build-system)
e2ab5a09
BW
2553 (arguments
2554 `(#:phases
2555 (modify-phases %standard-phases
2556 (add-after 'unpack 'fix-paths
2557 (lambda* (#:key inputs #:allow-other-keys)
2558 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2559 "cross-libc" "libc"))))
2560 (substitute* "click/_unicodefun.py"
2561 (("'locale'")
2562 (string-append "'" glibc "/bin/locale'"))))
97be1bc2
MB
2563 #t))
2564 (replace 'check
2565 (lambda _
2566 (zero? (system* "make" "test")))))))
2567 (native-inputs
2568 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2569 (home-page "http://click.pocoo.org")
2570 (synopsis "Command line library for Python")
2571 (description
2572 "Click is a Python package for creating command line interfaces in a
2573composable way with as little code as necessary. Its name stands for
2574\"Command Line Interface Creation Kit\". It's highly configurable but comes
2575with sensible defaults out of the box.")
3f641af0 2576 (license license:bsd-3)))
12c270dd
RW
2577
2578(define-public python2-click
2579 (package-with-python2 python-click))
2580
addc808d
EF
2581(define-public python-wheel
2582 (package
2583 (name "python-wheel")
0e6df70b 2584 (version "0.30.0a0")
e1ba0749
EF
2585 (source
2586 (origin
2587 (method url-fetch)
2588 (uri (pypi-uri "wheel" version))
2589 (sha256
2590 (base32
0e6df70b 2591 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
e1ba0749
EF
2592 (build-system python-build-system)
2593 (native-inputs
f3b98f4f 2594 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2595 ("python-pytest-cov" ,python-pytest-cov)))
2596 (home-page "https://bitbucket.org/pypa/wheel/")
2597 (synopsis "Format for built Python packages")
2598 (description
2599 "A wheel is a ZIP-format archive with a specially formatted filename and
2600the @code{.whl} extension. It is designed to contain all the files for a PEP
2601376 compatible install in a way that is very close to the on-disk format. Many
2602packages will be properly installed with only the @code{Unpack} step and the
2603unpacked archive preserves enough information to @code{Spread} (copy data and
2604scripts to their final locations) at any later time. Wheel files can be
2605installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2606 (license license:expat)
2607 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2608
2609(define-public python2-wheel
8ad4ae20
LF
2610 (let ((wheel (package-with-python2
2611 (strip-python2-variant python-wheel))))
264ae686 2612 (package (inherit wheel)
8ad4ae20
LF
2613 (native-inputs `(("python2-functools32" ,python2-functools32)
2614 ,@(package-native-inputs wheel))))))
2615
addc808d 2616
ae641128 2617(define-public python-requests
e6cfbd36 2618 (package
ae641128 2619 (name "python-requests")
da5db988 2620 (version "2.13.0")
e6cfbd36
DT
2621 (source (origin
2622 (method url-fetch)
5d691657 2623 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2624 (sha256
2625 (base32
da5db988 2626 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
cff0ccf9 2627 ;; TODO: unbundle urllib3 and chardet.
e6cfbd36 2628 (build-system python-build-system)
cff0ccf9
MB
2629 (arguments
2630 ;; FIXME: Some tests require network access.
2631 '(#:tests? #f))
e6cfbd36
DT
2632 (home-page "http://python-requests.org/")
2633 (synopsis "Python HTTP library")
2634 (description
2635 "Requests is a Python HTTP client library. It aims to be easier to use
2636than Python’s urllib2 library.")
3f641af0 2637 (license license:asl2.0)))
864b5211 2638
e9005180
DT
2639;; Some software requires an older version of Requests, notably Docker
2640;; Compose.
2641(define-public python-requests-2.7
2642 (package (inherit python-requests)
2643 (version "2.7.0")
2644 (source (origin
2645 (method url-fetch)
2646 (uri (pypi-uri "requests" version))
2647 (sha256
2648 (base32
2649 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2650
ae641128 2651(define-public python2-requests
8ad4ae20 2652 (package-with-python2 python-requests))
ae641128 2653
ea521b42
DT
2654(define-public python-vcversioner
2655 (package
2656 (name "python-vcversioner")
538fe019 2657 (version "2.16.0.0")
ea521b42
DT
2658 (source
2659 (origin
2660 (method url-fetch)
2661 (uri (pypi-uri "vcversioner" version))
2662 (sha256
2663 (base32
538fe019 2664 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2665 (build-system python-build-system)
ea521b42
DT
2666 (synopsis "Python library for version number discovery")
2667 (description "Vcversioner is a Python library that inspects tagging
2668information in a variety of version control systems in order to discover
2669version numbers.")
2670 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2671 (license license:isc)))
ea521b42
DT
2672
2673(define-public python2-vcversioner
f210e944 2674 (package-with-python2 python-vcversioner))
ae641128 2675
864b5211
DT
2676(define-public python-jsonschema
2677 (package
2678 (name "python-jsonschema")
b3667afb 2679 (version "2.5.1")
864b5211
DT
2680 (source (origin
2681 (method url-fetch)
2682 (uri
2683 (string-append
2684 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2685 version ".tar.gz"))
2686 (sha256
2687 (base32
b3667afb 2688 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2689 (build-system python-build-system)
8bcd6b91
EF
2690 (arguments
2691 '(#:phases
2692 (modify-phases %standard-phases
2693 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2694 (native-inputs
8bcd6b91
EF
2695 `(("python-nose" ,python-nose)
2696 ("python-vcversioner" ,python-vcversioner)))
2697 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2698 (synopsis "Implementation of JSON Schema for Python")
2699 (description
2700 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2701 (license license:expat)
2702 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2703
2704(define-public python2-jsonschema
a14600ec
LF
2705 (let ((jsonschema (package-with-python2
2706 (strip-python2-variant python-jsonschema))))
264ae686 2707 (package (inherit jsonschema)
eaba9d66 2708 (native-inputs
8bcd6b91 2709 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2710 ,@(package-native-inputs jsonschema)))
2711 (propagated-inputs
2712 `(("python2-functools32" ,python2-functools32))))))
850189b8 2713
7734ed7a
OP
2714(define-public python-schema
2715 (package
2716 (name "python-schema")
2717 (version "0.6.6")
2718 (source
2719 (origin
2720 (method url-fetch)
2721 (uri (pypi-uri "schema" version))
2722 (sha256
2723 (base32
2724 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2725 (build-system python-build-system)
2726 (native-inputs
2727 `(("python-pytest" ,python-pytest)))
2728 (home-page "https://github.com/keleshev/schema")
2729 (synopsis "Simple data validation library")
2730 (description
2731 "@code{python-schema} is a library for validating Python data
2732structures, such as those obtained from config-files, forms, external
2733services or command-line parsing, converted from JSON/YAML (or
2734something else) to Python data-types.")
2735 (license license:psfl)))
2736
2737(define-public python2-schema
2738 (package-with-python2 python-schema))
2739
2740(define-public python-schema-0.5
2741 (package (inherit python-schema)
2742 (version "0.5.0")
2743 (source
2744 (origin
2745 (method url-fetch)
2746 (uri (pypi-uri "schema" version))
2747 (sha256
2748 (base32
2749 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2750
2751(define-public python2-schema-0.5
2752 (package-with-python2 python-schema-0.5))
2753
9f21414d 2754(define-public python-kitchen
2755 (package
2756 (name "python-kitchen")
2757 (version "1.2.4")
2758 (source
2759 (origin
2760 (method url-fetch)
2761 (uri (pypi-uri "kitchen" version))
2762 (sha256
2763 (base32
2764 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2765 (build-system python-build-system)
2766 (propagated-inputs
2767 `(("python-chardet" ,python-chardet)))
cb542830 2768 (home-page "https://github.com/fedora-infra/kitchen")
9f21414d 2769 (synopsis "Python API for snippets")
2770 (description "@code{kitchen} module provides a python API for all sorts of
2771little useful snippets of code that everybody ends up writing for their projects
2772but never seem big enough to build an independent release. Use kitchen and stop
2773cutting and pasting that code over and over.")
2774 (license (list license:lgpl2.1+
2775 ;; subprocess.py, test_subprocess.py,
2776 ;; kitchen/pycompat25/defaultdict.py:
2777 license:psfl))))
2778
2779(define-public python2-kitchen
2780 (package-with-python2 python-kitchen))
2781
850189b8
DT
2782(define-public python-unidecode
2783 (package
2784 (name "python-unidecode")
5754fe95 2785 (version "0.04.20")
850189b8
DT
2786 (source (origin
2787 (method url-fetch)
8925d4f3 2788 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2789 (sha256
2790 (base32
5754fe95 2791 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
850189b8 2792 (build-system python-build-system)
850189b8
DT
2793 (home-page "https://pypi.python.org/pypi/Unidecode")
2794 (synopsis "ASCII transliterations of Unicode text")
2795 (description
2796 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2797useful when integrating with legacy code that doesn't support Unicode, or for
2798ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2799machine identifiers from human-readable Unicode strings that should still be
2800somewhat intelligeble.")
3f641af0 2801 (license license:gpl2+)))
850189b8
DT
2802
2803(define-public python2-unidecode
2804 (package-with-python2 python-unidecode))
6d45fef4
DT
2805
2806(define-public python-pyjwt
2807 (package
2808 (name "python-pyjwt")
eb31d4b4 2809 (version "1.4.0")
6d45fef4
DT
2810 (source
2811 (origin
2812 (method url-fetch)
eb31d4b4 2813 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2814 (sha256
2815 (base32
eb31d4b4 2816 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2817 (build-system python-build-system)
eb31d4b4 2818 (native-inputs
130fe994
HG
2819 `(("python-pytest" ,python-pytest)
2820 ("python-pytest-cov" ,python-pytest-cov)
2821 ("python-pytest-runner" ,python-pytest-runner)))
7bf837fd 2822 (home-page "https://github.com/progrium/pyjwt")
6d45fef4
DT
2823 (synopsis "JSON Web Token implementation in Python")
2824 (description
2825 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2826 (license license:expat)))
6d45fef4
DT
2827
2828(define-public python2-pyjwt
2829 (package-with-python2 python-pyjwt))
2830
a80488c2 2831(define-public python-pykka
2832 (package
2833 (name "python-pykka")
2834 (version "1.2.1")
2835 (source
2836 (origin
2837 (method url-fetch)
2838 (uri (pypi-uri "Pykka" version))
2839 (sha256
2840 (base32
2841 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2842 (build-system python-build-system)
2843 (native-inputs
2844 `(("python-mock" ,python-mock)
2845 ("python-nose" ,python-nose)
2846 ("python-gevent" ,python-gevent)
2847 ("python-eventlet" ,python-eventlet)))
2848 (home-page "https://www.pykka.org/")
2849 (synopsis "Pykka is a Python implementation of the actor model")
2850 (description
2851 "Pykka is a Python implementation of the actor model.
2852The actor model introduces some simple rules to control the sharing
2853of state and cooperation between execution units, which makes it
2854easier to build concurrent applications.")
2855 (license license:asl2.0)))
2856
2857(define-public python2-pykka
2858 (package-with-python2 python-pykka))
2859
2cec1f6f
DT
2860(define-public python-oauthlib
2861 (package
2862 (name "python-oauthlib")
bde2171d 2863 (version "1.0.3")
2cec1f6f
DT
2864 (source (origin
2865 (method url-fetch)
bde2171d 2866 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2867 (sha256
2868 (base32
bde2171d 2869 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2870 (build-system python-build-system)
bde2171d 2871 (native-inputs
bb06aa34 2872 `(("python-nose" ,python-nose)
c616b5d3 2873 ("python-mock" ,python-mock)
bde2171d 2874 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2875 ("python-pyjwt" ,python-pyjwt)
2876 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2877 (home-page "https://github.com/idan/oauthlib")
2878 (synopsis "OAuth implementation for Python")
2879 (description
2880 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2881OAuth request-signing logic.")
3f641af0 2882 (license license:bsd-3)
59f151ec 2883 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2884
2885(define-public python2-oauthlib
59f151ec 2886 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2887 (package
2888 (inherit base)
00e10c6e 2889 (native-inputs `(("python2-unittest2" ,python2-unittest2)
59f151ec 2890 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2891
2892(define-public python-itsdangerous
2893 (package
2894 (name "python-itsdangerous")
2895 (version "0.24")
2896 (source
2897 (origin
2898 (method url-fetch)
2899 (uri (string-append
2900 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2901 version ".tar.gz"))
2902 (sha256
2903 (base32
2904 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2905 (build-system python-build-system)
7bf837fd 2906 (home-page "https://github.com/mitsuhiko/itsdangerous")
ec5dbb5c
DT
2907 (synopsis "Python library for passing data to/from untrusted environments")
2908 (description
2909 "Itsdangerous provides various helpers to pass trusted data to untrusted
2910environments and back.")
f210e944 2911 (license license:bsd-3)))
ec5dbb5c
DT
2912
2913(define-public python2-itsdangerous
f210e944 2914 (package-with-python2 python-itsdangerous))
5731cae3 2915
8d12be1e
RW
2916(define-public python-pyyaml
2917 (package
2918 (name "python-pyyaml")
bf5e4bc4 2919 (version "3.12")
8d12be1e
RW
2920 (source
2921 (origin
2922 (method url-fetch)
bf5e4bc4 2923 (uri (pypi-uri "PyYAML" version))
8d12be1e
RW
2924 (sha256
2925 (base32
bf5e4bc4 2926 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
8d12be1e
RW
2927 (build-system python-build-system)
2928 (inputs
2929 `(("libyaml" ,libyaml)))
8d12be1e
RW
2930 (home-page "http://pyyaml.org/wiki/PyYAML")
2931 (synopsis "YAML parser and emitter for Python")
2932 (description
2933 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2934complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2935API, and sensible error messages. PyYAML supports standard YAML tags and
2936provides Python-specific tags that allow to represent an arbitrary Python
2937object.")
2938 (license license:expat)))
2939
2940(define-public python2-pyyaml
2941 (package-with-python2 python-pyyaml))
2942
5731cae3
DT
2943(define-public python-virtualenv
2944 (package
2945 (name "python-virtualenv")
58d04dba 2946 (version "15.0.3")
5731cae3
DT
2947 (source
2948 (origin
2949 (method url-fetch)
17804240 2950 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2951 (sha256
2952 (base32
58d04dba 2953 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2954 (build-system python-build-system)
17804240
EF
2955 (arguments
2956 `(#:phases
2957 (modify-phases %standard-phases
58d04dba
RW
2958 (replace 'check
2959 (lambda _
2960 ;; Disable failing test. See upstream bug report
2961 ;; https://github.com/pypa/virtualenv/issues/957
2962 (substitute* "tests/test_virtualenv.py"
2963 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2964 (zero? (system* "py.test")))))))
e7881f3d 2965 (native-inputs
f3b98f4f 2966 `(("python-mock" ,python-mock)
17804240 2967 ("python-pytest" ,python-pytest)))
5731cae3
DT
2968 (home-page "https://virtualenv.pypa.io/")
2969 (synopsis "Virtual Python environment builder")
2970 (description
2971 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2972 (license license:expat)))
5731cae3
DT
2973
2974(define-public python2-virtualenv
2975 (package-with-python2 python-virtualenv))
8176d4d5
DT
2976
2977(define-public python-markupsafe
2978 (package
2979 (name "python-markupsafe")
2980 (version "0.23")
2981 (source
2982 (origin
2983 (method url-fetch)
2984 (uri (string-append
2985 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2986 version ".tar.gz"))
2987 (sha256
2988 (base32
2989 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2990 (build-system python-build-system)
7bf837fd 2991 (home-page "https://github.com/mitsuhiko/markupsafe")
8176d4d5
DT
2992 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2993 (description
2994 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2995for Python.")
3f641af0 2996 (license license:bsd-3)))
8176d4d5
DT
2997
2998(define-public python2-markupsafe
2999 (package-with-python2 python-markupsafe))
fe34f0d1
DT
3000
3001(define-public python-jinja2
3002 (package
3003 (name "python-jinja2")
e98149b3 3004 (version "2.8")
fe34f0d1
DT
3005 (source
3006 (origin
3007 (method url-fetch)
e98149b3 3008 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
3009 (sha256
3010 (base32
e98149b3 3011 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 3012 (build-system python-build-system)
f22efa01 3013 (propagated-inputs
f3b98f4f 3014 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
3015 (home-page "http://jinja.pocoo.org/")
3016 (synopsis "Python template engine")
3017 (description
3018 "Jinja2 is a small but fast and easy to use stand-alone template engine
3019written in pure Python.")
3f641af0 3020 (license license:bsd-3)))
fe34f0d1
DT
3021
3022(define-public python2-jinja2
3023 (package-with-python2 python-jinja2))
3580ab8b 3024
f7d17ac7
EE
3025(define-public python-pystache
3026 (package
3027 (name "python-pystache")
3028 (version "0.5.4")
3029 (source (origin
3030 (method url-fetch)
3031 (uri (pypi-uri "pystache" version))
3032 (sha256
3033 (base32
3034 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3035 (build-system python-build-system)
8bd5164b
MB
3036 (arguments
3037 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
f7d17ac7
EE
3038 (home-page "http://defunkt.io/pystache/")
3039 (synopsis "Python logic-less template engine")
3040 (description
3041 "Pystache is a Python implementation of the framework agnostic,
3042logic-free templating system Mustache.")
8bd5164b
MB
3043 (license license:expat)
3044 (properties `((python2-variant . ,(delay python2-pystache))))))
f7d17ac7
EE
3045
3046(define-public python2-pystache
8bd5164b
MB
3047 (package (inherit (package-with-python2
3048 (strip-python2-variant python-pystache)))
3049 (arguments
3050 `(#:python ,python-2
3051 #:phases
3052 (modify-phases %standard-phases
3053 (replace 'check
3054 (lambda _
3055 (zero? (system* "python" "test_pystache.py")))))))))
f7d17ac7 3056
1285119b
RW
3057(define-public python-joblib
3058 (package
3059 (name "python-joblib")
f34ef331 3060 (version "0.10.3")
1285119b
RW
3061 (source (origin
3062 (method url-fetch)
f34ef331 3063 (uri (pypi-uri "joblib" version))
1285119b
RW
3064 (sha256
3065 (base32
6aa5f1ca
HG
3066 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
3067 (modules '((guix build utils)))
3068 (snippet
3069 '(begin
3070 ;; Remove pre-compiled .pyc files from source.
3071 (for-each delete-file-recursively
3072 (find-files "." "__pycache__" #:directories? #t))
3073 (for-each delete-file (find-files "." "\\.pyc$"))
3074 #t))))
1285119b 3075 (build-system python-build-system)
a8dd960a
RW
3076 (arguments
3077 `(#:phases
3078 (modify-phases %standard-phases
3079 (add-before 'check 'disable-failing-tests
3080 (lambda _
3081 ;; This numpydoc tests fails for unknown reasons
3082 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
3083 ;; This numpydoc test depends on matplotlib, which is not a
3084 ;; required input.
3085 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
3086 ;; These tests fail to execute sys.executable
3087 (substitute* "joblib/test/test_parallel.py"
3088 (("import nose" line)
3089 (string-append "from nose.plugins.skip import SkipTest\n" line))
3090 (("def test_nested_parallel_warnings" line)
3091 (string-append "@SkipTest\n" line))
3092 (("def test_parallel_with_interactively_defined_functions" line)
3093 (string-append "@SkipTest\n" line)))
3094 #t)))))
f052ec9a 3095 ;; Provide nose to enable tests command
1285119b 3096 (native-inputs
f3b98f4f 3097 `(("python-nose" ,python-nose)
f34ef331
RW
3098 ("python-sphinx" ,python-sphinx)
3099 ("python-docutils" ,python-docutils)
3100 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
3101 (home-page "http://pythonhosted.org/joblib/")
3102 (synopsis "Using Python functions as pipeline jobs")
3103 (description
3104 "Joblib is a set of tools to provide lightweight pipelining in Python.
3105In particular, joblib offers: transparent disk-caching of the output values
3106and lazy re-evaluation (memoize pattern), easy simple parallel computing
3107logging and tracing of the execution.")
3f641af0 3108 (license license:bsd-3)))
1285119b
RW
3109
3110(define-public python2-joblib
3111 (package-with-python2 python-joblib))
3112
3580ab8b
DT
3113(define-public python-docutils
3114 (package
3115 (name "python-docutils")
00e0ca7c 3116 (version "0.13.1")
3580ab8b
DT
3117 (source
3118 (origin
3119 (method url-fetch)
00e0ca7c 3120 (uri (pypi-uri "docutils" version))
3580ab8b
DT
3121 (sha256
3122 (base32
00e0ca7c 3123 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3580ab8b 3124 (build-system python-build-system)
3580ab8b
DT
3125 (arguments
3126 '(#:tests? #f)) ; no setup.py test command
3127 (home-page "http://docutils.sourceforge.net/")
3128 (synopsis "Python Documentation Utilities")
3129 (description
3130 "Docutils is a modular system for processing documentation into useful
3131formats, such as HTML, XML, and LaTeX. For input Docutils supports
3132reStructuredText.")
3133 ;; Most of the source code is public domain, but some source files are
3134 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 3135 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
3136
3137(define-public python2-docutils
3138 (package-with-python2 python-docutils))
fb35b7c0
DT
3139
3140(define-public python-pygments
3141 (package
3142 (name "python-pygments")
7d2e758d 3143 (version "2.1.3")
fb35b7c0
DT
3144 (source
3145 (origin
3146 (method url-fetch)
9f442285 3147 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
3148 (sha256
3149 (base32
7d2e758d 3150 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
fb35b7c0 3151 (build-system python-build-system)
995cb99e
MB
3152 (arguments
3153 ;; FIXME: Tests require sphinx, which depends on this.
3154 '(#:tests? #f))
fb35b7c0
DT
3155 (home-page "http://pygments.org/")
3156 (synopsis "Syntax highlighting")
3157 (description
3158 "Pygments is a syntax highlighting package written in Python.")
3f641af0 3159 (license license:bsd-2)))
fb35b7c0
DT
3160
3161(define-public python2-pygments
3162 (package-with-python2 python-pygments))
9dd6078d
DT
3163
3164(define-public python-sphinx
3165 (package
3166 (name "python-sphinx")
c227458a 3167 (version "1.5.1")
9dd6078d
DT
3168 (source
3169 (origin
3170 (method url-fetch)
9a8acd00 3171 (uri (pypi-uri "Sphinx" version))
9dd6078d
DT
3172 (sha256
3173 (base32
c227458a 3174 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
9dd6078d 3175 (build-system python-build-system)
03cb5f9e 3176 (arguments
c227458a
DM
3177 `(#:phases
3178 (modify-phases %standard-phases
3179 (replace 'check
3180 (lambda _
3181 ;; Requires Internet access.
3182 (delete-file "tests/test_build_linkcheck.py")
3183 (zero? (system* "make" "test")))))))
f22efa01 3184 (propagated-inputs
9a8acd00
DM
3185 `(("python-imagesize" ,python-imagesize)
3186 ("python-sphinx-alabaster-theme"
3187 ,python-sphinx-alabaster-theme)
3188 ("python-babel" ,python-babel)
3189 ("python-snowballstemmer" ,python-snowballstemmer)
9dd6078d 3190 ("python-docutils" ,python-docutils)
9a8acd00
DM
3191 ("python-jinja2" ,python-jinja2)
3192 ("python-pygments" ,python-pygments)
a10b9810 3193 ("python-requests" ,python-requests)
9a8acd00 3194 ("python-six" ,python-six)))
c227458a
DM
3195 (native-inputs
3196 `(("graphviz" ,graphviz)
3197 ("python-html5lib" ,python-html5lib)
3198 ("python-mock" ,python-mock)
a10b9810 3199 ("python-nose" ,python-nose)))
9dd6078d
DT
3200 (home-page "http://sphinx-doc.org/")
3201 (synopsis "Python documentation generator")
3202 (description "Sphinx is a tool that makes it easy to create documentation
3203for Python projects or other documents consisting of multiple reStructuredText
3204sources.")
9a8acd00
DM
3205 (license license:bsd-3)
3206 (properties `((python2-variant . ,(delay python2-sphinx))))))
9dd6078d 3207
3061b331
MFM
3208(define-public python-sphinx-1.5.3
3209 (package
3210 (inherit python-sphinx)
3211 (name "python-sphinx")
3212 (version "1.5.3")
3213 (source
3214 (origin
3215 (method url-fetch)
3216 (uri (pypi-uri "Sphinx" version))
3217 (sha256
3218 (base32
3219 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3220 (native-inputs
23b9168d 3221 `(("python-pytest" ,python-pytest-3.0)
3061b331
MFM
3222 ,@(package-native-inputs python-sphinx)))))
3223
9dd6078d 3224(define-public python2-sphinx
9a8acd00
DM
3225 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3226 (package
3227 (inherit base)
3228 (native-inputs `(("python2-mock" ,python2-mock)
c227458a 3229 ("python2-enum34" ,python2-enum34)
9a8acd00
DM
3230 ,@(package-native-inputs base)))
3231 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3232 ,@(package-propagated-inputs base))))))
6888830b 3233
ad320b20
RW
3234(define-public python-sphinx-rtd-theme
3235 (package
3236 (name "python-sphinx-rtd-theme")
af842d45 3237 (version "0.2.4")
ad320b20
RW
3238 (source
3239 (origin
3240 (method url-fetch)
af842d45 3241 (uri (pypi-uri "sphinx_rtd_theme" version))
ad320b20
RW
3242 (sha256
3243 (base32
af842d45 3244 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
ad320b20 3245 (build-system python-build-system)
9893cff3 3246 (arguments '(#:tests? #f)) ; No tests.
9d3a15b4
LF
3247 (propagated-inputs
3248 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
3249 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3250 (synopsis "ReadTheDocs.org theme for Sphinx")
3251 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 3252 (license license:expat)))
ad320b20
RW
3253
3254(define-public python2-sphinx-rtd-theme
3255 (package-with-python2 python-sphinx-rtd-theme))
3256
fe94cf0c
HG
3257(define-public python-rst.linker
3258 (package
3259 (name "python-rst.linker")
3260 (version "1.7")
3261 (source
3262 (origin
3263 (method url-fetch)
3264 (uri (pypi-uri "rst.linker" version))
3265 (sha256
3266 (base32
3267 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3268 (build-system python-build-system)
3269 (propagated-inputs
22d7360b 3270 `(("python-dateutil" ,python-dateutil)
fe94cf0c
HG
3271 ("python-six" ,python-six)))
3272 (native-inputs
3273 `(("python-setuptools-scm" ,python-setuptools-scm)))
3274 ;; Test would require path.py, which would introduce a cyclic dependence.
3275 (arguments `(#:tests? #f))
3276 ;; Note: As of version 1.7 the documentation is not worth building.
3277 (home-page "https://github.com/jaraco/rst.linker")
3278 (synopsis "Sphinx plugin to add links and timestamps")
3279 (description "rst.linker allows to automatically replace text by a
3280reStructuredText external reference or timestamps. It's primary purpose is to
3281augment the changelog, but it can be used for other documents, too.")
3282 (license license:expat)))
3283
3284(define-public python2-rst.linker
3285 (package-with-python2 python-rst.linker))
3286
f4de5b3b
CAW
3287(define-public python-feedgenerator
3288 (package
3289 (name "python-feedgenerator")
d5c183d1 3290 (version "1.9")
f4de5b3b 3291 (source
f4de5b3b 3292 (origin
f0412aa2
EF
3293 (method url-fetch)
3294 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
3295 (sha256
3296 (base32
d5c183d1 3297 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
7c88bcf4
HG
3298 (modules '((guix build utils)))
3299 (snippet
3300 '(begin
3301 ;; Remove pre-compiled .pyc files from source.
3302 (for-each delete-file-recursively
3303 (find-files "." "__pycache__" #:directories? #t))
3304 (for-each delete-file (find-files "." "\\.pyc$"))
3305 #t))))
f4de5b3b 3306 (build-system python-build-system)
dae73d9b 3307 (propagated-inputs
f3b98f4f 3308 `(("python-pytz" ,python-pytz)
f4de5b3b 3309 ("python-six" ,python-six)))
f0412aa2 3310 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
3311 (synopsis
3312 "Standalone version of Django's Atom/RSS feed generator")
3313 (description
3314 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3315which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 3316 (license license:bsd-3)))
f4de5b3b
CAW
3317
3318(define-public python2-feedgenerator
3319 (package-with-python2 python-feedgenerator))
3320
59ad30e3
CAW
3321(define-public python-blinker
3322 (package
3323 (name "python-blinker")
7fb9ff4d 3324 (version "1.4")
59ad30e3
CAW
3325 (source
3326 (origin
3327 (method url-fetch)
7fb9ff4d 3328 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
3329 (sha256
3330 (base32
7fb9ff4d 3331 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 3332 (build-system python-build-system)
59ad30e3
CAW
3333 (home-page "http://pythonhosted.org/blinker/")
3334 (synopsis "Fast, simple object-to-object and broadcast signaling")
3335 (description
3336 "Blinker provides a fast dispatching system that allows any number of
3337interested parties to subscribe to events, or \"signals\".")
3338 (license license:expat)))
3339
3340(define-public python2-blinker
3341 (package-with-python2 python-blinker))
3342
b8050e71
CAW
3343(define-public pelican
3344 (package
3345 (name "pelican")
11f97c27 3346 (version "3.6.3")
b8050e71
CAW
3347 (source
3348 (origin
3349 (method url-fetch)
11f97c27 3350 (uri (pypi-uri "pelican" version))
b8050e71
CAW
3351 (sha256
3352 (base32
11f97c27 3353 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 3354 (build-system python-build-system)
f22efa01 3355 (propagated-inputs
b8050e71
CAW
3356 `(("python-feedgenerator" ,python-feedgenerator)
3357 ("python-jinja2" ,python-jinja2)
3358 ("python-pygments" ,python-pygments)
3359 ("python-docutils" ,python-docutils)
3360 ("python-pytz" ,python-pytz)
3361 ("python-blinker" ,python-blinker)
3362 ("python-unidecode" ,python-unidecode)
3363 ("python-six" ,python-six)
22d7360b 3364 ("python-dateutil" ,python-dateutil)))
b8050e71
CAW
3365 (home-page "http://getpelican.com/")
3366 (arguments
3367 `(;; XXX Requires a lot more packages to do unit tests :P
3368 #:tests? #f
3369 #:phases (modify-phases %standard-phases
3370 (add-before
3371 'install 'adjust-requires
3372 ;; Since feedgenerator is installed from git, it doesn't
3373 ;; conform to the version requirements.
3374 ;;
3375 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3376 ;; version requirement so setuptools doesn't get confused.
3377 (lambda _
3378 (substitute* "setup.py"
3379 (("['\"]feedgenerator.*?['\"]")
3380 "'feedgenerator'")))))))
3381 (synopsis "Python-based static site publishing system")
3382 (description
3383 "Pelican is a tool to generate a static blog from reStructuredText,
3384Markdown input files, and more. Pelican uses Jinja2 for templating
3385and is very extensible.")
3f641af0 3386 (license license:agpl3+)))
b8050e71 3387
240ca4aa
RW
3388(define-public python-scikit-learn
3389 (package
3390 (name "python-scikit-learn")
8e401ab6 3391 (version "0.18.1")
240ca4aa
RW
3392 (source
3393 (origin
3394 (method url-fetch)
3395 (uri (string-append
3396 "https://github.com/scikit-learn/scikit-learn/archive/"
3397 version ".tar.gz"))
7e21b9fb 3398 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3399 (sha256
3400 (base32
8e401ab6 3401 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
240ca4aa
RW
3402 (build-system python-build-system)
3403 (arguments
3404 `(#:phases
4d25c486
MB
3405 (modify-phases %standard-phases
3406 (delete 'check)
3407 (add-after 'install 'check
3408 ;; Running tests from the source directory requires
3409 ;; an "inplace" build with paths relative to CWD.
3410 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3411 ;; Use the installed version instead.
3412 (lambda* (#:key inputs outputs #:allow-other-keys)
3413 (add-installed-pythonpath inputs outputs)
3414 ;; some tests require access to "$HOME"
3415 (setenv "HOME" "/tmp")
3416 ;; Step out of the source directory just to be sure.
3417 (chdir "..")
3418 (zero? (system* "nosetests" "-v" "sklearn")))))))
240ca4aa 3419 (inputs
328bb95d
HG
3420 `(("openblas" ,openblas)))
3421 (native-inputs
8e401ab6
RW
3422 `(("python-nose" ,python-nose)
3423 ("python-cython" ,python-cython)))
240ca4aa
RW
3424 (propagated-inputs
3425 `(("python-numpy" ,python-numpy)
3426 ("python-scipy" ,python-scipy)))
3427 (home-page "http://scikit-learn.org/")
3428 (synopsis "Machine Learning in Python")
3429 (description
3430 "Scikit-learn provides simple and efficient tools for data
3431mining and data analysis.")
1b5241c5 3432 (license license:bsd-3)))
240ca4aa
RW
3433
3434(define-public python2-scikit-learn
1b5241c5 3435 (package-with-python2 python-scikit-learn))
240ca4aa 3436
12f8f9bb
RW
3437(define-public python-scikit-image
3438 (package
3439 (name "python-scikit-image")
3440 (version "0.11.3")
3441 (source
3442 (origin
3443 (method url-fetch)
3444 (uri (string-append
3445 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3446 version ".tar.gz"))
3447 (sha256
3448 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3449 (build-system python-build-system)
9026e689
MB
3450 (arguments
3451 ;; TODO: Some tests require running X11 server. Disable them?
3452 '(#:tests? #f))
b83e2333 3453 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3454 (propagated-inputs
3455 `(("python-matplotlib" ,python-matplotlib)
3456 ("python-networkx" ,python-networkx)
12f8f9bb 3457 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3458 ("python-pillow" ,python-pillow)))
3459 (native-inputs
b83e2333
HG
3460 `(("python-numpy" ,python-numpy)
3461 ("python-cython" ,python-cython)
3462 ("python-six" ,python-six)))
12f8f9bb
RW
3463 (home-page "http://scikit-image.org/")
3464 (synopsis "Image processing in Python")
3465 (description
e881752c 3466 "Scikit-image is a collection of algorithms for image processing.")
12733594 3467 (license license:bsd-3)))
12f8f9bb
RW
3468
3469(define-public python2-scikit-image
12733594 3470 (package-with-python2 python-scikit-image))
12f8f9bb 3471
5394a6a6
RW
3472(define-public python-redis
3473 (package
3474 (name "python-redis")
911a8faf 3475 (version "2.10.5")
5394a6a6
RW
3476 (source
3477 (origin
3478 (method url-fetch)
911a8faf 3479 (uri (pypi-uri "redis" version))
5394a6a6 3480 (sha256
911a8faf 3481 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
5394a6a6
RW
3482 (build-system python-build-system)
3483 ;; Tests require a running Redis server
3484 (arguments '(#:tests? #f))
cf8124b0
HG
3485 ;; As long as we are not running test, we do not need this input :-)
3486 ;;(native-inputs
3487 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3488 (home-page "https://github.com/andymccurdy/redis-py")
3489 (synopsis "Redis Python client")
3490 (description
3491 "This package provides a Python interface to the Redis key-value store.")
3492 (license license:expat)))
3493
3494(define-public python2-redis
3495 (package-with-python2 python-redis))
3496
748cef5b
RW
3497(define-public python-rq
3498 (package
3499 (name "python-rq")
eed206cb 3500 (version "0.7.1")
748cef5b
RW
3501 (source
3502 (origin
3503 (method url-fetch)
eed206cb 3504 (uri (pypi-uri "rq" version))
748cef5b 3505 (sha256
eed206cb 3506 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
748cef5b
RW
3507 (build-system python-build-system)
3508 (propagated-inputs
3509 `(("python-click" ,python-click)
3510 ("python-redis" ,python-redis)))
748cef5b
RW
3511 (home-page "http://python-rq.org/")
3512 (synopsis "Simple job queues for Python")
3513 (description
3514 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3515processing them in the background with workers. It is backed by Redis and it
3516is designed to have a low barrier to entry.")
3f641af0 3517 (license license:bsd-2)))
748cef5b
RW
3518
3519(define-public python2-rq
3520 (package-with-python2 python-rq))
3521
6888830b
FB
3522(define-public python-cython
3523 (package
3524 (name "python-cython")
cd158a2b 3525 (version "0.25.2")
6888830b
FB
3526 (source
3527 (origin
3528 (method url-fetch)
56918e26 3529 (uri (pypi-uri "Cython" version))
a3dea991 3530 (patches (search-patches "python-cython-fix-tests-32bit.patch"))
6888830b
FB
3531 (sha256
3532 (base32
cd158a2b 3533 "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"))))
6888830b
FB
3534 (build-system python-build-system)
3535 ;; we need the full python package and not just the python-wrapper
3536 ;; because we need libpython3.3m.so
3537 (inputs
3538 `(("python" ,python)))
3539 (arguments
3540 `(#:phases
b92f651b
EF
3541 (modify-phases %standard-phases
3542 (add-before 'check 'set-HOME
3543 ;; some tests require access to "$HOME/.cython"
3544 (lambda _ (setenv "HOME" "/tmp")))
3545 (replace 'check
3546 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3547 (home-page "http://cython.org/")
3548 (synopsis "C extensions for Python")
3549 (description "Cython is an optimising static compiler for both the Python
3550programming language and the extended Cython programming language. It makes
3551writing C extensions for Python as easy as Python itself.")
3f641af0 3552 (license license:asl2.0)
48b311b1 3553 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3554
3555(define-public python2-cython
48b311b1
LC
3556 (package (inherit (package-with-python2
3557 (strip-python2-variant python-cython)))
6888830b
FB
3558 (name "python2-cython")
3559 (inputs
3560 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3561
ee5fb7ee
AV
3562;; The RPython toolchain currently does not support Python 3.
3563(define-public python2-rpython
3564 (package
3565 (name "python2-rpython")
3566 (version "0.1.4")
3567 (source
3568 (origin
3569 (method url-fetch)
3570 (uri (pypi-uri "rpython" version))
3571 (sha256
3572 (base32
3573 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3574 (build-system python-build-system)
3575 (arguments `(#:python ,python-2))
3576 (native-inputs
f3b98f4f 3577 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3578 (home-page "https://rpython.readthedocs.org")
3579 (synopsis "Framework for implementing interpreters and virtual machines")
3580 (description "RPython is a translation and support framework for
3581producing implementations of dynamic languages, emphasizing a clean separation
3582between language specification and implementation aspects.")
3583 (license license:expat)))
3584
7ccb71e0 3585(define-public python-numpy
0da98533 3586 (package
7ccb71e0
TD
3587 (name "python-numpy")
3588 (version "1.12.0")
0da98533
FB
3589 (source
3590 (origin
3591 (method url-fetch)
7ccb71e0
TD
3592 (uri (string-append
3593 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3594 (file-name (string-append name "-" version ".tar.gz"))
0da98533
FB
3595 (sha256
3596 (base32
7ccb71e0 3597 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
0da98533
FB
3598 (build-system python-build-system)
3599 (inputs
328bb95d 3600 `(("openblas" ,openblas)
cba256f8 3601 ("lapack" ,lapack)))
0da98533 3602 (native-inputs
7ccb71e0
TD
3603 `(("python-cython" ,python-cython)
3604 ("python-nose" ,python-nose)
2efabc55 3605 ("gfortran" ,gfortran)))
0da98533
FB
3606 (arguments
3607 `(#:phases
2efabc55
HG
3608 (modify-phases %standard-phases
3609 (add-before 'build 'set-environment-variables
3610 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3611 (call-with-output-file "site.cfg"
3612 (lambda (port)
cba256f8
RW
3613 (format port
3614 "[openblas]
dbdfe515
RW
3615libraries = openblas
3616library_dirs = ~a/lib
3617include_dirs = ~a/include
cba256f8 3618
2efabc55
HG
3619# backslash-n to make emacs happy
3620\n[lapack]
cba256f8
RW
3621lapack_libs = lapack
3622library_dirs = ~a/lib
3623include_dirs = ~a/include
3624"
3625 (assoc-ref inputs "openblas")
3626 (assoc-ref inputs "openblas")
3627 (assoc-ref inputs "lapack")
3628 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3629 ;; Use "gcc" executable, not "cc".
3630 (substitute* "numpy/distutils/system_info.py"
3631 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3632 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3633 #t))
6a843168
FB
3634 ;; Tests can only be run after the library has been installed and not
3635 ;; within the source directory.
2efabc55
HG
3636 (delete 'check)
3637 (add-after 'install 'check
3638 (lambda* (#:key outputs inputs #:allow-other-keys)
3639 ;; Make installed package available for running the tests
3640 (add-installed-pythonpath inputs outputs)
6a843168 3641 (with-directory-excursion "/tmp"
89b5c60e 3642 (zero? (system* "python" "-c"
2efabc55 3643 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3644 (home-page "http://www.numpy.org/")
3645 (synopsis "Fundamental package for scientific computing with Python")
3646 (description "NumPy is the fundamental package for scientific computing
e881752c 3647with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3648object, sophisticated (broadcasting) functions, tools for integrating C/C++
3649and Fortran code, useful linear algebra, Fourier transform, and random number
3650capabilities.")
3f641af0 3651 (license license:bsd-3)))
0da98533 3652
7ccb71e0
TD
3653(define-public python2-numpy
3654 (package-with-python2 python-numpy))
15bfe6d6 3655
460fccd4 3656(define-public python-munch
3657 (package
3658 (name "python-munch")
3659 (version "2.0.4")
3660 (source
3661 (origin
3662 (method url-fetch)
3663 (uri (pypi-uri "munch" version))
3664 (sha256
3665 (base32
3666 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3667 (build-system python-build-system)
3668 (home-page "https://github.com/Infinidat/munch")
3669 (synopsis "Dot-accessible dictionary")
3670 (description "Munch is a dot-accessible dictionary similar to JavaScript
3671objects.")
3672 (license license:expat)))
3673
3674(define-public python2-munch
3675 (package-with-python2 python-munch))
3676
3a1bfe18
RW
3677(define-public python2-fastlmm
3678 (package
3679 (name "python2-fastlmm")
154d0016 3680 (version "0.2.21")
3a1bfe18
RW
3681 (source
3682 (origin
3683 (method url-fetch)
b074e7d4 3684 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3685 (sha256
3686 (base32
154d0016 3687 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3688 (build-system python-build-system)
3689 (arguments
3690 `(#:python ,python-2)) ; only Python 2.7 is supported
3691 (propagated-inputs
3692 `(("python2-numpy" ,python2-numpy)
3693 ("python2-scipy" ,python2-scipy)
3694 ("python2-matplotlib" ,python2-matplotlib)
3695 ("python2-pandas" ,python2-pandas)
3696 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3697 ("python2-pysnptools" ,python2-pysnptools)))
3698 (native-inputs
3699 `(("unzip" ,unzip)
2efabc55 3700 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3701 ("python2-mock" ,python2-mock)
3702 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3703 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3704 (synopsis "Perform genome-wide association studies on large data sets")
3705 (description
3706 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3707Models, is a program for performing both single-SNP and SNP-set genome-wide
3708association studies (GWAS) on extremely large data sets.")
3f641af0 3709 (license license:asl2.0)))
3a1bfe18 3710
7ccb71e0
TD
3711(define-public python-numpy-documentation
3712 (package
3713 (name "python-numpy-documentation")
3714 (version (package-version python-numpy))
3715 (source (package-source python-numpy))
3716 (build-system python-build-system)
2ee8869a 3717 (native-inputs
7ccb71e0
TD
3718 `(("python-matplotlib" ,python-matplotlib)
3719 ("python-numpy" ,python-numpy)
3720 ("pkg-config" ,pkg-config)
2efabc55
HG
3721 ("python-sphinx" ,python-sphinx)
3722 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3723 ("texlive" ,texlive)
3724 ("texinfo" ,texinfo)
3725 ("perl" ,perl)
7ccb71e0
TD
3726 ("scipy-sphinx-theme"
3727 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3728 (method git-fetch)
3729 (uri (git-reference
3730 (url "https://github.com/scipy/scipy-sphinx-theme.git")
67416769 3731 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
7ccb71e0
TD
3732 (sha256
3733 (base32
67416769 3734 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
7ccb71e0 3735 ,@(package-native-inputs python-numpy)))
2ee8869a 3736 (arguments
7ccb71e0
TD
3737 `(#:tests? #f ; we're only generating the documentation
3738 #:phases
3739 (modify-phases %standard-phases
3740 (delete 'build)
3741 (replace 'install
3742 (lambda* (#:key inputs outputs #:allow-other-keys)
3743 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3744 (doc (string-append
3745 data "/doc/" ,name "-"
3746 ,(package-version python-numpy)))
3747 (info-reader (string-append data "/info"))
3748 (html (string-append doc "/html"))
3749 (scipy-sphinx-theme "scipy-sphinx-theme")
3750 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3751 (pyver ,(string-append "PYVER=")))
3752 (with-directory-excursion "doc"
3753 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3754 (mkdir-p html)
3755 (system* "make" "html" pyver)
3756 (system* "make" "latex" "PAPER=a4" pyver)
3757 (system* "make" "-C" "build/latex"
3758 "all-pdf" "PAPER=a4" pyver)
3759 ;; FIXME: Generation of the info file fails.
3760 ;; (system* "make" "info" pyver)
3761 ;; (mkdir-p info)
3762 ;; (copy-file "build/texinfo/numpy.info"
3763 ;; (string-append info "/numpy.info"))
3764 (for-each (lambda (file)
3765 (copy-file (string-append "build/latex" file)
3766 (string-append doc file)))
3767 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3768 (with-directory-excursion "build/html"
3769 (for-each (lambda (file)
3770 (let* ((dir (dirname file))
3771 (tgt-dir (string-append html "/" dir)))
3772 (unless (equal? "." dir)
3773 (mkdir-p tgt-dir))
3774 (install-file file html)))
3775 (find-files "." ".*")))))
3776 #t)))))
3777 (home-page (package-home-page python-numpy))
3778 (synopsis "Documentation for the python-numpy package")
3779 (description (package-description python-numpy))
3780 (license (package-license python-numpy))))
2ee8869a 3781
7ccb71e0
TD
3782(define-public python2-numpy-documentation
3783 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3784 (package
3785 (inherit numpy-documentation)
3786 (native-inputs `(("python2-functools32" ,python2-functools32)
3787 ,@(package-native-inputs numpy-documentation))))))
2ee8869a 3788
0151a8df 3789(define-public python-pygit2
3790 (package
3791 (name "python-pygit2")
022c9772 3792 (version "0.25.0")
0151a8df 3793 (source
3794 (origin
3795 (method url-fetch)
3796 (uri (pypi-uri "pygit2" version))
3797 (sha256
3798 (base32
bb6043fe
MB
3799 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3800 (patches
3801 (search-patches "python-pygit2-disable-network-tests.patch"))))
0151a8df 3802 (build-system python-build-system)
3803 (propagated-inputs
3804 `(("python-six" ,python-six)
3805 ("python-cffi" ,python-cffi)
3806 ("libgit2" ,libgit2)
3807 ("python-tox" ,python-tox)))
3808 (home-page "https://github.com/libgit2/pygit2")
3809 (synopsis "Python bindings for libgit2")
3810 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3811library, libgit2 implements Git plumbing.")
3812 ;; GPL2.0 only, with linking exception.
3813 (license license:gpl2)))
3814
3815(define-public python2-pygit2
3816 (package-with-python2 python-pygit2))
3817
15bfe6d6
FB
3818(define-public python-pyparsing
3819 (package
3820 (name "python-pyparsing")
e0669289 3821 (version "2.0.3")
15bfe6d6
FB
3822 (source
3823 (origin
3824 (method url-fetch)
de67e922
LF
3825 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3826 "/pyparsing-" version
15bfe6d6
FB
3827 "/pyparsing-" version ".tar.gz"))
3828 (sha256
3829 (base32
e0669289 3830 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3831 (build-system python-build-system)
3832 (outputs '("out" "doc"))
3833 (arguments
3834 `(#:tests? #f ; no test target
3835 #:modules ((guix build python-build-system)
3836 (guix build utils))
3837 #:phases
3838 (alist-cons-after
3839 'install 'install-doc
3840 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3841 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3842 "/share/doc/" ,name "-" ,version))
3843 (html-doc (string-append doc "/html"))
3844 (examples (string-append doc "/examples")))
3845 (mkdir-p html-doc)
3846 (mkdir-p examples)
89b5c60e 3847 (for-each
15bfe6d6 3848 (lambda (dir tgt)
89b5c60e 3849 (map (lambda (file)
96c46210 3850 (install-file file tgt))
15bfe6d6
FB
3851 (find-files dir ".*")))
3852 (list "docs" "htmldoc" "examples")
3853 (list doc html-doc examples))))
3854 %standard-phases)))
3855 (home-page "http://pyparsing.wikispaces.com")
3856 (synopsis "Python parsing class library")
3857 (description
3858 "The pyparsing module is an alternative approach to creating and
3859executing simple grammars, vs. the traditional lex/yacc approach, or the use
3860of regular expressions. The pyparsing module provides a library of classes
3861that client code uses to construct the grammar directly in Python code.")
bd3fa666 3862 (license license:expat)))
15bfe6d6
FB
3863
3864(define-public python2-pyparsing
3865 (package-with-python2 python-pyparsing))
3866
ec00de35
FB
3867(define-public python-numpydoc
3868 (package
3869 (name "python-numpydoc")
3870 (version "0.5")
3871 (source
3872 (origin
3873 (method url-fetch)
89b5c60e 3874 (uri (string-append
ec00de35
FB
3875 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3876 version ".tar.gz"))
3877 (sha256
3878 (base32
5e4d8f67
AE
3879 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3880 (modules '((guix build utils)))
3881 (snippet
3882 '(begin
3883 ;; Drop a test requiring matplotlib, which we cannot add as an
3884 ;; input since it would create a circular dependency: Extend the
3885 ;; test for Python 3, where it is already dropped, to Python 2.
3886 (substitute* "numpydoc/tests/test_plot_directive.py"
3887 (("3") "2"))))))
ec00de35 3888 (build-system python-build-system)
fe4a8da4 3889 (propagated-inputs
213d1745
HG
3890 `(("python-sphinx" ,python-sphinx)))
3891 (native-inputs
3892 `(("python-nose" ,python-nose)))
ec00de35
FB
3893 (home-page "https://pypi.python.org/pypi/numpydoc")
3894 (synopsis
3895 "Numpy's Sphinx extensions")
3896 (description
3897 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3898 (license license:bsd-2)))
ec00de35
FB
3899
3900(define-public python2-numpydoc
5e4d8f67 3901 (package-with-python2 python-numpydoc))
1c65314c 3902
1e656049
RW
3903(define-public python-numexpr
3904 (package
3905 (name "python-numexpr")
2ee57340 3906 (version "2.6.1")
1e656049
RW
3907 (source
3908 (origin
3909 (method url-fetch)
26112c0a 3910 (uri (pypi-uri "numexpr" version))
1e656049
RW
3911 (sha256
3912 (base32
2ee57340 3913 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
1e656049
RW
3914 (build-system python-build-system)
3915 (arguments `(#:tests? #f)) ; no tests included
3916 (propagated-inputs
3917 `(("python-numpy" ,python-numpy)))
3918 (home-page "https://github.com/pydata/numexpr")
3919 (synopsis "Fast numerical expression evaluator for NumPy")
3920 (description
3921 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3922expressions that operate on arrays are accelerated and use less memory than
3923doing the same calculation in Python. In addition, its multi-threaded
3924capabilities can make use of all your cores, which may accelerate
3925computations, most specially if they are not memory-bounded (e.g. those using
3926transcendental functions).")
f210e944 3927 (license license:expat)))
1e656049
RW
3928
3929(define-public python2-numexpr
f210e944 3930 (package-with-python2 python-numexpr))
1e656049 3931
361d982c
MB
3932(define-public python-cycler
3933 (package
3934 (name "python-cycler")
3935 (version "0.10.0")
3936 (source (origin
3937 (method url-fetch)
3938 (uri (pypi-uri "cycler" version))
3939 (sha256
3940 (base32
3941 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3942 (build-system python-build-system)
3943 (arguments
3944 ;; XXX: The current version requires 'coveralls' which we don't have.
3945 ;; Enable this for the next release which uses 'python-pytest'.
3946 '(#:tests? #f))
3947 (propagated-inputs
3948 `(("python-six" ,python-six)))
3949 (home-page "http://matplotlib.org/cycler/")
3950 (synopsis "Composable keyword argument iterator")
3951 (description
3952 "When using @code{matplotlib} and plotting more than one line, it is
3953common to want to be able to want to be able to cycle over one or more artist
3954styles; but the plotting logic can quickly become involved.
3955To address this and enable easy cycling over arbitrary @code{kwargs}, the
3956@code{Cycler} class was developed.")
3957 (license license:bsd-3)))
3958
3959(define-public python2-cycler
3960 (package-with-python2 python-cycler))
3961
2aa6d3ae
TD
3962(define-public python-colorspacious
3963 (package
3964 (name "python-colorspacious")
3965 (version "1.1.0")
3966 (source
3967 (origin
3968 (method url-fetch)
3969 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3970 version ".tar.gz"))
3971 (file-name (string-append name "-" version))
3972 (sha256
3973 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3974 (build-system python-build-system)
3975 (propagated-inputs
3976 `(("python-numpy" ,python-numpy)))
ba062b3e
TD
3977 (native-inputs
3978 `(("python-nose" ,python-nose)))
3979 (arguments
3980 `(#:phases
3981 (modify-phases %standard-phases
3982 (replace 'check
3983 (lambda _
3984 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
2aa6d3ae
TD
3985 (home-page "https://github.com/njsmith/colorspacious")
3986 (synopsis "Python library for colorspace conversions")
3987 (description "@code{colorspacious} is a Python library that lets you
3988convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3989 (license license:expat)))
3990
3991(define-public python2-colorspacious
3992 (package-with-python2 python-colorspacious))
3993
1c65314c
FB
3994(define-public python-matplotlib
3995 (package
3996 (name "python-matplotlib")
4535a93a 3997 (version "2.0.0")
1c65314c
FB
3998 (source
3999 (origin
4000 (method url-fetch)
4535a93a
TD
4001 (uri (string-append
4002 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
4003 (file-name (string-append name "-" version ".tar.gz"))
1c65314c
FB
4004 (sha256
4005 (base32
4535a93a 4006 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
1c65314c 4007 (build-system python-build-system)
25f9a068 4008 (propagated-inputs ; the following packages are all needed at run time
4535a93a
TD
4009 `(("python-cycler" ,python-cycler)
4010 ("python-pyparsing" ,python-pyparsing)
25f9a068
FB
4011 ("python-pygobject" ,python-pygobject)
4012 ("gobject-introspection" ,gobject-introspection)
1bbc659f 4013 ("python-tkinter" ,python "tk")
22d7360b 4014 ("python-dateutil" ,python-dateutil)
7ccb71e0 4015 ("python-numpy" ,python-numpy)
ca33a3ad
HG
4016 ("python-pillow" ,python-pillow)
4017 ("python-pytz" ,python-pytz)
4018 ("python-six" ,python-six)
25f9a068
FB
4019 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
4020 ;; from 'gtk+') provides the required 'typelib' files used by
4021 ;; 'gobject-introspection'. The location of these files is set with the
4022 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
4023 ;; is done automatically by a 'native-search-path' procedure. However,
4024 ;; at run-time the user must set this variable as follows:
4025 ;;
4026 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
4027 ("gtk+" ,gtk+)
4028 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4029 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4030 ;; object. For this reason we need to import both libraries.
4031 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
4032 ("python-pycairo" ,python-pycairo)
4033 ("python-cairocffi" ,python-cairocffi)))
1c65314c 4034 (inputs
ca33a3ad 4035 `(("libpng" ,libpng)
1c65314c
FB
4036 ("imagemagick" ,imagemagick)
4037 ("freetype" ,freetype)
25f9a068
FB
4038 ("cairo" ,cairo)
4039 ("glib" ,glib)
1c65314c 4040 ;; FIXME: Add backends when available.
1c65314c 4041 ;("python-wxpython" ,python-wxpython)
4535a93a 4042 ("python-pyqt" ,python-pyqt)
1bbc659f
FB
4043 ("tcl" ,tcl)
4044 ("tk" ,tk)))
1c65314c
FB
4045 (native-inputs
4046 `(("pkg-config" ,pkg-config)
ca33a3ad 4047 ("python-nose" ,python-nose)
4535a93a 4048 ("python-mock" ,python-mock)))
1c65314c
FB
4049 (arguments
4050 `(#:phases
42b7009a
DM
4051 (modify-phases %standard-phases
4052 (add-before 'build 'configure-environment
4053 (lambda* (#:key outputs inputs #:allow-other-keys)
4054 (let ((cairo (assoc-ref inputs "cairo"))
4055 (gtk+ (assoc-ref inputs "gtk+")))
4056 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
4057 ;; has not effect.
4058 (setenv "LD_LIBRARY_PATH"
4059 (string-append cairo "/lib:" gtk+ "/lib"))
4060 (setenv "HOME" (getcwd))
4061 (call-with-output-file "setup.cfg"
4062 (lambda (port)
4063 (format port "[directories]~%
1bbc659f 4064basedirlist = ~a,~a~%
57b7b8cd 4065 [rc_options]~%
1bbc659f
FB
4066backend = TkAgg~%"
4067 (assoc-ref inputs "tcl")
4535a93a
TD
4068 (assoc-ref inputs "tk")))))
4069 #t)))))
1c65314c
FB
4070 (home-page "http://matplotlib.org")
4071 (synopsis "2D plotting library for Python")
4072 (description
4073 "Matplotlib is a Python 2D plotting library which produces publication
4074quality figures in a variety of hardcopy formats and interactive environments
4075across platforms. Matplotlib can be used in Python scripts, the python and
4076ipython shell, web application servers, and six graphical user interface
4077toolkits.")
3f641af0 4078 (license license:psfl)
57b7b8cd 4079 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 4080
764c077b 4081(define-public python2-matplotlib
57b7b8cd
LC
4082 (let ((matplotlib (package-with-python2
4083 (strip-python2-variant python-matplotlib))))
764c077b 4084 (package (inherit matplotlib)
88c26834
AE
4085 ;; Make sure to use special packages for Python 2 instead
4086 ;; of those automatically rewritten by package-with-python2.
89b5c60e 4087 (propagated-inputs
7ca0dbc3 4088 `(("python2-pycairo" ,python2-pycairo)
4535a93a 4089 ("python2-functools32" ,python2-functools32)
764c077b 4090 ("python2-pygobject-2" ,python2-pygobject-2)
4535a93a 4091 ("python2-subprocess32" ,python2-subprocess32)
1bbc659f
FB
4092 ("python2-tkinter" ,python-2 "tk")
4093 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4094 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 4095
4535a93a
TD
4096(define-public python-matplotlib-documentation
4097 (package
4098 (name "python-matplotlib-documentation")
4099 (version (package-version python-matplotlib))
4100 (source (package-source python-matplotlib))
4101 (build-system python-build-system)
4102 (native-inputs
4103 `(("python-matplotlib" ,python-matplotlib)
4104 ("python-colorspacious" ,python-colorspacious)
4105 ("python-sphinx" ,python-sphinx)
4106 ("python-numpydoc" ,python-numpydoc)
4107 ("python-ipython" ,python-ipython)
1eaaea41
TD
4108 ("python-mock" ,python-mock)
4109 ("graphviz" ,graphviz)
4535a93a
TD
4110 ("texlive" ,texlive)
4111 ("texinfo" ,texinfo)
4112 ,@(package-native-inputs python-matplotlib)))
4113 (arguments
4114 `(#:tests? #f ; we're only generating documentation
4115 #:phases
4116 (modify-phases %standard-phases
1eaaea41
TD
4117 (replace 'build
4118 (lambda _
4119 (chdir "doc")
4120 ;; Produce pdf in 'A4' format.
4121 (substitute* "conf.py"
4122 (("latex_paper_size = 'letter'") "")
4123 ;; latex_paper_size is deprecated -> set paper size using
4124 ;; latex_elements
4125 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4126 ;; insert at a point where latex_elements{} is defined:
4127 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4128 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4535a93a 4129 (replace 'install
42b7009a 4130 (lambda* (#:key inputs outputs #:allow-other-keys)
4535a93a 4131 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
1eaaea41 4132 (doc (string-append data "/doc/python-matplotlib-" ,version))
42b7009a
DM
4133 (info (string-append data "/info"))
4134 (html (string-append doc "/html")))
1eaaea41
TD
4135 (mkdir-p html)
4136 (mkdir-p info)
4137 (copy-recursively "build/html" html)
4138 (symlink (string-append html "/_images")
4139 (string-append info "/matplotlib-figures"))
4140 (with-directory-excursion "build/texinfo"
4141 (substitute* "matplotlib.texi"
4142 (("@image\\{([^,]*)" all file)
4143 (string-append "@image{matplotlib-figures/" file)))
18b31516 4144 (symlink (string-append html "/_images")
1eaaea41
TD
4145 "./matplotlib-figures")
4146 (system* "makeinfo" "--no-split"
4147 "-o" "matplotlib.info" "matplotlib.texi"))
4148 (copy-file "build/texinfo/matplotlib.info"
4149 (string-append info "/matplotlib.info"))
4150 (copy-file "build/latex/Matplotlib.pdf"
4151 (string-append doc "/Matplotlib.pdf")))
4535a93a
TD
4152 #t)))))
4153 (home-page (package-home-page python-matplotlib))
4154 (synopsis "Documentation for the python-matplotlib package")
4155 (description (package-description python-matplotlib))
4156 (license (package-license python-matplotlib))))
1c65314c 4157
4535a93a
TD
4158(define-public python2-matplotlib-documentation
4159 (package-with-python2 python-matplotlib-documentation))
94914805 4160
0dde6232
RW
4161(define-public python2-pysnptools
4162 (package
4163 (name "python2-pysnptools")
a800018e 4164 (version "0.3.9")
0dde6232
RW
4165 (source
4166 (origin
4167 (method url-fetch)
3f2e9675 4168 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
4169 (sha256
4170 (base32
a800018e 4171 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
4172 (build-system python-build-system)
4173 (arguments
4174 `(#:python ,python-2)) ; only Python 2.7 is supported
4175 (propagated-inputs
4176 `(("python2-numpy" ,python2-numpy)
4177 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
4178 ("python2-pandas" ,python2-pandas)))
4179 (native-inputs
4180 `(("python2-cython" ,python2-cython)))
0dde6232 4181 (native-inputs
f3b98f4f 4182 `(("unzip" ,unzip)))
0dde6232
RW
4183 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4184 (synopsis "Library for reading and manipulating genetic data")
4185 (description
4186 "PySnpTools is a library for reading and manipulating genetic data. It
4187can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4188those files. It can also efficiently manipulate ranges of integers using set
4189operators such as union, intersection, and difference.")
3f641af0 4190 (license license:asl2.0)))
0dde6232 4191
c9b1b4f9
RW
4192(define-public python-rpy2
4193 (package
4194 (name "python-rpy2")
ec3bcbc7 4195 (version "2.7.6")
c9b1b4f9
RW
4196 (source
4197 (origin
4198 (method url-fetch)
ec3bcbc7 4199 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
4200 (sha256
4201 (base32
ec3bcbc7 4202 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 4203 (build-system python-build-system)
444464ec
MB
4204 (arguments
4205 '(#:phases
4206 (modify-phases %standard-phases
4207 (delete 'check)
4208 (add-after 'install 'check
4209 (lambda* (#:key outputs inputs #:allow-other-keys)
4210 ;; It's easier to run tests after install.
4211 ;; Make installed package available for running the tests
4212 (add-installed-pythonpath inputs outputs)
4213 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
482d9591
HG
4214 (propagated-inputs
4215 `(("python-six" ,python-six)))
c9b1b4f9 4216 (inputs
482d9591 4217 `(("readline" ,readline)
c9b1b4f9
RW
4218 ("icu4c" ,icu4c)
4219 ("pcre" ,pcre)
2d7c4ae3 4220 ("r-minimal" ,r-minimal)
aeb64f3c 4221 ("r-survival" ,r-survival)))
c9b1b4f9 4222 (native-inputs
f3b98f4f 4223 `(("zlib" ,zlib)))
c9b1b4f9
RW
4224 (home-page "http://rpy.sourceforge.net/")
4225 (synopsis "Python interface to the R language")
4226 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4227low-level interface to R from Python, a proposed high-level interface,
4228including wrappers to graphical libraries, as well as R-like structures and
4229functions.")
3f641af0 4230 (license license:gpl3+)))
c9b1b4f9
RW
4231
4232(define-public python2-rpy2
4233 (let ((rpy2 (package-with-python2 python-rpy2)))
4234 (package (inherit rpy2)
d6abd094 4235 (propagated-inputs
c9b1b4f9 4236 `(("python2-singledispatch" ,python2-singledispatch)
d6abd094 4237 ,@(package-propagated-inputs rpy2))))))
c9b1b4f9 4238
bb986599
FB
4239(define-public python-scipy
4240 (package
4241 (name "python-scipy")
35093253 4242 (version "0.18.1")
bb986599
FB
4243 (source
4244 (origin
4245 (method url-fetch)
35093253
TD
4246 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4247 version ".tar.gz"))
4248 (file-name (string-append name "-" version ".tar.gz"))
bb986599
FB
4249 (sha256
4250 (base32
35093253 4251 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
bb986599 4252 (build-system python-build-system)
dd86c0d1 4253 (propagated-inputs
bb986599
FB
4254 `(("python-numpy" ,python-numpy)
4255 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
4256 ("python-pyparsing" ,python-pyparsing)))
4257 (inputs
4258 `(("lapack" ,lapack)
719b01c1 4259 ("openblas" ,openblas)))
bb986599 4260 (native-inputs
35093253
TD
4261 `(("python-cython" ,python-cython)
4262 ("python-nose" ,python-nose)
dd86c0d1 4263 ("python-sphinx" ,python-sphinx)
5248d49e 4264 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 4265 ("gfortran" ,gfortran)
bb986599
FB
4266 ("perl" ,perl)))
4267 (outputs '("out" "doc"))
4268 (arguments
4269 `(#:phases
16ca6aaa 4270 (modify-phases %standard-phases
16ca6aaa
MB
4271 (add-before 'build 'configure-openblas
4272 (lambda* (#:key inputs #:allow-other-keys)
4273 (call-with-output-file "site.cfg"
4274 (lambda (port)
4275 (format port
4276 "[blas]
719b01c1
RW
4277libraries = openblas
4278library_dirs = ~a/lib
4279include_dirs = ~a/include
d548e6aa
HG
4280
4281# backslash-n to make emacs happy
4282\n[atlas]
719b01c1
RW
4283library_dirs = ~a/lib
4284atlas_libs = openblas
4285"
16ca6aaa
MB
4286 (assoc-ref inputs "openblas")
4287 (assoc-ref inputs "openblas")
4288 (assoc-ref inputs "openblas"))))
db967b64 4289 #t))
35093253
TD
4290 (add-after 'install 'install-doc
4291 (lambda* (#:key inputs outputs #:allow-other-keys)
4292 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4293 (doc (string-append data "/doc/" ,name "-" ,version))
4294 (html (string-append doc "/html"))
4295 (pyver ,(string-append "PYVER=")))
4296 ;; Make installed package available for building the
4297 ;; documentation
4298 (add-installed-pythonpath inputs outputs)
4299 (with-directory-excursion "doc"
4300 ;; Fix generation of images for mathematical expressions.
4301 (substitute* (find-files "source" "conf\\.py")
4302 (("pngmath_use_preview = True")
4303 "pngmath_use_preview = False"))
4304 (mkdir-p html)
4305 (system* "make" "html" pyver)
4306 (with-directory-excursion "build/html"
4307 (for-each (lambda (file)
4308 (let* ((dir (dirname file))
4309 (tgt-dir (string-append html "/" dir)))
4310 (install-file file html)))
4311 (find-files "." ".*")))))
4312 #t))
4313 (add-after 'unpack 'fix-tests
4314 (lambda _
4315 (substitute* "scipy/integrate/tests/test_quadpack.py"
4316 (("libm.so") "libm.so.6"))
4317 #t))
4318 ;; Tests can only be run after the library has been installed and not
4319 ;; within the source directory.
4320 (delete 'check)
4321 (add-after 'install 'check
4322 (lambda* (#:key inputs outputs #:allow-other-keys)
d548e6aa 4323 (add-installed-pythonpath inputs outputs)
35093253
TD
4324 (with-directory-excursion "/tmp"
4325 (zero? (system* "python" "-c"
4326 "import scipy; scipy.test('full')")))
4327 #t)))))
bb986599
FB
4328 (home-page "http://www.scipy.org/")
4329 (synopsis "The Scipy library provides efficient numerical routines")
4330 (description "The SciPy library is one of the core packages that make up
4331the SciPy stack. It provides many user-friendly and efficient numerical
4332routines such as routines for numerical integration and optimization.")
9200fe14 4333 (properties `((python2-variant . ,(delay python2-scipy))))
3f641af0 4334 (license license:bsd-3)))
bb986599 4335
764c077b 4336(define-public python2-scipy
35093253
TD
4337 (package-with-python2
4338 (strip-python2-variant python-scipy)))
bb986599 4339
e537c917
CB
4340(define-public python-sockjs-tornado
4341 (package
4342 (name "python-sockjs-tornado")
4343 (version "1.0.3")
4344 (source
4345 (origin
4346 (method url-fetch)
4347 (uri (pypi-uri "sockjs-tornado" version))
4348 (sha256
4349 (base32
4350 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4351 (build-system python-build-system)
4352 (arguments
4353 `(;; There are no tests, and running the test phase requires missing
4354 ;; dependencies
4355 #:tests? #f))
4356 (propagated-inputs
4357 `(("python-tornado" ,python-tornado)))
4358 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4359 (synopsis
4360 "SockJS python server implementation on top of Tornado framework")
4361 (description
4362 "SockJS-tornado provides the server side counterpart to a SockJS client
4363library, through the Tornado framework.
4364
4365SockJS provides a low latency, full duplex, cross-domain communication channel
4366between a web browser and web server.")
4367 (license license:expat)))
4368
4369(define-public python2-sockjs-tornado
4370 (package-with-python2 python-sockjs-tornado))
4371
73acc193 4372(define-public python-socksipy-branch
4373 (package
4374 (name "python-socksipy-branch")
4375 (version "1.01")
4376 (source
4377 (origin
4378 (method url-fetch)
4379 (uri (pypi-uri "SocksiPy-branch" version))
4380 (sha256
4381 (base32
4382 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4383 (build-system python-build-system)
4384 (arguments
4385 `(#:tests? #f)) ; There are no tests
4386 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4387 (synopsis "Python SOCKS module")
4388 (description
4389 "SocksiPy - A Python SOCKS client module. It provides a
4390socket-like interface that supports connections to any TCP
4391service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4392The original version was developed by Dan Haim, this is a
4393branch created by Mario Vilas to address some open issues,
4394as the original project seems to have been abandoned circa 2007.")
4395 (license license:bsd-3)))
4396
4397(define-public python2-socksipy-branch
4398 (package-with-python2 python-socksipy-branch))
4399
94914805
EB
4400(define-public python-sqlalchemy
4401 (package
4402 (name "python-sqlalchemy")
a4ba286b 4403 (version "1.0.12")
94914805
EB
4404 (source
4405 (origin
4406 (method url-fetch)
4407 (uri (string-append "https://pypi.python.org/packages/source/S/"
4408 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4409 (sha256
4410 (base32
a4ba286b 4411 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
4412 (build-system python-build-system)
4413 (native-inputs
4414 `(("python-cython" ,python-cython) ;for c extensions
4415 ("python-pytest" ,python-pytest)
4416 ("python-mock" ,python-mock))) ;for tests
4417 (arguments
4418 `(#:phases (alist-replace
4419 'check
4420 (lambda _ (zero? (system* "py.test")))
4421 %standard-phases)))
4422 (home-page "http://www.sqlalchemy.org")
4423 (synopsis "Database abstraction library")
4424 (description
4425 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4426gives application developers the full power and flexibility of SQL. It
4427provides a full suite of well known enterprise-level persistence patterns,
4428designed for efficient and high-performing database access, adapted into a
4429simple and Pythonic domain language.")
3f641af0 4430 (license license:x11)))
94914805
EB
4431
4432(define-public python2-sqlalchemy
4433 (package-with-python2 python-sqlalchemy))
c937562e 4434
4a093330
DM
4435(define-public python-pycodestyle
4436 (package
4437 (name "python-pycodestyle")
9b801661 4438 (version "2.3.1")
4a093330
DM
4439 (source
4440 (origin
4441 (method url-fetch)
4442 (uri (pypi-uri "pycodestyle" version))
4443 (sha256
4444 (base32
9b801661 4445 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
4a093330
DM
4446 (build-system python-build-system)
4447 (home-page "https://pycodestyle.readthedocs.io/")
4448 (synopsis "Python style guide checker")
4449 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4450Python code against some of the style conventions in
4451@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 4452 (license license:expat)))
4a093330
DM
4453
4454(define-public python2-pycodestyle
f210e944 4455 (package-with-python2 python-pycodestyle))
b91912c4
DM
4456
4457(define-public python-orderedmultidict
4458 (package
4459 (name "python-orderedmultidict")
9e2802cb 4460 (version "0.7.11")
b91912c4
DM
4461 (source
4462 (origin
4463 (method url-fetch)
4464 (uri (pypi-uri "orderedmultidict" version))
4465 (sha256
4466 (base32
9e2802cb 4467 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
b91912c4
DM
4468 (build-system python-build-system)
4469 (arguments
4470 `(#:phases
4471 (modify-phases %standard-phases
4472 (add-after 'unpack 'fix-tests
4473 (lambda _
4474 ;; The package uses nosetest for running the tests.
4475 ;; Adding this initfile allows to run the test suite
4476 ;; without requiring nosetest.
4477 (zero? (system* "touch" "tests/__init__.py")))))))
4478 (propagated-inputs
4479 `(("python-six" ,python-six)))
4480 (native-inputs
4481 `(("python-pycodestyle" ,python-pycodestyle)))
4482 (home-page "https://github.com/gruns/orderedmultidict")
4483 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4484 (description "This package contains a library for ordered multivalue
4485dictionaries. A multivalue dictionary is a dictionary that can store
4486multiple values for the same key. An ordered multivalue dictionary is a
4487multivalue dictionary that retains the order of insertions and deletions.")
f210e944 4488 (license license:unlicense)))
b91912c4
DM
4489
4490(define-public python2-orderedmultidict
f210e944 4491 (package-with-python2 python-orderedmultidict))
9dede065
DM
4492
4493(define-public python-furl
4494 (package
4495 (name "python-furl")
4496 (version "0.5.6")
4497 (source
4498 (origin
4499 (method url-fetch)
4500 (uri (pypi-uri "furl" version))
4501 (sha256
4502 (base32
4503 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4504 (build-system python-build-system)
4505 (propagated-inputs
4506 `(("python-six" ,python-six)
4507 ("python-orderedmultidict" ,python-orderedmultidict)))
4508 (native-inputs
4509 `(("python-pycodestyle" ,python-pycodestyle)))
4510 (home-page "https://github.com/gruns/furl")
4511 (synopsis "URL manipulation in Python")
4512 (description "Furl provides an easy-to-use alternative to the
4513@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 4514 (license license:unlicense)))
9dede065
DM
4515
4516(define-public python2-furl
f210e944 4517 (package-with-python2 python-furl))
462bf271
DM
4518
4519(define-public python-flask-babel
4520 (package
4521 (name "python-flask-babel")
4522 (version "0.11.1")
4523 (source
4524 (origin
4525 (method url-fetch)
4526 (uri (pypi-uri "Flask-Babel" version))
4527 (sha256
4528 (base32
4529 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4530 (build-system python-build-system)
4531 (propagated-inputs
4532 `(("python-flask" ,python-flask)
4533 ("python-babel" ,python-babel)
4534 ("python-jinja2" ,python-jinja2)
4535 ("python-pytz" ,python-pytz)))
4536 (home-page "https://github.com/python-babel/flask-babel")
4537 (synopsis "Add i18n/l10n support to Flask applications")
4538 (description "This package implements internationalization and localization
4539support for Flask. This is based on the Python babel module as well as pytz -
4540both of which are installed automatically if you install this library.")
f210e944 4541 (license license:bsd-3)))
462bf271
DM
4542
4543(define-public python2-flask-babel
f210e944 4544 (package-with-python2 python-flask-babel))
4a093330 4545
de2966cf
EF
4546(define-public python-sqlalchemy-utils
4547 (package
4548 (name "python-sqlalchemy-utils")
fd2662e9 4549 (version "0.32.13")
de2966cf
EF
4550 (source
4551 (origin
4552 (method url-fetch)
4553 (uri (pypi-uri "SQLAlchemy-Utils" version))
4554 (sha256
4555 (base32
fd2662e9 4556 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
de2966cf 4557 (build-system python-build-system)
35d56b7b
MB
4558 (arguments
4559 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4560 ;; #:phases
4561 ;; (modify-phases %standard-phases
4562 ;; (replace 'check
4563 ;; (lambda _
4564 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
c22b4f87 4565 (propagated-inputs
de2966cf
EF
4566 `(("python-six" ,python-six)
4567 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb 4568 (native-inputs
22d7360b 4569 `(("python-dateutil" ,python-dateutil)
35d56b7b
MB
4570 ("python-flexmock" ,python-flexmock)
4571 ("python-psycopg2" ,python-psycopg2)
4572 ("python-pytest" ,python-pytest)
4573 ("python-pytz" ,python-pytz)))
de2966cf
EF
4574 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4575 (synopsis "Various utility functions for SQLAlchemy")
4576 (description
4577 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4578for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4579
4580You might also want to install the following optional dependencies:
4581@enumerate
4582@item @code{python-passlib}
4583@item @code{python-babel}
4584@item @code{python-cryptography}
4585@item @code{python-pytz}
4586@item @code{python-psycopg2}
4587@item @code{python-furl}
4588@item @code{python-flask-babel}
4589@end enumerate
4590")
de2966cf
EF
4591 (license license:bsd-3)))
4592
4593(define-public python2-sqlalchemy-utils
f210e944 4594 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4595
af5a4602
CAW
4596(define-public python-alembic
4597 (package
4598 (name "python-alembic")
4418990d 4599 (version "0.8.10")
af5a4602
CAW
4600 (source
4601 (origin
4602 (method url-fetch)
4603 (uri (pypi-uri "alembic" version))
4604 (sha256
4605 (base32
4418990d 4606 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
af5a4602
CAW
4607 (build-system python-build-system)
4608 (native-inputs
4609 `(("python-mock" ,python-mock)
4610 ("python-pytest-cov" ,python-pytest-cov)))
4611 (propagated-inputs
4612 `(("python-sqlalchemy" ,python-sqlalchemy)
4613 ("python-mako" ,python-mako)
4614 ("python-editor" ,python-editor)))
4615 (home-page "http://bitbucket.org/zzzeek/alembic")
4616 (synopsis
4617 "Database migration tool for SQLAlchemy")
4618 (description
4619 "Alembic is a lightweight database migration tool for usage with the
4620SQLAlchemy Database Toolkit for Python.")
f210e944 4621 (license license:expat)))
af5a4602
CAW
4622
4623(define-public python2-alembic
f210e944 4624 (package-with-python2 python-alembic))
af5a4602 4625
138adbbe
TD
4626(define-public python-autopep8
4627 (package
4628 (name "python-autopep8")
4629 (version "1.2.4")
4630 (source
4631 (origin
4632 (method url-fetch)
4633 (uri (pypi-uri "autopep8" version))
4634 (sha256
4635 (base32
4636 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4637 (build-system python-build-system)
4638 (propagated-inputs
4639 `(("python-pep8" ,python-pep8)))
4640 (home-page "https://github.com/hhatto/autopep8")
4641 (synopsis "Format Python code according to the PEP 8 style guide")
4642 (description
4643 "@code{autopep8} automatically formats Python code to conform to
4644the PEP 8 style guide. It uses the pycodestyle utility to determine
4645what parts of the code needs to be formatted. @code{autopep8} is
4646capable of fixing most of the formatting issues that can be reported
4647by pycodestyle.")
4648 (license (license:non-copyleft
4649 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4650
4651(define-public python2-autopep8
4652 (package-with-python2 python-autopep8))
4653
1671c07c
EB
4654(define-public python-distutils-extra
4655 (package
4656 (name "python-distutils-extra")
4657 (version "2.38")
4658 (source
4659 (origin
4660 (method url-fetch)
4661 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4662 version "/+download/python-distutils-extra-"
4663 version ".tar.gz"))
4664 (sha256
4665 (base32
4666 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4667 (build-system python-build-system)
1671c07c
EB
4668 (home-page "https://launchpad.net/python-distutils-extra/")
4669 (synopsis "Enhancements to Python's distutils")
4670 (description
4671 "The python-distutils-extra module enables you to easily integrate
4672gettext support, themed icons, and scrollkeeper-based documentation into
4673Python's distutils.")
3f641af0 4674 (license license:gpl2)))
1671c07c
EB
4675
4676(define-public python2-distutils-extra
4677 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4678
4679(define-public python2-elib.intl
4680 (package
4681 (name "python2-elib.intl")
4682 (version "0.0.3")
4683 (source
4684 (origin
4685 ;; This project doesn't tag releases or publish tarballs, so we take
4686 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4687 (method git-fetch)
4688 (uri (git-reference
4689 (url "https://github.com/dieterv/elib.intl.git")
4690 (commit "d09997cfef")))
4691 (sha256
4692 (base32
4693 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4694 (build-system python-build-system)
ea5456c8
EB
4695 (arguments
4696 ;; incompatible with Python 3 (exception syntax)
4697 `(#:python ,python-2
b41a05ce 4698 #:tests? #f))
ea5456c8
EB
4699 (home-page "https://github.com/dieterv/elib.intl")
4700 (synopsis "Enhanced internationalization for Python")
4701 (description
4702 "The elib.intl module provides enhanced internationalization (I18N)
4703services for your Python modules and applications.")
3f641af0 4704 (license license:lgpl3+)))
ea5456c8 4705
c937562e
EB
4706(define-public python-pillow
4707 (package
4708 (name "python-pillow")
aba5182c 4709 (version "3.3.3")
c937562e
EB
4710 (source
4711 (origin
4712 (method url-fetch)
f1d9231d 4713 (uri (pypi-uri "Pillow" version))
a9681c74 4714 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
c937562e
EB
4715 (sha256
4716 (base32
aba5182c 4717 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4718 (build-system python-build-system)
4719 (native-inputs
f3b98f4f 4720 `(("python-nose" ,python-nose)))
c937562e 4721 (inputs
5ff408d9
SB
4722 `(("freetype" ,freetype)
4723 ("lcms" ,lcms)
c937562e
EB
4724 ("zlib" ,zlib)
4725 ("libjpeg" ,libjpeg)
4726 ("openjpeg" ,openjpeg)
5ff408d9
SB
4727 ("libtiff" ,libtiff)
4728 ("libwebp" ,libwebp)))
c937562e 4729 (arguments
e5358a6b 4730 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4731 (add-after
4732 'install 'check-installed
6151120a 4733 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4734 (begin
4735 (setenv "HOME" (getcwd))
6151120a
HG
4736 ;; Make installed package available for running the
4737 ;; tests
4738 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4739 (and (zero? (system* "python" "selftest.py"
4740 "--installed"))
4741 (zero? (system* "python" "test-installed.py"))))))
4742 (delete 'check))))
c937562e
EB
4743 (home-page "https://pypi.python.org/pypi/Pillow")
4744 (synopsis "Fork of the Python Imaging Library")
4745 (description
4746 "The Python Imaging Library adds image processing capabilities to your
4747Python interpreter. This library provides extensive file format support, an
4748efficient internal representation, and fairly powerful image processing
4749capabilities. The core image library is designed for fast access to data
4750stored in a few basic pixel formats. It should provide a solid foundation for
4751a general image processing tool.")
3f641af0 4752 (license (license:x11-style
c937562e
EB
4753 "http://www.pythonware.com/products/pil/license.htm"
4754 "The PIL Software License"))))
4755
4756(define-public python2-pillow
4757 (package-with-python2 python-pillow))
bb986599 4758
a415f036
FB
4759(define-public python-pycparser
4760 (package
4761 (name "python-pycparser")
5043b20d 4762 (version "2.17")
a415f036
FB
4763 (source
4764 (origin
4765 (method url-fetch)
38eb6919 4766 (uri (pypi-uri "pycparser" version))
a415f036
FB
4767 (sha256
4768 (base32
5043b20d 4769 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
a415f036
FB
4770 (outputs '("out" "doc"))
4771 (build-system python-build-system)
4772 (native-inputs
f3b98f4f 4773 `(("pkg-config" ,pkg-config)))
a415f036 4774 (arguments
89b5c60e 4775 `(#:phases
819939cb
TGR
4776 (modify-phases %standard-phases
4777 (replace 'check
4778 (lambda _
4779 (with-directory-excursion "tests"
4780 (zero? (system* "python" "all_tests.py")))))
4781 (add-after 'install 'install-doc
4782 (lambda* (#:key outputs #:allow-other-keys)
4783 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4784 (doc (string-append data "/doc/" ,name "-" ,version))
4785 (examples (string-append doc "/examples")))
4786 (mkdir-p examples)
4787 (for-each (lambda (file)
4788 (copy-file (string-append "." file)
4789 (string-append doc file)))
4790 '("/README.rst" "/CHANGES" "/LICENSE"))
4791 (copy-recursively "examples" examples)))))))
a415f036
FB
4792 (home-page "https://github.com/eliben/pycparser")
4793 (synopsis "C parser in Python")
4794 (description
4795 "Pycparser is a complete parser of the C language, written in pure Python
4796using the PLY parsing library. It parses C code into an AST and can serve as
4797a front-end for C compilers or analysis tools.")
3f641af0 4798 (license license:bsd-3)))
a415f036
FB
4799
4800(define-public python2-pycparser
4801 (package-with-python2 python-pycparser))
57c3f716
FB
4802
4803(define-public python-cffi
4804 (package
4805 (name "python-cffi")
029933cf 4806 (version "1.10.0")
57c3f716
FB
4807 (source
4808 (origin
4809 (method url-fetch)
2d3a437c 4810 (uri (pypi-uri "cffi" version))
89b5c60e 4811 (sha256
029933cf 4812 (base32 "1mffyilq4qycm8gs4wkgb18rnqil8a9blqq77chdlshzxc8jkc5k"))))
57c3f716
FB
4813 (build-system python-build-system)
4814 (outputs '("out" "doc"))
4815 (inputs
4816 `(("libffi" ,libffi)))
4817 (propagated-inputs ; required at run-time
4818 `(("python-pycparser" ,python-pycparser)))
4819 (native-inputs
4820 `(("pkg-config" ,pkg-config)
4821 ("python-sphinx" ,python-sphinx)
f3b98f4f 4822 ("python-pytest" ,python-pytest)))
57c3f716 4823 (arguments
295f32f3
MB
4824 `(#:modules ((ice-9 ftw)
4825 (srfi srfi-26)
4826 (guix build utils)
4827 (guix build python-build-system))
4828 #:phases
4829 (modify-phases %standard-phases
4830 (replace 'check
4831 (lambda _
4832 (setenv "PYTHONPATH"
4833 (string-append
4834 (getenv "PYTHONPATH")
4835 ":" (getcwd) "/build/"
4836 (car (scandir "build" (cut string-prefix? "lib." <>)))))
029933cf
MB
4837
4838 ;; XXX The "normal" approach of setting CC and friends does
4839 ;; not work here. Is this the correct way of doing things?
4840 (substitute* "testing/embedding/test_basic.py"
4841 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4842 (string-append "c = distutils.ccompiler.new_compiler();"
4843 "c.set_executables(compiler='gcc',"
4844 "compiler_so='gcc',linker_exe='gcc',"
4845 "linker_so='gcc -shared')")))
4846 (substitute* "testing/cffi0/test_ownlib.py"
4847 (("'cc testownlib") "'gcc testownlib"))
4848 (zero? (system* "py.test" "-v" "c/" "testing/"))))
295f32f3
MB
4849 (add-after 'install 'install-doc
4850 (lambda* (#:key outputs #:allow-other-keys)
4851 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4852 (doc (string-append data "/doc/" ,name "-" ,version))
4853 (html (string-append doc "/html")))
4854 (with-directory-excursion "doc"
4855 (system* "make" "html")
4856 (mkdir-p html)
4857 (copy-recursively "build/html" html))
4858 (copy-file "LICENSE" (string-append doc "/LICENSE"))
4859 #t))))))
57c3f716
FB
4860 (home-page "http://cffi.readthedocs.org")
4861 (synopsis "Foreign function interface for Python")
4862 (description
4863 "Foreign Function Interface for Python calling C code.")
bd3fa666 4864 (license license:expat)))
57c3f716
FB
4865
4866(define-public python2-cffi
4867 (package-with-python2 python-cffi))
6fa14469
FB
4868
4869(define-public python-xcffib
4870 (package
4871 (name "python-xcffib")
8347c122 4872 (version "0.5.1")
6fa14469
FB
4873 (source
4874 (origin
4875 (method url-fetch)
8347c122 4876 (uri (pypi-uri "xcffib" version))
6fa14469
FB
4877 (sha256
4878 (base32
8347c122 4879 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
6fa14469
FB
4880 (build-system python-build-system)
4881 (inputs
482d9591 4882 `(("libxcb" ,libxcb)))
6fa14469 4883 (propagated-inputs
482d9591
HG
4884 `(("python-cffi" ,python-cffi) ; used at run time
4885 ("python-six" ,python-six)))
6fa14469 4886 (arguments
e46bf223 4887 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
e2816ac7
MB
4888 #:tests? #f
4889 #:phases
c8cd850c 4890 (modify-phases %standard-phases
e46bf223
JMSG
4891 (add-after 'unpack 'fix-libxcb-path
4892 (lambda* (#:key inputs #:allow-other-keys)
4893 (let ((libxcb (assoc-ref inputs "libxcb")))
4894 (substitute* '("xcffib/__init__.py")
4895 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4896 #t)))
c8cd850c
MB
4897 (add-after 'install 'install-doc
4898 (lambda* (#:key outputs #:allow-other-keys)
4899 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4900 "/doc/" ,name "-" ,version)))
4901 (mkdir-p doc)
4902 (copy-file "README.md"
4903 (string-append doc "/README.md"))
4904 #t))))))
6fa14469
FB
4905 (home-page "https://github.com/tych0/xcffib")
4906 (synopsis "XCB Python bindings")
4907 (description
4908 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4909support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4910 (license license:expat)))
6fa14469
FB
4911
4912(define-public python2-xcffib
4913 (package-with-python2 python-xcffib))
4914
9e099723
FB
4915(define-public python-cairocffi
4916 (package
4917 (name "python-cairocffi")
80f78e8f 4918 (version "0.8.0")
9e099723
FB
4919 (source
4920 (origin
4921 (method url-fetch)
4922 ;; The archive on pypi is missing the 'utils' directory!
3015d455 4923 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
9e099723 4924 version ".tar.gz"))
f586c877 4925 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4926 (sha256
4927 (base32
80f78e8f 4928 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
9e099723
FB
4929 (build-system python-build-system)
4930 (outputs '("out" "doc"))
4931 (inputs
4932 `(("gdk-pixbuf" ,gdk-pixbuf)
4933 ("cairo" ,cairo)))
4934 (native-inputs
4935 `(("pkg-config" ,pkg-config)
4936 ("python-sphinx" ,python-sphinx)
f3b98f4f 4937 ("python-docutils" ,python-docutils)))
9e099723
FB
4938 (propagated-inputs
4939 `(("python-xcffib" ,python-xcffib))) ; used at run time
4940 (arguments
a792e1aa
MB
4941 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4942 #:tests? #f
4943 #:phases
6734c7ba
MB
4944 (modify-phases %standard-phases
4945 (add-after 'install 'install-doc
4946 (lambda* (#:key inputs outputs #:allow-other-keys)
4947 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4948 (doc (string-append data "/doc/" ,name "-" ,version))
4949 (html (string-append doc "/html")))
4950 (setenv "LD_LIBRARY_PATH"
4951 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4952 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4953 (setenv "LANG" "en_US.UTF-8")
4954 (mkdir-p html)
4955 (for-each (lambda (file)
4956 (copy-file (string-append "." file)
4957 (string-append doc file)))
4958 '("/README.rst" "/CHANGES" "/LICENSE"))
4959 (system* "python" "setup.py" "build_sphinx")
4960 (copy-recursively "docs/_build/html" html)
4961 #t))))))
3015d455 4962 (home-page "https://github.com/Kozea/cairocffi")
9e099723
FB
4963 (synopsis "Python bindings and object-oriented API for Cairo")
4964 (description
4965 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4966Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4967graphics library with support for multiple backends including image buffers,
4968PNG, PostScript, PDF, and SVG file output.")
3f641af0 4969 (license license:bsd-3)))
9e099723
FB
4970
4971(define-public python2-cairocffi
4972 (package-with-python2 python-cairocffi))
4973
3cff95cb
RW
4974(define-public python-decorator
4975 (package
4976 (name "python-decorator")
d79fa7da 4977 (version "4.0.10")
3cff95cb
RW
4978 (source
4979 (origin
4980 (method url-fetch)
e21338be 4981 (uri (pypi-uri "decorator" version))
3cff95cb 4982 (sha256
d79fa7da 4983 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
3cff95cb
RW
4984 (build-system python-build-system)
4985 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4986 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4987 (synopsis "Python module to simplify usage of decorators")
4988 (description
4989 "The aim of the decorator module is to simplify the usage of decorators
4990for the average programmer, and to popularize decorators usage giving examples
4991of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4992etc. The core of this module is a decorator factory.")
4993 (license license:expat)))
4994
4995(define-public python2-decorator
4996 (package-with-python2 python-decorator))
4997
2c0499ad
RW
4998(define-public python-drmaa
4999 (package
5000 (name "python-drmaa")
7c427932 5001 (version "0.7.7")
2c0499ad
RW
5002 (source
5003 (origin
5004 (method url-fetch)
d92621cf 5005 (uri (pypi-uri "drmaa" version))
2c0499ad 5006 (sha256
7c427932 5007 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
2c0499ad
RW
5008 (build-system python-build-system)
5009 ;; The test suite requires libdrmaa which is provided by the cluster
5010 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5011 ;; should be set to the path of the libdrmaa library.
5012 (arguments '(#:tests? #f))
5013 (native-inputs
f3b98f4f 5014 `(("python-nose" ,python-nose)))
2c0499ad
RW
5015 (home-page "https://pypi.python.org/pypi/drmaa")
5016 (synopsis "Python bindings for the DRMAA library")
5017 (description
5018 "A Python package for Distributed Resource Management (DRM) job
5019submission and control. This package is an implementation of the DRMAA 1.0
5020Python language binding specification.")
3f641af0 5021 (license license:bsd-3)))
2c0499ad
RW
5022
5023(define-public python2-drmaa
5024 (package-with-python2 python-drmaa))
5025
d05c6da0
RW
5026(define-public python-gridmap
5027 (package
5028 (name "python-gridmap")
5029 (version "0.13.0")
5030 (source
5031 (origin
5032 (method url-fetch)
5033 (uri (string-append
5034 "https://github.com/pygridtools/gridmap/archive/v"
5035 version ".tar.gz"))
5036 (file-name (string-append name "-" version ".tar.gz"))
5037 (sha256
5038 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
5039 (build-system python-build-system)
ad348f9f
MB
5040 (arguments
5041 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
f22efa01 5042 (propagated-inputs
d05c6da0
RW
5043 `(("python-psutil" ,python-psutil)
5044 ("python-drmaa" ,python-drmaa)
5045 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
5046 (home-page "https://github.com/pygridtools/gridmap")
5047 (synopsis "Create jobs on a cluster directly from Python")
5048 (description
5049 "Gridmap is a Python package to allow you to easily create jobs on the
5050cluster directly from Python. You can directly map Python functions onto the
5051cluster without needing to write any wrapper code yourself.")
3f641af0 5052 (license license:gpl3+)))
d05c6da0
RW
5053
5054(define-public python2-gridmap
5055 (package-with-python2 python-gridmap))
5056
cb6d5c54
RW
5057(define-public python-pexpect
5058 (package
5059 (name "python-pexpect")
ed118043 5060 (version "4.2.1")
cb6d5c54
RW
5061 (source
5062 (origin
5063 (method url-fetch)
ed118043 5064 (uri (pypi-uri "pexpect" version))
cb6d5c54 5065 (sha256
ed118043 5066 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
cb6d5c54
RW
5067 (build-system python-build-system)
5068 (arguments
5069 `(#:phases
5070 (modify-phases %standard-phases
ed118043
MB
5071 (add-before 'check 'prepare-tests
5072 (lambda _
5073 (substitute* (find-files "tests")
5074 (("/bin/ls") (which "ls"))
5075 (("/bin/echo") (which "echo"))
5076 (("/bin/which") (which "which"))
5077 ;; Many tests try to use the /bin directory which
5078 ;; is not present in the build environment.
5079 ;; Use one that's non-empty and unlikely to change.
5080 (("/bin'") "/dev'"))
5081 ;; XXX: Socket connection test gets "Connection reset by peer".
5082 ;; Why does it not work? Delete for now.
5083 (delete-file "tests/test_socket.py")
5084 #t))
3ee9355e 5085 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
cb6d5c54 5086 (native-inputs
ed118043 5087 `(("python-nose" ,python-nose)
350a3084 5088 ("python-pytest" ,python-pytest-3.0)
ed118043
MB
5089 ("man-db" ,man-db)
5090 ("which" ,which)))
5091 (propagated-inputs
5092 `(("python-ptyprocess" ,python-ptyprocess)))
cb6d5c54
RW
5093 (home-page "http://pexpect.readthedocs.org/")
5094 (synopsis "Controlling interactive console applications")
5095 (description
5096 "Pexpect is a pure Python module for spawning child applications;
5097controlling them; and responding to expected patterns in their output.
5098Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5099child application and control it as if a human were typing commands.")
3f641af0 5100 (license license:isc)))
cb6d5c54
RW
5101
5102(define-public python2-pexpect
5103 (package-with-python2 python-pexpect))
5104
229ad120
RW
5105(define-public python-setuptools-scm
5106 (package
5107 (name "python-setuptools-scm")
5b1f31ff 5108 (version "1.15.0")
229ad120
RW
5109 (source (origin
5110 (method url-fetch)
383af6b0 5111 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
5112 (sha256
5113 (base32
5b1f31ff 5114 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
229ad120
RW
5115 (build-system python-build-system)
5116 (home-page "https://github.com/pypa/setuptools_scm/")
5117 (synopsis "Manage Python package versions in SCM metadata")
5118 (description
383af6b0 5119 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
5120@dfn{software configuration management} (SCM) metadata instead of declaring
5121them as the version argument or in a SCM managed file.")
5122 (license license:expat)))
5123
5124(define-public python2-setuptools-scm
5125 (package-with-python2 python-setuptools-scm))
5126
b74270ee
RW
5127(define-public python-pathpy
5128 (package
5129 (name "python-pathpy")
5130 (version "8.1.1")
5131 (source
5132 (origin
5133 (method url-fetch)
5134 (uri (string-append "https://pypi.python.org/packages/source/p/"
5135 "path.py/path.py-" version ".tar.gz"))
5136 (sha256
5137 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 5138 (outputs '("out" "doc"))
b74270ee
RW
5139 (build-system python-build-system)
5140 (propagated-inputs
5141 `(("python-appdirs" ,python-appdirs)))
5142 (native-inputs
f3b98f4f 5143 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
5144 ("python-sphinx" ,python-sphinx)
5145 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
5146 ("python-pytest" ,python-pytest)
5147 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
5148 (arguments
5149 `(#:phases
5150 (modify-phases %standard-phases
5151 (add-after 'build 'build-doc
5152 (lambda _
5153 (setenv "LANG" "en_US.UTF-8")
5154 (zero? (system* "python" "setup.py" "build_sphinx"))))
5155 (add-after 'install 'install-doc
5156 (lambda* (#:key outputs #:allow-other-keys)
5157 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5158 (doc (string-append data "/doc/" ,name "-" ,version))
5159 (html (string-append doc "/html")))
5160 (mkdir-p html)
5161 (for-each (lambda (file)
5162 (copy-file file (string-append doc "/" file)))
5163 '("README.rst" "CHANGES.rst"))
5164 (copy-recursively "build/sphinx/html" html)))))))
7bf837fd 5165 (home-page "https://github.com/jaraco/path.py")
b74270ee
RW
5166 (synopsis "Python module wrapper for built-in os.path")
5167 (description
5168 "@code{path.py} implements path objects as first-class entities, allowing
5169common operations on files to be invoked on those path objects directly.")
5170 (license license:expat)))
5171
5172(define-public python2-pathpy
5173 (package-with-python2 python-pathpy))
5174
0d34e01b
RW
5175(define-public python-pickleshare
5176 (package
5177 (name "python-pickleshare")
5178 (version "0.5")
5179 (source
5180 (origin
5181 (method url-fetch)
5182 (uri (string-append "https://pypi.python.org/packages/source/p/"
5183 "pickleshare/pickleshare-" version ".tar.gz"))
5184 (sha256
5185 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5186 (build-system python-build-system)
5187 (propagated-inputs
5188 `(("python-pathpy" ,python-pathpy)))
5189 (home-page "https://github.com/vivainio/pickleshare")
5190 (synopsis "Tiny key value database with concurrency support")
5191 (description
5192 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5193Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5194shelve, many processes can access the database simultaneously. Changing a
5195value in database is immediately visible to other processes accessing the same
5196database. Concurrency is possible because the values are stored in separate
5197files. Hence the “database” is a directory where all files are governed by
5198PickleShare.")
5199 (license license:expat)))
5200
5201(define-public python2-pickleshare
5202 (package-with-python2 python-pickleshare))
5203
cd6e5189
RW
5204(define-public python-simplegeneric
5205 (package
5206 (name "python-simplegeneric")
5207 (version "0.8.1")
5208 (source
5209 (origin
5210 (method url-fetch)
5211 (uri (string-append "https://pypi.python.org/packages/source/s/"
5212 "simplegeneric/simplegeneric-" version ".zip"))
5213 (sha256
5214 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5215 (build-system python-build-system)
5216 (native-inputs
f3b98f4f 5217 `(("unzip" ,unzip)))
cd6e5189
RW
5218 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5219 (synopsis "Python module for simple generic functions")
5220 (description
5221 "The simplegeneric module lets you define simple single-dispatch generic
5222functions, akin to Python’s built-in generic functions like @code{len()},
5223@code{iter()} and so on. However, instead of using specially-named methods,
5224these generic functions use simple lookup tables, akin to those used by
5225e.g. @code{pickle.dump()} and other generic functions found in the Python
5226standard library.")
3f641af0 5227 (license license:zpl2.1)))
cd6e5189
RW
5228
5229(define-public python2-simplegeneric
5230 (package-with-python2 python-simplegeneric))
5231
ddc7d8ed 5232(define-public python-ipython-genutils
c4abbac3 5233 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
5234 (package
5235 (name "python-ipython-genutils")
5236 (version "0.1.0")
5237 (source
5238 (origin
5239 (method url-fetch)
5240 (uri (string-append "https://pypi.python.org/packages/source/i/"
5241 "ipython_genutils/ipython_genutils-"
5242 version ".tar.gz"))
5243 (sha256
5244 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5245 (build-system python-build-system)
5246 (arguments `(#:tests? #f)) ; no tests
5247 (home-page "http://ipython.org")
5248 (synopsis "Vestigial utilities from IPython")
5249 (description
c4abbac3
HG
5250 "This package provides retired utilities from IPython. No packages
5251outside IPython/Jupyter should depend on it.
5252
5253This package shouldn't exist. It contains some common utilities shared by
5254Jupyter and IPython projects during The Big Split. As soon as possible, those
5255packages will remove their dependency on this, and this package will go
5256away.")
3f641af0 5257 (license license:bsd-3)))
ddc7d8ed
RW
5258
5259(define-public python2-ipython-genutils
5260 (package-with-python2 python-ipython-genutils))
5261
2b10eb48
RW
5262(define-public python-traitlets
5263 (package
5264 (name "python-traitlets")
a5ba1481 5265 (version "4.2.0")
2b10eb48
RW
5266 (source
5267 (origin
5268 (method url-fetch)
cc0c4fde 5269 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
5270 (sha256
5271 (base32
a5ba1481 5272 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
5273 (build-system python-build-system)
5274 (arguments
5275 `(#:phases
5276 (modify-phases %standard-phases
5277 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5278 (propagated-inputs
5279 `(("python-ipython-genutils" ,python-ipython-genutils)
5280 ("python-decorator" ,python-decorator)))
5281 (native-inputs
cc0c4fde
EF
5282 `(("python-mock" ,python-mock)
5283 ("python-nose" ,python-nose)))
2b10eb48
RW
5284 (home-page "http://ipython.org")
5285 (synopsis "Configuration system for Python applications")
5286 (description
5287 "Traitlets is a framework that lets Python classes have attributes with
5288type checking, dynamically calculated default values, and ‘on change’
5289callbacks. The package also includes a mechanism to use traitlets for
5290configuration, loading values from files or from command line arguments. This
5291is a distinct layer on top of traitlets, so you can use traitlets in your code
5292without using the configuration machinery.")
3f641af0 5293 (license license:bsd-3)))
2b10eb48
RW
5294
5295(define-public python2-traitlets
5296 (package-with-python2 python-traitlets))
5297
4263b06f
RW
5298(define-public python-jupyter-core
5299 (package
5300 (name "python-jupyter-core")
45cc957c 5301 (version "4.2.1")
4263b06f
RW
5302 (source
5303 (origin
5304 (method url-fetch)
5305 (uri (string-append (pypi-uri "jupyter_core" version)))
5306 (sha256
5307 (base32
45cc957c 5308 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4263b06f
RW
5309 (build-system python-build-system)
5310 ;; FIXME: not sure how to run the tests
5311 (arguments `(#:tests? #f))
5312 (propagated-inputs
5313 `(("python-traitlets" ,python-traitlets)))
5314 (home-page "http://jupyter.org/")
5315 (synopsis "Jupyter base package")
5316 (description
5317 "Jupyter core is the base package on which Jupyter projects rely.")
5318 (license license:bsd-3)))
5319
5320(define-public python2-jupyter-core
5321 (package-with-python2 python-jupyter-core))
5322
9ff01f2d
RW
5323(define-public python-jupyter-client
5324 (package
5325 (name "python-jupyter-client")
5326 (version "4.4.0")
5327 (source
5328 (origin
5329 (method url-fetch)
5330 (uri (pypi-uri "jupyter_client" version))
5331 (sha256
5332 (base32
5333 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5334 (build-system python-build-system)
5335 ;; Tests fail because of missing native python kernel which I assume is
5336 ;; provided by the ipython package, which we cannot use because it would
5337 ;; cause a dependency cycle.
5338 (arguments `(#:tests? #f))
5339 (propagated-inputs
5340 `(("python-pyzmq" ,python-pyzmq)
5341 ("python-traitlets" ,python-traitlets)
5342 ("python-jupyter-core" ,python-jupyter-core)))
5343 (home-page "http://jupyter.org/")
5344 (synopsis "Jupyter protocol implementation and client libraries")
5345 (description
5346 "The @code{jupyter_client} package contains the reference implementation
5347of the Jupyter protocol. It also provides client and kernel management APIs
5348for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5349installing @code{kernelspec}s for use with Jupyter frontends.")
5350 (license license:bsd-3)))
5351
5352(define-public python2-jupyter-client
5353 (package-with-python2 python-jupyter-client))
5354
ab526102
RW
5355(define-public python-ipykernel
5356 (package
5357 (name "python-ipykernel")
f165648e 5358 (version "4.5.2")
ab526102
RW
5359 (source
5360 (origin
5361 (method url-fetch)
5362 (uri (pypi-uri "ipykernel" version))
5363 (sha256
f165648e 5364 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
ab526102
RW
5365 (build-system python-build-system)
5366 ;; The tests load a submodule of IPython. However, IPython itself depends
5367 ;; on ipykernel.
5368 (arguments `(#:tests? #f))
5369 (propagated-inputs
5370 ;; imported at runtime during connect
5371 `(("python-jupyter-client" ,python-jupyter-client)))
5372 (home-page "http://ipython.org")
5373 (synopsis "IPython Kernel for Jupyter")
5374 (description
5375 "This package provides the IPython kernel for Jupyter.")
5376 (license license:bsd-3)))
5377
5378(define-public python2-ipykernel
5379 (package-with-python2 python-ipykernel))
5380
5ff6effc
RW
5381(define-public python-testpath
5382 (package
5383 (name "python-testpath")
5384 (version "0.2")
5385 (source
5386 (origin
5387 (method url-fetch)
5388 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5389 version ".tar.gz"))
5390 (file-name (string-append name "-" version ".tar.gz"))
5391 (sha256
5392 (base32
5393 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5394 (build-system python-build-system)
5395 (arguments
5396 `(#:tests? #f ; this package does not even have a setup.py
b320f7bf
TD
5397 #:modules ((guix build python-build-system)
5398 (guix build utils)
5399 (srfi srfi-1))
5400 #:imported-modules (,@%python-build-system-modules
5401 (srfi srfi-1))
5ff6effc
RW
5402 #:phases
5403 (modify-phases %standard-phases
5404 (delete 'install)
5405 (replace 'build
b320f7bf
TD
5406 (lambda* (#:key inputs outputs #:allow-other-keys)
5407 (let* ((version (last
5408 (string-split (assoc-ref inputs "python") #\-)))
5409 (x.y (string-join (take (string-split version #\.) 2)
5410 "."))
5411 (dir (string-append
5412 (assoc-ref outputs "out")
5413 "/lib/python" x.y "/site-packages/testpath")))
5414 (mkdir-p dir)
5415 (copy-recursively "testpath" dir))
5416 #t)))))
5ff6effc
RW
5417 (home-page "https://github.com/takluyver/testpath")
5418 (synopsis "Test utilities for code working with files and commands")
5419 (description
5420 "Testpath is a collection of utilities for Python code working with files
5421and commands. It contains functions to check things on the filesystem, and
5422tools for mocking system commands and recording calls to those.")
5423 (license license:expat)))
5424
5425(define-public python2-testpath
5426 (package-with-python2 python-testpath))
5427
ae1ab9fe
FB
5428(define-public python-ipython
5429 (package
5430 (name "python-ipython")
fb25d348 5431 (version "5.2.2")
ae1ab9fe
FB
5432 (source
5433 (origin
fceac880 5434 (method url-fetch)
accd5f99 5435 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 5436 (sha256
fb25d348 5437 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
ae1ab9fe
FB
5438 (build-system python-build-system)
5439 (outputs '("out" "doc"))
3a0b1b9a
FB
5440 (propagated-inputs
5441 `(("python-pyzmq" ,python-pyzmq)
fb25d348 5442 ("python-prompt-toolkit" ,python-prompt-toolkit)
accd5f99 5443 ("python-terminado" ,python-terminado)
ae1ab9fe 5444 ("python-matplotlib" ,python-matplotlib)
5d26e542 5445 ("python-numpy" ,python-numpy)
ae1ab9fe 5446 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
5447 ("python-jinja2" ,python-jinja2)
5448 ("python-mistune" ,python-mistune)
accd5f99
RW
5449 ("python-pexpect" ,python-pexpect)
5450 ("python-pickleshare" ,python-pickleshare)
5451 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 5452 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
5453 ("python-traitlets" ,python-traitlets)
5454 ("python-ipykernel" ,python-ipykernel)
fb25d348 5455 ("python-nbformat" ,python-nbformat)
accd5f99
RW
5456 ("python-pygments" ,python-pygments)))
5457 (inputs
5458 `(("readline" ,readline)
5459 ("which" ,which)))
ae1ab9fe 5460 (native-inputs
fb25d348
TD
5461 `(("graphviz" ,graphviz)
5462 ("pkg-config" ,pkg-config)
accd5f99
RW
5463 ("python-requests" ,python-requests) ;; for tests
5464 ("python-testpath" ,python-testpath)
5465 ("python-nose" ,python-nose)
ae1ab9fe 5466 ("python-sphinx" ,python-sphinx)
fb25d348 5467 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
ae1ab9fe 5468 ("texlive" ,texlive)
f3b98f4f 5469 ("texinfo" ,texinfo)))
ae1ab9fe 5470 (arguments
89b5c60e 5471 `(#:phases
3a0b1b9a
FB
5472 (modify-phases %standard-phases
5473 (add-after
5474 'install 'install-doc
5475 (lambda* (#:key inputs outputs #:allow-other-keys)
5476 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5477 (doc (string-append data "/doc/" ,name "-" ,version))
5478 (html (string-append doc "/html"))
5479 (man1 (string-append data "/man/man1"))
5480 (info (string-append data "/info"))
fb25d348
TD
5481 (examples (string-append doc "/examples"))
5482 (python-arg (string-append "PYTHON=" (which "python"))))
afd3d931 5483 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
5484 ;; Make installed package available for running the tests
5485 (add-installed-pythonpath inputs outputs)
3a0b1b9a 5486 (with-directory-excursion "docs"
accd5f99
RW
5487 ;; FIXME: pdf fails to build
5488 ;;(system* "make" "pdf" "PAPER=a4")
fb25d348
TD
5489 (system* "make" python-arg "html")
5490 (system* "make" python-arg "info"))
3a0b1b9a
FB
5491 (copy-recursively "docs/man" man1)
5492 (copy-recursively "examples" examples)
accd5f99 5493 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
5494 ;; (copy-file "docs/build/latex/ipython.pdf"
5495 ;; (string-append doc "/ipython.pdf"))
5496 (mkdir-p info)
5497 (copy-file "docs/build/texinfo/ipython.info"
5498 (string-append info "/ipython.info"))
5499 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5500 ;; Tests can only be run after the library has been installed and not
5501 ;; within the source directory.
5502 (delete 'check)
5503 (add-after
5504 'install 'check
eee5cd04 5505 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
5506 (if tests?
5507 (with-directory-excursion "/tmp"
eee5cd04
HG
5508 ;; Make installed package available for running the tests
5509 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
5510 (setenv "HOME" "/tmp/") ;; required by a test
5511 (zero? (system* (string-append (assoc-ref outputs "out")
5512 "/bin/iptest"))))
5513 #t)))
5514 (add-before
5515 'install 'fix-tests
5516 (lambda* (#:key inputs #:allow-other-keys)
5517 (substitute* "./IPython/utils/_process_posix.py"
5518 (("/usr/bin/env', 'which") (which "which")))
5519 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5520 (("#!/usr/bin/env python")
5521 (string-append "#!" (which "python"))))
5522 ;; Disable 1 failing test
5523 (substitute* "./IPython/core/tests/test_magic.py"
5524 (("def test_dirops\\(\\):" all)
5525 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
5526 (home-page "http://ipython.org")
5527 (synopsis "IPython is a tool for interactive computing in Python")
5528 (description
5529 "IPython provides a rich architecture for interactive computing with:
5530Powerful interactive shells, a browser-based notebook, support for interactive
5531data visualization, embeddable interpreters and tools for parallel
5532computing.")
135ba811
EF
5533 (license license:bsd-3)
5534 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
5535
5536(define-public python2-ipython
135ba811 5537 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
5538 (package
5539 (inherit ipython)
3a0b1b9a 5540 ;; FIXME: add pyreadline once available.
fb25d348
TD
5541 (propagated-inputs
5542 `(("python2-backports-shutil-get-terminal-size"
5543 ,python2-backports-shutil-get-terminal-size)
5544 ("python2-pathlib2" ,python2-pathlib2)
5545 ,@(package-propagated-inputs ipython)))
e62600fe 5546 (native-inputs
135ba811 5547 `(("python2-mock" ,python2-mock)
77a6932a 5548 ,@(package-native-inputs ipython))))))
03411993
AE
5549
5550(define-public python-isodate
5551 (package
5552 (name "python-isodate")
b6785c2e 5553 (version "0.5.4")
03411993
AE
5554 (source
5555 (origin
5556 (method url-fetch)
b6785c2e 5557 (uri (pypi-uri "isodate" version))
03411993
AE
5558 (sha256
5559 (base32
b6785c2e 5560 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 5561 (build-system python-build-system)
03411993
AE
5562 (home-page
5563 "http://cheeseshop.python.org/pypi/isodate")
5564 (synopsis
5565 "Python date parser and formatter")
5566 (description
5567 "Python-isodate is a python module for parsing and formatting
5568ISO 8601 dates, time and duration.")
3f641af0 5569 (license license:bsd-3)))
03411993
AE
5570
5571(define-public python2-isodate
5572 (package-with-python2 python-isodate))
673ab897
AE
5573
5574(define-public python-html5lib
5575 (package
5576 (name "python-html5lib")
a14061aa 5577 (version "1.0b10")
673ab897
AE
5578 (source
5579 (origin
5580 (method url-fetch)
fee04c19 5581 (uri (pypi-uri "html5lib" version))
673ab897
AE
5582 (sha256
5583 (base32
a14061aa 5584 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 5585 (build-system python-build-system)
3dd75476 5586 (propagated-inputs
4eb6ed28
MB
5587 `(("python-six" ,python-six)
5588 ("python-webencodings" ,python-webencodings)))
673ab897
AE
5589 (arguments
5590 `(#:test-target "check"))
5591 (home-page
5592 "https://github.com/html5lib/html5lib-python")
5593 (synopsis
5594 "Python HTML parser based on the WHATWG HTML specifcation")
5595 (description
5596 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5597and written in Python.")
bd3fa666 5598 (license license:expat)))
673ab897
AE
5599
5600(define-public python2-html5lib
5601 (package-with-python2 python-html5lib))
e99f4211 5602
8ee62c97
RW
5603;; Needed for python-bleach, a dependency of python-notebook
5604(define-public python-html5lib-0.9
5605 (package
5606 (inherit python-html5lib)
5607 (version "0.999")
5608 (source
5609 (origin
5610 (method url-fetch)
5611 (uri (pypi-uri "html5lib" version))
5612 (sha256
5613 (base32
5614 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5615
5616(define-public python2-html5lib-0.9
5617 (package-with-python2 python-html5lib-0.9))
5618
adbca19e
MB
5619(define-public python-webencodings
5620 (package
5621 (name "python-webencodings")
5622 (version "0.5")
5623 (source (origin
5624 (method url-fetch)
5625 (uri (pypi-uri "webencodings" version))
5626 (sha256
5627 (base32
5628 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5629 (build-system python-build-system)
5630 (arguments
5631 '(#:phases
5632 (modify-phases %standard-phases
5633 (replace 'check
5634 (lambda _
5635 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5636 (native-inputs
5637 `(("python-pytest" ,python-pytest)))
5638 (home-page "https://github.com/SimonSapin/python-webencodings")
5639 (synopsis "Character encoding aliases for legacy web content")
5640 (description
5641 "In order to be compatible with legacy web content when interpreting
5642something like @code{Content-Type: text/html; charset=latin1}, tools need
5643to use a particular set of aliases for encoding labels as well as some
5644overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5645the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5646or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5647The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5648defines all such details so that implementations do not have to
5649reverse-engineer each other.
5650
5651This module implements the Encoding standard and has encoding labels and
5652BOM detection, but the actual implementation for encoders and decoders
5653is Python’s.")
5654 (license license:bsd-3)))
5655
5656(define-public python2-webencodings
5657 (package-with-python2 python-webencodings))
5658
e99f4211
MW
5659(define-public python-urwid
5660 (package
5661 (name "python-urwid")
51ff41f6 5662 (version "1.3.1")
e99f4211
MW
5663 (source
5664 (origin
5665 (method url-fetch)
b97c1bfd 5666 (uri (pypi-uri "urwid" version))
e99f4211
MW
5667 (sha256
5668 (base32
51ff41f6 5669 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5670 (build-system python-build-system)
b97c1bfd
LF
5671 (arguments
5672 `(#:phases
5673 (modify-phases %standard-phases
5674 ;; Disable failing test. Bug filed upstream:
5675 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5676 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5677 (add-after 'unpack 'disable-failing-test
5678 (lambda _
5679 (substitute* "urwid/tests/test_event_loops.py"
5680 (("test_remove_watch_file")
5681 "disable_remove_watch_file")))))))
e99f4211
MW
5682 (home-page "http://urwid.org")
5683 (synopsis "Console user interface library for Python")
5684 (description
5685 "Urwid is a curses-based UI/widget library for Python. It includes many
5686features useful for text console applications.")
3f641af0 5687 (license license:lgpl2.1+)))
e99f4211
MW
5688
5689(define-public python2-urwid
e9379305
MC
5690 (let ((python2-urwid (package-with-python2 python-urwid)))
5691 (package
5692 (inherit python2-urwid)
5693 (arguments
5694 (append
5695 '(#:phases
5696 (modify-phases %standard-phases
5697 ;; Disable the vterm tests because of non-deterministic failures
5698 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
5699 (add-after 'unpack 'delete-test_vterm.py
5700 (delete-file "urwid/tests/test_vterm.py"))))
5701 (package-arguments python-urwid))))))
d95a56c6 5702
5220022a
JL
5703(define-public python-openid
5704 (package
5705 (name "python-openid")
5706 (version "3.0.10")
5707 (source
5708 (origin
5709 (method url-fetch)
5710 (uri (pypi-uri "python3-openid" version))
5711 (sha256
5712 (base32
5713 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5714 (build-system python-build-system)
0660d327
DM
5715 (arguments
5716 `(#:phases
5717 (modify-phases %standard-phases
5718 (replace 'check
5719 (lambda _
5720 (zero? (system* "./admin/runtests")))))))
f048db5a 5721 (properties `((python2-variant . ,(delay python2-openid))))
0660d327
DM
5722 (propagated-inputs
5723 `(("python-defusedxml" ,python-defusedxml)))
5724 (native-inputs
5725 `(("python-psycopg2" ,python-psycopg2)
5726 ("python-django" ,python-django)))
5220022a
JL
5727 (home-page "https://github.com/necaris/python3-openid")
5728 (synopsis "OpenID support for servers and consumers")
5729 (description "This library provides OpenID authentication for Python, both
5730for clients and servers.")
5731 (license license:asl2.0)))
5732
3ef00f56 5733(define-public python2-openid
5734 (package
5735 (name "python2-openid")
5736 (version "2.2.5")
5737 (source
5738 (origin
5739 (method url-fetch)
5740 (uri (pypi-uri "python-openid" version))
5741 (sha256
5742 (base32
5743 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5744 (build-system python-build-system)
5745 (arguments
5746 ;; Python 3 support is in `python3-openid`, a separate package.
5747 `(#:python ,python-2))
5748 (home-page "https://github.com/openid/python-openid")
5749 (synopsis "OpenID support for servers and consumers")
5750 (description "This library provides OpenID authentication for Python, both
5751for clients and servers.")
5752 (license license:asl2.0)))
5753
47d0b292
TS
5754(define-public python-urwidtrees
5755 (package
5756 (name "python-urwidtrees")
37ec4623 5757 (version "1.0.2")
47d0b292
TS
5758 (source
5759 (origin
5760 (method url-fetch)
37ec4623
TS
5761 ;; package author intends on distributing via github rather than pypi:
5762 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5763 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5764 version ".tar.gz"))
5765 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5766 (sha256
5767 (base32
37ec4623 5768 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5769 (build-system python-build-system)
5770 (arguments
5771 '(#:tests? #f)) ; no tests
f22efa01 5772 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5773 (home-page "https://github.com/pazz/urwidtrees")
5774 (synopsis "Tree widgets for urwid")
5775 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5776toolkit. Use it to build trees of widgets.")
3f641af0 5777 (license license:gpl3+)))
47d0b292
TS
5778
5779(define-public python2-urwidtrees
5780 (package-with-python2 python-urwidtrees))
5781
d95a56c6
PAR
5782(define-public python-dbus
5783 (package
5784 (name "python-dbus")
5785 (version "1.2.0")
5786 (source
5787 (origin
5788 (method url-fetch)
5789 (uri (string-append
5cc3096c 5790 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5791 version ".tar.gz"))
5792 (sha256
5793 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5794 (build-system gnu-build-system)
6717c879
SB
5795 (arguments
5796 '(#:phases
5797 (modify-phases %standard-phases
5798 (add-before
5799 'check 'pre-check
5800 (lambda _
5801 ;; XXX: For the missing '/etc/machine-id'.
5802 (substitute* "test/run-test.sh"
5803 (("DBUS_FATAL_WARNINGS=1")
5804 "DBUS_FATAL_WARNINGS=0"))
5805 #t)))))
d95a56c6
PAR
5806 (native-inputs
5807 `(("pkg-config" ,pkg-config)))
5808 (inputs
5809 `(("python" ,python)
2e88d113 5810 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5811 (synopsis "Python bindings for D-bus")
5812 (description "python-dbus provides bindings for libdbus, the reference
5813implementation of D-Bus.")
5814 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5815 (license license:expat)))
b52af02b
MW
5816
5817(define-public python2-dbus
5818 (package (inherit python-dbus)
5819 (name "python2-dbus")
5820 (inputs `(("python" ,python-2)
5821 ,@(alist-delete "python"
5822 (package-inputs python-dbus)
5823 equal?)))
5824 ;; FIXME: on Python 2, the test_utf8 fails with:
5825 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5826 (arguments `(#:tests? #f))))
a6ac8332
AE
5827
5828(define-public python-apsw
5829 (package
5830 (name "python-apsw")
917708c2 5831 (version "3.9.2-r1")
a6ac8332
AE
5832 (source
5833 (origin
5834 (method url-fetch)
917708c2 5835 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5836 (sha256
5837 (base32
917708c2 5838 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5839 (build-system python-build-system)
5840 (inputs
f3b98f4f 5841 `(("sqlite" ,sqlite)))
a6ac8332
AE
5842 (arguments
5843 `(#:phases
154d207c
MB
5844 (modify-phases %standard-phases
5845 (delete 'check)
5846 (add-after 'install 'check
5847 (lambda* (#:key inputs outputs #:allow-other-keys)
5848 (add-installed-pythonpath inputs outputs)
5849 (zero? (system* "python" "setup.py" "test")))))))
a6ac8332
AE
5850 (home-page "https://github.com/rogerbinns/apsw/")
5851 (synopsis "Another Python SQLite Wrapper")
5852 (description "APSW is a Python wrapper for the SQLite
5853embedded relational database engine. In contrast to other wrappers such as
5854pysqlite it focuses on being a minimal layer over SQLite attempting just to
5855translate the complete SQLite API into Python.")
abde5f37 5856 (license license:zlib)))
a6ac8332
AE
5857
5858(define-public python2-apsw
5859 (package-with-python2 python-apsw))
26b307e2
AE
5860
5861(define-public python-lxml
5862 (package
5863 (name "python-lxml")
d58a3203 5864 (version "3.6.0")
26b307e2
AE
5865 (source
5866 (origin
5867 (method url-fetch)
97bbc480 5868 (uri (pypi-uri "lxml" version))
26b307e2 5869 (sha256
d58a3203
EF
5870 (base32
5871 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5872 (build-system python-build-system)
5873 (inputs
5874 `(("libxml2" ,libxml2)
f3b98f4f 5875 ("libxslt" ,libxslt)))
26b307e2
AE
5876 (home-page "http://lxml.de/")
5877 (synopsis
5878 "Python XML processing library")
5879 (description
5880 "The lxml XML toolkit is a Pythonic binding for the C libraries
5881libxml2 and libxslt.")
3f641af0 5882 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5883
5884(define-public python2-lxml
5885 (package-with-python2 python-lxml))
4ed20663 5886
b32a1e47
CAW
5887;; beautifulsoup4 has a totally different namespace than 3.x,
5888;; and pypi seems to put it under its own name, so I guess we should too
5889(define-public python-beautifulsoup4
5890 (package
5891 (name "python-beautifulsoup4")
80e8d851 5892 (version "4.5.3")
b32a1e47
CAW
5893 (source
5894 (origin
5895 (method url-fetch)
5896 (uri (pypi-uri "beautifulsoup4" version))
5897 (sha256
5898 (base32
80e8d851 5899 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
b32a1e47 5900 (build-system python-build-system)
5f37f0b6
LF
5901 (arguments
5902 `(#:phases
5903 (modify-phases %standard-phases
5904 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5905 ;; must use this conversion script when building with Python 3. The
5906 ;; conversion script also runs the tests.
5907 ;; For more information, see the file 'convert-py3k' in the source
5908 ;; distribution.
5909 (replace 'check
5910 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5911 (home-page
5912 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5913 (synopsis
5914 "Python screen-scraping library")
5915 (description
5916 "Beautiful Soup is a Python library designed for rapidly setting up
5917screen-scraping projects. It offers Pythonic idioms for navigating,
5918searching, and modifying a parse tree, providing a toolkit for
5919dissecting a document and extracting what you need. It automatically
5920converts incoming documents to Unicode and outgoing documents to UTF-8.")
ee94ca11
MB
5921 (license license:expat)
5922 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
b32a1e47
CAW
5923
5924(define-public python2-beautifulsoup4
5925 (package
5926 (inherit (package-with-python2
5927 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5928 (arguments `(#:python ,python-2))))
b32a1e47 5929
4dcb135e 5930(define-public python-cssutils
092e86f5 5931 (package
4dcb135e 5932 (name "python-cssutils")
58d1d816 5933 (version "1.0.1")
092e86f5
AE
5934 (source
5935 (origin
5936 (method url-fetch)
58d1d816 5937 (uri (pypi-uri "cssutils" version))
092e86f5 5938 (sha256
58d1d816
EF
5939 (base32
5940 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5941 (build-system python-build-system)
5942 (native-inputs
4dcb135e 5943 `(("unzip" ,unzip))) ; for unpacking the source
092e86f5 5944 (arguments
4dcb135e 5945 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
092e86f5
AE
5946 (home-page "http://cthedot.de/cssutils/")
5947 (synopsis
5948 "CSS Cascading Style Sheets library for Python")
5949 (description
5950 "Cssutils is a Python package for parsing and building CSS
5951Cascading Style Sheets. Currently it provides a DOM only and no rendering
5952options.")
3f641af0 5953 (license license:lgpl3+)))
880ff77c 5954
4dcb135e
EB
5955(define-public python2-cssutils
5956 (package-with-python2 python-cssutils))
5957
880ff77c
AE
5958(define-public python-cssselect
5959 (package
5960 (name "python-cssselect")
d5ccd9ab 5961 (version "0.9.2")
880ff77c
AE
5962 (source
5963 (origin
5964 (method url-fetch)
d5ccd9ab 5965 (uri (pypi-uri "cssselect" version))
880ff77c 5966 (sha256
d5ccd9ab
EF
5967 (base32
5968 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5969 (build-system python-build-system)
880ff77c
AE
5970 (arguments
5971 ;; tests fail with message
5972 ;; AttributeError: 'module' object has no attribute 'tests'
5973 `(#:tests? #f))
5974 (home-page
5975 "https://pythonhosted.org/cssselect/")
5976 (synopsis
5977 "CSS3 selector parser and translator to XPath 1.0")
5978 (description
5979 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5980them to XPath 1.0 expressions. Such expressions can be used in lxml or
5981another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5982 (license license:bsd-3)))
880ff77c
AE
5983
5984(define-public python2-cssselect
5985 (package-with-python2 python-cssselect))
60357f99 5986
03702173 5987(define-public python-openid-cla
5988 (package
5989 (name "python-openid-cla")
5990 (version "1.2")
5991 (source
5992 (origin
5993 (method url-fetch)
5994 (uri (pypi-uri "python-openid-cla" version))
5995 (sha256
5996 (base32
5997 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5998 (build-system python-build-system)
019ccdb6 5999 (arguments '(#:tests? #f)) ; No tests.
03702173 6000 (home-page "https://github.com/puiterwijk/python-openid-cla/")
6001 (synopsis "Implementation of the OpenID CLA extension for python-openid")
6002 (description "@code{openid-cla} is an implementation of the OpenID
6003contributor license agreement extension for python-openid.")
6004 (license license:bsd-3)))
6005
6006(define-public python2-openid-cla
6007 (package-with-python2 python-openid-cla))
6008
a0e41de4 6009(define-public python-openid-teams
6010 (package
6011 (name "python-openid-teams")
6012 (version "1.1")
6013 (source
6014 (origin
6015 (method url-fetch)
6016 (uri (pypi-uri "python-openid-teams" version))
6017 (sha256
6018 (base32
6019 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
6020 (build-system python-build-system)
ac72d3d2 6021 (arguments '(#:tests? #f)) ; No tests.
a0e41de4 6022 (home-page "https://github.com/puiterwijk/python-openid-teams/")
6023 (synopsis "Implementation of the OpenID teams extension for python-openid")
6024 (description
6025 "@code{openid-teams} is an implementation of the OpenID
6026teams extension for python-openid.")
6027 (license license:bsd-3)))
6028
6029(define-public python2-openid-teams
6030 (package-with-python2 python-openid-teams))
6031
60357f99
AE
6032(define-public python-netifaces
6033 (package
6034 (name "python-netifaces")
6035 (version "0.10.4")
6036 (source
6037 (origin
6038 (method url-fetch)
6039 (uri (string-append
6040 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
6041 version
6042 ".tar.gz"))
6043 (sha256
6044 (base32
6045 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
6046 (build-system python-build-system)
60357f99
AE
6047 (home-page
6048 "https://bitbucket.org/al45tair/netifaces")
6049 (synopsis
6050 "Python module for portable network interface information")
6051 (description
6052 "Netifaces is a Python module providing information on network
6053interfaces in an easy and portable manner.")
6054 (license license:expat)))
6055
6056(define-public python2-netifaces
6057 (package-with-python2 python-netifaces))
92cb152b 6058
32f77c04
RW
6059(define-public python-networkx
6060 (package
6061 (name "python-networkx")
a4d9609c 6062 (version "1.11")
32f77c04
RW
6063 (source
6064 (origin
6065 (method url-fetch)
a4d9609c 6066 (uri (pypi-uri "networkx" version))
32f77c04 6067 (sha256
a4d9609c 6068 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
6069 (build-system python-build-system)
6070 ;; python-decorator is needed at runtime
6071 (propagated-inputs
6072 `(("python-decorator" ,python-decorator)))
6073 (native-inputs
f3b98f4f 6074 `(("python-nose" ,python-nose)))
32f77c04
RW
6075 (home-page "http://networkx.github.io/")
6076 (synopsis "Python module for creating and manipulating graphs and networks")
6077 (description
6078 "NetworkX is a Python package for the creation, manipulation, and study
6079of the structure, dynamics, and functions of complex networks.")
3f641af0 6080 (license license:bsd-3)))
32f77c04
RW
6081
6082(define-public python2-networkx
6083 (package-with-python2 python-networkx))
6084
92cb152b
RW
6085(define-public snakemake
6086 (package
6087 (name "snakemake")
ef71ed8f 6088 (version "3.11.2")
92cb152b
RW
6089 (source
6090 (origin
6091 (method url-fetch)
7b93d866 6092 (uri (pypi-uri "snakemake" version))
92cb152b 6093 (sha256
ef71ed8f 6094 (base32 "0qcp7y9csvanyzh08jppryhd5di8r1z7p0d4wkfg5591pj3bb8zp"))))
92cb152b 6095 (build-system python-build-system)
7b93d866
MB
6096 (arguments
6097 ;; TODO: Package missing test dependencies.
e61bc976
RW
6098 '(#:tests? #f
6099 #:phases
6100 (modify-phases %standard-phases
6101 ;; For cluster execution Snakemake will call Python. Since there is
6102 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6103 ;; this by calling the snakemake wrapper instead.
6104 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6105 (lambda* (#:key outputs #:allow-other-keys)
6106 (substitute* "snakemake/executors.py"
6107 (("\\{sys.executable\\} -m snakemake")
6108 (string-append (assoc-ref outputs "out")
6109 "/bin/snakemake")))
6110 #t)))))
4f9998c6
RW
6111 (propagated-inputs
6112 `(("python-wrapt" ,python-wrapt)
6113 ("python-requests" ,python-requests)))
7b93d866 6114 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
6115 (synopsis "Python-based execution environment for make-like workflows")
6116 (description
6117 "Snakemake aims to reduce the complexity of creating workflows by
6118providing a clean and modern domain specific specification language (DSL) in
6119Python style, together with a fast and comfortable execution environment.")
6120 (license license:expat)))
a1920bc9 6121
35de1fbd
RW
6122(define-public python-seaborn
6123 (package
6124 (name "python-seaborn")
ccc18762 6125 (version "0.7.1")
35de1fbd
RW
6126 (source
6127 (origin
6128 (method url-fetch)
fc899d4f 6129 (uri (pypi-uri "seaborn" version))
35de1fbd 6130 (sha256
ccc18762 6131 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
35de1fbd 6132 (build-system python-build-system)
6f976df6
MB
6133 (arguments
6134 '(#:tests? #f)) ; Tests requires a running X11 server.
35de1fbd
RW
6135 (propagated-inputs
6136 `(("python-pandas" ,python-pandas)
6137 ("python-matplotlib" ,python-matplotlib)
6138 ("python-scipy" ,python-scipy)))
35de1fbd
RW
6139 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6140 (synopsis "Statistical data visualization")
6141 (description
6142 "Seaborn is a library for making attractive and informative statistical
6143graphics in Python. It is built on top of matplotlib and tightly integrated
6144with the PyData stack, including support for numpy and pandas data structures
6145and statistical routines from scipy and statsmodels.")
3f641af0 6146 (license license:bsd-3)
fc899d4f 6147 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
6148
6149(define-public python2-seaborn
fc899d4f
EF
6150 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6151 (package
6152 (inherit base)
6153 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 6154 ,@(package-propagated-inputs base))))))
35de1fbd 6155
58a35665
MB
6156(define-public python-mpmath
6157 (package
6158 (name "python-mpmath")
6159 (version "0.19")
6160 (source (origin
6161 (method url-fetch)
6162 (uri (string-append "http://mpmath.org/files/mpmath-"
6163 version ".tar.gz"))
6164 (sha256
6165 (base32
6166 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6167 (build-system python-build-system)
6168 (arguments
6169 '(#:phases
6170 (modify-phases %standard-phases
6171 (replace 'check
6172 (lambda _
6173 (zero?
6174 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6175 (home-page "http://mpmath.org")
6176 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6177 (description
6178 "@code{mpmath} can be used as an arbitrary-precision substitute for
6179Python's float/complex types and math/cmath modules, but also does much
6180more advanced mathematics.")
6181 (license license:bsd-3)))
6182
6183(define-public python2-mpmath
6184 (package-with-python2 python-mpmath))
35de1fbd 6185
90fc547f
RW
6186(define-public python-sympy
6187 (package
6188 (name "python-sympy")
52f622ef 6189 (version "1.0")
90fc547f
RW
6190 (source
6191 (origin
6192 (method url-fetch)
6193 (uri (string-append
6194 "https://github.com/sympy/sympy/releases/download/sympy-"
6195 version "/sympy-" version ".tar.gz"))
6196 (sha256
52f622ef 6197 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
90fc547f 6198 (build-system python-build-system)
52f622ef
MB
6199 (propagated-inputs
6200 `(("python-mpmath" ,python-mpmath)))
90fc547f
RW
6201 (home-page "http://www.sympy.org/")
6202 (synopsis "Python library for symbolic mathematics")
6203 (description
6204 "SymPy is a Python library for symbolic mathematics. It aims to become a
6205full-featured computer algebra system (CAS) while keeping the code as simple
6206as possible in order to be comprehensible and easily extensible.")
3f641af0 6207 (license license:bsd-3)))
90fc547f
RW
6208
6209(define-public python2-sympy
6210 (package-with-python2 python-sympy))
6211
e8c9b010
SR
6212(define-public python-q
6213 (package
6214 (name "python-q")
6215 (version "2.6")
6216 (source
6217 (origin
6218 (method url-fetch)
6219 (uri (pypi-uri "q" version))
6220 (sha256
6221 (base32
6222 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6223 (build-system python-build-system)
6224 (home-page "https://github.com/zestyping/q")
6225 (synopsis "Quick-and-dirty debugging output for tired programmers")
6226 (description
6227 "q is a Python module for \"print\" style of debugging Python code. It
6228provides convenient short API for print out of values, tracebacks, and
6229falling into the Python interpreter.")
f210e944 6230 (license license:asl2.0)))
e8c9b010
SR
6231
6232(define-public python2-q
f210e944 6233 (package-with-python2 python-q))
e8c9b010 6234
a1920bc9
FB
6235(define-public python-testlib
6236 (package
6237 (name "python-testlib")
6238 (version "0.6.5")
6239 (source
6240 (origin
6241 (method url-fetch)
6242 (uri (string-append
6243 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6244 version ".zip"))
6245 (sha256
6246 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6247 (build-system python-build-system)
a1920bc9 6248 (native-inputs
632735f2 6249 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
6250 (synopsis "Python micro test suite harness")
6251 (description "A micro unittest suite harness for Python.")
6252 (home-page "https://github.com/trentm/testlib")
1cb9c006 6253 (license license:expat)))
a1920bc9
FB
6254
6255(define-public python2-testlib
6256 (package-with-python2 python-testlib))
db62afa5
LC
6257
6258(define-public python2-xlib
6259 (package
6260 (name "python2-xlib")
6261 (version "0.14")
6262 (source (origin
6263 (method url-fetch)
de67e922
LF
6264 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6265 "/" version "/"
db62afa5
LC
6266 "python-xlib-" version ".tar.gz"))
6267 (sha256
6268 (base32
6269 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6270 (build-system python-build-system)
6271 (arguments
6272 `(#:python ,python-2 ;Python 2 only
6273 #:tests? #f)) ;no tests
db62afa5
LC
6274 (home-page "http://python-xlib.sourceforge.net/")
6275 (synopsis "Python X11 client library")
6276 (description
6277 "The Python X Library is intended to be a fully functional X client
6278library for Python programs. It is useful to implement low-level X clients.
6279It is written entirely in Python.")
3f641af0 6280 (license license:gpl2+)))
0234ca06
DT
6281
6282(define-public python-singledispatch
6283 (package
6284 (name "python-singledispatch")
6285 (version "3.4.0.3")
6286 (source
6287 (origin
6288 (method url-fetch)
bdb67d84 6289 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
6290 (sha256
6291 (base32
6292 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6293 (build-system python-build-system)
5e1c9d24
HG
6294 (native-inputs
6295 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
6296 (home-page
6297 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6298 (synopsis "Backport of singledispatch feature from Python 3.4")
6299 (description
6300 "This library brings functools.singledispatch from Python 3.4 to Python
63012.6-3.3.")
6302 (license license:expat)))
6303
6304(define-public python2-singledispatch
6305 (package-with-python2 python-singledispatch))
feaae484 6306
310d218f
RW
6307(define-public python-tornado
6308 (package
6309 (name "python-tornado")
6fdeb324 6310 (version "4.5.1")
310d218f
RW
6311 (source
6312 (origin
6313 (method url-fetch)
a724924b 6314 (uri (pypi-uri "tornado" version))
310d218f 6315 (sha256
6fdeb324 6316 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
310d218f 6317 (build-system python-build-system)
3fe2c209
MB
6318 (arguments
6319 '(;; FIXME: Two tests error out with:
6320 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6321 ;; #:phases
6322 ;; (modify-phases %standard-phases
6323 ;; (replace 'check
6324 ;; (lambda _
6325 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6326 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6327 ;; (zero? (system* "python" "-m" "tornado.test")))))
6328 #:tests? #f))
310d218f 6329 (native-inputs
b455439b 6330 `(("python-certifi" ,python-certifi)))
f22efa01 6331 (propagated-inputs
b455439b 6332 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 6333 (home-page "http://www.tornadoweb.org/")
310d218f
RW
6334 (synopsis "Python web framework and asynchronous networking library")
6335 (description
6336 "Tornado is a Python web framework and asynchronous networking library,
6337originally developed at FriendFeed. By using non-blocking network I/O,
6338Tornado can scale to tens of thousands of open connections, making it ideal
6339for long polling, WebSockets, and other applications that require a long-lived
6340connection to each user.")
3f641af0 6341 (license license:asl2.0)
b455439b 6342 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
6343
6344(define-public python2-tornado
b455439b 6345 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 6346 (package (inherit tornado)
f22efa01 6347 (propagated-inputs
310d218f
RW
6348 `(("python2-backport-ssl-match-hostname"
6349 ,python2-backport-ssl-match-hostname)
b455439b 6350 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 6351 ,@(package-propagated-inputs tornado))))))
310d218f 6352
6b59fc10
EF
6353;; the python- version can be removed with python-3.5
6354(define-public python-backports-abc
6355 (package
6356 (name "python-backports-abc")
27f9148e 6357 (version "0.5")
6b59fc10
EF
6358 (source
6359 (origin
6360 (method url-fetch)
6361 (uri (pypi-uri "backports_abc" version))
6362 (sha256
6363 (base32
27f9148e 6364 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6b59fc10 6365 (build-system python-build-system)
6b59fc10 6366 (home-page "https://github.com/cython/backports_abc")
66e07664 6367 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
6368 (description
6369 "Python-backports-abc provides a backport of additions to the
6370'collections.abc' module in Python-3.5.")
3f641af0 6371 (license license:psfl)))
6b59fc10
EF
6372
6373(define-public python2-backports-abc
6374 (package-with-python2 python-backports-abc))
6375
4ff9e868
OP
6376(define-public python-backports-csv
6377 (package
6378 (name "python-backports-csv")
6379 (version "1.0.5")
6380 (source
6381 (origin
6382 (method url-fetch)
6383 (uri (pypi-uri "backports.csv" version))
6384 (sha256
6385 (base32
6386 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6387 (build-system python-build-system)
6388 (home-page "https://github.com/ryanhiebert/backports.csv")
6389 (synopsis "Backport of Python 3's csv module for Python 2")
6390 (description
6391 "Provides a backport of Python 3's @code{csv} module for parsing
6392comma separated values. The API of the @code{csv} module in Python 2
6393is drastically different from the @code{csv} module in Python 3.
6394This is due, for the most part, to the difference between str in
6395Python 2 and Python 3.")
6396 (license license:psfl)))
6397
6398(define-public python2-backports-csv
6399 (package-with-python2 python-backports-csv))
6400
ec074213
TD
6401(define-public python2-backports-shutil-get-terminal-size
6402 (package
6403 (name "python2-backports-shutil-get-terminal-size")
6404 (version "1.0.0")
6405 (source
6406 (origin
6407 (method url-fetch)
6408 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6409 (sha256
6410 (base32
6411 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6412 (build-system python-build-system)
6413 (arguments
c0446791
MB
6414 `(#:python ,python-2
6415 #:phases
6416 (modify-phases %standard-phases
6417 (replace 'check
6418 (lambda _
6419 (zero? (system* "py.test" "-v")))))))
6420 (native-inputs
6421 `(("python2-pytest" ,python2-pytest)))
ec074213
TD
6422 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6423 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6424 (description
6425 "This package provides a backport of the @code{get_terminal_size
6426function} from Python 3.3's @code{shutil}.
6427Unlike the original version it is written in pure Python rather than C,
6428so it might be a tiny bit slower.")
6429 (license license:expat)))
6430
feaae484
SB
6431(define-public python-waf
6432 (package
6433 (name "python-waf")
27bf00e6 6434 (version "1.9.8")
feaae484
SB
6435 (source (origin
6436 (method url-fetch)
bae67829 6437 (uri (string-append "https://waf.io/"
feaae484
SB
6438 "waf-" version ".tar.bz2"))
6439 (sha256
6440 (base32
27bf00e6 6441 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
feaae484
SB
6442 (build-system python-build-system)
6443 (arguments
6444 '(#:phases
6445 (modify-phases %standard-phases
6446 (replace 'build
7dd55dfe
EF
6447 (lambda _
6448 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 6449 (replace 'check
7dd55dfe
EF
6450 (lambda _
6451 (zero? (system* "python" "waf" "--version"))))
feaae484 6452 (replace 'install
7dd55dfe
EF
6453 (lambda _
6454 (copy-file "waf" %output))))))
27bf00e6 6455 (home-page "https://waf.io/")
feaae484
SB
6456 (synopsis "Python-based build system")
6457 (description
6458 "Waf is a Python-based framework for configuring, compiling and installing
6459applications.")
3f641af0 6460 (license license:bsd-3)))
feaae484
SB
6461
6462(define-public python2-waf
6463 (package-with-python2 python-waf))
45203542
RW
6464
6465(define-public python-pyzmq
6466 (package
6467 (name "python-pyzmq")
3655ee76 6468 (version "15.1.0")
45203542
RW
6469 (source
6470 (origin
6471 (method url-fetch)
3655ee76 6472 (uri (pypi-uri "pyzmq" version))
45203542 6473 (sha256
3655ee76 6474 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
6475 (build-system python-build-system)
6476 (arguments
6477 `(#:configure-flags
6478 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6479 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6480 ;; --inplace' for 'python setup.py test' to work.
6481 #:tests? #f))
6482 (inputs
6483 `(("zeromq" ,zeromq)))
6484 (native-inputs
6485 `(("pkg-config" ,pkg-config)
f3b98f4f 6486 ("python-nose" ,python-nose)))
7bf837fd 6487 (home-page "https://github.com/zeromq/pyzmq")
45203542
RW
6488 (synopsis "Python bindings for 0MQ")
6489 (description
6490 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 6491 (license license:bsd-4)))
45203542
RW
6492
6493(define-public python2-pyzmq
6494 (package-with-python2 python-pyzmq))
d889e6c4
CR
6495
6496(define-public python-pep8
6497 (package
6498 (name "python-pep8")
db251311 6499 (version "1.7.0")
d889e6c4
CR
6500 (source
6501 (origin
6502 (method url-fetch)
db251311 6503 (uri (pypi-uri "pep8" version))
d889e6c4
CR
6504 (sha256
6505 (base32
db251311 6506 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 6507 (build-system python-build-system)
d889e6c4
CR
6508 (home-page "http://pep8.readthedocs.org/")
6509 (synopsis "Python style guide checker")
6510 (description
6511 "This tools checks Python code against some of the style conventions in
6512PEP 8.")
6513 (license license:expat)))
6514
6515(define-public python2-pep8
6516 (package-with-python2 python-pep8))
e31d7f44
CR
6517
6518(define-public python-pyflakes
6519 (package
6520 (name "python-pyflakes")
2abc3972 6521 (version "1.0.0")
e31d7f44
CR
6522 (source
6523 (origin
6524 (method url-fetch)
2abc3972 6525 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
6526 (sha256
6527 (base32
2abc3972 6528 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 6529 (build-system python-build-system)
e31d7f44
CR
6530 (home-page
6531 "https://github.com/pyflakes/pyflakes")
6532 (synopsis "Passive checker of Python programs")
6533 (description
6534 "Pyflakes statically checks Python source code for common errors.")
6535 (license license:expat)))
a59e017c 6536
7261d9eb
CR
6537(define-public python2-pyflakes
6538 (package-with-python2 python-pyflakes))
6539
a59e017c
CR
6540(define-public python-mccabe
6541 (package
6542 (name "python-mccabe")
c6ebd40d 6543 (version "0.4.0")
a59e017c
CR
6544 (source
6545 (origin
6546 (method url-fetch)
c6ebd40d 6547 (uri (pypi-uri "mccabe" version))
a59e017c
CR
6548 (sha256
6549 (base32
c6ebd40d 6550 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 6551 (build-system python-build-system)
328bb95d 6552 (native-inputs
c6ebd40d 6553 `(("python-pytest" ,python-pytest)
f3b98f4f 6554 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
6555 (home-page "https://github.com/flintwork/mccabe")
6556 (synopsis "McCabe checker, plugin for flake8")
6557 (description
6558 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6559complexity of Python source code.")
7362371d 6560 (license license:expat)))
a59e017c
CR
6561
6562(define-public python2-mccabe
6563 (package-with-python2 python-mccabe))
e8df8f47 6564
7477fbb1
CR
6565(define-public python-mccabe-0.2.1
6566 (package (inherit python-mccabe)
6567 (version "0.2.1")
6568 (source
6569 (origin
6570 (method url-fetch)
6571 (uri (pypi-uri "mccabe" version))
6572 (sha256
6573 (base32
f3b98f4f 6574 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
6575
6576(define-public python2-mccabe-0.2.1
6577 (package-with-python2 python-mccabe-0.2.1))
6578
e8df8f47
CR
6579;; Flake8 2.4.1 requires an older version of pep8.
6580;; This should be removed ASAP.
6581(define-public python-pep8-1.5.7
6582 (package (inherit python-pep8)
6583 (version "1.5.7")
6584 (source
6585 (origin
6586 (method url-fetch)
6587 (uri (string-append
6588 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6589 version
6590 ".tar.gz"))
6591 (sha256
6592 (base32
73e3060d
MB
6593 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6594 (arguments
6595 ;; XXX Tests not compatible with Python 3.5.
6596 '(#:tests? #f))))
e8df8f47
CR
6597
6598(define-public python2-pep8-1.5.7
6599 (package-with-python2 python-pep8-1.5.7))
6600
6601;; Flake8 2.4.1 requires an older version of pyflakes.
6602;; This should be removed ASAP.
6603(define-public python-pyflakes-0.8.1
6604 (package (inherit python-pyflakes)
6605 (version "0.8.1")
6606 (source
6607 (origin
6608 (method url-fetch)
6609 (uri (string-append
6610 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6611 version
6612 ".tar.gz"))
6613 (sha256
6614 (base32
0d84e1ef
MB
6615 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6616 (arguments
6617 ;; XXX Tests not compatible with Python 3.5.
6618 '(#:tests? #f))))
e8df8f47
CR
6619
6620(define-public python2-pyflakes-0.8.1
7261d9eb 6621 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
6622
6623(define-public python-flake8
6624 (package
6625 (name "python-flake8")
43789136 6626 (version "2.5.4")
e8df8f47
CR
6627 (source
6628 (origin
6629 (method url-fetch)
1b995533 6630 (uri (pypi-uri "flake8" version))
e8df8f47
CR
6631 (sha256
6632 (base32
011271c7
HG
6633 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6634 (modules '((guix build utils)))
6635 (snippet
6636 '(begin
6637 ;; Remove pre-compiled .pyc files from source.
6638 (for-each delete-file-recursively
6639 (find-files "." "__pycache__" #:directories? #t))
6640 (for-each delete-file (find-files "." "\\.pyc$"))
6641 #t))))
e8df8f47 6642 (build-system python-build-system)
482d9591 6643 (propagated-inputs
f3b98f4f 6644 `(("python-pep8" ,python-pep8)
43789136 6645 ("python-pyflakes" ,python-pyflakes)
482d9591 6646 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
6647 (native-inputs
6648 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
6649 ("python-nose" ,python-nose)))
6650 (home-page "https://gitlab.com/pycqa/flake8")
6651 (synopsis
6652 "The modular source code checker: pep8, pyflakes and co")
6653 (description
6654 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6655 (license license:expat)))
6656
6657(define-public python2-flake8
6658 (package-with-python2 python-flake8))
61b9ac53 6659
1f42d824
MFM
6660(define-public python-flake8-polyfill
6661 (package
6662 (name "python-flake8-polyfill")
6663 (version "1.0.1")
6664 (source
6665 (origin
6666 (method url-fetch)
6667 (uri (pypi-uri "flake8-polyfill" version))
6668 (sha256
6669 (base32
6670 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6671 (build-system python-build-system)
2c1cad7a
MB
6672 (arguments
6673 '(#:phases
6674 (modify-phases %standard-phases
6675 (replace 'check
6676 (lambda _
6677 (setenv "PYTHONPATH"
6678 (string-append (getcwd) "/build/lib:"
6679 (getenv "PYTHONPATH")))
6680 (zero? (system* "py.test" "-v")))))))
6681 (native-inputs
6682 `(("python-flake8" ,python-flake8)
6683 ("python-mock" ,python-mock)
6684 ("python-pycodestyle" ,python-pycodestyle)
6685 ("python-pytest" ,python-pytest)))
1f42d824
MFM
6686 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6687 (synopsis "Polyfill package for Flake8 plugins")
6688 (description
6689 "This package that provides some compatibility helpers for Flake8
6690plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6691 (license license:expat)))
6692
6693(define-public python2-flake8-polyfill
6694 (package-with-python2 python-flake8-polyfill))
6695
61b9ac53
FB
6696(define-public python-mistune
6697 (package
6698 (name "python-mistune")
08b81336 6699 (version "0.7.3")
61b9ac53
FB
6700 (source
6701 (origin
6702 (method url-fetch)
eff8d773 6703 (uri (pypi-uri "mistune" version))
61b9ac53
FB
6704 (sha256
6705 (base32
08b81336 6706 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
61b9ac53 6707 (build-system python-build-system)
328bb95d 6708 (native-inputs
f3b98f4f 6709 `(("python-nose" ,python-nose)
61b9ac53
FB
6710 ("python-cython" ,python-cython)))
6711 (home-page "https://github.com/lepture/mistune")
6712 (synopsis "Markdown parser in pure Python")
6713 (description "This package provides a fast markdown parser in pure
6714Python.")
3f641af0 6715 (license license:bsd-3)))
61b9ac53
FB
6716
6717(define-public python2-mistune
6718 (package-with-python2 python-mistune))
6d992d07 6719
b9893908
EE
6720(define-public python-markdown
6721 (package
6722 (name "python-markdown")
4ffbe8c6 6723 (version "2.6.8")
b9893908
EE
6724 (source
6725 (origin
6726 (method url-fetch)
6727 (uri (pypi-uri "Markdown" version))
6728 (sha256
6729 (base32
4ffbe8c6 6730 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
b9893908
EE
6731 (build-system python-build-system)
6732 (arguments
6733 `(#:phases
6734 (modify-phases %standard-phases
6735 (replace 'check
6736 (lambda _
6737 (zero? (system* "python" "run-tests.py")))))))
6738 (native-inputs
6739 `(("python-nose" ,python-nose)
6740 ("python-pyyaml" ,python-pyyaml)))
6741 (home-page "https://pythonhosted.org/Markdown/")
6742 (synopsis "Python implementation of Markdown")
6743 (description
6744 "This package provides a Python implementation of John Gruber's
6745Markdown. The library features international input, various Markdown
6746extensions, and several HTML output formats. A command line wrapper
6747markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 6748 (license license:bsd-3)))
b9893908
EE
6749
6750(define-public python2-markdown
6751 (package-with-python2 python-markdown))
6752
6d992d07
FB
6753(define-public python-ptyprocess
6754 (package
6755 (name "python-ptyprocess")
70fc93cb 6756 (version "0.5.1")
6d992d07
FB
6757 (source
6758 (origin
6759 (method url-fetch)
6760 (uri (string-append
6761 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6762 version ".tar.gz"))
6763 (sha256
6764 (base32
70fc93cb 6765 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6d992d07 6766 (build-system python-build-system)
328bb95d 6767 (native-inputs
f3b98f4f 6768 `(("python-nose" ,python-nose)))
6d992d07
FB
6769 (arguments
6770 `(#:phases
6771 (modify-phases %standard-phases
6772 (replace 'check
6773 (lambda _
6774 (zero? (system* "nosetests")))))))
6775 (home-page "https://github.com/pexpect/ptyprocess")
6776 (synopsis "Run a subprocess in a pseudo terminal")
6777 (description
6778 "This package provides a Python library used to launch a subprocess in a
6779pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 6780 (license license:isc)))
6d992d07
FB
6781
6782(define-public python2-ptyprocess
6783 (package-with-python2 python-ptyprocess))
4aadb1df 6784
df893a38
MB
6785(define-public python-cram
6786 (package
6787 (name "python-cram")
6788 (version "0.7")
6789 (home-page "https://bitheap.org/cram/")
6790 (source (origin
6791 (method url-fetch)
6792 (uri (list (string-append home-page "cram-"
6793 version ".tar.gz")
6794 (pypi-uri "cram" version)))
6795 (sha256
6796 (base32
6797 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6798 (arguments
6799 '(#:phases
6800 (modify-phases %standard-phases
6801 (add-after 'unpack 'patch-source
6802 (lambda _
6803 (substitute* (find-files "cram" ".*\\.py$")
6804 ;; Replace default shell path.
6805 (("/bin/sh") (which "sh")))
6806 (substitute* (find-files "tests" ".*\\.t$")
6807 (("md5") "md5sum")
6808 (("/bin/bash") (which "bash"))
6809 (("/bin/sh") (which "sh")))
6810 (substitute* "cram/_test.py"
6811 ;; This hack works around a bug triggered by substituting
6812 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6813 ;; "cram -h", which breaks the output at 80 characters. This
6814 ;; causes the line showing the default shell to break into two
6815 ;; lines, but the test expects a single line...
6816 (("env\\['COLUMNS'\\] = '80'")
6817 "env['COLUMNS'] = '160'"))
6818 #t))
6819 (delete 'check)
6820 (add-after 'install 'check
6821 ;; The test phase uses the built library and executable.
6822 ;; It's easier to run it after install since the build
6823 ;; directory contains version-specific PATH.
6824 (lambda* (#:key inputs outputs #:allow-other-keys)
6825 (add-installed-pythonpath inputs outputs)
6826 (setenv "PATH" (string-append (getenv "PATH") ":"
6827 (assoc-ref outputs "out") "/bin"))
6828 (zero? (system* "make" "test")))))))
6829 (build-system python-build-system)
6830 (native-inputs
6831 `(("python-coverage" ,python-coverage)
6832 ("which" ,which)))
6833 (synopsis "Simple testing framework for command line applications")
6834 (description
6835 "Cram is a functional testing framework for command line applications.
6836Cram tests look like snippets of interactive shell sessions. Cram runs each
6837command and compares the command output in the test with the command’s actual
6838output.")
6839 (license license:gpl2+)))
6840
6841(define-public python2-cram
6842 (package-with-python2 python-cram))
6843
4aadb1df
FB
6844(define-public python-terminado
6845 (package
6846 (name "python-terminado")
783fb0a3 6847 (version "0.6")
4aadb1df
FB
6848 (source
6849 (origin
6850 (method url-fetch)
783fb0a3 6851 (uri (pypi-uri "terminado" version))
4aadb1df
FB
6852 (sha256
6853 (base32
783fb0a3 6854 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
6855 (build-system python-build-system)
6856 (propagated-inputs
6857 `(("python-tornado" ,python-tornado)
6858 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
6859 (native-inputs
6860 `(("python-nose" ,python-nose)))
4aadb1df
FB
6861 (arguments
6862 `(#:phases
6863 (modify-phases %standard-phases
6864 (replace 'check
6865 (lambda _
6866 (zero? (system* "nosetests")))))))
6867 (home-page "https://github.com/takluyver/terminado")
6868 (synopsis "Terminals served to term.js using Tornado websockets")
6869 (description "This package provides a Tornado websocket backend for the
6870term.js Javascript terminal emulator library.")
3f641af0 6871 (license license:bsd-2)
783fb0a3 6872 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
6873
6874(define-public python2-terminado
783fb0a3 6875 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 6876 (package (inherit terminado)
783fb0a3
EF
6877 (propagated-inputs
6878 `(("python2-backport-ssl-match-hostname"
6879 ,python2-backport-ssl-match-hostname)
00e10c6e 6880 ,@(package-propagated-inputs terminado))))))
5faa5ce4 6881
789de5e2 6882(define-public python-straight-plugin
6883 (package
6884 (name "python-straight-plugin")
6885 (version "1.4.1")
6886 (source
6887 (origin
6888 (method url-fetch)
6889 (uri (pypi-uri "straight.plugin" version))
6890 (sha256
6891 (base32
6892 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6893 (build-system python-build-system)
6894 (home-page "https://github.com/ironfroggy/straight.plugin")
6895 (synopsis "Simple namespaced plugin facility")
6896 (description "Straight Plugin provides a type of plugin you can create from
6897almost any existing Python modules, and an easy way for outside developers to
6898add functionality and customization to your projects with their own plugins.")
6899 (license license:expat)))
6900
6901(define-public python2-straight-plugin
6902 (package-with-python2 python-straight-plugin))
6903
d582eaac
SB
6904(define-public python-fonttools
6905 (package
6906 (name "python-fonttools")
6907 (version "2.5")
6908 (source (origin
6909 (method url-fetch)
6910 (uri (string-append
6911 "https://pypi.python.org/packages/source/F/FontTools/"
6912 "fonttools-" version ".tar.gz"))
6913 (sha256
6914 (base32
6915 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6916 (build-system python-build-system)
9e8c6a37
HG
6917 (arguments
6918 '(#:test-target "check"
6919 #:phases
6920 (modify-phases %standard-phases
6921 (add-after 'unpack 'patch-setuppy
6922 ;; Remove the undocumented "extra_path" argument, which adds an
6923 ;; intervening directories between site-packages and the package
6924 ;; directory.
6925 (lambda _
6926 (substitute* "setup.py"
6927 (("^[ \t]*extra_path *= *'FontTools',") ""))
6928 #t)))))
7bf837fd 6929 (home-page "https://github.com/behdad/fonttools")
d582eaac
SB
6930 (synopsis "Tools to manipulate font files")
6931 (description
6932 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 6933supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
6934of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6935also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6936from an XML-based format.")
3f641af0
DC
6937 (license (license:non-copyleft
6938 "file://LICENSE.txt"
6939 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6940
6941(define-public python2-fonttools
6942 (package-with-python2 python-fonttools))
75710da6 6943
5faa5ce4
RW
6944(define-public python-ly
6945 (package
6946 (name "python-ly")
5135354f 6947 (version "0.9.4")
5faa5ce4
RW
6948 (source
6949 (origin
6950 (method url-fetch)
5135354f
RW
6951 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6952 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6953 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6954 (sha256
6955 (base32
5135354f 6956 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6957 (build-system python-build-system)
972cf9be
MB
6958 (arguments
6959 ;; FIXME: Some tests need network access.
6960 '(#:tests? #f))
5faa5ce4
RW
6961 (synopsis "Tool and library for manipulating LilyPond files")
6962 (description "This package provides a Python library to parse, manipulate
6963or create documents in LilyPond format. A command line program ly is also
6964provided that can be used to do various manipulations with LilyPond files.")
6965 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6966 (license license:gpl2+)))
7e7b27d9
CR
6967
6968(define-public python-appdirs
6969 (package
6970 (name "python-appdirs")
543782e1 6971 (version "1.4.3")
7e7b27d9
CR
6972 (source
6973 (origin
6974 (method url-fetch)
26b16fd9 6975 (uri (pypi-uri "appdirs" version))
7e7b27d9
CR
6976 (sha256
6977 (base32
543782e1 6978 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7e7b27d9 6979 (build-system python-build-system)
7bf837fd 6980 (home-page "https://github.com/ActiveState/appdirs")
7e7b27d9
CR
6981 (synopsis
6982 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6983 (description
6984 "This module provides a portable way of finding out where user data
6985should be stored on various operating systems.")
6986 (license license:expat)))
6987
6988(define-public python2-appdirs
6989 (package-with-python2 python-appdirs))
89b2e0b0
LF
6990
6991(define-public python-llfuse
6992 (package
6993 (name "python-llfuse")
4d31d143 6994 (version "1.2")
89b2e0b0
LF
6995 (source (origin
6996 (method url-fetch)
6997 (uri (string-append
6998 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6999 "llfuse-" version ".tar.bz2"))
7000 (sha256
7001 (base32
4d31d143 7002 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
89b2e0b0
LF
7003 (build-system python-build-system)
7004 (inputs
7005 `(("fuse" ,fuse)
7006 ("attr" ,attr)))
7007 (native-inputs
f3b98f4f 7008 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
7009 (synopsis "Python bindings for FUSE")
7010 (description
7011 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7012 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 7013 (license license:lgpl2.0+)
cd0569c4 7014 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
7015
7016(define-public python2-llfuse
cd0569c4
LF
7017 (package (inherit (package-with-python2
7018 (strip-python2-variant python-llfuse)))
7019 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7020
7021;; For attic-0.16
7022(define-public python-llfuse-0.41
7023 (package (inherit python-llfuse)
229b3661 7024 (version "0.41.1")
cd0569c4
LF
7025 (source (origin
7026 (method url-fetch)
7027 (uri (string-append
7028 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7029 "llfuse-" version ".tar.bz2"))
7030 (sha256
7031 (base32
229b3661 7032 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
7033 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7034 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 7035 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
7036
7037(define-public python-msgpack
7038 (package
7039 (name "python-msgpack")
aed625bd 7040 (version "0.4.8")
641c9871
LF
7041 (source (origin
7042 (method url-fetch)
ae831df4 7043 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
7044 (sha256
7045 (base32
aed625bd 7046 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 7047 (build-system python-build-system)
641c9871
LF
7048 (synopsis "MessagePack (de)serializer")
7049 (description "MessagePack is a fast, compact binary serialization format,
7050suitable for similar data to JSON. This package provides CPython bindings for
7051reading and writing MessagePack data.")
7052 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 7053 (license license:asl2.0)))
bd74be7b
LF
7054
7055(define-public python2-msgpack
f210e944 7056 (package-with-python2 python-msgpack))
641c9871 7057
6e5e39f4
CR
7058(define-public python-netaddr
7059 (package
7060 (name "python-netaddr")
7061 (version "0.7.18")
7062 (source
7063 (origin
7064 (method url-fetch)
7065 (uri (string-append
7066 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
7067 version
7068 ".tar.gz"))
7069 (sha256
7070 (base32
7071 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
7072 (build-system python-build-system)
7073 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
7074 (home-page "https://github.com/drkjam/netaddr/")
7075 (synopsis "Pythonic manipulation of network addresses")
7076 (description
7077 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7078and MAC network addresses.")
3f641af0 7079 (license license:bsd-3)))
6e5e39f4
CR
7080
7081(define-public python2-netaddr
7082 (package-with-python2 python-netaddr))
8c692a52
CR
7083
7084(define-public python-wrapt
7085 (package
7086 (name "python-wrapt")
d25bee26 7087 (version "1.10.8")
8c692a52
CR
7088 (source
7089 (origin
7090 (method url-fetch)
d25bee26 7091 (uri (pypi-uri "wrapt" version))
8c692a52
CR
7092 (sha256
7093 (base32
d25bee26 7094 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
8c692a52
CR
7095 (build-system python-build-system)
7096 (arguments
7097 ;; Tests are not included in the tarball, they are only available in the
7098 ;; git repository.
7099 `(#:tests? #f))
8c692a52
CR
7100 (home-page "https://github.com/GrahamDumpleton/wrapt")
7101 (synopsis "Module for decorators, wrappers and monkey patching")
7102 (description
7103 "The aim of the wrapt module is to provide a transparent object proxy for
7104 Python, which can be used as the basis for the construction of function
7105 wrappers and decorator functions.")
3f641af0 7106 (license license:bsd-2)))
8c692a52
CR
7107
7108(define-public python2-wrapt
7109 (package-with-python2 python-wrapt))
b85c85be
CR
7110
7111(define-public python-iso8601
7112 (package
7113 (name "python-iso8601")
fe84bc9a 7114 (version "0.1.11")
b85c85be
CR
7115 (source
7116 (origin
7117 (method url-fetch)
fe84bc9a 7118 (uri (pypi-uri "iso8601" version))
b85c85be 7119 (sha256
fe84bc9a
EF
7120 (base32
7121 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 7122 (build-system python-build-system)
63b02364
MB
7123 (native-inputs
7124 `(("python-pytest" ,python-pytest)))
b85c85be
CR
7125 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7126 (synopsis "Module to parse ISO 8601 dates")
7127 (description
7128 "This module parses the most common forms of ISO 8601 date strings (e.g.
7129@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7130 (license license:expat)))
7131
7132(define-public python2-iso8601
7133 (package-with-python2 python-iso8601))
5e412b63
CR
7134
7135(define-public python-monotonic
7136 (package
7137 (name "python-monotonic")
7138 (version "0.3")
7139 (source
7140 (origin
7141 (method url-fetch)
7142 (uri (string-append
7143 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7144 version
7145 ".tar.gz"))
7146 (sha256
7147 (base32
7148 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7149 (build-system python-build-system)
5e412b63
CR
7150 (home-page "https://github.com/atdt/monotonic")
7151 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7152 (description
7153 "This module provides a monotonic() function which returns the value (in
7154fractional seconds) of a clock which never goes backwards.")
3f641af0 7155 (license license:asl2.0)))
5e412b63
CR
7156
7157(define-public python2-monotonic
7158 (package-with-python2 python-monotonic))
de34afac
CR
7159
7160(define-public python-webob
7161 (package
7162 (name "python-webob")
b8834c21 7163 (version "1.5.1")
de34afac
CR
7164 (source
7165 (origin
7166 (method url-fetch)
b8834c21 7167 (uri (pypi-uri "WebOb" version))
de34afac
CR
7168 (sha256
7169 (base32
b8834c21 7170 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 7171 (build-system python-build-system)
328bb95d 7172 (native-inputs
f3b98f4f 7173 `(("python-nose" ,python-nose)))
de34afac
CR
7174 (home-page "http://webob.org/")
7175 (synopsis "WSGI request and response object")
7176 (description
7177 "WebOb provides wrappers around the WSGI request environment, and an
7178object to help create WSGI responses.")
7179 (license license:expat)))
7180
7181(define-public python2-webob
7182 (package-with-python2 python-webob))
350ba0a3 7183
02a8a187
BW
7184(define-public python-xlrd
7185 (package
7186 (name "python-xlrd")
c2ad4d70 7187 (version "1.0.0")
02a8a187
BW
7188 (source (origin
7189 (method url-fetch)
e775f48e 7190 (uri (pypi-uri "xlrd" version))
02a8a187
BW
7191 (sha256
7192 (base32
c2ad4d70 7193 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
7194 (build-system python-build-system)
7195 (arguments
7196 `(#:phases
7197 (modify-phases %standard-phases
c2ad4d70 7198 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
7199 ;; run tests instead for now.
7200 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 7201 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
7202 (home-page "http://www.python-excel.org/")
7203 (synopsis "Library for extracting data from Excel files")
7204 (description "This packages provides a library to extract data from
c598e35c 7205spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
7206@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7207Unicode-aware. It is not intended as an end-user tool.")
3f641af0 7208 (license license:bsd-3)))
02a8a187
BW
7209
7210(define-public python2-xlrd
7211 (package-with-python2 python-xlrd))
7212
350ba0a3
CR
7213(define-public python-prettytable
7214 (package
7215 (name "python-prettytable")
7216 (version "0.7.2")
7217 (source
7218 (origin
7219 (method url-fetch)
7220 (uri (string-append
7221 "https://pypi.python.org/packages/source/P/PrettyTable/"
7222 "prettytable-" version ".tar.bz2"))
7223 (sha256
7224 (base32
7225 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7226 (build-system python-build-system)
350ba0a3
CR
7227 (home-page "http://code.google.com/p/prettytable/")
7228 (synopsis "Display tabular data in an ASCII table format")
7229 (description
7230 "A library designed to represent tabular data in visually appealing ASCII
7231tables. PrettyTable allows for selection of which columns are to be printed,
7232independent alignment of columns (left or right justified or centred) and
7233printing of sub-tables by specifying a row range.")
3f641af0 7234 (license license:bsd-3)))
350ba0a3
CR
7235
7236(define-public python2-prettytable
7237 (package-with-python2 python-prettytable))
7a8ac75a 7238
9f8ee3fe
RW
7239(define-public python-tables
7240 (package
7241 (name "python-tables")
7242 (version "3.2.2")
7243 (source
7244 (origin
7245 (method url-fetch)
7246 (uri (pypi-uri "tables" version))
7247 (sha256
7248 (base32
bac23672
HG
7249 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7250 (modules '((guix build utils)))
7251 (snippet
7252 '(begin
7253 ;; Remove pre-compiled .pyc files from source.
7254 (for-each delete-file-recursively
7255 (find-files "." "__pycache__" #:directories? #t))
7256 (for-each delete-file (find-files "." "\\.pyc$"))
7257 #t))))
9f8ee3fe
RW
7258 (build-system python-build-system)
7259 (arguments
7260 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7261 ;; or "check", so we must override the build and check phases.
7262 #:phases
7263 (modify-phases %standard-phases
7264 (add-after 'unpack 'use-gcc
7265 (lambda _
7266 (substitute* "setup.py"
7267 (("compiler = new_compiler\\(\\)" line)
7268 (string-append line
7269 "\ncompiler.set_executables(compiler='gcc',"
7270 "compiler_so='gcc',"
7271 "linker_exe='gcc',"
7272 "linker_so='gcc -shared')")))
7273 #t))
7274 (replace 'build
7275 (lambda* (#:key inputs #:allow-other-keys)
7276 (zero? (system* "python" "setup.py" "build"
7277 (string-append "--hdf5="
7278 (assoc-ref inputs "hdf5"))))))
7279 (replace 'check
7280 (lambda* (#:key inputs #:allow-other-keys)
7281 (zero? (system* "python" "setup.py" "check"
7282 (string-append "--hdf5="
7283 (assoc-ref inputs "hdf5")))))))))
7284 (propagated-inputs
7285 `(("python-numexpr" ,python-numexpr)
7286 ("python-numpy" ,python-numpy)))
7287 (native-inputs
f3b98f4f 7288 `(("python-cython" ,python-cython)
9f8ee3fe
RW
7289 ("pkg-config" ,pkg-config)))
7290 (inputs
7291 `(("hdf5" ,hdf5)
7292 ("bzip2" ,bzip2)
7293 ("zlib" ,zlib)))
7294 (home-page "http://www.pytables.org/")
7295 (synopsis "Hierarchical datasets for Python")
7296 (description "PyTables is a package for managing hierarchical datasets and
d1e4ad1b 7297designed to efficiently cope with extremely large amounts of data.")
3f641af0 7298 (license license:bsd-3)))
9f8ee3fe
RW
7299
7300(define-public python2-tables
7301 (package-with-python2 python-tables))
7302
7a8ac75a
RW
7303(define-public python-pyasn1
7304 (package
7305 (name "python-pyasn1")
5e0ddfba 7306 (version "0.2.3")
7a8ac75a
RW
7307 (source
7308 (origin
7309 (method url-fetch)
caa0edb3 7310 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
7311 (sha256
7312 (base32
5e0ddfba 7313 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7a8ac75a
RW
7314 (build-system python-build-system)
7315 (home-page "http://pyasn1.sourceforge.net/")
7316 (synopsis "ASN.1 types and codecs")
7317 (description
7318 "This is an implementation of ASN.1 types and codecs in Python. It is
7319suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 7320 (license license:bsd-2)))
7a8ac75a
RW
7321
7322(define-public python2-pyasn1
7323 (package-with-python2 python-pyasn1))
9a49a535 7324
5988c299
EF
7325(define-public python-pyasn1-modules
7326 (package
7327 (name "python-pyasn1-modules")
7328 (version "0.0.8")
7329 (source
7330 (origin
7331 (method url-fetch)
7332 (uri (pypi-uri "pyasn1-modules" version))
7333 (sha256
7334 (base32
7335 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7336 (build-system python-build-system)
5988c299
EF
7337 (propagated-inputs
7338 `(("python-pyasn1" ,python-pyasn1)))
3b3b60d0 7339 (home-page "https://sourceforge.net/projects/pyasn1/")
5988c299
EF
7340 (synopsis "ASN.1 codec implementations")
7341 (description
7342 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7343implementations of ASN.1-based codecs and protocols.")
3f641af0 7344 (license license:bsd-3)))
5988c299
EF
7345
7346(define-public python2-pyasn1-modules
7347 (package-with-python2 python-pyasn1-modules))
7348
520af157 7349(define-public python-ipaddress
9a49a535 7350 (package
520af157 7351 (name "python-ipaddress")
36e0d9db 7352 (version "1.0.18")
520af157
DC
7353 (source (origin
7354 (method url-fetch)
7355 (uri (pypi-uri "ipaddress" version))
7356 (sha256
7357 (base32
36e0d9db 7358 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
9a49a535 7359 (build-system python-build-system)
9a49a535
RW
7360 (home-page "https://github.com/phihag/ipaddress")
7361 (synopsis "IP address manipulation library")
7362 (description
520af157
DC
7363 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7364 in Python. This library is used to create, poke at, and manipulate IPv4 and
7365 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7366 module to older versions of Python.")
f210e944 7367 (license license:psfl)))
520af157
DC
7368
7369(define-public python2-ipaddress
f210e944 7370 (package-with-python2 python-ipaddress))
3f00e078 7371
4a238186
HG
7372(define-public python2-ipaddr
7373 (package
7374 (name "python2-ipaddr")
7375 (version "2.1.11")
7376 (source
7377 (origin
7378 (method url-fetch)
7379 (uri (pypi-uri "ipaddr" version))
7380 (sha256
7381 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7382 (build-system python-build-system)
7383 (arguments
7384 `(#:python ,python-2 ;version 2 only
7385 #:phases
7386 (modify-phases %standard-phases
7387 (replace 'check
7388 (lambda* _
7389 (zero? (system* "python" "ipaddr_test.py")))))))
7390 (home-page "https://github.com/google/ipaddr-py")
7391 (synopsis "IP address manipulation library")
7392 (description
7393 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7394IPv6 addresses and networks.
7395
7396For new implementations you may prefer to use the standard module
7397@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7398versions of Python.")
3f641af0 7399 (license license:asl2.0)))
4a238186 7400
3f00e078
RW
7401(define-public python-idna
7402 (package
7403 (name "python-idna")
37c04f91 7404 (version "2.5")
3f00e078
RW
7405 (source
7406 (origin
7407 (method url-fetch)
37c04f91 7408 (uri (pypi-uri "idna" version))
3f00e078
RW
7409 (sha256
7410 (base32
37c04f91 7411 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
3f00e078 7412 (build-system python-build-system)
3f00e078
RW
7413 (home-page "https://github.com/kjd/idna")
7414 (synopsis "Internationalized domain names in applications")
7415 (description
7416 "This is a library to support the Internationalised Domain Names in
7417Applications (IDNA) protocol as specified in RFC 5891. This version of the
7418protocol is often referred to as “IDNA2008” and can produce different results
7419from the earlier standard from 2003. The library is also intended to act as a
7420suitable drop-in replacement for the “encodings.idna” module that comes with
7421the Python standard library but currently only supports the older 2003
7422specification.")
3f641af0 7423 (license license:bsd-4)))
3f00e078
RW
7424
7425(define-public python2-idna
7426 (package-with-python2 python-idna))
36ebf972
RW
7427
7428(define-public python-pretend
7429 (package
7430 (name "python-pretend")
7431 (version "1.0.8")
7432 (source
7433 (origin
7434 (method url-fetch)
7435 (uri (string-append "https://pypi.python.org/packages/source/p/"
7436 "pretend/pretend-" version ".tar.gz"))
7437 (sha256
7438 (base32
7439 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7440 (build-system python-build-system)
36ebf972
RW
7441 (home-page "https://github.com/alex/pretend")
7442 (synopsis "Library for stubbing in Python")
7443 (description
7444 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7445technique for writing tests. You may hear the term mixed up with mocks,
7446fakes, or doubles. Basically, a stub is an object that returns pre-canned
7447responses, rather than doing any computation.")
3f641af0 7448 (license license:bsd-3)))
36ebf972
RW
7449
7450(define-public python2-pretend
7451 (package-with-python2 python-pretend))
aa759a51
RW
7452
7453(define-public python-cryptography-vectors
7454 (package
7455 (name "python-cryptography-vectors")
89fc5b82 7456 (version "1.9")
aa759a51
RW
7457 (source
7458 (origin
7459 (method url-fetch)
9c509ca9 7460 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
7461 (sha256
7462 (base32
89fc5b82 7463 "1wvq1p1viam1diz9x6d61x1bsy6cninv7cjgd35x9ffig9r6gxxv"))))
aa759a51 7464 (build-system python-build-system)
aa759a51 7465 (home-page "https://github.com/pyca/cryptography")
66e07664 7466 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
7467 (description
7468 "This package contains test vectors for the cryptography package.")
7469 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7470 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
7471
7472(define-public python2-cryptography-vectors
7473 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
7474
7475(define-public python-cryptography
7476 (package
7477 (name "python-cryptography")
89fc5b82 7478 (version "1.9")
88b47cb0
RW
7479 (source
7480 (origin
7481 (method url-fetch)
9c509ca9 7482 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
7483 (sha256
7484 (base32
89fc5b82 7485 "10j8r1s29f4h59kp3mla14g588rm7qpn90nrczijk03i49q3662m"))))
88b47cb0
RW
7486 (build-system python-build-system)
7487 (inputs
7488 `(("openssl" ,openssl)))
7489 (propagated-inputs
dc1bd2b5
LF
7490 `(("python-asn1crypto" ,python-asn1crypto)
7491 ("python-cffi" ,python-cffi)
88b47cb0 7492 ("python-six" ,python-six)
88b47cb0
RW
7493 ("python-idna" ,python-idna)
7494 ("python-iso8601" ,python-iso8601)))
7495 (native-inputs
7496 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 7497 ("python-hypothesis" ,python-hypothesis)
88b47cb0 7498 ("python-pretend" ,python-pretend)
912dcbad 7499 ("python-pytz" ,python-pytz)
23b9168d 7500 ("python-pytest" ,python-pytest-3.0)))
88b47cb0
RW
7501 (home-page "https://github.com/pyca/cryptography")
7502 (synopsis "Cryptographic recipes and primitives for Python")
7503 (description
7504 "cryptography is a package which provides cryptographic recipes and
7505primitives to Python developers. It aims to be the “cryptographic standard
7506library” for Python. The package includes both high level recipes, and low
7507level interfaces to common cryptographic algorithms such as symmetric ciphers,
7508message digests and key derivation functions.")
7509 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7510 (license (list license:bsd-3 license:asl2.0))
519e2f4f 7511 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
7512
7513(define-public python2-cryptography
519e2f4f
LF
7514 (let ((crypto (package-with-python2
7515 (strip-python2-variant python-cryptography))))
88b47cb0
RW
7516 (package (inherit crypto)
7517 (propagated-inputs
7518 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
7519 ("python2-backport-ssl-match-hostname"
7520 ,python2-backport-ssl-match-hostname)
68f1cdec 7521 ("python2-enum34" ,python2-enum34)
88b47cb0 7522 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
7523
7524(define-public python-pyopenssl
7525 (package
7526 (name "python-pyopenssl")
96bbc41f 7527 (version "17.1.0")
5af999b8
RW
7528 (source
7529 (origin
7530 (method url-fetch)
eb68d268 7531 (uri (pypi-uri "pyOpenSSL" version))
d28f90be
MB
7532 (patches
7533 (search-patches "python-pyopenssl-17.1.0-test-overflow.patch"))
5af999b8
RW
7534 (sha256
7535 (base32
96bbc41f 7536 "0qwmqhfsq84ydir9dz273ypmlcvs7v71m1jns0sd4k0h6lfsa82s"))))
5af999b8 7537 (build-system python-build-system)
30e0229a 7538 (arguments
7c6bf660
MB
7539 '(#:phases
7540 (modify-phases %standard-phases
7541 (delete 'check)
7542 (add-after 'install 'check
7543 (lambda* (#:key inputs outputs #:allow-other-keys)
7544 (add-installed-pythonpath inputs outputs)
96bbc41f
MB
7545 (zero? (system* "py.test" "-v" "-k"
7546 (string-append
7547 ;; This test tries to look up certificates from
7548 ;; the compiled-in default path in OpenSSL, which
7549 ;; does not exist in the build environment.
7550 "not test_fallback_default_verify_paths "
7551 ;; This test attempts to make a connection to
7552 ;; an external web service.
7553 "and not test_set_default_verify_paths"))))))))
5af999b8
RW
7554 (propagated-inputs
7555 `(("python-cryptography" ,python-cryptography)
7556 ("python-six" ,python-six)))
7557 (inputs
7558 `(("openssl" ,openssl)))
30e0229a 7559 (native-inputs
96bbc41f
MB
7560 `(("python-pretend" ,python-pretend)
7561 ("python-pytest" ,python-pytest-3.0)))
5af999b8
RW
7562 (home-page "https://github.com/pyca/pyopenssl")
7563 (synopsis "Python wrapper module around the OpenSSL library")
7564 (description
7565 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7566library.")
3f641af0 7567 (license license:asl2.0)))
5af999b8
RW
7568
7569(define-public python2-pyopenssl
519e2f4f 7570 (package-with-python2 python-pyopenssl))
643725a1
CR
7571
7572(define-public python-pip
7573 (package
7574 (name "python-pip")
392c26b0 7575 (version "9.0.1")
643725a1
CR
7576 (source
7577 (origin
7578 (method url-fetch)
6fb54e3b 7579 (uri (pypi-uri "pip" version))
643725a1
CR
7580 (sha256
7581 (base32
392c26b0 7582 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
643725a1 7583 (build-system python-build-system)
392c26b0
MC
7584 (arguments
7585 '(#:tests? #f)) ; there are no tests in the pypi archive.
643725a1 7586 (home-page "https://pip.pypa.io/")
392c26b0 7587 (synopsis "Package manager for Python software")
643725a1 7588 (description
392c26b0 7589 "Pip is a package manager for Python software, that finds packages on the
643725a1
CR
7590Python Package Index (PyPI).")
7591 (license license:expat)))
7592
7593(define-public python2-pip
7594 (package-with-python2 python-pip))
d8c4998f
LC
7595
7596(define-public python-tlsh
7597 (package
7598 (name "python-tlsh")
99b00dc7 7599 (version "3.4.4")
d8c4998f
LC
7600 (home-page "https://github.com/trendmicro/tlsh")
7601 (source (origin
99b00dc7
EF
7602 (method url-fetch)
7603 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7604 version ".tar.gz"))
d8c4998f
LC
7605 (sha256
7606 (base32
99b00dc7
EF
7607 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7608 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
7609 (build-system cmake-build-system)
7610 (arguments
7611 '(#:out-of-source? #f
7612 #:phases (modify-phases %standard-phases
7613 (replace
7614 'install
7615 (lambda* (#:key outputs #:allow-other-keys)
7616 ;; Build and install the Python bindings. The underlying
7617 ;; C++ library is apparently not meant to be installed.
7618 (let ((out (assoc-ref outputs "out")))
7619 (with-directory-excursion "py_ext"
7620 (and (system* "python" "setup.py" "build")
7621 (system* "python" "setup.py" "install"
7622 (string-append "--prefix=" out))))))))))
7623 (inputs `(("python" ,python-wrapper))) ;for the bindings
7624 (synopsis "Fuzzy matching library for Python")
7625 (description
7626 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7627Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7628value which can be used for similarity comparisons. Similar objects have
7629similar hash values, which allows for the detection of similar objects by
7630comparing their hash values. The byte stream should have a sufficient amount
7631of complexity; for example, a byte stream of identical bytes will not generate
7632a hash value.")
3f641af0 7633 (license license:asl2.0)))
d8c4998f
LC
7634
7635(define-public python2-tlsh
7636 (package
7637 (inherit python-tlsh)
7638 (name "python2-tlsh")
7639 (inputs `(("python" ,python-2)))))
d96034ed 7640
67f66812
BW
7641(define-public python-termcolor
7642 (package
7643 (name "python-termcolor")
7644 (version "1.1.0")
7645 (source
7646 (origin
7647 (method url-fetch)
a5e8f597 7648 (uri (pypi-uri "termcolor" version))
67f66812
BW
7649 (sha256
7650 (base32
7651 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7652 (build-system python-build-system)
7653 (arguments
7654 ;; There are no tests.
7655 `(#:tests? #f))
7656 (home-page "http://pypi.python.org/pypi/termcolor")
7657 (synopsis "ANSII Color formatting for terminal output")
7658 (description
7659 "This package provides ANSII Color formatting for output in terminals.")
7660 (license license:expat)))
7661
7662(define-public python2-termcolor
7663 (package-with-python2 python-termcolor))
7664
d96034ed
LC
7665(define-public python-libarchive-c
7666 (package
7667 (name "python-libarchive-c")
03fd001c 7668 (version "2.2")
d96034ed
LC
7669 (source (origin
7670 (method url-fetch)
03fd001c 7671 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
7672 (sha256
7673 (base32
03fd001c 7674 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
7675 (build-system python-build-system)
7676 (arguments
7677 '(#:phases (modify-phases %standard-phases
7678 (add-before
7679 'build 'reference-libarchive
7680 (lambda* (#:key inputs #:allow-other-keys)
7681 ;; Retain the absolute file name of libarchive.so.
7682 (let ((libarchive (assoc-ref inputs "libarchive")))
7683 (substitute* "libarchive/ffi.py"
7684 (("find_library\\('archive'\\)")
7685 (string-append "'" libarchive
b41a05ce 7686 "/lib/libarchive.so'")))))))))
d96034ed 7687 (inputs
f3b98f4f 7688 `(("libarchive" ,libarchive)))
d96034ed
LC
7689 (home-page "https://github.com/Changaco/python-libarchive-c")
7690 (synopsis "Python interface to libarchive")
7691 (description
7692 "This package provides Python bindings to libarchive, a C library to
7693access possibly compressed archives in many different formats. It uses
7694Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 7695 (license license:lgpl2.0+)))
d96034ed
LC
7696
7697(define-public python2-libarchive-c
7698 (package-with-python2 python-libarchive-c))
5e1c9367
LC
7699
7700(define-public python-file
7701 (package
7702 (inherit file)
7703 (name "python-file")
7ffa5d4a
LF
7704 (source (origin
7705 (inherit (package-source file))
7706 ;; This patch should not be applied to python2-file.
7707 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
7708 (build-system python-build-system)
7709 (arguments
7710 '(#:tests? #f ;no tests
00bf74be 7711 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
7712 #:phases (modify-phases %standard-phases
7713 (add-before 'build 'change-directory
7714 (lambda _
7715 (chdir "python")
7716 #t))
7717 (add-before 'build 'set-library-file-name
7718 (lambda* (#:key inputs #:allow-other-keys)
7719 (let ((file (assoc-ref inputs "file")))
7720 (substitute* "magic.py"
7721 (("find_library\\('magic'\\)")
7722 (string-append "'" file "/lib/libmagic.so'")))
7723 #t))))))
7724 (inputs `(("file" ,file)))
7725 (self-native-input? #f)
daeeea71
CM
7726 (synopsis "Python bindings to the libmagic file type guesser. Note that
7727this module and the python-magic module both provide a \"magic.py\" file;
7728these two modules, which are different and were developed separately, both
f210e944 7729serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
7730
7731(define-public python2-file
f210e944 7732 (package-with-python2 python-file))
85d4aeac
LC
7733
7734(define-public python-debian
7735 (package
7736 (name "python-debian")
02d7f337 7737 (version "0.1.28")
85d4aeac
LC
7738 (source
7739 (origin
7740 (method url-fetch)
5e217a8b 7741 (uri (pypi-uri name version))
85d4aeac
LC
7742 (sha256
7743 (base32
02d7f337 7744 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
85d4aeac 7745 (build-system python-build-system)
f22efa01 7746 (propagated-inputs
85d4aeac 7747 `(("python-six" ,python-six)))
85d4aeac
LC
7748 (home-page "http://packages.debian.org/sid/python-debian")
7749 (synopsis "Debian package related modules")
7750 (description
5c7bdc9a
LC
7751 ;; XXX: Use @enumerate instead of @itemize to work around
7752 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
7753 "This package provides Python modules that abstract many formats of
7754Debian-related files, such as:
7755
5c7bdc9a 7756@enumerate
85d4aeac
LC
7757@item Debtags information;
7758@item @file{debian/changelog} files;
7759@item packages files, pdiffs;
7760@item control files of single or multiple RFC822-style paragraphs---e.g.
7761 @file{debian/control}, @file{.changes}, @file{.dsc};
7762@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7763 contained files and meta-information.
5c7bdc9a 7764@end enumerate\n")
85d4aeac
LC
7765
7766 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 7767 (license license:gpl3+)))
85d4aeac
LC
7768
7769(define-public python2-debian
7770 (package-with-python2 python-debian))
816a6538 7771
2d321bb2
RW
7772(define-public python-nbformat
7773 (package
7774 (name "python-nbformat")
7775 (version "4.1.0")
7776 (source
7777 (origin
7778 (method url-fetch)
7779 (uri (pypi-uri "nbformat" version))
7780 (sha256
7781 (base32
7782 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7783 (build-system python-build-system)
7784 (arguments `(#:tests? #f)) ; no test target
7785 (propagated-inputs
7786 `(("python-ipython-genutils" ,python-ipython-genutils)
7787 ("python-jsonschema" ,python-jsonschema)
7788 ("python-jupyter-core" ,python-jupyter-core)
7789 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
7790 (home-page "http://jupyter.org")
7791 (synopsis "Jupyter Notebook format")
7792 (description "This package provides the reference implementation of the
7793Jupyter Notebook format and Python APIs for working with notebooks.")
7794 (license license:bsd-3)))
7795
7796(define-public python2-nbformat
7797 (package-with-python2 python-nbformat))
7798
55436048
RW
7799(define-public python-bleach
7800 (package
7801 (name "python-bleach")
7802 (version "1.4.3")
7803 (source
7804 (origin
7805 (method url-fetch)
7806 (uri (pypi-uri "bleach" version))
7807 (sha256
7808 (base32
7809 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7810 (build-system python-build-system)
7811 (propagated-inputs
7812 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
7813 ("python-six" ,python-six)))
7814 (native-inputs
7815 `(("python-nose" ,python-nose)))
7bf837fd 7816 (home-page "https://github.com/jsocol/bleach")
55436048
RW
7817 (synopsis "Whitelist-based HTML-sanitizing tool")
7818 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7819 (license license:asl2.0)))
7820
7821(define-public python2-bleach
7822 (package-with-python2 python-bleach))
7823
60590a3a
RW
7824(define-public python-entrypoints
7825 (package
7826 (name "python-entrypoints")
7827 (version "0.2.2")
7828 (source
7829 (origin
7830 (method url-fetch)
7831 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7832 version ".tar.gz"))
7833 (file-name (string-append name "-" version ".tar.gz"))
7834 (sha256
7835 (base32
7836 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7837 (build-system python-build-system)
7838 ;; The package does not come with a setup.py file, so we have to generate
7839 ;; one ourselves.
7840 (arguments
7841 `(#:tests? #f
7842 #:phases
7843 (modify-phases %standard-phases
7844 (add-after 'unpack 'create-setup.py
7845 (lambda _
7846 (call-with-output-file "setup.py"
7847 (lambda (port)
7848 (format port "\
7849from setuptools import setup
7850setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7851" ,version))))))))
7852 (home-page "https://github.com/takluyver/entrypoints")
7853 (synopsis "Discover and load entry points from installed Python packages")
7854 (description "Entry points are a way for Python packages to advertise
7855objects with some common interface. The most common examples are
7856@code{console_scripts} entry points, which define shell commands by
7857identifying a Python function to run. The @code{entrypoints} module contains
7858functions to find and load entry points.")
7859 (license license:expat)))
7860
7861(define-public python2-entrypoints
7862 (package-with-python2 python-entrypoints))
7863
c60898a8
RW
7864(define-public python-nbconvert
7865 (package
7866 (name "python-nbconvert")
7867 (version "5.0.0b1")
7868 (source
7869 (origin
7870 (method url-fetch)
7871 (uri (pypi-uri "nbconvert" version))
7872 (sha256
7873 (base32
7874 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7875 (build-system python-build-system)
497355dc
MB
7876 (arguments
7877 `(;; The "bdist_egg" target is disabled by default, causing the installation
7878 ;; to fail.
7879 #:configure-flags (list "bdist_egg")
7880 ;; FIXME: 5 failures, 40 errors.
7881 #:tests? #f))
7882 ;; #:phases
7883 ;; (modify-phases %standard-phases
7884 ;; (replace 'check
7885 ;; (lambda _
7886 ;; (zero? (system* "py.test" "-v")))))
7887 (native-inputs
7888 `(("python-pytest" ,python-pytest)))
c60898a8
RW
7889 (propagated-inputs
7890 `(("python-bleach" ,python-bleach)
7891 ("python-entrypoints" ,python-entrypoints)
7892 ("python-jinja2" ,python-jinja2)
7893 ("python-jupyter-core" ,python-jupyter-core)
7894 ("python-mistune" ,python-mistune)
7895 ("python-nbformat" ,python-nbformat)
7896 ("python-pygments" ,python-pygments)
c60898a8
RW
7897 ("python-traitlets" ,python-traitlets)))
7898 (home-page "http://jupyter.org")
7899 (synopsis "Converting Jupyter Notebooks")
7900 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7901notebooks to various other formats via Jinja templates. It allows you to
7902convert an @code{.ipynb} notebook file into various static formats including:
7903
7904@enumerate
7905@item HTML
7906@item LaTeX
7907@item PDF
7908@item Reveal JS
7909@item Markdown (md)
7910@item ReStructured Text (rst)
7911@item executable script
7912@end enumerate\n")
7913 (license license:bsd-3)))
7914
7915(define-public python2-nbconvert
7916 (package-with-python2 python-nbconvert))
7917
a0d62280
RW
7918(define-public python-notebook
7919 (package
7920 (name "python-notebook")
7921 (version "4.2.3")
7922 (source (origin
7923 (method url-fetch)
7924 (uri (pypi-uri "notebook" version))
7925 (sha256
7926 (base32
7927 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7928 (build-system python-build-system)
7929 (arguments
7930 `(#:phases
7931 (modify-phases %standard-phases
7932 (replace 'check
7933 (lambda _
7934 ;; HOME must be set for tests
7935 (setenv "HOME" "/tmp")
7936 (zero? (system* "nosetests")))))))
7937 (propagated-inputs
7938 `(("python-jupyter-core" ,python-jupyter-core)
7939 ("python-nbformat" ,python-nbformat)
7940 ("python-nbconvert" ,python-nbconvert)
7941 ("python-ipython" ,python-ipython)))
7942 (native-inputs
7943 `(("python-nose" ,python-nose)
7944 ("python-sphinx" ,python-sphinx)
7945 ("python-requests" ,python-requests)))
7946 (home-page "http://jupyter.org/")
7947 (synopsis "Web-based notebook environment for interactive computing")
7948 (description
7949 "The Jupyter HTML notebook is a web-based notebook environment for
7950interactive computing.")
3a735ecf 7951 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
7952 (license license:bsd-3)))
7953
7954(define-public python2-notebook
3a735ecf
HG
7955 (let ((base (package-with-python2
7956 (strip-python2-variant python-notebook))))
7957 (package (inherit base)
7958 (native-inputs
7959 `(("python2-mock" ,python2-mock)
7960 ,@(package-native-inputs base)))
7961 (arguments
7962 (substitute-keyword-arguments (package-arguments base)
7963 ((#:phases phases)
7964 `(modify-phases ,phases
7965 (add-before 'check 'disable-test-case
7966 ;; The test requires network access to localhost. Curiously it
7967 ;; fails with Python 2 only. Simply make the test-case return
7968 ;; immediately.
7969 (lambda _
7970 (substitute*
7971 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7972 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7973
d55724ed
RW
7974(define-public python-widgetsnbextension
7975 (package
7976 (name "python-widgetsnbextension")
7977 (version "1.2.6")
7978 (source
7979 (origin
7980 (method url-fetch)
7981 (uri (pypi-uri "widgetsnbextension" version))
7982 (sha256
7983 (base32
7984 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7985 (build-system python-build-system)
7986 (propagated-inputs
7987 `(("python-notebook" ,python-notebook)))
7988 (native-inputs
58f5fae7
MB
7989 `(("python-certifi" ,python-certifi)
7990 ("python-nose" ,python-nose)))
d55724ed
RW
7991 (home-page "http://ipython.org")
7992 (synopsis "IPython HTML widgets for Jupyter")
7993 (description "This package provides interactive HTML widgets for Jupyter
7994notebooks.")
7995 (license license:bsd-3)))
7996
7997(define-public python2-widgetsnbextension
7998 (package-with-python2 python-widgetsnbextension))
7999
4fe2e344
RW
8000(define-public python-ipywidgets
8001 (package
8002 (name "python-ipywidgets")
8003 (version "5.2.2")
8004 (source
8005 (origin
8006 (method url-fetch)
8007 (uri (pypi-uri "ipywidgets" version))
8008 (sha256
8009 (base32
8010 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8011 (build-system python-build-system)
8012 ;; FIXME: it's not clear how to run the tests.
8013 (arguments `(#:tests? #f))
8014 (propagated-inputs
8015 `(("python-ipykernel" ,python-ipykernel)
8016 ("python-ipython" ,python-ipython)
4fe2e344
RW
8017 ("python-traitlets" ,python-traitlets)
8018 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8019 (home-page "http://ipython.org")
8020 (synopsis "IPython HTML widgets for Jupyter")
8021 (description "Ipywidgets are interactive HTML widgets for Jupyter
8022notebooks and the IPython kernel. Notebooks come alive when interactive
8023widgets are used. Users gain control of their data and can visualize changes
8024in the data.")
8025 (license license:bsd-3)))
8026
8027(define-public python2-ipywidgets
8028 (package-with-python2 python-ipywidgets))
8029
8ceebf8f
RW
8030(define-public python-jupyter-console
8031 (package
8032 (name "python-jupyter-console")
8033 (version "5.0.0")
8034 (source
8035 (origin
8036 (method url-fetch)
8037 (uri (pypi-uri "jupyter_console" version))
8038 (sha256
8039 (base32
8040 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
8041 (build-system python-build-system)
8042 ;; FIXME: it's not clear how to run the tests.
8043 (arguments `(#:tests? #f))
8044 (propagated-inputs
8045 `(("python-ipykernel" ,python-ipykernel)
8046 ("python-ipython" ,python-ipython)
8047 ("python-jupyter-client" ,python-jupyter-client)
8048 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 8049 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
8050 (home-page "https://jupyter.org")
8051 (synopsis "Jupyter terminal console")
8052 (description "This package provides a terminal-based console frontend for
8053Jupyter kernels. It also allows for console-based interaction with non-Python
8054Jupyter kernels such as IJulia and IRKernel.")
8055 (license license:bsd-3)))
8056
8057(define-public python2-jupyter-console
8058 (package-with-python2 python-jupyter-console))
8059
c27ae827
RW
8060(define-public jupyter
8061 (package
8062 (name "jupyter")
8063 (version "1.0.0")
8064 (source
8065 (origin
8066 (method url-fetch)
8067 (uri (pypi-uri "jupyter" version))
8068 (sha256
8069 (base32
8070 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8071 (build-system python-build-system)
8072 ;; FIXME: it's not clear how to run the tests.
8073 (arguments `(#:tests? #f))
8074 (propagated-inputs
8075 `(("python-ipykernel" ,python-ipykernel)
8076 ("python-ipywidgets" ,python-ipywidgets)
8077 ("python-jupyter-console" ,python-jupyter-console)
8078 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 8079 ("python-notebook" ,python-notebook)))
c27ae827
RW
8080 (home-page "http://jupyter.org")
8081 (synopsis "Web application for interactive documents")
8082 (description
8083 "The Jupyter Notebook is a web application that allows you to create and
8084share documents that contain live code, equations, visualizations and
8085explanatory text. Uses include: data cleaning and transformation, numerical
8086simulation, statistical modeling, machine learning and much more.")
8087 (license license:bsd-3)))
8088
816a6538
LC
8089(define-public python-chardet
8090 (package
8091 (name "python-chardet")
8092 (version "2.3.0")
8093 (source
8094 (origin
8095 (method url-fetch)
8096 (uri (string-append
8097 "https://pypi.python.org/packages/source/c/chardet/chardet-"
8098 version
8099 ".tar.gz"))
8100 (sha256
8101 (base32
8102 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
8103 (build-system python-build-system)
816a6538
LC
8104 (home-page "https://github.com/chardet/chardet")
8105 (synopsis "Universal encoding detector for Python 2 and 3")
8106 (description
8107 "This package provides @code{chardet}, a Python module that can
8108automatically detect a wide range of file encodings.")
3f641af0 8109 (license license:lgpl2.1+)))
816a6538
LC
8110
8111(define-public python2-chardet
8112 (package-with-python2 python-chardet))
2fc5f186 8113
1872f1bb
KM
8114(define-public python-docopt
8115 (package
8116 (name "python-docopt")
8117 (version "0.6.2")
8118 (source
8119 (origin
8120 (method url-fetch)
8121 ;; The release on PyPI does not include tests.
8122 (uri (string-append
8123 "https://github.com/docopt/docopt/archive/"
8124 version ".tar.gz"))
8125 (file-name (string-append name "-" version ".tar.gz"))
8126 (sha256
8127 (base32
8128 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8129 (build-system python-build-system)
8130 (native-inputs
f3b98f4f 8131 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
8132 (arguments
8133 `(#:phases (alist-replace
8134 'check
8135 (lambda _ (zero? (system* "py.test")))
8136 %standard-phases)))
8137 (home-page "http://docopt.org")
8138 (synopsis "Command-line interface description language for Python")
8139 (description "This library allows the user to define a command-line
8140interface from a program's help message rather than specifying it
8141programatically with command-line parsers like @code{getopt} and
8142@code{argparse}.")
8143 (license license:expat)))
8144
8145(define-public python2-docopt
8146 (package-with-python2 python-docopt))
8147
2fc5f186
LF
8148(define-public python-zope-event
8149 (package
8150 (name "python-zope-event")
8151 (version "4.1.0")
8152 (source
8153 (origin
8154 (method url-fetch)
8155 (uri (string-append "https://pypi.python.org/packages/source/z"
8156 "/zope.event/zope.event-" version ".tar.gz"))
8157 (sha256
8158 (base32
8159 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8160 (build-system python-build-system)
2fc5f186
LF
8161 (home-page "http://pypi.python.org/pypi/zope.event")
8162 (synopsis "Event publishing system for Python")
8163 (description "Zope.event provides an event publishing API, intended for
8164use by applications which are unaware of any subscribers to their events. It
8165is a simple event-dispatching system on which more sophisticated event
8166dispatching systems can be built.")
3f641af0 8167 (license license:zpl2.1)))
2fc5f186
LF
8168
8169(define-public python2-zope-event
8170 (package-with-python2 python-zope-event))
97abe268
LF
8171
8172(define-public python-zope-interface
8173 (package
8174 (name "python-zope-interface")
8175 (version "4.1.3")
8176 (source
8177 (origin
8178 (method url-fetch)
8179 (uri (string-append "https://pypi.python.org/packages/source/z"
8180 "/zope.interface/zope.interface-" version ".tar.gz"))
8181 (sha256
8182 (base32
8183 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8184 (build-system python-build-system)
38d480a8 8185 (native-inputs
97abe268
LF
8186 `(("python-zope-event" ,python-zope-event)))
8187 (home-page "https://github.com/zopefoundation/zope.interface")
8188 (synopsis "Python implementation of the \"design by contract\"
8189methodology")
8190 (description "Zope.interface provides an implementation of \"object
8191interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8192conforming to a given API or contract.")
3f641af0 8193 (license license:zpl2.1)))
97abe268
LF
8194
8195(define-public python2-zope-interface
8196 (package-with-python2 python-zope-interface))
81f2373c
LF
8197
8198(define-public python-zope-exceptions
8199 (package
8200 (name "python-zope-exceptions")
8201 (version "4.0.8")
8202 (source
8203 (origin
8204 (method url-fetch)
8205 (uri (string-append "https://pypi.python.org/packages/source/z"
8206 "/zope.exceptions/zope.exceptions-"
8207 version ".tar.gz"))
8208 (sha256
8209 (base32
8210 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8211 (build-system python-build-system)
8212 (arguments
8213 '(#:tests? #f)) ; circular dependency with zope.testrunner
8214 (propagated-inputs
8215 `(("python-zope-interface" ,python-zope-interface)))
8216 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8217 (synopsis "Zope exceptions")
8218 (description "Zope.exceptions provides general-purpose exception types
8219that have uses outside of the Zope framework.")
3f641af0 8220 (license license:zpl2.1)))
81f2373c
LF
8221
8222(define-public python2-zope-exceptions
8223 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
8224
8225(define-public python-zope-testing
8226 (package
8227 (name "python-zope-testing")
8228 (version "4.5.0")
8229 (source
8230 (origin
8231 (method url-fetch)
8232 (uri (string-append "https://pypi.python.org/packages/source/z"
8233 "/zope.testing/zope.testing-" version ".tar.gz"))
8234 (sha256
8235 (base32
b02f7a21
HG
8236 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8237 (modules '((guix build utils)))
8238 (snippet
8239 '(begin
8240 ;; Remove pre-compiled .pyc files backup files from source.
8241 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8242 #t))))
900e3c0e
LF
8243 (build-system python-build-system)
8244 (native-inputs
8245 `(("python-zope-exceptions" ,python-zope-exceptions)))
8246 (propagated-inputs
8247 `(("python-zope-interface" ,python-zope-interface)))
8248 (home-page "http://pypi.python.org/pypi/zope.testing")
8249 (synopsis "Zope testing helpers")
8250 (description "Zope.testing provides a number of testing utilities for HTML
8251forms, HTTP servers, regular expressions, and more.")
3f641af0 8252 (license license:zpl2.1)))
900e3c0e
LF
8253
8254(define-public python2-zope-testing
8255 (package-with-python2 python-zope-testing))
01614c4f
LF
8256
8257(define-public python-zope-testrunner
8258 (package
8259 (name "python-zope-testrunner")
8260 (version "4.4.9")
8261 (source
8262 (origin
8263 (method url-fetch)
8264 (uri (string-append "https://pypi.python.org/packages/source/z"
8265 "/zope.testrunner/zope.testrunner-"
8266 version ".zip"))
8267 (sha256
8268 (base32
8269 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8270 (build-system python-build-system)
385871e5
MB
8271 (arguments
8272 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
8273 (native-inputs
8274 `(("python-six" ,python-six)
e408ffc3 8275 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
8276 ("python-zope-exceptions" ,python-zope-exceptions)
8277 ("python-zope-testing" ,python-zope-testing)
8278 ("unzip" ,unzip)))
8279 (propagated-inputs
8280 `(("python-zope-interface" ,python-zope-interface)))
8281 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8282 (synopsis "Zope testrunner script")
8283 (description "Zope.testrunner provides a script for running Python
8284tests.")
3f641af0 8285 (license license:zpl2.1)))
01614c4f
LF
8286
8287(define-public python2-zope-testrunner
8288 (let ((base (package-with-python2 python-zope-testrunner)))
8289 (package
8290 (inherit base)
8291 (native-inputs
8292 (append (package-native-inputs base)
8293 `(("python2-subunit" ,python2-subunit)
8294 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
8295
8296(define-public python-zope-i18nmessageid
8297 (package
8298 (name "python-zope-i18nmessageid")
8299 (version "4.0.3")
8300 (source
8301 (origin
8302 (method url-fetch)
8303 (uri (string-append
8304 "https://pypi.python.org/packages/source/z"
8305 "/zope.i18nmessageid/zope.i18nmessageid-"
8306 version ".tar.gz"))
8307 (sha256
8308 (base32
8309 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8310 (build-system python-build-system)
6a5c710c
LF
8311 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8312 (synopsis "Message identifiers for internationalization")
8313 (description "Zope.i18nmessageid provides facilities for declaring
8314internationalized messages within program source text.")
3f641af0 8315 (license license:zpl2.1)))
6a5c710c
LF
8316
8317(define-public python2-zope-i18nmessageid
8318 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
8319
8320(define-public python-zope-schema
8321 (package
8322 (name "python-zope-schema")
8323 (version "4.4.2")
8324 (source
8325 (origin
8326 (method url-fetch)
8327 (uri (string-append "https://pypi.python.org/packages/source/z"
8328 "/zope.schema/zope.schema-" version ".tar.gz"))
8329 (sha256
8330 (base32
8331 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8332 (build-system python-build-system)
22dba2ef
MB
8333 (arguments
8334 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
8335 (propagated-inputs
8336 `(("python-zope-event" ,python-zope-event)
2b9e4bea 8337 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
8338 ("python-zope-interface" ,python-zope-interface)))
8339 (native-inputs
47f77210
HG
8340 `(("python-zope-testing" ,python-zope-testing)
8341 ("python-coverage" ,python-coverage)
8342 ("python-nose" ,python-nose)))
71fb09f3
LF
8343 (home-page "http://pypi.python.org/pypi/zope.schema")
8344 (synopsis "Zope data schemas")
8345 (description "Zope.scheme provides extensions to zope.interface for
8346defining data schemas.")
3f641af0 8347 (license license:zpl2.1)))
71fb09f3
LF
8348
8349(define-public python2-zope-schema
8350 (package-with-python2 python-zope-schema))
fbac9b17
LF
8351
8352(define-public python-zope-configuration
8353 (package
8354 (name "python-zope-configuration")
8355 (version "4.0.3")
8356 (source (origin
8357 (method url-fetch)
8358 (uri (string-append "https://pypi.python.org/packages/source/z"
8359 "/zope.configuration/zope.configuration-"
8360 version ".tar.gz"))
8361 (sha256
8362 (base32
8363 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8364 (build-system python-build-system)
7e8b1bfa
MB
8365 (arguments
8366 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
8367 (propagated-inputs
8368 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8369 ("python-zope-schema" ,python-zope-schema)))
8370 (home-page "http://pypi.python.org/pypi/zope.configuration")
8371 (synopsis "Zope Configuration Markup Language")
8372 (description "Zope.configuration implements ZCML, the Zope Configuration
8373Markup Language.")
3f641af0 8374 (license license:zpl2.1)))
fbac9b17
LF
8375
8376(define-public python2-zope-configuration
8377 (package-with-python2 python-zope-configuration))
2ad52086
LF
8378
8379(define-public python-zope-proxy
8380 (package
8381 (name "python-zope-proxy")
8382 (version "4.1.6")
8383 (source
8384 (origin
8385 (method url-fetch)
8386 (uri (string-append "https://pypi.python.org/packages/source/z"
8387 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8388 (sha256
8389 (base32
8390 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8391 (build-system python-build-system)
66b3aadb
MB
8392 (arguments
8393 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
8394 (propagated-inputs
8395 `(("python-zope-interface" ,python-zope-interface)))
8396 (home-page "http://pypi.python.org/pypi/zope.proxy")
8397 (synopsis "Generic, transparent proxies")
8398 (description "Zope.proxy provides generic, transparent proxies for Python.
8399Proxies are special objects which serve as mostly-transparent wrappers around
8400another object, intervening in the apparent behavior of the wrapped object
8401only when necessary to apply the policy (e.g., access checking, location
8402brokering, etc.) for which the proxy is responsible.")
3f641af0 8403 (license license:zpl2.1)))
2ad52086
LF
8404
8405(define-public python2-zope-proxy
8406 (package-with-python2 python-zope-proxy))
f404b5ea
LF
8407
8408(define-public python-zope-location
8409 (package
8410 (name "python-zope-location")
8411 (version "4.0.3")
8412 (source
8413 (origin
8414 (method url-fetch)
8415 (uri (string-append "https://pypi.python.org/packages/source/z"
8416 "/zope.location/zope.location-" version ".tar.gz"))
8417 (sha256
8418 (base32
8419 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8420 (build-system python-build-system)
40bb8e07
MB
8421 (arguments
8422 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 8423 (propagated-inputs
f404b5ea
LF
8424 `(("python-zope-proxy" ,python-zope-proxy)
8425 ("python-zope-schema" ,python-zope-schema)))
8426 (home-page "http://pypi.python.org/pypi/zope.location/")
8427 (synopsis "Zope location library")
8428 (description "Zope.location implements the concept of \"locations\" in
8429Zope3, which are are special objects that have a structural location.")
3f641af0 8430 (license license:zpl2.1)))
f404b5ea
LF
8431
8432(define-public python2-zope-location
8433 (package-with-python2 python-zope-location))
d4b77f36
LF
8434
8435(define-public python-zope-security
8436 (package
8437 (name "python-zope-security")
8438 (version "4.0.3")
8439 (source
8440 (origin
8441 (method url-fetch)
8442 (uri (string-append "https://pypi.python.org/packages/source/z"
8443 "/zope.security/zope.security-" version ".tar.gz"))
8444 (sha256
8445 (base32
8446 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8447 (build-system python-build-system)
a74f9b12
MB
8448 (arguments
8449 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
8450 (propagated-inputs
8451 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 8452 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 8453 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
8454 (native-inputs
8455 `(("python-six" ,python-six)
8456 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
8457 ("python-zope-configuration" ,python-zope-configuration)
8458 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
8459 ("python-zope-testrunner" ,python-zope-testrunner)
8460 ("python-zope-testing" ,python-zope-testing)))
8461 (home-page "http://pypi.python.org/pypi/zope.security")
8462 (synopsis "Zope security framework")
8463 (description "Zope.security provides a generic mechanism to implement
8464security policies on Python objects.")
3f641af0 8465 (license license:zpl2.1)))
d4b77f36
LF
8466
8467(define-public python2-zope-security
04417662
EF
8468 (let ((zope-security (package-with-python2 python-zope-security)))
8469 (package (inherit zope-security)
8470 (propagated-inputs
8471 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8472 ,@(alist-delete
8473 "python-zope-testrunner"
8474 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
8475
8476(define-public python-zope-component
8477 (package
8478 (name "python-zope-component")
35e1a0f1 8479 (version "4.3.0")
a6b61b27
LF
8480 (source
8481 (origin
8482 (method url-fetch)
35e1a0f1 8483 (uri (pypi-uri "zope.component" version))
a6b61b27
LF
8484 (sha256
8485 (base32
35e1a0f1 8486 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
a6b61b27
LF
8487 (build-system python-build-system)
8488 (arguments
8489 ;; Skip tests due to circular dependency with python-zope-security.
8490 '(#:tests? #f))
8491 (native-inputs
8492 `(("python-zope-testing" ,python-zope-testing)))
8493 (propagated-inputs
8494 `(("python-zope-event" ,python-zope-event)
8495 ("python-zope-interface" ,python-zope-interface)
8496 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8497 ("python-zope-configuration" ,python-zope-configuration)))
8498 (home-page "https://github.com/zopefoundation/zope.component")
8499 (synopsis "Zope Component Architecture")
8500 (description "Zope.component represents the core of the Zope Component
8501Architecture. Together with the zope.interface package, it provides
8502facilities for defining, registering and looking up components.")
3f641af0 8503 (license license:zpl2.1)))
a6b61b27
LF
8504
8505(define-public python2-zope-component
8506 (package-with-python2 python-zope-component))
3859ac12 8507
1ae44b80 8508(define-public python-pythondialog
b5f218be 8509 (package
1ae44b80 8510 (name "python-pythondialog")
42c4b246 8511 (version "3.4.0")
b5f218be
LF
8512 (source
8513 (origin
8514 (method url-fetch)
1ae44b80 8515 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
8516 (sha256
8517 (base32
1ae44b80 8518 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
8519 (build-system python-build-system)
8520 (arguments
8521 `(#:phases
8522 (modify-phases %standard-phases
8523 (add-after 'unpack 'patch-path
8524 (lambda* (#:key inputs #:allow-other-keys)
8525 (let* ((dialog (assoc-ref inputs "dialog")))
8526 ;; Since this library really wants to grovel the search path, we
8527 ;; must hardcode dialog's store path into it.
8528 (substitute* "dialog.py"
8529 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8530 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8531 #t))))
b5f218be
LF
8532 #:tests? #f)) ; no test suite
8533 (propagated-inputs
8534 `(("dialog" ,dialog)))
8535 (home-page "http://pythondialog.sourceforge.net/")
8536 (synopsis "Python interface to the UNIX dialog utility")
8537 (description "A Python wrapper for the dialog utility. Its purpose is to
8538provide an easy to use, pythonic and comprehensive Python interface to dialog.
8539This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 8540 (license license:lgpl2.1)
1ae44b80
LF
8541 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8542
8543(define-public python2-pythondialog
8544 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8545 (package
8546 (inherit base)
8547 (version (package-version python-pythondialog))
8548 (source (origin
8549 (method url-fetch)
8550 (uri (pypi-uri "python2-pythondialog" version))
8551 (sha256
8552 (base32
8553 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 8554
3859ac12
LF
8555(define-public python-pyrfc3339
8556 (package
8557 (name "python-pyrfc3339")
d9aa097b 8558 (version "1.0")
3859ac12
LF
8559 (source
8560 (origin
8561 (method url-fetch)
d9aa097b 8562 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
8563 (sha256
8564 (base32
d9aa097b 8565 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
8566 (build-system python-build-system)
8567 (propagated-inputs
8568 `(("python-pytz" ,python-pytz)))
8569 (native-inputs
f3b98f4f 8570 `(("python-nose" ,python-nose)))
3859ac12
LF
8571 (home-page "https://github.com/kurtraschke/pyRFC3339")
8572 (synopsis "Python timestamp library")
8573 (description "Python library for generating and parsing RFC 3339-compliant
8574timestamps.")
8575 (license license:expat)))
8576
8577(define-public python2-pyrfc3339
8578 (package-with-python2 python-pyrfc3339))
5eea2005
LF
8579
8580(define-public python-werkzeug
8581 (package
8582 (name "python-werkzeug")
bbb99d6b 8583 (version "0.11.15")
5eea2005
LF
8584 (source
8585 (origin
8586 (method url-fetch)
4b47cbfa 8587 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
8588 (sha256
8589 (base32
bbb99d6b 8590 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
5eea2005
LF
8591 (build-system python-build-system)
8592 (native-inputs
8593 `(("python-pytest" ,python-pytest)))
8594 (home-page "http://werkzeug.pocoo.org/")
8595 (synopsis "Utilities for WSGI applications")
8596 (description "One of the most advanced WSGI utility modules. It includes a
8597powerful debugger, full-featured request and response objects, HTTP utilities to
8598handle entity tags, cache control headers, HTTP dates, cookie handling, file
8599uploads, a powerful URL routing system and a bunch of community-contributed
8600addon modules.")
3f641af0 8601 (license license:x11)))
5eea2005
LF
8602
8603(define-public python2-werkzeug
8604 (package-with-python2 python-werkzeug))
99fffa8a
LF
8605
8606(define-public python-configobj
8607 (package
8608 (name "python-configobj")
8609 (version "5.0.6")
8610 (source (origin
8611 (method url-fetch)
8612 (uri (string-append
8613 "https://pypi.python.org/packages/source/c/configobj/"
8614 "configobj-" version ".tar.gz"))
8615 (sha256
8616 (base32
8617 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8618 ;; Patch setup.py so it looks for python-setuptools, which is
8619 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 8620 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 8621 (build-system python-build-system)
861f70c9 8622 (propagated-inputs
f3b98f4f 8623 `(("python-six" ,python-six)))
99fffa8a
LF
8624 (synopsis "Config file reading, writing and validation")
8625 (description "ConfigObj is a simple but powerful config file reader and
8626writer: an ini file round tripper. Its main feature is that it is very easy to
8627use, with a straightforward programmer’s interface and a simple syntax for
8628config files.")
8629 (home-page "https://github.com/DiffSK/configobj")
3f641af0 8630 (license license:bsd-3)))
99fffa8a
LF
8631
8632(define-public python2-configobj
8633 (package-with-python2 python-configobj))
79e8a291
LF
8634
8635(define-public python-configargparse
8636 (package
8637 (name "python-configargparse")
8638 (version "0.10.0")
8639 (source (origin
8640 (method url-fetch)
8641 (uri (string-append
8642 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8643 "ConfigArgParse-" version ".tar.gz"))
8644 (sha256
8645 (base32
8646 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8647 (build-system python-build-system)
8648 (arguments
8649 ;; FIXME: Bug in test suite filed upstream:
8650 ;; https://github.com/bw2/ConfigArgParse/issues/32
8651 '(#:tests? #f))
8652 (synopsis "Replacement for argparse")
8653 (description "A drop-in replacement for argparse that allows options to also
8654be set via config files and/or environment variables.")
8655 (home-page "https://github.com/bw2/ConfigArgParse")
8656 (license license:expat)))
8657
8658(define-public python2-configargparse
8659 (package-with-python2 python-configargparse))
ab41f979
LF
8660
8661(define-public python-ndg-httpsclient
8662 (package
8663 (name "python-ndg-httpsclient")
ae476d01 8664 (version "0.4.2")
ab41f979
LF
8665 (source (origin
8666 (method url-fetch)
7be13d00 8667 (uri (pypi-uri "ndg_httpsclient" version))
ab41f979
LF
8668 (sha256
8669 (base32
ae476d01 8670 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
ab41f979 8671 (build-system python-build-system)
a39cc016
LF
8672 (arguments
8673 '(;; The tests appear to require networking.
8674 #:tests? #f))
ab41f979
LF
8675 (propagated-inputs
8676 `(("python-pyopenssl" ,python-pyopenssl)))
8677 (synopsis "HTTPS support for Python's httplib and urllib2")
8678 (description "This is a HTTPS client implementation for httplib and urllib2
8679based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8680over the default provided with Python and importantly enables full verification
8681of the SSL peer.")
8682 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 8683 (license license:bsd-3)))
ab41f979
LF
8684
8685;; python2-openssl requires special care, so package-with-python2 is
8686;; insufficient.
8687(define-public python2-ndg-httpsclient
8688 (package (inherit python-ndg-httpsclient)
8689 (name "python2-ndg-httpsclient")
8690 (arguments `(#:python ,python-2))
8691 (propagated-inputs
8692 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
8693
8694(define-public python-contextlib2
8695 (package
8696 (name "python-contextlib2")
8697 (version "0.4.0")
8698 (source
8699 (origin
8700 (method url-fetch)
8701 (uri (pypi-uri "contextlib2" version))
8702 (sha256
8703 (base32
8704 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8705 (build-system python-build-system)
8706 (arguments
8707 `(#:phases
8708 (modify-phases %standard-phases
8709 (replace 'check
8710 (lambda _ (zero?
8711 (system*
b3546174 8712 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
8713 (home-page "http://contextlib2.readthedocs.org/")
8714 (synopsis "Tools for decorators and context managers")
8715 (description "This module is primarily a backport of the Python
87163.2 contextlib to earlier Python versions. Like contextlib, it
8717provides utilities for common tasks involving decorators and context
8718managers. It also contains additional features that are not part of
8719the standard library.")
3f641af0 8720 (license license:psfl)))
03f964a5
CM
8721
8722(define-public python2-contextlib2
8723 (package-with-python2 python-contextlib2))
210bf497
DT
8724
8725(define-public python-texttable
8726 (package
8727 (name "python-texttable")
4c4d4df3 8728 (version "0.8.7")
210bf497
DT
8729 (source
8730 (origin
8731 (method url-fetch)
8732 (uri (pypi-uri "texttable" version))
8733 (sha256
8734 (base32
4c4d4df3 8735 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
210bf497
DT
8736 (build-system python-build-system)
8737 (arguments '(#:tests? #f)) ; no tests
8738 (home-page "https://github.com/foutaise/texttable/")
8739 (synopsis "Python module for creating simple ASCII tables")
8740 (description "Texttable is a Python module for creating simple ASCII
8741tables.")
3f641af0 8742 (license license:lgpl2.1+)))
210bf497
DT
8743
8744(define-public python2-texttable
8745 (package-with-python2 python-texttable))
67c52bb3
DT
8746
8747(define-public python-websocket-client
8748 (package
8749 (name "python-websocket-client")
6b810897 8750 (version "0.37.0")
67c52bb3
DT
8751 (source
8752 (origin
8753 (method url-fetch)
6b810897 8754 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
8755 (sha256
8756 (base32
6b810897 8757 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 8758 (build-system python-build-system)
a5333f7c
HG
8759 (propagated-inputs
8760 `(("python-six" ,python-six)))
67c52bb3
DT
8761 (home-page "https://github.com/liris/websocket-client")
8762 (synopsis "WebSocket client for Python")
8763 (description "The Websocket-client module provides the low level APIs for
8764WebSocket usage in Python programs.")
3f641af0 8765 (license license:lgpl2.1+)))
67c52bb3
DT
8766
8767(define-public python2-websocket-client
8768 (package-with-python2 python-websocket-client))
5c6eea2a
LF
8769
8770(define-public python-atomicwrites
8771 (package
8772 (name "python-atomicwrites")
c56ad5e2 8773 (version "1.1.5")
5c6eea2a
LF
8774 (source (origin
8775 (method url-fetch)
8776 (uri (pypi-uri "atomicwrites" version))
8777 (sha256
8778 (base32
c56ad5e2 8779 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
5c6eea2a
LF
8780 (build-system python-build-system)
8781 (synopsis "Atomic file writes in Python")
8782 (description "Library for atomic file writes using platform dependent tools
8f65585b 8783for atomic file system operations.")
5c6eea2a 8784 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 8785 (license license:expat)))
9bb6d184
LF
8786
8787(define-public python2-atomicwrites
f210e944 8788 (package-with-python2 python-atomicwrites))
561bb3cb
LF
8789
8790(define-public python-requests-toolbelt
8791 (package
8792 (name "python-requests-toolbelt")
c02af1c8 8793 (version "0.6.2")
561bb3cb
LF
8794 (source (origin
8795 (method url-fetch)
c02af1c8
LF
8796 (uri (string-append
8797 "https://pypi.python.org/packages/"
8798 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8799 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
8800 (sha256
8801 (base32
c02af1c8 8802 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 8803 (build-system python-build-system)
759aadd4
LF
8804 (native-inputs
8805 `(("python-betamax" ,python-betamax)
8806 ("python-mock" ,python-mock)
8807 ("python-pytest" ,python-pytest)))
561bb3cb
LF
8808 (propagated-inputs
8809 `(("python-requests" ,python-requests)))
8810 (synopsis "Extensions to python-requests")
8811 (description "This is a toolbelt of useful classes and functions to be used
8812with python-requests.")
8813 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 8814 (license license:asl2.0)))
d1deb90b
LF
8815
8816(define-public python-click-threading
8817 (package
8818 (name "python-click-threading")
3d2e0dbc 8819 (version "0.2.0")
d1deb90b
LF
8820 (source (origin
8821 (method url-fetch)
3d2e0dbc
LF
8822 (uri (string-append
8823 "https://pypi.python.org/packages/"
8824 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8825 "click-threading-" version ".tar.gz"))
d1deb90b
LF
8826 (sha256
8827 (base32
3d2e0dbc 8828 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
8829 (build-system python-build-system)
8830 (propagated-inputs
8831 `(("python-click" ,python-click)))
8832 (synopsis "Utilities for multithreading in Click")
8833 (description "This package provides utilities for multithreading in Click
8834applications.")
8835 (home-page "https://github.com/click-contrib/click-threading")
8836 (license license:expat)))
7b17cab9
LF
8837
8838(define-public python-click-log
8839 (package
8840 (name "python-click-log")
42734b9a 8841 (version "0.1.8")
7b17cab9
LF
8842 (source (origin
8843 (method url-fetch)
8844 (uri (pypi-uri "click-log" version))
8845 (sha256
8846 (base32
42734b9a 8847 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
7b17cab9
LF
8848 (build-system python-build-system)
8849 (propagated-inputs
8850 `(("python-click" ,python-click)))
8851 (synopsis "Logging for click applications")
8852 (description "This package provides a Python library for logging Click
8853applications.")
8854 (home-page "https://github.com/click-contrib/click-log")
8855 (license license:expat)))
7b3a4ee4
LF
8856
8857(define-public python-apipkg
8858 (package
8859 (name "python-apipkg")
8860 (version "1.4")
8861 (source (origin
8862 (method url-fetch)
8863 (uri (pypi-uri "apipkg" version))
8864 (sha256
8865 (base32
8866 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8867 (build-system python-build-system)
328bb95d 8868 (native-inputs
7b3a4ee4
LF
8869 `(("python-pytest" ,python-pytest)))
8870 (synopsis "Namespace control and lazy-import mechanism")
8871 (description "With apipkg you can control the exported namespace of a Python
8872package and greatly reduce the number of imports for your users. It is a small
8873pure Python module that works on virtually all Python versions.")
8874 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 8875 (license license:expat)))
e08739c3
CAW
8876
8877(define-public python2-apipkg
f210e944 8878 (package-with-python2 python-apipkg))
848964fe
LF
8879
8880(define-public python-execnet
8881 (package
8882 (name "python-execnet")
8883 (version "1.4.1")
8884 (source (origin
8885 (method url-fetch)
8886 (uri (pypi-uri "execnet" version))
8887 (sha256
8888 (base32
8889 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8890 (build-system python-build-system)
ca0eee9d
LF
8891 (arguments
8892 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8893 ;; The two test failures are caused by the lack of an `ssh` executable.
8894 ;; The test suite can be run with pytest after the 'install' phase.
8895 #:tests? #f))
848964fe 8896 (native-inputs
ca0eee9d
LF
8897 `(("python-pytest" ,python-pytest)
8898 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 8899 (propagated-inputs
848964fe
LF
8900 `(("python-apipkg" ,python-apipkg)))
8901 (synopsis "Rapid multi-Python deployment")
8902 (description "Execnet provides a share-nothing model with
8903channel-send/receive communication for distributing execution across many
8904Python interpreters across version, platform and network barriers. It has a
d1e4ad1b 8905minimal and fast API targeting the following uses:
848964fe
LF
8906@enumerate
8907@item distribute tasks to (many) local or remote CPUs
8908@item write and deploy hybrid multi-process applications
8909@item write scripts to administer multiple environments
8910@end enumerate")
8911 (home-page "http://codespeak.net/execnet/")
f210e944 8912 (license license:expat)))
16c84f90
CAW
8913
8914(define-public python2-execnet
f210e944 8915 (package-with-python2 python-execnet))
6720dbb4 8916
d5bbf806 8917(define-public python-trollius-redis
8918 (package
8919 (name "python-trollius-redis")
8920 (version "0.1.4")
8921 (source
8922 (origin
8923 (method url-fetch)
8924 (uri (pypi-uri "trollius_redis" version))
8925 (sha256
8926 (base32
8927 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8928 (build-system python-build-system)
97b62eb0
MB
8929 ;; TODO: Tests require packaging 'hiredis'.
8930 (arguments '(#:tests? #f))
d5bbf806 8931 (home-page "https://github.com/benjolitz/trollius-redis")
8932 (synopsis "Port of asyncio-redis to trollius")
8933 (description "@code{trollius-redis} is a Redis client for Python
8934 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8935 Redis protocol.")
8936 (license license:bsd-2)))
8937
8938(define-public python2-trollius-redis
8939 (package-with-python2 python-trollius-redis))
8940
6720dbb4
LF
8941;;; The software provided by this package was integrated into pytest 2.8.
8942(define-public python-pytest-cache
8943 (package
8944 (name "python-pytest-cache")
8945 (version "1.0")
8946 (source (origin
8947 (method url-fetch)
8948 (uri (pypi-uri "pytest-cache" version))
8949 (sha256
8950 (base32
8951 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8952 (build-system python-build-system)
f22efa01 8953 (propagated-inputs
630d938f
EF
8954 `(("python-apipkg" ,python-apipkg)
8955 ("python-execnet" ,python-execnet)
8956 ("python-py" ,python-py)
8957 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8958 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8959 (description "The pytest-cache plugin provides tools to rerun failures from
8960the last py.test invocation.")
8961 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 8962 (license license:expat)))
0adc21c2
EF
8963
8964(define-public python2-pytest-cache
f210e944 8965 (package-with-python2 python-pytest-cache))
d7e729fe
LF
8966
8967(define-public python-pytest-localserver
8968 (package
8969 (name "python-pytest-localserver")
29f20168 8970 (version "0.3.5")
d7e729fe
LF
8971 (source (origin
8972 (method url-fetch)
29f20168 8973 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8974 (sha256
8975 (base32
29f20168 8976 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8977 (build-system python-build-system)
8978 (arguments
8979 `(#:phases (modify-phases %standard-phases
8980 (replace 'check
8981 (lambda _
8982 (zero? (system* "py.test" "--genscript=runtests.py"))
8983 (zero? (system* "py.test")))))))
8984 (native-inputs
d7e729fe
LF
8985 `(("python-pytest" ,python-pytest)
8986 ("python-requests" ,python-requests)
9ba40f05 8987 ("python-six" ,python-six)))
f22efa01 8988 (propagated-inputs
9ba40f05 8989 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8990 (synopsis "Py.test plugin to test server connections locally")
8991 (description "Pytest-localserver is a plugin for the pytest testing
8992framework which enables you to test server connections locally.")
8993 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8994 (license license:expat)))
28cecbb7
LF
8995
8996(define-public python-wsgi-intercept
8997 (package
8998 (name "python-wsgi-intercept")
909fbd2b 8999 (version "1.2.2")
28cecbb7
LF
9000 (source (origin
9001 (method url-fetch)
909fbd2b
LF
9002 (uri (string-append
9003 "https://pypi.python.org/packages/"
9004 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
9005 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
9006 (sha256
9007 (base32
909fbd2b 9008 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 9009 (build-system python-build-system)
b9fc496f
HG
9010 (propagated-inputs
9011 `(("python-six" ,python-six)))
28cecbb7 9012 (native-inputs
9d813ec1 9013 `(("python-pytest" ,python-pytest)
b9fc496f
HG
9014 ("python-httplib2" ,python-httplib2)
9015 ("python-requests" ,python-requests)
8757f050 9016 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
9017 (synopsis "Puts a WSGI application in place of a real URI for testing")
9018 (description "Wsgi_intercept installs a WSGI application in place of a real
9019URI for testing. Testing a WSGI application normally involves starting a
9020server at a local host and port, then pointing your test code to that address.
9021Instead, this library lets you intercept calls to any specific host/port
9022combination and redirect them into a WSGI application importable by your test
9023program. Thus, you can avoid spawning multiple processes or threads to test
9024your Web app.")
9025 (home-page "https://github.com/cdent/wsgi-intercept")
9026 (license license:expat)))
89b8a551
LF
9027
9028(define-public python-pytest-xprocess
9029 (package
9030 (name "python-pytest-xprocess")
9031 (version "0.9.1")
9032 (source (origin
9033 (method url-fetch)
9034 (uri (pypi-uri "pytest-xprocess" version))
9035 (sha256
9036 (base32
9037 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
9038 (build-system python-build-system)
9039 (propagated-inputs
9040 `(("python-pytest" ,python-pytest)
9041 ("python-pytest-cache" ,python-pytest-cache)
9042 ("python-psutil" ,python-psutil)))
9043 (synopsis "Pytest plugin to manage external processes across test runs")
9044 (description "Pytest-xprocess is an experimental py.test plugin for managing
9045processes across test runs.")
9046 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
9047 (license license:expat)))
5c299bf0
LF
9048
9049(define-public python-icalendar
9050 (package
9051 (name "python-icalendar")
93013f1e 9052 (version "3.11.5")
5c299bf0
LF
9053 (source (origin
9054 (method url-fetch)
9055 (uri (pypi-uri "icalendar" version))
9056 (sha256
9057 (base32
93013f1e 9058 "0y6f2js983ag0d138xx4pzyc71gf44hyqmjsdvw6pq2xrkpj8jzk"))))
5c299bf0
LF
9059 (build-system python-build-system)
9060 (propagated-inputs
22d7360b 9061 `(("python-dateutil" ,python-dateutil)
5c299bf0
LF
9062 ("python-pytz" ,python-pytz)))
9063 (synopsis "Python library for parsing iCalendar files")
9064 (description "The icalendar package is a parser/generator of iCalendar
9065files for use with Python.")
9066 (home-page "https://github.com/collective/icalendar")
3f641af0 9067 (license license:bsd-2)))
6bbbb53e
LF
9068
9069(define-public python-sphinxcontrib-newsfeed
9070 (package
9071 (name "python-sphinxcontrib-newsfeed")
9072 (version "0.1.4")
9073 (source (origin
9074 (method url-fetch)
9075 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
9076 (sha256
9077 (base32
9078 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
3d2a544c 9079 (arguments '(#:tests? #f)) ; No tests.
6bbbb53e
LF
9080 (build-system python-build-system)
9081 (propagated-inputs
251ed7f2 9082 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
9083 (synopsis "News Feed extension for Sphinx")
9084 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
9085Blog, News or Announcements section to a Sphinx website.")
9086 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 9087 (license license:bsd-2)))
2216e15c
SB
9088
9089(define-public python-args
9090 (package
9091 (name "python-args")
9092 (version "0.1.0")
9093 (source (origin
9094 (method url-fetch)
9095 (uri (pypi-uri "args" version))
9096 (sha256
9097 (base32
9098 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9099 (build-system python-build-system)
2216e15c
SB
9100 (home-page "https://github.com/kennethreitz/args")
9101 (synopsis "Command-line argument parser")
9102 (description
9103 "This library provides a Python module to parse command-line arguments.")
3f641af0 9104 (license license:bsd-3)))
2216e15c
SB
9105
9106(define-public python2-args
9107 (package-with-python2 python-args))
c06a3de9
SB
9108
9109(define-public python-clint
9110 (package
9111 (name "python-clint")
9112 (version "0.5.1")
9113 (source (origin
9114 (method url-fetch)
9115 (uri (pypi-uri "clint" version))
9116 (sha256
9117 (base32
9118 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9119 (build-system python-build-system)
6145b604
MB
9120 (arguments
9121 '(#:phases
9122 (modify-phases %standard-phases
9123 (replace 'check
9124 (lambda _
9125 (zero? (system* "py.test" "-v")))))))
9126 (native-inputs
9127 `(("python-pytest" ,python-pytest)))
f22efa01 9128 (propagated-inputs
f3b98f4f 9129 `(("python-args" ,python-args)))
c06a3de9
SB
9130 (home-page "https://github.com/kennethreitz/clint")
9131 (synopsis "Command-line interface tools")
9132 (description
9133 "Clint is a Python module filled with a set of tools for developing
9134command-line applications, including tools for colored and indented
9135output, progress bar display, and pipes.")
3f641af0 9136 (license license:isc)))
c06a3de9
SB
9137
9138(define-public python2-clint
9139 (package-with-python2 python-clint))
4ecdeef8
SB
9140
9141(define-public python-astor
9142 (package
9143 (name "python-astor")
9144 (version "0.5")
9145 (source (origin
9146 (method url-fetch)
9147 (uri (pypi-uri "astor" version))
9148 (sha256
9149 (base32
9150 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9151 (build-system python-build-system)
4ecdeef8
SB
9152 (home-page "https://github.com/berkerpeksag/astor")
9153 (synopsis "Read and write Python ASTs")
9154 (description
9155 "Astor is designed to allow easy manipulation of Python source via the
9156Abstract Syntax Tree.")
3f641af0 9157 (license license:bsd-3)))
4ecdeef8
SB
9158
9159(define-public python2-astor
9160 (package-with-python2 python-astor))
e224b7d0
SB
9161
9162(define-public python-rply
9163 (package
9164 (name "python-rply")
9165 (version "0.7.4")
9166 (source (origin
9167 (method url-fetch)
9168 (uri (pypi-uri "rply" version))
9169 (sha256
9170 (base32
9171 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9172 (build-system python-build-system)
f22efa01 9173 (propagated-inputs
f3b98f4f 9174 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
9175 (home-page "https://github.com/alex/rply")
9176 (synopsis "Parser generator for Python")
9177 (description
9178 "This package provides a pure Python based parser generator, that also
9179works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9180with a new public API, and RPython support.")
3f641af0 9181 (license license:bsd-3)))
e224b7d0
SB
9182
9183(define-public python2-rply
9184 (package-with-python2 python-rply))
c3e919d7
SB
9185
9186(define-public python-hy
9187 (package
9188 (name "python-hy")
9189 (version "0.11.1")
9190 (source (origin
9191 (method url-fetch)
9192 (uri (pypi-uri "hy" version))
9193 (sha256
9194 (base32
9195 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9196 (build-system python-build-system)
15c37077
MB
9197 (arguments
9198 '(#:phases
9199 (modify-phases %standard-phases
9200 (replace 'check
9201 (lambda _
9202 ;; Tests require write access to HOME.
9203 (setenv "HOME" "/tmp")
9204 (zero? (system* "nosetests")))))))
9205 (native-inputs
9206 `(("python-coverage" ,python-coverage)
9207 ("python-nose" ,python-nose)))
f22efa01 9208 (propagated-inputs
c3e919d7
SB
9209 `(("python-astor" ,python-astor)
9210 ("python-clint" ,python-clint)
f3b98f4f 9211 ("python-rply" ,python-rply)))
c3e919d7
SB
9212 (home-page "http://hylang.org/")
9213 (synopsis "Lisp frontend to Python")
9214 (description
9215 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9216its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9217Python at your fingertips, in Lisp form.")
9218 (license license:expat)))
9219
9220(define-public python2-hy
9221 (package-with-python2 python-hy))
7a5b944e 9222
81f7f297
EF
9223(define-public python-rauth
9224 (package
9225 (name "python-rauth")
06fe79f2 9226 (version "0.7.3")
81f7f297
EF
9227 (source
9228 (origin
9229 (method url-fetch)
9230 (uri (pypi-uri "rauth" version))
9231 (sha256
9232 (base32
06fe79f2 9233 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
81f7f297
EF
9234 (build-system python-build-system)
9235 (arguments
9236 `(#:test-target "check"))
f22efa01 9237 (propagated-inputs
81f7f297
EF
9238 `(("python-requests" ,python-requests)))
9239 (home-page "https://github.com/litl/rauth")
9240 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9241 (description
9242 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9243provides service wrappers for convenient connection initialization and
9244authenticated session objects providing things like keep-alive.")
0848d8d3
EF
9245 (license license:expat)
9246 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
9247
9248(define-public python2-rauth
0848d8d3
EF
9249 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9250 (package
9251 (inherit base)
00e10c6e 9252 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 9253 ,@(package-native-inputs base))))))
81f7f297 9254
1abe448d
EF
9255(define-public python2-functools32
9256 (package
9257 (name "python2-functools32")
9258 (version "3.2.3-2")
9259 (source
9260 (origin
9261 (method url-fetch)
9262 (uri (pypi-uri "functools32" version))
9263 (sha256
9264 (base32
9265 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9266 (build-system python-build-system)
9267 (arguments
9268 `(#:python ,python-2
9269 #:tests? #f)) ; no test target
1abe448d
EF
9270 (home-page "https://github.com/MiCHiLU/python-functools32")
9271 (synopsis
9272 "Backport of the functools module from Python 3.2.3")
9273 (description
9274 "This package is a backport of the @code{functools} module from Python
92753.2.3 for use with older versions of Python and PyPy.")
9276 (license license:expat)))
9277
550bd98b
MB
9278(define-public python2-subprocess32
9279 (package
9280 (name "python2-subprocess32")
9281 (version "3.2.7")
9282 (source (origin
9283 (method url-fetch)
9284 (uri (pypi-uri "subprocess32" version))
9285 (sha256
9286 (base32
9287 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9288 (patches
9289 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9290 (build-system python-build-system)
9291 (arguments
9292 `(#:python ,python-2
9293 #:phases
9294 (modify-phases %standard-phases
9295 (add-after 'unpack 'patch-/bin/sh
9296 (lambda _
9297 (substitute* '("subprocess32.py"
9298 "test_subprocess32.py")
9299 (("/bin/sh") (which "sh")))
9300 #t))
9301 (delete 'check)
9302 (add-after 'install 'check
9303 (lambda* (#:key inputs outputs #:allow-other-keys)
9304 ;; For some reason this package fails to import
9305 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9306 ;; directory. Running tests after install is easier.
9307 (add-installed-pythonpath inputs outputs)
9308 (zero? (system* "python" "test_subprocess32.py")))))))
9309 (home-page "https://github.com/google/python-subprocess32")
9310 (synopsis "Backport of the subprocess module from Python 3.2")
9311 (description
9312 "This is a backport of the @code{subprocess} standard library module
9313from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9314new features. On POSIX systems it is guaranteed to be reliable when used
9315in threaded applications. It includes timeout support from Python 3.3 but
9316otherwise matches 3.2’s API.")
9317 (license license:psfl)))
9318
877889f3 9319(define-public python2-futures
7a5b944e 9320 (package
877889f3 9321 (name "python2-futures")
e17a1248 9322 (version "3.0.5")
7a5b944e
EF
9323 (source
9324 (origin
9325 (method url-fetch)
9326 (uri (pypi-uri "futures" version))
9327 (sha256
9328 (base32
e17a1248 9329 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7a5b944e 9330 (build-system python-build-system)
877889f3 9331 (arguments `(#:python ,python-2))
7a5b944e
EF
9332 (home-page "https://github.com/agronholm/pythonfutures")
9333 (synopsis
9334 "Backport of the concurrent.futures package from Python 3.2")
9335 (description
9336 "The concurrent.futures module provides a high-level interface for
9337asynchronously executing callables. This package backports the
9338concurrent.futures package from Python 3.2")
3f641af0 9339 (license license:bsd-3)))
7a5b944e 9340
5cb2fe44
EF
9341(define-public python-promise
9342 (package
9343 (name "python-promise")
9344 (version "0.4.2")
9345 (source
9346 (origin
9347 (method url-fetch)
9348 (uri (pypi-uri "promise" version))
9349 (sha256
9350 (base32
9351 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9352 (build-system python-build-system)
9353 ;; Tests wants python-futures, which is a python2 only program, and
9354 ;; can't be found by python-promise at test time.
9355 (arguments `(#:tests? #f))
9356 (home-page "https://github.com/syrusakbary/promise")
9357 (synopsis "Promises/A+ implementation for Python")
9358 (description
9359 "Promises/A+ implementation for Python")
9360 (properties `((python2-variant . ,(delay python2-promise))))
9361 (license license:expat)))
9362
9363(define-public python2-promise
9364 (let ((promise (package-with-python2
9365 (strip-python2-variant python-promise))))
9366 (package (inherit promise)
9367 (arguments (substitute-keyword-arguments (package-arguments promise)
9368 ((#:tests? _) #t)))
9369 (native-inputs
9370 `(("python2-futures" ,python2-futures)
9371 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
9372 ,@(package-native-inputs promise))))))
9373
c18f6368
EF
9374(define-public python-urllib3
9375 (package
9376 (name "python-urllib3")
6178274d 9377 (version "1.18.1")
c18f6368
EF
9378 (source
9379 (origin
9380 (method url-fetch)
9381 (uri (pypi-uri "urllib3" version))
9382 (sha256
9383 (base32
6178274d 9384 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
9385 (build-system python-build-system)
9386 (arguments `(#:tests? #f))
9387 (native-inputs
f3b98f4f 9388 `(;; some packages for tests
c18f6368
EF
9389 ("python-nose" ,python-nose)
9390 ("python-mock" ,python-mock)
9391 ("python-tornado" ,python-tornado)))
9392 (propagated-inputs
8322749a 9393 `(;; extra packages for https security
c18f6368
EF
9394 ("python-certifi" ,python-certifi)
9395 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9396 ("python-pyasn1" ,python-pyasn1)
9397 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 9398 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
9399 (synopsis "HTTP library with thread-safe connection pooling")
9400 (description
9401 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9402can reuse the same socket connection for multiple requests, it can POST files,
9403supports url redirection and retries, and also gzip and deflate decoding.")
9404 (license license:expat)))
9405
9406(define-public python2-urllib3
9407 (package-with-python2 python-urllib3))
2b2f2fc1
DT
9408
9409(define-public python-colorama
9410 (package
9411 (name "python-colorama")
f92576f9 9412 (version "0.3.7")
2b2f2fc1
DT
9413 (source
9414 (origin
9415 (method url-fetch)
9416 (uri (pypi-uri "colorama" version))
9417 (sha256
9418 (base32
f92576f9 9419 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
2b2f2fc1 9420 (build-system python-build-system)
46e110cc 9421 (synopsis "Colored terminal text rendering for Python")
2b2f2fc1
DT
9422 (description "Colorama is a Python library for rendering colored terminal
9423text.")
9424 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 9425 (license license:bsd-3)))
2b2f2fc1
DT
9426
9427(define-public python2-colorama
9428 (package-with-python2 python-colorama))
f5bcec6e
DT
9429
9430(define-public python-rsa
9431 (package
9432 (name "python-rsa")
ecd68c53 9433 (version "3.4.2")
f5bcec6e
DT
9434 (source
9435 (origin
9436 (method url-fetch)
9437 (uri (pypi-uri "rsa" version))
9438 (sha256
9439 (base32
ecd68c53 9440 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 9441 (build-system python-build-system)
f22efa01 9442 (propagated-inputs
f3b98f4f 9443 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
9444 (synopsis "Pure-Python RSA implementation")
9445 (description "Python-RSA is a pure-Python RSA implementation. It supports
9446encryption and decryption, signing and verifying signatures, and key
9447generation according to PKCS#1 version 1.5. It can be used as a Python
9448library as well as on the command line.")
9449 (home-page "http://stuvel.eu/rsa")
3f641af0 9450 (license license:asl2.0)))
f5bcec6e
DT
9451
9452(define-public python2-rsa
9453 (package-with-python2 python-rsa))
c0aacfa5
DT
9454
9455(define-public python-pluggy
9456 (package
9457 (name "python-pluggy")
9458 (version "0.3.1")
9459 (source
9460 (origin
9461 (method url-fetch)
9462 (uri (pypi-uri "pluggy" version))
9463 (sha256
9464 (base32
9465 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9466 (build-system python-build-system)
c0aacfa5
DT
9467 (synopsis "Plugin and hook calling mechanism for Python")
9468 (description "Pluggy is an extraction of the plugin manager as used by
9469Pytest but stripped of Pytest specific details.")
9470 (home-page "https://pypi.python.org/pypi/pluggy")
9471 (license license:expat)))
9472
9473(define-public python2-pluggy
9474 (package-with-python2 python-pluggy))
a4af21ca
DT
9475
9476(define-public python-tox
9477 (package
9478 (name "python-tox")
9479 (version "2.3.1")
9480 (source
9481 (origin
9482 (method url-fetch)
9483 (uri (pypi-uri "tox" version))
9484 (sha256
9485 (base32
9486 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9487 (build-system python-build-system)
9488 (arguments
7ba07edf
HG
9489 ;; FIXME: Tests require pytest-timeout, which itself requires
9490 ;; pytest>=2.8.0 for installation.
a4af21ca 9491 '(#:tests? #f))
482d9591
HG
9492 (propagated-inputs
9493 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 9494 ("python-py" ,python-py)
482d9591 9495 ("python-virtualenv" ,python-virtualenv)))
328bb95d 9496 (native-inputs
7ba07edf
HG
9497 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9498 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
9499 (home-page "http://tox.testrun.org/")
9500 (synopsis "Virtualenv-based automation of test activities")
9501 (description "Tox is a generic virtualenv management and test command line
9502tool. It can be used to check that a package installs correctly with
9503different Python versions and interpreters, or run tests in each type of
9504supported environment, or act as a frontend to continuous integration
9505servers.")
9506 (license license:expat)))
9507
9508(define-public python2-tox
9509 (package-with-python2 python-tox))
ba9da248
DT
9510
9511(define-public python-jmespath
9512 (package
9513 (name "python-jmespath")
9514 (version "0.9.0")
9515 (source
9516 (origin
9517 (method url-fetch)
9518 (uri (pypi-uri "jmespath" version))
9519 (sha256
9520 (base32
9521 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9522 (build-system python-build-system)
52a75a83
MB
9523 (native-inputs
9524 `(("python-nose" ,python-nose)))
ba9da248
DT
9525 (synopsis "JSON Matching Expressions")
9526 (description "JMESPath (pronounced “james path”) is a Python library that
9527allows one to declaratively specify how to extract elements from a JSON
9528document.")
9529 (home-page "https://github.com/jmespath/jmespath.py")
9530 (license license:expat)))
9531
9532(define-public python2-jmespath
9533 (package-with-python2 python-jmespath))
935fcd5c
DT
9534
9535(define-public python-botocore
9536 (package
9537 (name "python-botocore")
d93985fe 9538 (version "1.5.26")
935fcd5c
DT
9539 (source
9540 (origin
9541 (method url-fetch)
9542 (uri (pypi-uri "botocore" version))
9543 (sha256
9544 (base32
d93985fe 9545 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
935fcd5c 9546 (build-system python-build-system)
877fdac9
MB
9547 (arguments
9548 ;; FIXME: Many tests are failing.
9549 '(#:tests? #f))
482d9591 9550 (propagated-inputs
22d7360b 9551 `(("python-dateutil" ,python-dateutil)
935fcd5c 9552 ("python-docutils" ,python-docutils)
482d9591 9553 ("python-jmespath" ,python-jmespath)))
8fa6890b 9554 (native-inputs
482d9591 9555 `(("python-mock" ,python-mock)
935fcd5c 9556 ("python-nose" ,python-nose)
482d9591 9557 ("behave" ,behave)
935fcd5c 9558 ("python-tox" ,python-tox)
482d9591 9559 ("python-wheel" ,python-wheel)))
935fcd5c
DT
9560 (home-page "https://github.com/boto/botocore")
9561 (synopsis "Low-level interface to AWS")
9562 (description "Botocore is a Python library that provides a low-level
9563interface to the Amazon Web Services (AWS) API.")
3f641af0 9564 (license license:asl2.0)))
935fcd5c
DT
9565
9566(define-public python2-botocore
9567 (package-with-python2 python-botocore))
f861b8b8
DT
9568
9569(define-public awscli
9570 (package
9571 (name "awscli")
192b887a 9572 (version "1.11.63")
f861b8b8
DT
9573 (source
9574 (origin
9575 (method url-fetch)
d5ccf71e 9576 (uri (pypi-uri name version))
f861b8b8
DT
9577 (sha256
9578 (base32
192b887a 9579 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
f861b8b8 9580 (build-system python-build-system)
482d9591 9581 (propagated-inputs
f861b8b8 9582 `(("python-colorama" ,python-colorama)
482d9591
HG
9583 ("python-botocore" ,python-botocore)
9584 ("python-s3transfer" ,python-s3transfer)
f861b8b8 9585 ("python-docutils" ,python-docutils)
0cb9fba3 9586 ("python-pyyaml" ,python-pyyaml)
482d9591 9587 ("python-rsa" ,python-rsa)))
619bfd81
MB
9588 (arguments
9589 ;; FIXME: The 'pypi' release does not contain tests.
9590 '(#:tests? #f))
60a8be3a 9591 (home-page "https://aws.amazon.com/cli/")
f861b8b8
DT
9592 (synopsis "Command line client for AWS")
9593 (description "AWS CLI provides a unified command line interface to the
9594Amazon Web Services (AWS) API.")
3f641af0 9595 (license license:asl2.0)))
6a44697d
LF
9596
9597(define-public python-hypothesis
9598 (package
9599 (name "python-hypothesis")
bea6d94d 9600 (version "3.1.0")
6a44697d
LF
9601 (source (origin
9602 (method url-fetch)
9603 (uri (pypi-uri "hypothesis" version))
9604 (sha256
9605 (base32
bea6d94d 9606 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 9607 (build-system python-build-system)
bd100c71 9608 (native-inputs
6a44697d
LF
9609 `(("python-flake8" ,python-flake8)
9610 ("python-pytest" ,python-pytest)))
9611 (synopsis "Library for property based testing")
9612 (description "Hypothesis is a library for testing your Python code against a
9613much larger range of examples than you would ever want to write by hand. It’s
9614based on the Haskell library, Quickcheck, and is designed to integrate
9615seamlessly into your existing Python unit testing work flow.")
9616 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 9617 (license license:mpl2.0)
6f068e08 9618 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
9619
9620(define-public python2-hypothesis
6f068e08
EF
9621 (let ((hypothesis (package-with-python2
9622 (strip-python2-variant python-hypothesis))))
9623 (package (inherit hypothesis)
9624 (native-inputs
bd100c71
MB
9625 `(("python2-enum34" ,python2-enum34)
9626 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
9627
9628(define-public python-pytest-subtesthack
9629 (package
9630 (name "python-pytest-subtesthack")
9631 (version "0.1.1")
9632 (source (origin
9633 (method url-fetch)
9634 (uri (pypi-uri "pytest-subtesthack" version))
9635 (sha256
9636 (base32
9637 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9638 (build-system python-build-system)
7517e73c
LF
9639 (propagated-inputs
9640 `(("python-pytest" ,python-pytest)))
9641 (synopsis "Set-up and tear-down fixtures for unit tests")
9642 (description "This plugin allows you to set up and tear down fixtures within
9643unit test functions that use @code{py.test}. This is useful for using
9644@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9645function multiple times, without setting up or tearing down fixture state as is
9646normally the case.")
9647 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 9648 (license license:unlicense)))
7517e73c
LF
9649
9650(define-public python2-pytest-subtesthack
9651 (package-with-python2 python-pytest-subtesthack))
0bdc1671 9652
7637de23 9653(define-public python-xdo
0bdc1671 9654 (package
7637de23 9655 (name "python-xdo")
e871c332 9656 (version "0.3")
0bdc1671
CAW
9657 (source (origin
9658 (method url-fetch)
9659 (uri (string-append
9660 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9661 "python-xdo_" version ".orig.tar.gz"))
9662 (sha256
9663 (base32
e871c332 9664 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
0bdc1671
CAW
9665 (build-system python-build-system)
9666 (arguments
736cfc10
SB
9667 '(#:phases
9668 (modify-phases %standard-phases
9669 (add-before 'install 'patch-libxdo-path
9670 ;; Hardcode the path of dynamically loaded libxdo library.
9671 (lambda* (#:key inputs #:allow-other-keys)
9672 (let ((libxdo (string-append
9673 (assoc-ref inputs "xdotool")
9674 "/lib/libxdo.so")))
9675 (substitute* "xdo/_xdo.py"
9676 (("find_library\\(\"xdo\"\\)")
9677 (simple-format #f "\"~a\"" libxdo)))
9678 #t))))
9679 #:tests? #f)) ; no tests provided
0b5e0863
SB
9680 (propagated-inputs
9681 `(("python-six" ,python-six)))
0bdc1671
CAW
9682 (inputs
9683 `(("xdotool" ,xdotool)
9684 ("libX11" ,libx11)))
9685 (home-page "https://tracker.debian.org/pkg/python-xdo")
9686 (synopsis "Python library for simulating X11 keyboard/mouse input")
9687 (description "Provides bindings to libxdo for manipulating X11 via simulated
9688input. (Note that this is mostly a legacy library; you may wish to look at
9689python-xdo for newer bindings.)")
3f641af0 9690 (license license:bsd-3)))
0bdc1671 9691
7637de23
LF
9692(define-public python2-xdo
9693 (package-with-python2 python-xdo))
9694
cb34dc6c
CAW
9695(define-public python-wtforms
9696 (package
9697 (name "python-wtforms")
9698 (version "2.1")
9699 (source
9700 (origin
9701 (method url-fetch)
9702 (uri (pypi-uri "WTForms" version ".zip"))
9703 (sha256
9704 (base32
9705 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9706 (build-system python-build-system)
13c4d874
EF
9707 (arguments
9708 '(#:phases
9709 (modify-phases %standard-phases
9710 (add-after 'unpack 'remove-django-test
9711 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9712 (lambda _
9713 (substitute*
9714 "tests/runtests.py"
9715 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9716 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9717 #t)))))
cb34dc6c
CAW
9718 (native-inputs
9719 `(("unzip" ,unzip)))
9720 (home-page "http://wtforms.simplecodes.com/")
9721 (synopsis
9722 "Form validation and rendering library for Python web development")
9723 (description
9724 "WTForms is a flexible forms validation and rendering library
9725for Python web development. It is very similar to the web form API
9726available in Django, but is a standalone package.")
f210e944 9727 (license license:bsd-3)))
cb34dc6c
CAW
9728
9729(define-public python2-wtforms
f210e944 9730 (package-with-python2 python-wtforms))
50aaec25
DT
9731
9732(define-public python-mako
9733 (package
9734 (name "python-mako")
3753f2e6 9735 (version "1.0.6")
50aaec25
DT
9736 (source
9737 (origin
9738 (method url-fetch)
9739 (uri (pypi-uri "Mako" version))
9740 (sha256
9741 (base32
3753f2e6 9742 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
50aaec25 9743 (build-system python-build-system)
482d9591
HG
9744 (propagated-inputs
9745 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 9746 (native-inputs
482d9591 9747 `(("python-mock" ,python-mock)
e435af5c
MB
9748 ("python-nose" ,python-nose)
9749 ("python-pytest" ,python-pytest)))
50aaec25
DT
9750 (home-page "http://www.makotemplates.org/")
9751 (synopsis "Templating language for Python")
9752 (description "Mako is a templating language for Python that compiles
9753templates into Python modules.")
f210e944 9754 (license license:expat)))
50aaec25
DT
9755
9756(define-public python2-mako
f210e944 9757 (package-with-python2 python-mako))
ae00a41f
CAW
9758
9759(define-public python-waitress
9760 (package
9761 (name "python-waitress")
9762 (version "0.8.10")
9763 (source
9764 (origin
9765 (method url-fetch)
9766 (uri (pypi-uri "waitress" version))
9767 (sha256
9768 (base32
9769 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9770 (build-system python-build-system)
9771 (home-page "https://github.com/Pylons/waitress")
9772 (synopsis "Waitress WSGI server")
9773 (description "Waitress is meant to be a production-quality pure-Python WSGI
9774server with very acceptable performance.")
f210e944 9775 (license license:zpl2.1)))
ae00a41f
CAW
9776
9777(define-public python2-waitress
f210e944 9778 (package-with-python2 python-waitress))
778a284b
CAW
9779
9780(define-public python-wsgiproxy2
9781 (package
9782 (name "python-wsgiproxy2")
9783 (version "0.4.2")
9784 (source
9785 (origin
9786 (method url-fetch)
9787 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9788 (sha256
9789 (base32
9790 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9791 (build-system python-build-system)
e359b31a
LF
9792 (arguments
9793 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9794 ;; support Python 3:
9795 ;; https://github.com/benoitc/restkit/issues/140
9796 #:tests? #f))
778a284b
CAW
9797 (native-inputs
9798 `(("unzip" ,unzip)
9799 ("python-nose" ,python-nose)
9800 ("python-coverage" ,python-coverage)))
9801 (propagated-inputs
9802 `(("python-six" ,python-six)
9803 ("python-webob" ,python-webob)))
9804 (home-page
9805 "https://github.com/gawel/WSGIProxy2/")
9806 (synopsis "WSGI Proxy with various http client backends")
9807 (description "WSGI turns HTTP requests into WSGI function calls.
9808WSGIProxy turns WSGI function calls into HTTP requests.
9809It also includes code to sign requests and pass private data,
9810and to spawn subprocesses to handle requests.")
f210e944 9811 (license license:expat)))
778a284b
CAW
9812
9813(define-public python2-wsgiproxy2
f210e944 9814 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
9815
9816(define-public python-pastedeploy
9817 (package
9818 (name "python-pastedeploy")
9819 (version "1.5.2")
9820 (source
9821 (origin
9822 (method url-fetch)
9823 (uri (pypi-uri "PasteDeploy" version))
9824 (sha256
9825 (base32
9826 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9827 (build-system python-build-system)
9828 (native-inputs
9829 `(("python-nose" ,python-nose)))
bb7518b1
CAW
9830 (home-page "http://pythonpaste.org/deploy/")
9831 (synopsis
9832 "Load, configure, and compose WSGI applications and servers")
9833 (description
9834 "This tool provides code to load WSGI applications and servers from URIs;
9835these URIs can refer to Python Eggs for INI-style configuration files. Paste
9836Script provides commands to serve applications based on this configuration
9837file.")
9838 (license license:expat)))
9839
9840(define-public python2-pastedeploy
9841 (package-with-python2 python-pastedeploy))
1cf53652 9842
c4a7904c
CAW
9843(define-public python-paste
9844 (package
9845 (name "python-paste")
ba1731da 9846 (version "2.0.3")
c4a7904c
CAW
9847 (source
9848 (origin
9849 (method url-fetch)
9850 (uri (pypi-uri "Paste" version))
9851 (sha256
9852 (base32
ba1731da 9853 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
fc1adab1
AK
9854 (patches (search-patches "python-paste-remove-website-test.patch"
9855 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
9856 (build-system python-build-system)
9857 (native-inputs
9858 `(("python-nose" ,python-nose)))
9859 (propagated-inputs
f3b98f4f 9860 `(("python-six" ,python-six)))
c4a7904c
CAW
9861 (home-page "http://pythonpaste.org")
9862 (synopsis
9863 "Python web development tools, focusing on WSGI")
9864 (description
9865 "Paste provides a variety of web development tools and middleware which
9866can be nested together to build web applications. Paste's design closely
9867follows ideas flowing from WSGI (Web Standard Gateway Interface).")
ba1731da 9868 (license license:expat)))
c4a7904c
CAW
9869
9870(define-public python2-paste
ba1731da 9871 (package-with-python2 python-paste))
c4a7904c 9872
a8f20f63
CAW
9873(define-public python-pastescript
9874 (package
9875 (name "python-pastescript")
9876 (version "2.0.2")
9877 (source
9878 (origin
9879 (method url-fetch)
9880 (uri (pypi-uri "PasteScript" version))
9881 (sha256
9882 (base32
9883 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9884 (build-system python-build-system)
9885 (native-inputs
9886 `(("python-nose" ,python-nose)))
9887 (propagated-inputs
f3b98f4f 9888 `(("python-paste" ,python-paste)
a8f20f63
CAW
9889 ("python-pastedeploy" ,python-pastedeploy)))
9890 (home-page "http://pythonpaste.org/script/")
9891 (arguments
9892 '(;; Unfortunately, this requires the latest unittest2,
9893 ;; but that requires traceback2 which requires linecache2 which requires
9894 ;; unittest2. So we're skipping tests for now.
9895 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9896 ;; so in theory we could get around this situation somehow.)
9897 #:tests? #f))
9898 (synopsis
9899 "Pluggable command line tool for serving web applications and more")
9900 (description
9901 "PasteScript is a plugin-friendly command line tool which provides a
9902variety of features, from launching web applications to bootstrapping project
9903layouts.")
9904 (license license:expat)))
9905
9906(define-public python2-pastescript
9907 (package-with-python2 python-pastescript))
9908
1cf53652
CAW
9909(define-public python-pyquery
9910 (package
9911 (name "python-pyquery")
ab0c3429 9912 (version "1.2.17")
1cf53652
CAW
9913 (source
9914 (origin
9915 (method url-fetch)
9916 (uri (pypi-uri "pyquery" version))
9917 (sha256
9918 (base32
ab0c3429 9919 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
1cf53652 9920 (build-system python-build-system)
2ddbfa8c
LF
9921 (native-inputs
9922 `(("python-webob" ,python-webob)
9923 ("python-webtest" ,python-webtest)))
1cf53652
CAW
9924 (propagated-inputs
9925 `(("python-lxml" ,python-lxml)
9926 ("python-cssselect" ,python-cssselect)))
9927 (home-page "https://github.com/gawel/pyquery")
9928 (synopsis "Make jQuery-like queries on xml documents")
9929 (description "pyquery allows you to make jQuery queries on xml documents.
9930The API is as much as possible the similar to jQuery. pyquery uses lxml for
9931fast xml and html manipulation.")
f210e944 9932 (license license:bsd-3)))
1cf53652
CAW
9933
9934(define-public python2-pyquery
f210e944 9935 (package-with-python2 python-pyquery))
aa6313d6
CAW
9936
9937(define-public python-webtest
9938 (package
9939 (name "python-webtest")
9940 (version "2.0.20")
9941 (source
9942 (origin
9943 (method url-fetch)
9944 (uri (pypi-uri "WebTest" version))
9945 (sha256
9946 (base32
9947 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9948 (build-system python-build-system)
9949 (arguments
9950 `(;; Unfortunately we have to disable tests!
9951 ;; This release of WebTest is pinned to python-nose < 1.3,
9952 ;; but older versions of python-nose are plagued with the following
9953 ;; bug(s), which rears its ugly head during test execution:
9954 ;; https://github.com/nose-devs/nose/issues/759
9955 ;; https://github.com/nose-devs/nose/pull/811
9956 #:tests? #f))
9957 ;; Commented out code is no good, but in this case, once tests
9958 ;; are ready to be enabled again, we should put the following
9959 ;; in place:
9960 ;; (native-inputs
9961 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9962 ;; ; but see above comment
9963 ;; ("python-coverage" ,python-coverage)
9964 ;; ("python-mock" ,python-mock)
9965 ;; ("python-pastedeploy" ,python-pastedeploy)
9966 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9967 ;; ("python-pyquery" ,python-pyquery)))
9968 (propagated-inputs
9969 `(("python-waitress" ,python-waitress)
9970 ("python-webob" ,python-webob)
9971 ("python-six" ,python-six)
9972 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9973 (home-page "http://webtest.pythonpaste.org/")
9974 (synopsis "Helper to test WSGI applications")
9975 (description "Webtest allows you to test your Python web applications
9976without starting an HTTP server. It supports anything that supports the
9977minimum of WSGI.")
f210e944 9978 (license license:expat)))
aa6313d6
CAW
9979
9980(define-public python2-webtest
f210e944 9981 (package-with-python2 python-webtest))
4cb122cd
CAW
9982
9983(define-public python-anyjson
9984 (package
9985 (name "python-anyjson")
9986 (version "0.3.3")
9987 (source
9988 (origin
9989 (method url-fetch)
9990 (uri (pypi-uri "anyjson" version))
9991 (sha256
9992 (base32
9993 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9994 (build-system python-build-system)
9995 (arguments
9996 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9997 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9998 ;; whatever) so this transformation needs to be done before the tests
9999 ;; can be run. Maybe we could add a build step to transform beforehand
10000 ;; but it could be annoying/difficult.
10001 ;; We can enable tests for the Python 2 version, though, and do below.
10002 #:tests? #f))
10003 (home-page "http://bitbucket.org/runeh/anyjson/")
10004 (synopsis
10005 "Wraps best available JSON implementation in a common interface")
10006 (description
10007 "Anyjson loads whichever is the fastest JSON module installed
10008and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 10009 (license license:bsd-3)
4cb122cd
CAW
10010 (properties `((python2-variant . ,(delay python2-anyjson))))))
10011
10012(define-public python2-anyjson
10013 (let ((anyjson (package-with-python2
10014 (strip-python2-variant python-anyjson))))
10015 (package
10016 (inherit anyjson)
10017 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10018 #:tests? #t
10019 ,@(package-arguments anyjson)))
00e10c6e 10020 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
10021
10022(define-public python-amqp
10023 (package
10024 (name "python-amqp")
10025 (version "1.4.9")
10026 (source
10027 (origin
10028 (method url-fetch)
10029 (uri (pypi-uri "amqp" version))
10030 (sha256
10031 (base32
10032 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
10033 (build-system python-build-system)
10034 (native-inputs
10035 `(("python-nose" ,python-nose)
10036 ("python-mock" ,python-mock)))
7bf837fd 10037 (home-page "https://github.com/celery/py-amqp")
8dfceab7
CAW
10038 (synopsis
10039 "Low-level AMQP client for Python (fork of amqplib)")
10040 (description
10041 "This is a fork of amqplib which was originally written by Barry Pederson.
10042It is maintained by the Celery project, and used by kombu as a pure python
10043alternative when librabbitmq is not available.")
3f641af0 10044 (license license:lgpl2.1+)
8dfceab7
CAW
10045 (properties `((python2-variant . ,(delay python2-amqp))))))
10046
10047(define-public python2-amqp
10048 (let ((amqp (package-with-python2
10049 (strip-python2-variant python-amqp))))
10050 (package
10051 (inherit amqp)
10052 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10053 ;; unmaintained. Weirdly, does not do this on the python 3
10054 ;; version?
10055 #:tests? #f
00e10c6e 10056 ,@(package-arguments amqp))))))
7d387305
CAW
10057
10058(define-public python-kombu
10059 (package
10060 (name "python-kombu")
0cb59822 10061 (version "3.0.37")
7d387305
CAW
10062 (source
10063 (origin
10064 (method url-fetch)
10065 (uri (pypi-uri "kombu" version))
10066 (sha256
10067 (base32
0cb59822 10068 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
10069 (build-system python-build-system)
10070 (native-inputs
10071 `(("python-mock" ,python-mock)
10072 ("python-nose" ,python-nose)))
10073 (propagated-inputs
10074 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
10075 ("python-amqp" ,python-amqp)
10076 ("python-redis" ,python-redis)))
7d387305
CAW
10077 (home-page "http://kombu.readthedocs.org")
10078 (synopsis "Message passing library for Python")
10079 (description "The aim of Kombu is to make messaging in Python as easy as
10080possible by providing an idiomatic high-level interface for the AMQ protocol,
10081and also provide proven and tested solutions to common messaging problems.
10082AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10083message orientation, queuing, routing, reliability and security, for which the
10084RabbitMQ messaging server is the most popular implementation.")
3f641af0 10085 (license license:bsd-3)
7d387305
CAW
10086 (properties `((python2-variant . ,(delay python2-kombu))))))
10087
10088(define-public python2-kombu
10089 (let ((kombu (package-with-python2
10090 (strip-python2-variant python-kombu))))
10091 (package
10092 (inherit kombu)
752eb9e0
MB
10093 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10094 ;; It works fine on the python3 variant.
10095 #:tests? #f
10096 ,@(package-arguments kombu)))
328bb95d
HG
10097 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10098 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
10099
10100(define-public python-billiard
10101 (package
10102 (name "python-billiard")
a6bb9e44 10103 (version "3.3.0.23")
b6f0b9fb
CAW
10104 (source
10105 (origin
10106 (method url-fetch)
10107 (uri (pypi-uri "billiard" version))
10108 (sha256
10109 (base32
a6bb9e44 10110 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
10111 (build-system python-build-system)
10112 (native-inputs
10113 `(("python-nose" ,python-nose)))
7bf837fd 10114 (home-page "https://github.com/celery/billiard")
b6f0b9fb
CAW
10115 (synopsis
10116 "Python multiprocessing fork with improvements and bugfixes")
10117 (description
10118 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10119multiprocessing package itself is a renamed and updated version of R Oudkerk's
10120pyprocessing package. This standalone variant is intended to be compatible with
10121Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 10122 (license license:bsd-3)
b6f0b9fb
CAW
10123 (properties `((python2-variant . ,(delay python2-billiard))))))
10124
10125(define-public python2-billiard
10126 (let ((billiard (package-with-python2
10127 (strip-python2-variant python-billiard))))
10128 (package
10129 (inherit billiard)
00e10c6e 10130 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
10131 ("python2-mock" ,python2-mock)
10132 ,@(package-native-inputs billiard))))))
22df6419
CAW
10133
10134(define-public python-celery
10135 (package
10136 (name "python-celery")
9ebe87fe 10137 (version "3.1.24")
22df6419
CAW
10138 (source
10139 (origin
10140 (method url-fetch)
10141 (uri (pypi-uri "celery" version))
10142 (sha256
10143 (base32
9ebe87fe 10144 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 10145 (build-system python-build-system)
9ebe87fe
LF
10146 (arguments
10147 `(#:phases
10148 (modify-phases %standard-phases
10149 ;; These tests break with Python 3.5:
10150 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10151 (replace 'check
10152 (lambda _
10153 (zero?
10154 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
10155 (native-inputs
10156 `(("python-nose" ,python-nose)))
f22efa01 10157 (propagated-inputs
22df6419
CAW
10158 `(("python-pytz" ,python-pytz)
10159 ("python-billiard" ,python-billiard)
10160 ("python-kombu" ,python-kombu)))
10161 (home-page "http://celeryproject.org")
10162 (synopsis "Distributed Task Queue")
10163 (description "Celery is an asynchronous task queue/job queue based on
10164distributed message passing. It is focused on real-time operation, but
10165supports scheduling as well. The execution units, called tasks, are executed
10166concurrently on a single or more worker servers using multiprocessing,
10167Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10168synchronously (wait until ready).")
3f641af0 10169 (license license:bsd-3)
22df6419
CAW
10170 (properties `((python2-variant . ,(delay python2-celery))))))
10171
10172(define-public python2-celery
10173 (let ((celery (package-with-python2
10174 (strip-python2-variant python-celery))))
10175 (package
10176 (inherit celery)
00e10c6e 10177 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
10178 ("python2-mock" ,python2-mock)
10179 ,@(package-native-inputs celery))))))
97e32948
CAW
10180
10181(define-public python-translitcodec
10182 (package
10183 (name "python-translitcodec")
10184 (version "0.4.0")
10185 (source
10186 (origin
10187 (method url-fetch)
10188 (uri (pypi-uri "translitcodec" version))
10189 (sha256
10190 (base32
10191 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10192 (build-system python-build-system)
10193 (arguments
10194 `(#:tests? #f)) ; no tests provided
10195 (home-page
10196 "https://github.com/claudep/translitcodec")
10197 (synopsis
10198 "Unicode to 8-bit charset transliteration codec")
10199 (description
10200 "This package contains codecs for transliterating ISO 10646 texts into
10201best-effort representations using smaller coded character sets (ASCII,
10202ISO 8859, etc.).")
f210e944 10203 (license license:expat)))
97e32948
CAW
10204
10205(define-public python2-translitcodec
f210e944 10206 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
10207
10208(define-public python-editor
10209 (package
10210 (name "python-editor")
10211 (version "0.5")
10212 (source
10213 (origin
10214 (method url-fetch)
10215 (uri (pypi-uri "python-editor" version))
10216 (sha256
10217 (base32
10218 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10219 (build-system python-build-system)
10220 (home-page
10221 "https://github.com/fmoo/python-editor")
10222 (synopsis
10223 "Programmatically open an editor, capture the result")
10224 (description
10225 "python-editor is a library that provides the editor module for
10226programmatically interfacing with your system's $EDITOR.")
f210e944 10227 (license license:asl2.0)))
0c3b90d4
CAW
10228
10229(define-public python2-editor
f210e944 10230 (package-with-python2 python-editor))
3276517c
LF
10231
10232(define-public python-sphinxcontrib-programoutput
10233 (package
10234 (name "python-sphinxcontrib-programoutput")
b9ce9eca 10235 (version "0.10")
3276517c
LF
10236 (source (origin
10237 (method url-fetch)
10238 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10239 (sha256
10240 (base32
b9ce9eca 10241 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
3276517c 10242 (build-system python-build-system)
e2cb140e
MB
10243 (arguments
10244 ;; FIXME: Many tests are failing and the upstream is gone.
10245 '(#:tests? #f))
3276517c 10246 (propagated-inputs
a0a09859 10247 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
10248 (synopsis "Sphinx extension to include program output")
10249 (description "A Sphinx extension to literally insert the output of arbitrary
10250commands into documents, helping you to keep your command examples up to date.")
10251 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 10252 (license license:bsd-2)))
3276517c
LF
10253
10254(define-public python2-sphinxcontrib-programoutput
f210e944 10255 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
10256
10257(define-public python-sphinx-repoze-autointerface
10258 (package
10259 (name "python-sphinx-repoze-autointerface")
328ae341 10260 (version "0.8")
548d7165
LF
10261 (source (origin
10262 (method url-fetch)
10263 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10264 (sha256
10265 (base32
328ae341 10266 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165 10267 (build-system python-build-system)
5b3c3d4b 10268 (arguments '(#:tests? #f)) ; No tests.
548d7165 10269 (propagated-inputs
47c7dc4a 10270 `(("python-sphinx" ,python-sphinx)
548d7165
LF
10271 ("python-zope-interface" ,python-zope-interface)))
10272 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10273 (description "This package defines an extension for the Sphinx documentation
10274system. The extension allows generation of API documentation by
10275introspection of @code{zope.interface} instances in code.")
10276 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 10277 (license license:repoze)))
548d7165
LF
10278
10279(define-public python2-sphinx-repoze-autointerface
10280 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
10281
10282(define-public python-psycopg2
10283 (package
10284 (name "python-psycopg2")
8e718963 10285 (version "2.6.2")
b31fbea5
DM
10286 (source
10287 (origin
10288 (method url-fetch)
10289 (uri (pypi-uri "psycopg2" version))
10290 (sha256
10291 (base32
8e718963 10292 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
b31fbea5
DM
10293 (build-system python-build-system)
10294 (arguments
10295 ;; Tests would require a postgresql database "psycopg2_test"
10296 ;; and a running postgresql database management service.
10297 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10298 (inputs
10299 `(("postgresql" ,postgresql))) ; libpq
10300 (home-page "http://initd.org/psycopg/")
10301 (synopsis "Python PostgreSQL adapter")
10302 (description
10303 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 10304 (license license:lgpl3+)))
b31fbea5
DM
10305
10306(define-public python2-psycopg2
f210e944 10307 (package-with-python2 python-psycopg2))
eed1a61f
LF
10308
10309(define-public python-vobject
10310 (package
10311 (name "python-vobject")
e00a5909 10312 (version "0.9.5")
eed1a61f
LF
10313 (source (origin
10314 (method url-fetch)
10315 (uri (pypi-uri "vobject" version))
10316 (sha256
10317 (base32
e00a5909 10318 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
eed1a61f 10319 (build-system python-build-system)
a9871b7b
LF
10320 (arguments
10321 '(;; The test suite relies on some non-portable Windows interfaces.
10322 #:tests? #f))
f22efa01 10323 (propagated-inputs
22d7360b 10324 `(("python-dateutil" ,python-dateutil)
eed1a61f
LF
10325 ("python-pyicu" ,python-pyicu)))
10326 (synopsis "Parse and generate vCard and vCalendar files")
10327 (description "Vobject is intended to be a full featured Python package for
10328parsing and generating vCard and vCalendar files. Currently, iCalendar files
10329are supported and well tested. vCard 3.0 files are supported, and all data
10330should be imported, but only a few components are understood in a sophisticated
10331way.")
10332 (home-page "http://eventable.github.io/vobject/")
f210e944 10333 (license license:asl2.0)))
eed1a61f
LF
10334
10335(define-public python2-vobject
f210e944 10336 (package-with-python2 python-vobject))
cedac813
LF
10337
10338(define-public python-munkres
10339 (package
10340 (name "python-munkres")
38e81a2c 10341 (version "1.0.8")
cedac813
LF
10342 (source (origin
10343 (method url-fetch)
10344 (uri (pypi-uri "munkres" version))
10345 (sha256
10346 (base32
38e81a2c 10347 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
10348 (build-system python-build-system)
10349 (arguments
10350 '(#:tests? #f)) ; no test suite
10351 (home-page "http://software.clapper.org/munkres/")
10352 (synopsis "Implementation of the Munkres algorithm")
10353 (description "The Munkres module provides an implementation of the Munkres
10354algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10355useful for solving the Assignment Problem.")
3f641af0 10356 (license license:bsd-3)))
cedac813
LF
10357
10358(define-public python2-munkres
10359 (package-with-python2 python-munkres))
f3b3d78f
LF
10360
10361(define-public python-flask
10362 (package
10363 (name "python-flask")
c6c80104 10364 (version "0.11.1")
f3b3d78f
LF
10365 (source (origin
10366 (method url-fetch)
10367 (uri (pypi-uri "Flask" version))
10368 (sha256
10369 (base32
c6c80104 10370 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
10371 (build-system python-build-system)
10372 (propagated-inputs
10373 `(("python-itsdangerous" ,python-itsdangerous)
10374 ("python-jinja2" ,python-jinja2)
8f35c030 10375 ("python-click" ,python-click)
f3b3d78f
LF
10376 ("python-werkzeug" ,python-werkzeug)))
10377 (home-page "https://github.com/mitsuhiko/flask/")
10378 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10379 (description "Flask is a micro web framework based on the Werkzeug toolkit
10380and Jinja2 template engine. It is called a micro framework because it does not
10381presume or force a developer to use a particular tool or library.")
f210e944 10382 (license license:bsd-3)))
f3b3d78f
LF
10383
10384(define-public python2-flask
f210e944 10385 (package-with-python2 python-flask))
603d665b 10386
a7ad802b 10387(define-public python-flask-wtf
10388 (package
10389 (name "python-flask-wtf")
10390 (version "0.13.1")
10391 (source
10392 (origin
10393 (method url-fetch)
10394 (uri (pypi-uri "Flask-WTF" version))
10395 (sha256
10396 (base32
10397 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10398 (build-system python-build-system)
d296d300
MB
10399 (arguments
10400 '(#:phases
10401 (modify-phases %standard-phases
10402 (add-before 'check 'drop-failing-test
10403 (lambda _
10404 ;; FIXME: This file tries resolving an external server, which
10405 ;; fails. Try to patch out the offending section instead of
10406 ;; deleting the whole thing.
10407 (delete-file "tests/test_recaptcha.py")
10408 #t)))))
a7ad802b 10409 (propagated-inputs
10410 `(("python-flask-babel" ,python-flask-babel)
10411 ("python-babel" ,python-babel)
10412 ("python-wtforms" ,python-wtforms)))
10413 (native-inputs
10414 `(("python-nose" ,python-nose)))
10415 (home-page "https://github.com/lepture/flask-wtf")
10416 (synopsis "Simple integration of Flask and WTForms")
10417 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10418upload, and reCAPTCHA.")
10419 (license license:bsd-3)))
10420
10421(define-public python2-flask-wtf
10422 (package-with-python2 python-flask-wtf))
10423
a2c7d88e 10424(define-public python-flask-multistatic
10425 (package
10426 (name "python-flask-multistatic")
10427 (version "1.0")
10428 (source
10429 (origin
10430 (method url-fetch)
10431 (uri (pypi-uri "flask-multistatic" version))
10432 (sha256
10433 (base32
10434 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10435 (build-system python-build-system)
10436 (propagated-inputs
10437 `(("python-flask" ,python-flask)))
10438 (home-page "https://pagure.io/flask-multistatic")
10439 (synopsis "Flask plugin to allow overriding static files")
10440 (description "@code{flask-multistatic} is a flask plugin that adds support
10441for overriding static files.")
10442 (license license:gpl3+)))
10443
10444(define-public python2-flask-multistatic
10445 (package-with-python2 python-flask-multistatic))
10446
603d665b
LF
10447(define-public python-cookies
10448 (package
10449 (name "python-cookies")
10450 (version "2.2.1")
10451 (source (origin
10452 (method url-fetch)
10453 (uri (pypi-uri "cookies" version))
10454 (sha256
10455 (base32
10456 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10457 (build-system python-build-system)
10458 (arguments
10459 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10460 #:tests? #f))
10461 (native-inputs
10462 `(("python-pytest" ,python2-pytest)))
10463 (synopsis "HTTP cookie parser and renderer")
10464 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10465Python.")
10466 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 10467 (license license:expat)))
603d665b
LF
10468
10469(define-public python2-cookies
f210e944 10470 (package-with-python2 python-cookies))
0efde7d6
LF
10471
10472(define-public python-responses
10473 (package
10474 (name "python-responses")
10475 (version "0.5.1")
10476 (source (origin
10477 (method url-fetch)
10478 (uri (pypi-uri "responses" version))
10479 (sha256
10480 (base32
10481 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10482 (build-system python-build-system)
10483 (arguments
10484 `(;; Test suite is not distributed:
10485 ;; https://github.com/getsentry/responses/issues/38
10486 #:tests? #f))
10487 (native-inputs
d8ea5f2f 10488 `(("python-mock" ,python-mock)))
0efde7d6
LF
10489 (propagated-inputs
10490 `(("python-requests" ,python-requests)
d8ea5f2f 10491 ("python-cookies" ,python-cookies)
0efde7d6
LF
10492 ("python-six" ,python-six)))
10493 (home-page "https://github.com/getsentry/responses")
10494 (synopsis "Utility for mocking out the `requests` Python library")
10495 (description "A utility library for mocking out the `requests` Python
10496library.")
f210e944 10497 (license license:asl2.0)))
0efde7d6
LF
10498
10499(define-public python2-responses
f210e944 10500 (package-with-python2 python-responses))
76b94885 10501
b7afd018
RW
10502(define-public python-whoosh
10503 (package
10504 (name "python-whoosh")
10505 (version "2.7.4")
10506 (source
10507 (origin
10508 (method url-fetch)
10509 (uri (pypi-uri "Whoosh" version))
10510 (sha256
10511 (base32
10512 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10513 (build-system python-build-system)
10514 (native-inputs
f3b98f4f 10515 `(("python-pytest" ,python-pytest)))
b7afd018
RW
10516 (home-page "http://bitbucket.org/mchaput/whoosh")
10517 (synopsis "Full text indexing, search, and spell checking library")
10518 (description
10519 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10520checking library.")
10521 (license license:bsd-2)))
10522
10523(define-public python2-whoosh
10524 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10525 (package (inherit whoosh)
10526 (propagated-inputs
10527 `(("python2-backport-ssl-match-hostname"
10528 ,python2-backport-ssl-match-hostname)
10529 ,@(package-propagated-inputs whoosh))))))
10530
76b94885
LF
10531(define-public python-pathlib
10532 (package
10533 (name "python-pathlib")
10534 (version "1.0.1")
10535 (source (origin
10536 (method url-fetch)
10537 (uri (pypi-uri "pathlib" version))
10538 (sha256
10539 (base32
10540 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10541 (build-system python-build-system)
92a312dc
RW
10542 ;; The tests depend on the internal "test" module, which does not provide
10543 ;; a stable interface.
10544 (arguments `(#:tests? #f))
76b94885 10545 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
10546 (synopsis "Object-oriented file system paths")
10547 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
10548It offers the following advantages over using string objects:
10549
10550@enumerate
10551@item No more cumbersome use of os and os.path functions. Everything can
10552be done easily through operators, attribute accesses, and method calls.
10553@item Embodies the semantics of different path types. For example,
10554comparing Windows paths ignores casing.
10555@item Well-defined semantics, eliminating any inconsistencies or
10556ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
10557@end enumerate
10558
10559Note: In Python 3.4, pathlib is now part of the standard library. For other
10560Python versions please consider python-pathlib2 instead, which tracks the
10561standard library module. This module (python-pathlib) isn't maintained
10562anymore.")
76b94885
LF
10563 (license license:expat)))
10564
10565(define-public python2-pathlib
10566 (package-with-python2 python-pathlib))
25a7db0a 10567
b7703c81
HG
10568(define-public python2-pathlib2
10569 (package
10570 (name "python2-pathlib2")
10571 (version "2.1.0")
10572 (source (origin
10573 (method url-fetch)
10574 (uri (pypi-uri "pathlib2" version))
10575 (sha256
10576 (base32
10577 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10578 (build-system python-build-system)
49a531f5
HG
10579 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10580 ;; version is 3.4 which already includes this package as part of the
10581 ;; standard library.
b7703c81
HG
10582 (arguments
10583 `(#:python ,python-2))
10584 (native-inputs
f3b98f4f 10585 `(("python2-six" ,python2-six)))
b7703c81
HG
10586 (home-page "http://pypi.python.org/pypi/pathlib2/")
10587 (synopsis "Object-oriented file system paths - backport of standard
10588pathlib module")
10589 (description "The goal of pathlib2 is to provide a backport of standard
10590pathlib module which tracks the standard library module, so all the newest
10591features of the standard pathlib can be used also on older Python versions.
10592
10593Pathlib offers a set of classes to handle file system paths. It offers the
10594following advantages over using string objects:
10595
10596@enumerate
10597@item No more cumbersome use of os and os.path functions. Everything can
10598be done easily through operators, attribute accesses, and method calls.
10599@item Embodies the semantics of different path types. For example,
10600comparing Windows paths ignores casing.
10601@item Well-defined semantics, eliminating any inconsistencies or
10602ambiguities (forward vs. backward slashes, etc.).
10603@end enumerate")
10604 (license license:expat)))
10605
25a7db0a
LF
10606(define-public python-jellyfish
10607 (package
10608 (name "python-jellyfish")
8c4964dd 10609 (version "0.5.6")
25a7db0a
LF
10610 (source (origin
10611 (method url-fetch)
10612 (uri (pypi-uri "jellyfish" version))
10613 (sha256
10614 (base32
8c4964dd 10615 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
10616 (build-system python-build-system)
10617 (native-inputs
10618 `(("python-pytest" ,python-pytest)))
10619 (home-page "https://github.com/jamesturk/jellyfish")
10620 (synopsis "Approximate and phonetic matching of strings")
10621 (description "Jellyfish uses a variety of string comparison and phonetic
10622encoding algorithms to do fuzzy string matching.")
3f641af0 10623 (license license:bsd-2)
25a7db0a
LF
10624 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10625
10626(define-public python2-jellyfish
10627 (let ((jellyfish (package-with-python2
10628 (strip-python2-variant python-jellyfish))))
10629 (package (inherit jellyfish)
00e10c6e 10630 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 10631 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
10632
10633(define-public python2-unicodecsv
10634 (package
10635 (name "python2-unicodecsv")
10636 (version "0.14.1")
10637 (source (origin
10638 (method url-fetch)
10639 ;; The test suite is not included in the PyPi release.
10640 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10641 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10642 "archive/" version ".tar.gz"))
10643 (file-name (string-append name "-" version ".tar.gz"))
10644 (sha256
10645 (base32
10646 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10647 (build-system python-build-system)
10648 (arguments
10649 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10650 #:python ,python-2))
10651 (native-inputs
f3b98f4f 10652 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
10653 (home-page "https://github.com/jdunck/python-unicodecsv")
10654 (synopsis "Unicode CSV module for Python 2")
10655 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10656module, adding support for Unicode strings.")
3f641af0 10657 (license license:bsd-2)))
064503aa
LF
10658
10659(define-public python-rarfile
10660 (package
10661 (name "python-rarfile")
67824447 10662 (version "2.8")
064503aa
LF
10663 (source (origin
10664 (method url-fetch)
10665 (uri (pypi-uri "rarfile" version))
10666 (sha256
10667 (base32
67824447 10668 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
10669 (build-system python-build-system)
10670 (arguments
10671 '(#:phases
10672 (modify-phases %standard-phases
10673 (replace 'check
10674 ;; Many tests fail, but the installation proceeds.
10675 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10676 (native-inputs
10677 `(("which" ,which))) ; required for tests
10678 (propagated-inputs
10679 `(("libarchive" ,libarchive)))
10680 (home-page "https://github.com/markokr/rarfile")
10681 (synopsis "RAR archive reader for Python")
10682 (description "This is Python module for RAR archive reading. The interface
10683is made as zipfile like as possible.")
3f641af0 10684 (license license:isc)))
064503aa
LF
10685
10686(define-public python2-rarfile
10687 (package-with-python2 python-rarfile))
daeeea71
CM
10688
10689(define-public python-magic
10690 (package
10691 (name "python-magic")
10692 (version "0.4.3")
10693 (source
10694 (origin
10695 (method url-fetch)
10696 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10697 version ".tar.gz"))
10698 (sha256
10699 (base32
10700 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10701 (file-name (string-append name "-" version "-checkout"))))
10702 (build-system python-build-system)
10703 (arguments
10704 ;; The tests are unreliable, so don't run them. The tests fail
10705 ;; under Python3 because they were written for Python2 and
10706 ;; contain import statements that do not work in Python3. One of
10707 ;; the tests fails under Python2 because its assertions are
10708 ;; overly stringent; it relies on comparing output strings which
10709 ;; are brittle and can change depending on the version of
10710 ;; libmagic being used and the system on which the test is
10711 ;; running. In my case, under GuixSD 0.10.0, only one test
10712 ;; failed, and it seems to have failed only because the version
10713 ;; of libmagic that is packaged in Guix outputs a slightly
10714 ;; different (but not wrong) string than the one that the test
10715 ;; expected.
10716 '(#:tests? #f
10717 #:phases (modify-phases %standard-phases
10718 ;; Replace a specific method call with a hard-coded
10719 ;; path to the necessary libmagic.so file in the
10720 ;; store. If we don't do this, then the method call
10721 ;; will fail to find the libmagic.so file, which in
10722 ;; turn will cause any application using
10723 ;; python-magic to fail.
10724 (add-before 'build 'hard-code-path-to-libmagic
10725 (lambda* (#:key inputs #:allow-other-keys)
10726 (let ((file (assoc-ref inputs "file")))
10727 (substitute* "magic.py"
10728 (("ctypes.util.find_library\\('magic'\\)")
10729 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
10730 #t)))
10731 (add-before 'install 'disable-egg-compression
10732 (lambda _
10733 (let ((port (open-file "setup.cfg" "a")))
10734 (display "\n[easy_install]\nzip_ok = 0\n"
10735 port)
10736 (close-port port)
10737 #t))))))
daeeea71
CM
10738 (inputs
10739 ;; python-magic needs to be able to find libmagic.so.
10740 `(("file" ,file)))
10741 (home-page "https://github.com/ahupp/python-magic")
10742 (synopsis "File type identification using libmagic")
10743 (description
10744 "This module uses ctypes to access the libmagic file type
10745identification library. It makes use of the local magic database and
10746supports both textual and MIME-type output. Note that this module and
10747the python-file module both provide a \"magic.py\" file; these two
10748modules, which are different and were developed separately, both serve
10749the same purpose: to provide Python bindings for libmagic.")
10750 (license license:expat)))
10751
10752(define-public python2-magic
10753 (package-with-python2 python-magic))
12af303f
CM
10754
10755(define-public python2-s3cmd
10756 (package
10757 (name "python2-s3cmd")
10758 (version "1.6.1")
10759 (source
10760 (origin
10761 (method url-fetch)
de67e922 10762 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
10763 "s3cmd-" version ".tar.gz"))
10764 (sha256
10765 (base32
10766 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10767 (build-system python-build-system)
10768 (arguments
10769 ;; s3cmd is written for python2 only and contains no tests.
10770 `(#:python ,python-2
10771 #:tests? #f))
f22efa01 10772 (propagated-inputs
12af303f
CM
10773 `(("python2-dateutil" ,python2-dateutil)
10774 ;; The python-file package also provides a magic.py module.
10775 ;; This is an unfortunate state of affairs; however, s3cmd
10776 ;; fails to install if it cannot find specifically the
10777 ;; python-magic package. Thus we include it, instead of using
10778 ;; python-file. Ironically, s3cmd sometimes works better
10779 ;; without libmagic bindings at all:
10780 ;; https://github.com/s3tools/s3cmd/issues/198
10781 ("python2-magic" ,python2-magic)))
10782 (home-page "http://s3tools.org/s3cmd")
10783 (synopsis "Command line tool for S3-compatible storage services")
10784 (description
10785 "S3cmd is a command line tool for uploading, retrieving and managing data
10786in storage services that are compatible with the Amazon Simple Storage
10787Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10788GnuPG encryption, and more. It also supports management of Amazon's
10789CloudFront content delivery network.")
3f641af0 10790 (license license:gpl2+)))
4323a5f0
AE
10791
10792(define-public python-pkgconfig
10793 (package
10794 (name "python-pkgconfig")
10795 (version "1.1.0")
10796 (source
10797 (origin
10798 (method url-fetch)
10799 (uri (pypi-uri "pkgconfig" version))
10800 (sha256
10801 (base32
10802 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10803 (build-system python-build-system)
10804 (native-inputs
f3b98f4f 10805 `(("python-nose" ,python-nose)))
4323a5f0
AE
10806 (inputs
10807 `(("pkg-config" ,pkg-config)))
10808 (arguments
10809 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10810 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10811 #:tests? #f
4323a5f0
AE
10812 ;; Hard-code the path to pkg-config.
10813 #:phases
10814 (modify-phases %standard-phases
10815 (add-before
10816 'build 'patch
10817 (lambda _
10818 (substitute* "pkgconfig/pkgconfig.py"
10819 (("cmd = 'pkg-config")
10820 (string-append "cmd = '" (which "pkg-config"))))
10821 #t)))))
7bf837fd 10822 (home-page "https://github.com/matze/pkgconfig")
4323a5f0
AE
10823 (synopsis "Python interface for pkg-config")
10824 (description "This module provides a Python interface to pkg-config. It
10825can be used to find all pkg-config packages, check if a package exists,
10826check if a package meets certain version requirements, query CFLAGS and
10827LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 10828 (license license:expat)))
4323a5f0
AE
10829
10830(define-public python2-pkgconfig
10831 (package-with-python2 python-pkgconfig))
10832
2e697322
BW
10833(define-public python-bz2file
10834 (package
10835 (name "python-bz2file")
10836 (version "0.98")
10837 (source
10838 (origin
10839 (method url-fetch)
10840 (uri (pypi-uri "bz2file" version))
10841 (sha256
10842 (base32
10843 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10844 (build-system python-build-system)
10845 (arguments
124df723 10846 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
10847 (home-page "https://github.com/nvawda/bz2file")
10848 (synopsis "Read and write bzip2-compressed files")
10849 (description
10850 "Bz2file is a Python library for reading and writing bzip2-compressed
10851files. It contains a drop-in replacement for the I/O interface in the
10852standard library's @code{bz2} module, including features from the latest
10853development version of CPython that are not available in older releases.")
3f641af0 10854 (license license:asl2.0)
2e697322
BW
10855 (properties `((python2-variant . ,(delay python2-bz2file))))))
10856
10857(define-public python2-bz2file
10858 (let ((base (package-with-python2
10859 (strip-python2-variant python-bz2file))))
10860 (package
10861 (inherit base)
124df723 10862 (arguments
752bb447
BW
10863 `(#:python ,python-2
10864 #:phases
124df723
BW
10865 (modify-phases %standard-phases
10866 ;; 'python setup.py test' does not work as of 0.98.
10867 ;; There is only the one test file, so we run it directly.
10868 (replace 'check
10869 (lambda _ (zero? (system* "python"
10870 "test_bz2file.py"))))))))))
2e697322 10871
da4ac1aa
BW
10872(define-public python-future
10873 (package
10874 (name "python-future")
c522f57e 10875 (version "0.16.0")
da4ac1aa
BW
10876 (source
10877 (origin
10878 (method url-fetch)
10879 (uri (pypi-uri "future" version))
10880 (sha256
10881 (base32
c522f57e 10882 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
da4ac1aa
BW
10883 (build-system python-build-system)
10884 ;; Many tests connect to the network or are otherwise flawed.
10885 ;; https://github.com/PythonCharmers/python-future/issues/210
10886 (arguments
10887 `(#:tests? #f))
10888 (home-page "http://python-future.org")
10889 (synopsis "Single-source support for Python 3 and 2")
10890 (description
10891 "@code{python-future} is the missing compatibility layer between Python 2 and
10892Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10893to support both Python 2 and Python 3 with minimal overhead.")
f210e944 10894 (license license:expat)))
da4ac1aa
BW
10895
10896(define-public python2-future
f210e944 10897 (package-with-python2 python-future))
da4ac1aa 10898
8e451885
AE
10899(define-public python-cysignals
10900 (package
10901 (name "python-cysignals")
10902 (version "1.1.0")
10903 (source
10904 (origin
10905 (method url-fetch)
10906 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10907 (sha256
10908 (base32
10909 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10910 (build-system python-build-system)
10911 (native-inputs
10912 `(("python-cython" ,python-cython)
8e451885
AE
10913 ("python-sphinx" ,python-sphinx)))
10914 (inputs
10915 `(("pari-gp" ,pari-gp)))
10916 (arguments
10917 `(#:modules ((guix build python-build-system)
10918 ((guix build gnu-build-system) #:prefix gnu:)
10919 (guix build utils))
10920 ;; FIXME: Tests are executed after installation and currently fail
10921 ;; when not installing into standard locations; the author is working
10922 ;; on a fix.
10923 #:tests? #f
10924 #:phases
10925 (modify-phases %standard-phases
10926 (add-before
10927 'build 'configure
10928 (assoc-ref gnu:%standard-phases 'configure)))))
10929 (home-page
10930 "https://github.com/sagemath/cysignals")
10931 (synopsis
10932 "Handling of interrupts and signals for Cython")
10933 (description
10934 "The cysignals package provides mechanisms to handle interrupts (and
10935other signals and errors) in Cython code, using two related approaches,
10936for mixed Cython/Python code or external C libraries and pure Cython code,
10937respectively.")
3f641af0 10938 (license license:lgpl3+)))
8e451885
AE
10939
10940(define-public python2-cysignals
10941 (package-with-python2 python-cysignals))
10942
63bcec71
DM
10943(define-public python2-shedskin
10944 (package
10945 (name "python2-shedskin")
10946 (version "0.9.4")
10947 (source
10948 (origin
10949 (method url-fetch)
10950 (uri (string-append "https://github.com/shedskin/shedskin/"
10951 "releases/download/v" version
10952 "/shedskin-" version ".tgz"))
10953 (sha256
10954 (base32
10955 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10956 (build-system python-build-system)
10957 (arguments
10958 `(#:python ,python-2
10959 #:phases (modify-phases %standard-phases
10960 (add-after 'unpack 'fix-resulting-include-libs
10961 (lambda* (#:key inputs #:allow-other-keys)
10962 (let ((libgc (assoc-ref inputs "libgc"))
10963 (pcre (assoc-ref inputs "pcre")))
10964 (substitute* "shedskin/makefile.py"
10965 (("variable == 'CCFLAGS':[ ]*")
10966 (string-append "variable == 'CCFLAGS':\n"
10967 " line += ' -I " pcre "/include"
10968 " -I " libgc "/include'"))
10969 (("variable == 'LFLAGS':[ ]*")
10970 (string-append "variable == 'LFLAGS':\n"
10971 " line += ' -L" pcre "/lib"
10972 " -L " libgc "/lib'")))
10973 #t))))))
63bcec71
DM
10974 (inputs `(("pcre" ,pcre)
10975 ("libgc" ,libgc)))
10976 (home-page "https://shedskin.github.io/")
10977 (synopsis "Experimental Python-2 to C++ Compiler")
10978 (description (string-append "This is an experimental compiler for a subset of
10979Python. It generates C++ code and a Makefile."))
3f641af0 10980 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
10981
10982(define-public python2-rope
10983 (package
10984 (name "python2-rope")
10985 (version "0.10.3")
10986 (source
10987 (origin
10988 (method url-fetch)
10989 (uri (pypi-uri "rope" version))
10990 (sha256
10991 (base32
10992 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10993 (arguments
10994 ;; Rope is currently python-2 only.
10995 ;; https://github.com/python-rope/rope/issues/57
10996 `(#:python ,python-2))
10997 (build-system python-build-system)
10998 (native-inputs
f3b98f4f 10999 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
11000 (home-page "https://github.com/python-rope/rope")
11001 (synopsis "Refactoring library for Python")
11002 (description "Rope is a refactoring library for Python. It facilitates
11003the renaming, moving and extracting of attributes, functions, modules, fields
11004and parameters in Python 2 source code. These refactorings can also be applied
d1e4ad1b 11005to occurrences in strings and comments.")
3f641af0 11006 (license license:gpl2)))
6ba8ca17
11007
11008(define-public python-py3status
11009 (package
11010 (name "python-py3status")
d2262d70 11011 (version "3.1")
6ba8ca17
11012 (source
11013 (origin
11014 (method url-fetch)
11015 (uri (pypi-uri "py3status" version))
11016 (sha256
11017 (base32
d2262d70 11018 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 11019 (build-system python-build-system)
8653c1d5
MB
11020 (arguments
11021 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
6ba8ca17
11022 (home-page "https://github.com/ultrabug/py3status")
11023 (synopsis "Extensible i3status wrapper written in Python")
11024 (description "py3status is an i3status wrapper which extends i3status
11025functionality in a modular way, allowing you to extend your panel with your
11026own code, responding to click events and updating clock every second.")
3f641af0 11027 (license license:bsd-3)))
b8fdbca3
HG
11028
11029(define-public python-tblib
11030 (package
11031 (name "python-tblib")
11032 (version "1.3.0")
11033 (source (origin
11034 (method url-fetch)
11035 (uri (pypi-uri "tblib" version))
11036 (sha256 (base32
11037 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
11038 (build-system python-build-system)
11039 (arguments
11040 `(#:phases
11041 (modify-phases %standard-phases
11042 (replace 'check
11043 (lambda _
11044 ;; Upstream runs tests after installation and the package itself
11045 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11046 ;; found.
11047 (setenv "PYTHONPATH"
11048 (string-append (getcwd) "/build/lib:"
11049 (getenv "PYTHONPATH")))
11050 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
11051 (native-inputs
11052 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
11053 ("python-six" ,python-six)))
11054 (home-page "https://github.com/ionelmc/python-tblib")
11055 (synopsis "Traceback serialization library")
11056 (description
11057 "Traceback serialization allows you to:
11058
11059@enumerate
11060@item Pickle tracebacks and raise exceptions with pickled tracebacks in
11061different processes. This allows better error handling when running code over
11062multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11063
11064@item Parse traceback strings and raise with the parsed tracebacks.
9657aeb1 11065@end enumerate\n")
3f641af0 11066 (license license:bsd-3)))
b8fdbca3
HG
11067
11068(define-public python2-tblib
11069 (package-with-python2 python-tblib))
1a024de4
HG
11070
11071(define-public python-sqlparse
11072 (package
11073 (name "python-sqlparse")
11074 (version "0.1.19")
11075 (source (origin
11076 (method url-fetch)
11077 (uri (pypi-uri "sqlparse" version))
11078 (sha256
11079 (base32
11080 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
11081 (build-system python-build-system)
11082 (arguments
11083 `(#:phases
11084 (modify-phases %standard-phases
11085 (replace 'check
11086 (lambda* _
11087 ;; setup.py-integrated 2to3 only affects the build files, but
11088 ;; py.test is using the source files. So we need to convert them
11089 ;; manually.
11090 (when (zero? (system* "python3"))
11091 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
11092 (zero? (system* "py.test")))))))
11093 (native-inputs
f3b98f4f 11094 `(("python-pytest" ,python-pytest)))
1a024de4
HG
11095 (home-page "https://github.com/andialbrecht/sqlparse")
11096 (synopsis "Non-validating SQL parser")
11097 (description "Sqlparse is a non-validating SQL parser for Python. It
11098provides support for parsing, splitting and formatting SQL statements.")
3f641af0 11099 (license license:bsd-3)))
1a024de4
HG
11100
11101(define-public python2-sqlparse
11102 (package-with-python2 python-sqlparse))
68b9d242
SB
11103
11104(define-public python-greenlet
11105 (package
11106 (name "python-greenlet")
1f89fb16 11107 (version "0.4.11")
68b9d242
SB
11108 (source (origin
11109 (method url-fetch)
11110 (uri (pypi-uri "greenlet" version))
11111 (sha256
11112 (base32
1f89fb16 11113 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
68b9d242 11114 (build-system python-build-system)
68b9d242
SB
11115 (home-page "https://greenlet.readthedocs.io/")
11116 (synopsis "Lightweight in-process concurrent programming")
11117 (description
11118 "Greenlet package is a spin-off of Stackless, a version of CPython
11119that supports micro-threads called \"tasklets\". Tasklets run
11120pseudo-concurrently (typically in a single or a few OS-level threads) and
11121are synchronized with data exchanges on \"channels\".")
3f641af0 11122 (license (list license:psfl license:expat))))
68b9d242
SB
11123
11124(define-public python2-greenlet
11125 (package-with-python2 python-greenlet))
d79a343b
SB
11126
11127(define-public python-gevent
11128 (package
11129 (name "python-gevent")
11130 (version "1.1.1")
11131 (source (origin
11132 (method url-fetch)
11133 (uri (pypi-uri "gevent" version))
11134 (sha256
11135 (base32
11136 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11137 (modules '((guix build utils)))
11138 (snippet
11139 '(begin
11140 ;; unbunding libev and c-ares
11141 (for-each delete-file-recursively '("libev" "c-ares"))
11142 ;; fixing testsuite
11143 (call-with-output-file "greentest/__init__.py" noop)
11144 (substitute* "greentest/testrunner.py"
11145 (("import util") "from . import util")
11146 (("from util import log") "from .util import log"))))))
11147 (build-system python-build-system)
11148 (propagated-inputs
11149 `(("python-greenlet" ,python-greenlet)))
11150 (native-inputs
f3b98f4f 11151 `(("python-six" ,python-six)))
d79a343b
SB
11152 (inputs
11153 `(("c-ares" ,c-ares)
11154 ("libev" ,libev)))
11155 (home-page "http://www.gevent.org/")
11156 (synopsis "Coroutine-based network library")
11157 (description
11158 "gevent is a coroutine-based Python networking library that uses greenlet
11159to provide a high-level synchronous API on top of the libev event loop.")
11160 (license license:expat)))
11161
11162(define-public python2-gevent
11163 (package-with-python2 python-gevent))
da3aeeb6 11164
c9a18125
MB
11165(define-public python-geventhttpclient
11166 (package
11167 (name "python-geventhttpclient")
11168 (version "1.3.1")
11169 (source (origin
11170 (method url-fetch)
11171 (uri (pypi-uri "geventhttpclient" version))
11172 (sha256
11173 (base32
11174 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11175 (modules '((guix build utils)))
11176 (snippet
11177 '(begin
11178 ;; Delete pre-compiled files.
11179 (for-each delete-file (find-files "src/geventhttpclient"
11180 ".*\\.pyc"))
11181 #t))))
11182 (build-system python-build-system)
11183 (arguments
11184 '(#:phases
11185 (modify-phases %standard-phases
11186 (add-after 'unpack 'delete-network-tests
11187 (lambda _
11188 (delete-file "src/geventhttpclient/tests/test_client.py")
11189 #t))
11190 (delete 'check)
11191 (add-after 'install 'check
11192 (lambda* (#:key inputs outputs #:allow-other-keys)
11193 (add-installed-pythonpath inputs outputs)
11194 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11195 (native-inputs
11196 `(("python-pytest" ,python-pytest)))
11197 (propagated-inputs
11198 `(("python-certifi" ,python-certifi)
11199 ("python-gevent" ,python-gevent)
11200 ("python-six" ,python-six)))
11201 (home-page "https://github.com/gwik/geventhttpclient")
11202 (synopsis "HTTP client library for gevent")
11203 (description "@code{python-geventhttpclient} is a high performance,
11204concurrent HTTP client library for python using @code{gevent}.")
11205 (license license:expat)))
11206
11207(define-public python2-geventhttpclient
11208 (package-with-python2 python-geventhttpclient))
11209
b585e361
DM
11210(define-public python-fastimport
11211 (package
11212 (name "python-fastimport")
11213 (version "0.9.6")
11214 (source
11215 (origin
11216 (method url-fetch)
11217 (uri (pypi-uri "fastimport" version))
11218 (sha256
11219 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11220 (build-system python-build-system)
11221 (home-page "https://github.com/jelmer/python-fastimport")
11222 (synopsis "VCS fastimport parser and generator in Python")
11223 (description "This package provides a parser for and generator of the Git
11224@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11225format.")
11226 (license license:gpl2+)))
11227
11228(define-public python2-fastimport
11229 (package-with-python2 python-fastimport))
11230
da3aeeb6
SB
11231(define-public python-twisted
11232 (package
11233 (name "python-twisted")
11234 (version "16.2.0")
11235 (source (origin
11236 (method url-fetch)
8ea8e8d3 11237 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
11238 (sha256
11239 (base32
11240 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11241 (build-system python-build-system)
a960e73f
MB
11242 (arguments
11243 '(#:tests? #f)) ; FIXME: Some tests are failing.
11244 ;; #:phases
11245 ;; (modify-phases %standard-phases
11246 ;; (replace 'check
11247 ;; (lambda _
11248 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170
SB
11249 (propagated-inputs
11250 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
11251 (home-page "https://twistedmatrix.com/")
11252 (synopsis "Asynchronous networking framework written in Python")
11253 (description
11254 "Twisted is an extensible framework for Python programming, with special
11255focus on event-based network programming and multiprotocol integration.")
11256 (license license:expat)))
11257
11258(define-public python2-twisted
11259 (package-with-python2 python-twisted))
d0b6fed6 11260
4d3fa5a4
EF
11261(define-public python-pika
11262 (package
11263 (name "python-pika")
11264 (version "0.10.0")
11265 (source
11266 (origin
11267 (method url-fetch)
11268 (uri (pypi-uri "pika" version))
11269 (sha256
11270 (base32
11271 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11272 (build-system python-build-system)
11273 (native-inputs
269d9172
LF
11274 `(("python-pyev" ,python-pyev)
11275 ("python-tornado" ,python-tornado)
11276 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
11277 (home-page "https://pika.readthedocs.org")
11278 (synopsis "Pure Python AMQP Client Library")
11279 (description
11280 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11281Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11282network support library.")
11283 (license license:bsd-3)))
11284
11285(define-public python2-pika
11286 (package-with-python2 python-pika))
11287
d0b6fed6
DM
11288(define-public python-ply
11289 (package
11290 (name "python-ply")
234ade2d 11291 (version "3.9")
d0b6fed6
DM
11292 (source
11293 (origin
11294 (method url-fetch)
234ade2d 11295 (uri (pypi-uri "ply" version))
d0b6fed6
DM
11296 (sha256
11297 (base32
234ade2d 11298 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
d0b6fed6
DM
11299 (build-system python-build-system)
11300 (home-page "http://www.dabeaz.com/ply/")
11301 (synopsis "Python Lex & Yacc")
11302 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11303It uses LR parsing and does extensive error checking.")
f210e944 11304 (license license:bsd-3)))
d0b6fed6
DM
11305
11306(define-public python2-ply
f210e944 11307 (package-with-python2 python-ply))
d951bd54
SB
11308
11309(define-public python-tabulate
11310 (package
11311 (name "python-tabulate")
e6ace98d 11312 (version "0.7.7")
d951bd54
SB
11313 (source (origin
11314 (method url-fetch)
11315 (uri (pypi-uri "tabulate" version))
11316 (sha256
11317 (base32
fe2ba3a8 11318 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
d951bd54 11319 (build-system python-build-system)
fe2ba3a8
MB
11320 (arguments
11321 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11322 ;; and the latest release is not tagged in the upstream repository.
11323 '(#:tests? #f))
d951bd54
SB
11324 (home-page "https://bitbucket.org/astanin/python-tabulate")
11325 (synopsis "Pretty-print tabular data")
11326 (description
11327 "Tabulate is a library and command-line utility to pretty-print tabular
11328data in Python.")
11329 (license license:expat)))
11330
11331(define-public python2-tabulate
11332 (package-with-python2 python-tabulate))
1c4c8a33
SB
11333
11334(define-public python-kazoo
11335 (package
11336 (name "python-kazoo")
11337 (version "2.2.1")
11338 (source
11339 (origin
11340 (method url-fetch)
11341 (uri (pypi-uri "kazoo" version))
11342 (sha256
11343 (base32
11344 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11345 (build-system python-build-system)
11346 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
11347 (propagated-inputs
11348 `(("python-six" ,python-six)))
1c4c8a33
SB
11349 (home-page "https://kazoo.readthedocs.org")
11350 (synopsis "High-level Zookeeper client library")
11351 (description
11352 "Kazoo is a Python client library for the Apache Zookeeper distributed
11353application service. It is designed to be easy to use and to avoid common
11354programming errors.")
3f641af0 11355 (license license:asl2.0)))
1c4c8a33
SB
11356
11357(define-public python2-kazoo
11358 (package-with-python2 python-kazoo))
45dda35e
SB
11359
11360(define-public python-pykafka
11361 (package
11362 (name "python-pykafka")
11363 (version "2.4.0")
11364 (source (origin
11365 (method url-fetch)
c6bccf71
EF
11366 (uri (string-append
11367 "https://pypi.python.org/packages/8b/3e/"
11368 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11369 "pykafka-" version ".tar.gz"))
45dda35e
SB
11370 (sha256
11371 (base32
11372 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11373 (build-system python-build-system)
11374 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 11375 (propagated-inputs
45dda35e
SB
11376 `(("python-gevent" ,python-gevent)
11377 ("python-kazoo" ,python-kazoo)
45dda35e
SB
11378 ("python-tabulate" ,python-tabulate)))
11379 (inputs
11380 `(("librdkafka" ,librdkafka)))
11381 (home-page "https://pykafka.readthedocs.io/")
11382 (synopsis "Apache Kafka client for Python")
11383 (description
11384 "PyKafka is a client for the Apache Kafka distributed messaging system.
11385It includes Python implementations of Kafka producers and consumers, which
11386are optionally backed by a C extension built on librdkafka.")
3f641af0 11387 (license license:asl2.0)))
45dda35e
SB
11388
11389(define-public python2-pykafka
11390 (package-with-python2 python-pykafka))
a44fd439
DM
11391
11392(define-public python-wcwidth
11393 (package
11394 (name "python-wcwidth")
9e59478f 11395 (version "0.1.7")
a44fd439
DM
11396 (source
11397 (origin
11398 (method url-fetch)
9e59478f 11399 (uri (pypi-uri "wcwidth" version))
a44fd439
DM
11400 (sha256
11401 (base32
9e59478f 11402 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
a44fd439
DM
11403 (build-system python-build-system)
11404 (home-page "https://github.com/jquast/wcwidth")
66e07664 11405 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
11406 (description "Wcwidth measures the number of terminal column cells of
11407wide-character codes. It is useful for those implementing a terminal emulator,
11408or programs that carefully produce output to be interpreted by one. It is a
11409Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11410specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 11411 (license license:expat)))
a44fd439
DM
11412
11413(define-public python2-wcwidth
f210e944 11414 (package-with-python2 python-wcwidth))
0de78c95
DP
11415
11416(define-public python2-jsonrpclib
11417 (package
11418 (name "python2-jsonrpclib")
11419 (version "0.1.7")
11420 (source (origin
11421 (method url-fetch)
11422 (uri (string-append
11423 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11424 "jsonrpclib-" version ".tar.gz"))
11425 (sha256
11426 (base32
11427 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11428 (build-system python-build-system)
0de78c95
DP
11429 (arguments
11430 `(#:tests? #f
11431 #:python ,python-2))
11432 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11433 (synopsis "Implementation of JSON-RPC specification for Python")
11434 (description
11435 "This library is an implementation of the JSON-RPC specification.
11436It supports both the original 1.0 specification, as well as the
11437new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11438etc.")
3f641af0 11439 (license license:asl2.0)))
9250b0f3
SB
11440
11441(define-public python-chai
11442 (package
11443 (name "python-chai")
11444 (version "1.1.1")
11445 (source (origin
11446 (method url-fetch)
11447 (uri (pypi-uri "chai" version))
11448 (sha256
11449 (base32
11450 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11451 (build-system python-build-system)
9250b0f3
SB
11452 (home-page "https://github.com/agoragames/chai")
11453 (synopsis "Mocking framework for Python")
11454 (description
11455 "Chai provides an api for mocking, stubbing and spying your python
11456objects, patterned after the Mocha library for Ruby.")
3f641af0 11457 (license license:bsd-3)))
9250b0f3
SB
11458
11459(define-public python2-chai
11460 (package-with-python2 python-chai))
11461
ae43baa8
SB
11462(define-public python-arrow
11463 (package
11464 (name "python-arrow")
11465 (version "0.8.0")
11466 (source (origin
11467 (method url-fetch)
11468 (uri (pypi-uri "arrow" version))
11469 (sha256
11470 (base32
11471 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11472 (build-system python-build-system)
11473 (native-inputs
f3b98f4f 11474 `(;; For testing
ae43baa8
SB
11475 ("python-chai" ,python-chai)
11476 ("python-simplejson" ,python-simplejson)))
36aed736 11477 (propagated-inputs
22d7360b 11478 `(("python-dateutil" ,python-dateutil)))
ae43baa8
SB
11479 (home-page "https://github.com/crsmithdev/arrow/")
11480 (synopsis "Dates and times for Python")
11481 (description
11482 "Arrow is a Python library to creating, manipulating, formatting and
11483converting dates, times, and timestamps. It implements and updates the
11484datetime type.")
3f641af0 11485 (license license:asl2.0)))
ae43baa8
SB
11486
11487(define-public python2-arrow
11488 (package-with-python2 python-arrow))
11489
1f2b62a4
SB
11490(define-public python-inflection
11491 (package
11492 (name "python-inflection")
11493 (version "0.3.1")
11494 (source
11495 (origin (method url-fetch)
11496 (uri (pypi-uri "inflection" version))
11497 (sha256
11498 (base32
11499 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11500 (build-system python-build-system)
e9127525
MB
11501 (native-inputs
11502 `(("python-pytest" ,python-pytest)))
7bf837fd 11503 (home-page "https://github.com/jpvanhal/inflection")
1f2b62a4
SB
11504 (synopsis "Python string transformation library")
11505 (description
11506 "Inflection is a string transformation library. It singularizes
11507and pluralizes English words, and transforms strings from CamelCase to
11508underscored string.")
11509 (license license:expat)))
11510
11511(define-public python2-inflection
11512 (package-with-python2 python-inflection))
11513
18995566
SB
11514(define-public python-pylev
11515 (package
11516 (name "python-pylev")
11517 (version "1.3.0")
11518 (source (origin
11519 (method url-fetch)
11520 (uri (pypi-uri "pylev" version))
11521 (sha256
11522 (base32
11523 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11524 (build-system python-build-system)
7bf837fd 11525 (home-page "https://github.com/toastdriven/pylev")
18995566
SB
11526 (synopsis "Levenshtein distance implementation in Python")
11527 (description "Pure Python Levenshtein implementation, based off the
11528Wikipedia code samples at
11529@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 11530 (license license:bsd-3)))
18995566
SB
11531
11532(define-public python2-pylev
11533 (package-with-python2 python-pylev))
11534
f5deff7a
SB
11535(define-public python-cleo
11536 (package
11537 (name "python-cleo")
11538 (version "0.4.1")
11539 (source (origin
11540 (method url-fetch)
11541 (uri (pypi-uri "cleo" version))
11542 (sha256
11543 (base32
11544 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11545 (build-system python-build-system)
11546 (native-inputs
f3b98f4f 11547 `(;; For testing
f5deff7a
SB
11548 ("python-mock" ,python-mock)
11549 ("python-pytest" ,python-pytest)))
9403150a
SB
11550 (propagated-inputs
11551 `(("python-psutil" ,python-psutil)
11552 ("python-pylev" ,python-pylev)))
f5deff7a
SB
11553 (home-page "https://github.com/sdispater/cleo")
11554 (synopsis "Command-line arguments library for Python")
11555 (description
11556 "Cleo allows you to create command-line commands with signature in
11557docstring and colored output.")
11558 (license license:expat)))
11559
11560(define-public python2-cleo
11561 (package-with-python2 python-cleo))
11562
77cadb43
SB
11563(define-public python-lazy-object-proxy
11564 (package
11565 (name "python-lazy-object-proxy")
11566 (version "1.2.2")
11567 (source (origin
11568 (method url-fetch)
11569 (uri (pypi-uri "lazy-object-proxy" version))
11570 (sha256
11571 (base32
11572 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11573 (build-system python-build-system)
77cadb43
SB
11574 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11575 (synopsis "Lazy object proxy for python")
11576 (description
11577 "Lazy object proxy is an object that wraps a callable but defers the call
11578until the object is actually required, and caches the result of said call.")
3f641af0 11579 (license license:bsd-2)))
77cadb43
SB
11580
11581(define-public python2-lazy-object-proxy
11582 (package-with-python2 python-lazy-object-proxy))
11583
5477e05f
SB
11584(define-public python-dnspython
11585 (package
11586 (name "python-dnspython")
6c514128 11587 (version "1.15.0")
5477e05f
SB
11588 (source (origin
11589 (method url-fetch)
11590 (uri (string-append "http://www.dnspython.org/kits/"
11591 version "/dnspython-" version ".tar.gz"))
11592 (sha256
11593 (base32
6c514128 11594 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
11595 (build-system python-build-system)
11596 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
11597 (home-page "http://www.dnspython.org")
11598 (synopsis "DNS toolkit for Python")
11599 (description
11600 "dnspython is a DNS toolkit for Python. It supports almost all record
11601types. It can be used for queries, zone transfers, and dynamic updates.
11602It supports TSIG authenticated messages and EDNS0.")
11603 (license license:expat)))
11604
11605(define-public python2-dnspython
11606 (package-with-python2 python-dnspython))
11607
22711e25
SB
11608(define-public python-email-validator
11609 (package
11610 (name "python-email-validator")
b165c215 11611 (version "1.0.2")
22711e25
SB
11612 (source
11613 (origin (method url-fetch)
11614 (uri (pypi-uri "email_validator" version))
11615 (sha256
11616 (base32
b165c215 11617 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
22711e25
SB
11618 (build-system python-build-system)
11619 (arguments
11620 '(#:phases
11621 (modify-phases %standard-phases
11622 (add-before 'build 'use-dnspython
11623 (lambda _
11624 (substitute* "setup.py"
11625 (("dnspython3") "dnspython"))
11626 #t)))))
d42560bd 11627 (propagated-inputs
22711e25 11628 `(("python-dnspython" ,python-dnspython)
d42560bd 11629 ("python-idna" ,python-idna)))
22711e25
SB
11630 (home-page "https://github.com/JoshData/python-email-validator")
11631 (synopsis "Email address validation library for Python")
11632 (description
11633 "This library validates email address syntax and deliverability.")
3f641af0 11634 (license license:cc0)))
22711e25
SB
11635
11636(define-public python2-email-validator
11637 (package-with-python2 python-email-validator))
11638
8987d91e
SB
11639(define-public python-ukpostcodeparser
11640 (package
11641 (name "python-ukpostcodeparser")
11642 (version "1.0.3")
11643 (source (origin
11644 (method url-fetch)
11645 (uri (pypi-uri "UkPostcodeParser" version))
11646 (sha256
11647 (base32
11648 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11649 (build-system python-build-system)
8987d91e
SB
11650 (home-page "https://github.com/hamstah/ukpostcodeparser")
11651 (synopsis "UK Postcode parser for Python")
11652 (description
11653 "This library provides the @code{parse_uk_postcode} function for
11654parsing UK postcodes.")
11655 (license license:expat)))
11656
11657(define-public python2-ukpostcodeparser
11658 (package-with-python2 python-ukpostcodeparser))
ea92ae01 11659
ce7911dd
MB
11660(define-public python-faker
11661 (package
11662 (name "python-faker")
11663 (version "0.7.9")
11664 (source (origin
11665 (method url-fetch)
11666 (uri (pypi-uri "Faker" version))
11667 (sha256
11668 (base32
11669 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11670 (patches
11671 (search-patches "python-faker-fix-build-32bit.patch"))
11672 (modules '((guix build utils)))
11673 (snippet
11674 '(begin
11675 (for-each delete-file (find-files "." "\\.pyc$"))
11676 #t))))
11677 (build-system python-build-system)
11678 (arguments
11679 '(#:phases
11680 (modify-phases %standard-phases
11681 (replace 'check
11682 (lambda _
11683 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11684 (native-inputs
11685 `(;; For testing
11686 ("python-email-validator" ,python-email-validator)
11687 ("python-mock" ,python-mock)
11688 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11689 (propagated-inputs
11690 `(("python-dateutil" ,python-dateutil)
11691 ("python-six" ,python-six)))
11692 (home-page "https://github.com/joke2k/faker")
11693 (synopsis "Python package that generates fake data")
11694 (description
11695 "Faker is a Python package that generates fake data such as names,
11696addresses, and phone numbers.")
11697 (license license:expat)
11698 (properties `((python2-variant . ,(delay python2-faker))))))
11699
11700(define-public python2-faker
11701 (let ((base (package-with-python2 (strip-python2-variant
11702 python-faker))))
11703 (package
11704 (inherit base)
11705 (propagated-inputs
11706 `(("python2-ipaddress" ,python2-ipaddress)
11707 ,@(package-propagated-inputs base))))))
11708
ea92ae01
SB
11709(define-public python-fake-factory
11710 (package
11711 (name "python-fake-factory")
7adc698f 11712 (version "0.7.2")
ea92ae01
SB
11713 (source (origin
11714 (method url-fetch)
11715 (uri (pypi-uri "fake-factory" version))
11716 (sha256
11717 (base32
42945fb5
MB
11718 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11719 (patches
11720 (search-patches
11721 "python-fake-factory-fix-build-32bit.patch"))))
ea92ae01 11722 (build-system python-build-system)
b7f3ea95
MB
11723 (arguments
11724 '(#:phases
11725 (modify-phases %standard-phases
11726 (replace 'check
11727 (lambda _
11728 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
ea92ae01 11729 (native-inputs
f3b98f4f 11730 `(;; For testing
ea92ae01
SB
11731 ("python-email-validator" ,python-email-validator)
11732 ("python-mock" ,python-mock)
11733 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297 11734 (propagated-inputs
22d7360b 11735 `(("python-dateutil" ,python-dateutil)
bbcd7297 11736 ("python-six" ,python-six)))
7adc698f 11737 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
11738 (synopsis "Python package that generates fake data")
11739 (description
11740 "Faker is a Python package that generates fake data such as names,
11741addresses, and phone numbers.")
11742 (license license:expat)
ce7911dd
MB
11743 (properties `((python2-variant . ,(delay python2-fake-factory))
11744 (superseded . ,python-faker)))))
ea92ae01
SB
11745
11746(define-public python2-fake-factory
11747 (let ((base (package-with-python2 (strip-python2-variant
11748 python-fake-factory))))
11749 (package
11750 (inherit base)
ce7911dd 11751 (properties `((superseded . ,python2-faker)))
24c9aa18 11752 (propagated-inputs
ea92ae01 11753 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 11754 ,@(package-propagated-inputs base))))))
ea92ae01 11755
b49504fd
SB
11756(define-public python-pyaml
11757 (package
11758 (name "python-pyaml")
11759 (version "15.8.2")
11760 (source (origin
11761 (method url-fetch)
11762 (uri (pypi-uri "pyaml" version))
11763 (sha256
11764 (base32
11765 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11766 (build-system python-build-system)
f620311a
MB
11767 (native-inputs
11768 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
11769 (propagated-inputs
11770 `(("python-pyyaml" ,python-pyyaml)))
11771 (home-page "https://github.com/mk-fg/pretty-yaml")
11772 (synopsis "YAML pretty-print library for Python")
11773 (description
11774 "pyaml is a PyYAML based python module to produce pretty and readable
11775YAML-serialized data.")
3f641af0 11776 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
11777
11778(define-public python2-pyaml
11779 (package-with-python2 python-pyaml))
11780
347175a2
SB
11781(define-public python-flexmock
11782 (package
11783 (name "python-flexmock")
11784 (version "0.10.2")
11785 (source (origin
11786 (method url-fetch)
11787 (uri (pypi-uri "flexmock" version))
11788 (sha256
11789 (base32
11790 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11791 (build-system python-build-system)
347175a2
SB
11792 (home-page "https://flexmock.readthedocs.org")
11793 (synopsis "Testing library for Python")
11794 (description
11795 "flexmock is a testing library for Python that makes it easy to create
11796mocks, stubs and fakes.")
3f641af0 11797 (license license:bsd-3)))
347175a2
SB
11798
11799(define-public python2-flexmock
11800 (package-with-python2 python-flexmock))
11801
5a744191
SB
11802(define-public python-orator
11803 (package
11804 (name "python-orator")
11805 (version "0.8.2")
11806 (source (origin
11807 (method url-fetch)
11808 (uri (pypi-uri "orator" version))
11809 (sha256
11810 (base32
11811 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11812 (build-system python-build-system)
11813 (arguments '(#:tests? #f)) ; no tests
b2676030 11814 (propagated-inputs
5a744191
SB
11815 `(("python-arrow" ,python-arrow)
11816 ("python-blinker" ,python-blinker)
11817 ("python-cleo" ,python-cleo)
ce7911dd 11818 ("python-faker" ,python-faker)
5a744191
SB
11819 ("python-inflection" ,python-inflection)
11820 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11821 ("python-pyaml" ,python-pyaml)
5a744191
SB
11822 ("python-simplejson" ,python-simplejson)
11823 ("python-wrapt" ,python-wrapt)))
11824 (home-page "https://orator-orm.com/")
11825 (synopsis "ActiveRecord ORM for Python")
11826 (description
11827 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11828implementation for Python.")
11829 (license license:expat)
11830 (properties `((python2-variant . ,(delay python2-orator))))))
11831
11832(define-public python2-orator
11833 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11834 (package
11835 (inherit base)
06961617 11836 (propagated-inputs
5a744191 11837 `(("python2-ipaddress" ,python2-ipaddress)
06961617 11838 ,@(package-propagated-inputs base))))))
f4155188
DM
11839
11840(define-public python-prompt-toolkit
11841 (package
11842 (name "python-prompt-toolkit")
6a34f4cc 11843 (version "1.0.9")
f4155188
DM
11844 (source
11845 (origin
11846 (method url-fetch)
d15e2ef0 11847 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
11848 (sha256
11849 (base32
6a34f4cc 11850 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
f4155188 11851 (build-system python-build-system)
bae18710
LF
11852 (arguments
11853 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
11854 (propagated-inputs
11855 `(("python-wcwidth" ,python-wcwidth)
2c199b55 11856 ("python-six" ,python-six)
f22efa01 11857 ("python-pygments" ,python-pygments)))
f4155188
DM
11858 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11859 (synopsis "Library for building command line interfaces in Python")
11860 (description
11861 "Prompt-Toolkit is a library for building interactive command line
11862interfaces in Python. It's like GNU Readline but it also features syntax
11863highlighting while typing, out-of-the-box multi-line input editing, advanced
11864code completion, incremental search, support for Chinese double-width
11865characters, mouse support, and auto suggestions.")
f210e944 11866 (license license:bsd-3)))
f4155188
DM
11867
11868(define-public python2-prompt-toolkit
f210e944 11869 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
11870
11871(define-public python-jedi
11872 (package
11873 (name "python-jedi")
11874 (version "0.9.0")
11875 (source
11876 (origin
11877 (method url-fetch)
11878 (uri (pypi-uri "jedi" version))
11879 (sha256
11880 (base32
11881 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11882 (build-system python-build-system)
bfce8a34
MB
11883 (arguments
11884 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11885 '(#:tests? #f))
11886 (native-inputs
11887 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
11888 (home-page "https://github.com/davidhalter/jedi")
11889 (synopsis
11890 "Autocompletion for Python that can be used for text editors")
11891 (description
11892 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 11893 (license license:expat)))
a502dfbf
DM
11894
11895(define-public python2-jedi
f210e944 11896 (package-with-python2 python-jedi))
c2f0dc6e
DM
11897
11898(define-public ptpython
11899 (package
11900 (name "ptpython")
11901 (version "0.34")
11902 (source (origin
11903 (method url-fetch)
11904 (uri (pypi-uri "ptpython" version))
11905 (sha256
11906 (base32
11907 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11908 (build-system python-build-system)
32955348
MB
11909 (arguments
11910 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
f22efa01 11911 (propagated-inputs
c2f0dc6e
DM
11912 `(("python-docopt" ,python-docopt)
11913 ("python-jedi" ,python-jedi)
11914 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 11915 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
11916 (home-page "https://github.com/jonathanslenders/ptpython")
11917 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11918 (description
11919 "ptpython is a Python read-eval-print loop with IDE-like features.
11920It supports syntax highlighting, multiline editing, autocompletion, mouse,
11921color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11922etc.")
3f641af0 11923 (license license:bsd-3)
c2f0dc6e
DM
11924 (properties `((python2-variant . ,(delay ptpython-2))))))
11925
11926(define-public ptpython-2
11927 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11928 (package
11929 (inherit base)
11930 (name "ptpython2"))))
b227f0be 11931
b04a52a6
DJ
11932(define-public python-requests-oauthlib
11933 (package
11934 (name "python-requests-oauthlib")
11935 (version "0.6.2")
11936 (source
11937 (origin
11938 (method url-fetch)
11939 (uri (pypi-uri "requests-oauthlib" version))
11940 (sha256
11941 (base32
11942 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11943 (build-system python-build-system)
11944 (arguments
11945 `(#:phases
11946 (modify-phases %standard-phases
11947 ;; removes tests that require network access
11948 (add-before 'check 'pre-check
11949 (lambda _
11950 (delete-file "tests/test_core.py")
11951 #t)))))
11952 (native-inputs
11953 `(("python-requests-mock" ,python-requests-mock)
11954 ("python-mock" ,python-mock)))
f22efa01 11955 (propagated-inputs
b04a52a6
DJ
11956 `(("python-oauthlib" ,python-oauthlib)
11957 ("python-requests" ,python-requests)))
11958 (home-page
11959 "https://github.com/requests/requests-oauthlib")
11960 (synopsis
11961 "OAuthlib authentication support for Requests")
11962 (description
11963 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11964provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 11965 (license license:isc)))
b04a52a6
DJ
11966
11967(define-public python2-requests-oauthlib
f210e944 11968 (package-with-python2 python-requests-oauthlib))
b04a52a6 11969
b227f0be 11970(define-public python-stem
11971 (package
11972 (name "python-stem")
0bb1c35a 11973 (version "1.5.4")
b227f0be 11974 (source
11975 (origin
11976 (method url-fetch)
c976b319 11977 (uri (pypi-uri "stem" version))
b227f0be 11978 (sha256
11979 (base32
0bb1c35a 11980 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
b227f0be 11981 (build-system python-build-system)
11982 (arguments
11983 `(#:phases
11984 (modify-phases %standard-phases
11985 (replace 'check
11986 (lambda _
11987 (zero? (system* "./run_tests.py" "--unit")))))))
11988 (native-inputs
11989 `(("python-mock" ,python-mock)
11990 ("python-pep8" ,python-pep8)
11991 ("python-pyflakes" ,python-pyflakes)))
b227f0be 11992 (home-page "https://stem.torproject.org/")
11993 (synopsis
11994 "Python controller library that allows applications to interact with Tor")
11995 (description
11996 "Stem is a Python controller library for Tor. With it you can use Tor's
11997control protocol to script against the Tor process and read descriptor data
11998relays publish about themselves.")
3f641af0 11999 (license license:lgpl3)))
b227f0be 12000
12001(define-public python2-stem
12002 (package-with-python2 python-stem))
517a6c0c
DM
12003
12004(define-public python-pyserial
12005 (package
12006 (name "python-pyserial")
12007 (version "3.1.1")
12008 (source
12009 (origin
12010 (method url-fetch)
12011 (uri (pypi-uri "pyserial" version))
12012 (sha256
12013 (base32
12014 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
12015 (build-system python-build-system)
0a702009
MB
12016 (arguments
12017 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12018 ;; #:phases
12019 ;; (modify-phases %standard-phases
12020 ;; (replace 'check
12021 ;; (lambda _
12022 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
517a6c0c
DM
12023 (home-page
12024 "https://github.com/pyserial/pyserial")
12025 (synopsis "Python Serial Port Bindings")
12026 (description "@code{pyserial} provide serial port bindings for Python. It
12027supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12028and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 12029 (license license:bsd-3)))
517a6c0c
DM
12030
12031(define-public python2-pyserial
f210e944 12032 (package-with-python2 python-pyserial))
6eb7af2a
DJ
12033
12034(define-public python-kivy
12035 (package
12036 (name "python-kivy")
12037 (version "1.9.1")
12038 (source
12039 (origin
12040 (method url-fetch)
12041 (uri (pypi-uri "kivy" version))
12042 (file-name (string-append name "-" version ".tar.gz"))
12043 (sha256
12044 (base32
12045 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
12046 (build-system python-build-system)
12047 (arguments
12048 `(#:tests? #f ; Tests require many optional packages
12049 #:phases
12050 (modify-phases %standard-phases
12051 (replace 'build (lambda _ (zero? (system* "make" "force"))))
12052 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12053 (lambda* (#:key inputs #:allow-other-keys)
12054 (setenv "KIVY_SDL2_PATH"
12055 (string-append (assoc-ref inputs "sdl-union")
12056 "/include/SDL2"))
12057 #t)))))
12058 (native-inputs
f2516de2
HG
12059 `(("pkg-config" ,pkg-config)
12060 ("python-cython" ,python-cython)))
6eb7af2a 12061 (inputs
f2516de2 12062 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
12063 ("mesa" ,mesa)
12064 ("sdl-union"
12065 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12066 (home-page "http://kivy.org")
12067 (synopsis
12068 "Multitouch application framework")
12069 (description
12070 "A software library for rapid development of
12071hardware-accelerated multitouch applications.")
12072 (license license:expat)))
12073
12074(define-public python2-kivy
12075 (package-with-python2 python-kivy))
12076
12077(define-public python-kivy-next
12078 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
12079 (revision "1"))
12080 (package (inherit python-kivy)
12081 (name "python-kivy-next")
d80a71eb 12082 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
12083 (string-take commit 7)))
12084 (source
12085 (origin
12086 (method git-fetch)
12087 (uri (git-reference
12088 (url "https://github.com/kivy/kivy")
12089 (commit commit)))
12090 (file-name (string-append name "-" version "-checkout"))
12091 (sha256
12092 (base32
12093 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
12094
12095(define-public python2-kivy-next
12096 (package-with-python2 python-kivy-next))
8794bd8b
DC
12097
12098(define-public python-binaryornot
12099 (package
12100 (name "python-binaryornot")
12101 (version "0.4.0")
12102 (source (origin
12103 (method url-fetch)
12104 (uri (pypi-uri "binaryornot" version))
12105 (sha256
12106 (base32
12107 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
12108 (build-system python-build-system)
f22efa01 12109 (propagated-inputs
8794bd8b
DC
12110 `(("python-chardet" ,python-chardet)
12111 ("python-hypothesis" ,python-hypothesis)))
12112 (home-page "https://github.com/audreyr/binaryornot")
12113 (synopsis "Package to check if a file is binary or text")
12114 (description "Ultra-lightweight pure Python package to check if a file is
12115binary or text.")
12116 (license license:bsd-3)
12117 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12118
12119(define-public python2-binaryornot
12120 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12121 (package (inherit base)
f22efa01 12122 (propagated-inputs
8794bd8b 12123 `(("python2-enum34" ,python2-enum34)
f22efa01 12124 ,@(package-propagated-inputs base))))))
a9ac982a
DC
12125
12126(define-public python-nltk
12127 (package
12128 (name "python-nltk")
12129 (version "3.2.1")
12130 (source (origin
12131 (method url-fetch)
12132 (uri (pypi-uri "nltk" version))
12133 (sha256
12134 (base32
12135 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12136 (build-system python-build-system)
59f12985
LF
12137 (arguments
12138 '(;; The tests require some extra resources to be downloaded.
12139 ;; TODO Try packaging these resources.
12140 #:tests? #f))
a9ac982a
DC
12141 (home-page "http://nltk.org/")
12142 (synopsis "Natural Language Toolkit")
12143 (description "It provides interfaces to over 50 corpora and lexical
12144resources such as WordNet, along with a suite of text processing libraries
12145for classification, tokenization, stemming, tagging, parsing, and semantic
12146reasoning, wrappers for natural language processing libraries.")
f210e944 12147 (license license:asl2.0)))
a9ac982a
DC
12148
12149(define-public python2-nltk
f210e944 12150 (package-with-python2 python-nltk))
691cd90d
DC
12151
12152(define-public python-pymongo
12153 (package
12154 (name "python-pymongo")
12155 (version "3.3.0")
12156 (source (origin
12157 (method url-fetch)
12158 (uri (pypi-uri "pymongo" version))
12159 (sha256
12160 (base32
12161 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12162 (build-system python-build-system)
f22efa01 12163 (propagated-inputs
691cd90d 12164 `(("python-certifi" ,python-certifi)))
7bf837fd 12165 (home-page "https://github.com/mongodb/mongo-python-driver")
691cd90d
DC
12166 (synopsis "Python driver for MongoDB")
12167 (description "Python driver for MongoDB.")
f210e944 12168 (license license:asl2.0)))
691cd90d
DC
12169
12170(define-public python2-pymongo
f210e944 12171 (package-with-python2 python-pymongo))
6a6c9d43
DC
12172
12173(define-public python-sh
12174 (package
12175 (name "python-sh")
12176 (version "1.11")
12177 (source (origin
12178 (method url-fetch)
12179 (uri (pypi-uri "sh" version))
12180 (sha256
12181 (base32
12182 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12183 (build-system python-build-system)
12184 (arguments
12185 `(#:tests? #f)) ; no tests
12186 (home-page "https://github.com/amoffat/sh")
12187 (synopsis "Python subprocess interface")
12188 (description "Abstracts process invocation by providing a function
12189interface for programs.")
f210e944 12190 (license license:expat)))
6a6c9d43
DC
12191
12192(define-public python2-sh
f210e944 12193 (package-with-python2 python-sh))
05b59190 12194
25702397
EF
12195(define-public python-consul
12196 (package
12197 (name "python-consul")
12198 (version "0.6.1")
12199 (source
12200 (origin
12201 (method url-fetch)
12202 (uri (pypi-uri "python-consul" version))
12203 (sha256
12204 (base32
12205 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12206 (build-system python-build-system)
12207 (native-inputs
fd1d6de7
HG
12208 `(("python-pytest" ,python-pytest)))
12209 (propagated-inputs
12210 `(("python-requests" ,python-requests)
25702397
EF
12211 ("python-six" ,python-six)))
12212 (home-page "https://github.com/cablehead/python-consul")
12213 (synopsis "Python client for Consul")
12214 (description
12215 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12216discovery, monitoring and configuration.")
12217 (license license:expat)))
12218
12219(define-public python2-consul
f210e944 12220 (package-with-python2 python-consul))
25702397 12221
05b59190
DC
12222(define-public python-schematics
12223 (package
12224 (name "python-schematics")
12225 (version "1.1.1")
12226 (source
12227 (origin
12228 (method url-fetch)
12229 (uri (string-append
12230 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12231 (file-name (string-append name "-" version ".tar.gz"))
12232 (sha256
12233 (base32
12234 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12235 (build-system python-build-system)
f22efa01 12236 (propagated-inputs
05b59190
DC
12237 `(("python-six" ,python-six)))
12238 (arguments
12239 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12240 ; version requirements (eg python-coveralls)
12241 (home-page "https://github.com/schematics/schematics")
12242 (synopsis "Python Data Structures for Humans")
12243 (description "Python Data Structures for Humans.")
f210e944 12244 (license license:bsd-3)))
05b59190
DC
12245
12246(define-public python2-schematics
f210e944 12247 (package-with-python2 python-schematics))
d6907ff7
DC
12248
12249(define-public python-publicsuffix
12250 (package
12251 (name "python-publicsuffix")
12252 (version "1.1.0")
12253 (source (origin
12254 (method url-fetch)
12255 (uri (pypi-uri "publicsuffix" version))
12256 (sha256
12257 (base32
12258 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12259 (build-system python-build-system)
12260 (arguments
12261 `(#:tests? #f)) ; tests use the internet
12262 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12263 (synopsis "Get suffix for a domain name")
12264 (description "Get a public suffix for a domain name using the Public Suffix
12265List.")
f210e944 12266 (license license:expat)))
d6907ff7
DC
12267
12268(define-public python2-publicsuffix
f210e944 12269 (package-with-python2 python-publicsuffix))
b2319996
DC
12270
12271(define-public python-publicsuffix2
12272 (package
12273 (name "python-publicsuffix2")
91862162 12274 (version "2.20160818")
b2319996
DC
12275 (source
12276 (origin
12277 (method url-fetch)
12278 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12279 (sha256
12280 (base32
91862162 12281 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
b2319996 12282 (build-system python-build-system)
10797a0a
LF
12283 (arguments
12284 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
12285 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12286 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12287 (description "Get a public suffix for a domain name using the Public Suffix
12288List. Forked from and using the same API as the publicsuffix package.")
f210e944 12289 (license (list license:expat license:mpl2.0))))
b2319996
DC
12290
12291(define-public python2-publicsuffix2
f210e944 12292 (package-with-python2 python-publicsuffix2))
81f1515d
DC
12293
12294(define-public python-url
12295 (package
12296 (name "python-url")
12297 (version "0.2.0")
12298 (source (origin
12299 (method url-fetch)
12300 (uri (pypi-uri "url" version))
12301 (sha256
12302 (base32
12303 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12304 (build-system python-build-system)
f22efa01 12305 (propagated-inputs
81f1515d
DC
12306 `(("python-publicsuffix" ,python-publicsuffix)))
12307 (native-inputs
12308 `(("python-coverage" ,python-coverage)
12309 ("python-nose" ,python-nose)))
12310 (arguments
12311 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
7bf837fd 12312 (home-page "https://github.com/seomoz/url-py")
81f1515d
DC
12313 (synopsis "URL Parsing")
12314 (description "Library for parsing urls.")
12315 (license license:expat)
12316 (properties `((python2-variant . ,(delay python2-url))))))
12317
12318(define-public python2-url
12319 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12320 (package (inherit base)
f22efa01 12321 (propagated-inputs
f210e944 12322 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
12323
12324(define-public python-freezegun
12325 (package
12326 (name "python-freezegun")
0c315fb3 12327 (version "0.3.8")
974ee2c1
TS
12328 (source
12329 (origin
12330 (method url-fetch)
12331 (uri (pypi-uri "freezegun" version))
12332 (sha256
12333 (base32
0c315fb3 12334 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
974ee2c1
TS
12335 (build-system python-build-system)
12336 (native-inputs
12337 `(("python-mock" ,python-mock)
12338 ("python-nose" ,python-nose)
4e096968 12339 ("python-coverage" ,python-coverage)))
f22efa01 12340 (propagated-inputs
4e096968 12341 `(("python-six" ,python-six)
22d7360b 12342 ("python-dateutil" ,python-dateutil)))
974ee2c1
TS
12343 (arguments
12344 `(#:phases (modify-phases %standard-phases
12345 ;; The tests are normally executed via `make test`, but the PyPi
12346 ;; package does not include the Makefile.
12347 (replace 'check
12348 (lambda _
12349 (zero? (system* "nosetests" "./tests/")))))))
12350 (home-page "https://github.com/spulec/freezegun")
12351 (synopsis "Test utility for mocking the datetime module")
12352 (description
12353 "FreezeGun is a library that allows your python tests to travel through
12354time by mocking the datetime module.")
12355 (license license:asl2.0)))
12356
12357(define-public python2-freezegun
f210e944
HG
12358 (package-with-python2 python-freezegun))
12359
dddcb25c
MB
12360
12361(define-public python-odfpy
12362 (package
12363 (name "python-odfpy")
12364 (version "1.3.3")
12365 (source (origin
12366 (method url-fetch)
12367 (uri (pypi-uri "odfpy" version))
12368 (sha256
12369 (base32
12370 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12371 (arguments
12372 `(#:modules ((srfi srfi-1)
12373 (guix build python-build-system)
12374 (guix build utils))
12375 #:phases
12376 (modify-phases %standard-phases
12377 (replace 'check
12378 ;; The test runner invokes python2 and python3 for test*.py.
12379 ;; To avoid having both in inputs, we replicate it here.
12380 (lambda _
12381 (every (lambda (test-file)
12382 (zero? (system* "python" test-file)))
12383 (find-files "tests" "^test.*\\.py$")))))))
12384 (build-system python-build-system)
12385 (home-page "https://github.com/eea/odfpy")
12386 (synopsis "Python API and tools to manipulate OpenDocument files")
12387 (description "Collection of libraries and utility programs written in
12388Python to manipulate OpenDocument 1.2 files.")
12389 (license
12390 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12391 ;; number of files with other licenses.
12392 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12393
12394(define-public python2-odfpy
12395 (package-with-python2 python-odfpy))
b30565bd
MB
12396
12397(define-public python-cachecontrol
12398 (package
12399 (name "python-cachecontrol")
12400 (version "0.11.6")
12401 (source
12402 (origin
12403 (method url-fetch)
12404 ;; Pypi does not have tests.
12405 (uri (string-append
12406 "https://github.com/ionrock/cachecontrol/archive/v"
12407 version ".tar.gz"))
12408 (file-name (string-append name "-" version ".tar.gz"))
12409 (sha256
12410 (base32
12411 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12412 (build-system python-build-system)
12413 (arguments
12414 `(#:phases
12415 (modify-phases %standard-phases
12416 (replace 'check
12417 (lambda _
12418 ;; Drop test that requires internet access.
12419 (delete-file "tests/test_regressions.py")
12420 (setenv "PYTHONPATH"
12421 (string-append (getcwd) "/build/lib:"
12422 (getenv "PYTHONPATH")))
12423 (zero? (system* "py.test" "-vv")))))))
12424 (native-inputs
12425 `(("python-pytest" ,python-pytest)
12426 ("python-redis" ,python-redis)
12427 ("python-webtest" ,python-webtest)
12428 ("python-mock" ,python-mock)))
12429 (propagated-inputs
12430 `(("python-requests" ,python-requests)
12431 ("python-lockfile" ,python-lockfile)))
12432 (home-page "https://github.com/ionrock/cachecontrol")
12433 (synopsis "The httplib2 caching algorithms for use with requests")
12434 (description "CacheControl is a port of the caching algorithms in
12435@code{httplib2} for use with @code{requests} session objects.")
f210e944 12436 (license license:asl2.0)))
b30565bd
MB
12437
12438(define-public python2-cachecontrol
f210e944 12439 (package-with-python2 python-cachecontrol))
243db824
DM
12440
12441(define-public python-lit
12442 (package
12443 (name "python-lit")
12444 (version "0.5.0")
12445 (source
12446 (origin
12447 (method url-fetch)
12448 (uri (pypi-uri "lit" version))
12449 (sha256
12450 (base32
12451 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12452 (build-system python-build-system)
12453 (home-page "http://llvm.org/")
12454 (synopsis "LLVM Software Testing Tool")
12455 (description "@code{lit} is a portable tool for executing LLVM and Clang
12456style test suites, summarizing their results, and providing indication of
12457failures.")
f210e944 12458 (license license:ncsa)))
243db824
DM
12459
12460(define-public python2-lit
f210e944 12461 (package-with-python2 python-lit))
66f95b20
MB
12462
12463(define-public python-pytest-pep8
12464 (package
12465 (name "python-pytest-pep8")
12466 (version "1.0.6")
12467 (source (origin
12468 (method url-fetch)
12469 (uri (pypi-uri "pytest-pep8" version))
12470 (sha256
12471 (base32
12472 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12473 (build-system python-build-system)
12474 (arguments
b41a05ce 12475 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
12476 (native-inputs
12477 `(("python-pytest" ,python-pytest)))
12478 (propagated-inputs
12479 `(("python-pep8" ,python-pep8)))
12480 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12481 (synopsis "Py.test plugin to check PEP8 requirements")
12482 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 12483 (license license:expat)))
66f95b20
MB
12484
12485(define-public python2-pytest-pep8
f210e944 12486 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
12487
12488(define-public python-pytest-flakes
12489 (package
12490 (name "python-pytest-flakes")
12491 (version "1.0.1")
12492 (source (origin
12493 (method url-fetch)
12494 (uri (pypi-uri "pytest-flakes" version))
12495 (sha256
12496 (base32
12497 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12498 (build-system python-build-system)
12499 (arguments
b41a05ce 12500 `(#:phases
df94a6b5
MB
12501 (modify-phases %standard-phases
12502 (delete 'check)
12503 (add-after 'install 'check
05c2fd36
HG
12504 (lambda* (#:key outputs inputs #:allow-other-keys)
12505 ;; It's easier to run tests after install.
12506 ;; Make installed package available for running the tests
12507 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
12508 (zero? (system* "py.test" "-vv")))))))
12509 (native-inputs
12510 `(("python-coverage" ,python-coverage)
12511 ("python-pytest" ,python-pytest)
12512 ("python-pytest-cache" ,python-pytest-cache)
12513 ("python-pytest-pep8" ,python-pytest-pep8)))
12514 (propagated-inputs
12515 `(("python-pyflakes" ,python-pyflakes)))
12516 (home-page "https://github.com/fschulze/pytest-flakes")
12517 (synopsis "Py.test plugin to check source code with pyflakes")
12518 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 12519 (license license:expat)))
df94a6b5
MB
12520
12521(define-public python2-pytest-flakes
f210e944 12522 (package-with-python2 python-pytest-flakes))
5467ea62
MB
12523
12524(define-public python-natsort
12525 (package
12526 (name "python-natsort")
a06cd95a 12527 (version "5.0.2")
5467ea62
MB
12528 (source (origin
12529 (method url-fetch)
12530 (uri (pypi-uri "natsort" version))
12531 (sha256
12532 (base32
a06cd95a 12533 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
5467ea62
MB
12534 (build-system python-build-system)
12535 (arguments
12536 `(#:phases
12537 (modify-phases %standard-phases
12538 (add-before 'check 'set-cachedir
12539 ;; Tests require write access to $HOME by default
12540 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12541 (native-inputs
12542 `(("python-hypothesis" ,python-hypothesis)
12543 ("python-pytest-cache" ,python-pytest-cache)
12544 ("python-pytest-cov" ,python-pytest-cov)
12545 ("python-pytest-flakes" ,python-pytest-flakes)
12546 ("python-pytest-pep8" ,python-pytest-pep8)))
12547 (propagated-inputs ; TODO: Add python-fastnumbers.
12548 `(("python-pyicu" ,python-pyicu)))
12549 (home-page "https://github.com/SethMMorton/natsort")
12550 (synopsis "Natural sorting for python and shell")
12551 (description
12552 "Natsort lets you apply natural sorting on lists instead of
12553lexicographical. If you use the built-in @code{sorted} method in python
12554on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12555returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12556function @code{natsorted} that identifies numbers and sorts them separately
12557from strings. It can also sort version numbers, real numbers, mixed types
12558and more, and comes with a shell command @command{natsort} that exposes this
12559functionality in the command line.")
12560 (license license:expat)
12561 (properties `((python2-variant . ,(delay python2-natsort))))))
12562
12563(define-public python2-natsort
12564 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12565 (package (inherit base)
12566 (native-inputs
00e10c6e 12567 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
12568 ("python2-mock" ,python2-mock)
12569 ("python2-enum34" ,python2-enum34)
12570 ,@(package-native-inputs base))))))
4efb9c54
SR
12571
12572(define-public python-glances
12573 (package
12574 (name "python-glances")
12575 (version "2.7.1")
12576 (source
12577 (origin
12578 (method url-fetch)
12579 (uri (pypi-uri "Glances" version))
12580 (sha256
12581 (base32
12582 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12583 (build-system python-build-system)
f22efa01 12584 (propagated-inputs
4efb9c54
SR
12585 `(("python-psutil" ,python-psutil)))
12586 (home-page
12587 "https://github.com/nicolargo/glances")
12588 (synopsis
12589 "A cross-platform curses-based monitoring tool")
12590 (description
12591 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12592Glances uses the PsUtil library to get information from your system. It monitors
12593CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 12594 (license license:lgpl3+)))
4efb9c54
SR
12595
12596(define-public python2-glances
f210e944 12597 (package-with-python2 python-glances))
05b7a593
EF
12598
12599(define-public python-graphql-core
12600 (package
12601 (name "python-graphql-core")
12602 (version "0.5.3")
12603 (source
12604 (origin
12605 (method url-fetch)
12606 (uri (pypi-uri "graphql-core" version))
12607 (sha256
12608 (base32
12609 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12610 (build-system python-build-system)
12611 (arguments
326f8285
LF
12612 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12613 #:phases
05b7a593
EF
12614 (modify-phases %standard-phases
12615 (add-after 'unpack 'patch-hardcoded-version
12616 (lambda _ (substitute*
12617 "setup.py"
12618 (("'gevent==1.1rc1'") "'gevent'"))
12619 #t)))))
12620 (native-inputs
12621 `(("python-gevent" ,python-gevent)
12622 ("python-mock" ,python-mock)
12623 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 12624 (propagated-inputs
05b7a593
EF
12625 `(("python-promise" ,python-promise)
12626 ("python-six" ,python-six)))
12627 (home-page "https://github.com/graphql-python/graphql-core")
12628 (synopsis "GraphQL implementation for Python")
12629 (description
12630 "GraphQL implementation for Python. GraphQL is a data query language and
12631runtime designed and used to request and deliver data to mobile and web apps.
12632This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12633to Python.")
05b7a593
EF
12634 (license license:expat)))
12635
12636(define-public python2-graphql-core
f210e944 12637 (package-with-python2 python-graphql-core))
7ee51575
EF
12638
12639(define-public python-graphql-relay
12640 (package
12641 (name "python-graphql-relay")
b13a5b4d 12642 (version "0.4.5")
7ee51575
EF
12643 (source
12644 (origin
12645 (method url-fetch)
12646 (uri (pypi-uri "graphql-relay" version))
12647 (sha256
12648 (base32
b13a5b4d 12649 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
7ee51575
EF
12650 (build-system python-build-system)
12651 (native-inputs
12652 `(("python-pytest" ,python-pytest)))
f22efa01 12653 (propagated-inputs
7ee51575
EF
12654 `(("python-graphql-core" ,python-graphql-core)
12655 ("python-promise" ,python-promise)
12656 ("python-six" ,python-six)))
12657 (home-page "https://github.com/graphql-python/graphql-relay-py")
12658 (synopsis "Relay implementation for Python")
12659 (description
12660 "This is a library to allow the easy creation of Relay-compliant servers
12661using the GraphQL Python reference implementation of a GraphQL server. It
12662should be noted that the code is a exact port of the original
12663@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12664from Facebook.")
7ee51575
EF
12665 (license license:expat)))
12666
12667(define-public python2-graphql-relay
f210e944 12668 (package-with-python2 python-graphql-relay))
ddc63a56
EF
12669
12670(define-public python-graphene
12671 (package
12672 (name "python-graphene")
12673 (version "0.10.2")
12674 (source
12675 (origin
12676 (method url-fetch)
12677 (uri (pypi-uri "graphene" version))
12678 (sha256
12679 (base32
12680 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12681 (build-system python-build-system)
12682 (native-inputs
12683 `(("python-django-filter" ,python-django-filter)
12684 ("python-mock" ,python-mock)
12685 ("python-psycopg2" ,python-psycopg2)
12686 ("python-pytest-django" ,python-pytest-django)
12687 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 12688 (propagated-inputs
ddc63a56
EF
12689 `(("python-graphql-core" ,python-graphql-core)
12690 ("python-graphql-relay" ,python-graphql-relay)
12691 ("python-iso8601" ,python-iso8601)
12692 ("python-promise" ,python-promise)
12693 ("python-six" ,python-six)))
12694 (home-page "http://graphene-python.org/")
12695 (synopsis "GraphQL Framework for Python")
12696 (description
12697 "Graphene is a Python library for building GraphQL schemas/types.
12698A GraphQL schema describes your data model, and provides a GraphQL server
12699with an associated set of resolve methods that know how to fetch data.")
12700 (properties `((python2-variant . ,(delay python2-graphene))))
12701 (license license:expat)))
12702
12703(define-public python2-graphene
12704 (let ((base (package-with-python2
12705 (strip-python2-variant python-graphene))))
12706 (package (inherit base)
12707 (native-inputs
00e10c6e 12708 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 12709 ,@(package-native-inputs base))))))
d488d5d6
EF
12710
12711(define-public python-nautilus
12712 (package
12713 (name "python-nautilus")
12714 (version "0.4.9")
12715 (source
12716 (origin
12717 (method url-fetch)
12718 (uri (pypi-uri "nautilus" version))
12719 (sha256
12720 (base32
12721 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12722 (build-system python-build-system)
12723 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 12724 (propagated-inputs
d488d5d6
EF
12725 `(("python-bcrypt" ,python-bcrypt)
12726 ("python-click" ,python-click)
12727 ("python-consul" ,python-consul)
d488d5d6
EF
12728 ("python-graphene" ,python-graphene)
12729 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
12730 ("python-peewee" ,python-peewee)
12731 ("python-pika" ,python-pika)
d488d5d6
EF
12732 ("python-tornado" ,python-tornado)
12733 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
12734 (native-inputs
12735 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
12736 (home-page "https://github.com/AlecAivazis/nautilus")
12737 (synopsis "Library for creating microservice applications")
12738 (description
12739 "Nautilus is a framework for flux based microservices that looks to
12740provide extendible implementations of common aspects of a cloud so that you can
12741focus on building massively scalable web applications.")
12742 (license license:expat)))
94cffc63 12743
89cd988b
DM
12744(define-public python-snowballstemmer
12745 (package
12746 (name "python-snowballstemmer")
12747 (version "1.2.1")
12748 (source (origin
1bd858cc
MB
12749 (method url-fetch)
12750 (uri (pypi-uri "snowballstemmer" version))
12751 (sha256
12752 (base32
12753 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
89cd988b
DM
12754 (build-system python-build-system)
12755 (arguments
12756 `(;; No tests exist
12757 #:tests? #f))
12758 (home-page "https://github.com/shibukawa/snowball_py")
12759 (synopsis "Snowball stemming library collection for Python")
12760 (description "This package provides 16 word stemmer algorithms generated
12761from Snowball algorithms. It includes the 15 original ones plus the Poerter
12762English stemmer.")
12763 (license license:bsd-3)))
12764
12765(define-public python2-snowballstemmer
12766 (package-with-python2 python-snowballstemmer))
12767
754bfd70
DM
12768(define-public python-sphinx-cloud-sptheme
12769 (package
12770 (name "python-sphinx-cloud-sptheme")
5095bc7d 12771 (version "1.8.0")
754bfd70 12772 (source (origin
1bd858cc
MB
12773 (method url-fetch)
12774 (uri (pypi-uri "cloud_sptheme" version))
12775 (sha256
12776 (base32
5095bc7d 12777 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
1bd858cc 12778 (build-system python-build-system)
a31e2f1a
MB
12779 ;; FIXME: The 'pypi' release archive does not contain tests.
12780 (arguments '(#:tests? #f))
1bd858cc
MB
12781 (native-inputs
12782 `(("python-sphinx" ,python-sphinx)))
12783 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12784 (synopsis "'Cloud' theme for Sphinx documenter")
12785 (description "This package contains the \"Cloud\" theme for Sphinx and some
754bfd70 12786related extensions.")
1bd858cc 12787 (license license:bsd-3)))
754bfd70
DM
12788
12789(define-public python2-sphinx-cloud-sptheme
12790 (package-with-python2 python-sphinx-cloud-sptheme))
12791
807a5b32
DM
12792(define-public python-sphinx-alabaster-theme
12793 (package
12794 (name "python-sphinx-alabaster-theme")
12795 (version "0.7.9")
1bd858cc
MB
12796 (source (origin
12797 (method url-fetch)
12798 (uri (pypi-uri "alabaster" version))
12799 (sha256
12800 (base32
12801 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
807a5b32
DM
12802 (build-system python-build-system)
12803 (propagated-inputs
12804 `(("python-pygments" ,python-pygments)))
12805 (home-page "https://alabaster.readthedocs.io/")
12806 (synopsis "Configurable sidebar-enabled Sphinx theme")
12807 (description "Alabaster is a visually (c)lean, responsive, configurable
12808theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12809 (license license:bsd-3)))
12810
12811(define-public python2-sphinx-alabaster-theme
12812 (package-with-python2 python-sphinx-alabaster-theme))
12813
66d3f50a
LF
12814(define-public python-betamax
12815 (package
12816 (name "python-betamax")
12817 (version "0.8.0")
12818 (source
12819 (origin
12820 (method url-fetch)
12821 (uri (pypi-uri "betamax" version))
12822 (sha256
12823 (base32
12824 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12825 (build-system python-build-system)
12826 (arguments
12827 '(;; Many tests fail because they require networking.
12828 #:tests? #f))
c415f763 12829 (propagated-inputs
66d3f50a
LF
12830 `(("python-requests" ,python-requests)))
12831 (home-page "https://github.com/sigmavirus24/betamax")
12832 (synopsis "Record HTTP interactions with python-requests")
12833 (description "Betamax will record your test suite's HTTP interactions and
12834replay them during future tests. It is designed to work with python-requests.")
f210e944 12835 (license license:expat)))
66d3f50a
LF
12836
12837(define-public python2-betamax
f210e944 12838 (package-with-python2 python-betamax))
ca0635b4 12839
94cffc63
LF
12840(define-public python-s3transfer
12841 (package
12842 (name "python-s3transfer")
1b5ea092 12843 (version "0.1.10")
94cffc63
LF
12844 (source (origin
12845 (method url-fetch)
12846 (uri (pypi-uri "s3transfer" version))
12847 (sha256
12848 (base32
1b5ea092 12849 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
94cffc63 12850 (build-system python-build-system)
fad8bf97
LF
12851 (arguments
12852 `(#:phases
12853 (modify-phases %standard-phases
12854 (replace 'check
12855 (lambda _
12856 ;; 7 of the 'integration' tests require network access or login
12857 ;; credentials.
12858 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 12859 (native-inputs
fad8bf97
LF
12860 `(("python-docutils" ,python-docutils)
12861 ("python-mock" ,python-mock)
12862 ("python-nose" ,python-nose)))
f22efa01 12863 (propagated-inputs
94cffc63
LF
12864 `(("python-botocore" ,python-botocore)))
12865 (synopsis "Amazon S3 Transfer Manager")
12866 (description "S3transfer is a Python library for managing Amazon S3
12867transfers.")
12868 (home-page "https://github.com/boto/s3transfer")
12869 (license license:asl2.0)
12870 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12871
12872(define-public python2-s3transfer
12873 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12874 (package
12875 (inherit base)
12876 (native-inputs
12877 `(("python2-futures" ,python2-futures)
94cffc63 12878 ,@(package-native-inputs base))))))
8ab59181
HG
12879
12880(define-public python-setproctitle
12881(package
12882 (name "python-setproctitle")
12883 (version "1.1.10")
12884 (source
12885 (origin
12886 (method url-fetch)
12887 (uri (pypi-uri "setproctitle" version))
12888 (sha256
12889 (base32
12890 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12891 (build-system python-build-system)
12892 (arguments
12893 '(#:phases
12894 (modify-phases %standard-phases
12895 (add-before 'check 'patch-Makefile
12896 ;; Stricly this is only required for the python2 variant.
12897 ;; But adding a phase in an inherited package seems to be
12898 ;; cumbersum. So we patch even for python3.
12899 (lambda _
12900 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12901 (when nose
12902 (substitute* "Makefile"
12903 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12904 (string-append nose "/bin/nosetests "))))
12905 #t)))
12906 (replace 'check
12907 (lambda _
12908 (setenv "PYTHON" (or (which "python3") (which "python")))
12909 (setenv "PYCONFIG" (or (which "python3-config")
12910 (which "python-config")))
12911 (setenv "CC" "gcc")
12912 ;; No need to extend PYTHONPATH to find the built package, since
12913 ;; the Makefile will build anyway
12914 (zero? (system* "make" "check")))))))
12915 (native-inputs
12916 `(("procps" ,procps))) ; required for tests
12917 (home-page
12918 "https://github.com/dvarrazzo/py-setproctitle")
12919 (synopsis
12920 "Setproctitle implementation for Python to customize the process title")
12921 (description "The library allows a process to change its title (as displayed
12922by system tools such as ps and top).
12923
12924Changing the title is mostly useful in multi-process systems, for
12925example when a master process is forked: changing the children's title
12926allows to identify the task each process is busy with. The technique
12927is used by PostgreSQL and the OpenSSH Server for example.")
12928 (license license:bsd-3)
12929 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12930
12931(define-public python2-setproctitle
12932 (let ((base (package-with-python2
12933 (strip-python2-variant python-setproctitle))))
12934 (package
12935 (inherit base)
12936 (native-inputs `(("python2-nose" ,python2-nose)
12937 ,@(package-native-inputs base))))))
162e42d8
HG
12938
12939(define-public python-validictory
12940 (package
12941 (name "python-validictory")
12942 (version "1.0.1")
12943 (source
12944 (origin
12945 (method url-fetch)
12946 (uri (pypi-uri "validictory" version))
12947 (sha256
12948 (base32
12949 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12950 (build-system python-build-system)
12951 (arguments
12952 '(#:phases
12953 (modify-phases %standard-phases
12954 (add-after 'unpack 'bootstrap
12955 ;; Move the tests out of the package directory to avoid
12956 ;; packaging them.
12957 (lambda* _
12958 (rename-file "validictory/tests" "tests")
12959 (delete-file "tests/__init__.py")))
12960 (replace 'check
12961 (lambda _
12962 ;; Extend PYTHONPATH so the built package will be found.
12963 (setenv "PYTHONPATH"
12964 (string-append (getcwd) "/build/lib:"
12965 (getenv "PYTHONPATH")))
12966 (zero? (system* "py.test" "-vv" )))))))
12967 (native-inputs
12968 `(("python-pytest" ,python-pytest)))
12969 (home-page
12970 "https://github.com/jamesturk/validictory")
12971 (synopsis "General purpose Python data validator")
12972 (description "It allows validation of arbitrary Python data structures.
12973
12974The schema format is based on the JSON Schema
12975proposal (http://json-schema.org), so combined with json the library is also
12976useful as a validator for JSON data.")
f210e944 12977 (license license:expat)))
162e42d8
HG
12978
12979(define-public python2-validictory
f210e944 12980 (package-with-python2 python-validictory))
0990edfe
DM
12981
12982(define-public python-aniso8601
12983 (package
12984 (name "python-aniso8601")
12985 (version "1.1.0")
12986 (source
12987 (origin
12988 (method url-fetch)
12989 (uri (pypi-uri "aniso8601" version))
12990 (sha256
12991 (base32
12992 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12993 (build-system python-build-system)
12994 (propagated-inputs
22d7360b 12995 `(("python-dateutil" ,python-dateutil)))
0990edfe
DM
12996 (home-page
12997 "https://bitbucket.org/nielsenb/aniso8601")
12998 (synopsis
12999 "Python library for parsing ISO 8601 strings")
13000 (description
13001 "This package contains a library for parsing ISO 8601 datetime strings.")
13002 (license license:bsd-3)))
999d964d
DM
13003
13004(define-public python-flask-restful
13005 (package
13006 (name "python-flask-restful")
13007 (version "0.3.5")
13008 (source
13009 (origin
13010 (method url-fetch)
13011 (uri (pypi-uri "Flask-RESTful" version))
13012 (sha256
13013 (base32
13014 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
13015 (build-system python-build-system)
13016 (propagated-inputs
13017 `(("python-aniso8601" ,python-aniso8601)
13018 ("python-flask" ,python-flask)
13019 ("python-pycrypto" ,python-pycrypto)
13020 ("python-pytz" ,python-pytz)))
13021 (native-inputs
13022 `(;; Optional dependency of Flask. Tests need it.
13023 ("python-blinker" ,python-blinker)
13024 ("python-mock" ,python-mock) ; For tests
13025 ("python-nose" ,python-nose) ; For tests
13026 ("python-sphinx" ,python-sphinx)))
13027 (home-page
13028 "https://www.github.com/flask-restful/flask-restful/")
13029 (synopsis
13030 "Flask module for creating REST APIs")
13031 (description
13032 "This package contains a Flask module for creating REST APIs.")
13033 (license license:bsd-3)))
31288222
DM
13034
13035(define-public python-flask-basicauth
13036 (package
13037 (name "python-flask-basicauth")
13038 (version "0.2.0")
13039 (source
13040 (origin
13041 (method url-fetch)
13042 (uri (pypi-uri "Flask-BasicAuth" version))
13043 (sha256
13044 (base32
13045 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
13046 (build-system python-build-system)
13047 (propagated-inputs
13048 `(("python-flask" ,python-flask)))
13049 (home-page
13050 "https://github.com/jpvanhal/flask-basicauth")
13051 (synopsis
13052 "HTTP basic access authentication for Flask")
13053 (description
13054 "This package provides HTTP basic access authentication for Flask.")
13055 (license license:bsd-3)))
903276d0
DM
13056
13057(define-public python-flask-sqlalchemy
13058 (package
13059 (name "python-flask-sqlalchemy")
13060 (version "2.1")
13061 (source
13062 (origin
13063 (method url-fetch)
13064 (uri (pypi-uri "Flask-SQLAlchemy" version))
13065 (sha256
13066 (base32
13067 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
13068 (build-system python-build-system)
13069 (propagated-inputs
13070 `(("python-flask" ,python-flask)
13071 ("python-sqlalchemy" ,python-sqlalchemy)))
13072 (home-page
7bf837fd 13073 "https://github.com/mitsuhiko/flask-sqlalchemy")
903276d0
DM
13074 (synopsis
13075 "Module adding SQLAlchemy support to your Flask application")
13076 (description
13077 "This package adds SQLAlchemy support to your Flask application.")
13078 (license license:bsd-3)))
329b4b3b
LF
13079
13080(define-public python-pyev
13081 (package
13082 (name "python-pyev")
13083 (version "0.9.0")
13084 (source
13085 (origin
13086 (method url-fetch)
13087 (uri (pypi-uri "pyev" version))
13088 (sha256
13089 (base32
13090 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13091 (build-system python-build-system)
13092 (arguments
13093 `(#:tests? #f ; no test suite
13094 #:phases
13095 (modify-phases %standard-phases
13096 (add-after 'unpack 'patch
13097 (lambda* (#:key inputs #:allow-other-keys)
13098 (let ((libev (string-append (assoc-ref inputs "libev")
13099 "/lib/libev.so.4")))
13100 (substitute* "setup.py"
13101 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13102 (string-append "libev_dll_name = \"" libev "\"")))))))))
13103 (inputs
13104 `(("libev" ,libev)))
13105 (home-page "http://pythonhosted.org/pyev/")
13106 (synopsis "Python libev interface")
13107 (description "Pyev provides a Python interface to libev.")
13108 (license license:gpl3)))
13109
13110(define-public python2-pyev
13111 (package-with-python2 python-pyev))
45b4f127
DM
13112
13113(define-public python-imagesize
13114 (package
13115 (name "python-imagesize")
13116 (version "0.7.1")
13117 (source
13118 (origin
13119 (method url-fetch)
13120 (uri (pypi-uri "imagesize" version))
13121 (sha256
13122 (base32
13123 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
13124 (build-system python-build-system)
9422c98a
LF
13125 (arguments
13126 '(;; Test files are not distributed on PyPi:
13127 ;; https://github.com/shibukawa/imagesize_py/issues/7
13128 #:tests? #f))
45b4f127
DM
13129 (home-page "https://github.com/shibukawa/imagesize_py")
13130 (synopsis "Gets image size of files in variaous formats in Python")
13131 (description
13132 "This package allows determination of image size from
13133PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 13134 (license license:expat)))
45b4f127
DM
13135
13136(define-public python2-imagesize
f210e944 13137 (package-with-python2 python-imagesize))
2f6dd9cd
AI
13138
13139(define-public python-axolotl-curve25519
13140 (package
13141 (name "python-axolotl-curve25519")
13142 (version "0.1")
13143 (source
13144 (origin
13145 (method git-fetch)
13146 (uri (git-reference
13147 (url "git://github.com/tgalal/python-axolotl-curve25519")
13148 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13149 (file-name (string-append name "-" version "-checkout"))
13150 (sha256
13151 (base32
13152 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13153 (build-system python-build-system)
13154 (arguments
13155 `(;; Prevent creation of the egg. This works around
13156 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13157 #:configure-flags '("--root=/")))
2f6dd9cd
AI
13158 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13159 (synopsis "Python wrapper for curve25519 library")
13160 (description "This is a python wrapper for the curve25519 library
13161with ed25519 signatures. The C code was pulled from
13162libaxolotl-android. At the moment this wrapper is meant for use by
13163python-axolotl.")
13164 (license (list license:gpl3 ; Most files
683cdbf5 13165 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
13166
13167(define-public python2-axolotl-curve25519
13168 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
13169
13170(define-public python-axolotl
13171 (package
13172 (name "python-axolotl")
13173 (version "0.1.35")
13174 (source
13175 (origin
13176 (method url-fetch)
13177 (uri (string-append
13178 "https://github.com/tgalal/python-axolotl/archive/"
13179 version ".tar.gz"))
13180 (file-name (string-append name "-" version ".tar.gz"))
13181 (sha256
13182 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13183 (build-system python-build-system)
13184 (arguments
13185 `(#:phases
13186 (modify-phases %standard-phases
13187 ;; Don't install tests
13188 (add-before 'install 'remove-tests
13189 (lambda _
13190 (for-each delete-file-recursively
13191 '("axolotl/tests" "build/lib/axolotl/tests"))
01fb9f66 13192 #t)))))
06ff0837
AI
13193 (propagated-inputs
13194 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13195 ("python-dateutil" ,python-dateutil)
13196 ("python-protobuf" ,python-protobuf)
13197 ("python-pycrypto" ,python-pycrypto)))
13198 (home-page "https://github.com/tgalal/python-axolotl")
13199 (synopsis "Python port of libaxolotl-android")
13200 (description "This is a python port of libaxolotl-android. This
13201is a ratcheting forward secrecy protocol that works in synchronous and
13202asynchronous messaging environments.")
13203 (license license:gpl3)))
13204
13205(define-public python2-axolotl
13206 (package-with-python2 python-axolotl))
e2fca490
DM
13207
13208(define-public python-termstyle
13209 (package
13210 (name "python-termstyle")
13211 (version "0.1.11")
13212 (source
13213 (origin
13214 (method url-fetch)
13215 (uri (pypi-uri "termstyle" version))
13216 (sha256
13217 (base32
13218 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13219 (build-system python-build-system)
7917a135
MB
13220 (arguments
13221 '(#:phases
13222 (modify-phases %standard-phases
13223 (replace 'check
13224 (lambda _
13225 (zero? (system* "python" "test3.py")))))))
7bf837fd 13226 (home-page "https://github.com/gfxmonk/termstyle")
e2fca490
DM
13227 (synopsis "Console text coloring for Python")
13228 (description "This package provides console text coloring for Python.")
13229 (license license:bsd-3)))
1e6112d8
DM
13230
13231(define-public python-rednose
13232 (package
13233 (name "python-rednose")
13234 (version "1.2.1")
13235 (source
13236 (origin
13237 (method url-fetch)
13238 (uri (pypi-uri "rednose" version))
13239 (sha256
13240 (base32
13241 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13242 (build-system python-build-system)
13243 (arguments
13244 `(#:phases
13245 (modify-phases %standard-phases
13246 (add-after 'unpack 'fix-deps
13247 (lambda _
13248 ;; See <https://github.com/JBKahn/rednose/issues/12>
13249 (substitute* "setup.py"
13250 (("python-termstyle") "termstyle"))
13251 #t)))))
13252 (propagated-inputs
13253 `(("python-colorama" ,python-colorama)
13254 ("python-termstyle" ,python-termstyle)))
13255 (native-inputs
13256 `(("python-six" ,python-six)
13257 ("python-nose" ,python-nose)))
13258 (home-page "https://github.com/JBKahn/rednose")
13259 (synopsis "Colored output for Python nosetests")
13260 (description "This package provides colored output for the
13261@command{nosetests} command of the Python Nose unit test framework.")
13262 (license license:bsd-3)))
0a7f17f0 13263
ef74a425
MFM
13264(define-public python2-rednose
13265 (package-with-python2 python-rednose))
13266
0a7f17f0
DM
13267(define-public python-flask-restplus
13268 (package
13269 (name "python-flask-restplus")
13270 (version "0.9.2")
13271 (source
13272 (origin
13273 (method url-fetch)
13274 (uri (pypi-uri "flask-restplus" version))
13275 (sha256
13276 (base32
13277 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13278 (build-system python-build-system)
59f74825
MB
13279 (arguments
13280 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13281 ;; #:phases
13282 ;; (modify-phases %standard-phases
13283 ;; (replace 'check
13284 ;; (lambda _
13285 ;; (zero? (system* "nosetests")))))))
0a7f17f0
DM
13286 (propagated-inputs
13287 `(("python-aniso8601" ,python-aniso8601)
13288 ("python-flask" ,python-flask)
13289 ("python-jsonschema" ,python-jsonschema)
13290 ("python-pytz" ,python-pytz)
13291 ("python-six" ,python-six)))
13292 (native-inputs
13293 `(("python-tzlocal" ,python-tzlocal)
13294 ("python-blinker" ,python-blinker)
13295 ("python-nose" ,python-nose)
13296 ("python-rednose" ,python-rednose)))
13297 (home-page "https://github.com/noirbizarre/flask-restplus")
13298 (synopsis "Framework for documented API development with Flask")
13299 (description "This package provides a framework for API development with
13300the Flask web framework in Python. It is similar to package
13301@code{python-flask-restful} but supports the @code{python-swagger}
13302documentation builder.")
13303 (license license:expat)))
1ed21519
DM
13304
13305(define-public python-sadisplay
13306 (package
13307 (name "python-sadisplay")
13308 (version "0.4.6")
13309 (source
13310 (origin
13311 (method url-fetch)
13312 (uri (pypi-uri "sadisplay" version))
13313 (sha256
13314 (base32
13315 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13316 (build-system python-build-system)
13317 (propagated-inputs
13318 `(("python-sqlalchemy" ,python-sqlalchemy)))
13319 (native-inputs
13320 `(("python-nose" ,python-nose)))
13321 (home-page "https://bitbucket.org/estin/sadisplay")
13322 (synopsis "SQLAlchemy schema displayer")
13323 (description "This package provides a program to build Entity
13324Relationship diagrams from a SQLAlchemy model (or directly from the
13325database).")
13326 (license license:bsd-3)))
13327
13328(define-public python2-sadisplay
13329 (package-with-python2 python-sadisplay))
444a79b6
DM
13330
13331(define-public python-flask-restful-swagger
13332 (package
13333 (name "python-flask-restful-swagger")
13334 (version "0.19")
13335 (source
13336 (origin
13337 (method url-fetch)
13338 (uri (pypi-uri "flask-restful-swagger" version))
13339 (sha256
13340 (base32
13341 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13342 (build-system python-build-system)
13343 (propagated-inputs
13344 `(("python-flask-restful" ,python-flask-restful)))
13345 (home-page "https://github.com/rantav/flask-restful-swagger")
13346 (synopsis "Extract Swagger specs from Flask-Restful projects")
13347 (description "This package lets you extract Swagger API documentation
13348specs from your Flask-Restful projects.")
13349 (license license:expat)))
13350
13351(define-public python2-flask-restful-swagger
13352 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
13353
13354(define-public python-argcomplete
13355 (package
13356 (name "python-argcomplete")
13357 (version "1.7.0")
13358 (source
13359 (origin
13360 (method url-fetch)
13361 (uri (pypi-uri "argcomplete" version))
13362 (sha256
13363 (base32
13364 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13365 (build-system python-build-system)
80ce42bd
MB
13366 (native-inputs
13367 `(("python-pexpect" ,python-pexpect)
13368 ("tcsh" ,tcsh)))
6c2e82bc
TGR
13369 (home-page "https://github.com/kislyuk/argcomplete")
13370 (synopsis "Shell tab completion for Python argparse")
13371 (description "argcomplete provides extensible command line tab completion
13372of arguments and options for Python scripts using @code{argparse}. It's
13373particularly useful for programs with many options or sub-parsers that can
13374dynamically suggest completions; for example, when browsing resources over the
13375network.")
13376 (license license:asl2.0)))
13377
13378(define-public python2-argcomplete
13379 (package-with-python2 python-argcomplete))
361a2fcf
TGR
13380
13381(define-public python-xopen
13382 (package
13383 (name "python-xopen")
13384 (version "0.1.1")
13385 (source
13386 (origin
13387 (method url-fetch)
13388 (uri (pypi-uri "xopen" version))
13389 (sha256
13390 (base32
13391 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13392 (file-name (string-append name "-" version ".tar.gz"))))
13393 (build-system python-build-system)
13394 (home-page "https://github.com/marcelm/xopen/")
13395 (synopsis "Open compressed files transparently")
13396 (description "This module provides an @code{xopen} function that works like
13397Python's built-in @code{open} function, but can also deal with compressed files.
13398Supported compression formats are gzip, bzip2 and, xz, and are automatically
13399recognized by their file extensions. The focus is on being as efficient as
13400possible on all supported Python versions.")
13401 (license license:expat)))
13402
13403(define-public python2-xopen
13404 (package-with-python2 python-xopen))
8d67610b
DM
13405
13406(define-public python2-cheetah
13407 (package
13408 (name "python2-cheetah")
13409 (version "2.4.4")
13410 (source
13411 (origin
13412 (method url-fetch)
13413 (uri (pypi-uri "Cheetah" version))
13414 (sha256
13415 (base32
13416 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13417 (build-system python-build-system)
13418 (arguments
13419 `(#:python ,python-2))
13420 (propagated-inputs
13421 `(("python2-markdown" ,python2-markdown)))
13422 (home-page "https://pythonhosted.org/Cheetah/")
13423 (synopsis "Template engine")
13424 (description "Cheetah is a text-based template engine and Python code
13425generator.
13426
13427Cheetah can be used as a standalone templating utility or referenced as
13428a library from other Python applications. It has many potential uses,
13429but web developers looking for a viable alternative to ASP, JSP, PHP and
13430PSP are expected to be its principle user group.
13431
13432Features:
13433@enumerate
13434@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13435 text-based format.
13436@item Cleanly separates content, graphic design, and program code.
13437@item Blends the power and flexibility of Python with a simple template language
13438 that non-programmers can understand.
13439@item Gives template writers full access to any Python data structure, module,
13440 function, object, or method in their templates.
13441@item Makes code reuse easy by providing an object-orientated interface to
13442 templates that is accessible from Python code or other Cheetah templates.
13443 One template can subclass another and selectively reimplement sections of it.
13444@item Provides a simple, yet powerful, caching mechanism that can dramatically
13445 improve the performance of a dynamic website.
13446@item Compiles templates into optimized, yet readable, Python code.
13447@end enumerate")
13448 (license (license:x11-style "file://LICENSE"))))
916aafa4 13449
d83d8722
DM
13450(define-public python-dulwich
13451 (package
13452 (name "python-dulwich")
13453 (version "0.16.3")
13454 (source
13455 (origin
13456 (method url-fetch)
13457 (uri (list (string-append "https://www.dulwich.io/releases/"
13458 "dulwich-" version ".tar.gz")
13459 (pypi-uri "dulwich" version)))
13460 (sha256
13461 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13462 (build-system python-build-system)
13463 (arguments
13464 `(#:phases
13465 (modify-phases %standard-phases
13466 (add-before 'check 'fix-tests
13467 (lambda* (#:key inputs #:allow-other-keys)
13468 ;; The tests use Popen with a custom environment which doesn't
13469 ;; include PATH.
13470 (substitute* "dulwich/tests/compat/utils.py"
13471 (("'git'") (string-append "'"
13472 (which "git")
13473 "'")))
13474 (substitute* '("dulwich/tests/test_repository.py"
13475 "dulwich/tests/test_hooks.py")
13476 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13477 (setenv "TEST_RUNNER" "unittest")
13478 (setenv "PYTHONHASHSEED" "random")
13479 #t)))))
13480 (propagated-inputs
13481 `(("python-fastimport" ,python-fastimport)))
13482 (native-inputs
13483 `(("python-mock" ,python-mock)
13484 ("python-geventhttpclient" ,python-geventhttpclient)
13485 ("git" ,git)))
13486 (home-page "https://www.dulwich.io/")
13487 (synopsis "Git implementation in Python")
13488 (description "Dulwich is an implementation of the Git file formats and
13489protocols written in pure Python.")
13490 ;; Can be used with either license.
13491 (license (list license:asl2.0 license:gpl2+))))
13492
13493(define-public python2-dulwich
13494 (package-with-python2 python-dulwich))
424b1ae7 13495
916aafa4
CZ
13496(define-public python-pbkdf2
13497 (package
13498 (name "python-pbkdf2")
13499 (version "1.3")
13500 (source
13501 (origin
13502 (method url-fetch)
13503 (uri (pypi-uri "pbkdf2" version))
13504 (sha256
13505 (base32
13506 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13507 (build-system python-build-system)
fffcd8b8
MB
13508 (arguments
13509 '(#:phases
13510 (modify-phases %standard-phases
13511 (replace 'check
13512 (lambda _
13513 (setenv "PYTHONPATH"
13514 (string-append (getcwd) "/build/lib:"
13515 (getenv "PYTHONPATH")))
13516 (zero? (system* "python" "test/test_pbkdf2.py")))))))
916aafa4
CZ
13517 (propagated-inputs
13518 `(("python-pycrypto" ,python-pycrypto))) ; optional
13519 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13520 (synopsis "Password-based key derivation")
13521 (description "This module implements the password-based key derivation
13522function, PBKDF2, specified in RSA PKCS#5 v2.0.
13523
13524PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13525is part of the RSA Public Key Cryptography Standards series. The provided
13526implementation takes a password or a passphrase and a salt value (and
13527optionally a iteration count, a digest module, and a MAC module) and provides
13528a file-like object from which an arbitrarly-sized key can be read.")
13529 (license license:expat)))
13530
13531(define-public python2-pbkdf2
13532 (package-with-python2 python-pbkdf2))
cba84a38
CZ
13533
13534(define-public python-qrcode
13535 (package
13536 (name "python-qrcode")
13537 (version "5.3")
13538 (source
13539 (origin
13540 (method url-fetch)
13541 (uri (pypi-uri "qrcode" version))
13542 (sha256
13543 (base32
13544 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13545 (build-system python-build-system)
6925cd78
MB
13546 (arguments
13547 ;; FIXME: Tests require packaging 'pymaging'.
13548 '(#:tests? #f))
cba84a38
CZ
13549 (propagated-inputs
13550 `(("python-lxml" ,python-lxml) ; for SVG output
13551 ("python-pillow" ,python-pillow) ; for PNG output
13552 ("python-six" ,python-six)))
13553 (home-page "https://github.com/lincolnloop/python-qrcode")
13554 (synopsis "QR Code image generator")
13555 (description "This package provides a pure Python QR Code generator
13556module. It uses the Python Imaging Library (PIL) to allow for the generation
13557of QR Codes.
13558
13559In addition this package provides a command line tool to generate QR codes and
13560either write these QR codes to a file or do the output as ascii art at the
13561console.")
13562 (license license:bsd-3)))
13563
13564(define-public python2-qrcode
13565 (package-with-python2 python-qrcode))
af7caada
CZ
13566
13567;; SlowAES isn't compatible with Python 3.
13568(define-public python2-slowaes
13569 (package
13570 (name "python2-slowaes")
13571 (version "0.1a1")
13572 (source
13573 (origin
13574 (method url-fetch)
13575 (uri (pypi-uri "slowaes" version))
13576 (sha256
13577 (base32
13578 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13579 (build-system python-build-system)
13580 (arguments `(#:python ,python-2))
13581 (home-page "http://code.google.com/p/slowaes/")
13582 (synopsis "Implementation of AES in Python")
13583 (description "This package contains an implementation of AES in Python.
13584This implementation is slow (hence the project name) but still useful when
13585faster ones are not available.")
13586 (license license:asl2.0)))
1a917fc9
MFM
13587
13588(define-public python-rst2ansi
13589 (package
13590 (name "python-rst2ansi")
13591 (version "0.1.5")
13592 (source
13593 (origin
13594 (method url-fetch)
13595 (uri (pypi-uri "rst2ansi" version))
13596 (sha256
13597 (base32
13598 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13599 (build-system python-build-system)
13600 (propagated-inputs
13601 `(("python-docutils" ,python-docutils)))
13602 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13603 (synopsis "Convert RST to ANSI-decorated console output")
13604 (description
13605 "Python module dedicated to rendering RST (reStructuredText) documents
13606to ansi-escaped strings suitable for display in a terminal.")
13607 (license license:expat)))
2f4623db 13608
ca0e62bf
SR
13609(define-public python-ansi2html
13610 (package
13611 (name "python-ansi2html")
13612 (version "1.2.0")
13613 (source
13614 (origin
13615 (method url-fetch)
13616 (uri (pypi-uri "ansi2html" version))
13617 (sha256
13618 (base32
13619 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13620 (build-system python-build-system)
13621 (native-inputs
13622 `(("python-mock" ,python-mock)
13623 ("python-nose" ,python-nose)))
13624 (propagated-inputs
13625 `(("python-six" ,python-six)))
13626 (home-page "http://github.com/ralphbean/ansi2html")
13627 (synopsis "Convert ANSI-decorated console output to HTML")
13628 (description
13629 "@command{ansi2html} is a Python library and command line utility for
13630convering text with ANSI color codes to HTML or LaTeX.")
13631 (license license:gpl3+)))
13632
13633(define-public python2-ansi2html
13634 (package-with-python2 python-ansi2html))
13635
2f4623db
MFM
13636(define-public python-ddt
13637 (package
13638 (name "python-ddt")
13639 (version "1.1.1")
13640 (source
13641 (origin
13642 (method url-fetch)
13643 (uri (pypi-uri "ddt" version))
13644 (sha256
13645 (base32
13646 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13647 (build-system python-build-system)
13648 (native-inputs
13649 `(("python-mock" ,python-mock)
13650 ("python-nose" ,python-nose)))
13651 (propagated-inputs
13652 `(("python-six" ,python-six)
13653 ("python-pyyaml" ,python-pyyaml)))
13654 (home-page "https://github.com/txels/ddt")
13655 (synopsis "Data-Driven Tests")
13656 (description
13657 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13658it with different test data, and make it appear as multiple test cases.")
13659 (license license:expat)))
13660
13661(define-public python2-ddt
13662 (package-with-python2 python-ddt))
2299b137
MFM
13663
13664(define-public python-pycosat
13665 (package
13666 (name "python-pycosat")
13667 (version "0.6.1")
13668 (source
13669 (origin
13670 (method url-fetch)
13671 (uri (pypi-uri "pycosat" version))
13672 (sha256
13673 (base32
13674 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13675 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13676 (build-system python-build-system)
13677 (home-page "https://github.com/ContinuumIO/pycosat")
13678 (synopsis "Bindings to picosat (a SAT solver)")
13679 (description
13680 "This package provides efficient Python bindings to @code{picosat} on
13681the C level. When importing pycosat, the @code{picosat} solver becomes part
13682of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13683Problem} (SAT) solver.")
13684 (license license:expat)))
13685
13686(define-public python2-pycosat
13687 (package-with-python2 python-pycosat))
8fd68504
MFM
13688
13689(define-public python2-ruamel.ordereddict
13690 (package
13691 (name "python2-ruamel.ordereddict")
13692 (version "0.4.9")
13693 (source
13694 (origin
13695 (method url-fetch)
13696 (uri (pypi-uri "ruamel.ordereddict" version))
13697 (sha256
13698 (base32
13699 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13700 (build-system python-build-system)
13701 (arguments
13702 `(#:python ,python-2
13703 #:phases
13704 (modify-phases %standard-phases
13705 (delete 'check)
13706 (add-after 'install 'check
13707 (lambda* (#:key inputs outputs #:allow-other-keys)
13708 (add-installed-pythonpath inputs outputs)
13709 (zero? (system* "python" "test/testordereddict.py")))))))
13710 (home-page "https://bitbucket.org/ruamel/ordereddict")
13711 (synopsis "Version of dict that keeps keys in insertion order")
13712 (description
13713 "This is an implementation of an ordered dictionary with @dfn{Key
13714Insertion Order} (KIO: updates of values do not affect the position of the
13715key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13716removed and put at the back). The standard library module @code{OrderedDict},
13717implemented later, implements a subset of @code{ordereddict} functionality.
13718Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13719Order} (KSO, no sorting function can be specified, but a transform can be
13720specified to apply on the key before comparison (e.g. @code{string.lower})).")
13721 (license license:expat)))
d8768e31
EB
13722
13723(define-public python-pypeg2
13724 (package
13725 (name "python-pypeg2")
13726 (version "2.15.2")
13727 (source
13728 (origin
13729 (method url-fetch)
13730 (uri (pypi-uri "pyPEG2" version))
13731 (sha256
13732 (base32
13733 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13734 (build-system python-build-system)
13735 (propagated-inputs `(("python-lxml" ,python-lxml)))
13736 (arguments
13737 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13738 '(#:tests? #f))
13739 (home-page "https://fdik.org/pyPEG/")
13740 (synopsis "Parsering Expression Grammars in Python")
13741 (description "PyPEG is an intrinsic parser interpreter framework for
13742Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13743parse many formal languages.")
13744 (license license:gpl2)))
33e9490c
AI
13745
13746(define-public python2-cliapp
13747 (package
13748 (name "python2-cliapp")
13749 (version "1.20160724")
13750 (source
13751 (origin
13752 (method url-fetch)
13753 (uri (string-append
13754 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13755 version ".tar.gz"))
13756 (sha256
13757 (base32
13758 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13759 (build-system python-build-system)
13760 (arguments
13761 `(#:python ,python-2))
13762 (propagated-inputs
13763 `(("python2-pyaml" ,python2-pyaml)))
13764 (home-page "https://liw.fi/cliapp/")
13765 (synopsis "Python framework for command line programs")
13766 (description "@code{python2-cliapp} is a python framework for
13767command line programs. It contains the typical stuff such programs
13768need to do, such as parsing the command line for options, and
13769iterating over input files.")
13770 (license license:gpl2+)))
13771
77e99411
AI
13772(define-public python2-ttystatus
13773 (package
13774 (name "python2-ttystatus")
13775 (version "0.32")
13776 (source
13777 (origin
13778 (method url-fetch)
13779 (uri (string-append
13780 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13781 version ".tar.gz"))
13782 (sha256
13783 (base32
13784 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13785 (build-system python-build-system)
13786 (arguments
13787 `(#:python ,python-2))
13788 (home-page "https://liw.fi/ttystatus/")
13789 (synopsis "Python library for showing progress reporting and
13790status updates on terminals")
13791 (description "@code{python2-ttystatus} is a python library for
13792showing progress reporting and status updates on terminals, for
13793command line programs. Output is automatically adapted to the width
13794of the terminal: truncated if it does not fit, and resized if the
13795terminal size changes.")
13796 (license license:gpl3+)))
c220f0b4
AI
13797
13798(define-public python2-tracing
13799 (package
13800 (name "python2-tracing")
13801 (version "0.10")
13802 (source
13803 (origin
13804 (method url-fetch)
13805 (uri (string-append
13806 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13807 version ".tar.gz"))
13808 (sha256
13809 (base32
13810 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13811 (build-system python-build-system)
13812 (arguments
13813 `(#:python ,python-2))
13814 (home-page "https://liw.fi/tracing/")
13815 (synopsis "Python debug logging helper")
13816 (description "@code{python2-tracing} is a python library for
13817logging debug messages. It provides a way to turn debugging messages
13818on and off, based on the filename they occur in. It is much faster
13819than using @code{logging.Filter} to accomplish the same thing, which
13820matters when code is run in production mode. The actual logging still
13821happens using the @code{logging} library.")
13822 (license license:gpl3+)))
b6b2ca5d
AI
13823
13824(define-public python2-larch
13825 (package
13826 (name "python2-larch")
13827 (version "1.20151025")
13828 (source
13829 (origin
13830 (method url-fetch)
13831 (uri (string-append
13832 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13833 version ".tar.gz"))
13834 (sha256
13835 (base32
13836 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13837 (build-system python-build-system)
13838 (arguments
13839 `(#:python ,python-2))
13840 (propagated-inputs
13841 `(("python2-tracing" ,python2-tracing)))
13842 (home-page "https://liw.fi/larch/")
13843 (synopsis "Python copy-on-write B-tree library")
13844 (description "@code{python2-larch} is an implementation of
13845particular kind of B-tree, based on research by Ohad Rodeh. See
13846@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13847on the data structure.
13848
13849The distinctive feature of this B-tree is that a node is never
13850(conceptually) modified. Instead, all updates are done by
13851copy-on-write. This makes it easy to clone a tree, and modify only the
13852clone, while other processes access the original tree.")
13853 (license license:gpl3+)))
35db2d3c
AP
13854
13855(define-public python-htmlmin
13856 (package
13857 (name "python-htmlmin")
13858 (version "0.1.10")
13859 (source
13860 (origin
13861 (method url-fetch)
13862 (uri (pypi-uri "htmlmin" version))
13863 (sha256
13864 (base32
13865 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
13866 (arguments
13867 `(#:tests? #f)) ;htmlmin has no tests
13868 (build-system python-build-system)
13869 (home-page "https://htmlmin.readthedocs.org/en/latest/")
13870 (synopsis "HTML minifier")
13871 (description "@code{htmlmin} is an HTML minifier that just works.
13872It comes with safe defaults and easily configurable options.")
13873 (license license:bsd-3)))
13874
13875(define-public python2-htmlmin
13876 (package-with-python2 python-htmlmin))
78c55663
AP
13877
13878(define-public python-flask-htmlmin
13879 (package
13880 (name "python-flask-htmlmin")
13881 (version "1.2")
13882 (source
13883 (origin
13884 (method url-fetch)
13885 (uri (pypi-uri "Flask-HTMLmin" version))
13886 (sha256
13887 (base32
13888 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
13889 (propagated-inputs
13890 `(("python-flask" ,python-flask)
13891 ("python-htmlmin" ,python-htmlmin)))
13892 (build-system python-build-system)
13893 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
13894 (synopsis "HTML response minifier for Flask")
13895 (description
13896 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
13897 (license license:bsd-3)))
13898
13899(define-public python2-flask-htmlmin
13900 (package-with-python2 python-flask-htmlmin))
a71c8638
AP
13901
13902(define-public python-flask-login
13903 (package
13904 (name "python-flask-login")
13905 (version "0.4.0")
13906 (source
13907 (origin
13908 (method url-fetch)
13909 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
13910 version ".tar.gz"))
13911 (file-name (string-append name "-" version ".tar.gz"))
13912 (sha256
13913 (base32
13914 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
13915 (arguments
13916 ;; Tests fail PEP8 compliance. See:
13917 ;; https://github.com/maxcountryman/flask-login/issues/340
13918 `(#:tests? #f))
13919 (build-system python-build-system)
13920 (home-page "https://github.com/maxcountryman/flask-login")
13921 (synopsis "User session management for Flask")
13922 (description
13923 "@code{Flask-Login} provides user session management for Flask. It
13924handles the common tasks of logging in, logging out, and remembering your
13925users' sessions over extended periods of time.")
13926 (license license:expat)))
13927
13928(define-public python2-flask-login
13929 (package-with-python2 python-flask-login))
d5ef113c
AI
13930
13931(define-public python-astroid
13932 (package
13933 (name "python-astroid")
de2f56cf 13934 (version "1.5.3")
d5ef113c
AI
13935 (source
13936 (origin
13937 (method url-fetch)
13938 (uri (string-append
13939 "https://github.com/PyCQA/astroid/archive/astroid-"
13940 version ".tar.gz"))
13941 (sha256
13942 (base32
de2f56cf 13943 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
d5ef113c
AI
13944 (build-system python-build-system)
13945 (propagated-inputs
13946 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13947 ("python-six" ,python-six)
13948 ("python-wrapt" ,python-wrapt)))
13949 (arguments
13950 `(#:phases
13951 (modify-phases %standard-phases
13952 (replace 'check
13953 (lambda _
13954 (zero? (system* "python" "-m" "unittest" "discover"
13955 "-p" "unittest*.py")))))))
13956 (home-page "https://github.com/PyCQA/astroid")
13957 (synopsis "Common base representation of python source code for pylint and
13958other projects")
13959 (description "@code{python-astroid} provides a common base representation
13960of python source code for projects such as pychecker, pyreverse, pylint, etc.
13961
13962It provides a compatible representation which comes from the _ast module. It
13963rebuilds the tree generated by the builtin _ast module by recursively walking
13964down the AST and building an extended ast. The new node classes have
13965additional methods and attributes for different usages. They include some
13966support for static inference and local name scopes. Furthermore, astroid
13967builds partial trees by inspecting living objects.")
de2f56cf
MB
13968 (license license:lgpl2.1+)
13969 (properties `((python2-variant . ,(delay python2-astroid))))))
d5ef113c
AI
13970
13971(define-public python2-astroid
de2f56cf
MB
13972 (let ((base (package-with-python2
13973 (strip-python2-variant python-astroid))))
13974 (package (inherit base)
13975 (propagated-inputs
13976 `(("python2-backports-functools-lru-cache"
13977 ,python2-backports-functools-lru-cache)
13978 ("python2-enum34" ,python2-enum34)
13979 ("python2-singledispatch" ,python2-singledispatch)
13980 ,@(package-propagated-inputs base))))))
6ba0af79
AI
13981
13982(define-public python-isort
13983 (package
13984 (name "python-isort")
13985 (version "4.2.5")
13986 (source
13987 (origin
13988 (method url-fetch)
13989 (uri (string-append
13990 "https://github.com/timothycrosley/isort/archive/"
13991 version ".tar.gz"))
13992 (file-name (string-append name "-" version ".tar.gz"))
13993 (sha256
13994 (base32
13995 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
13996 (build-system python-build-system)
13997 (native-inputs
13998 `(("python-mock" ,python-mock)
13999 ("python-pytest" ,python-pytest)))
14000 (home-page "https://github.com/timothycrosley/isort")
14001 (synopsis "Python utility/library to sort python imports")
14002 (description "@code{python-isort} is a python utility/library to sort
14003imports alphabetically, and automatically separated into sections. It
14004provides a command line utility, a python library and plugins for various
14005editors.")
14006 (license license:expat)))
14007
14008(define-public python2-isort
14009 (package-with-python2 python-isort))
965a083e
AI
14010
14011(define-public python2-backports-functools-lru-cache
14012 (package
14013 (name "python2-backports-functools-lru-cache")
14014 (version "1.3")
14015 (source
14016 (origin
14017 (method url-fetch)
14018 ;; only the pypi tarballs contain the necessary metadata
14019 (uri (pypi-uri "backports.functools_lru_cache" version))
14020 (sha256
14021 (base32
14022 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
14023 (build-system python-build-system)
14024 (native-inputs
14025 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14026 (arguments
14027 `(#:python ,python-2))
14028 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14029 (synopsis "Backport of functools.lru_cache from Python 3.3")
14030 (description "@code{python2-backports-functools-lru-cache} is a backport
14031of @code{functools.lru_cache} from python 3.3.")
14032 (license license:expat)))
23db3fc6
AI
14033
14034(define-public python-configparser
14035 (package
14036 (name "python-configparser")
14037 (version "3.5.0")
14038 (source
14039 (origin
14040 (method url-fetch)
14041 (uri (string-append
14042 "https://bitbucket.org/ambv/configparser/get/"
14043 version ".tar.bz2"))
14044 (file-name (string-append name "-" version ".tar.gz"))
14045 (sha256
14046 (base32
14047 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
14048 (build-system python-build-system)
14049 (home-page "http://docs.python.org/py3k/library/configparser.html")
14050 (synopsis "Backport of configparser from python 3.5")
14051 (description "@code{python-configparser} is a backport of
14052@code{configparser} from Python 3.5 so that it can be used directly
14053in other versions.")
14054 (license license:expat)))
14055
14056(define-public python2-configparser
14057 (package-with-python2 python-configparser))
61550ded
AI
14058
14059(define-public python2-coverage-test-runner
14060 (package
14061 (name "python2-coverage-test-runner")
14062 (version "1.11")
14063 (source
14064 (origin
14065 (method url-fetch)
14066 (uri (string-append
14067 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
14068 "coverage-test-runner/snapshot/coverage-test-runner-"
14069 version ".tar.gz"))
14070 (sha256
14071 (base32
14072 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
14073 (build-system python-build-system)
14074 (arguments
14075 `(#:python ,python-2
14076 #:phases
14077 (modify-phases %standard-phases
14078 (replace 'check
14079 (lambda _
14080 (zero? (system* "./testrun")))))))
14081 (propagated-inputs
14082 `(("python2-coverage" ,python2-coverage)))
14083 (home-page "https://liw.fi/coverage-test-runner/")
14084 (synopsis "Python module for running unit tests")
14085 (description "@code{CoverageTestRunner} is a python module for running
d1e4ad1b 14086unit tests and failing them if the unit test module does not exercise all
61550ded
AI
14087statements in the module it tests.")
14088 (license license:gpl3+)))
315944a3
AI
14089
14090(define-public python-pylint
14091 (package
14092 (name "python-pylint")
a8a964db 14093 (version "1.7.2")
315944a3
AI
14094 (source
14095 (origin
14096 (method url-fetch)
14097 (uri (string-append
14098 "https://github.com/PyCQA/pylint/archive/pylint-"
14099 version ".tar.gz"))
14100 (sha256
14101 (base32
a8a964db 14102 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
315944a3
AI
14103 (build-system python-build-system)
14104 (native-inputs
a8a964db
MB
14105 `(("python-pytest" ,python-pytest)
14106 ("python-pytest-runner" ,python-pytest-runner)
14107 ("python-tox" ,python-tox)))
315944a3
AI
14108 (propagated-inputs
14109 `(("python-astroid" ,python-astroid)
14110 ("python-isort" ,python-isort)
14111 ("python-mccabe" ,python-mccabe)
14112 ("python-six" ,python-six)))
14113 (arguments
14114 `(#:phases
14115 (modify-phases %standard-phases
14116 (replace 'check
14117 (lambda _
14118 ;; Somehow, tests for python2-pylint
14119 ;; fail if run from the build directory
14120 (let ((work "/tmp/work"))
14121 (mkdir-p work)
14122 (setenv "PYTHONPATH"
14123 (string-append (getenv "PYTHONPATH") ":" work))
14124 (copy-recursively "." work)
14125 (with-directory-excursion "/tmp"
14126 (zero? (system* "python" "-m" "unittest" "discover"
14127 "-s" (string-append work "/pylint/test")
14128 "-p" "*test_*.py")))))))))
14129 (home-page "https://github.com/PyCQA/pylint")
14130 (synopsis "Python source code analyzer which looks for coding standard
14131errors")
14132 (description "Pylint is a Python source code analyzer which looks
14133for programming errors, helps enforcing a coding standard and sniffs
14134for some code smells (as defined in Martin Fowler's Refactoring book).
14135
14136Pylint has many rules enabled by default, way too much to silence them
14137all on a minimally sized program. It's highly configurable and handle
14138pragmas to control it from within your code. Additionally, it is
14139possible to write plugins to add your own checks.")
14140 (license license:gpl2+)))
14141
14142(define-public python2-pylint
14143 (let ((pylint (package-with-python2 python-pylint)))
14144 (package (inherit pylint)
14145 (propagated-inputs
14146 `(("python2-backports-functools-lru-cache"
14147 ,python2-backports-functools-lru-cache)
14148 ("python2-configparser" ,python2-configparser)
14149 ,@(package-propagated-inputs pylint))))))
5d0c3ba8
MFM
14150
14151(define-public python-paramunittest
14152 (package
14153 (name "python-paramunittest")
14154 (version "0.2")
14155 (source
14156 (origin
14157 (method url-fetch)
14158 (uri (pypi-uri "ParamUnittest" version))
14159 (sha256
14160 (base32
14161 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14162 (build-system python-build-system)
14163 (home-page
14164 "https://github.com/rik0/ParamUnittest")
14165 (synopsis
14166 "Simple extension to have parametrized unit tests")
14167 (description
14168 "This package allows to create parametrized unit-tests that work with the standard
14169unittest package. A parametrized test case is automatically converted to multiple test
14170cases. Since they are TestCase subclasses, they work with other test suites that
14171recognize TestCases.")
14172 (license license:bsd-2)))
14173
14174(define-public python2-python-paramunittest
14175 (package-with-python2 python-paramunittest))
eec21d4b
MFM
14176
14177(define-public python-mando
14178 (package
14179 (name "python-mando")
14180 (version "0.5")
14181 (source
14182 (origin
14183 (method url-fetch)
14184 (uri (pypi-uri "mando" version))
14185 (sha256
14186 (base32
14187 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14188 (build-system python-build-system)
14189 (propagated-inputs
14190 `(("python-rst2ansi" ,python-rst2ansi)))
14191 (native-inputs
14192 `(("python-sphinx" ,python-sphinx-1.5.3)
14193 ("python-paramunittest" ,python-paramunittest)))
14194 (home-page "https://mando.readthedocs.org/")
14195 (synopsis
14196 "Wrapper around argparse, allowing creation of complete CLI applications")
14197 (description
14198 "This package is a wrapper around argparse, allowing you to write complete CLI
14199 applications in seconds while maintaining all the flexibility.")
14200 (license license:expat)))
14201
14202(define-public python2-mando
14203 (package-with-python2 python-mando))
b98d4ec0
MFM
14204
14205(define-public python-mando-0.3.1
14206 ;; python-radon (version 1.5.0) has a requirement
14207 ;; for mando<0.4,>=0.3
14208 (package
14209 (inherit python-mando)
14210 (name "python-mando")
14211 (version "0.3.1")
14212 (source
14213 (origin
14214 (method url-fetch)
14215 (uri (string-append "https://github.com/rubik/mando/archive/v"
14216 version
14217 ".tar.gz"))
14218 (sha256
14219 (base32
14220 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
16fe516e
BS
14221
14222(define-public python-fudge
14223 (package
14224 (name "python-fudge")
14225 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14226 ;; package, which is currently the only use of this package.
14227 (version "0.9.6")
14228 (source
14229 (origin
14230 (method url-fetch)
14231 (uri (pypi-uri "fudge" version))
14232 (sha256
14233 (base32
14234 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14235 (build-system python-build-system)
14236 (arguments
14237 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14238 (home-page "https://github.com/fudge-py/fudge")
14239 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14240 (description
14241 "Fudge is a Python module for using fake objects (mocks and stubs) to
14242test real ones.
14243
14244In readable Python code, you declare the methods available on your fake object
14245and how they should be called. Then you inject that into your application and
14246start testing. This declarative approach means you don’t have to record and
14247playback actions and you don’t have to inspect your fakes after running code.
14248If the fake object was used incorrectly then you’ll see an informative
14249exception message with a traceback that points to the culprit.")
14250 (license license:expat)))
14251
14252(define-public python2-fudge
14253 (package-with-python2 python-fudge))
f3f8d159
DM
14254
14255(define-public python-oauth2client
14256 (package
14257 (name "python-oauth2client")
14258 (version "4.0.0")
14259 (source
14260 (origin
14261 (method url-fetch)
14262 (uri (pypi-uri "oauth2client" version))
14263 (sha256
14264 (base32
14265 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14266 (build-system python-build-system)
14267 (arguments
14268 `(#:tests? #f))
14269 (propagated-inputs
14270 `(("python-httplib2" ,python-httplib2)
14271 ("python-pyasn1" ,python-pyasn1)
14272 ("python-pyasn1-modules" ,python-pyasn1-modules)
14273 ("python-rsa" ,python-rsa)
14274 ("python-six" ,python-six)))
14275 (home-page "http://github.com/google/oauth2client/")
14276 (synopsis "OAuth 2.0 client library")
14277 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14278library for Python")
14279 (license license:asl2.0)))
6e7302e9
DM
14280
14281(define-public python-flask-oidc
14282 (package
14283 (name "python-flask-oidc")
14284 (version "1.1.1")
14285 (source
14286 (origin
14287 (method url-fetch)
14288 (uri (pypi-uri "flask-oidc" version))
14289 (sha256
14290 (base32
14291 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14292 (build-system python-build-system)
14293 (propagated-inputs
14294 `(("python-flask" ,python-flask)
14295 ("python-itsdangerous" ,python-itsdangerous)
14296 ("python-oauth2client" ,python-oauth2client)
14297 ("python-six" ,python-six)))
14298 (native-inputs
14299 `(("python-nose" ,python-nose)
14300 ("python-mock" ,python-mock)))
14301 (home-page "https://github.com/puiterwijk/flask-oidc")
14302 (synopsis "OpenID Connect extension for Flask")
14303 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14304for Flask.")
14305 (license license:bsd-2)))
7e16478f
DM
14306
14307(define-public python-mwclient
14308 (package
14309 (name "python-mwclient")
14310 (version "0.8.4")
14311 (source
14312 (origin
14313 (method url-fetch)
14314 ;; The PyPI version wouldn't contain tests.
14315 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14316 "v" version ".tar.gz"))
14317 (sha256
14318 (base32
14319 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14320 (build-system python-build-system)
14321 (propagated-inputs
14322 `(("python-requests" ,python-requests)
14323 ("python-requests-oauthlib"
14324 ,python-requests-oauthlib)
14325 ("python-six" ,python-six)))
14326 (native-inputs
14327 `(("python-mock" ,python-mock)
14328 ("python-pytest" ,python-pytest)
14329 ("python-pytest-pep8" ,python-pytest-pep8)
14330 ("python-pytest-cache" ,python-pytest-cache)
14331 ("python-pytest-cov" ,python-pytest-cov)
14332 ("python-responses" ,python-responses)))
14333 (home-page "https://github.com/btongminh/mwclient")
14334 (synopsis "MediaWiki API client")
14335 (description "This package provides a MediaWiki API client.")
14336 (license license:expat)))
14337
14338(define-public python2-mwclient
14339 (package-with-python2 python-mwclient))
59a97288
JL
14340
14341(define-public python-pytest-warnings
14342 (package
14343 (name "python-pytest-warnings")
14344 (version "0.2.0")
14345 (source
14346 (origin
14347 (method url-fetch)
14348 (uri (pypi-uri "pytest-warnings" version))
14349 (sha256
14350 (base32
14351 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14352 (build-system python-build-system)
14353 (propagated-inputs
14354 `(("pytest" ,python-pytest-3.0)))
14355 (home-page "https://github.com/fschulze/pytest-warnings")
14356 (synopsis "Pytest plugin to list Python warnings in pytest report")
14357 (description
14358 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14359pytest report.")
14360 (license license:expat)))
14361
14362(define-public python2-pytest-warnings
14363 (package-with-python2 python-pytest-warnings))
2d6e56ba
JL
14364
14365(define-public python-pytest-catchlog
14366 (package
14367 (name "python-pytest-catchlog")
14368 (version "1.2.2")
14369 (source
14370 (origin
14371 (method url-fetch)
14372 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14373 (sha256
14374 (base32
14375 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14376 (build-system python-build-system)
14377 (native-inputs
14378 `(("unzip" ,unzip)))
14379 (propagated-inputs
14380 `(("pytest" ,python-pytest-3.0)))
14381 (home-page "https://github.com/eisensheng/pytest-catchlog")
14382 (synopsis "Pytest plugin to catch log messages")
14383 (description
14384 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14385a fork of pytest-capturelog.")
14386 (license license:expat)))
14387
14388(define-public python2-pytest-catchlog
14389 (package-with-python2 python-pytest-catchlog))
75805449
JL
14390
14391(define-public python-utils
14392 (package
14393 (name "python-utils")
14394 (version "2.1.0")
14395 (source (origin
14396 (method url-fetch)
14397 (uri (pypi-uri "python-utils" version))
14398 (sha256
14399 (base32
14400 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14401 (build-system python-build-system)
14402 (native-inputs
14403 `(("pytest-runner" ,python-pytest-runner)
14404 ("pytest" ,python-pytest)
14405 ("six" ,python-six)))
14406 (home-page "https://github.com/WoLpH/python-utils")
14407 (synopsis "Convenient utilities not included with the standard Python install")
14408 (description
14409 "Python Utils is a collection of small Python functions and classes which
14410make common patterns shorter and easier.")
14411 (license license:bsd-2)))
14412
14413(define-public python2-utils
14414 (package-with-python2 python-utils))
709a5a93
JL
14415
14416(define-public python-webassets
14417 (package
14418 (name "python-webassets")
14419 (version "0.12.1")
14420 (source
14421 (origin
14422 (method url-fetch)
14423 (uri (pypi-uri "webassets" version))
14424 (sha256
14425 (base32
14426 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14427 (build-system python-build-system)
14428 (native-inputs
14429 `(("python-jinja2" ,python-jinja2)
14430 ("python-mock" ,python-mock)
14431 ("python-nose" ,python-nose)
14432 ("python-pytest" ,python-pytest)))
14433 (home-page "https://github.com/miracle2k/webassets")
14434 (synopsis "Media asset management")
14435 (description "Merges, minifies and compresses Javascript and CSS files,
14436supporting a variety of different filters, including YUI, jsmin, jspacker or
14437CSS tidy. Also supports URL rewriting in CSS files.")
14438 (license license:bsd-2)))
4c066b72
JL
14439
14440(define-public python-sphinx-me
14441 (package
14442 (name "python-sphinx-me")
14443 (version "0.3")
14444 (source
14445 (origin
14446 (method url-fetch)
14447 (uri (pypi-uri "sphinx-me" version))
14448 (sha256
14449 (base32
14450 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14451 (build-system python-build-system)
14452 (home-page "https://github.com/stephenmcd/sphinx-me")
14453 (synopsis "Create a Sphinx documentation shell")
14454 (description
14455 "Create a Sphinx documentation shell for your project and include the
14456README file as the documentation index. It handles extracting the required
14457meta data such as the project name, author and version from your project for
14458use in your Sphinx docs.")
14459 (license license:bsd-2)))
14460
14461(define-public python2-sphinx-me
14462 (package-with-python2 python-sphinx-me))
03ded2fd
JL
14463
14464(define-public python-cssmin
14465 (package
14466 (name "python-cssmin")
14467 (version "0.2.0")
14468 (source
14469 (origin
14470 (method url-fetch)
14471 (uri (pypi-uri "cssmin" version))
14472 (sha256
14473 (base32
14474 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14475 (build-system python-build-system)
14476 (home-page "https://github.com/zacharyvoase/cssmin")
14477 (synopsis "Python port of the YUI CSS Compressor")
14478 (description "Python port of the YUI CSS Compressor.")
14479 (license (list license:expat license:bsd-3))))
14480
14481(define-public python2-cssmin
14482 (package-with-python2 python-cssmin))
186d4f8d
JL
14483
14484(define-public python-diff-match-patch
14485 (package
14486 (name "python-diff-match-patch")
14487 (version "20121119")
14488 (source
14489 (origin
14490 (method url-fetch)
14491 (uri (pypi-uri "diff-match-patch" version))
14492 (sha256
14493 (base32
14494 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14495 (build-system python-build-system)
14496 (home-page "https://code.google.com/p/google-diff-match-patch")
14497 (synopsis "Synchronize plain text")
14498 (description "Diff Match and Patch libraries offer robust algorithms to
14499perform the operations required for synchronizing plain text.")
14500 (license license:asl2.0)))
14501
14502(define-public python2-diff-match-patch
14503 (package-with-python2 python-diff-match-patch))
d15a4791
JL
14504
14505(define-public python-dirsync
14506 (package
14507 (name "python-dirsync")
14508 (version "2.2.2")
14509 (source
14510 (origin
14511 (method url-fetch)
14512 (uri (pypi-uri "dirsync" version ".zip"))
14513 (sha256
14514 (base32
14515 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14516 (build-system python-build-system)
14517 (native-inputs
14518 `(("unzip" ,unzip)))
14519 (propagated-inputs
14520 `(("six" ,python-six)))
14521 (home-page "https://bitbucket.org/tkhyn/dirsync")
14522 (synopsis "Advanced directory tree synchronisation tool")
14523 (description "Advanced directory tree synchronisation tool.")
14524 (license license:expat)))
14525
14526(define-public python2-dirsync
14527 (package-with-python2 python-dirsync))
1b16f1ec
JL
14528
14529(define-public python-nosexcover
14530 (package
14531 (name "python-nosexcover")
14532 (version "1.0.11")
14533 (source (origin
14534 (method url-fetch)
14535 (uri (pypi-uri "nosexcover" version))
14536 (sha256
14537 (base32
14538 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
14539 (build-system python-build-system)
14540 (propagated-inputs
14541 `(("python-coverage" ,python-coverage)
14542 ("python-nose" ,python-nose)))
14543 (home-page "http://github.com/cmheisel/nose-xcover")
14544 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
14545 (description "Nose-xcover is a companion to the built-in
14546@code{nose.plugins.cover}. This plugin will write out an XML coverage report
14547to a file named coverage.xml.
14548
14549It will honor all the options you pass to the Nose coverage plugin,
14550especially -cover-package.")
14551 (license license:expat)))
14552
14553(define-public python2-nosexcover
14554 (package-with-python2 python-nosexcover))
afdfbb1d
JL
14555
14556(define-public python-elasticsearch
14557 (package
14558 (name "python-elasticsearch")
14559 (version "1.0.0")
14560 (source
14561 (origin
14562 (method url-fetch)
14563 (uri (pypi-uri "elasticsearch" version))
14564 (sha256
14565 (base32
14566 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
14567 (build-system python-build-system)
14568 (native-inputs
14569 `(("python-mock" ,python-mock)
14570 ("python-nosexcover" ,python-nosexcover)
14571 ("python-pyaml" ,python-pyaml)
14572 ("python-requests" ,python-requests)))
14573 (propagated-inputs
14574 `(("urllib3" ,python-urllib3)))
14575 (arguments
14576 ;; tests require the test_elasticsearch module but it is not distributed.
14577 `(#:tests? #f))
14578 (home-page "https://github.com/elastic/elasticsearch-py")
14579 (synopsis "Low-level client for Elasticsearch")
14580 (description "Official low-level client for Elasticsearch. Its goal is to
14581provide common ground for all Elasticsearch-related code in Python; because of
14582this it tries to be opinion-free and very extendable.")
14583 (license license:expat)))
14584
14585(define-public python2-elasticsearch
14586 (package-with-python2 python-elasticsearch))
a17ccbbb
JL
14587
14588(define-public python-levenshtein
14589 (package
14590 (name "python-levenshtein")
14591 (version "0.12.0")
14592 (source
14593 (origin
14594 (method url-fetch)
14595 (uri (pypi-uri "python-Levenshtein" version))
14596 (sha256
14597 (base32
14598 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14599 (build-system python-build-system)
14600 (home-page "https://github.com/ztane/python-Levenshtein")
14601 (synopsis "Fast computation of Levenshtein distance and string similarity")
14602 (description
14603 "The Levenshtein Python C extension module contains functions for fast computation of
14604@enumerate
14605@item Levenshtein (edit) distance, and edit operations
14606@item string similarity
14607@item approximate median strings, and generally string averaging
14608@item string sequence and set similarity
14609@end enumerate
14610It supports both normal and Unicode strings.")
14611 (license license:gpl2+)))
14612
14613(define-public python2-levenshtein
14614 (package-with-python2 python-levenshtein))
38a370d2
JL
14615
14616(define-public python-scandir
14617 (package
14618 (name "python-scandir")
14619 (version "1.4")
14620 (source
14621 (origin
14622 (method url-fetch)
14623 (uri (pypi-uri "scandir" version))
14624 (sha256
14625 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
14626 (build-system python-build-system)
14627 (home-page "https://github.com/benhoyt/scandir")
14628 (synopsis "Directory iteration function")
14629 (description
14630 "Directory iteration function like os.listdir(), except that instead of
14631returning a list of bare filenames, it yields DirEntry objects that include
14632file type and stat information along with the name. Using scandir() increases
14633the speed of os.walk() by 2-20 times (depending on the platform and file
14634system) by avoiding unnecessary calls to os.stat() in most cases.")
14635 (license license:bsd-3)))
14636
14637(define-public python2-scandir
14638 (package-with-python2 python-scandir))
18c25460
JL
14639
14640(define-public python2-stemming
14641 (package
14642 (name "python2-stemming")
14643 (version "1.0.1")
14644 (source
14645 (origin
14646 (method url-fetch)
14647 (uri (pypi-uri "stemming" version))
14648 (sha256
14649 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14650 (build-system python-build-system)
14651 (arguments
14652 `(#:python ,python-2))
14653 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14654 (synopsis "Python implementations of various stemming algorithms")
14655 (description
14656 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14657stemming algorithms for English. These implementations are straightforward and
14658efficient, unlike some Python versions of the same algorithms available on the
14659Web. This package is an extraction of the stemming code included in the Whoosh
14660search engine.")
14661 (license license:public-domain)))
54153b85
JL
14662
14663(define-public python-factory-boy
14664 (package
14665 (name "python-factory-boy")
14666 (version "2.8.1")
14667 (source
14668 (origin
14669 (method url-fetch)
14670 (uri (pypi-uri "factory_boy" version))
14671 (sha256
14672 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14673 (build-system python-build-system)
14674 (arguments
14675 ;; Tests are not included in the tarball.
14676 `(#:tests? #f))
14677 (propagated-inputs
14678 `(("faker" ,python-faker)))
14679 (home-page "https://github.com/benhoyt/scandir")
14680 (synopsis "Versatile test fixtures replacement")
14681 (description
14682 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14683
14684As a fixtures replacement tool, it aims to replace static, hard to maintain
14685fixtures with easy-to-use factories for complex object.
14686
14687Instead of building an exhaustive test setup with every possible combination
14688of corner cases, factory_boy allows you to use objects customized for the
14689current test, while only declaring the test-specific fields")
14690 (license license:expat)))
14691
14692(define-public python2-factory-boy
14693 (package-with-python2 python-factory-boy))
5f25fd69
JL
14694
14695(define-public python-translate-toolkit
14696 (package
14697 (name "python-translate-toolkit")
14698 (version "2.1.0")
14699 (source
14700 (origin
14701 (method url-fetch)
14702 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14703 (sha256
14704 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14705 (build-system python-build-system)
14706 (native-inputs
14707 `(("python-pytest" ,python-pytest)
14708 ("python-sphinx" ,python-sphinx)))
14709 (propagated-inputs
14710 `(("python-babel" ,python-babel)
14711 ("python-beautifulsoup4" ,python-beautifulsoup4)
14712 ("python-chardet" ,python-chardet)
14713 ("python-diff-match-patch" ,python-diff-match-patch)
14714 ("python-levenshtein" ,python-levenshtein)
14715 ("python-lxml" ,python-lxml)
14716 ("python-six" ,python-six)
14717 ("python-vobject" ,python-vobject)
14718 ("python-pyyaml" ,python-pyyaml)))
14719 (arguments
14720 ;; TODO: tests are not run, because they end with
14721 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14722 ;; 'parse_funcs'
14723 ;; during test setup.
14724 `(#:tests? #f))
14725 (home-page "http://toolkit.translatehouse.org")
14726 (synopsis "Tools and API for translation and localization engineering")
14727 (description
14728 "Tools and API for translation and localization engineering. It contains
14729several utilities, as well as an API for building localization tools.")
14730 (license license:gpl2+)))
14731
14732(define-public python2-translate-toolkit
14733 (package-with-python2 python-translate-toolkit))
3b08d1a6
JL
14734
14735(define-public python-mysqlclient
14736 (package
14737 (name "python-mysqlclient")
14738 (version "1.3.10")
14739 (source
14740 (origin
14741 (method url-fetch)
14742 (uri (pypi-uri "mysqlclient" version))
14743 (sha256
14744 (base32
14745 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
14746 (build-system python-build-system)
14747 (native-inputs
14748 `(("mariadb" ,mariadb)
14749 ("nose" ,python-nose)
14750 ("mock" ,python-mock)
14751 ("py.test" ,python-pytest)))
14752 (inputs
14753 `(("mysql" ,mysql)
14754 ("libz" ,zlib)
14755 ("openssl" ,openssl)))
14756 (home-page "https://github.com/PyMySQL/mysqlclient-python")
14757 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
14758 (description "MySQLdb is an interface to the popular MySQL database server
14759for Python. The design goals are:
14760@enumerate
14761@item Compliance with Python database API version 2.0 [PEP-0249],
14762@item Thread-safety,
14763@item Thread-friendliness (threads will not block each other).
14764@end enumerate")
14765 (license license:gpl2)))
14766
14767(define-public python2-mysqlclient
14768 (package-with-python2 python-mysqlclient))
c009e934
JL
14769
14770(define-public python-hiredis
14771 (package
14772 (name "python-hiredis")
14773 (version "0.2.0")
14774 (source
14775 (origin
14776 (method url-fetch)
14777 (uri (pypi-uri "hiredis" version))
14778 (sha256
14779 (base32
14780 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
14781 (build-system python-build-system)
14782 (arguments
14783 ;; no tests
14784 `(#:tests? #f))
14785 (home-page "https://github.com/redis/hiredis-py")
14786 (synopsis "Python extension that wraps protocol parsing code in hiredis")
14787 (description "Python-hiredis is a python extension that wraps protocol
14788parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
14789 (license license:bsd-3)))
14790
14791(define-public python2-hiredis
14792 (package-with-python2 python-hiredis))
91154d4a
JL
14793
14794(define-public python-fakeredis
14795 (package
14796 (name "python-fakeredis")
14797 (version "0.8.2")
14798 (source
14799 (origin
14800 (method url-fetch)
14801 (uri (pypi-uri "fakeredis" version))
14802 (sha256
14803 (base32
14804 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
14805 (build-system python-build-system)
14806 (arguments
14807 ;; no tests
14808 `(#:tests? #f))
14809 (home-page "https://github.com/jamesls/fakeredis")
14810 (synopsis "Fake implementation of redis API for testing purposes")
14811 (description "Fakeredis is a pure python implementation of the redis-py
14812python client that simulates talking to a redis server. This was created for a
14813single purpose: to write unittests. Setting up redis is not hard, but many time
14814 you want to write unittests that do not talk to an external server (such as
14815redis). This module now allows tests to simply use this module as a reasonable
14816substitute for redis.")
14817 (license license:bsd-3)))
14818
14819(define-public python2-fakeredis
14820 (package-with-python2 python-fakeredis))
d1693269
DM
14821
14822(define-public python-behave-web-api
14823 (package
14824 (name "python-behave-web-api")
14825 (version "1.0.6")
14826 (source
14827 (origin
14828 (method url-fetch)
14829 (uri (pypi-uri "behave-web-api" version))
14830 (sha256
14831 (base32
14832 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
14833 (build-system python-build-system)
14834 (arguments
14835 `(#:phases
14836 (modify-phases %standard-phases
14837 (add-after 'unpack 'fix-dependencies
14838 (lambda _
14839 (substitute* "setup.py"
14840 (("'wheel'") "") ; We don't use it.
14841 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
14842 (propagated-inputs
14843 `(("behave" ,behave)
14844 ("python-requests" ,python-requests)))
14845 (home-page "https://github.com/jefersondaniel/behave-web-api")
14846 (synopsis "Provides testing for JSON APIs with Behave for Python")
14847 (description "This package provides testing utility modules for testing
14848JSON APIs with Behave.")
14849 (license license:expat)))
14850
14851(define-public python2-behave-web-api
14852 (package-with-python2 python-behave-web-api))
75baf319
DM
14853
14854(define-public python-flask-script
14855 (package
14856 (name "python-flask-script")
14857 (version "2.0.5")
14858 (source
14859 (origin
14860 (method url-fetch)
14861 (uri (pypi-uri "Flask-Script" version))
14862 (sha256
14863 (base32
14864 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
14865 (build-system python-build-system)
14866 (propagated-inputs
14867 `(("python-flask" ,python-flask)
14868 ("python-argcomplete" ,python-argcomplete)
14869 ("python-werkzeug" ,python-werkzeug)))
14870 (native-inputs
14871 `(("python-pytest" ,python-pytest)))
14872 (home-page
14873 "http://github.com/smurfix/flask-script")
14874 (synopsis "Scripting support for Flask")
14875 (description "The Flask-Script extension provides support for writing
14876external scripts in Flask. This includes running a development server,
14877a customised Python shell, scripts to set up your database, cronjobs,
14878and other command-line tasks that belong outside the web application
14879itself.")
14880 (license license:bsd-3)))
14881
14882(define-public python2-flask-script
14883 (package-with-python2 python-flask-script))
013e1e85
DM
14884
14885(define-public python-flask-migrate
14886 (package
14887 (name "python-flask-migrate")
14888 (version "2.0.3")
14889 (source
14890 (origin
14891 (method url-fetch)
14892 (uri (pypi-uri "Flask-Migrate" version))
14893 (sha256
14894 (base32
14895 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
14896 (build-system python-build-system)
14897 (propagated-inputs
14898 `(("python-flask" ,python-flask)
14899 ("python-alembic" ,python-alembic)
14900 ("python-sqlalchemy" ,python-sqlalchemy)
14901 ("python-flask-script" ,python-flask-script)
14902 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
14903 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
14904 (synopsis "SQLAlchemy database migrations for Flask programs using
14905Alembic")
14906 (description "This package contains SQLAlchemy database migration tools
14907for Flask programs that are using @code{python-alembic}.")
14908 (license license:expat)))
14909
14910(define-public python2-flask-migrate
14911 (package-with-python2 python-flask-migrate))
c0f5b802
LF
14912
14913(define-public python-packaging
14914 (package
14915 (name "python-packaging")
14916 (version "16.8")
14917 (source
14918 (origin
14919 (method url-fetch)
14920 (uri (pypi-uri "packaging" version))
14921 (sha256
14922 (base32
14923 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
14924 (build-system python-build-system)
14925 (native-inputs
14926 `(("python-pretend" ,python-pretend)
14927 ("python-pytest" ,python-pytest)))
14928 (propagated-inputs
14929 `(("python-pyparsing" ,python-pyparsing)
14930 ("python-six" ,python-six)))
14931 (home-page "https://github.com/pypa/packaging")
14932 (synopsis "Core utilities for Python packages")
14933 (description "Packaging is a Python module for dealing with Python packages.
14934It offers an interface for working with package versions, names, and dependency
14935information.")
14936 ;; From 'LICENSE': This software is made available under the terms of
14937 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
14938 ;; Contributions to this software is made under the terms of *both* these
14939 ;; licenses.
14940 (license (list license:asl2.0 license:bsd-2))))
14941
14942(define-public python2-packaging
14943 (package-with-python2 python-packaging))
ad2ef260
AP
14944
14945(define-public python-sql
14946 (package
14947 (name "python-sql")
14948 (version "0.9")
14949 (source
14950 (origin
14951 (method url-fetch)
14952 (uri (pypi-uri "python-sql" version))
14953 (sha256
14954 (base32
14955 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
14956 (build-system python-build-system)
14957 (home-page "https://python-sql.tryton.org/")
14958 (synopsis "Library to write SQL queries in a pythonic way")
14959 (description "@code{python-sql} is a library to write SQL queries, that
14960transforms idiomatic python function calls to well-formed SQL queries.")
14961 (license license:bsd-3)))
14962
14963(define-public python2-sql
14964 (package-with-python2 python-sql))
b208f71b
AP
14965
14966(define-public python-genshi
14967 (package
14968 (name "python-genshi")
14969 (version "0.7")
14970 (source
14971 (origin
14972 (method url-fetch)
14973 (uri (string-append
14974 "https://ftp.edgewall.org/pub/genshi/Genshi-"
14975 version ".tar.gz"))
14976 (patches
14977 (search-patches
14978 ;; The first 4 patches are in the master branch upstream.
14979 ;; See this as a reference https://genshi.edgewall.org/ticket/582
14980 ;; The last 2 are NOT in any branch.
14981 ;; They were sent as attachments to a ticket opened at
14982 ;; https://genshi.edgewall.org/ticket/602#no1
14983 "python-genshi-stripping-of-unsafe-script-tags.patch"
14984 "python-genshi-disable-speedups-on-python-3.3.patch"
14985 "python-genshi-isstring-helper.patch"
14986 "python-genshi-add-support-for-python-3.4-AST.patch"
14987 "python-genshi-fix-tests-on-python-3.5.patch"
14988 "python-genshi-buildable-on-python-2.7.patch"))
14989 (sha256
14990 (base32
14991 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
14992 (build-system python-build-system)
14993 (home-page "https://genshi.edgewall.org/")
14994 (synopsis "Toolkit for generation of output for the web")
14995 (description "Genshi is a Python library that provides an integrated set
14996of components for parsing, generating, and processing HTML, XML or other
14997textual content for output generation on the web.")
14998 (license license:bsd-3)))
14999
15000;; The linter here claims that patch file names should start with the package
15001;; name. But, in this case the patches are inherited from python-genshi with
15002;; the "python-genshi-" prefix instead of "python2-genshi-".
15003(define-public python2-genshi
15004 (package-with-python2 python-genshi))
ecca63b6
AP
15005
15006(define-public python-relatorio
15007 (package
15008 (name "python-relatorio")
15009 (version "0.6.4")
15010 (source
15011 (origin
15012 (method url-fetch)
15013 (uri (pypi-uri "relatorio" version))
15014 (sha256
15015 (base32
15016 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
15017 (build-system python-build-system)
15018 (propagated-inputs
15019 `(("python-lxml" ,python-lxml)
15020 ("python-genshi" ,python-genshi)))
15021 (home-page "https://relatorio.tryton.org/")
15022 (synopsis "Templating library able to output ODT and PDF files")
15023 (description "Relatorio is a templating library which provides a way to
15024easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15025for more filetypes can be easily added by creating plugins for them.")
15026 (license license:gpl3+)))
15027
15028(define-public python2-relatorio
15029 (package-with-python2 python-relatorio))
65e7d52a
MFM
15030
15031(define-public python-radon
15032 (package
15033 (name "python-radon")
15034 (version "1.5.0")
15035 (source
15036 (origin
15037 (method url-fetch)
15038 (uri (pypi-uri "radon" version))
15039 (sha256
15040 (base32
15041 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
15042 (build-system python-build-system)
15043 (propagated-inputs
15044 `(("python-colorama" ,python-colorama)
15045 ("python-flake8-polyfill" ,python-flake8-polyfill)
15046 ("python-mando" ,python-mando-0.3.1)))
15047 (native-inputs
15048 `(("python-flake8" ,python-flake8)
15049 ("python-tox" ,python-tox)
15050 ("python-pytest" ,python-pytest)
15051 ("python-paramunittest" ,python-paramunittest)))
15052 (home-page "https://radon.readthedocs.org/")
15053 (synopsis "Code Metrics in Python")
15054 (description "Radon is a Python tool which computes various code metrics.
15055Supported metrics are:
15056@itemize @bullet
15057@item raw metrics: SLOC, comment lines, blank lines, &c.
15058@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15059@item Halstead metrics (all of them)
15060@item the Maintainability Index (a Visual Studio metric)
15061@end itemize")
15062 (license license:expat)))
15063
15064(define-public python2-radon
15065 (package-with-python2 python-radon))
50d586f6
MFM
15066
15067(define-public python-sure
15068 (package
15069 (name "python-sure")
15070 (version "1.4.6")
15071 (source
15072 (origin
15073 (method url-fetch)
15074 (uri (pypi-uri "sure" version))
15075 (sha256
15076 (base32
15077 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
15078 (build-system python-build-system)
15079 (propagated-inputs
15080 `(("python-mock" ,python-mock)
15081 ("python-six" ,python-six)))
15082 (native-inputs
15083 `(("python-nose" ,python-nose)))
15084 (home-page "https://github.com/gabrielfalcao/sure")
15085 (synopsis "Automated testing library in python for python")
15086 (description
15087 "Sure is a python library that leverages a DSL for writing assertions.
15088Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15089 (license license:gpl3+)))
15090
15091(define-public python2-sure
15092 (package-with-python2 python-sure))
a0ffc701
MFM
15093
15094(define-public python2-couleur
15095 ;; This package does not seem to support python3 at all, hence,
15096 ;; only the python2 variant definition is provided.
15097 (package
15098 (name "python2-couleur")
15099 (version "0.6.2")
15100 (source
15101 (origin
15102 (method url-fetch)
15103 (uri (pypi-uri "couleur" version))
15104 (sha256
15105 (base32
15106 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15107 (build-system python-build-system)
15108 (arguments
15109 `(#:python ,python-2))
15110 (home-page "https://github.com/gabrielfalcao/couleur")
15111 (synopsis
15112 "ANSI terminal tool for python, colored shell and other handy fancy features")
15113 (description
15114 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15115terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15116 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15117 ;; https://github.com/gabrielfalcao/couleur/issues/11
15118 (license license:lgpl3+)))
511b47de
MFM
15119
15120(define-public python-misaka
15121 (package
15122 (name "python-misaka")
15123 (version "2.1.0")
15124 (source
15125 (origin
15126 (method url-fetch)
15127 (uri (pypi-uri "misaka" version))
15128 (sha256
15129 (base32
15130 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
15131 (build-system python-build-system)
15132 (arguments
15133 `(;; Line 37 of setup.py calls self.run_command('develop')
15134 ;; in the 'check' phase. This command seems to be trying
15135 ;; to write to
15136 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15137 ;; for which it does not have the permission to write.
15138 #:tests? #f))
15139 (propagated-inputs
15140 `(("python-cffi" ,python-cffi)))
15141 (home-page "https://github.com/FSX/misaka")
15142 (synopsis "Python binding for Hoedown")
15143 (description
15144 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15145library written in C. It features a fast HTML renderer and functionality to make custom
15146renderers (e.g. man pages or LaTeX).")
15147 (license license:expat)))
15148
15149(define-public python2-misaka
15150 (package-with-python2 python-misaka))
5786b47c
MFM
15151
15152(define-public python2-steadymark
15153 ;; This is forced into being a python2 only variant
15154 ;; due to its dependence on couleur that has no support
15155 ;; for python3
15156 (package
15157 (name "python2-steadymark")
15158 (version "0.7.3")
15159 (source
15160 (origin
15161 (method url-fetch)
15162 (uri (pypi-uri "steadymark" version))
15163 (sha256
15164 (base32
15165 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15166 (build-system python-build-system)
15167 (native-inputs
15168 `(("python-couleur" ,python2-couleur)
15169 ("python-sure" ,python2-sure)
15170 ("python-misaka" ,python2-misaka)))
15171 (arguments
15172 `(#:python ,python-2
15173 #:phases
15174 (modify-phases %standard-phases
15175 (add-before 'build 'patch-setup-py
15176 (lambda _
15177 ;; Update requirements from dependency==version
15178 ;; to dependency>=version
15179 (substitute* "setup.py"
15180 (("==") ">="))
15181 #t)))))
15182 (home-page "https://github.com/gabrielfalcao/steadymark")
15183 (synopsis "Markdown-based test runner for python")
15184 (description
15185 "@code{Steadymark} allows documentation to be written in github-flavoured
15186markdown. The documentation may contain snippets of code surrounded by python
15187code blocks and @code{Steadymark} will find these snippets and run them, making
15188sure that there are no old malfunctional examples in the documentation examples.")
15189 (license license:expat)))
7e488f99
MFM
15190
15191(define-public python-nose-randomly
15192 (package
15193 (name "python-nose-randomly")
15194 (version "1.2.5")
15195 (source
15196 (origin
15197 (method url-fetch)
15198 (uri (pypi-uri "nose-randomly" version))
15199 (sha256
15200 (base32
15201 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15202 (build-system python-build-system)
15203 (native-inputs
15204 `(("python-nose" ,python-nose)
15205 ("python-numpy" ,python-numpy)))
15206 (home-page "https://github.com/adamchainz/nose-randomly")
15207 (synopsis
15208 "Nose plugin to randomly order tests and control random.seed")
15209 (description
15210 "This is a @code{Nose} plugin to randomly order tests which can be quite
15211powerful in discovering hidden flaws in the tests themselves, while helping to
15212reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15213by resetting it to a repeatable number for each test, enabling the tests to
15214create data based on random numbers and yet remain repeatable.")
15215 (license license:bsd-3)))
15216
15217(define-public python2-nose-randomly
15218 (package-with-python2 python-nose-randomly))
1e92287d
DM
15219
15220(define-public python-jsonpointer
15221 (package
15222 (name "python-jsonpointer")
15223 (version "1.10")
15224 (source
15225 (origin
15226 (method url-fetch)
15227 (uri (pypi-uri "jsonpointer" version))
15228 (sha256
15229 (base32
15230 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15231 (build-system python-build-system)
15232 (home-page "https://github.com/stefankoegl/python-json-pointer")
15233 (synopsis "Identify specific nodes in a JSON document")
15234 (description "@code{jsonpointer} allows you to access specific nodes
15235by path in a JSON document (see RFC 6901).")
15236 (license license:bsd-3)))
15237
15238(define-public python2-jsonpointer
15239 (package-with-python2 python-jsonpointer))
7d88093f 15240
841e5908
OP
15241(define-public python-jsonpatch
15242 (package
15243 (name "python-jsonpatch")
15244 (version "1.16")
15245 (source
15246 (origin
15247 (method url-fetch)
15248 ;; pypi version lacks tests.js
15249 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15250 "archive/v" version ".tar.gz"))
15251 (file-name (string-append name "-" version ".tar.gz"))
15252 (sha256
15253 (base32
15254 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
15255 (build-system python-build-system)
15256 (native-inputs
15257 `(("python-jsonpointer" ,python-jsonpointer)))
15258 (home-page "https://github.com/stefankoegl/python-json-patch")
15259 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
15260 (description "@code{jsonpatch} is a library and program that allows
15261applying JSON Patches according to RFC 6902.")
15262 (license license:bsd-3)))
15263
15264(define-public python2-jsonpatch
15265 (package-with-python2 python-jsonpatch))
15266
15267(define-public python-jsonpatch-0.4
15268 (package (inherit python-jsonpatch)
15269 (name "python-jsonpatch")
15270 (version "0.4")
15271 (source
15272 (origin
15273 (method url-fetch)
15274 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15275 "archive/v" version ".tar.gz"))
15276 (file-name (string-append name "-" version ".tar.gz"))
15277 (sha256
15278 (base32
15279 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
15280
15281(define-public python2-jsonpatch-0.4
15282 (package-with-python2 python-jsonpatch-0.4))
15283
7d88093f
DM
15284(define-public python-rfc3987
15285 (package
15286 (name "python-rfc3987")
15287 (version "1.3.7")
15288 (source
15289 (origin
15290 (method url-fetch)
15291 (uri (pypi-uri "rfc3987" version))
15292 (sha256
15293 (base32
15294 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15295 (build-system python-build-system)
15296 (home-page "http://pypi.python.org/pypi/rfc3987")
15297 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15298 (description "@code{rfc3987} provides routines for parsing and
15299validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15300 (license license:gpl3+)))
15301
15302(define-public python2-rfc3987
15303 (package-with-python2 python-rfc3987))
0960bf8b
DM
15304
15305(define-public python-validate-email
15306 (package
15307 (name "python-validate-email")
15308 (version "1.3")
15309 (source
15310 (origin
15311 (method url-fetch)
15312 (uri (pypi-uri "validate_email" version))
15313 (sha256
15314 (base32
15315 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15316 (build-system python-build-system)
15317 (home-page "http://github.com/syrusakbary/validate_email")
15318 (synopsis "Verifies if an email address is valid and really exists")
15319 (description "@code{validate_email} can be used to verify if an email
15320address is valid and really exists.")
15321 (license license:lgpl3+)))
15322
15323(define-public python2-validate-email
15324 (package-with-python2 python-validate-email))
620b59ea
DM
15325
15326(define-public python-flex
15327 (package
15328 (name "python-flex")
15329 (version "6.10.0")
15330 (source
15331 (origin
15332 (method url-fetch)
15333 (uri (pypi-uri "flex" version))
15334 (sha256
15335 (base32
15336 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15337 (build-system python-build-system)
15338 (propagated-inputs
15339 `(("python-click" ,python-click)
15340 ("python-iso8601" ,python-iso8601)
15341 ("python-jsonpointer" ,python-jsonpointer)
15342 ("python-pyyaml" ,python-pyyaml)
15343 ("python-requests" ,python-requests)
15344 ("python-rfc3987" ,python-rfc3987)
15345 ("python-six" ,python-six)
15346 ("python-validate-email" ,python-validate-email)))
15347 (home-page "https://github.com/pipermerriam/flex")
15348 (synopsis "Validates Swagger schemata")
15349 (description "@code{flex} can be used to validate Swagger schemata.")
15350 (license license:bsd-3)))
15351
15352(define-public python2-flex
15353 (package-with-python2 python-flex))
235bc01b
DM
15354
15355(define-public python-marshmallow
15356 (package
15357 (name "python-marshmallow")
15358 (version "3.0.0b2")
15359 (source
15360 (origin
15361 (method url-fetch)
15362 (uri (pypi-uri "marshmallow" version))
15363 (sha256
15364 (base32
15365 "11bnpvfdbczr74177p295zbkdrax2cahvbj5bqhhlprgz2xxi5d9"))))
15366 (build-system python-build-system)
15367 (propagated-inputs
15368 `(("python-dateutil" ,python-dateutil)
15369 ("python-simplejson" ,python-simplejson)))
15370 (native-inputs
15371 `(("python-pytest-3.0" ,python-pytest-3.0)
15372 ("python-pytz" ,python-pytz)))
15373 (home-page "https://github.com/marshmallow-code/marshmallow")
15374 (synopsis "Convert complex datatypes to and from native
15375Python datatypes.")
15376 (description "@code{marshmallow} provides a library for converting
15377complex datatypes to and from native Python datatypes.")
15378 (license license:expat)))
15379
15380(define-public python2-marshmallow
15381 (package-with-python2 python-marshmallow))
d270df8d
DM
15382
15383(define-public python-bottle
15384 (package
15385 (name "python-bottle")
15386 (version "0.12.13")
15387 (source
15388 (origin
15389 (method url-fetch)
15390 (uri (pypi-uri "bottle" version))
15391 (sha256
15392 (base32
15393 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
15394 (build-system python-build-system)
15395 (home-page "http://bottlepy.org/")
15396 (synopsis "WSGI framework for small web-applications.")
15397 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
15398 (license license:expat)))
15399
15400(define-public python2-bottle
15401 (package-with-python2 python-bottle))
635b3636
DM
15402
15403(define-public python-apispec
15404 (package
15405 (name "python-apispec")
15406 (version "0.22.0")
15407 (source
15408 (origin
15409 (method url-fetch)
15410 (uri (pypi-uri "apispec" version))
15411 (sha256
15412 (base32
15413 "0y3jxmgp2d24am3hxl40f5rw9abb0r8037sagax3dv64h4n1azwq"))))
15414 (build-system python-build-system)
15415 (propagated-inputs
15416 `(("python-pyyaml" ,python-pyyaml)))
15417 (native-inputs
15418 `(("python-pytest-3.0" ,python-pytest-3.0)
15419 ("python-flask" ,python-flask)
15420 ("python-marshmallow" ,python-marshmallow)
15421 ("python-tornado" ,python-tornado)
15422 ("python-bottle" ,python-bottle)
15423 ("python-mock" ,python-mock)))
15424 (home-page "https://github.com/marshmallow-code/apispec")
15425 (synopsis "Swagger 2.0 API specification generator")
15426 (description "@code{python-apispec} is a pluggable API specification
15427generator. Currently supports the OpenAPI specification (f.k.a.
15428Swagger 2.0).")
15429 (license license:expat)))
15430
15431(define-public python2-apispec
15432 (package-with-python2 python-apispec))
543c5f3f
DM
15433
15434(define-public python-flasgger
15435 (package
15436 (name "python-flasgger")
15437 (version "0.6.3")
15438 (source
15439 (origin
15440 (method url-fetch)
15441 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
15442 version ".tar.gz"))
15443 (file-name (string-append name "-" version ".tar.gz"))
15444 (sha256
15445 (base32
15446 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
15447 (build-system python-build-system)
15448 (arguments
15449 `(#:phases
15450 (modify-phases %standard-phases
15451 (replace 'check
15452 (lambda* (#:key inputs outputs #:allow-other-keys)
15453 (substitute* "Makefile"
15454 (("flake8 flasgger --ignore=F403")
15455 "flake8 flasgger --ignore=E731,F403"))
15456 (setenv "PYTHONPATH" (string-append (getcwd)
15457 ":"
15458 (getenv "PYTHONPATH")))
15459 (zero? (system* "py.test")))))))
15460 (propagated-inputs
15461 `(("python-flask" ,python-flask)
15462 ("python-pyyaml" ,python-pyyaml)
15463 ("python-jsonschema" ,python-jsonschema)
15464 ("python-mistune" ,python-mistune)
15465 ("python-six" ,python-six)))
15466 (native-inputs
15467 `(("python-decorator" ,python-decorator)
15468 ("python-flake8" ,python-flake8)
15469 ("python-flask-restful" ,python-flask-restful)
15470 ("python-flex" ,python-flex)
15471 ("python-pytest-3.0" ,python-pytest-3.0)
15472 ("python-pytest-cov" ,python-pytest-cov)
15473 ("python-marshmallow" ,python-marshmallow)
15474 ("python-apispec" ,python-apispec)))
15475 (home-page "https://github.com/rochacbruno/flasgger/")
15476 (synopsis "Extract Swagger specs from your Flask project")
15477 (description "@code{python-flasgger} allows extracting Swagger specs
15478from your Flask project. It is a fork of Flask-Swagger.")
15479 (license license:expat)))
15480
15481(define-public python2-flasgger
15482 (package-with-python2 python-flasgger))
4eadc8b9
DM
15483
15484(define-public python-swagger-spec-validator
15485 (package
15486 (name "python-swagger-spec-validator")
15487 (version "2.1.0")
15488 (source
15489 (origin
15490 (method url-fetch)
15491 (uri (pypi-uri "swagger-spec-validator" version))
15492 (sha256
15493 (base32
15494 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
15495 (build-system python-build-system)
15496 (propagated-inputs
15497 `(("python-jsonschema" ,python-jsonschema)
15498 ("python-six" ,python-six)))
15499 (home-page
15500 "http://github.com/Yelp/swagger_spec_validator")
15501 (synopsis "Validation of Swagger specifications")
15502 (description "@code{swagger_spec_validator} provides a library for
15503validating Swagger API specifications.")
15504 (license license:asl2.0)))
15505
15506(define-public python2-swagger-spec-validator
15507 (package-with-python2 python-swagger-spec-validator))
7ea498e5
DM
15508
15509(define-public python-apache-libcloud
15510 (package
15511 (name "python-apache-libcloud")
15512 (version "2.0.0")
15513 (source
15514 (origin
15515 (method url-fetch)
15516 (uri (pypi-uri "apache-libcloud" version))
15517 (sha256
15518 (base32
15519 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
15520 (build-system python-build-system)
15521 (arguments
15522 `(#:phases
15523 (modify-phases %standard-phases
15524 (add-after 'unpack 'patch-ssh
15525 (lambda* (#:key inputs #:allow-other-keys)
15526 (substitute* "libcloud/compute/ssh.py"
15527 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15528 "/bin/ssh" "'")))
15529 #t))
15530 (add-after 'unpack 'patch-tests
15531 (lambda _
15532 (substitute* "./libcloud/test/test_file_fixtures.py"
15533 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15534 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15535 return (httplib.OK,
15536 \"1234abcd\",
15537 {\"test\": \"value\"},
15538 httplib.responses[httplib.OK])
15539 def _ascii"))
15540 (substitute* "libcloud/test/compute/test_ssh_client.py"
15541 (("class ShellOutSSHClientTests")
15542 "@unittest.skip(\"Guix container doesn't have ssh service\")
15543class ShellOutSSHClientTests")
15544 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
15545 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
15546 (("'.xF0', '.x90', '.x8D', '.x88'")
15547 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
15548 #t)))))
15549 (inputs
15550 `(("openssh" ,openssh)))
15551 (propagated-inputs
15552 `(("python-paramiko" ,python-paramiko)
15553 ("python-requests" ,python-requests)))
15554 (native-inputs
15555 `(("python-lockfile" ,python-lockfile)
15556 ("python-mock" ,python-mock)
15557 ("python-requests-mock" ,python-requests-mock)))
15558 (home-page "https://libcloud.apache.org/")
15559 (synopsis "Unified Cloud API")
15560 (description "@code{libcloud} is a Python library for interacting with
15561many of the popular cloud service providers using a unified API.")
15562 (license license:asl2.0)))
15563
15564(define-public python2-apache-libcloud
15565 (package-with-python2 python-apache-libcloud))
7fadeab4
DM
15566
15567(define-public python-smmap2
15568 (package
15569 (name "python-smmap2")
15570 (version "2.0.3")
15571 (source
15572 (origin
15573 (method url-fetch)
15574 (uri (pypi-uri "smmap2" version))
15575 (sha256
15576 (base32
15577 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
15578 (build-system python-build-system)
15579 (native-inputs
15580 `(("python-nosexcover" ,python-nosexcover)))
15581 (home-page "https://github.com/Byron/smmap")
15582 (synopsis "Python sliding window memory map manager")
15583 (description "@code{smmap2} is a pure Python implementation of a sliding
15584window memory map manager.")
15585 (license license:bsd-3)))
15586
15587(define-public python2-smmap2
15588 (package-with-python2 python-smmap2))
fa3f5f47
RJ
15589
15590(define-public python-regex
15591 (package
15592 (name "python-regex")
15593 (version "2017.06.07")
15594 (source (origin
15595 (method url-fetch)
15596 (uri (pypi-uri "regex" version))
15597 (sha256
15598 (base32
15599 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
15600 (build-system python-build-system)
15601 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
15602 (synopsis "Alternative regular expression module")
15603 (description "This regular expression implementation is backwards-
15604compatible with the standard @code{re} module, but offers additional
15605functionality like full case-folding for case-insensitive matches in Unicode.")
15606 (license license:psfl)))
15607
15608(define-public python2-regex
15609 (package-with-python2 python-regex))
f817b4d9
RH
15610
15611(define-public python2-pyopengl
15612 (package
15613 (name "python2-pyopengl")
15614 (version "3.1.0")
15615 (source
15616 (origin
15617 (method url-fetch)
15618 (uri (pypi-uri "PyOpenGL" version))
15619 (sha256
15620 (base32
15621 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
15622 (arguments
15623 `(#:python ,python-2))
15624 (build-system python-build-system)
15625 (home-page "http://pyopengl.sourceforge.net")
15626 (synopsis "Standard OpenGL bindings for Python")
15627 (description
15628 "PyOpenGL is the most common cross platform Python binding to OpenGL and
15629related APIs. The binding is created using the standard @code{ctypes}
15630library.")
15631 (license license:bsd-3)))
7efd98be
RH
15632
15633(define-public python-rencode
15634 (package
15635 (name "python-rencode")
15636 (version "1.0.3")
15637 (source
15638 (origin
15639 (method url-fetch)
15640 (uri (pypi-uri "rencode" version))
15641 (sha256
15642 (base32
15643 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
15644 (build-system python-build-system)
15645 (native-inputs `(("pkg-config" ,pkg-config)
15646 ("python-cython", python-cython)))
15647 (home-page "https://github.com/aresch/rencode")
15648 (synopsis "Serialization of heterogeneous data structures")
15649 (description
15650 "The @code{rencode} module is a data structure serialization library,
15651similar to @code{bencode} from the BitTorrent project. For complex,
15652heterogeneous data structures with many small elements, r-encoding stake up
15653significantly less space than b-encodings. This version of rencode is a
15654complete rewrite in Cython to attempt to increase the performance over the
15655pure Python module.")
15656 (license license:bsd-3)))
15657
15658(define-public python2-rencode
15659 (package-with-python2 python-rencode))