gnu: python-apsw: Build with all extensions.
[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>
3c8ba11a 44;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
f817b4d9 45;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
3fee0039 46;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
a01b6da7
NK
47;;;
48;;; This file is part of GNU Guix.
49;;;
50;;; GNU Guix is free software; you can redistribute it and/or modify it
51;;; under the terms of the GNU General Public License as published by
52;;; the Free Software Foundation; either version 3 of the License, or (at
53;;; your option) any later version.
54;;;
55;;; GNU Guix is distributed in the hope that it will be useful, but
56;;; WITHOUT ANY WARRANTY; without even the implied warranty of
57;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58;;; GNU General Public License for more details.
59;;;
60;;; You should have received a copy of the GNU General Public License
61;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
62
1ffa7090 63(define-module (gnu packages python)
3f641af0 64 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 65 #:use-module (gnu packages)
8e451885 66 #:use-module (gnu packages algebra)
d79a343b 67 #:use-module (gnu packages adns)
89b2e0b0 68 #:use-module (gnu packages attr)
d96034ed 69 #:use-module (gnu packages backup)
3969ca54 70 #:use-module (gnu packages bash)
a0596a2f 71 #:use-module (gnu packages check)
1ffa7090 72 #:use-module (gnu packages compression)
dc1bd2b5 73 #:use-module (gnu packages crypto)
4ed20663 74 #:use-module (gnu packages databases)
ddc63a56 75 #:use-module (gnu packages django)
5e1c9367 76 #:use-module (gnu packages file)
4ed20663 77 #:use-module (gnu packages fontutils)
4ed20663
AE
78 #:use-module (gnu packages gcc)
79 #:use-module (gnu packages ghostscript)
6eb7af2a 80 #:use-module (gnu packages gl)
4ed20663 81 #:use-module (gnu packages glib)
c227458a 82 #:use-module (gnu packages graphviz)
6eb7af2a 83 #:use-module (gnu packages gstreamer)
4ed20663 84 #:use-module (gnu packages gtk)
421a80a2 85 #:use-module (gnu packages icu4c)
c937562e 86 #:use-module (gnu packages image)
4ed20663 87 #:use-module (gnu packages imagemagick)
d79a343b 88 #:use-module (gnu packages libevent)
b10ab723 89 #:use-module (gnu packages libffi)
89b2e0b0 90 #:use-module (gnu packages linux)
ed118043 91 #:use-module (gnu packages man)
0da98533 92 #:use-module (gnu packages maths)
4ed20663 93 #:use-module (gnu packages multiprecision)
45203542 94 #:use-module (gnu packages networking)
be7134bf 95 #:use-module (gnu packages ncurses)
b04a52a6 96 #:use-module (gnu packages openstack)
d488d5d6 97 #:use-module (gnu packages password-utils)
c9b1b4f9 98 #:use-module (gnu packages pcre)
4ed20663 99 #:use-module (gnu packages perl)
b10ab723 100 #:use-module (gnu packages pkg-config)
06ff0837 101 #:use-module (gnu packages protobuf)
4535a93a 102 #:use-module (gnu packages qt)
4ed20663 103 #:use-module (gnu packages readline)
6eb7af2a 104 #:use-module (gnu packages sdl)
5f94ec91 105 #:use-module (gnu packages search)
80ce42bd 106 #:use-module (gnu packages shells)
7ea498e5 107 #:use-module (gnu packages ssh)
c9b1b4f9 108 #:use-module (gnu packages statistics)
8f9ac901 109 #:use-module (gnu packages tex)
1c65314c 110 #:use-module (gnu packages texinfo)
cc2b77df 111 #:use-module (gnu packages tls)
e25f0174 112 #:use-module (gnu packages version-control)
02f8f804 113 #:use-module (gnu packages video)
8d12be1e 114 #:use-module (gnu packages web)
ce0614dd 115 #:use-module (gnu packages base)
26b307e2 116 #:use-module (gnu packages xml)
6fa14469 117 #:use-module (gnu packages xorg)
0bdc1671 118 #:use-module (gnu packages xdisorg)
afa181ff 119 #:use-module (gnu packages tcl)
63bcec71 120 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
121 #:use-module (guix packages)
122 #:use-module (guix download)
ea5456c8 123 #:use-module (guix git-download)
11bb85a1 124 #:use-module (guix utils)
acc26ff1 125 #:use-module (guix build-system gnu)
d8c4998f 126 #:use-module (guix build-system cmake)
898238b9 127 #:use-module (guix build-system python)
1c65314c
FB
128 #:use-module (guix build-system trivial)
129 #:use-module (srfi srfi-1))
a01b6da7 130
45848023 131(define-public python-2.7
a01b6da7
NK
132 (package
133 (name "python")
49c2a46e 134 (version "2.7.13")
a01b6da7
NK
135 (source
136 (origin
137 (method url-fetch)
9b43a0ff 138 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
139 version "/Python-" version ".tar.xz"))
140 (sha256
141 (base32
49c2a46e 142 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
c3052d6b
ML
143 (patches (search-patches "python-2.7-search-paths.patch"
144 "python-2-deterministic-build-info.patch"
15e57f57 145 "python-2.7-site-prefixes.patch"
dc5cec21
LF
146 "python-2.7-source-date-epoch.patch"
147 "python-2.7-getentropy-on-old-kernels.patch"))
10a42aa2
EF
148 (modules '((guix build utils)))
149 ;; suboptimal to delete failing tests here, but if we delete them in the
150 ;; arguments then we need to make sure to strip out that phase when it
151 ;; gets inherited by python and python-minimal.
152 (snippet
153 '(begin
154 (for-each delete-file
155 '("Lib/test/test_compileall.py"
f0499100 156 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
157 "Lib/test/test_distutils.py"
158 "Lib/test/test_import.py"
159 "Lib/test/test_shutil.py"
160 "Lib/test/test_socket.py"
1bb163b0 161 "Lib/test/test_subprocess.py"))
10a42aa2 162 #t))))
02f0c3b2
LC
163 (outputs '("out"
164 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 165 (build-system gnu-build-system)
3fdc99da 166 (arguments
10a42aa2 167 `(;; 356 tests OK.
e7e7a1eb
EF
168 ;; 6 tests failed:
169 ;; test_compileall test_distutils test_import test_shutil test_socket
170 ;; test_subprocess
171 ;; 39 tests skipped:
ff6f33cf
ED
172 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
173 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
174 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
175 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
176 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
177 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
178 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
179 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
180 ;; test_winreg test_winsound test_zipfile64
181 ;; 4 skips unexpected on linux2:
182 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 183 #:test-target "test"
3fdc99da 184 #:configure-flags
6a20289d
LC
185 (list "--enable-shared" ;allow embedding
186 "--with-system-ffi" ;build ctypes
aaf75c89 187 "--with-ensurepip=install" ;install pip and setuptools
a282d7ff 188 "--enable-unicode=ucs4"
6a20289d
LC
189 (string-append "LDFLAGS=-Wl,-rpath="
190 (assoc-ref %outputs "out") "/lib"))
fd982732 191
d2cc9c7c
LC
192 #:modules ((ice-9 ftw) (ice-9 match)
193 (guix build utils) (guix build gnu-build-system))
fd982732 194 #:phases
46472ecd
MW
195 (modify-phases %standard-phases
196 (add-before
197 'configure 'patch-lib-shells
198 (lambda _
199 ;; Filter for existing files, since some may not exist in all
200 ;; versions of python that are built with this recipe.
201 (substitute* (filter file-exists?
202 '("Lib/subprocess.py"
203 "Lib/popen2.py"
204 "Lib/distutils/tests/test_spawn.py"
205 "Lib/test/test_subprocess.py"))
206 (("/bin/sh") (which "sh")))
dedc8320
LC
207
208 ;; Use zero as the timestamp in .pyc files so that builds are
209 ;; deterministic. TODO: Remove it when this variable is set in
210 ;; gnu-build-system.scm.
a665996f 211 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 212 #t))
5b4e2791
LC
213 (add-before 'configure 'do-not-record-configure-flags
214 (lambda* (#:key configure-flags #:allow-other-keys)
215 ;; Remove configure flags from the installed '_sysconfigdata.py'
216 ;; and 'Makefile' so we don't end up keeping references to the
217 ;; build tools.
218 ;;
219 ;; Preserve at least '--with-system-ffi' since otherwise the
220 ;; thing tries to build libffi, fails, and we end up with a
221 ;; Python that lacks ctypes.
222 (substitute* "configure"
223 (("^CONFIG_ARGS=.*$")
224 (format #f "CONFIG_ARGS='~a'\n"
225 (if (member "--with-system-ffi" configure-flags)
226 "--with-system-ffi"
227 ""))))
228 #t))
46472ecd
MW
229 (add-before
230 'check 'pre-check
231 (lambda _
232 ;; 'Lib/test/test_site.py' needs a valid $HOME
233 (setenv "HOME" (getcwd))
234 #t))
235 (add-after
236 'unpack 'set-source-file-times-to-1980
237 ;; XXX One of the tests uses a ZIP library to pack up some of the
238 ;; source tree, and fails with "ZIP does not support timestamps
239 ;; before 1980". Work around this by setting the file times in the
240 ;; source tree to sometime in early 1980.
241 (lambda _
242 (let ((circa-1980 (* 10 366 24 60 60)))
243 (ftw "." (lambda (file stat flag)
244 (utime file circa-1980 circa-1980)
245 #t))
02f0c3b2 246 #t)))
9ffe61b0
LC
247 (add-after 'install 'remove-tests
248 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
249 ;; because these files are used by some libraries out there.
250 (lambda* (#:key outputs #:allow-other-keys)
251 (let ((out (assoc-ref outputs "out")))
252 (match (scandir (string-append out "/lib")
253 (lambda (name)
254 (string-prefix? "python" name)))
255 ((pythonX.Y)
256 (let ((testdir (string-append out "/lib/" pythonX.Y
257 "/test")))
258 (with-directory-excursion testdir
259 (for-each delete-file-recursively
260 (scandir testdir
261 (match-lambda
262 ((or "." "..") #f)
263 (file
264 (not
265 (string-prefix? "test_support."
266 file))))))
267 (call-with-output-file "__init__.py" (const #t))
268 #t)))))))
216c283b
LC
269 (add-before 'strip 'make-libraries-writable
270 (lambda* (#:key outputs #:allow-other-keys)
271 ;; Make .so files writable so they can be stripped.
272 (let ((out (assoc-ref outputs "out")))
273 (for-each (lambda (file)
274 (chmod file #o755))
275 (find-files (string-append out "/lib")
276 "\\.so"))
277 #t)))
02f0c3b2
LC
278 (add-after 'install 'move-tk-inter
279 (lambda* (#:key outputs #:allow-other-keys)
280 ;; When Tkinter support is built move it to a separate output so
281 ;; that the main output doesn't contain a reference to Tcl/Tk.
282 (let ((out (assoc-ref outputs "out"))
283 (tk (assoc-ref outputs "tk")))
284 (when tk
285 (match (find-files out "tkinter.*\\.so")
286 ((tkinter.so)
287 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
288 ;; want it under TK/lib/pythonX.Y/site-packages.
289 (let* ((len (string-length out))
290 (target (string-append
291 tk "/"
292 (string-drop
293 (dirname (dirname tkinter.so))
294 len)
295 "/site-packages")))
296 (install-file tkinter.so target)
297 (delete-file tkinter.so)))))
298 #t))))))
a01b6da7 299 (inputs
3fdc99da
CR
300 `(("bzip2" ,bzip2)
301 ("gdbm" ,gdbm)
b10ab723 302 ("libffi" ,libffi) ; for ctypes
b88e1b0a 303 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 304 ("openssl" ,openssl)
3fdc99da 305 ("readline" ,readline)
afa181ff
LC
306 ("zlib" ,zlib)
307 ("tcl" ,tcl)
308 ("tk" ,tk))) ; for tkinter
b10ab723
CR
309 (native-inputs
310 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
311 (native-search-paths
312 (list (search-path-specification
313 (variable "PYTHONPATH")
af070955 314 (files '("lib/python2.7/site-packages")))))
f0499100 315 (home-page "https://www.python.org")
afa181ff 316 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
317 (description
318 "Python is a remarkably powerful dynamic programming language that
319is used in a wide variety of application domains. Some of its key
320distinguishing features include: clear, readable syntax; strong
321introspection capabilities; intuitive object orientation; natural
322expression of procedural code; full modularity, supporting hierarchical
323packages; exception-based error handling; and very high level dynamic
324data types.")
3f641af0 325 (license license:psfl)))
acc26ff1 326
45848023
HG
327;; Current 2.x version.
328(define-public python-2 python-2.7)
329
72df6680 330(define-public python-3.5
b24d1cfc 331 (package (inherit python-2)
343cee8a 332 (version "3.5.3")
717003e3
LC
333 (source (origin
334 (method url-fetch)
335 (uri (string-append "https://www.python.org/ftp/python/"
336 version "/Python-" version ".tar.xz"))
fc1adab1
AK
337 (patches (search-patches
338 "python-fix-tests.patch"
72df6680 339 "python-3.5-fix-tests.patch"
e4d34cd0 340 "python-3.5-getentropy-on-old-kernels.patch"
fc1adab1
AK
341 "python-3-deterministic-build-info.patch"
342 "python-3-search-paths.patch"))
717003e3
LC
343 (patch-flags '("-p0"))
344 (sha256
345 (base32
343cee8a 346 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
fd615918 347 (snippet
e46e9573
EF
348 '(begin
349 (for-each delete-file
350 '("Lib/ctypes/test/test_win32.py" ; fails on aarch64
351 "Lib/test/test_fcntl.py"))
352 #t))))
1f434457
MW
353 (arguments (substitute-keyword-arguments (package-arguments python-2)
354 ((#:tests? _) #t)))
1aebc0cb
AE
355 (native-search-paths
356 (list (search-path-specification
357 (variable "PYTHONPATH")
0e05d01e
SB
358 (files (list (string-append "lib/python"
359 (version-major+minor version)
360 "/site-packages"))))))))
f26a77ff 361
45848023 362;; Current 3.x version.
72df6680 363(define-public python-3 python-3.5)
45848023
HG
364
365;; Current major version.
366(define-public python python-3)
367
95288fcc
LC
368;; Minimal variants of Python, mostly used to break the cycle between Tk and
369;; Python (Tk -> libxcb -> Python.)
370
371(define-public python2-minimal
372 (package (inherit python-2)
373 (name "python-minimal")
02f0c3b2 374 (outputs '("out"))
5927a843
LC
375
376 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
377 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
378 ;; libffi.
379 (inputs `(("libffi" ,libffi)
380 ("zlib" ,zlib)))))
95288fcc
LC
381
382(define-public python-minimal
898238b9 383 (package (inherit python)
95288fcc 384 (name "python-minimal")
02f0c3b2 385 (outputs '("out"))
95288fcc 386
d0b73960 387 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
388 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
389 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
390 (inputs `(("libffi" ,libffi)
391 ("openssl" ,openssl)
95288fcc
LC
392 ("zlib" ,zlib)))))
393
64cb064c
LC
394(define* (wrap-python3 python
395 #:optional
396 (name (string-append (package-name python) "-wrapper")))
898238b9 397 (package (inherit python)
95288fcc 398 (name name)
898238b9
AE
399 (source #f)
400 (build-system trivial-build-system)
02f0c3b2 401 (outputs '("out"))
3969ca54 402 (inputs `(("bash" ,bash)))
3c0f2329 403 (propagated-inputs `(("python" ,python)))
898238b9
AE
404 (arguments
405 `(#:modules ((guix build utils))
406 #:builder
407 (begin
408 (use-modules (guix build utils))
409 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
410 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
411 (mkdir-p bin)
412 (for-each
413 (lambda (old new)
414 (symlink (string-append python old)
415 (string-append bin "/" new)))
3969ca54
SB
416 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
417 `("python" ,"pydoc" ,"idle" ,"pip"))
418 ;; python-config outputs search paths based upon its location,
419 ;; use a bash wrapper to avoid changing its outputs.
420 (let ((bash (string-append (assoc-ref %build-inputs "bash")
421 "/bin/bash"))
422 (old (string-append python "python3-config"))
423 (new (string-append bin "/python-config")))
424 (with-output-to-file new
425 (lambda ()
426 (format #t "#!~a~%" bash)
427 (format #t "exec \"~a\" \"$@\"~%" old)
428 (chmod new #o755)
429 #t)))))))
0d56e3e1
LC
430 (synopsis "Wrapper for the Python 3 commands")
431 (description
432 "This package provides wrappers for the commands of Python@tie{}3.x such
433that they can be invoked under their usual name---e.g., @command{python}
434instead of @command{python3}.")))
435
95288fcc
LC
436(define-public python-wrapper (wrap-python3 python))
437(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 438
aaf625b8
RW
439(define-public python-psutil
440 (package
441 (name "python-psutil")
88535a44 442 (version "4.3.0")
aaf625b8
RW
443 (source
444 (origin
445 (method url-fetch)
f56777be 446 (uri (pypi-uri "psutil" version))
aaf625b8
RW
447 (sha256
448 (base32
88535a44 449 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 450 (build-system python-build-system)
fb08c4fe
MB
451 (arguments
452 ;; FIXME: some tests does not return and times out.
453 '(#:tests? #f))
88535a44 454 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
455 (synopsis "Library for retrieving information on running processes")
456 (description
457 "psutil (Python system and process utilities) is a library for retrieving
458information on running processes and system utilization (CPU, memory, disks,
459network) in Python. It is useful mainly for system monitoring, profiling and
460limiting process resources and management of running processes. It implements
461many functionalities offered by command line tools such as: ps, top, lsof,
462netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
463pidof, tty, taskset, pmap.")
3f641af0 464 (license license:bsd-3)))
aaf625b8
RW
465
466(define-public python2-psutil
467 (package-with-python2 python-psutil))
898238b9 468
f9da1d8a
ED
469(define-public python-passlib
470 (package
471 (name "python-passlib")
3b86a385 472 (version "1.7.1")
f9da1d8a
ED
473 (source
474 (origin
475 (method url-fetch)
690e8c66 476 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
477 (sha256
478 (base32
3b86a385 479 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
f9da1d8a
ED
480 (build-system python-build-system)
481 (native-inputs
f3b98f4f 482 `(("python-nose" ,python-nose)))
f22efa01 483 (propagated-inputs
f9da1d8a
ED
484 `(("python-py-bcrypt" ,python-py-bcrypt)))
485 (arguments
486 `(#:phases
487 (alist-cons-before
488 'check 'set-PYTHON_EGG_CACHE
489 ;; some tests require access to "$HOME/.cython"
490 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
491 %standard-phases)))
492 (home-page "https://bitbucket.org/ecollins/passlib")
493 (synopsis
494 "Comprehensive password hashing framework")
495 (description
496 "Passlib is a password hashing library for Python 2 & 3, which provides
497cross-platform implementations of over 30 password hashing algorithms, as well
498as a framework for managing existing password hashes. It's designed to be
499useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
500to providing full-strength password hashing for multi-user application.")
3f641af0 501 (license license:bsd-3)))
f9da1d8a
ED
502
503(define-public python2-passlib
504 (package-with-python2 python-passlib))
505
feb0d9c3
ED
506(define-public python-py-bcrypt
507 (package
508 (name "python-py-bcrypt")
509 (version "0.4")
510 (source
511 (origin
512 (method url-fetch)
513 (uri (string-append
514 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
515 version
516 ".tar.gz"))
517 (sha256
518 (base32
519 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
520 (build-system python-build-system)
feb0d9c3
ED
521 (home-page "https://code.google.com/p/py-bcrypt")
522 (synopsis
523 "Bcrypt password hashing and key derivation")
524 (description
525 "A python wrapper of OpenBSD's Blowfish password hashing code. This
526system hashes passwords using a version of Bruce Schneier's Blowfish block
527cipher with modifications designed to raise the cost of off-line password
528cracking and frustrate fast hardware implementation. The computation cost of
529the algorithm is parametised, so it can be increased as computers get faster.
530The intent is to make a compromise of a password database less likely to
531result in an attacker gaining knowledge of the plaintext passwords (e.g. using
532John the Ripper).")
533 ;; "sha2.c" is under BSD-3;
534 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
535 ;; the rest is under ISC.
3f641af0 536 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
537
538(define-public python2-py-bcrypt
539 (package-with-python2 python-py-bcrypt))
540
541
429fdea1
ED
542(define-public python-paramiko
543 (package
544 (name "python-paramiko")
b22cdf0c 545 (version "2.1.2")
429fdea1
ED
546 (source
547 (origin
548 (method url-fetch)
81b9bbbd 549 (uri (pypi-uri "paramiko" version))
429fdea1
ED
550 (sha256
551 (base32
b22cdf0c 552 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
429fdea1 553 (build-system python-build-system)
49910e6a 554 (arguments
b22cdf0c
SB
555 '(#:phases
556 (modify-phases %standard-phases
557 (replace 'check
558 (lambda _
559 (zero? (system* "python" "test.py")))))))
a3fc12da 560 (propagated-inputs
b22cdf0c
SB
561 `(("python-pyasn1" ,python-pyasn1)
562 ("python-cryptography" ,python-cryptography)))
429fdea1
ED
563 (home-page "http://www.paramiko.org/")
564 (synopsis "SSHv2 protocol library")
565 (description "Paramiko is a python implementation of the SSHv2 protocol,
566providing both client and server functionality. While it leverages a Python C
567extension for low level cryptography (PyCrypto), Paramiko itself is a pure
568Python interface around SSH networking concepts.")
3f641af0 569 (license license:lgpl2.1+)))
429fdea1
ED
570
571(define-public python2-paramiko
572 (package-with-python2 python-paramiko))
573
574
de73dbf6
ED
575(define-public python-httplib2
576 (package
577 (name "python-httplib2")
286f1bac 578 (version "0.9.2")
de73dbf6
ED
579 (source
580 (origin
581 (method url-fetch)
286f1bac 582 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
583 (sha256
584 (base32
286f1bac 585 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 586 (build-system python-build-system)
286f1bac 587 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
588 (synopsis "Comprehensive HTTP client library")
589 (description
590 "A comprehensive HTTP client library supporting many features left out of
591other HTTP libraries.")
592 (license license:expat)))
593
594(define-public python2-httplib2
595 (package-with-python2 python-httplib2))
596
67039875
ED
597(define-public python-ecdsa
598 (package
599 (name "python-ecdsa")
600 (version "0.13")
601 (source
602 (origin
603 (method url-fetch)
604 (uri (string-append
605 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
606 version
607 ".tar.gz"))
608 (sha256
609 (base32
610 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
611 (build-system python-build-system)
67039875
ED
612 (inputs
613 `(("openssl" ,openssl)))
614 (home-page
7bf837fd 615 "https://github.com/warner/python-ecdsa")
67039875
ED
616 (synopsis
617 "ECDSA cryptographic signature library (pure python)")
618 (description
619 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
620Curve Digital Signature Algorithm), implemented purely in Python. With this
621library, you can quickly create keypairs (signing key and verifying key), sign
622messages, and verify the signatures. The keys and signatures are very short,
623making them easy to handle and incorporate into other protocols.")
624 (license license:expat)))
625
626(define-public python2-ecdsa
627 (package-with-python2 python-ecdsa))
628
52323f32
ED
629(define-public python-ccm
630 (package
631 (name "python-ccm")
db5567f7 632 (version "2.1.6")
52323f32
ED
633 (source
634 (origin
635 (method url-fetch)
db5567f7 636 (uri (pypi-uri "ccm" version))
52323f32
ED
637 (sha256
638 (base32
db5567f7 639 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 640 (build-system python-build-system)
f22efa01 641 (propagated-inputs
52323f32 642 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
643 ;; Not listed in setup.py, but used in ccmlib/node.py for full
644 ;; functionality
645 ("python-psutil" ,python-psutil)
52323f32
ED
646 ("python-six" ,python-six)))
647 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
648 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
649localhost")
650 (description "Cassandra Cluster Manager is a development tool for testing
651local Cassandra clusters. It creates, launches and removes Cassandra clusters
652on localhost.")
3f641af0 653 (license license:asl2.0)))
52323f32
ED
654
655(define-public python2-ccm
656 (package-with-python2 python-ccm))
657
89114f39 658(define-public python-pytz
acc26ff1 659 (package
89114f39 660 (name "python-pytz")
3fee0039 661 (version "2017.2")
acc26ff1
CR
662 (source
663 (origin
664 (method url-fetch)
3fee0039 665 (uri (pypi-uri "pytz" version ".zip"))
acc26ff1
CR
666 (sha256
667 (base32
3fee0039 668 "12cmd3j46d2gcw08bspvp6s9icfcvx88zjz52n1bli9dyvl5dh7m"))))
acc26ff1 669 (build-system python-build-system)
3fee0039
MFM
670 (native-inputs
671 `(("unzip" ,unzip)))
b01bbbcf 672 (home-page "http://pythonhosted.org/pytz")
9e771e3b 673 (synopsis "Python timezone library")
3fee0039
MFM
674 (description "This library brings the Olson tz database into Python. It
675allows accurate and cross platform timezone calculations using Python 2.4 or
676higher. It also solves the issue of ambiguous times at the end of daylight
677saving time. Almost all of the Olson timezones are supported.")
b01bbbcf 678 (license license:expat)))
5ace6e2f 679
89114f39 680(define-public python2-pytz
11bb85a1 681 (package-with-python2 python-pytz))
89114f39 682
1f84ff51
MFM
683(define-public python-clyent
684 (package
685 (name "python-clyent")
686 (version "1.2.1")
687 (source
688 (origin
689 (method url-fetch)
690 (uri (pypi-uri "clyent" version))
691 (sha256
692 (base32
693 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
694 (build-system python-build-system)
695 (native-inputs
696 `(("python-mock" ,python-mock)))
697 (home-page "https://github.com/binstar/clyent")
698 (synopsis "Command line client library")
699 (description "Clyent is a Python command line utiliy library. It is used
700by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
701 (license license:bsd-3)))
702
703(define-public python2-clyent
704 (package-with-python2 python-clyent))
705
89114f39 706(define-public python-babel
5ace6e2f 707 (package
89114f39 708 (name "python-babel")
ffb1e98d 709 (version "2.3.4")
5ace6e2f
CR
710 (source
711 (origin
712 (method url-fetch)
b850a6d8 713 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
714 (sha256
715 (base32
ffb1e98d 716 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
5ace6e2f 717 (build-system python-build-system)
f22efa01 718 (propagated-inputs
f3b98f4f 719 `(("python-pytz" ,python-pytz)))
8498b8cf 720 (arguments `(#:tests? #f)) ; no test target
e1804763 721 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
722 (synopsis
723 "Tools for internationalizing Python applications")
724 (description
725 "Babel is composed of two major parts:
726- tools to build and work with gettext message catalogs
727- a Python interface to the CLDR (Common Locale Data Repository), providing
728access to various locale display names, localized number and date formatting,
729etc. ")
3f641af0 730 (license license:bsd-3)))
89114f39
AE
731
732(define-public python2-babel
11bb85a1 733 (package-with-python2 python-babel))
73adf220 734
ed377cc6
RW
735(define-public python2-backport-ssl-match-hostname
736 (package
737 (name "python2-backport-ssl-match-hostname")
f2d06d46 738 (version "3.5.0.1")
ed377cc6
RW
739 (source
740 (origin
741 (method url-fetch)
742 (uri (string-append
743 "https://pypi.python.org/packages/source/b/"
744 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
745 version ".tar.gz"))
746 (sha256
747 (base32
f2d06d46 748 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 749 (build-system python-build-system)
f2d06d46
EF
750 (arguments
751 `(#:python ,python-2
752 #:tests? #f)) ; no test target
f2d06d46
EF
753 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
754 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
755 (description
756 "This backport brings the ssl.match_hostname() function to users of
757earlier versions of Python. The function checks the hostname in the
758certificate returned by the server to which a connection has been established,
759and verifies that it matches the intended target hostname.")
3f641af0 760 (license license:psfl)))
ed377cc6 761
d205f895
TD
762(define-public python-hdf4
763 (package
764 (name "python-hdf4")
765 (version "0.9")
766 (source
767 (origin
768 (method url-fetch)
769 (uri (pypi-uri name version))
770 (sha256
771 (base32
772 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
773 (build-system python-build-system)
774 (native-inputs `(("nose" ,python-nose)))
775 (propagated-inputs `(("numpy" ,python-numpy)))
776 (inputs
777 `(("hdf4" ,hdf4)
778 ("libjpeg" ,libjpeg)
779 ("zlib" ,zlib)))
780 (arguments
781 `(#:phases
782 (modify-phases %standard-phases
783 (replace 'check
784 (lambda _
785 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
786 ;; on to import numpy. Somehow this works on their CI system.
787 ;; Let's just manage PYTHONPATH here instead.
788 (substitute* "runexamples.sh"
789 (("export PYTHONPATH=.*") ""))
790 (setenv "PYTHONPATH"
791 (string-append (getcwd) ":"
792 (getenv "PYTHONPATH")))
793 (and (zero? (system* "./runexamples.sh"))
794 (zero? (system* "nosetests" "-v"))))))))
795 (home-page "https://github.com/fhs/python-hdf4")
796 (synopsis "Python interface to the NCSA HDF4 library")
797 (description
798 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
799which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
800NetCDF files can also be read and modified. Python-HDF4 is a fork of
801@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
802 (license license:expat)))
803
804(define-public python2-hdf4
805 (package-with-python2 python-hdf4))
806
ef5cbf9b
RW
807(define-public python-h5py
808 (package
809 (name "python-h5py")
5c78db62 810 (version "2.7.0")
ef5cbf9b
RW
811 (source
812 (origin
813 (method url-fetch)
fe147c41 814 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
815 (sha256
816 (base32
5c78db62 817 "0433sdv6xc9p7v1xs1gvbxp7p152ywi3nplgjb258q9fvw9469br"))))
ef5cbf9b 818 (build-system python-build-system)
797e1401
RW
819 (arguments
820 `(#:tests? #f ; no test target
821 #:phases
822 (modify-phases %standard-phases
823 (add-after 'unpack 'fix-hdf5-paths
824 (lambda* (#:key inputs #:allow-other-keys)
825 (let ((prefix (assoc-ref inputs "hdf5")))
826 (substitute* "setup_build.py"
827 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
828 (string-append "['" prefix "/lib" "']"))
829 (("'/opt/local/include', '/usr/local/include'")
830 (string-append "'" prefix "/include" "'")))
831 (substitute* "setup_configure.py"
832 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
833 (string-append "['" prefix "/lib" "']")))
834 #t))))))
3c4010b1 835 (propagated-inputs
69866690
HG
836 `(("python-six" ,python-six)
837 ("python-numpy" ,python-numpy)))
ef5cbf9b 838 (inputs
69866690 839 `(("hdf5" ,hdf5)))
ef5cbf9b 840 (native-inputs
fe147c41
EF
841 `(("python-cython" ,python-cython)
842 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
843 (home-page "http://www.h5py.org/")
844 (synopsis "Read and write HDF5 files from Python")
845 (description
846 "The h5py package provides both a high- and low-level interface to the
847HDF5 library from Python. The low-level interface is intended to be a
848complete wrapping of the HDF5 API, while the high-level component supports
849access to HDF5 files, datasets and groups using established Python and NumPy
850concepts.")
9820a028 851 (license license:bsd-3)))
ef5cbf9b
RW
852
853(define-public python2-h5py
9820a028 854 (package-with-python2 python-h5py))
ef5cbf9b 855
ea8450c8
TD
856(define-public python-netcdf4
857 (package
858 (name "python-netcdf4")
1206c95a 859 (version "1.2.9")
ea8450c8
TD
860 (source
861 (origin
862 (method url-fetch)
863 (uri (pypi-uri "netCDF4" version))
864 (sha256
865 (base32
1206c95a 866 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
ea8450c8
TD
867 (build-system python-build-system)
868 (native-inputs
869 `(("python-cython" ,python-cython)))
870 (propagated-inputs
871 `(("python-numpy" ,python-numpy)))
872 (inputs
873 `(("netcdf" ,netcdf)
874 ("hdf4" ,hdf4)
875 ("hdf5" ,hdf5)))
876 (arguments
877 '(#:phases
878 (modify-phases %standard-phases
879 (replace 'check
880 (lambda _
881 (setenv "NO_NET" "1") ; disable opendap tests
882 (with-directory-excursion "test"
883 (setenv "PYTHONPATH" ; find and add the library we just built
884 (string-append
885 (car (find-files "../build" "lib.*"
886 #:directories? #:t
887 #:fail-on-error? #:t))
888 ":" (getenv "PYTHONPATH")))
889 (zero? (system* "python" "run_all.py"))))))))
890 (home-page
891 "https://github.com/Unidata/netcdf4-python")
892 (synopsis "Python/numpy interface to the netCDF library")
893 (description "Netcdf4-python is a Python interface to the netCDF C
894library. netCDF version 4 has many features not found in earlier
895versions of the library and is implemented on top of HDF5. This module
896can read and write files in both the new netCDF 4 and the old netCDF 3
897format, and can create files that are readable by HDF5 clients. The
898API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
899to users of that module.")
900 ;; The software is mainly ISC, but includes some files covered
901 ;; by the Expat license.
902 (license (list license:isc license:expat))))
903
904(define-public python2-netcdf4
905 (package-with-python2 python-netcdf4))
906
c1448c69
EB
907(define-public python-lockfile
908 (package
909 (name "python-lockfile")
692add53 910 (version "0.12.2")
c1448c69
EB
911 (source
912 (origin
913 (method url-fetch)
914 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
915 "lockfile-" version ".tar.gz"))
916 (sha256
917 (base32
692add53 918 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
919 (build-system python-build-system)
920 (arguments '(#:test-target "check"))
692add53
BW
921 (native-inputs
922 `(("python-pbr" ,python-pbr)))
6a8f26a4 923 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
924 (synopsis "Platform-independent file locking module")
925 (description
926 "The lockfile package exports a LockFile class which provides a simple
927API for locking files.")
f210e944 928 (license license:expat)))
c1448c69
EB
929
930(define-public python2-lockfile
f210e944 931 (package-with-python2 python-lockfile))
c1448c69 932
5a1a4bf6
EB
933(define-public python-mock
934 (package
935 (name "python-mock")
936 (version "1.0.1")
937 (source
938 (origin
939 (method url-fetch)
6b7877e1 940 (uri (pypi-uri "mock" version))
5a1a4bf6
EB
941 (sha256
942 (base32
943 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
944 (build-system python-build-system)
945 (arguments '(#:test-target "check"))
6b7877e1 946 (home-page "https://github.com/testing-cabal/mock")
9e771e3b 947 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
948 (description
949 "Mock is a library for testing in Python. It allows you to replace parts
950of your system under test with mock objects and make assertions about how they
951have been used.")
bd3fa666 952 (license license:expat)))
5a1a4bf6
EB
953
954(define-public python2-mock
955 (package-with-python2 python-mock))
956
731b0c72
LF
957;;; Some packages (notably, certbot and python-acme) rely on this newer version
958;;; of python-mock. However, a large number of packages fail to build with
959;;; mock@2, so we add a new variable for now. Also, there may be a dependency
960;;; cycle between mock and six, so we avoid creating python2-mock@2 for now.
961(define-public python-mock-2
962 (package
963 (inherit python-mock)
964 (version "2.0.0")
965 (source
966 (origin
967 (method url-fetch)
968 (uri (pypi-uri "mock" version))
969 (sha256
970 (base32
971 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
972 (propagated-inputs
973 `(("python-pbr" ,python-pbr-minimal)
974 ,@(package-propagated-inputs python-mock)))))
fc50e9c6 975
73adf220
AE
976(define-public python-setuptools
977 (package
978 (name "python-setuptools")
d660f7be 979 (version "31.0.0")
73adf220
AE
980 (source
981 (origin
982 (method url-fetch)
d660f7be 983 (uri (pypi-uri "setuptools" version))
73adf220
AE
984 (sha256
985 (base32
d660f7be 986 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
987 (modules '((guix build utils)))
988 (snippet
989 '(begin
990 ;; Remove included binaries which are used to build self-extracting
991 ;; installers for Windows.
992 ;; TODO: Find some way to build them ourself so we can include them.
993 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
994 #t))))
73adf220 995 (build-system python-build-system)
d3d656c5
AE
996 ;; FIXME: Tests require pytest, which itself relies on setuptools.
997 ;; One could bootstrap with an internal untested setuptools.
73adf220 998 (arguments
824af8ca 999 `(#:tests? #f))
73adf220
AE
1000 (home-page "https://pypi.python.org/pypi/setuptools")
1001 (synopsis
1002 "Library designed to facilitate packaging Python projects")
1003 (description
1004 "Setuptools is a fully-featured, stable library designed to facilitate
1005packaging Python projects, where packaging includes:
1006Python package and module definitions,
1007distribution package metadata,
1008test hooks,
1009project installation,
1010platform-specific details,
1011Python 3 support.")
d660f7be
MB
1012 ;; TODO: setuptools now bundles the following libraries:
1013 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1014 (license (list license:psfl ; setuptools itself
1015 license:expat ; six, appdirs, pyparsing
1016 license:asl2.0 ; packaging is dual ASL2/BSD-2
1017 license:bsd-2))))
73adf220
AE
1018
1019(define-public python2-setuptools
1020 (package-with-python2 python-setuptools))
fc50e9c6 1021
fa56c773
KK
1022(define-public python-uniseg
1023 (package
1024 (name "python-uniseg")
1025 (version "0.7.1")
1026 (source
1027 (origin
1028 (method url-fetch)
1029 (uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
1030 "get/rel-" version ".tar.gz"))
1031 (file-name (string-append name "-" version ".tar.gz"))
1032 (sha256
1033 (base32
1034 "1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
1035 (build-system python-build-system)
1036 (arguments
1037 '(#:tests? #f)) ; The test suite requires network access.
1038 (home-page
1039 "https://bitbucket.org/emptypage/uniseg-python")
1040 (synopsis
1041 "Python library to determine Unicode text segmentations")
1042 (description
1043 "Uniseg is a Python package used to determine Unicode text segmentations.
1044Supported segmentations include:
1045@enumerate
1046@item @dfn{Code point} (any value in the Unicode codespace)
1047@item @dfn{Grapheme cluster} (user-perceived character made of a single or
1048multiple Unicode code points, e.g. \"G\" + acute-accent)
1049@item Word break
1050@item Sentence break
1051@item Line break
1052@end enumerate")
1053 (license license:expat)))
1054
1055(define-public python2-uniseg
1056 (package-with-python2 python-uniseg))
1057
aa21c764 1058;;; Pycrypto is abandoned upstream:
1194575b 1059;;;
aa21c764 1060;;; https://github.com/dlitz/pycrypto/issues/173
1194575b 1061;;;
aa21c764 1062;;; TODO Remove this package from GNU Guix.
cafc3f5a
EB
1063(define-public python-pycrypto
1064 (package
1065 (name "python-pycrypto")
1066 (version "2.6.1")
1067 (source
1068 (origin
1069 (method url-fetch)
aa21c764
LF
1070 (uri (pypi-uri "pycrypto" version))
1071 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
cafc3f5a
EB
1072 (sha256
1073 (base32
1074 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
1075 (build-system python-build-system)
cafc3f5a
EB
1076 (inputs
1077 `(("python" ,python)
1078 ("gmp" ,gmp)))
1079 (arguments
1080 `(#:phases
1081 (alist-cons-before
1082 'build 'set-build-env
1083 ;; pycrypto runs an autoconf configure script behind the scenes
1084 (lambda _
1085 (setenv "CONFIG_SHELL" (which "bash")))
1086 %standard-phases)))
1087 (home-page "http://www.pycrypto.org/")
1088 (synopsis "Cryptographic modules for Python")
1089 (description
1090 "Pycrypto is a collection of both secure hash functions (such as SHA256
1091and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 1092etc.). The package is structured to make adding new modules easy.")
3f641af0 1093 (license license:public-domain)))
cafc3f5a 1094
345f0611 1095(define-public python2-pycrypto
1c0059da
EF
1096 (let ((pycrypto (package-with-python2 python-pycrypto)))
1097 (package (inherit pycrypto)
1098 (inputs
1099 `(("python" ,python-2)
1100 ,@(alist-delete
1101 "python"
1102 (package-inputs pycrypto)))))))
345f0611 1103
de959250 1104(define-public python-eventlet
1105 (package
1106 (name "python-eventlet")
1107 (version "0.20.1")
1108 (source
1109 (origin
1110 (method url-fetch)
1111 (uri (pypi-uri "eventlet" version))
1112 (sha256
1113 (base32
1114 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1115 (build-system python-build-system)
1116 (propagated-inputs
1117 `(("python-greenlet" ,python-greenlet)))
5150d8b4
TGR
1118 (arguments
1119 ;; TODO: Requires unpackaged 'enum-compat'.
1120 '(#:tests? #f))
de959250 1121 (home-page "http://eventlet.net")
1122 (synopsis "Concurrent networking library for Python")
1123 (description
1124 "Eventlet is a concurrent networking library for Python that
1125allows you to change how you run your code, not how you write it.
1126It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1127Coroutines ensure that the developer uses a blocking style of programming
1128that is similar to threading, but provide the benefits of non-blocking I/O.
1129The event dispatch is implicit, which means you can easily use @code{Eventlet}
1130from the Python interpreter, or as a small part of a larger application.")
1131 (license license:expat)))
1132
1133(define-public python2-eventlet
1134 (let ((base (package-with-python2
1135 (strip-python2-variant python-eventlet))))
1136 (package (inherit base)
1137 (propagated-inputs
1138 `(("python2-enum34" ,python2-enum34)
1139 ,@(package-propagated-inputs base))))))
1140
cafc3f5a
EB
1141(define-public python-keyring
1142 (package
1143 (name "python-keyring")
13f3ff35 1144 (version "8.7")
cafc3f5a
EB
1145 (source
1146 (origin
1147 (method url-fetch)
664e6c3a 1148 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
1149 (sha256
1150 (base32
13f3ff35 1151 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
1152 (build-system python-build-system)
1153 (native-inputs
13f3ff35 1154 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1155 (propagated-inputs
cafc3f5a
EB
1156 `(("python-pycrypto" ,python-pycrypto)))
1157 (arguments
664e6c3a 1158 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 1159 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
1160 (synopsis "Store and access your passwords safely")
1161 (description
1162 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 1163service from python. It can be used in any application that needs safe
cafc3f5a
EB
1164password storage.")
1165 ;; "MIT" and PSF dual license
f210e944 1166 (license license:x11)))
cafc3f5a 1167
d7af1069 1168(define-public python2-keyring
f210e944 1169 (package-with-python2 python-keyring))
d7af1069 1170
a480bc41
EB
1171(define-public python-six
1172 (package
1173 (name "python-six")
b6ab89ef 1174 (version "1.10.0")
a480bc41
EB
1175 (source
1176 (origin
1177 (method url-fetch)
b6ab89ef 1178 (uri (pypi-uri "six" version))
a480bc41
EB
1179 (sha256
1180 (base32
b6ab89ef 1181 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 1182 (build-system python-build-system)
4fd129ee
MB
1183 (native-inputs
1184 `(("python-py" ,python-py)
1185 ("python-pytest" ,python-pytest)))
a480bc41
EB
1186 (home-page "http://pypi.python.org/pypi/six/")
1187 (synopsis "Python 2 and 3 compatibility utilities")
1188 (description
35b9e423 1189 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
1190functions for smoothing over the differences between the Python versions with
1191the goal of writing Python code that is compatible on both Python versions.
35b9e423 1192Six supports every Python version since 2.5. It is contained in only one
a480bc41 1193Python file, so it can be easily copied into your project.")
3f641af0 1194 (license license:x11)))
a480bc41 1195
0c20025c
AE
1196(define-public python2-six
1197 (package-with-python2 python-six))
1198
22d7360b 1199(define-public python-dateutil
cafc3f5a
EB
1200 (package
1201 (name "python-dateutil")
e139c7a7 1202 (version "2.6.0")
cafc3f5a
EB
1203 (source
1204 (origin
1205 (method url-fetch)
394b8060 1206 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
1207 (sha256
1208 (base32
e139c7a7 1209 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
cafc3f5a 1210 (build-system python-build-system)
f22efa01 1211 (propagated-inputs
394b8060 1212 `(("python-six" ,python-six)))
b5a5fb19 1213 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
1214 (synopsis "Extensions to the standard datetime module")
1215 (description
1216 "The dateutil module provides powerful extensions to the standard
1217datetime module, available in Python 2.3+.")
f210e944 1218 (license license:bsd-3)))
cafc3f5a 1219
fc50e9c6
AE
1220(define-public python2-dateutil
1221 (package-with-python2 python-dateutil))
1d08c01f 1222
cafc3f5a
EB
1223(define-public python-parsedatetime
1224 (package
1225 (name "python-parsedatetime")
642656a1 1226 (version "2.4")
cafc3f5a
EB
1227 (source
1228 (origin
1229 (method url-fetch)
eebf6f01 1230 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1231 (sha256
1232 (base32
642656a1 1233 "0jxqkjks7z9dn222cqgvskp4wr6d92aglinxq7pd2w4mzdc7r09x"))))
cafc3f5a
EB
1234 (build-system python-build-system)
1235 (native-inputs
eebf6f01 1236 `(("python-nose" ,python-nose)
28958b64
LC
1237 ("python-pyicu" ,python-pyicu)
1238 ("python-pytest" ,python-pytest)
1239 ("python-pytest-runner" ,python-pytest-runner)))
1240 (propagated-inputs
1241 `(("python-future" ,python-future)))
7bf837fd 1242 (home-page "https://github.com/bear/parsedatetime/")
cafc3f5a
EB
1243 (synopsis
1244 "Parse human-readable date/time text")
1245 (description
e881752c 1246 "Parse human-readable date/time text.")
f210e944 1247 (license license:asl2.0)))
cafc3f5a 1248
38b8f9b2 1249(define-public python2-parsedatetime
f210e944 1250 (package-with-python2 python-parsedatetime))
38b8f9b2 1251
d072efcb
RW
1252(define-public python-pandas
1253 (package
1254 (name "python-pandas")
8e086048 1255 (version "0.19.2")
d072efcb
RW
1256 (source
1257 (origin
1b96f069 1258 (method url-fetch)
8e086048 1259 (uri (pypi-uri "pandas" version))
1b96f069 1260 (sha256
b03ee02f
MB
1261 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1262 (patches
1263 (search-patches "python-pandas-skip-failing-tests.patch"))))
d072efcb 1264 (build-system python-build-system)
d072efcb 1265 (propagated-inputs
f22efa01
HG
1266 `(("python-numpy" ,python-numpy)
1267 ("python-pytz" ,python-pytz)
22d7360b 1268 ("python-dateutil" ,python-dateutil)))
d072efcb 1269 (native-inputs
abcc7a0e
HG
1270 `(("python-nose" ,python-nose)
1271 ("python-cython" ,python-cython)))
d072efcb
RW
1272 (home-page "http://pandas.pydata.org")
1273 (synopsis "Data structures for data analysis, time series, and statistics")
1274 (description
1275 "Pandas is a Python package providing fast, flexible, and expressive data
1276structures designed to make working with structured (tabular,
1277multidimensional, potentially heterogeneous) and time series data both easy
1278and intuitive. It aims to be the fundamental high-level building block for
1279doing practical, real world data analysis in Python.")
f210e944 1280 (license license:bsd-3)))
d072efcb
RW
1281
1282(define-public python2-pandas
f210e944 1283 (package-with-python2 python-pandas))
d072efcb 1284
cafc3f5a
EB
1285(define-public python-tzlocal
1286 (package
1287 (name "python-tzlocal")
ed80839b 1288 (version "1.2.2")
cafc3f5a
EB
1289 (source
1290 (origin
1291 (method url-fetch)
226d3331 1292 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1293 (sha256
1294 (base32
ed80839b 1295 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1296 (build-system python-build-system)
f22efa01
HG
1297 (propagated-inputs
1298 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1299 (home-page "https://github.com/regebro/tzlocal")
1300 (synopsis
35b9e423 1301 "Local timezone information for Python")
cafc3f5a
EB
1302 (description
1303 "Tzlocal returns a tzinfo object with the local timezone information.
1304This module attempts to fix a glaring hole in pytz, that there is no way to
1305get the local timezone information, unless you know the zoneinfo name, and
1306under several distributions that's hard or impossible to figure out.")
3f641af0 1307 (license license:cc0)))
cafc3f5a 1308
1d08c01f
AE
1309(define-public python2-pysqlite
1310 (package
1311 (name "python2-pysqlite")
e80aaeb4 1312 (version "2.8.3")
1d08c01f
AE
1313 (source
1314 (origin
1315 (method url-fetch)
fe476868 1316 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1317 (sha256
1318 (base32
e80aaeb4 1319 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1d08c01f
AE
1320 (build-system python-build-system)
1321 (inputs
1322 `(("sqlite" ,sqlite)))
1323 (arguments
1324 `(#:python ,python-2 ; incompatible with Python 3
1325 #:tests? #f)) ; no test target
7bf837fd 1326 (home-page "https://github.com/ghaering/pysqlite")
7a03af70 1327 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1328 (description
1329 "Pysqlite provides SQLite bindings for Python that comply to the
1330Database API 2.0T.")
ed0cdf83 1331 (license license:zlib)))
1d08c01f 1332
2875caf5
AE
1333
1334(define-public python2-mechanize
1335 (package
1336 (name "python2-mechanize")
1337 (version "0.2.5")
1338 (source
1339 (origin
1340 (method url-fetch)
1341 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1342 version ".tar.gz"))
1343 (sha256
1344 (base32
1345 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1346 (build-system python-build-system)
2875caf5
AE
1347 (arguments
1348 `(#:python ,python-2 ; apparently incompatible with Python 3
1349 #:tests? #f))
1350 ;; test fails with message
1351 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1352 ;; (python-3.3.2) or
1353 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1354 ;; (python-2.7.5).
1355 ;; The source code is from March 2011 and probably not up-to-date
1356 ;; with respect to python unit tests.
1357 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1358 (synopsis
1359 "Stateful programmatic web browsing in Python")
1360 (description
1361 "Mechanize implements stateful programmatic web browsing in Python,
1362after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1363 (license (license:non-copyleft
1364 "file://COPYING"
1365 "See COPYING in the distribution."))))
2875caf5 1366
0352532e
AE
1367
1368(define-public python-simplejson
1369 (package
1370 (name "python-simplejson")
b2e6e150 1371 (version "3.10.0")
0352532e
AE
1372 (source
1373 (origin
1374 (method url-fetch)
988d1bad 1375 (uri (pypi-uri "simplejson" version))
0352532e
AE
1376 (sha256
1377 (base32
b2e6e150 1378 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1379 (build-system python-build-system)
1380 (home-page "http://simplejson.readthedocs.org/en/latest/")
1381 (synopsis
1382 "Json library for Python")
1383 (description
e881752c
AK
1384 "JSON (JavaScript Object Notation) is a subset of JavaScript
1385syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1386format.
0352532e
AE
1387
1388Simplejson exposes an API familiar to users of the standard library marshal
1389and pickle modules. It is the externally maintained version of the json
1390library contained in Python 2.6, but maintains compatibility with Python 2.5
1391and (currently) has significant performance advantages, even without using
1392the optional C extension for speedups. Simplejson is also supported on
1393Python 3.3+.")
3f641af0 1394 (license license:x11)))
0352532e
AE
1395
1396(define-public python2-simplejson
1397 (package-with-python2 python-simplejson))
421a80a2
AE
1398
1399
ed07b08d 1400(define-public python-pyicu
421a80a2 1401 (package
ed07b08d 1402 (name "python-pyicu")
2e161eaf 1403 (version "1.9.5")
421a80a2
AE
1404 (source
1405 (origin
1406 (method url-fetch)
2e161eaf 1407 (uri (pypi-uri "PyICU" version))
421a80a2
AE
1408 (sha256
1409 (base32
2e161eaf 1410 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
421a80a2 1411 (build-system python-build-system)
dc027d40
MB
1412 (arguments
1413 '(#:phases
1414 (modify-phases %standard-phases
1415 (add-before 'check 'delete-failing-test
1416 (lambda _
1417 ;; XXX: These tests require locales that are unavailable
1418 ;; in the build environment.
1419 (delete-file "test/test_DateTimeParserGenerator.py")
1420 #t)))))
421a80a2
AE
1421 (inputs
1422 `(("icu4c" ,icu4c)))
421a80a2 1423 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1424 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1425 (description
1426 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1427 (license license:x11)))
ed07b08d
LF
1428
1429(define-public python2-pyicu
f210e944 1430 (package-with-python2 python-pyicu))
cc20a22a
LC
1431
1432(define-public python2-dogtail
1433 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1434 ;; spaces in indentation" with Python 3.
1435 (package
1436 (name "python2-dogtail")
c5be3467 1437 (version "0.9.9")
cc20a22a
LC
1438 (source (origin
1439 (method url-fetch)
c5be3467 1440 (uri (pypi-uri "dogtail" version))
cc20a22a
LC
1441 (sha256
1442 (base32
c5be3467 1443 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
cc20a22a
LC
1444 (build-system python-build-system)
1445 (arguments `(#:python ,python-2
1446 #:tests? #f)) ; invalid command "test"
5ee684ff
EJ
1447 ;; Currently no offical homepage.
1448 (home-page "https://pypi.python.org/pypi/dogtail/")
1003fbcf 1449 (synopsis "GUI test tool and automation framework written in Python")
cc20a22a 1450 (description
35b9e423 1451 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1452It uses Accessibility (a11y) technologies to communicate with desktop
1453applications. dogtail scripts are written in Python and executed like any
1454other Python program.")
3f641af0 1455 (license license:gpl2+)))
515e6878 1456
011b18c3
LC
1457(define-public python2-empy
1458 (package
1459 (name "python2-empy")
1460 (version "3.3")
1461 (source (origin
1462 (method url-fetch)
1463 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1464 version ".tar.gz"))
1465 (sha256
1466 (base32
1467 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1468 (build-system python-build-system)
1469 (arguments
1470 `(#:python ,python-2
1471 #:phases (alist-replace
1472 'check
1473 (lambda _
1474 (zero? (system* "./test.sh")))
1475 %standard-phases)))
1476 (home-page "http://www.alcyone.com/software/empy/")
1477 (synopsis "Templating system for Python")
1478 (description
1479 "EmPy is a system for embedding Python expressions and statements in
1480template text; it takes an EmPy source file, processes it, and produces
1481output. This is accomplished via expansions, which are special signals to the
1cd4027c 1482EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1483EmPy can expand arbitrary Python expressions and statements in this way, as
1484well as a variety of special forms. Textual data not explicitly delimited in
1485this way is sent unaffected to the output, allowing Python to be used in
1486effect as a markup language. Also supported are callbacks via hooks,
1487recording and playback via diversions, and dynamic, chainable filters. The
1488system is highly configurable via command line options and embedded
1489commands.")
3f641af0 1490 (license license:lgpl2.1+)))
011b18c3 1491
8deeda0c
LC
1492(define-public python2-element-tree
1493 (package
1494 (name "python2-element-tree")
1495 (version "1.2.6")
1496 (source (origin
1497 (method url-fetch)
1498 (uri (string-append
1499 "http://effbot.org/media/downloads/elementtree-"
1500 version "-20050316.tar.gz"))
1501 (sha256
1502 (base32
1503 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1504 (build-system python-build-system)
1505 (arguments
1506 `(#:python ,python-2 ; seems to be part of Python 3
1507 #:tests? #f)) ; no 'test' sub-command
1508 (synopsis "Toolkit for XML processing in Python")
1509 (description
1510 "ElementTree is a Python library supporting lightweight XML processing.")
1511 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1512 (license (license:x11-style
1513 "http://docs.python.org/2/license.html"
1514 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1515
1516(define-public python2-pybugz
1517 (package
1518 (name "python2-pybugz")
1519 (version "0.6.11")
1520 (source (origin
1521 (method url-fetch)
1522 (uri (string-append
1523 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1524 version ".tar.gz"))
1525 (sha256
1526 (base32
6f194a1e 1527 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1528 (patches (search-patches "pybugz-stty.patch"
1529 "pybugz-encode-error.patch"))))
8deeda0c
LC
1530 (build-system python-build-system)
1531 (arguments
1532 `(#:python ,python-2 ; SyntaxError with Python 3
1533 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1534 (propagated-inputs
1535 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1536 (synopsis "Python and command-line interface to Bugzilla")
1537 (description
1538 "PyBugz is a Python library and command-line tool to query the Bugzilla
1539bug tracking system. It is meant as an aid to speed up interaction with the
1540bug tracker.")
1541 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1542 (license license:gpl2)))
8deeda0c 1543
a480bc41
EB
1544(define-public python-enum34
1545 (package
1546 (name "python-enum34")
5e923414 1547 (version "1.1.6")
a480bc41
EB
1548 (source
1549 (origin
1550 (method url-fetch)
d39ae1e5 1551 (uri (pypi-uri "enum34" version))
a480bc41
EB
1552 (sha256
1553 (base32
5e923414 1554 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
a480bc41 1555 (build-system python-build-system)
a480bc41
EB
1556 (home-page "https://pypi.python.org/pypi/enum34")
1557 (synopsis "Backported Python 3.4 Enum")
1558 (description
1559 "Enum34 is the new Python stdlib enum module available in Python 3.4
1560backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1561 (license license:bsd-3)))
a480bc41 1562
820acd1b
LF
1563(define-public python2-enum34
1564 (package-with-python2 python-enum34))
1565
a480bc41
EB
1566(define-public python-parse-type
1567 (package
1568 (name "python-parse-type")
1569 (version "0.3.4")
1570 (source
1571 (origin
1572 (method url-fetch)
1573 (uri (string-append "https://pypi.python.org/packages/source/p/"
1574 "parse_type/parse_type-" version ".tar.gz"))
1575 (sha256
1576 (base32
1577 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1578 (build-system python-build-system)
8ed12889
DM
1579 (arguments
1580 `(#:phases
1581 (modify-phases %standard-phases
1582 (add-after 'unpack 'patch-tests
1583 (lambda _
1584 (substitute* "tests/test_parse_type_parse.py"
1585 ;; Newer Python versions don't have the problem this test tests.
1586 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1587 ""))
1588 #t)))))
f22efa01 1589 (propagated-inputs
f3b98f4f 1590 `(("python-six" ,python-six)
68f1cdec 1591 ("python-parse" ,python-parse)))
8ed12889
DM
1592 (native-inputs
1593 `(("python-pytest" ,python-pytest)
1594 ("python-pytest-runner" ,python-pytest-runner)))
a480bc41
EB
1595 (home-page "https://github.com/jenisys/parse_type")
1596 (synopsis "Extended parse module")
1597 (description
1598 "Parse_type extends the python parse module.")
8ed12889
DM
1599 (properties
1600 `((python2-variant . ,(delay python2-parse-type))))
3f641af0 1601 (license license:bsd-3)))
a480bc41 1602
8ed12889
DM
1603(define-public python2-parse-type
1604 (let ((base (package-with-python2
1605 (strip-python2-variant python-parse-type))))
1606 (package (inherit base)
1607 (propagated-inputs
1608 `(("python2-enum34" ,python2-enum34)
1609 ,@(package-propagated-inputs base))))))
1610
a480bc41
EB
1611(define-public python-parse
1612 (package
1613 (name "python-parse")
eb3d3503 1614 (version "1.6.6")
a480bc41
EB
1615 (source
1616 (origin
1617 (method url-fetch)
eb3d3503 1618 (uri (pypi-uri "parse" version))
a480bc41
EB
1619 (sha256
1620 (base32
aa6c09ed
EF
1621 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1622 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1623 (build-system python-build-system)
1624 (arguments
1625 `(#:phases
f9a65318
EF
1626 (modify-phases %standard-phases
1627 (replace 'check
1628 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1629 (home-page "https://github.com/r1chardj0n3s/parse")
1630 (synopsis "Parse strings")
1631 (description
1632 "Parse strings using a specification based on the Python format()
1633syntax.")
3f641af0 1634 (license license:x11)))
a480bc41 1635
d3eff97a
JL
1636(define-public python-polib
1637 (package
1638 (name "python-polib")
1639 (version "1.0.8")
1640 (source (origin
1641 (method url-fetch)
1642 (uri (pypi-uri "polib" version))
1643 (sha256
1644 (base32
1645 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1646 (build-system python-build-system)
1647 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1648 (synopsis "Manipulate, create and modify gettext files")
1649 (description "Polib can manipulate any gettext format (po, pot and mo)
1650files. It can be used to create po files from scratch or to modify
1651existing ones.")
1652 (license license:expat)))
1653
1654(define-public python2-polib
1655 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1656 (package
1657 (inherit base)
1658 (arguments `(,@(package-arguments base)
1659 ;; Tests don't work with python2.
1660 #:tests? #f)))))
a480bc41 1661
515e6878
LC
1662(define-public scons
1663 (package
1664 (name "scons")
76ab3141 1665 (version "2.5.1")
515e6878
LC
1666 (source (origin
1667 (method url-fetch)
de67e922
LF
1668 (uri (string-append "mirror://sourceforge/scons/scons/" version
1669 "/scons-" version ".tar.gz"))
515e6878
LC
1670 (sha256
1671 (base32
76ab3141 1672 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
515e6878
LC
1673 (build-system python-build-system)
1674 (arguments
1675 ;; With Python 3.x, fails to build with a syntax error.
1676 `(#:python ,python-2
b3e8b4bd 1677 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1678 #:tests? #f)) ; no 'python setup.py test' command
1679 (home-page "http://scons.org/")
1680 (synopsis "Software construction tool written in Python")
1681 (description
1682 "SCons is a software construction tool. Think of SCons as an improved,
1683cross-platform substitute for the classic Make utility with integrated
1684functionality similar to autoconf/automake and compiler caches such as ccache.
1685In short, SCons is an easier, more reliable and faster way to build
1686software.")
3f641af0 1687 (license license:x11)))
011b18c3 1688
c15a5c0e
DT
1689(define-public python-extras
1690 (package
1691 (name "python-extras")
1692 (version "0.0.3")
1693 (source
1694 (origin
1695 (method url-fetch)
1696 (uri (string-append
1697 "https://pypi.python.org/packages/source/e/extras/extras-"
1698 version ".tar.gz"))
1699 (sha256
1700 (base32
1701 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1702 (build-system python-build-system)
c15a5c0e
DT
1703 (arguments
1704 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1705 '(#:tests? #f))
1706 (home-page "https://github.com/testing-cabal/extras")
1707 (synopsis "Useful extensions to the Python standard library")
1708 (description
1709 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1710 (license license:expat)))
c15a5c0e
DT
1711
1712(define-public python2-extras
1713 (package-with-python2 python-extras))
1714
56ea0efd
DT
1715(define-public python-mimeparse
1716 (package
1717 (name "python-mimeparse")
1718 (version "0.1.4")
1719 (source
1720 (origin
1721 (method url-fetch)
1722 (uri (string-append
1723 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1724 version ".tar.gz"))
1725 (sha256
1726 (base32
1727 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1728 (build-system python-build-system)
56ea0efd
DT
1729 (arguments
1730 '(#:tests? #f)) ; no setup.py test command
1731 (home-page
1732 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1733 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1734 (description
1735 "Mimeparse provides basic functions for parsing MIME type names and
1736matching them against a list of media-ranges.")
bd3fa666 1737 (license license:expat)))
56ea0efd
DT
1738
1739(define-public python2-mimeparse
1740 (package-with-python2 python-mimeparse))
1741
4435427e
DT
1742(define-public python-nose
1743 (package
1744 (name "python-nose")
f7cb9841 1745 (version "1.3.7")
4435427e
DT
1746 (source
1747 (origin
1748 (method url-fetch)
f7cb9841 1749 (uri (pypi-uri "nose" version))
4435427e
DT
1750 (sha256
1751 (base32
f7cb9841 1752 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1753 (build-system python-build-system)
4435427e
DT
1754 (arguments
1755 '(#:tests? #f)) ; FIXME: test suite fails
1756 (home-page "http://readthedocs.org/docs/nose/")
1757 (synopsis "Python testing library")
1758 (description
1759 "Nose extends the unittest library to make testing easier.")
3f641af0 1760 (license license:lgpl2.0+)))
4435427e
DT
1761
1762(define-public python2-nose
1763 (package-with-python2 python-nose))
1764
0aea283a
EF
1765(define-public python-nose2
1766 (package
1767 (name "python-nose2")
1768 (version "0.6.5")
1769 (source
1770 (origin
1771 (method url-fetch)
1772 (uri (pypi-uri "nose2" version))
1773 (sha256
1774 (base32
1775 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1776 (build-system python-build-system)
1777 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1778 (propagated-inputs
0aea283a
EF
1779 `(("python-cov-core" ,python-cov-core)
1780 ("python-pytest-cov" ,python-pytest-cov)
1781 ("python-six" ,python-six)))
1782 (home-page "https://github.com/nose-devs/nose2")
1783 (synopsis "Next generation of nicer testing for Python")
1784 (description
1785 "Nose2 is the next generation of nicer testing for Python, based on the
1786plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1787better plugin api, being easier for users to configure, and simplifying internal
1788interfaces and processes.")
1789 (license license:bsd-2)))
1790
1791(define-public python2-nose2
1792 (package-with-python2 python-nose2))
1793
6cd9c356
DT
1794(define-public python-unittest2
1795 (package
1796 (name "python-unittest2")
1797 (version "0.5.1")
1798 (source
1799 (origin
1800 (method url-fetch)
1801 (uri (string-append
1802 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1803 version ".tar.gz"))
1804 (sha256
1805 (base32
1806 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1807 (build-system python-build-system)
6cd9c356
DT
1808 (home-page "http://pypi.python.org/pypi/unittest2")
1809 (synopsis "Python unit testing library")
1810 (description
1811 "Unittest2 is a replacement for the unittest module in the Python
1812standard library.")
3f641af0 1813 (license license:psfl)))
6cd9c356
DT
1814
1815(define-public python2-unittest2
1816 (package (inherit python-unittest2)
1817 (name "python2-unittest2")
1818 (version "0.5.1")
1819 (source
1820 (origin
1821 (method url-fetch)
1822 (uri (string-append
1823 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1824 version ".tar.gz"))
1825 (sha256
1826 (base32
1827 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1828 (arguments
1829 `(#:python ,python-2
1830 #:tests? #f)))) ; no setup.py test command
1831
02f8f804 1832(define-public python-pafy
1833 (package
1834 (name "python-pafy")
745d85b7 1835 (version "0.5.3.1")
02f8f804 1836 (source
1837 (origin
1838 (method url-fetch)
1839 (uri (pypi-uri "pafy" version))
1840 (sha256
1841 (base32
745d85b7 1842 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
02f8f804 1843 (build-system python-build-system)
ed3fee5f 1844 (arguments
1845 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1846 (propagated-inputs
1847 ;; Youtube-dl is a python package which is imported in the file
1848 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1849 `(("youtube-dl" ,youtube-dl)))
1850 (home-page "https://np1.github.io/pafy/")
1851 (synopsis "Retrieve YouTube content and metadata")
1852 (description
1853 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1854 (license license:lgpl3+)))
1855
542ad60f
DT
1856(define-public python-py
1857 (package
1858 (name "python-py")
b9463fdb 1859 (version "1.4.32")
542ad60f
DT
1860 (source
1861 (origin
1862 (method url-fetch)
71c8a804 1863 (uri (pypi-uri "py" version))
542ad60f
DT
1864 (sha256
1865 (base32
b9463fdb 1866 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
542ad60f 1867 (build-system python-build-system)
dcb0da7b
MB
1868 (arguments
1869 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1870 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1871 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1872 ;; Is this module globally installed?"
1873 '(#:tests? #f))
542ad60f
DT
1874 (home-page "http://pylib.readthedocs.org/")
1875 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1876 (description
1877 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1878code introspection, and logging.")
bd3fa666 1879 (license license:expat)))
542ad60f
DT
1880
1881(define-public python2-py
1882 (package-with-python2 python-py))
1883
855d4761
DT
1884(define-public python-pytest
1885 (package
1886 (name "python-pytest")
61a4332d 1887 (version "2.7.3")
855d4761
DT
1888 (source
1889 (origin
1890 (method url-fetch)
1891 (uri (string-append
1892 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1893 version ".tar.gz"))
1894 (sha256
1895 (base32
61a4332d 1896 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1897 (modules '((guix build utils)))
1898 (snippet
1899 ;; One of the tests involves the /usr directory, so it fails.
1900 '(substitute* "testing/test_argcomplete.py"
1901 (("def test_remove_dir_prefix\\(self\\):")
1902 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1903 (build-system python-build-system)
482d9591
HG
1904 (propagated-inputs
1905 `(("python-py" ,python-py)))
e7881f3d 1906 (native-inputs
60724d69
MB
1907 `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
1908 ("bash" ,bash)
1909 ("python-nose" ,python-nose)
855d4761
DT
1910 ("python-mock" ,python-mock)))
1911 (home-page "http://pytest.org")
1912 (synopsis "Python testing library")
1913 (description
1914 "Pytest is a testing tool that provides auto-discovery of test modules
1915and functions, detailed info on failing assert statements, modular fixtures,
1916and many external plugins.")
bd3fa666 1917 (license license:expat)))
855d4761
DT
1918
1919(define-public python2-pytest
1920 (package-with-python2 python-pytest))
1921
23b9168d
LF
1922;; Some packages require a newer pytest.
1923(define-public python-pytest-3.0
fca4ff35
LF
1924 (package
1925 (inherit python-pytest)
1926 (name "python-pytest")
23b9168d 1927 (version "3.0.7")
fca4ff35
LF
1928 (source (origin
1929 (method url-fetch)
1930 (uri (pypi-uri "pytest" version))
1931 (sha256
1932 (base32
23b9168d 1933 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
fca4ff35
LF
1934 (arguments
1935 `(#:phases
1936 (modify-phases %standard-phases
1937 (add-before 'check 'disable-invalid-test
1938 (lambda _
1939 (substitute* "testing/test_argcomplete.py"
1940 (("def test_remove_dir_prefix" line)
1941 (string-append "@pytest.mark.skip"
1942 "(reason=\"Assumes that /usr exists.\")\n "
1943 line)))
23b9168d 1944 #t)))))
7f71e257 1945 (native-inputs
60724d69
MB
1946 `(("python-hypothesis" ,python-hypothesis)
1947 ,@(package-native-inputs python-pytest)))
23b9168d
LF
1948 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1949
1950(define-public python2-pytest-3.0
1951 (let ((base (package-with-python2
1952 (strip-python2-variant python-pytest-3.0))))
1953 (package (inherit base)
1954 (native-inputs
1955 `(("python2-enum34" ,python2-enum34)
1956 ,@(package-native-inputs base))))))
fca4ff35 1957
358c3d61
EF
1958(define-public python-pytest-cov
1959 (package
1960 (name "python-pytest-cov")
1aecfe17 1961 (version "2.4.0")
358c3d61
EF
1962 (source
1963 (origin
1964 (method url-fetch)
1965 (uri (pypi-uri "pytest-cov" version))
1966 (sha256
545f4a1c 1967 (base32
1aecfe17 1968 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
10468636 1969 (build-system python-build-system)
ce40b383
HG
1970 (arguments
1971 `(#:phases
1972 (modify-phases %standard-phases
1973 (replace 'check
1974 (lambda _
1975 ;; options taken from tox.ini
1976 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1977 ;; with "Duplicate implicit target name"
1978 (zero? (system* "python" "./setup.py" "check"
1979 "--strict" "--metadata")))))))
f22efa01 1980 (propagated-inputs
10468636
EF
1981 `(("python-coverage" ,python-coverage)
1982 ("python-pytest" ,python-pytest)))
10468636
EF
1983 (home-page "https://github.com/pytest-dev/pytest-cov")
1984 (synopsis "Pytest plugin for measuring coverage")
1985 (description
1986 "Pytest-cov produces coverage reports. It supports centralised testing and
1987distributed testing in both @code{load} and @code{each} modes. It also
1988supports coverage of subprocesses.")
f210e944 1989 (license license:expat)))
358c3d61
EF
1990
1991(define-public python2-pytest-cov
f210e944 1992 (package-with-python2 python-pytest-cov))
358c3d61 1993
6784f2e3
RW
1994(define-public python-pytest-runner
1995 (package
1996 (name "python-pytest-runner")
047160f2 1997 (version "2.11.1")
6784f2e3
RW
1998 (source
1999 (origin
2000 (method url-fetch)
54cd239b 2001 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
2002 (sha256
2003 (base32
047160f2 2004 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
6784f2e3
RW
2005 (build-system python-build-system)
2006 (arguments
2007 `(#:phases
2008 (modify-phases %standard-phases
2009 ;; The fancy way of setting the version with setuptools_scm does not
2010 ;; seem to work here.
2011 (add-after 'unpack 'set-version
2012 (lambda _
2013 (substitute* "docs/conf.py"
2014 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
2015 (string-append "version = \"" ,version "\"")))
2016 #t)))))
2017 (native-inputs
2018 `(("python-pytest" ,python-pytest)
2019 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 2020 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
2021 (synopsis "Invoke py.test as a distutils command")
2022 (description
2023 "This package provides a @command{pytest-runner} command that
2024@file{setup.py} files can use to run tests.")
f210e944 2025 (license license:expat)))
54cd239b
EF
2026
2027(define-public python2-pytest-runner
f210e944 2028 (package-with-python2 python-pytest-runner))
6784f2e3 2029
44547e51
EF
2030(define-public python-pytest-mock
2031 (package
2032 (name "python-pytest-mock")
2033 (version "1.2")
2034 (source
2035 (origin
2036 (method url-fetch)
2037 (uri (pypi-uri "pytest-mock" version ".zip"))
2038 (sha256
2039 (base32
2040 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
2041 (build-system python-build-system)
2042 (native-inputs
2043 `(("unzip" ,unzip)))
f22efa01 2044 (propagated-inputs
d5e41cf2 2045 `(("python-pytest" ,python-pytest)))
44547e51
EF
2046 (home-page "https://github.com/pytest-dev/pytest-mock/")
2047 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
2048 (description
2049 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
2050around the patching API provided by the @code{mock} package, but with the
2051benefit of not having to worry about undoing patches at the end of a test.
2052The mocker fixture has the same API as @code{mock.patch}, supporting the
2053same arguments.")
2054 (properties `((python2-variant . ,(delay python2-pytest-mock))))
2055 (license license:expat)))
2056
2057(define-public python2-pytest-mock
2058 (let ((base (package-with-python2
2059 (strip-python2-variant python-pytest-mock))))
2060 (package (inherit base)
f22efa01 2061 (propagated-inputs
44547e51 2062 `(("python2-mock" ,python2-mock)
f22efa01 2063 ,@(package-propagated-inputs base))))))
44547e51 2064
8fa58fc9
CAW
2065(define-public python-pytest-xdist
2066 (package
2067 (name "python-pytest-xdist")
2068 (version "1.14")
2069 (source
2070 (origin
2071 (method url-fetch)
2072 (uri (pypi-uri "pytest-xdist" version ".zip"))
2073 (sha256
2074 (base32
de585a7e
HG
2075 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
2076 (modules '((guix build utils)))
2077 (snippet
2078 '(begin
2079 ;; Remove pre-compiled .pyc files from source.
2080 (for-each delete-file-recursively
2081 (find-files "." "__pycache__" #:directories? #t))
2082 (for-each delete-file (find-files "." "\\.pyc$"))
2083 #t))))
8fa58fc9 2084 (build-system python-build-system)
4eb385fb
MB
2085 (arguments
2086 '(#:tests? #f)) ;FIXME: Some tests are failing.
2087 ;; #:phases
2088 ;; (modify-phases %standard-phases
2089 ;; (delete 'check)
2090 ;; (add-after 'install 'check
2091 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2092 ;; (add-installed-pythonpath inputs outputs)
2093 ;; (zero? (system* "py.test" "-v")))))
8fa58fc9
CAW
2094 (native-inputs
2095 `(("unzip" ,unzip)
8fa58fc9 2096 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 2097 (propagated-inputs
c4516ad2 2098 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
2099 ("python-pytest" ,python-pytest)
2100 ("python-py" ,python-py)))
2101 (home-page
2102 "https://github.com/pytest-dev/pytest-xdist")
2103 (synopsis
2104 "Plugin for py.test with distributed testing and loop-on-failing modes")
2105 (description
2106 "The pytest-xdist plugin extends py.test with some unique test execution
2107modes: parallelization, running tests in boxed subprocesses, the ability
2108to run tests repeatedly when failed, and the ability to run tests on multiple
2109Python interpreters or platforms. It uses rsync to copy the existing
2110program code to a remote location, executes there, and then syncs the
2111result back.")
f210e944 2112 (license license:expat)))
8fa58fc9
CAW
2113
2114(define-public python2-pytest-xdist
f210e944 2115 (package-with-python2 python-pytest-xdist))
8fa58fc9 2116
84d24017
DT
2117(define-public python-scripttest
2118 (package
2119 (name "python-scripttest")
2120 (version "1.3")
2121 (source
2122 (origin
2123 (method url-fetch)
2124 (uri (string-append
2125 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2126 version ".tar.gz"))
2127 (sha256
2128 (base32
2129 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2130 (build-system python-build-system)
521b7772 2131 (native-inputs
f3b98f4f 2132 `(("python-pytest" ,python-pytest)))
84d24017
DT
2133 (home-page "http://pythonpaste.org/scripttest/")
2134 (synopsis "Python library to test command-line scripts")
2135 (description "Scripttest is a Python helper library for testing
2136interactive command-line applications. With it you can run a script in a
2137subprocess and see the output as well as any file modifications.")
bd3fa666 2138 (license license:expat)))
84d24017
DT
2139
2140(define-public python2-scripttest
2141 (package-with-python2 python-scripttest))
2142
d8fa80e1
DT
2143(define-public python-testtools
2144 (package
2145 (name "python-testtools")
7adb9031 2146 (version "1.4.0")
d8fa80e1
DT
2147 (source
2148 (origin
2149 (method url-fetch)
7adb9031 2150 (uri (pypi-uri "testtools" version))
d8fa80e1
DT
2151 (sha256
2152 (base32
7adb9031 2153 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
d8fa80e1 2154 (build-system python-build-system)
7adb9031
DM
2155 (arguments
2156 `(#:phases
2157 (modify-phases %standard-phases
2158 (add-after 'unpack 'fix-module-imports
2159 (lambda _
2160 (substitute* "setup.py"
2161 (("'unittest2>=0.8.0',") ""))
2162 (substitute* '("testtools/testcase.py"
2163 "testtools/testsuite.py"
2164 "testtools/run.py"
2165 "testtools/tests/test_run.py"
2166 "testtools/tests/test_testsuite.py"
2167 "testtools/tests/test_deferredruntest.py")
2168 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2169 (("import unittest2 as unittest") "import unittest")
2170 (("import unittest2") "import unittest as unittest2")
2171 (("from unittest2 import") "from unittest import"))
2172 (substitute* "testtools/tests/test_testresult.py"
2173 ;; NUL in source code is not allowed (raises ValueError).
2174 (("\\x00\\x04") "\\x04"))
2175 #t)))))
0e88cbf8 2176 (propagated-inputs
f22efa01
HG
2177 `(("python-mimeparse" ,python-mimeparse)
2178 ("python-extras" ,python-extras)))
d8fa80e1
DT
2179 (home-page "https://github.com/testing-cabal/testtools")
2180 (synopsis
2181 "Extensions to the Python standard library unit testing framework")
2182 (description
2183 "Testtools extends the Python standard library unit testing framework to
2184provide matchers, more debugging information, and cross-Python
2185compatibility.")
3f641af0 2186 (license license:psfl)))
d8fa80e1
DT
2187
2188(define-public python2-testtools
2189 (package-with-python2 python-testtools))
2190
5bf3afea
DT
2191(define-public python-testscenarios
2192 (package
2193 (name "python-testscenarios")
2194 (version "0.4")
2195 (source
2196 (origin
2197 (method url-fetch)
2198 (uri (string-append
2199 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2200 version ".tar.gz"))
2201 (sha256
2202 (base32
2203 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2204 (build-system python-build-system)
f22efa01 2205 (propagated-inputs
8e73d3ba 2206 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
2207 (home-page "https://launchpad.net/testscenarios")
2208 (synopsis "Pyunit extension for dependency injection")
2209 (description
2210 "Testscenarios provides clean dependency injection for Python unittest
2211style tests.")
3f641af0 2212 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
2213
2214(define-public python2-testscenarios
2215 (package-with-python2 python-testscenarios))
2216
dac79ecc
DT
2217(define-public python-testresources
2218 (package
2219 (name "python-testresources")
2220 (version "0.2.7")
2221 (source
2222 (origin
2223 (method url-fetch)
2224 (uri (string-append
2225 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2226 version ".tar.gz"))
2227 (sha256
2228 (base32
2229 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2230 (build-system python-build-system)
dac79ecc
DT
2231 (home-page "https://launchpad.net/testresources")
2232 (synopsis
2233 "Pyunit extension for managing test resources")
2234 (description
2235 "Testresources is an extension to Python's unittest to allow declarative
2236use of resources by test cases.")
3f641af0 2237 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
2238
2239(define-public python2-testresources
2240 (package-with-python2 python-testresources))
2241
070ab058
DT
2242(define-public python-subunit
2243 (package
2244 (name "python-subunit")
2245 (version "0.0.21")
2246 (source
2247 (origin
2248 (method url-fetch)
2249 (uri (string-append
2250 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2251 version ".tar.gz"))
2252 (sha256
2253 (base32
2254 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2255 (build-system python-build-system)
f22efa01 2256 (propagated-inputs
b52ad371
HG
2257 `(("python-extras" ,python-extras)
2258 ("python-mimeparse" ,python-mimeparse)))
2259 (native-inputs
2260 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
2261 (home-page "http://launchpad.net/subunit")
2262 (synopsis "Python implementation of the subunit protocol")
2263 (description
2264 "Python-subunit is a Python implementation of the subunit test streaming
2265protocol.")
3f641af0 2266 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2267
2268(define-public python2-subunit
2269 (package-with-python2 python-subunit))
2270
d2a8db92
HG
2271;; Recent versions of python-fixtures and python-testrepository need
2272;; python-pbr for packaging, which itself needs these two packages for
2273;; testing.
2274;; To fix this circular dependency, we use a build of python-pbr, based on the
2275;; same source, just without any test dependencies and with tests disabled.
2276;; python-pbr-minmal is then used to package python-fixtures and
2277;; python-testrepository.
2278;; Strictly speaking we currently could remove the test-requirements from the
2279;; normal python-pbr package (and save this package) since test are disabled
2280;; there anyway. But this may change in future.
2281(define python-pbr-minimal
cd49454b 2282 (package
d2a8db92 2283 (name "python-pbr-minimal")
269504a7 2284 (version "3.0.1")
7787ef76
CR
2285 (source
2286 (origin
2287 (method url-fetch)
d2a8db92 2288 (uri (pypi-uri "pbr" version))
7787ef76
CR
2289 (sha256
2290 (base32
269504a7 2291 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
7787ef76
CR
2292 (build-system python-build-system)
2293 (arguments
d2a8db92
HG
2294 `(#:tests? #f))
2295 (home-page "http://docs.openstack.org/developer/pbr/")
2296 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2297 (description
d2a8db92 2298 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2299 (license license:asl2.0)))
7787ef76 2300
d2a8db92
HG
2301(define python2-pbr-minimal
2302 (package-with-python2 python-pbr-minimal))
7787ef76 2303
1ef09c0c 2304(define-public python-pbr
e25f0174 2305 (package
d2a8db92 2306 (inherit python-pbr-minimal)
e25f0174 2307 (name "python-pbr")
e25f0174
BW
2308 (arguments
2309 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2310 (propagated-inputs
d2a8db92
HG
2311 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2312 (native-inputs
e25f0174 2313 `(("python-fixtures" ,python-fixtures)
d2a8db92 2314 ;; discover, coverage, hacking, subunit
e25f0174 2315 ("python-mock" ,python-mock)
d2a8db92 2316 ("python-six" ,python-six)
e25f0174
BW
2317 ("python-sphinx" ,python-sphinx)
2318 ("python-testrepository" ,python-testrepository)
2319 ("python-testresources" ,python-testresources)
2320 ("python-testscenarios" ,python-testscenarios)
2321 ("python-testtools" ,python-testtools)
2322 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2323 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2324 (description
2325 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2326and sensible default behaviors into your setuptools run. It will set
2327versions, process requirements files and generate AUTHORS and ChangeLog file
2328from git information.
2329")))
1ef09c0c
BW
2330
2331(define-public python2-pbr
e25f0174 2332 (package-with-python2 python-pbr))
1ef09c0c 2333
7787ef76
CR
2334(define-public python-fixtures
2335 (package
2336 (name "python-fixtures")
13fcc6df 2337 (version "1.4.0")
7787ef76
CR
2338 (source
2339 (origin
2340 (method url-fetch)
13fcc6df 2341 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2342 (sha256
2343 (base32
13fcc6df 2344 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76 2345 (build-system python-build-system)
f6c1ef18
MB
2346 (arguments
2347 '(#:phases
2348 (modify-phases %standard-phases
2349 (replace 'check
2350 (lambda _
2351 (zero? (system* "python" "-m" "testtools.run"
2352 "fixtures.test_suite")))))))
7787ef76 2353 (propagated-inputs
ae92cadd 2354 `(("python-six" ,python-six)))
e7881f3d 2355 (native-inputs
f6c1ef18
MB
2356 `(("python-mock" ,python-mock)
2357 ("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2358 ("python-testtools" ,python-testtools)))
7787ef76
CR
2359 (home-page "https://launchpad.net/python-fixtures")
2360 (synopsis "Python test fixture library")
2361 (description
2362 "Fixtures provides a way to create reusable state, useful when writing
2363Python tests.")
3f641af0 2364 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2365
cd49454b
DT
2366(define-public python2-fixtures
2367 (package-with-python2 python-fixtures))
2368
b24a0c00
DT
2369(define-public python-testrepository
2370 (package
2371 (name "python-testrepository")
2372 (version "0.0.20")
2373 (source
2374 (origin
2375 (method url-fetch)
2376 (uri (string-append
2377 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2378 version ".tar.gz"))
2379 (sha256
2380 (base32
2381 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2382 (build-system python-build-system)
90110ef9
MB
2383 (arguments
2384 ;; FIXME: Many tests are failing.
2385 '(#:tests? #f))
05de40c5 2386 (propagated-inputs
b2e66edf
HG
2387 `(("python-fixtures" ,python-fixtures)
2388 ("python-subunit" ,python-subunit)
b52ad371
HG
2389 ("python-testtools" ,python-testtools)))
2390 (native-inputs
2391 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2392 ("python-mimeparse" ,python-mimeparse)))
2393 (home-page "https://launchpad.net/testrepository")
2394 (synopsis "Database for Python test results")
2395 (description "Testrepository provides a database of test results which can
2396be used as part of a developer's workflow to check things such as what tests
2397have failed since the last commit or what tests are currently failing.")
3f641af0 2398 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2399
2400(define-public python2-testrepository
2401 (package-with-python2 python-testrepository))
2402
243a009a
DT
2403(define-public python-coverage
2404 (package
2405 (name "python-coverage")
4d4cf3dd 2406 (version "4.1")
243a009a
DT
2407 (source
2408 (origin
2409 (method url-fetch)
82a3c582 2410 (uri (pypi-uri "coverage" version))
243a009a
DT
2411 (sha256
2412 (base32
4d4cf3dd 2413 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2414 (build-system python-build-system)
bd10e677
MB
2415 (arguments
2416 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2417 '(#:tests? #f))
243a009a
DT
2418 (home-page "http://nedbatchelder.com/code/coverage")
2419 (synopsis "Code coverage measurement for Python")
2420 (description
2421 "Coverage measures code coverage, typically during test execution. It
2422uses the code analysis tools and tracing hooks provided in the Python standard
2423library to determine which lines are executable, and which have been
2424executed.")
3f641af0 2425 (license license:bsd-3)))
243a009a
DT
2426
2427(define-public python2-coverage
2428 (package-with-python2 python-coverage))
2429
12f839fd
EF
2430(define-public python-cov-core
2431 (package
2432 (name "python-cov-core")
2433 (version "1.15.0")
2434 (source
2435 (origin
2436 (method url-fetch)
2437 (uri (pypi-uri "cov-core" version))
2438 (sha256
2439 (base32
2440 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2441 (build-system python-build-system)
f78e1c27 2442 (propagated-inputs
12f839fd
EF
2443 `(("python-coverage" ,python-coverage)))
2444 (home-page "https://github.com/schlamar/cov-core")
49d5e338 2445 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
12f839fd 2446 (description
49d5e338
TGR
2447 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2448and @code{nose2-cov}. It is useful for developing coverage plugins for these
2449testing frameworks.")
f210e944 2450 (license license:expat)))
12f839fd
EF
2451
2452(define-public python2-cov-core
f210e944 2453 (package-with-python2 python-cov-core))
12f839fd 2454
041358fb
DT
2455(define-public python-discover
2456 (package
2457 (name "python-discover")
2458 (version "0.4.0")
2459 (source
2460 (origin
2461 (method url-fetch)
2462 (uri (string-append
2463 "https://pypi.python.org/packages/source/d/discover/discover-"
2464 version ".tar.gz"))
2465 (sha256
2466 (base32
2467 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2468 (build-system python-build-system)
041358fb
DT
2469 (home-page "http://pypi.python.org/pypi/discover/")
2470 (synopsis
2471 "Python test discovery for unittest")
2472 (description
2473 "Discover provides test discovery for unittest, a feature that has been
e881752c 2474backported from Python 2.7 for Python 2.4+.")
3f641af0 2475 (license license:bsd-3)))
041358fb
DT
2476
2477(define-public python2-discover
2478 (package-with-python2 python-discover))
2479
a480bc41
EB
2480(define-public behave
2481 (package
2482 (name "behave")
287cfd1a 2483 (version "1.2.5")
a480bc41
EB
2484 (source (origin
2485 (method url-fetch)
287cfd1a 2486 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2487 (sha256
2488 (base32
287cfd1a 2489 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2490 (build-system python-build-system)
f22efa01 2491 (propagated-inputs
f3b98f4f 2492 `(("python-six" ,python-six)
a480bc41
EB
2493 ("python-parse" ,python-parse)
2494 ("python-parse-type" ,python-parse-type)))
2495 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2496 ;PyHamcrest>=1.8
7bf837fd 2497 (home-page "https://github.com/behave/behave")
a480bc41
EB
2498 (synopsis "Python behavior-driven development")
2499 (description
2500 "Behave is a tool for behavior-driven development in python.
2501Behavior-driven development (or BDD) is an agile software development
2502technique that encourages collaboration between developers, QA and
2503non-technical or business participants in a software project. Behave uses
2504tests written in a natural language style, backed up by Python code.")
3f641af0 2505 (license license:x11)))
c7303d3c
DT
2506
2507(define-public python-exif-read
2508 (package
2509 (name "python-exif-read")
2a2d0981 2510 (version "2.1.2")
c7303d3c
DT
2511 (source (origin
2512 (method url-fetch)
2a2d0981 2513 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2514 (sha256
2515 (base32
2a2d0981 2516 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2517 (build-system python-build-system)
c7303d3c
DT
2518 (arguments `(#:tests? #f)) ; no tests
2519 (home-page "https://github.com/ianare/exif-py")
2520 (synopsis "Python library to extract EXIF data from image files")
2521 (description
2522 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2523files.")
3f641af0 2524 (license license:bsd-3)))
c7303d3c
DT
2525
2526(define-public python2-exif-read
2527 (package-with-python2 python-exif-read))
d5f89b22
DT
2528
2529(define-public python-pyld
2530 (package
2531 (name "python-pyld")
8957af32 2532 (version "0.7.1")
d5f89b22
DT
2533 (source (origin
2534 (method url-fetch)
af1ab773 2535 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2536 (sha256
2537 (base32
8957af32 2538 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2539 (build-system python-build-system)
d5f89b22 2540 (arguments `(#:tests? #f)) ; no tests
7bf837fd 2541 (home-page "https://github.com/digitalbazaar/pyld")
d5f89b22
DT
2542 (synopsis "Python implementation of the JSON-LD specification")
2543 (description
2544 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2545 (license license:bsd-3)))
d5f89b22
DT
2546
2547(define-public python2-pyld
2548 (package-with-python2 python-pyld))
3a1f9a68
DT
2549
2550(define-public python-certifi
2551 (package
2552 (name "python-certifi")
28576403 2553 (version "2017.1.23")
3a1f9a68
DT
2554 (source (origin
2555 (method url-fetch)
9a41f443 2556 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2557 (sha256
2558 (base32
28576403 2559 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
3a1f9a68 2560 (build-system python-build-system)
28576403 2561 (home-page "https://certifi.io/")
3a1f9a68
DT
2562 (synopsis "Python CA certificate bundle")
2563 (description
2564 "Certifi is a Python library that contains a CA certificate bundle, which
2565is used by the Requests library to verify HTTPS requests.")
3f641af0 2566 (license license:asl2.0)))
3a1f9a68
DT
2567
2568(define-public python2-certifi
2569 (package-with-python2 python-certifi))
e6cfbd36 2570
12c270dd
RW
2571(define-public python-click
2572 (package
2573 (name "python-click")
d4acb6db 2574 (version "6.7")
12c270dd
RW
2575 (source
2576 (origin
2577 (method url-fetch)
375f224b 2578 (uri (pypi-uri "click" version))
12c270dd 2579 (sha256
43accb58 2580 (base32
d4acb6db 2581 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
12c270dd 2582 (build-system python-build-system)
e2ab5a09
BW
2583 (arguments
2584 `(#:phases
2585 (modify-phases %standard-phases
2586 (add-after 'unpack 'fix-paths
2587 (lambda* (#:key inputs #:allow-other-keys)
2588 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2589 "cross-libc" "libc"))))
2590 (substitute* "click/_unicodefun.py"
2591 (("'locale'")
2592 (string-append "'" glibc "/bin/locale'"))))
97be1bc2
MB
2593 #t))
2594 (replace 'check
2595 (lambda _
2596 (zero? (system* "make" "test")))))))
2597 (native-inputs
2598 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2599 (home-page "http://click.pocoo.org")
2600 (synopsis "Command line library for Python")
2601 (description
2602 "Click is a Python package for creating command line interfaces in a
2603composable way with as little code as necessary. Its name stands for
2604\"Command Line Interface Creation Kit\". It's highly configurable but comes
2605with sensible defaults out of the box.")
3f641af0 2606 (license license:bsd-3)))
12c270dd
RW
2607
2608(define-public python2-click
2609 (package-with-python2 python-click))
2610
addc808d
EF
2611(define-public python-wheel
2612 (package
2613 (name "python-wheel")
0e6df70b 2614 (version "0.30.0a0")
e1ba0749
EF
2615 (source
2616 (origin
2617 (method url-fetch)
2618 (uri (pypi-uri "wheel" version))
2619 (sha256
2620 (base32
0e6df70b 2621 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
e1ba0749
EF
2622 (build-system python-build-system)
2623 (native-inputs
f3b98f4f 2624 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2625 ("python-pytest-cov" ,python-pytest-cov)))
2626 (home-page "https://bitbucket.org/pypa/wheel/")
2627 (synopsis "Format for built Python packages")
2628 (description
2629 "A wheel is a ZIP-format archive with a specially formatted filename and
2630the @code{.whl} extension. It is designed to contain all the files for a PEP
2631376 compatible install in a way that is very close to the on-disk format. Many
2632packages will be properly installed with only the @code{Unpack} step and the
2633unpacked archive preserves enough information to @code{Spread} (copy data and
2634scripts to their final locations) at any later time. Wheel files can be
2635installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2636 (license license:expat)
2637 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2638
2639(define-public python2-wheel
8ad4ae20
LF
2640 (let ((wheel (package-with-python2
2641 (strip-python2-variant python-wheel))))
264ae686 2642 (package (inherit wheel)
8ad4ae20
LF
2643 (native-inputs `(("python2-functools32" ,python2-functools32)
2644 ,@(package-native-inputs wheel))))))
2645
addc808d 2646
ae641128 2647(define-public python-requests
e6cfbd36 2648 (package
ae641128 2649 (name "python-requests")
da5db988 2650 (version "2.13.0")
e6cfbd36
DT
2651 (source (origin
2652 (method url-fetch)
5d691657 2653 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2654 (sha256
2655 (base32
da5db988 2656 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
cff0ccf9 2657 ;; TODO: unbundle urllib3 and chardet.
e6cfbd36 2658 (build-system python-build-system)
cff0ccf9
MB
2659 (arguments
2660 ;; FIXME: Some tests require network access.
2661 '(#:tests? #f))
e6cfbd36
DT
2662 (home-page "http://python-requests.org/")
2663 (synopsis "Python HTTP library")
2664 (description
2665 "Requests is a Python HTTP client library. It aims to be easier to use
2666than Python’s urllib2 library.")
3f641af0 2667 (license license:asl2.0)))
864b5211 2668
e9005180
DT
2669;; Some software requires an older version of Requests, notably Docker
2670;; Compose.
2671(define-public python-requests-2.7
2672 (package (inherit python-requests)
2673 (version "2.7.0")
2674 (source (origin
2675 (method url-fetch)
2676 (uri (pypi-uri "requests" version))
2677 (sha256
2678 (base32
2679 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2680
ae641128 2681(define-public python2-requests
8ad4ae20 2682 (package-with-python2 python-requests))
ae641128 2683
ea521b42
DT
2684(define-public python-vcversioner
2685 (package
2686 (name "python-vcversioner")
538fe019 2687 (version "2.16.0.0")
ea521b42
DT
2688 (source
2689 (origin
2690 (method url-fetch)
2691 (uri (pypi-uri "vcversioner" version))
2692 (sha256
2693 (base32
538fe019 2694 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2695 (build-system python-build-system)
ea521b42
DT
2696 (synopsis "Python library for version number discovery")
2697 (description "Vcversioner is a Python library that inspects tagging
2698information in a variety of version control systems in order to discover
2699version numbers.")
2700 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2701 (license license:isc)))
ea521b42
DT
2702
2703(define-public python2-vcversioner
f210e944 2704 (package-with-python2 python-vcversioner))
ae641128 2705
864b5211
DT
2706(define-public python-jsonschema
2707 (package
2708 (name "python-jsonschema")
b3667afb 2709 (version "2.5.1")
864b5211
DT
2710 (source (origin
2711 (method url-fetch)
2712 (uri
2713 (string-append
2714 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2715 version ".tar.gz"))
2716 (sha256
2717 (base32
b3667afb 2718 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2719 (build-system python-build-system)
8bcd6b91
EF
2720 (arguments
2721 '(#:phases
2722 (modify-phases %standard-phases
2723 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2724 (native-inputs
8bcd6b91
EF
2725 `(("python-nose" ,python-nose)
2726 ("python-vcversioner" ,python-vcversioner)))
2727 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2728 (synopsis "Implementation of JSON Schema for Python")
2729 (description
2730 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2731 (license license:expat)
2732 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2733
2734(define-public python2-jsonschema
a14600ec
LF
2735 (let ((jsonschema (package-with-python2
2736 (strip-python2-variant python-jsonschema))))
264ae686 2737 (package (inherit jsonschema)
eaba9d66 2738 (native-inputs
8bcd6b91 2739 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2740 ,@(package-native-inputs jsonschema)))
2741 (propagated-inputs
2742 `(("python2-functools32" ,python2-functools32))))))
850189b8 2743
7734ed7a
OP
2744(define-public python-schema
2745 (package
2746 (name "python-schema")
2747 (version "0.6.6")
2748 (source
2749 (origin
2750 (method url-fetch)
2751 (uri (pypi-uri "schema" version))
2752 (sha256
2753 (base32
2754 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2755 (build-system python-build-system)
2756 (native-inputs
2757 `(("python-pytest" ,python-pytest)))
2758 (home-page "https://github.com/keleshev/schema")
2759 (synopsis "Simple data validation library")
2760 (description
2761 "@code{python-schema} is a library for validating Python data
2762structures, such as those obtained from config-files, forms, external
2763services or command-line parsing, converted from JSON/YAML (or
2764something else) to Python data-types.")
2765 (license license:psfl)))
2766
2767(define-public python2-schema
2768 (package-with-python2 python-schema))
2769
2770(define-public python-schema-0.5
2771 (package (inherit python-schema)
2772 (version "0.5.0")
2773 (source
2774 (origin
2775 (method url-fetch)
2776 (uri (pypi-uri "schema" version))
2777 (sha256
2778 (base32
2779 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2780
2781(define-public python2-schema-0.5
2782 (package-with-python2 python-schema-0.5))
2783
9f21414d 2784(define-public python-kitchen
2785 (package
2786 (name "python-kitchen")
2787 (version "1.2.4")
2788 (source
2789 (origin
2790 (method url-fetch)
2791 (uri (pypi-uri "kitchen" version))
2792 (sha256
2793 (base32
2794 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2795 (build-system python-build-system)
2796 (propagated-inputs
2797 `(("python-chardet" ,python-chardet)))
cb542830 2798 (home-page "https://github.com/fedora-infra/kitchen")
9f21414d 2799 (synopsis "Python API for snippets")
2800 (description "@code{kitchen} module provides a python API for all sorts of
2801little useful snippets of code that everybody ends up writing for their projects
2802but never seem big enough to build an independent release. Use kitchen and stop
2803cutting and pasting that code over and over.")
2804 (license (list license:lgpl2.1+
2805 ;; subprocess.py, test_subprocess.py,
2806 ;; kitchen/pycompat25/defaultdict.py:
2807 license:psfl))))
2808
2809(define-public python2-kitchen
2810 (package-with-python2 python-kitchen))
2811
850189b8
DT
2812(define-public python-unidecode
2813 (package
2814 (name "python-unidecode")
5754fe95 2815 (version "0.04.20")
850189b8
DT
2816 (source (origin
2817 (method url-fetch)
8925d4f3 2818 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2819 (sha256
2820 (base32
5754fe95 2821 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
850189b8 2822 (build-system python-build-system)
850189b8
DT
2823 (home-page "https://pypi.python.org/pypi/Unidecode")
2824 (synopsis "ASCII transliterations of Unicode text")
2825 (description
2826 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2827useful when integrating with legacy code that doesn't support Unicode, or for
2828ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2829machine identifiers from human-readable Unicode strings that should still be
2830somewhat intelligeble.")
3f641af0 2831 (license license:gpl2+)))
850189b8
DT
2832
2833(define-public python2-unidecode
2834 (package-with-python2 python-unidecode))
6d45fef4
DT
2835
2836(define-public python-pyjwt
2837 (package
2838 (name "python-pyjwt")
7e31427f 2839 (version "1.5.2")
6d45fef4
DT
2840 (source
2841 (origin
2842 (method url-fetch)
eb31d4b4 2843 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2844 (sha256
2845 (base32
7e31427f
MB
2846 "0pvr3iymab7v2qz74ann760z7qahqgqszxz5iqqbaqv4z2zz0y8i"))
2847 (modules '((guix build utils)))
2848 (snippet
2849 '(begin
2850 (for-each delete-file-recursively
2851 (find-files "." "\\.pyc$"))
2852 #t))))
6d45fef4 2853 (build-system python-build-system)
eb31d4b4 2854 (native-inputs
7e31427f 2855 `(("python-pytest" ,python-pytest-3.0)
130fe994
HG
2856 ("python-pytest-cov" ,python-pytest-cov)
2857 ("python-pytest-runner" ,python-pytest-runner)))
7bf837fd 2858 (home-page "https://github.com/progrium/pyjwt")
6d45fef4
DT
2859 (synopsis "JSON Web Token implementation in Python")
2860 (description
2861 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2862 (license license:expat)))
6d45fef4
DT
2863
2864(define-public python2-pyjwt
2865 (package-with-python2 python-pyjwt))
2866
a80488c2 2867(define-public python-pykka
2868 (package
2869 (name "python-pykka")
2870 (version "1.2.1")
2871 (source
2872 (origin
2873 (method url-fetch)
2874 (uri (pypi-uri "Pykka" version))
2875 (sha256
2876 (base32
2877 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2878 (build-system python-build-system)
2879 (native-inputs
2880 `(("python-mock" ,python-mock)
2881 ("python-nose" ,python-nose)
2882 ("python-gevent" ,python-gevent)
2883 ("python-eventlet" ,python-eventlet)))
2884 (home-page "https://www.pykka.org/")
2885 (synopsis "Pykka is a Python implementation of the actor model")
2886 (description
2887 "Pykka is a Python implementation of the actor model.
2888The actor model introduces some simple rules to control the sharing
2889of state and cooperation between execution units, which makes it
2890easier to build concurrent applications.")
2891 (license license:asl2.0)))
2892
2893(define-public python2-pykka
2894 (package-with-python2 python-pykka))
2895
2cec1f6f
DT
2896(define-public python-oauthlib
2897 (package
2898 (name "python-oauthlib")
bde2171d 2899 (version "1.0.3")
2cec1f6f
DT
2900 (source (origin
2901 (method url-fetch)
bde2171d 2902 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2903 (sha256
2904 (base32
bde2171d 2905 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2906 (build-system python-build-system)
bde2171d 2907 (native-inputs
bb06aa34 2908 `(("python-nose" ,python-nose)
c616b5d3 2909 ("python-mock" ,python-mock)
bde2171d 2910 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2911 ("python-pyjwt" ,python-pyjwt)
2912 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2913 (home-page "https://github.com/idan/oauthlib")
2914 (synopsis "OAuth implementation for Python")
2915 (description
2916 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2917OAuth request-signing logic.")
3f641af0 2918 (license license:bsd-3)
59f151ec 2919 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2920
2921(define-public python2-oauthlib
59f151ec 2922 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2923 (package
2924 (inherit base)
00e10c6e 2925 (native-inputs `(("python2-unittest2" ,python2-unittest2)
59f151ec 2926 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2927
2928(define-public python-itsdangerous
2929 (package
2930 (name "python-itsdangerous")
2931 (version "0.24")
2932 (source
2933 (origin
2934 (method url-fetch)
2935 (uri (string-append
2936 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2937 version ".tar.gz"))
2938 (sha256
2939 (base32
2940 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2941 (build-system python-build-system)
7bf837fd 2942 (home-page "https://github.com/mitsuhiko/itsdangerous")
ec5dbb5c
DT
2943 (synopsis "Python library for passing data to/from untrusted environments")
2944 (description
2945 "Itsdangerous provides various helpers to pass trusted data to untrusted
2946environments and back.")
f210e944 2947 (license license:bsd-3)))
ec5dbb5c
DT
2948
2949(define-public python2-itsdangerous
f210e944 2950 (package-with-python2 python-itsdangerous))
5731cae3 2951
8d12be1e
RW
2952(define-public python-pyyaml
2953 (package
2954 (name "python-pyyaml")
bf5e4bc4 2955 (version "3.12")
8d12be1e
RW
2956 (source
2957 (origin
2958 (method url-fetch)
bf5e4bc4 2959 (uri (pypi-uri "PyYAML" version))
8d12be1e
RW
2960 (sha256
2961 (base32
bf5e4bc4 2962 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
8d12be1e
RW
2963 (build-system python-build-system)
2964 (inputs
2965 `(("libyaml" ,libyaml)))
8d12be1e
RW
2966 (home-page "http://pyyaml.org/wiki/PyYAML")
2967 (synopsis "YAML parser and emitter for Python")
2968 (description
2969 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2970complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2971API, and sensible error messages. PyYAML supports standard YAML tags and
2972provides Python-specific tags that allow to represent an arbitrary Python
2973object.")
2974 (license license:expat)))
2975
2976(define-public python2-pyyaml
2977 (package-with-python2 python-pyyaml))
2978
5731cae3
DT
2979(define-public python-virtualenv
2980 (package
2981 (name "python-virtualenv")
58d04dba 2982 (version "15.0.3")
5731cae3
DT
2983 (source
2984 (origin
2985 (method url-fetch)
17804240 2986 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2987 (sha256
2988 (base32
58d04dba 2989 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2990 (build-system python-build-system)
17804240
EF
2991 (arguments
2992 `(#:phases
2993 (modify-phases %standard-phases
58d04dba
RW
2994 (replace 'check
2995 (lambda _
2996 ;; Disable failing test. See upstream bug report
2997 ;; https://github.com/pypa/virtualenv/issues/957
2998 (substitute* "tests/test_virtualenv.py"
2999 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
3000 (zero? (system* "py.test")))))))
e7881f3d 3001 (native-inputs
f3b98f4f 3002 `(("python-mock" ,python-mock)
17804240 3003 ("python-pytest" ,python-pytest)))
5731cae3
DT
3004 (home-page "https://virtualenv.pypa.io/")
3005 (synopsis "Virtual Python environment builder")
3006 (description
3007 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 3008 (license license:expat)))
5731cae3
DT
3009
3010(define-public python2-virtualenv
3011 (package-with-python2 python-virtualenv))
8176d4d5
DT
3012
3013(define-public python-markupsafe
3014 (package
3015 (name "python-markupsafe")
3016 (version "0.23")
3017 (source
3018 (origin
3019 (method url-fetch)
3020 (uri (string-append
3021 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
3022 version ".tar.gz"))
3023 (sha256
3024 (base32
3025 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
3026 (build-system python-build-system)
7bf837fd 3027 (home-page "https://github.com/mitsuhiko/markupsafe")
8176d4d5
DT
3028 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3029 (description
3030 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3031for Python.")
3f641af0 3032 (license license:bsd-3)))
8176d4d5
DT
3033
3034(define-public python2-markupsafe
3035 (package-with-python2 python-markupsafe))
fe34f0d1
DT
3036
3037(define-public python-jinja2
3038 (package
3039 (name "python-jinja2")
bac5fd21 3040 (version "2.9.6")
fe34f0d1
DT
3041 (source
3042 (origin
3043 (method url-fetch)
e98149b3 3044 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
3045 (sha256
3046 (base32
bac5fd21 3047 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
fe34f0d1 3048 (build-system python-build-system)
bac5fd21
RW
3049 (arguments
3050 `(#:phases
3051 (modify-phases %standard-phases
3052 ;; These files cannot be built with Python < 3.6. See
3053 ;; https://github.com/pallets/jinja/issues/655
3054 ;; FIXME: Remove this when the "python" package is upgraded.
3055 (add-after 'unpack 'delete-incompatible-files
3056 (lambda _
3057 (for-each delete-file
3058 '("jinja2/asyncsupport.py"
3059 "jinja2/asyncfilters.py"))
3060 #t)))))
f22efa01 3061 (propagated-inputs
f3b98f4f 3062 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
3063 (home-page "http://jinja.pocoo.org/")
3064 (synopsis "Python template engine")
3065 (description
3066 "Jinja2 is a small but fast and easy to use stand-alone template engine
3067written in pure Python.")
3f641af0 3068 (license license:bsd-3)))
fe34f0d1
DT
3069
3070(define-public python2-jinja2
3071 (package-with-python2 python-jinja2))
3580ab8b 3072
f7d17ac7
EE
3073(define-public python-pystache
3074 (package
3075 (name "python-pystache")
3076 (version "0.5.4")
3077 (source (origin
3078 (method url-fetch)
3079 (uri (pypi-uri "pystache" version))
3080 (sha256
3081 (base32
3082 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3083 (build-system python-build-system)
8bd5164b
MB
3084 (arguments
3085 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
f7d17ac7
EE
3086 (home-page "http://defunkt.io/pystache/")
3087 (synopsis "Python logic-less template engine")
3088 (description
3089 "Pystache is a Python implementation of the framework agnostic,
3090logic-free templating system Mustache.")
8bd5164b
MB
3091 (license license:expat)
3092 (properties `((python2-variant . ,(delay python2-pystache))))))
f7d17ac7
EE
3093
3094(define-public python2-pystache
8bd5164b
MB
3095 (package (inherit (package-with-python2
3096 (strip-python2-variant python-pystache)))
3097 (arguments
3098 `(#:python ,python-2
3099 #:phases
3100 (modify-phases %standard-phases
3101 (replace 'check
3102 (lambda _
3103 (zero? (system* "python" "test_pystache.py")))))))))
f7d17ac7 3104
1285119b
RW
3105(define-public python-joblib
3106 (package
3107 (name "python-joblib")
f34ef331 3108 (version "0.10.3")
1285119b
RW
3109 (source (origin
3110 (method url-fetch)
f34ef331 3111 (uri (pypi-uri "joblib" version))
1285119b
RW
3112 (sha256
3113 (base32
6aa5f1ca
HG
3114 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
3115 (modules '((guix build utils)))
3116 (snippet
3117 '(begin
3118 ;; Remove pre-compiled .pyc files from source.
3119 (for-each delete-file-recursively
3120 (find-files "." "__pycache__" #:directories? #t))
3121 (for-each delete-file (find-files "." "\\.pyc$"))
3122 #t))))
1285119b 3123 (build-system python-build-system)
a8dd960a
RW
3124 (arguments
3125 `(#:phases
3126 (modify-phases %standard-phases
3127 (add-before 'check 'disable-failing-tests
3128 (lambda _
3129 ;; This numpydoc tests fails for unknown reasons
3130 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
3131 ;; This numpydoc test depends on matplotlib, which is not a
3132 ;; required input.
3133 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
3134 ;; These tests fail to execute sys.executable
3135 (substitute* "joblib/test/test_parallel.py"
3136 (("import nose" line)
3137 (string-append "from nose.plugins.skip import SkipTest\n" line))
3138 (("def test_nested_parallel_warnings" line)
3139 (string-append "@SkipTest\n" line))
3140 (("def test_parallel_with_interactively_defined_functions" line)
3141 (string-append "@SkipTest\n" line)))
3142 #t)))))
f052ec9a 3143 ;; Provide nose to enable tests command
1285119b 3144 (native-inputs
f3b98f4f 3145 `(("python-nose" ,python-nose)
f34ef331
RW
3146 ("python-sphinx" ,python-sphinx)
3147 ("python-docutils" ,python-docutils)
3148 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
3149 (home-page "http://pythonhosted.org/joblib/")
3150 (synopsis "Using Python functions as pipeline jobs")
3151 (description
3152 "Joblib is a set of tools to provide lightweight pipelining in Python.
3153In particular, joblib offers: transparent disk-caching of the output values
3154and lazy re-evaluation (memoize pattern), easy simple parallel computing
3155logging and tracing of the execution.")
3f641af0 3156 (license license:bsd-3)))
1285119b
RW
3157
3158(define-public python2-joblib
3159 (package-with-python2 python-joblib))
3160
3580ab8b
DT
3161(define-public python-docutils
3162 (package
3163 (name "python-docutils")
00e0ca7c 3164 (version "0.13.1")
3580ab8b
DT
3165 (source
3166 (origin
3167 (method url-fetch)
00e0ca7c 3168 (uri (pypi-uri "docutils" version))
3580ab8b
DT
3169 (sha256
3170 (base32
00e0ca7c 3171 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3580ab8b 3172 (build-system python-build-system)
3580ab8b
DT
3173 (arguments
3174 '(#:tests? #f)) ; no setup.py test command
3175 (home-page "http://docutils.sourceforge.net/")
3176 (synopsis "Python Documentation Utilities")
3177 (description
3178 "Docutils is a modular system for processing documentation into useful
3179formats, such as HTML, XML, and LaTeX. For input Docutils supports
3180reStructuredText.")
3181 ;; Most of the source code is public domain, but some source files are
3182 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 3183 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
3184
3185(define-public python2-docutils
3186 (package-with-python2 python-docutils))
fb35b7c0
DT
3187
3188(define-public python-pygments
3189 (package
3190 (name "python-pygments")
7d2e758d 3191 (version "2.1.3")
fb35b7c0
DT
3192 (source
3193 (origin
3194 (method url-fetch)
9f442285 3195 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
3196 (sha256
3197 (base32
7d2e758d 3198 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
fb35b7c0 3199 (build-system python-build-system)
995cb99e
MB
3200 (arguments
3201 ;; FIXME: Tests require sphinx, which depends on this.
3202 '(#:tests? #f))
fb35b7c0
DT
3203 (home-page "http://pygments.org/")
3204 (synopsis "Syntax highlighting")
3205 (description
3206 "Pygments is a syntax highlighting package written in Python.")
3f641af0 3207 (license license:bsd-2)))
fb35b7c0
DT
3208
3209(define-public python2-pygments
3210 (package-with-python2 python-pygments))
9dd6078d 3211
5f94ec91
RW
3212(define-public python-sphinxcontrib-websupport
3213 (package
3214 (name "python-sphinxcontrib-websupport")
3215 (version "1.0.1")
3216 (source (origin
3217 (method url-fetch)
3218 (uri (pypi-uri "sphinxcontrib-websupport" version))
3219 (sha256
3220 (base32
3221 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
3222 (build-system python-build-system)
3223 (propagated-inputs
3224 `(("python-mock" ,python-mock)
3225 ("python-pytest" ,python-pytest)
3226 ("python-xapian-bindings" ,python-xapian-bindings)))
3227 ;; Needed for running the test suite
3228 (native-inputs
3229 `(("python-six" ,python-six)
3230 ("python-jinja2" ,python-jinja2)
3231 ("python-docutils" ,python-docutils)
3232 ("python-sphinx" ,python-sphinx)
3233 ("python-sqlalchemy" ,python-sqlalchemy)
3234 ("python-whoosh" ,python-whoosh)))
3235 (home-page "http://sphinx-doc.org/")
3236 (synopsis "Sphinx API for web applications")
3237 (description "This package provides a Python API to easily integrate
3238Sphinx documentation into your web application. It provides tools to
3239integrate Sphinx documents in web templates and to handle searches.")
3240 (license license:bsd-3)))
3241
9dd6078d
DT
3242(define-public python-sphinx
3243 (package
3244 (name "python-sphinx")
c227458a 3245 (version "1.5.1")
9dd6078d
DT
3246 (source
3247 (origin
3248 (method url-fetch)
9a8acd00 3249 (uri (pypi-uri "Sphinx" version))
9dd6078d
DT
3250 (sha256
3251 (base32
c227458a 3252 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
9dd6078d 3253 (build-system python-build-system)
03cb5f9e 3254 (arguments
c227458a
DM
3255 `(#:phases
3256 (modify-phases %standard-phases
3257 (replace 'check
3258 (lambda _
3259 ;; Requires Internet access.
3260 (delete-file "tests/test_build_linkcheck.py")
3261 (zero? (system* "make" "test")))))))
f22efa01 3262 (propagated-inputs
9a8acd00
DM
3263 `(("python-imagesize" ,python-imagesize)
3264 ("python-sphinx-alabaster-theme"
3265 ,python-sphinx-alabaster-theme)
3266 ("python-babel" ,python-babel)
3267 ("python-snowballstemmer" ,python-snowballstemmer)
9dd6078d 3268 ("python-docutils" ,python-docutils)
9a8acd00
DM
3269 ("python-jinja2" ,python-jinja2)
3270 ("python-pygments" ,python-pygments)
a10b9810 3271 ("python-requests" ,python-requests)
9a8acd00 3272 ("python-six" ,python-six)))
c227458a
DM
3273 (native-inputs
3274 `(("graphviz" ,graphviz)
3275 ("python-html5lib" ,python-html5lib)
3276 ("python-mock" ,python-mock)
a10b9810 3277 ("python-nose" ,python-nose)))
9dd6078d
DT
3278 (home-page "http://sphinx-doc.org/")
3279 (synopsis "Python documentation generator")
3280 (description "Sphinx is a tool that makes it easy to create documentation
3281for Python projects or other documents consisting of multiple reStructuredText
3282sources.")
9a8acd00
DM
3283 (license license:bsd-3)
3284 (properties `((python2-variant . ,(delay python2-sphinx))))))
9dd6078d 3285
e7304ab1
RW
3286(define-public python-sphinx-1.6
3287 (package (inherit python-sphinx)
3288 (name "python-sphinx")
3289 (version "1.6.3")
3290 (source (origin
3291 (method url-fetch)
3292 (uri (pypi-uri "Sphinx" version))
3293 (sha256
3294 (base32
3295 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
3296 (arguments
3297 `(#:phases
3298 (modify-phases %standard-phases
3299 (replace 'check
3300 (lambda _
3301 ;; Requires Internet access.
3302 (delete-file "tests/test_build_linkcheck.py")
3303 (substitute* "tests/test_build_latex.py"
3304 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
3305 "@pytest.mark.skip()"))
3306 (zero? (system* "make" "test")))))))
3307 (propagated-inputs
3308 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
3309 ,@(package-propagated-inputs python-sphinx)))
3310 (native-inputs
3311 `(("python-pytest" ,python-pytest-3.0)
3312 ("imagemagick" ,imagemagick) ; for "convert"
3313 ,@(package-native-inputs python-sphinx)))
3314 (properties '())))
3315
3061b331
MFM
3316(define-public python-sphinx-1.5.3
3317 (package
3318 (inherit python-sphinx)
3319 (name "python-sphinx")
3320 (version "1.5.3")
3321 (source
3322 (origin
3323 (method url-fetch)
3324 (uri (pypi-uri "Sphinx" version))
3325 (sha256
3326 (base32
3327 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3328 (native-inputs
23b9168d 3329 `(("python-pytest" ,python-pytest-3.0)
3061b331
MFM
3330 ,@(package-native-inputs python-sphinx)))))
3331
9dd6078d 3332(define-public python2-sphinx
9a8acd00
DM
3333 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3334 (package
3335 (inherit base)
3336 (native-inputs `(("python2-mock" ,python2-mock)
c227458a 3337 ("python2-enum34" ,python2-enum34)
9a8acd00
DM
3338 ,@(package-native-inputs base)))
3339 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3340 ,@(package-propagated-inputs base))))))
6888830b 3341
ad320b20
RW
3342(define-public python-sphinx-rtd-theme
3343 (package
3344 (name "python-sphinx-rtd-theme")
af842d45 3345 (version "0.2.4")
ad320b20
RW
3346 (source
3347 (origin
3348 (method url-fetch)
af842d45 3349 (uri (pypi-uri "sphinx_rtd_theme" version))
ad320b20
RW
3350 (sha256
3351 (base32
af842d45 3352 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
ad320b20 3353 (build-system python-build-system)
9893cff3 3354 (arguments '(#:tests? #f)) ; No tests.
9d3a15b4
LF
3355 (propagated-inputs
3356 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
3357 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3358 (synopsis "ReadTheDocs.org theme for Sphinx")
3359 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 3360 (license license:expat)))
ad320b20
RW
3361
3362(define-public python2-sphinx-rtd-theme
3363 (package-with-python2 python-sphinx-rtd-theme))
3364
fe94cf0c
HG
3365(define-public python-rst.linker
3366 (package
3367 (name "python-rst.linker")
3368 (version "1.7")
3369 (source
3370 (origin
3371 (method url-fetch)
3372 (uri (pypi-uri "rst.linker" version))
3373 (sha256
3374 (base32
3375 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3376 (build-system python-build-system)
3377 (propagated-inputs
22d7360b 3378 `(("python-dateutil" ,python-dateutil)
fe94cf0c
HG
3379 ("python-six" ,python-six)))
3380 (native-inputs
3381 `(("python-setuptools-scm" ,python-setuptools-scm)))
3382 ;; Test would require path.py, which would introduce a cyclic dependence.
3383 (arguments `(#:tests? #f))
3384 ;; Note: As of version 1.7 the documentation is not worth building.
3385 (home-page "https://github.com/jaraco/rst.linker")
3386 (synopsis "Sphinx plugin to add links and timestamps")
3387 (description "rst.linker allows to automatically replace text by a
3388reStructuredText external reference or timestamps. It's primary purpose is to
3389augment the changelog, but it can be used for other documents, too.")
3390 (license license:expat)))
3391
3392(define-public python2-rst.linker
3393 (package-with-python2 python-rst.linker))
3394
f4de5b3b
CAW
3395(define-public python-feedgenerator
3396 (package
3397 (name "python-feedgenerator")
d5c183d1 3398 (version "1.9")
f4de5b3b 3399 (source
f4de5b3b 3400 (origin
f0412aa2
EF
3401 (method url-fetch)
3402 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
3403 (sha256
3404 (base32
d5c183d1 3405 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
7c88bcf4
HG
3406 (modules '((guix build utils)))
3407 (snippet
3408 '(begin
3409 ;; Remove pre-compiled .pyc files from source.
3410 (for-each delete-file-recursively
3411 (find-files "." "__pycache__" #:directories? #t))
3412 (for-each delete-file (find-files "." "\\.pyc$"))
3413 #t))))
f4de5b3b 3414 (build-system python-build-system)
dae73d9b 3415 (propagated-inputs
f3b98f4f 3416 `(("python-pytz" ,python-pytz)
f4de5b3b 3417 ("python-six" ,python-six)))
f0412aa2 3418 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
3419 (synopsis
3420 "Standalone version of Django's Atom/RSS feed generator")
3421 (description
3422 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3423which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 3424 (license license:bsd-3)))
f4de5b3b
CAW
3425
3426(define-public python2-feedgenerator
3427 (package-with-python2 python-feedgenerator))
3428
59ad30e3
CAW
3429(define-public python-blinker
3430 (package
3431 (name "python-blinker")
7fb9ff4d 3432 (version "1.4")
59ad30e3
CAW
3433 (source
3434 (origin
3435 (method url-fetch)
7fb9ff4d 3436 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
3437 (sha256
3438 (base32
7fb9ff4d 3439 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 3440 (build-system python-build-system)
59ad30e3
CAW
3441 (home-page "http://pythonhosted.org/blinker/")
3442 (synopsis "Fast, simple object-to-object and broadcast signaling")
3443 (description
3444 "Blinker provides a fast dispatching system that allows any number of
3445interested parties to subscribe to events, or \"signals\".")
3446 (license license:expat)))
3447
3448(define-public python2-blinker
3449 (package-with-python2 python-blinker))
3450
b8050e71
CAW
3451(define-public pelican
3452 (package
3453 (name "pelican")
11f97c27 3454 (version "3.6.3")
b8050e71
CAW
3455 (source
3456 (origin
3457 (method url-fetch)
11f97c27 3458 (uri (pypi-uri "pelican" version))
b8050e71
CAW
3459 (sha256
3460 (base32
11f97c27 3461 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 3462 (build-system python-build-system)
f22efa01 3463 (propagated-inputs
b8050e71
CAW
3464 `(("python-feedgenerator" ,python-feedgenerator)
3465 ("python-jinja2" ,python-jinja2)
3466 ("python-pygments" ,python-pygments)
3467 ("python-docutils" ,python-docutils)
3468 ("python-pytz" ,python-pytz)
3469 ("python-blinker" ,python-blinker)
3470 ("python-unidecode" ,python-unidecode)
3471 ("python-six" ,python-six)
22d7360b 3472 ("python-dateutil" ,python-dateutil)))
b8050e71
CAW
3473 (home-page "http://getpelican.com/")
3474 (arguments
3475 `(;; XXX Requires a lot more packages to do unit tests :P
3476 #:tests? #f
3477 #:phases (modify-phases %standard-phases
3478 (add-before
3479 'install 'adjust-requires
3480 ;; Since feedgenerator is installed from git, it doesn't
3481 ;; conform to the version requirements.
3482 ;;
3483 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3484 ;; version requirement so setuptools doesn't get confused.
3485 (lambda _
3486 (substitute* "setup.py"
3487 (("['\"]feedgenerator.*?['\"]")
3488 "'feedgenerator'")))))))
3489 (synopsis "Python-based static site publishing system")
3490 (description
3491 "Pelican is a tool to generate a static blog from reStructuredText,
3492Markdown input files, and more. Pelican uses Jinja2 for templating
3493and is very extensible.")
3f641af0 3494 (license license:agpl3+)))
b8050e71 3495
240ca4aa
RW
3496(define-public python-scikit-learn
3497 (package
3498 (name "python-scikit-learn")
d7eea7d7 3499 (version "0.19.0")
240ca4aa
RW
3500 (source
3501 (origin
3502 (method url-fetch)
3503 (uri (string-append
3504 "https://github.com/scikit-learn/scikit-learn/archive/"
3505 version ".tar.gz"))
7e21b9fb 3506 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3507 (sha256
3508 (base32
d7eea7d7 3509 "0g7q4ri75mj93wpa9bp83a3jmrf3dm5va9h7k4zkbcxr6bgqka15"))))
240ca4aa
RW
3510 (build-system python-build-system)
3511 (arguments
3512 `(#:phases
4d25c486
MB
3513 (modify-phases %standard-phases
3514 (delete 'check)
3515 (add-after 'install 'check
3516 ;; Running tests from the source directory requires
3517 ;; an "inplace" build with paths relative to CWD.
3518 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3519 ;; Use the installed version instead.
3520 (lambda* (#:key inputs outputs #:allow-other-keys)
3521 (add-installed-pythonpath inputs outputs)
3522 ;; some tests require access to "$HOME"
3523 (setenv "HOME" "/tmp")
3524 ;; Step out of the source directory just to be sure.
3525 (chdir "..")
3526 (zero? (system* "nosetests" "-v" "sklearn")))))))
240ca4aa 3527 (inputs
328bb95d
HG
3528 `(("openblas" ,openblas)))
3529 (native-inputs
8e401ab6
RW
3530 `(("python-nose" ,python-nose)
3531 ("python-cython" ,python-cython)))
240ca4aa
RW
3532 (propagated-inputs
3533 `(("python-numpy" ,python-numpy)
3534 ("python-scipy" ,python-scipy)))
3535 (home-page "http://scikit-learn.org/")
3536 (synopsis "Machine Learning in Python")
3537 (description
3538 "Scikit-learn provides simple and efficient tools for data
3539mining and data analysis.")
1b5241c5 3540 (license license:bsd-3)))
240ca4aa
RW
3541
3542(define-public python2-scikit-learn
1b5241c5 3543 (package-with-python2 python-scikit-learn))
240ca4aa 3544
12f8f9bb
RW
3545(define-public python-scikit-image
3546 (package
3547 (name "python-scikit-image")
3548 (version "0.11.3")
3549 (source
3550 (origin
3551 (method url-fetch)
3552 (uri (string-append
3553 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3554 version ".tar.gz"))
3555 (sha256
3556 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3557 (build-system python-build-system)
9026e689
MB
3558 (arguments
3559 ;; TODO: Some tests require running X11 server. Disable them?
3560 '(#:tests? #f))
b83e2333 3561 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3562 (propagated-inputs
3563 `(("python-matplotlib" ,python-matplotlib)
3564 ("python-networkx" ,python-networkx)
12f8f9bb 3565 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3566 ("python-pillow" ,python-pillow)))
3567 (native-inputs
b83e2333
HG
3568 `(("python-numpy" ,python-numpy)
3569 ("python-cython" ,python-cython)
3570 ("python-six" ,python-six)))
12f8f9bb
RW
3571 (home-page "http://scikit-image.org/")
3572 (synopsis "Image processing in Python")
3573 (description
e881752c 3574 "Scikit-image is a collection of algorithms for image processing.")
12733594 3575 (license license:bsd-3)))
12f8f9bb
RW
3576
3577(define-public python2-scikit-image
12733594 3578 (package-with-python2 python-scikit-image))
12f8f9bb 3579
5394a6a6
RW
3580(define-public python-redis
3581 (package
3582 (name "python-redis")
911a8faf 3583 (version "2.10.5")
5394a6a6
RW
3584 (source
3585 (origin
3586 (method url-fetch)
911a8faf 3587 (uri (pypi-uri "redis" version))
5394a6a6 3588 (sha256
911a8faf 3589 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
5394a6a6
RW
3590 (build-system python-build-system)
3591 ;; Tests require a running Redis server
3592 (arguments '(#:tests? #f))
cf8124b0
HG
3593 ;; As long as we are not running test, we do not need this input :-)
3594 ;;(native-inputs
3595 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3596 (home-page "https://github.com/andymccurdy/redis-py")
3597 (synopsis "Redis Python client")
3598 (description
3599 "This package provides a Python interface to the Redis key-value store.")
3600 (license license:expat)))
3601
3602(define-public python2-redis
3603 (package-with-python2 python-redis))
3604
748cef5b
RW
3605(define-public python-rq
3606 (package
3607 (name "python-rq")
eed206cb 3608 (version "0.7.1")
748cef5b
RW
3609 (source
3610 (origin
3611 (method url-fetch)
eed206cb 3612 (uri (pypi-uri "rq" version))
748cef5b 3613 (sha256
eed206cb 3614 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
748cef5b
RW
3615 (build-system python-build-system)
3616 (propagated-inputs
3617 `(("python-click" ,python-click)
3618 ("python-redis" ,python-redis)))
748cef5b
RW
3619 (home-page "http://python-rq.org/")
3620 (synopsis "Simple job queues for Python")
3621 (description
3622 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3623processing them in the background with workers. It is backed by Redis and it
3624is designed to have a low barrier to entry.")
3f641af0 3625 (license license:bsd-2)))
748cef5b
RW
3626
3627(define-public python2-rq
3628 (package-with-python2 python-rq))
3629
6888830b
FB
3630(define-public python-cython
3631 (package
3632 (name "python-cython")
e3b861ce 3633 (version "0.26")
6888830b
FB
3634 (source
3635 (origin
3636 (method url-fetch)
56918e26 3637 (uri (pypi-uri "Cython" version))
6888830b
FB
3638 (sha256
3639 (base32
e3b861ce 3640 "0riciynnr0r68cvg6r3gbhi9x7h44pdwb7926m6n5vfs5p1f492c"))))
6888830b
FB
3641 (build-system python-build-system)
3642 ;; we need the full python package and not just the python-wrapper
3643 ;; because we need libpython3.3m.so
3644 (inputs
3645 `(("python" ,python)))
3646 (arguments
3647 `(#:phases
b92f651b
EF
3648 (modify-phases %standard-phases
3649 (add-before 'check 'set-HOME
3650 ;; some tests require access to "$HOME/.cython"
e3b861ce 3651 (lambda _ (setenv "HOME" "/tmp") #t))
b92f651b
EF
3652 (replace 'check
3653 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3654 (home-page "http://cython.org/")
3655 (synopsis "C extensions for Python")
3656 (description "Cython is an optimising static compiler for both the Python
3657programming language and the extended Cython programming language. It makes
3658writing C extensions for Python as easy as Python itself.")
3f641af0 3659 (license license:asl2.0)
48b311b1 3660 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3661
3662(define-public python2-cython
48b311b1
LC
3663 (package (inherit (package-with-python2
3664 (strip-python2-variant python-cython)))
6888830b
FB
3665 (name "python2-cython")
3666 (inputs
3667 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3668
ee5fb7ee
AV
3669;; The RPython toolchain currently does not support Python 3.
3670(define-public python2-rpython
3671 (package
3672 (name "python2-rpython")
3673 (version "0.1.4")
3674 (source
3675 (origin
3676 (method url-fetch)
3677 (uri (pypi-uri "rpython" version))
3678 (sha256
3679 (base32
3680 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3681 (build-system python-build-system)
3682 (arguments `(#:python ,python-2))
3683 (native-inputs
f3b98f4f 3684 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3685 (home-page "https://rpython.readthedocs.org")
3686 (synopsis "Framework for implementing interpreters and virtual machines")
3687 (description "RPython is a translation and support framework for
3688producing implementations of dynamic languages, emphasizing a clean separation
3689between language specification and implementation aspects.")
3690 (license license:expat)))
3691
7ccb71e0 3692(define-public python-numpy
0da98533 3693 (package
7ccb71e0
TD
3694 (name "python-numpy")
3695 (version "1.12.0")
0da98533
FB
3696 (source
3697 (origin
3698 (method url-fetch)
7ccb71e0
TD
3699 (uri (string-append
3700 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3701 (file-name (string-append name "-" version ".tar.gz"))
0da98533
FB
3702 (sha256
3703 (base32
7ccb71e0 3704 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
0da98533
FB
3705 (build-system python-build-system)
3706 (inputs
328bb95d 3707 `(("openblas" ,openblas)
cba256f8 3708 ("lapack" ,lapack)))
0da98533 3709 (native-inputs
7ccb71e0
TD
3710 `(("python-cython" ,python-cython)
3711 ("python-nose" ,python-nose)
2efabc55 3712 ("gfortran" ,gfortran)))
0da98533
FB
3713 (arguments
3714 `(#:phases
2efabc55
HG
3715 (modify-phases %standard-phases
3716 (add-before 'build 'set-environment-variables
3717 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3718 (call-with-output-file "site.cfg"
3719 (lambda (port)
cba256f8
RW
3720 (format port
3721 "[openblas]
dbdfe515
RW
3722libraries = openblas
3723library_dirs = ~a/lib
3724include_dirs = ~a/include
cba256f8 3725
2efabc55
HG
3726# backslash-n to make emacs happy
3727\n[lapack]
cba256f8
RW
3728lapack_libs = lapack
3729library_dirs = ~a/lib
3730include_dirs = ~a/include
3731"
3732 (assoc-ref inputs "openblas")
3733 (assoc-ref inputs "openblas")
3734 (assoc-ref inputs "lapack")
3735 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3736 ;; Use "gcc" executable, not "cc".
3737 (substitute* "numpy/distutils/system_info.py"
3738 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3739 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3740 #t))
6a843168
FB
3741 ;; Tests can only be run after the library has been installed and not
3742 ;; within the source directory.
2efabc55
HG
3743 (delete 'check)
3744 (add-after 'install 'check
3745 (lambda* (#:key outputs inputs #:allow-other-keys)
3746 ;; Make installed package available for running the tests
3747 (add-installed-pythonpath inputs outputs)
6a843168 3748 (with-directory-excursion "/tmp"
89b5c60e 3749 (zero? (system* "python" "-c"
2efabc55 3750 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3751 (home-page "http://www.numpy.org/")
3752 (synopsis "Fundamental package for scientific computing with Python")
3753 (description "NumPy is the fundamental package for scientific computing
e881752c 3754with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3755object, sophisticated (broadcasting) functions, tools for integrating C/C++
3756and Fortran code, useful linear algebra, Fourier transform, and random number
3757capabilities.")
3f641af0 3758 (license license:bsd-3)))
0da98533 3759
7ccb71e0
TD
3760(define-public python2-numpy
3761 (package-with-python2 python-numpy))
15bfe6d6 3762
460fccd4 3763(define-public python-munch
3764 (package
3765 (name "python-munch")
3766 (version "2.0.4")
3767 (source
3768 (origin
3769 (method url-fetch)
3770 (uri (pypi-uri "munch" version))
3771 (sha256
3772 (base32
3773 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3774 (build-system python-build-system)
3775 (home-page "https://github.com/Infinidat/munch")
3776 (synopsis "Dot-accessible dictionary")
3777 (description "Munch is a dot-accessible dictionary similar to JavaScript
3778objects.")
3779 (license license:expat)))
3780
3781(define-public python2-munch
3782 (package-with-python2 python-munch))
3783
beed6abc
RW
3784(define-public python-colormath
3785 (package
3786 (name "python-colormath")
3787 (version "2.1.1")
3788 (source
3789 (origin
3790 (method url-fetch)
3791 (uri (pypi-uri "colormath" version))
3792 (sha256
3793 (base32
3794 "01wp5xwm0a89wdm1dc9rr1ij90idzdiiipxdj1yslhqzkhnjnfh0"))))
3795 (build-system python-build-system)
3796 (propagated-inputs
3797 `(("python-networkx" ,python-networkx)
3798 ("python-numpy" ,python-numpy)))
3799 (home-page "https://github.com/gtaylor/python-colormath")
3800 (synopsis "Color math and conversion library")
3801 (description
3802 "This is a Python library for color math and conversions.")
3803 (license license:bsd-3)))
3804
3805(define-public python2-colormath
3806 (package-with-python2 python-colormath))
3807
4a7d2009
RW
3808(define-public python-spectra
3809 (package
3810 (name "python-spectra")
3811 (version "0.0.8")
3812 (source
3813 (origin
3814 (method url-fetch)
3815 (uri (pypi-uri "spectra" version))
3816 (sha256
3817 (base32
3818 "0n87kzhpkml2s2q91rdkl8wz2kkv5b0bkrgww45lxa5vq34qh6w5"))))
3819 (build-system python-build-system)
3820 (arguments
3821 `(#:phases
3822 (modify-phases %standard-phases
3823 (replace 'check
3824 (lambda _
3825 (zero? (system* "nosetests" "-v")))))))
3826 (propagated-inputs
3827 `(("python-colormath" ,python-colormath)))
3828 (native-inputs
3829 `(("python-nose" ,python-nose)))
3830 (home-page "http://github.com/jsvine/spectra")
3831 (synopsis "Color scales and color conversion")
3832 (description
3833 "This package provides a Python library intended to make color math,
3834color scales, and color space conversion easy. It has support for:
3835
3836@enumerate
3837@item Color scales
3838@item Color ranges
3839@item Color blending
3840@item Brightening/darkening colors
3841@item Saturating/desaturating colors
3842@item Conversion to/from multiple color spaces.
3843@end enumerate\n")
3844 (license license:expat)))
3845
3846(define-public python2-spectra
3847 (package-with-python2 python-spectra))
3848
3a1bfe18
RW
3849(define-public python2-fastlmm
3850 (package
3851 (name "python2-fastlmm")
154d0016 3852 (version "0.2.21")
3a1bfe18
RW
3853 (source
3854 (origin
3855 (method url-fetch)
b074e7d4 3856 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3857 (sha256
3858 (base32
154d0016 3859 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3860 (build-system python-build-system)
3861 (arguments
3862 `(#:python ,python-2)) ; only Python 2.7 is supported
3863 (propagated-inputs
3864 `(("python2-numpy" ,python2-numpy)
3865 ("python2-scipy" ,python2-scipy)
3866 ("python2-matplotlib" ,python2-matplotlib)
3867 ("python2-pandas" ,python2-pandas)
3868 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3869 ("python2-pysnptools" ,python2-pysnptools)))
3870 (native-inputs
3871 `(("unzip" ,unzip)
2efabc55 3872 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3873 ("python2-mock" ,python2-mock)
3874 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3875 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3876 (synopsis "Perform genome-wide association studies on large data sets")
3877 (description
3878 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3879Models, is a program for performing both single-SNP and SNP-set genome-wide
3880association studies (GWAS) on extremely large data sets.")
3f641af0 3881 (license license:asl2.0)))
3a1bfe18 3882
7ccb71e0
TD
3883(define-public python-numpy-documentation
3884 (package
3885 (name "python-numpy-documentation")
3886 (version (package-version python-numpy))
3887 (source (package-source python-numpy))
3888 (build-system python-build-system)
2ee8869a 3889 (native-inputs
7ccb71e0
TD
3890 `(("python-matplotlib" ,python-matplotlib)
3891 ("python-numpy" ,python-numpy)
3892 ("pkg-config" ,pkg-config)
2efabc55
HG
3893 ("python-sphinx" ,python-sphinx)
3894 ("python-numpydoc" ,python-numpydoc)
8b89c171
RW
3895 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3896 texlive-fonts-ec
3897 texlive-generic-ifxetex
3898 texlive-generic-pdftex
3899 texlive-latex-amsfonts
3900 texlive-latex-capt-of
3901 texlive-latex-cmap
3902 texlive-latex-environ
3903 texlive-latex-eqparbox
3904 texlive-latex-etoolbox
3905 texlive-latex-expdlist
3906 texlive-latex-fancyhdr
3907 texlive-latex-fancyvrb
3908 texlive-latex-fncychap
3909 texlive-latex-float
3910 texlive-latex-framed
3911 texlive-latex-geometry
3912 texlive-latex-graphics
3913 texlive-latex-hyperref
3914 texlive-latex-mdwtools
3915 texlive-latex-multirow
3916 texlive-latex-oberdiek
3917 texlive-latex-parskip
3918 texlive-latex-preview
3919 texlive-latex-tabulary
3920 texlive-latex-threeparttable
3921 texlive-latex-titlesec
3922 texlive-latex-trimspaces
3923 texlive-latex-ucs
3924 texlive-latex-upquote
3925 texlive-latex-url
3926 texlive-latex-varwidth
3927 texlive-latex-wrapfig)))
2ee8869a
FB
3928 ("texinfo" ,texinfo)
3929 ("perl" ,perl)
7ccb71e0
TD
3930 ("scipy-sphinx-theme"
3931 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3932 (method git-fetch)
3933 (uri (git-reference
3934 (url "https://github.com/scipy/scipy-sphinx-theme.git")
67416769 3935 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
7ccb71e0
TD
3936 (sha256
3937 (base32
67416769 3938 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
7ccb71e0 3939 ,@(package-native-inputs python-numpy)))
2ee8869a 3940 (arguments
7ccb71e0
TD
3941 `(#:tests? #f ; we're only generating the documentation
3942 #:phases
3943 (modify-phases %standard-phases
3944 (delete 'build)
3945 (replace 'install
3946 (lambda* (#:key inputs outputs #:allow-other-keys)
3947 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3948 (doc (string-append
3949 data "/doc/" ,name "-"
3950 ,(package-version python-numpy)))
3951 (info-reader (string-append data "/info"))
3952 (html (string-append doc "/html"))
3953 (scipy-sphinx-theme "scipy-sphinx-theme")
3954 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3955 (pyver ,(string-append "PYVER=")))
8b89c171
RW
3956
3957 ;; FIXME: this is needed to for texlive-union to generate
3958 ;; fonts, which are not found.
3959 (setenv "HOME" "/tmp")
3960
7ccb71e0
TD
3961 (with-directory-excursion "doc"
3962 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3963 (mkdir-p html)
3964 (system* "make" "html" pyver)
3965 (system* "make" "latex" "PAPER=a4" pyver)
3966 (system* "make" "-C" "build/latex"
3967 "all-pdf" "PAPER=a4" pyver)
3968 ;; FIXME: Generation of the info file fails.
3969 ;; (system* "make" "info" pyver)
3970 ;; (mkdir-p info)
3971 ;; (copy-file "build/texinfo/numpy.info"
3972 ;; (string-append info "/numpy.info"))
3973 (for-each (lambda (file)
3974 (copy-file (string-append "build/latex" file)
3975 (string-append doc file)))
3976 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3977 (with-directory-excursion "build/html"
3978 (for-each (lambda (file)
3979 (let* ((dir (dirname file))
3980 (tgt-dir (string-append html "/" dir)))
3981 (unless (equal? "." dir)
3982 (mkdir-p tgt-dir))
3983 (install-file file html)))
3984 (find-files "." ".*")))))
3985 #t)))))
3986 (home-page (package-home-page python-numpy))
3987 (synopsis "Documentation for the python-numpy package")
3988 (description (package-description python-numpy))
3989 (license (package-license python-numpy))))
2ee8869a 3990
7ccb71e0
TD
3991(define-public python2-numpy-documentation
3992 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3993 (package
3994 (inherit numpy-documentation)
3995 (native-inputs `(("python2-functools32" ,python2-functools32)
3996 ,@(package-native-inputs numpy-documentation))))))
2ee8869a 3997
0151a8df 3998(define-public python-pygit2
3999 (package
4000 (name "python-pygit2")
8c0c0c4d 4001 (version "0.26.0")
0151a8df 4002 (source
4003 (origin
4004 (method url-fetch)
4005 (uri (pypi-uri "pygit2" version))
4006 (sha256
4007 (base32
8c0c0c4d 4008 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
bb6043fe
MB
4009 (patches
4010 (search-patches "python-pygit2-disable-network-tests.patch"))))
0151a8df 4011 (build-system python-build-system)
4012 (propagated-inputs
4013 `(("python-six" ,python-six)
4014 ("python-cffi" ,python-cffi)
4015 ("libgit2" ,libgit2)
4016 ("python-tox" ,python-tox)))
4017 (home-page "https://github.com/libgit2/pygit2")
4018 (synopsis "Python bindings for libgit2")
4019 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4020library, libgit2 implements Git plumbing.")
4021 ;; GPL2.0 only, with linking exception.
4022 (license license:gpl2)))
4023
4024(define-public python2-pygit2
4025 (package-with-python2 python-pygit2))
4026
15bfe6d6
FB
4027(define-public python-pyparsing
4028 (package
4029 (name "python-pyparsing")
9e5ee6b6 4030 (version "2.2.0")
15bfe6d6
FB
4031 (source
4032 (origin
4033 (method url-fetch)
de67e922
LF
4034 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
4035 "/pyparsing-" version
15bfe6d6
FB
4036 "/pyparsing-" version ".tar.gz"))
4037 (sha256
4038 (base32
9e5ee6b6 4039 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
15bfe6d6
FB
4040 (build-system python-build-system)
4041 (outputs '("out" "doc"))
4042 (arguments
4043 `(#:tests? #f ; no test target
15bfe6d6 4044 #:phases
007176e7
MB
4045 (modify-phases %standard-phases
4046 (add-after 'install 'install-doc
4047 (lambda* (#:key outputs #:allow-other-keys)
4048 (let* ((doc (string-append (assoc-ref outputs "doc")
4049 "/share/doc/" ,name "-" ,version))
4050 (html-doc (string-append doc "/html"))
4051 (examples (string-append doc "/examples")))
4052 (mkdir-p html-doc)
4053 (mkdir-p examples)
4054 (for-each
4055 (lambda (dir tgt)
4056 (map (lambda (file)
4057 (install-file file tgt))
4058 (find-files dir ".*")))
4059 (list "docs" "htmldoc" "examples")
4060 (list doc html-doc examples))
4061 #t))))))
15bfe6d6
FB
4062 (home-page "http://pyparsing.wikispaces.com")
4063 (synopsis "Python parsing class library")
4064 (description
4065 "The pyparsing module is an alternative approach to creating and
4066executing simple grammars, vs. the traditional lex/yacc approach, or the use
4067of regular expressions. The pyparsing module provides a library of classes
4068that client code uses to construct the grammar directly in Python code.")
bd3fa666 4069 (license license:expat)))
15bfe6d6
FB
4070
4071(define-public python2-pyparsing
4072 (package-with-python2 python-pyparsing))
4073
ec00de35
FB
4074(define-public python-numpydoc
4075 (package
4076 (name "python-numpydoc")
4077 (version "0.5")
4078 (source
4079 (origin
4080 (method url-fetch)
89b5c60e 4081 (uri (string-append
ec00de35
FB
4082 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
4083 version ".tar.gz"))
4084 (sha256
4085 (base32
5e4d8f67
AE
4086 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
4087 (modules '((guix build utils)))
4088 (snippet
4089 '(begin
4090 ;; Drop a test requiring matplotlib, which we cannot add as an
4091 ;; input since it would create a circular dependency: Extend the
4092 ;; test for Python 3, where it is already dropped, to Python 2.
4093 (substitute* "numpydoc/tests/test_plot_directive.py"
4094 (("3") "2"))))))
ec00de35 4095 (build-system python-build-system)
fe4a8da4 4096 (propagated-inputs
213d1745
HG
4097 `(("python-sphinx" ,python-sphinx)))
4098 (native-inputs
4099 `(("python-nose" ,python-nose)))
ec00de35
FB
4100 (home-page "https://pypi.python.org/pypi/numpydoc")
4101 (synopsis
4102 "Numpy's Sphinx extensions")
4103 (description
4104 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 4105 (license license:bsd-2)))
ec00de35
FB
4106
4107(define-public python2-numpydoc
5e4d8f67 4108 (package-with-python2 python-numpydoc))
1c65314c 4109
1e656049
RW
4110(define-public python-numexpr
4111 (package
4112 (name "python-numexpr")
2ee57340 4113 (version "2.6.1")
1e656049
RW
4114 (source
4115 (origin
4116 (method url-fetch)
26112c0a 4117 (uri (pypi-uri "numexpr" version))
1e656049
RW
4118 (sha256
4119 (base32
2ee57340 4120 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
1e656049
RW
4121 (build-system python-build-system)
4122 (arguments `(#:tests? #f)) ; no tests included
4123 (propagated-inputs
4124 `(("python-numpy" ,python-numpy)))
4125 (home-page "https://github.com/pydata/numexpr")
4126 (synopsis "Fast numerical expression evaluator for NumPy")
4127 (description
4128 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4129expressions that operate on arrays are accelerated and use less memory than
4130doing the same calculation in Python. In addition, its multi-threaded
4131capabilities can make use of all your cores, which may accelerate
4132computations, most specially if they are not memory-bounded (e.g. those using
4133transcendental functions).")
f210e944 4134 (license license:expat)))
1e656049
RW
4135
4136(define-public python2-numexpr
f210e944 4137 (package-with-python2 python-numexpr))
1e656049 4138
361d982c
MB
4139(define-public python-cycler
4140 (package
4141 (name "python-cycler")
4142 (version "0.10.0")
4143 (source (origin
4144 (method url-fetch)
4145 (uri (pypi-uri "cycler" version))
4146 (sha256
4147 (base32
4148 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4149 (build-system python-build-system)
4150 (arguments
4151 ;; XXX: The current version requires 'coveralls' which we don't have.
4152 ;; Enable this for the next release which uses 'python-pytest'.
4153 '(#:tests? #f))
4154 (propagated-inputs
4155 `(("python-six" ,python-six)))
4156 (home-page "http://matplotlib.org/cycler/")
4157 (synopsis "Composable keyword argument iterator")
4158 (description
4159 "When using @code{matplotlib} and plotting more than one line, it is
4160common to want to be able to want to be able to cycle over one or more artist
4161styles; but the plotting logic can quickly become involved.
4162To address this and enable easy cycling over arbitrary @code{kwargs}, the
4163@code{Cycler} class was developed.")
4164 (license license:bsd-3)))
4165
4166(define-public python2-cycler
4167 (package-with-python2 python-cycler))
4168
2aa6d3ae
TD
4169(define-public python-colorspacious
4170 (package
4171 (name "python-colorspacious")
4172 (version "1.1.0")
4173 (source
4174 (origin
4175 (method url-fetch)
4176 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
4177 version ".tar.gz"))
4178 (file-name (string-append name "-" version))
4179 (sha256
4180 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
4181 (build-system python-build-system)
4182 (propagated-inputs
4183 `(("python-numpy" ,python-numpy)))
ba062b3e
TD
4184 (native-inputs
4185 `(("python-nose" ,python-nose)))
4186 (arguments
4187 `(#:phases
4188 (modify-phases %standard-phases
4189 (replace 'check
4190 (lambda _
4191 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
2aa6d3ae
TD
4192 (home-page "https://github.com/njsmith/colorspacious")
4193 (synopsis "Python library for colorspace conversions")
4194 (description "@code{colorspacious} is a Python library that lets you
4195convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4196 (license license:expat)))
4197
4198(define-public python2-colorspacious
4199 (package-with-python2 python-colorspacious))
4200
1c65314c
FB
4201(define-public python-matplotlib
4202 (package
4203 (name "python-matplotlib")
71d20587 4204 (version "2.0.2")
1c65314c
FB
4205 (source
4206 (origin
4207 (method url-fetch)
71d20587 4208 (uri (pypi-uri "matplotlib" version))
1c65314c
FB
4209 (sha256
4210 (base32
71d20587 4211 "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg"))))
1c65314c 4212 (build-system python-build-system)
25f9a068 4213 (propagated-inputs ; the following packages are all needed at run time
4535a93a
TD
4214 `(("python-cycler" ,python-cycler)
4215 ("python-pyparsing" ,python-pyparsing)
25f9a068
FB
4216 ("python-pygobject" ,python-pygobject)
4217 ("gobject-introspection" ,gobject-introspection)
1bbc659f 4218 ("python-tkinter" ,python "tk")
22d7360b 4219 ("python-dateutil" ,python-dateutil)
7ccb71e0 4220 ("python-numpy" ,python-numpy)
ca33a3ad
HG
4221 ("python-pillow" ,python-pillow)
4222 ("python-pytz" ,python-pytz)
4223 ("python-six" ,python-six)
25f9a068
FB
4224 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
4225 ;; from 'gtk+') provides the required 'typelib' files used by
4226 ;; 'gobject-introspection'. The location of these files is set with the
4227 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
4228 ;; is done automatically by a 'native-search-path' procedure. However,
4229 ;; at run-time the user must set this variable as follows:
4230 ;;
4231 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
4232 ("gtk+" ,gtk+)
4233 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4234 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4235 ;; object. For this reason we need to import both libraries.
4236 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
4237 ("python-pycairo" ,python-pycairo)
4238 ("python-cairocffi" ,python-cairocffi)))
1c65314c 4239 (inputs
ca33a3ad 4240 `(("libpng" ,libpng)
1c65314c
FB
4241 ("imagemagick" ,imagemagick)
4242 ("freetype" ,freetype)
25f9a068
FB
4243 ("cairo" ,cairo)
4244 ("glib" ,glib)
1c65314c 4245 ;; FIXME: Add backends when available.
1c65314c 4246 ;("python-wxpython" ,python-wxpython)
4535a93a 4247 ("python-pyqt" ,python-pyqt)
1bbc659f
FB
4248 ("tcl" ,tcl)
4249 ("tk" ,tk)))
1c65314c
FB
4250 (native-inputs
4251 `(("pkg-config" ,pkg-config)
ca33a3ad 4252 ("python-nose" ,python-nose)
4535a93a 4253 ("python-mock" ,python-mock)))
1c65314c
FB
4254 (arguments
4255 `(#:phases
42b7009a
DM
4256 (modify-phases %standard-phases
4257 (add-before 'build 'configure-environment
4258 (lambda* (#:key outputs inputs #:allow-other-keys)
4259 (let ((cairo (assoc-ref inputs "cairo"))
4260 (gtk+ (assoc-ref inputs "gtk+")))
4261 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
4262 ;; has not effect.
4263 (setenv "LD_LIBRARY_PATH"
4264 (string-append cairo "/lib:" gtk+ "/lib"))
4265 (setenv "HOME" (getcwd))
4266 (call-with-output-file "setup.cfg"
4267 (lambda (port)
4268 (format port "[directories]~%
1bbc659f 4269basedirlist = ~a,~a~%
57b7b8cd 4270 [rc_options]~%
1bbc659f
FB
4271backend = TkAgg~%"
4272 (assoc-ref inputs "tcl")
4535a93a
TD
4273 (assoc-ref inputs "tk")))))
4274 #t)))))
1c65314c
FB
4275 (home-page "http://matplotlib.org")
4276 (synopsis "2D plotting library for Python")
4277 (description
4278 "Matplotlib is a Python 2D plotting library which produces publication
4279quality figures in a variety of hardcopy formats and interactive environments
4280across platforms. Matplotlib can be used in Python scripts, the python and
4281ipython shell, web application servers, and six graphical user interface
4282toolkits.")
3f641af0 4283 (license license:psfl)
57b7b8cd 4284 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 4285
764c077b 4286(define-public python2-matplotlib
57b7b8cd
LC
4287 (let ((matplotlib (package-with-python2
4288 (strip-python2-variant python-matplotlib))))
764c077b 4289 (package (inherit matplotlib)
88c26834
AE
4290 ;; Make sure to use special packages for Python 2 instead
4291 ;; of those automatically rewritten by package-with-python2.
89b5c60e 4292 (propagated-inputs
7ca0dbc3 4293 `(("python2-pycairo" ,python2-pycairo)
4535a93a 4294 ("python2-functools32" ,python2-functools32)
764c077b 4295 ("python2-pygobject-2" ,python2-pygobject-2)
4535a93a 4296 ("python2-subprocess32" ,python2-subprocess32)
1bbc659f
FB
4297 ("python2-tkinter" ,python-2 "tk")
4298 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4299 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 4300
4535a93a
TD
4301(define-public python-matplotlib-documentation
4302 (package
4303 (name "python-matplotlib-documentation")
4304 (version (package-version python-matplotlib))
4305 (source (package-source python-matplotlib))
4306 (build-system python-build-system)
4307 (native-inputs
4308 `(("python-matplotlib" ,python-matplotlib)
4309 ("python-colorspacious" ,python-colorspacious)
4310 ("python-sphinx" ,python-sphinx)
4311 ("python-numpydoc" ,python-numpydoc)
4312 ("python-ipython" ,python-ipython)
1eaaea41
TD
4313 ("python-mock" ,python-mock)
4314 ("graphviz" ,graphviz)
4535a93a
TD
4315 ("texlive" ,texlive)
4316 ("texinfo" ,texinfo)
4317 ,@(package-native-inputs python-matplotlib)))
4318 (arguments
4319 `(#:tests? #f ; we're only generating documentation
4320 #:phases
4321 (modify-phases %standard-phases
1eaaea41
TD
4322 (replace 'build
4323 (lambda _
4324 (chdir "doc")
4325 ;; Produce pdf in 'A4' format.
4326 (substitute* "conf.py"
4327 (("latex_paper_size = 'letter'") "")
4328 ;; latex_paper_size is deprecated -> set paper size using
4329 ;; latex_elements
4330 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4331 ;; insert at a point where latex_elements{} is defined:
4332 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4333 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4535a93a 4334 (replace 'install
42b7009a 4335 (lambda* (#:key inputs outputs #:allow-other-keys)
4535a93a 4336 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
1eaaea41 4337 (doc (string-append data "/doc/python-matplotlib-" ,version))
42b7009a
DM
4338 (info (string-append data "/info"))
4339 (html (string-append doc "/html")))
1eaaea41
TD
4340 (mkdir-p html)
4341 (mkdir-p info)
4342 (copy-recursively "build/html" html)
4343 (symlink (string-append html "/_images")
4344 (string-append info "/matplotlib-figures"))
4345 (with-directory-excursion "build/texinfo"
4346 (substitute* "matplotlib.texi"
4347 (("@image\\{([^,]*)" all file)
4348 (string-append "@image{matplotlib-figures/" file)))
18b31516 4349 (symlink (string-append html "/_images")
1eaaea41
TD
4350 "./matplotlib-figures")
4351 (system* "makeinfo" "--no-split"
4352 "-o" "matplotlib.info" "matplotlib.texi"))
4353 (copy-file "build/texinfo/matplotlib.info"
4354 (string-append info "/matplotlib.info"))
4355 (copy-file "build/latex/Matplotlib.pdf"
4356 (string-append doc "/Matplotlib.pdf")))
4535a93a
TD
4357 #t)))))
4358 (home-page (package-home-page python-matplotlib))
4359 (synopsis "Documentation for the python-matplotlib package")
4360 (description (package-description python-matplotlib))
4361 (license (package-license python-matplotlib))))
1c65314c 4362
4535a93a
TD
4363(define-public python2-matplotlib-documentation
4364 (package-with-python2 python-matplotlib-documentation))
94914805 4365
0dde6232
RW
4366(define-public python2-pysnptools
4367 (package
4368 (name "python2-pysnptools")
a800018e 4369 (version "0.3.9")
0dde6232
RW
4370 (source
4371 (origin
4372 (method url-fetch)
3f2e9675 4373 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
4374 (sha256
4375 (base32
a800018e 4376 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
4377 (build-system python-build-system)
4378 (arguments
4379 `(#:python ,python-2)) ; only Python 2.7 is supported
4380 (propagated-inputs
4381 `(("python2-numpy" ,python2-numpy)
4382 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
4383 ("python2-pandas" ,python2-pandas)))
4384 (native-inputs
4385 `(("python2-cython" ,python2-cython)))
0dde6232 4386 (native-inputs
f3b98f4f 4387 `(("unzip" ,unzip)))
0dde6232
RW
4388 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4389 (synopsis "Library for reading and manipulating genetic data")
4390 (description
4391 "PySnpTools is a library for reading and manipulating genetic data. It
4392can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4393those files. It can also efficiently manipulate ranges of integers using set
4394operators such as union, intersection, and difference.")
3f641af0 4395 (license license:asl2.0)))
0dde6232 4396
c9b1b4f9
RW
4397(define-public python-rpy2
4398 (package
4399 (name "python-rpy2")
deee5dda 4400 (version "2.9.0")
c9b1b4f9
RW
4401 (source
4402 (origin
4403 (method url-fetch)
ec3bcbc7 4404 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
4405 (sha256
4406 (base32
deee5dda 4407 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
c9b1b4f9 4408 (build-system python-build-system)
444464ec 4409 (arguments
deee5dda
RW
4410 '(#:modules ((ice-9 ftw)
4411 (srfi srfi-1)
4412 (srfi srfi-26)
4413 (guix build utils)
4414 (guix build python-build-system))
4415 #:phases
444464ec 4416 (modify-phases %standard-phases
deee5dda
RW
4417 ;; Without this phase the test loader cannot find the directories, in
4418 ;; which it is supposed to look for test files.
4419 (add-after 'unpack 'fix-tests
4420 (lambda* (#:key outputs #:allow-other-keys)
4421 (substitute* "rpy/tests.py"
4422 (("loader.discover\\(")
4423 "loader.discover(rpy_root + '/' +"))
4424 #t))
4425 (replace 'check
444464ec 4426 (lambda* (#:key outputs inputs #:allow-other-keys)
deee5dda
RW
4427 (let ((cwd (getcwd)))
4428 (setenv "PYTHONPATH"
4429 (string-append cwd "/build/"
4430 (find (cut string-prefix? "lib" <>)
4431 (scandir (string-append cwd "/build")))
4432 ":"
4433 (getenv "PYTHONPATH"))))
444464ec 4434 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
482d9591 4435 (propagated-inputs
deee5dda
RW
4436 `(("python-six" ,python-six)
4437 ("python-jinja2" ,python-jinja2)
4438 ("python-pytz" ,python-pytz)))
c9b1b4f9 4439 (inputs
482d9591 4440 `(("readline" ,readline)
c9b1b4f9
RW
4441 ("icu4c" ,icu4c)
4442 ("pcre" ,pcre)
2d7c4ae3 4443 ("r-minimal" ,r-minimal)
deee5dda
RW
4444 ("r-survival" ,r-survival)
4445 ("r-ggplot2" ,r-ggplot2)
4446 ("r-rsqlite" ,r-rsqlite)
4447 ("r-dplyr" ,r-dplyr)
4448 ("r-dbplyr" ,r-dbplyr)
4449 ("python-numpy" ,python-numpy)))
c9b1b4f9 4450 (native-inputs
f3b98f4f 4451 `(("zlib" ,zlib)))
c9b1b4f9
RW
4452 (home-page "http://rpy.sourceforge.net/")
4453 (synopsis "Python interface to the R language")
4454 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4455low-level interface to R from Python, a proposed high-level interface,
4456including wrappers to graphical libraries, as well as R-like structures and
4457functions.")
c92483bd
RW
4458 ;; Any of these licenses can be picked for the R interface. The whole
4459 ;; project is released under GPLv2+ according to the license declaration
4460 ;; in "setup.py".
4461 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
c9b1b4f9 4462
bb986599
FB
4463(define-public python-scipy
4464 (package
4465 (name "python-scipy")
09efef33 4466 (version "0.19.1")
bb986599
FB
4467 (source
4468 (origin
4469 (method url-fetch)
09efef33 4470 (uri (pypi-uri "scipy" version))
bb986599
FB
4471 (sha256
4472 (base32
09efef33 4473 "1rl411bvla6q7qfdb47fpdnyjhfgzl6smpha33n9ar1klykjr6m1"))))
bb986599 4474 (build-system python-build-system)
dd86c0d1 4475 (propagated-inputs
bb986599
FB
4476 `(("python-numpy" ,python-numpy)
4477 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
4478 ("python-pyparsing" ,python-pyparsing)))
4479 (inputs
4480 `(("lapack" ,lapack)
719b01c1 4481 ("openblas" ,openblas)))
bb986599 4482 (native-inputs
35093253
TD
4483 `(("python-cython" ,python-cython)
4484 ("python-nose" ,python-nose)
dd86c0d1 4485 ("python-sphinx" ,python-sphinx)
5248d49e 4486 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 4487 ("gfortran" ,gfortran)
bb986599
FB
4488 ("perl" ,perl)))
4489 (outputs '("out" "doc"))
4490 (arguments
4491 `(#:phases
16ca6aaa 4492 (modify-phases %standard-phases
16ca6aaa
MB
4493 (add-before 'build 'configure-openblas
4494 (lambda* (#:key inputs #:allow-other-keys)
4495 (call-with-output-file "site.cfg"
4496 (lambda (port)
4497 (format port
4498 "[blas]
719b01c1
RW
4499libraries = openblas
4500library_dirs = ~a/lib
4501include_dirs = ~a/include
d548e6aa
HG
4502
4503# backslash-n to make emacs happy
4504\n[atlas]
719b01c1
RW
4505library_dirs = ~a/lib
4506atlas_libs = openblas
4507"
16ca6aaa
MB
4508 (assoc-ref inputs "openblas")
4509 (assoc-ref inputs "openblas")
4510 (assoc-ref inputs "openblas"))))
db967b64 4511 #t))
35093253
TD
4512 (add-after 'install 'install-doc
4513 (lambda* (#:key inputs outputs #:allow-other-keys)
4514 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4515 (doc (string-append data "/doc/" ,name "-" ,version))
4516 (html (string-append doc "/html"))
4517 (pyver ,(string-append "PYVER=")))
4518 ;; Make installed package available for building the
4519 ;; documentation
4520 (add-installed-pythonpath inputs outputs)
4521 (with-directory-excursion "doc"
4522 ;; Fix generation of images for mathematical expressions.
4523 (substitute* (find-files "source" "conf\\.py")
4524 (("pngmath_use_preview = True")
4525 "pngmath_use_preview = False"))
4526 (mkdir-p html)
4527 (system* "make" "html" pyver)
4528 (with-directory-excursion "build/html"
4529 (for-each (lambda (file)
4530 (let* ((dir (dirname file))
4531 (tgt-dir (string-append html "/" dir)))
4532 (install-file file html)))
4533 (find-files "." ".*")))))
4534 #t))
4535 (add-after 'unpack 'fix-tests
4536 (lambda _
4537 (substitute* "scipy/integrate/tests/test_quadpack.py"
4538 (("libm.so") "libm.so.6"))
4539 #t))
4540 ;; Tests can only be run after the library has been installed and not
4541 ;; within the source directory.
4542 (delete 'check)
4543 (add-after 'install 'check
4544 (lambda* (#:key inputs outputs #:allow-other-keys)
d548e6aa 4545 (add-installed-pythonpath inputs outputs)
35093253
TD
4546 (with-directory-excursion "/tmp"
4547 (zero? (system* "python" "-c"
4548 "import scipy; scipy.test('full')")))
4549 #t)))))
bb986599
FB
4550 (home-page "http://www.scipy.org/")
4551 (synopsis "The Scipy library provides efficient numerical routines")
4552 (description "The SciPy library is one of the core packages that make up
4553the SciPy stack. It provides many user-friendly and efficient numerical
4554routines such as routines for numerical integration and optimization.")
9200fe14 4555 (properties `((python2-variant . ,(delay python2-scipy))))
3f641af0 4556 (license license:bsd-3)))
bb986599 4557
764c077b 4558(define-public python2-scipy
35093253
TD
4559 (package-with-python2
4560 (strip-python2-variant python-scipy)))
bb986599 4561
e537c917
CB
4562(define-public python-sockjs-tornado
4563 (package
4564 (name "python-sockjs-tornado")
4565 (version "1.0.3")
4566 (source
4567 (origin
4568 (method url-fetch)
4569 (uri (pypi-uri "sockjs-tornado" version))
4570 (sha256
4571 (base32
4572 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4573 (build-system python-build-system)
4574 (arguments
4575 `(;; There are no tests, and running the test phase requires missing
4576 ;; dependencies
4577 #:tests? #f))
4578 (propagated-inputs
4579 `(("python-tornado" ,python-tornado)))
4580 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4581 (synopsis
4582 "SockJS python server implementation on top of Tornado framework")
4583 (description
4584 "SockJS-tornado provides the server side counterpart to a SockJS client
4585library, through the Tornado framework.
4586
4587SockJS provides a low latency, full duplex, cross-domain communication channel
4588between a web browser and web server.")
4589 (license license:expat)))
4590
4591(define-public python2-sockjs-tornado
4592 (package-with-python2 python-sockjs-tornado))
4593
73acc193 4594(define-public python-socksipy-branch
4595 (package
4596 (name "python-socksipy-branch")
4597 (version "1.01")
4598 (source
4599 (origin
4600 (method url-fetch)
4601 (uri (pypi-uri "SocksiPy-branch" version))
4602 (sha256
4603 (base32
4604 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4605 (build-system python-build-system)
4606 (arguments
4607 `(#:tests? #f)) ; There are no tests
4608 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4609 (synopsis "Python SOCKS module")
4610 (description
4611 "SocksiPy - A Python SOCKS client module. It provides a
4612socket-like interface that supports connections to any TCP
4613service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4614The original version was developed by Dan Haim, this is a
4615branch created by Mario Vilas to address some open issues,
4616as the original project seems to have been abandoned circa 2007.")
4617 (license license:bsd-3)))
4618
4619(define-public python2-socksipy-branch
4620 (package-with-python2 python-socksipy-branch))
4621
94914805
EB
4622(define-public python-sqlalchemy
4623 (package
4624 (name "python-sqlalchemy")
a4ba286b 4625 (version "1.0.12")
94914805
EB
4626 (source
4627 (origin
4628 (method url-fetch)
4629 (uri (string-append "https://pypi.python.org/packages/source/S/"
4630 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4631 (sha256
4632 (base32
a4ba286b 4633 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
4634 (build-system python-build-system)
4635 (native-inputs
4636 `(("python-cython" ,python-cython) ;for c extensions
4637 ("python-pytest" ,python-pytest)
4638 ("python-mock" ,python-mock))) ;for tests
4639 (arguments
4640 `(#:phases (alist-replace
4641 'check
4642 (lambda _ (zero? (system* "py.test")))
4643 %standard-phases)))
4644 (home-page "http://www.sqlalchemy.org")
4645 (synopsis "Database abstraction library")
4646 (description
4647 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4648gives application developers the full power and flexibility of SQL. It
4649provides a full suite of well known enterprise-level persistence patterns,
4650designed for efficient and high-performing database access, adapted into a
4651simple and Pythonic domain language.")
3f641af0 4652 (license license:x11)))
94914805
EB
4653
4654(define-public python2-sqlalchemy
4655 (package-with-python2 python-sqlalchemy))
c937562e 4656
4a093330
DM
4657(define-public python-pycodestyle
4658 (package
4659 (name "python-pycodestyle")
9b801661 4660 (version "2.3.1")
4a093330
DM
4661 (source
4662 (origin
4663 (method url-fetch)
4664 (uri (pypi-uri "pycodestyle" version))
4665 (sha256
4666 (base32
9b801661 4667 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
4a093330
DM
4668 (build-system python-build-system)
4669 (home-page "https://pycodestyle.readthedocs.io/")
4670 (synopsis "Python style guide checker")
4671 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4672Python code against some of the style conventions in
4673@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 4674 (license license:expat)))
4a093330
DM
4675
4676(define-public python2-pycodestyle
f210e944 4677 (package-with-python2 python-pycodestyle))
b91912c4
DM
4678
4679(define-public python-orderedmultidict
4680 (package
4681 (name "python-orderedmultidict")
9e2802cb 4682 (version "0.7.11")
b91912c4
DM
4683 (source
4684 (origin
4685 (method url-fetch)
4686 (uri (pypi-uri "orderedmultidict" version))
4687 (sha256
4688 (base32
9e2802cb 4689 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
b91912c4
DM
4690 (build-system python-build-system)
4691 (arguments
4692 `(#:phases
4693 (modify-phases %standard-phases
4694 (add-after 'unpack 'fix-tests
4695 (lambda _
4696 ;; The package uses nosetest for running the tests.
4697 ;; Adding this initfile allows to run the test suite
4698 ;; without requiring nosetest.
4699 (zero? (system* "touch" "tests/__init__.py")))))))
4700 (propagated-inputs
4701 `(("python-six" ,python-six)))
4702 (native-inputs
4703 `(("python-pycodestyle" ,python-pycodestyle)))
4704 (home-page "https://github.com/gruns/orderedmultidict")
4705 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4706 (description "This package contains a library for ordered multivalue
4707dictionaries. A multivalue dictionary is a dictionary that can store
4708multiple values for the same key. An ordered multivalue dictionary is a
4709multivalue dictionary that retains the order of insertions and deletions.")
f210e944 4710 (license license:unlicense)))
b91912c4
DM
4711
4712(define-public python2-orderedmultidict
f210e944 4713 (package-with-python2 python-orderedmultidict))
9dede065
DM
4714
4715(define-public python-furl
4716 (package
4717 (name "python-furl")
4718 (version "0.5.6")
4719 (source
4720 (origin
4721 (method url-fetch)
4722 (uri (pypi-uri "furl" version))
4723 (sha256
4724 (base32
4725 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4726 (build-system python-build-system)
4727 (propagated-inputs
4728 `(("python-six" ,python-six)
4729 ("python-orderedmultidict" ,python-orderedmultidict)))
4730 (native-inputs
4731 `(("python-pycodestyle" ,python-pycodestyle)))
4732 (home-page "https://github.com/gruns/furl")
4733 (synopsis "URL manipulation in Python")
4734 (description "Furl provides an easy-to-use alternative to the
4735@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 4736 (license license:unlicense)))
9dede065
DM
4737
4738(define-public python2-furl
f210e944 4739 (package-with-python2 python-furl))
462bf271 4740
4e52739c
MB
4741(define-public python-flaky
4742 (package
4743 (name "python-flaky")
4744 (version "3.4.0")
4745 (source (origin
4746 (method url-fetch)
4747 (uri (pypi-uri "flaky" version))
4748 (sha256
4749 (base32
4750 "18pkmf79rfkfpy1d2rrx3v55nxj762ilyk9rvd6s6dccxw58imsa"))))
4751 (build-system python-build-system)
4752 (arguments
4753 ;; TODO: Tests require 'coveralls' and 'genty' which are not in Guix yet.
4754 '(#:tests? #f))
4755 (home-page "https://github.com/box/flaky")
4756 (synopsis "Automatically rerun flaky tests")
4757 (description
4758 "Flaky is a plugin for @code{nose} or @code{py.test} that automatically
4759reruns flaky tests.
4760
4761Ideally, tests reliably pass or fail, but sometimes test fixtures must rely
4762on components that aren't 100% reliable. With flaky, instead of removing
f1ddfe4f 4763those tests or marking them to @code{@@skip}, they can be automatically
4e52739c
MB
4764retried.")
4765 (license license:asl2.0)))
4766
4767(define-public python2-flaky
4768 (package-with-python2 python-flaky))
4769
462bf271
DM
4770(define-public python-flask-babel
4771 (package
4772 (name "python-flask-babel")
4773 (version "0.11.1")
4774 (source
4775 (origin
4776 (method url-fetch)
4777 (uri (pypi-uri "Flask-Babel" version))
4778 (sha256
4779 (base32
4780 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4781 (build-system python-build-system)
4782 (propagated-inputs
4783 `(("python-flask" ,python-flask)
4784 ("python-babel" ,python-babel)
4785 ("python-jinja2" ,python-jinja2)
4786 ("python-pytz" ,python-pytz)))
4787 (home-page "https://github.com/python-babel/flask-babel")
4788 (synopsis "Add i18n/l10n support to Flask applications")
4789 (description "This package implements internationalization and localization
4790support for Flask. This is based on the Python babel module as well as pytz -
4791both of which are installed automatically if you install this library.")
f210e944 4792 (license license:bsd-3)))
462bf271
DM
4793
4794(define-public python2-flask-babel
f210e944 4795 (package-with-python2 python-flask-babel))
4a093330 4796
de2966cf
EF
4797(define-public python-sqlalchemy-utils
4798 (package
4799 (name "python-sqlalchemy-utils")
fd2662e9 4800 (version "0.32.13")
de2966cf
EF
4801 (source
4802 (origin
4803 (method url-fetch)
4804 (uri (pypi-uri "SQLAlchemy-Utils" version))
4805 (sha256
4806 (base32
fd2662e9 4807 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
de2966cf 4808 (build-system python-build-system)
35d56b7b
MB
4809 (arguments
4810 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4811 ;; #:phases
4812 ;; (modify-phases %standard-phases
4813 ;; (replace 'check
4814 ;; (lambda _
4815 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
c22b4f87 4816 (propagated-inputs
de2966cf
EF
4817 `(("python-six" ,python-six)
4818 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb 4819 (native-inputs
22d7360b 4820 `(("python-dateutil" ,python-dateutil)
35d56b7b
MB
4821 ("python-flexmock" ,python-flexmock)
4822 ("python-psycopg2" ,python-psycopg2)
4823 ("python-pytest" ,python-pytest)
4824 ("python-pytz" ,python-pytz)))
de2966cf
EF
4825 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4826 (synopsis "Various utility functions for SQLAlchemy")
4827 (description
4828 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4829for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4830
4831You might also want to install the following optional dependencies:
4832@enumerate
4833@item @code{python-passlib}
4834@item @code{python-babel}
4835@item @code{python-cryptography}
4836@item @code{python-pytz}
4837@item @code{python-psycopg2}
4838@item @code{python-furl}
4839@item @code{python-flask-babel}
4840@end enumerate
4841")
de2966cf
EF
4842 (license license:bsd-3)))
4843
4844(define-public python2-sqlalchemy-utils
f210e944 4845 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4846
af5a4602
CAW
4847(define-public python-alembic
4848 (package
4849 (name "python-alembic")
4418990d 4850 (version "0.8.10")
af5a4602
CAW
4851 (source
4852 (origin
4853 (method url-fetch)
4854 (uri (pypi-uri "alembic" version))
4855 (sha256
4856 (base32
4418990d 4857 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
af5a4602
CAW
4858 (build-system python-build-system)
4859 (native-inputs
4860 `(("python-mock" ,python-mock)
4861 ("python-pytest-cov" ,python-pytest-cov)))
4862 (propagated-inputs
4863 `(("python-sqlalchemy" ,python-sqlalchemy)
4864 ("python-mako" ,python-mako)
4865 ("python-editor" ,python-editor)))
4866 (home-page "http://bitbucket.org/zzzeek/alembic")
4867 (synopsis
4868 "Database migration tool for SQLAlchemy")
4869 (description
4870 "Alembic is a lightweight database migration tool for usage with the
4871SQLAlchemy Database Toolkit for Python.")
f210e944 4872 (license license:expat)))
af5a4602
CAW
4873
4874(define-public python2-alembic
f210e944 4875 (package-with-python2 python-alembic))
af5a4602 4876
138adbbe
TD
4877(define-public python-autopep8
4878 (package
4879 (name "python-autopep8")
4880 (version "1.2.4")
4881 (source
4882 (origin
4883 (method url-fetch)
4884 (uri (pypi-uri "autopep8" version))
4885 (sha256
4886 (base32
4887 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4888 (build-system python-build-system)
4889 (propagated-inputs
4890 `(("python-pep8" ,python-pep8)))
4891 (home-page "https://github.com/hhatto/autopep8")
4892 (synopsis "Format Python code according to the PEP 8 style guide")
4893 (description
4894 "@code{autopep8} automatically formats Python code to conform to
4895the PEP 8 style guide. It uses the pycodestyle utility to determine
4896what parts of the code needs to be formatted. @code{autopep8} is
4897capable of fixing most of the formatting issues that can be reported
4898by pycodestyle.")
4899 (license (license:non-copyleft
4900 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4901
4902(define-public python2-autopep8
4903 (package-with-python2 python-autopep8))
4904
1671c07c
EB
4905(define-public python-distutils-extra
4906 (package
4907 (name "python-distutils-extra")
4908 (version "2.38")
4909 (source
4910 (origin
4911 (method url-fetch)
4912 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4913 version "/+download/python-distutils-extra-"
4914 version ".tar.gz"))
4915 (sha256
4916 (base32
4917 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4918 (build-system python-build-system)
1671c07c
EB
4919 (home-page "https://launchpad.net/python-distutils-extra/")
4920 (synopsis "Enhancements to Python's distutils")
4921 (description
4922 "The python-distutils-extra module enables you to easily integrate
4923gettext support, themed icons, and scrollkeeper-based documentation into
4924Python's distutils.")
3f641af0 4925 (license license:gpl2)))
1671c07c
EB
4926
4927(define-public python2-distutils-extra
4928 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4929
4930(define-public python2-elib.intl
4931 (package
4932 (name "python2-elib.intl")
4933 (version "0.0.3")
4934 (source
4935 (origin
4936 ;; This project doesn't tag releases or publish tarballs, so we take
4937 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4938 (method git-fetch)
4939 (uri (git-reference
4940 (url "https://github.com/dieterv/elib.intl.git")
4941 (commit "d09997cfef")))
4942 (sha256
4943 (base32
4944 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4945 (build-system python-build-system)
ea5456c8
EB
4946 (arguments
4947 ;; incompatible with Python 3 (exception syntax)
4948 `(#:python ,python-2
b41a05ce 4949 #:tests? #f))
ea5456c8
EB
4950 (home-page "https://github.com/dieterv/elib.intl")
4951 (synopsis "Enhanced internationalization for Python")
4952 (description
4953 "The elib.intl module provides enhanced internationalization (I18N)
4954services for your Python modules and applications.")
3f641af0 4955 (license license:lgpl3+)))
ea5456c8 4956
c937562e
EB
4957(define-public python-pillow
4958 (package
4959 (name "python-pillow")
aba5182c 4960 (version "3.3.3")
c937562e
EB
4961 (source
4962 (origin
4963 (method url-fetch)
f1d9231d 4964 (uri (pypi-uri "Pillow" version))
a9681c74 4965 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
c937562e
EB
4966 (sha256
4967 (base32
aba5182c 4968 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4969 (build-system python-build-system)
4970 (native-inputs
f3b98f4f 4971 `(("python-nose" ,python-nose)))
c937562e 4972 (inputs
5ff408d9
SB
4973 `(("freetype" ,freetype)
4974 ("lcms" ,lcms)
c937562e
EB
4975 ("zlib" ,zlib)
4976 ("libjpeg" ,libjpeg)
4977 ("openjpeg" ,openjpeg)
5ff408d9
SB
4978 ("libtiff" ,libtiff)
4979 ("libwebp" ,libwebp)))
c937562e 4980 (arguments
e5358a6b 4981 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4982 (add-after
4983 'install 'check-installed
6151120a 4984 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4985 (begin
4986 (setenv "HOME" (getcwd))
6151120a
HG
4987 ;; Make installed package available for running the
4988 ;; tests
4989 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4990 (and (zero? (system* "python" "selftest.py"
4991 "--installed"))
4992 (zero? (system* "python" "test-installed.py"))))))
4993 (delete 'check))))
c937562e
EB
4994 (home-page "https://pypi.python.org/pypi/Pillow")
4995 (synopsis "Fork of the Python Imaging Library")
4996 (description
4997 "The Python Imaging Library adds image processing capabilities to your
4998Python interpreter. This library provides extensive file format support, an
4999efficient internal representation, and fairly powerful image processing
5000capabilities. The core image library is designed for fast access to data
5001stored in a few basic pixel formats. It should provide a solid foundation for
5002a general image processing tool.")
3f641af0 5003 (license (license:x11-style
c937562e
EB
5004 "http://www.pythonware.com/products/pil/license.htm"
5005 "The PIL Software License"))))
5006
5007(define-public python2-pillow
5008 (package-with-python2 python-pillow))
bb986599 5009
a415f036
FB
5010(define-public python-pycparser
5011 (package
5012 (name "python-pycparser")
5043b20d 5013 (version "2.17")
a415f036
FB
5014 (source
5015 (origin
5016 (method url-fetch)
38eb6919 5017 (uri (pypi-uri "pycparser" version))
a415f036
FB
5018 (sha256
5019 (base32
5043b20d 5020 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
a415f036
FB
5021 (outputs '("out" "doc"))
5022 (build-system python-build-system)
5023 (native-inputs
f3b98f4f 5024 `(("pkg-config" ,pkg-config)))
a415f036 5025 (arguments
89b5c60e 5026 `(#:phases
819939cb
TGR
5027 (modify-phases %standard-phases
5028 (replace 'check
5029 (lambda _
5030 (with-directory-excursion "tests"
5031 (zero? (system* "python" "all_tests.py")))))
5032 (add-after 'install 'install-doc
5033 (lambda* (#:key outputs #:allow-other-keys)
5034 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5035 (doc (string-append data "/doc/" ,name "-" ,version))
5036 (examples (string-append doc "/examples")))
5037 (mkdir-p examples)
5038 (for-each (lambda (file)
5039 (copy-file (string-append "." file)
5040 (string-append doc file)))
5041 '("/README.rst" "/CHANGES" "/LICENSE"))
5042 (copy-recursively "examples" examples)))))))
a415f036
FB
5043 (home-page "https://github.com/eliben/pycparser")
5044 (synopsis "C parser in Python")
5045 (description
5046 "Pycparser is a complete parser of the C language, written in pure Python
5047using the PLY parsing library. It parses C code into an AST and can serve as
5048a front-end for C compilers or analysis tools.")
3f641af0 5049 (license license:bsd-3)))
a415f036
FB
5050
5051(define-public python2-pycparser
5052 (package-with-python2 python-pycparser))
57c3f716
FB
5053
5054(define-public python-cffi
5055 (package
5056 (name "python-cffi")
029933cf 5057 (version "1.10.0")
57c3f716
FB
5058 (source
5059 (origin
5060 (method url-fetch)
2d3a437c 5061 (uri (pypi-uri "cffi" version))
89b5c60e 5062 (sha256
029933cf 5063 (base32 "1mffyilq4qycm8gs4wkgb18rnqil8a9blqq77chdlshzxc8jkc5k"))))
57c3f716
FB
5064 (build-system python-build-system)
5065 (outputs '("out" "doc"))
5066 (inputs
5067 `(("libffi" ,libffi)))
5068 (propagated-inputs ; required at run-time
5069 `(("python-pycparser" ,python-pycparser)))
5070 (native-inputs
5071 `(("pkg-config" ,pkg-config)
5072 ("python-sphinx" ,python-sphinx)
f3b98f4f 5073 ("python-pytest" ,python-pytest)))
57c3f716 5074 (arguments
295f32f3
MB
5075 `(#:modules ((ice-9 ftw)
5076 (srfi srfi-26)
5077 (guix build utils)
5078 (guix build python-build-system))
5079 #:phases
5080 (modify-phases %standard-phases
5081 (replace 'check
5082 (lambda _
5083 (setenv "PYTHONPATH"
5084 (string-append
5085 (getenv "PYTHONPATH")
5086 ":" (getcwd) "/build/"
5087 (car (scandir "build" (cut string-prefix? "lib." <>)))))
029933cf
MB
5088
5089 ;; XXX The "normal" approach of setting CC and friends does
5090 ;; not work here. Is this the correct way of doing things?
5091 (substitute* "testing/embedding/test_basic.py"
5092 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
5093 (string-append "c = distutils.ccompiler.new_compiler();"
5094 "c.set_executables(compiler='gcc',"
5095 "compiler_so='gcc',linker_exe='gcc',"
5096 "linker_so='gcc -shared')")))
5097 (substitute* "testing/cffi0/test_ownlib.py"
5098 (("'cc testownlib") "'gcc testownlib"))
5099 (zero? (system* "py.test" "-v" "c/" "testing/"))))
295f32f3
MB
5100 (add-after 'install 'install-doc
5101 (lambda* (#:key outputs #:allow-other-keys)
5102 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5103 (doc (string-append data "/doc/" ,name "-" ,version))
5104 (html (string-append doc "/html")))
5105 (with-directory-excursion "doc"
5106 (system* "make" "html")
5107 (mkdir-p html)
5108 (copy-recursively "build/html" html))
5109 (copy-file "LICENSE" (string-append doc "/LICENSE"))
5110 #t))))))
57c3f716
FB
5111 (home-page "http://cffi.readthedocs.org")
5112 (synopsis "Foreign function interface for Python")
5113 (description
5114 "Foreign Function Interface for Python calling C code.")
bd3fa666 5115 (license license:expat)))
57c3f716
FB
5116
5117(define-public python2-cffi
5118 (package-with-python2 python-cffi))
6fa14469
FB
5119
5120(define-public python-xcffib
5121 (package
5122 (name "python-xcffib")
8347c122 5123 (version "0.5.1")
6fa14469
FB
5124 (source
5125 (origin
5126 (method url-fetch)
8347c122 5127 (uri (pypi-uri "xcffib" version))
6fa14469
FB
5128 (sha256
5129 (base32
8347c122 5130 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
6fa14469
FB
5131 (build-system python-build-system)
5132 (inputs
482d9591 5133 `(("libxcb" ,libxcb)))
6fa14469 5134 (propagated-inputs
482d9591
HG
5135 `(("python-cffi" ,python-cffi) ; used at run time
5136 ("python-six" ,python-six)))
6fa14469 5137 (arguments
e46bf223 5138 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
e2816ac7
MB
5139 #:tests? #f
5140 #:phases
c8cd850c 5141 (modify-phases %standard-phases
e46bf223
JMSG
5142 (add-after 'unpack 'fix-libxcb-path
5143 (lambda* (#:key inputs #:allow-other-keys)
5144 (let ((libxcb (assoc-ref inputs "libxcb")))
5145 (substitute* '("xcffib/__init__.py")
5146 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5147 #t)))
c8cd850c
MB
5148 (add-after 'install 'install-doc
5149 (lambda* (#:key outputs #:allow-other-keys)
5150 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5151 "/doc/" ,name "-" ,version)))
5152 (mkdir-p doc)
5153 (copy-file "README.md"
5154 (string-append doc "/README.md"))
5155 #t))))))
6fa14469
FB
5156 (home-page "https://github.com/tych0/xcffib")
5157 (synopsis "XCB Python bindings")
5158 (description
5159 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5160support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 5161 (license license:expat)))
6fa14469
FB
5162
5163(define-public python2-xcffib
5164 (package-with-python2 python-xcffib))
5165
9e099723
FB
5166(define-public python-cairocffi
5167 (package
5168 (name "python-cairocffi")
80f78e8f 5169 (version "0.8.0")
9e099723
FB
5170 (source
5171 (origin
5172 (method url-fetch)
5173 ;; The archive on pypi is missing the 'utils' directory!
3015d455 5174 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
9e099723 5175 version ".tar.gz"))
f586c877 5176 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
5177 (sha256
5178 (base32
80f78e8f 5179 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
9e099723
FB
5180 (build-system python-build-system)
5181 (outputs '("out" "doc"))
5182 (inputs
5183 `(("gdk-pixbuf" ,gdk-pixbuf)
5184 ("cairo" ,cairo)))
5185 (native-inputs
5186 `(("pkg-config" ,pkg-config)
5187 ("python-sphinx" ,python-sphinx)
f3b98f4f 5188 ("python-docutils" ,python-docutils)))
9e099723
FB
5189 (propagated-inputs
5190 `(("python-xcffib" ,python-xcffib))) ; used at run time
5191 (arguments
a792e1aa
MB
5192 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
5193 #:tests? #f
5194 #:phases
6734c7ba
MB
5195 (modify-phases %standard-phases
5196 (add-after 'install 'install-doc
5197 (lambda* (#:key inputs outputs #:allow-other-keys)
5198 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5199 (doc (string-append data "/doc/" ,name "-" ,version))
5200 (html (string-append doc "/html")))
5201 (setenv "LD_LIBRARY_PATH"
5202 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5203 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5204 (setenv "LANG" "en_US.UTF-8")
5205 (mkdir-p html)
5206 (for-each (lambda (file)
5207 (copy-file (string-append "." file)
5208 (string-append doc file)))
5209 '("/README.rst" "/CHANGES" "/LICENSE"))
5210 (system* "python" "setup.py" "build_sphinx")
5211 (copy-recursively "docs/_build/html" html)
5212 #t))))))
3015d455 5213 (home-page "https://github.com/Kozea/cairocffi")
9e099723
FB
5214 (synopsis "Python bindings and object-oriented API for Cairo")
5215 (description
5216 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5217Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5218graphics library with support for multiple backends including image buffers,
5219PNG, PostScript, PDF, and SVG file output.")
3f641af0 5220 (license license:bsd-3)))
9e099723
FB
5221
5222(define-public python2-cairocffi
5223 (package-with-python2 python-cairocffi))
5224
3cff95cb
RW
5225(define-public python-decorator
5226 (package
5227 (name "python-decorator")
d79fa7da 5228 (version "4.0.10")
3cff95cb
RW
5229 (source
5230 (origin
5231 (method url-fetch)
e21338be 5232 (uri (pypi-uri "decorator" version))
3cff95cb 5233 (sha256
d79fa7da 5234 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
3cff95cb
RW
5235 (build-system python-build-system)
5236 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 5237 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
5238 (synopsis "Python module to simplify usage of decorators")
5239 (description
5240 "The aim of the decorator module is to simplify the usage of decorators
5241for the average programmer, and to popularize decorators usage giving examples
5242of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5243etc. The core of this module is a decorator factory.")
5244 (license license:expat)))
5245
5246(define-public python2-decorator
5247 (package-with-python2 python-decorator))
5248
2c0499ad
RW
5249(define-public python-drmaa
5250 (package
5251 (name "python-drmaa")
7c427932 5252 (version "0.7.7")
2c0499ad
RW
5253 (source
5254 (origin
5255 (method url-fetch)
d92621cf 5256 (uri (pypi-uri "drmaa" version))
2c0499ad 5257 (sha256
7c427932 5258 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
2c0499ad
RW
5259 (build-system python-build-system)
5260 ;; The test suite requires libdrmaa which is provided by the cluster
5261 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5262 ;; should be set to the path of the libdrmaa library.
5263 (arguments '(#:tests? #f))
5264 (native-inputs
f3b98f4f 5265 `(("python-nose" ,python-nose)))
2c0499ad
RW
5266 (home-page "https://pypi.python.org/pypi/drmaa")
5267 (synopsis "Python bindings for the DRMAA library")
5268 (description
5269 "A Python package for Distributed Resource Management (DRM) job
5270submission and control. This package is an implementation of the DRMAA 1.0
5271Python language binding specification.")
3f641af0 5272 (license license:bsd-3)))
2c0499ad
RW
5273
5274(define-public python2-drmaa
5275 (package-with-python2 python-drmaa))
5276
a70b03d4
TD
5277(define-public python-grako
5278 (package
5279 (name "python-grako")
5280 (version "3.99.9")
5281 (source
5282 (origin
5283 (method url-fetch)
5284 (uri
5285 (pypi-uri "grako" version ".zip"))
5286 (sha256
5287 (base32
5288 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5289 (build-system python-build-system)
5290 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5291 (native-inputs
5292 `(("unzip" ,unzip)
5293 ("python-pytest" ,python-pytest-3.0)
5294 ("python-pytest-runner" ,python-pytest-runner)))
5295 (home-page "https://bitbucket.org/neogeny/grako")
5296 (synopsis "EBNF parser generator")
5297 (description
5298 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5299memoizing PEG/Packrat parser in Python.")
5300 (license license:bsd-3)))
5301
5302(define-public python2-grako
5303 (package-with-python2 python-grako))
5304
d05c6da0
RW
5305(define-public python-gridmap
5306 (package
5307 (name "python-gridmap")
5308 (version "0.13.0")
5309 (source
5310 (origin
5311 (method url-fetch)
5312 (uri (string-append
5313 "https://github.com/pygridtools/gridmap/archive/v"
5314 version ".tar.gz"))
5315 (file-name (string-append name "-" version ".tar.gz"))
5316 (sha256
5317 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
5318 (build-system python-build-system)
ad348f9f
MB
5319 (arguments
5320 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
f22efa01 5321 (propagated-inputs
d05c6da0
RW
5322 `(("python-psutil" ,python-psutil)
5323 ("python-drmaa" ,python-drmaa)
5324 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
5325 (home-page "https://github.com/pygridtools/gridmap")
5326 (synopsis "Create jobs on a cluster directly from Python")
5327 (description
5328 "Gridmap is a Python package to allow you to easily create jobs on the
5329cluster directly from Python. You can directly map Python functions onto the
5330cluster without needing to write any wrapper code yourself.")
3f641af0 5331 (license license:gpl3+)))
d05c6da0
RW
5332
5333(define-public python2-gridmap
5334 (package-with-python2 python-gridmap))
5335
84342e2f
SR
5336(define-public python-honcho
5337 (package
5338 (name "python-honcho")
5339 (version "1.0.1")
5340 (source
5341 (origin
5342 (method url-fetch)
5343 (uri (string-append
5344 "https://github.com/nickstenning/honcho/archive/v"
5345 version ".tar.gz"))
5346 (file-name (string-append name "-" version ".tar.gz"))
5347 (sha256
5348 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
5349 (build-system python-build-system)
5350 (native-inputs
5351 `(("python-pytest" ,python-pytest-3.0)
5352 ("python-mock" ,python-mock)
5353 ("python-tox" ,python-tox)
5354 ("which" ,which))) ;for tests
5355 (propagated-inputs
5356 `(("python-jinja2" ,python-jinja2)))
5357 (arguments
5358 `(#:phases
5359 (modify-phases %standard-phases
5360 (delete 'check)
5361 (add-after 'install 'check
5362 (lambda* (#:key outputs inputs #:allow-other-keys)
5363 ;; fix honcho path in testsuite
5364 (substitute* "tests/conftest.py"
5365 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5366 "/bin/honcho" "'")))
5367 ;; It's easier to run tests after install.
5368 ;; Make installed package available for running the tests
5369 (add-installed-pythonpath inputs outputs)
5370 (zero? (system* "py.test" "-v")))))))
5371 (home-page "https://github.com/nickstenning/honcho")
5372 (synopsis "Manage Procfile-based applications")
5373 (description
5374 "A Procfile is a file which describes how to run an application
5375consisting of serveral processes. honcho starts all listed processes.
5376The output of all running processes is collected by honcho and
5377displayed.")
5378 (license license:expat)))
5379
5380(define-public python2-honcho
5381 (package-with-python2 python-honcho))
5382
cb6d5c54
RW
5383(define-public python-pexpect
5384 (package
5385 (name "python-pexpect")
ed118043 5386 (version "4.2.1")
cb6d5c54
RW
5387 (source
5388 (origin
5389 (method url-fetch)
ed118043 5390 (uri (pypi-uri "pexpect" version))
cb6d5c54 5391 (sha256
ed118043 5392 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
cb6d5c54
RW
5393 (build-system python-build-system)
5394 (arguments
5395 `(#:phases
5396 (modify-phases %standard-phases
ed118043
MB
5397 (add-before 'check 'prepare-tests
5398 (lambda _
5399 (substitute* (find-files "tests")
5400 (("/bin/ls") (which "ls"))
5401 (("/bin/echo") (which "echo"))
5402 (("/bin/which") (which "which"))
5403 ;; Many tests try to use the /bin directory which
5404 ;; is not present in the build environment.
5405 ;; Use one that's non-empty and unlikely to change.
5406 (("/bin'") "/dev'"))
5407 ;; XXX: Socket connection test gets "Connection reset by peer".
5408 ;; Why does it not work? Delete for now.
5409 (delete-file "tests/test_socket.py")
5410 #t))
3ee9355e 5411 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
cb6d5c54 5412 (native-inputs
ed118043 5413 `(("python-nose" ,python-nose)
350a3084 5414 ("python-pytest" ,python-pytest-3.0)
ed118043 5415 ("man-db" ,man-db)
dc4f697f
LC
5416 ("which" ,which)
5417 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
ed118043
MB
5418 (propagated-inputs
5419 `(("python-ptyprocess" ,python-ptyprocess)))
cb6d5c54
RW
5420 (home-page "http://pexpect.readthedocs.org/")
5421 (synopsis "Controlling interactive console applications")
5422 (description
5423 "Pexpect is a pure Python module for spawning child applications;
5424controlling them; and responding to expected patterns in their output.
5425Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5426child application and control it as if a human were typing commands.")
3f641af0 5427 (license license:isc)))
cb6d5c54
RW
5428
5429(define-public python2-pexpect
5430 (package-with-python2 python-pexpect))
5431
229ad120
RW
5432(define-public python-setuptools-scm
5433 (package
5434 (name "python-setuptools-scm")
5b1f31ff 5435 (version "1.15.0")
229ad120
RW
5436 (source (origin
5437 (method url-fetch)
383af6b0 5438 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
5439 (sha256
5440 (base32
5b1f31ff 5441 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
229ad120
RW
5442 (build-system python-build-system)
5443 (home-page "https://github.com/pypa/setuptools_scm/")
5444 (synopsis "Manage Python package versions in SCM metadata")
5445 (description
383af6b0 5446 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
5447@dfn{software configuration management} (SCM) metadata instead of declaring
5448them as the version argument or in a SCM managed file.")
5449 (license license:expat)))
5450
5451(define-public python2-setuptools-scm
5452 (package-with-python2 python-setuptools-scm))
5453
b74270ee
RW
5454(define-public python-pathpy
5455 (package
5456 (name "python-pathpy")
5457 (version "8.1.1")
5458 (source
5459 (origin
5460 (method url-fetch)
5461 (uri (string-append "https://pypi.python.org/packages/source/p/"
5462 "path.py/path.py-" version ".tar.gz"))
5463 (sha256
5464 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 5465 (outputs '("out" "doc"))
b74270ee
RW
5466 (build-system python-build-system)
5467 (propagated-inputs
5468 `(("python-appdirs" ,python-appdirs)))
5469 (native-inputs
f3b98f4f 5470 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
5471 ("python-sphinx" ,python-sphinx)
5472 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
5473 ("python-pytest" ,python-pytest)
5474 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
5475 (arguments
5476 `(#:phases
5477 (modify-phases %standard-phases
5478 (add-after 'build 'build-doc
5479 (lambda _
5480 (setenv "LANG" "en_US.UTF-8")
5481 (zero? (system* "python" "setup.py" "build_sphinx"))))
5482 (add-after 'install 'install-doc
5483 (lambda* (#:key outputs #:allow-other-keys)
5484 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5485 (doc (string-append data "/doc/" ,name "-" ,version))
5486 (html (string-append doc "/html")))
5487 (mkdir-p html)
5488 (for-each (lambda (file)
5489 (copy-file file (string-append doc "/" file)))
5490 '("README.rst" "CHANGES.rst"))
5491 (copy-recursively "build/sphinx/html" html)))))))
7bf837fd 5492 (home-page "https://github.com/jaraco/path.py")
b74270ee
RW
5493 (synopsis "Python module wrapper for built-in os.path")
5494 (description
5495 "@code{path.py} implements path objects as first-class entities, allowing
5496common operations on files to be invoked on those path objects directly.")
5497 (license license:expat)))
5498
5499(define-public python2-pathpy
5500 (package-with-python2 python-pathpy))
5501
0d34e01b
RW
5502(define-public python-pickleshare
5503 (package
5504 (name "python-pickleshare")
5505 (version "0.5")
5506 (source
5507 (origin
5508 (method url-fetch)
5509 (uri (string-append "https://pypi.python.org/packages/source/p/"
5510 "pickleshare/pickleshare-" version ".tar.gz"))
5511 (sha256
5512 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5513 (build-system python-build-system)
5514 (propagated-inputs
5515 `(("python-pathpy" ,python-pathpy)))
5516 (home-page "https://github.com/vivainio/pickleshare")
5517 (synopsis "Tiny key value database with concurrency support")
5518 (description
5519 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5520Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5521shelve, many processes can access the database simultaneously. Changing a
5522value in database is immediately visible to other processes accessing the same
5523database. Concurrency is possible because the values are stored in separate
5524files. Hence the “database” is a directory where all files are governed by
5525PickleShare.")
5526 (license license:expat)))
5527
5528(define-public python2-pickleshare
5529 (package-with-python2 python-pickleshare))
5530
cd6e5189
RW
5531(define-public python-simplegeneric
5532 (package
5533 (name "python-simplegeneric")
5534 (version "0.8.1")
5535 (source
5536 (origin
5537 (method url-fetch)
5538 (uri (string-append "https://pypi.python.org/packages/source/s/"
5539 "simplegeneric/simplegeneric-" version ".zip"))
5540 (sha256
5541 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5542 (build-system python-build-system)
5543 (native-inputs
f3b98f4f 5544 `(("unzip" ,unzip)))
cd6e5189
RW
5545 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5546 (synopsis "Python module for simple generic functions")
5547 (description
5548 "The simplegeneric module lets you define simple single-dispatch generic
5549functions, akin to Python’s built-in generic functions like @code{len()},
5550@code{iter()} and so on. However, instead of using specially-named methods,
5551these generic functions use simple lookup tables, akin to those used by
5552e.g. @code{pickle.dump()} and other generic functions found in the Python
5553standard library.")
3f641af0 5554 (license license:zpl2.1)))
cd6e5189
RW
5555
5556(define-public python2-simplegeneric
5557 (package-with-python2 python-simplegeneric))
5558
ddc7d8ed 5559(define-public python-ipython-genutils
c4abbac3 5560 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
5561 (package
5562 (name "python-ipython-genutils")
5563 (version "0.1.0")
5564 (source
5565 (origin
5566 (method url-fetch)
5567 (uri (string-append "https://pypi.python.org/packages/source/i/"
5568 "ipython_genutils/ipython_genutils-"
5569 version ".tar.gz"))
5570 (sha256
5571 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5572 (build-system python-build-system)
5573 (arguments `(#:tests? #f)) ; no tests
5574 (home-page "http://ipython.org")
5575 (synopsis "Vestigial utilities from IPython")
5576 (description
c4abbac3
HG
5577 "This package provides retired utilities from IPython. No packages
5578outside IPython/Jupyter should depend on it.
5579
5580This package shouldn't exist. It contains some common utilities shared by
5581Jupyter and IPython projects during The Big Split. As soon as possible, those
5582packages will remove their dependency on this, and this package will go
5583away.")
3f641af0 5584 (license license:bsd-3)))
ddc7d8ed
RW
5585
5586(define-public python2-ipython-genutils
5587 (package-with-python2 python-ipython-genutils))
5588
2b10eb48
RW
5589(define-public python-traitlets
5590 (package
5591 (name "python-traitlets")
a5ba1481 5592 (version "4.2.0")
2b10eb48
RW
5593 (source
5594 (origin
5595 (method url-fetch)
cc0c4fde 5596 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
5597 (sha256
5598 (base32
a5ba1481 5599 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
5600 (build-system python-build-system)
5601 (arguments
5602 `(#:phases
5603 (modify-phases %standard-phases
5604 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5605 (propagated-inputs
5606 `(("python-ipython-genutils" ,python-ipython-genutils)
5607 ("python-decorator" ,python-decorator)))
5608 (native-inputs
cc0c4fde
EF
5609 `(("python-mock" ,python-mock)
5610 ("python-nose" ,python-nose)))
2b10eb48
RW
5611 (home-page "http://ipython.org")
5612 (synopsis "Configuration system for Python applications")
5613 (description
5614 "Traitlets is a framework that lets Python classes have attributes with
5615type checking, dynamically calculated default values, and ‘on change’
5616callbacks. The package also includes a mechanism to use traitlets for
5617configuration, loading values from files or from command line arguments. This
5618is a distinct layer on top of traitlets, so you can use traitlets in your code
5619without using the configuration machinery.")
3f641af0 5620 (license license:bsd-3)))
2b10eb48
RW
5621
5622(define-public python2-traitlets
5623 (package-with-python2 python-traitlets))
5624
4263b06f
RW
5625(define-public python-jupyter-core
5626 (package
5627 (name "python-jupyter-core")
45cc957c 5628 (version "4.2.1")
4263b06f
RW
5629 (source
5630 (origin
5631 (method url-fetch)
5632 (uri (string-append (pypi-uri "jupyter_core" version)))
5633 (sha256
5634 (base32
45cc957c 5635 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4263b06f
RW
5636 (build-system python-build-system)
5637 ;; FIXME: not sure how to run the tests
5638 (arguments `(#:tests? #f))
5639 (propagated-inputs
5640 `(("python-traitlets" ,python-traitlets)))
5641 (home-page "http://jupyter.org/")
5642 (synopsis "Jupyter base package")
5643 (description
5644 "Jupyter core is the base package on which Jupyter projects rely.")
5645 (license license:bsd-3)))
5646
5647(define-public python2-jupyter-core
5648 (package-with-python2 python-jupyter-core))
5649
9ff01f2d
RW
5650(define-public python-jupyter-client
5651 (package
5652 (name "python-jupyter-client")
5653 (version "4.4.0")
5654 (source
5655 (origin
5656 (method url-fetch)
5657 (uri (pypi-uri "jupyter_client" version))
5658 (sha256
5659 (base32
5660 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5661 (build-system python-build-system)
5662 ;; Tests fail because of missing native python kernel which I assume is
5663 ;; provided by the ipython package, which we cannot use because it would
5664 ;; cause a dependency cycle.
5665 (arguments `(#:tests? #f))
5666 (propagated-inputs
5667 `(("python-pyzmq" ,python-pyzmq)
5668 ("python-traitlets" ,python-traitlets)
5669 ("python-jupyter-core" ,python-jupyter-core)))
5670 (home-page "http://jupyter.org/")
5671 (synopsis "Jupyter protocol implementation and client libraries")
5672 (description
5673 "The @code{jupyter_client} package contains the reference implementation
5674of the Jupyter protocol. It also provides client and kernel management APIs
5675for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5676installing @code{kernelspec}s for use with Jupyter frontends.")
5677 (license license:bsd-3)))
5678
5679(define-public python2-jupyter-client
5680 (package-with-python2 python-jupyter-client))
5681
ab526102
RW
5682(define-public python-ipykernel
5683 (package
5684 (name "python-ipykernel")
f165648e 5685 (version "4.5.2")
ab526102
RW
5686 (source
5687 (origin
5688 (method url-fetch)
5689 (uri (pypi-uri "ipykernel" version))
5690 (sha256
f165648e 5691 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
ab526102
RW
5692 (build-system python-build-system)
5693 ;; The tests load a submodule of IPython. However, IPython itself depends
5694 ;; on ipykernel.
5695 (arguments `(#:tests? #f))
5696 (propagated-inputs
5697 ;; imported at runtime during connect
5698 `(("python-jupyter-client" ,python-jupyter-client)))
5699 (home-page "http://ipython.org")
5700 (synopsis "IPython Kernel for Jupyter")
5701 (description
5702 "This package provides the IPython kernel for Jupyter.")
5703 (license license:bsd-3)))
5704
5705(define-public python2-ipykernel
5706 (package-with-python2 python-ipykernel))
5707
5ff6effc
RW
5708(define-public python-testpath
5709 (package
5710 (name "python-testpath")
5711 (version "0.2")
5712 (source
5713 (origin
5714 (method url-fetch)
5715 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5716 version ".tar.gz"))
5717 (file-name (string-append name "-" version ".tar.gz"))
5718 (sha256
5719 (base32
5720 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5721 (build-system python-build-system)
5722 (arguments
5723 `(#:tests? #f ; this package does not even have a setup.py
b320f7bf
TD
5724 #:modules ((guix build python-build-system)
5725 (guix build utils)
5726 (srfi srfi-1))
5727 #:imported-modules (,@%python-build-system-modules
5728 (srfi srfi-1))
5ff6effc
RW
5729 #:phases
5730 (modify-phases %standard-phases
5731 (delete 'install)
5732 (replace 'build
b320f7bf
TD
5733 (lambda* (#:key inputs outputs #:allow-other-keys)
5734 (let* ((version (last
5735 (string-split (assoc-ref inputs "python") #\-)))
5736 (x.y (string-join (take (string-split version #\.) 2)
5737 "."))
5738 (dir (string-append
5739 (assoc-ref outputs "out")
5740 "/lib/python" x.y "/site-packages/testpath")))
5741 (mkdir-p dir)
5742 (copy-recursively "testpath" dir))
5743 #t)))))
5ff6effc
RW
5744 (home-page "https://github.com/takluyver/testpath")
5745 (synopsis "Test utilities for code working with files and commands")
5746 (description
5747 "Testpath is a collection of utilities for Python code working with files
5748and commands. It contains functions to check things on the filesystem, and
5749tools for mocking system commands and recording calls to those.")
5750 (license license:expat)))
5751
5752(define-public python2-testpath
5753 (package-with-python2 python-testpath))
5754
ae1ab9fe
FB
5755(define-public python-ipython
5756 (package
5757 (name "python-ipython")
fb25d348 5758 (version "5.2.2")
ae1ab9fe
FB
5759 (source
5760 (origin
fceac880 5761 (method url-fetch)
accd5f99 5762 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 5763 (sha256
fb25d348 5764 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
ae1ab9fe
FB
5765 (build-system python-build-system)
5766 (outputs '("out" "doc"))
3a0b1b9a
FB
5767 (propagated-inputs
5768 `(("python-pyzmq" ,python-pyzmq)
fb25d348 5769 ("python-prompt-toolkit" ,python-prompt-toolkit)
accd5f99 5770 ("python-terminado" ,python-terminado)
ae1ab9fe 5771 ("python-matplotlib" ,python-matplotlib)
5d26e542 5772 ("python-numpy" ,python-numpy)
ae1ab9fe 5773 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
5774 ("python-jinja2" ,python-jinja2)
5775 ("python-mistune" ,python-mistune)
accd5f99
RW
5776 ("python-pexpect" ,python-pexpect)
5777 ("python-pickleshare" ,python-pickleshare)
5778 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 5779 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
5780 ("python-traitlets" ,python-traitlets)
5781 ("python-ipykernel" ,python-ipykernel)
fb25d348 5782 ("python-nbformat" ,python-nbformat)
accd5f99
RW
5783 ("python-pygments" ,python-pygments)))
5784 (inputs
5785 `(("readline" ,readline)
5786 ("which" ,which)))
ae1ab9fe 5787 (native-inputs
fb25d348
TD
5788 `(("graphviz" ,graphviz)
5789 ("pkg-config" ,pkg-config)
accd5f99
RW
5790 ("python-requests" ,python-requests) ;; for tests
5791 ("python-testpath" ,python-testpath)
5792 ("python-nose" ,python-nose)
ae1ab9fe 5793 ("python-sphinx" ,python-sphinx)
fb25d348 5794 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
2584beae
RW
5795 ;; FIXME: It's possible that a smaller union would work just as well.
5796 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5797 texlive-fonts-ec
5798 texlive-generic-ifxetex
5799 texlive-generic-pdftex
5800 texlive-latex-amsfonts
5801 texlive-latex-capt-of
5802 texlive-latex-cmap
5803 texlive-latex-environ
5804 texlive-latex-eqparbox
5805 texlive-latex-etoolbox
5806 texlive-latex-expdlist
5807 texlive-latex-fancyhdr
5808 texlive-latex-fancyvrb
5809 texlive-latex-fncychap
5810 texlive-latex-float
5811 texlive-latex-framed
5812 texlive-latex-geometry
5813 texlive-latex-graphics
5814 texlive-latex-hyperref
5815 texlive-latex-mdwtools
5816 texlive-latex-multirow
5817 texlive-latex-oberdiek
5818 texlive-latex-parskip
5819 texlive-latex-preview
5820 texlive-latex-tabulary
5821 texlive-latex-threeparttable
5822 texlive-latex-titlesec
5823 texlive-latex-trimspaces
5824 texlive-latex-ucs
5825 texlive-latex-upquote
5826 texlive-latex-url
5827 texlive-latex-varwidth
5828 texlive-latex-wrapfig)))
f3b98f4f 5829 ("texinfo" ,texinfo)))
ae1ab9fe 5830 (arguments
89b5c60e 5831 `(#:phases
3a0b1b9a
FB
5832 (modify-phases %standard-phases
5833 (add-after
5834 'install 'install-doc
5835 (lambda* (#:key inputs outputs #:allow-other-keys)
5836 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5837 (doc (string-append data "/doc/" ,name "-" ,version))
5838 (html (string-append doc "/html"))
5839 (man1 (string-append data "/man/man1"))
5840 (info (string-append data "/info"))
fb25d348
TD
5841 (examples (string-append doc "/examples"))
5842 (python-arg (string-append "PYTHON=" (which "python"))))
afd3d931 5843 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
5844 ;; Make installed package available for running the tests
5845 (add-installed-pythonpath inputs outputs)
3a0b1b9a 5846 (with-directory-excursion "docs"
accd5f99
RW
5847 ;; FIXME: pdf fails to build
5848 ;;(system* "make" "pdf" "PAPER=a4")
fb25d348
TD
5849 (system* "make" python-arg "html")
5850 (system* "make" python-arg "info"))
3a0b1b9a
FB
5851 (copy-recursively "docs/man" man1)
5852 (copy-recursively "examples" examples)
accd5f99 5853 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
5854 ;; (copy-file "docs/build/latex/ipython.pdf"
5855 ;; (string-append doc "/ipython.pdf"))
5856 (mkdir-p info)
5857 (copy-file "docs/build/texinfo/ipython.info"
5858 (string-append info "/ipython.info"))
5859 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5860 ;; Tests can only be run after the library has been installed and not
5861 ;; within the source directory.
5862 (delete 'check)
5863 (add-after
5864 'install 'check
eee5cd04 5865 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
5866 (if tests?
5867 (with-directory-excursion "/tmp"
eee5cd04
HG
5868 ;; Make installed package available for running the tests
5869 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
5870 (setenv "HOME" "/tmp/") ;; required by a test
5871 (zero? (system* (string-append (assoc-ref outputs "out")
5872 "/bin/iptest"))))
5873 #t)))
5874 (add-before
5875 'install 'fix-tests
5876 (lambda* (#:key inputs #:allow-other-keys)
5877 (substitute* "./IPython/utils/_process_posix.py"
5878 (("/usr/bin/env', 'which") (which "which")))
5879 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5880 (("#!/usr/bin/env python")
5881 (string-append "#!" (which "python"))))
5882 ;; Disable 1 failing test
5883 (substitute* "./IPython/core/tests/test_magic.py"
5884 (("def test_dirops\\(\\):" all)
5885 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
5886 (home-page "http://ipython.org")
5887 (synopsis "IPython is a tool for interactive computing in Python")
5888 (description
5889 "IPython provides a rich architecture for interactive computing with:
5890Powerful interactive shells, a browser-based notebook, support for interactive
5891data visualization, embeddable interpreters and tools for parallel
5892computing.")
135ba811
EF
5893 (license license:bsd-3)
5894 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
5895
5896(define-public python2-ipython
135ba811 5897 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
5898 (package
5899 (inherit ipython)
3a0b1b9a 5900 ;; FIXME: add pyreadline once available.
fb25d348
TD
5901 (propagated-inputs
5902 `(("python2-backports-shutil-get-terminal-size"
5903 ,python2-backports-shutil-get-terminal-size)
5904 ("python2-pathlib2" ,python2-pathlib2)
5905 ,@(package-propagated-inputs ipython)))
e62600fe 5906 (native-inputs
135ba811 5907 `(("python2-mock" ,python2-mock)
77a6932a 5908 ,@(package-native-inputs ipython))))))
03411993
AE
5909
5910(define-public python-isodate
5911 (package
5912 (name "python-isodate")
b6785c2e 5913 (version "0.5.4")
03411993
AE
5914 (source
5915 (origin
5916 (method url-fetch)
b6785c2e 5917 (uri (pypi-uri "isodate" version))
03411993
AE
5918 (sha256
5919 (base32
b6785c2e 5920 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 5921 (build-system python-build-system)
03411993
AE
5922 (home-page
5923 "http://cheeseshop.python.org/pypi/isodate")
5924 (synopsis
5925 "Python date parser and formatter")
5926 (description
5927 "Python-isodate is a python module for parsing and formatting
5928ISO 8601 dates, time and duration.")
3f641af0 5929 (license license:bsd-3)))
03411993
AE
5930
5931(define-public python2-isodate
5932 (package-with-python2 python-isodate))
673ab897
AE
5933
5934(define-public python-html5lib
5935 (package
5936 (name "python-html5lib")
a14061aa 5937 (version "1.0b10")
673ab897
AE
5938 (source
5939 (origin
5940 (method url-fetch)
fee04c19 5941 (uri (pypi-uri "html5lib" version))
673ab897
AE
5942 (sha256
5943 (base32
a14061aa 5944 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 5945 (build-system python-build-system)
3dd75476 5946 (propagated-inputs
4eb6ed28
MB
5947 `(("python-six" ,python-six)
5948 ("python-webencodings" ,python-webencodings)))
673ab897
AE
5949 (arguments
5950 `(#:test-target "check"))
5951 (home-page
5952 "https://github.com/html5lib/html5lib-python")
5953 (synopsis
5954 "Python HTML parser based on the WHATWG HTML specifcation")
5955 (description
5956 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5957and written in Python.")
bd3fa666 5958 (license license:expat)))
673ab897
AE
5959
5960(define-public python2-html5lib
5961 (package-with-python2 python-html5lib))
e99f4211 5962
8ee62c97
RW
5963;; Needed for python-bleach, a dependency of python-notebook
5964(define-public python-html5lib-0.9
5965 (package
5966 (inherit python-html5lib)
5967 (version "0.999")
5968 (source
5969 (origin
5970 (method url-fetch)
5971 (uri (pypi-uri "html5lib" version))
5972 (sha256
5973 (base32
5974 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5975
5976(define-public python2-html5lib-0.9
5977 (package-with-python2 python-html5lib-0.9))
5978
13be557d
RJ
5979(define-public python-html5-parser
5980 (package
5981 (name "python-html5-parser")
5982 (version "0.4.4")
5983 (source (origin
5984 (method url-fetch)
5985 (uri (pypi-uri "html5-parser" version))
5986 (sha256
5987 (base32
5988 "1d8sxhl41ffh7qlk7wlsy17xw6slzx5v1yna9s72wx5qrpaa3wxr"))))
5989 (build-system python-build-system)
5990 (native-inputs
5991 `(("pkg-config" ,pkg-config)))
5992 (inputs
5993 `(("libxml2" ,libxml2)))
5994 (propagated-inputs
5995 `(("python-lxml" ,python-lxml)
5996 ("python-beautifulsoup4" ,python-beautifulsoup4)))
5997 (home-page "https://html5-parser.readthedocs.io")
5998 (synopsis "Fast C-based HTML5 parsing for Python")
5999 (description "This package provides a fast implementation of the HTML5
6000parsing spec for Python. Parsing is done in C using a variant of the gumbo
6001parser. The gumbo parse tree is then transformed into an lxml tree, also in
6002C, yielding parse times that can be a thirtieth of the html5lib parse times.")
6003 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
6004 ;; indicate ASL2.0, including the LICENSE file for the whole project.
6005 (license (list license:asl2.0 license:gpl3))))
6006
6007(define-public python2-html5-parser
6008 (package-with-python2 python-html5-parser))
6009
adbca19e
MB
6010(define-public python-webencodings
6011 (package
6012 (name "python-webencodings")
6013 (version "0.5")
6014 (source (origin
6015 (method url-fetch)
6016 (uri (pypi-uri "webencodings" version))
6017 (sha256
6018 (base32
6019 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
6020 (build-system python-build-system)
6021 (arguments
6022 '(#:phases
6023 (modify-phases %standard-phases
6024 (replace 'check
6025 (lambda _
6026 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
6027 (native-inputs
6028 `(("python-pytest" ,python-pytest)))
6029 (home-page "https://github.com/SimonSapin/python-webencodings")
6030 (synopsis "Character encoding aliases for legacy web content")
6031 (description
6032 "In order to be compatible with legacy web content when interpreting
6033something like @code{Content-Type: text/html; charset=latin1}, tools need
6034to use a particular set of aliases for encoding labels as well as some
6035overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
6036the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
6037or @code{UTF-16} BOM takes precedence over any other encoding declaration.
6038The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
6039defines all such details so that implementations do not have to
6040reverse-engineer each other.
6041
6042This module implements the Encoding standard and has encoding labels and
6043BOM detection, but the actual implementation for encoders and decoders
6044is Python’s.")
6045 (license license:bsd-3)))
6046
6047(define-public python2-webencodings
6048 (package-with-python2 python-webencodings))
6049
e99f4211
MW
6050(define-public python-urwid
6051 (package
6052 (name "python-urwid")
51ff41f6 6053 (version "1.3.1")
e99f4211
MW
6054 (source
6055 (origin
6056 (method url-fetch)
b97c1bfd 6057 (uri (pypi-uri "urwid" version))
e99f4211
MW
6058 (sha256
6059 (base32
51ff41f6 6060 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 6061 (build-system python-build-system)
b97c1bfd
LF
6062 (arguments
6063 `(#:phases
6064 (modify-phases %standard-phases
6065 ;; Disable failing test. Bug filed upstream:
6066 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 6067 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
6068 (add-after 'unpack 'disable-failing-test
6069 (lambda _
6070 (substitute* "urwid/tests/test_event_loops.py"
6071 (("test_remove_watch_file")
6072 "disable_remove_watch_file")))))))
e99f4211
MW
6073 (home-page "http://urwid.org")
6074 (synopsis "Console user interface library for Python")
6075 (description
6076 "Urwid is a curses-based UI/widget library for Python. It includes many
6077features useful for text console applications.")
3f641af0 6078 (license license:lgpl2.1+)))
e99f4211
MW
6079
6080(define-public python2-urwid
e9379305
MC
6081 (let ((python2-urwid (package-with-python2 python-urwid)))
6082 (package
6083 (inherit python2-urwid)
6084 (arguments
6085 (append
4fdab173
KK
6086 `(;; Explicitly using Python 2 is necessary due the argument list being
6087 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
6088 ;; package arguments, which by default assumes the use of Python 3.
6089 #:python ,python-2
6090 #:phases
e9379305
MC
6091 (modify-phases %standard-phases
6092 ;; Disable the vterm tests because of non-deterministic failures
6093 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
6094 (add-after 'unpack 'delete-test_vterm.py
6095 (delete-file "urwid/tests/test_vterm.py"))))
6096 (package-arguments python-urwid))))))
d95a56c6 6097
5220022a
JL
6098(define-public python-openid
6099 (package
6100 (name "python-openid")
6101 (version "3.0.10")
6102 (source
6103 (origin
6104 (method url-fetch)
6105 (uri (pypi-uri "python3-openid" version))
6106 (sha256
6107 (base32
6108 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
6109 (build-system python-build-system)
0660d327
DM
6110 (arguments
6111 `(#:phases
6112 (modify-phases %standard-phases
6113 (replace 'check
6114 (lambda _
6115 (zero? (system* "./admin/runtests")))))))
f048db5a 6116 (properties `((python2-variant . ,(delay python2-openid))))
0660d327
DM
6117 (propagated-inputs
6118 `(("python-defusedxml" ,python-defusedxml)))
6119 (native-inputs
6120 `(("python-psycopg2" ,python-psycopg2)
6121 ("python-django" ,python-django)))
5220022a
JL
6122 (home-page "https://github.com/necaris/python3-openid")
6123 (synopsis "OpenID support for servers and consumers")
6124 (description "This library provides OpenID authentication for Python, both
6125for clients and servers.")
6126 (license license:asl2.0)))
6127
3ef00f56 6128(define-public python2-openid
6129 (package
6130 (name "python2-openid")
6131 (version "2.2.5")
6132 (source
6133 (origin
6134 (method url-fetch)
6135 (uri (pypi-uri "python-openid" version))
6136 (sha256
6137 (base32
6138 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
6139 (build-system python-build-system)
6140 (arguments
6141 ;; Python 3 support is in `python3-openid`, a separate package.
6142 `(#:python ,python-2))
6143 (home-page "https://github.com/openid/python-openid")
6144 (synopsis "OpenID support for servers and consumers")
6145 (description "This library provides OpenID authentication for Python, both
6146for clients and servers.")
6147 (license license:asl2.0)))
6148
47d0b292
TS
6149(define-public python-urwidtrees
6150 (package
6151 (name "python-urwidtrees")
37ec4623 6152 (version "1.0.2")
47d0b292
TS
6153 (source
6154 (origin
6155 (method url-fetch)
37ec4623
TS
6156 ;; package author intends on distributing via github rather than pypi:
6157 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
6158 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
6159 version ".tar.gz"))
6160 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
6161 (sha256
6162 (base32
37ec4623 6163 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
6164 (build-system python-build-system)
6165 (arguments
6166 '(#:tests? #f)) ; no tests
f22efa01 6167 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
6168 (home-page "https://github.com/pazz/urwidtrees")
6169 (synopsis "Tree widgets for urwid")
6170 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6171toolkit. Use it to build trees of widgets.")
3f641af0 6172 (license license:gpl3+)))
47d0b292
TS
6173
6174(define-public python2-urwidtrees
6175 (package-with-python2 python-urwidtrees))
6176
d95a56c6
PAR
6177(define-public python-dbus
6178 (package
6179 (name "python-dbus")
6180 (version "1.2.0")
6181 (source
6182 (origin
6183 (method url-fetch)
6184 (uri (string-append
5cc3096c 6185 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
6186 version ".tar.gz"))
6187 (sha256
6188 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
6189 (build-system gnu-build-system)
6717c879
SB
6190 (arguments
6191 '(#:phases
6192 (modify-phases %standard-phases
6193 (add-before
6194 'check 'pre-check
6195 (lambda _
6196 ;; XXX: For the missing '/etc/machine-id'.
6197 (substitute* "test/run-test.sh"
6198 (("DBUS_FATAL_WARNINGS=1")
6199 "DBUS_FATAL_WARNINGS=0"))
6200 #t)))))
d95a56c6
PAR
6201 (native-inputs
6202 `(("pkg-config" ,pkg-config)))
6203 (inputs
6204 `(("python" ,python)
2e88d113 6205 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
6206 (synopsis "Python bindings for D-bus")
6207 (description "python-dbus provides bindings for libdbus, the reference
6208implementation of D-Bus.")
6209 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 6210 (license license:expat)))
b52af02b
MW
6211
6212(define-public python2-dbus
6213 (package (inherit python-dbus)
6214 (name "python2-dbus")
6215 (inputs `(("python" ,python-2)
6216 ,@(alist-delete "python"
6217 (package-inputs python-dbus)
6218 equal?)))
6219 ;; FIXME: on Python 2, the test_utf8 fails with:
6220 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
6221 (arguments `(#:tests? #f))))
a6ac8332
AE
6222
6223(define-public python-apsw
6224 (package
6225 (name "python-apsw")
917708c2 6226 (version "3.9.2-r1")
a6ac8332
AE
6227 (source
6228 (origin
6229 (method url-fetch)
917708c2 6230 (uri (pypi-uri "apsw" version))
a6ac8332
AE
6231 (sha256
6232 (base32
917708c2 6233 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
6234 (build-system python-build-system)
6235 (inputs
f3b98f4f 6236 `(("sqlite" ,sqlite)))
a6ac8332
AE
6237 (arguments
6238 `(#:phases
154d207c 6239 (modify-phases %standard-phases
cfd34f43
JL
6240 (replace 'build
6241 (lambda _
6242 (zero?
6243 (system* "python" "setup.py" "build" "--enable-all-extensions"))))
6244 (add-after 'build 'build-test-helper
6245 (lambda _
6246 (zero?
6247 (system
6248 (string-append "gcc -fPIC -shared -o ./testextension.sqlext "
6249 "-I. -Isqlite3 src/testextension.c") ))))
154d207c
MB
6250 (delete 'check)
6251 (add-after 'install 'check
6252 (lambda* (#:key inputs outputs #:allow-other-keys)
6253 (add-installed-pythonpath inputs outputs)
6254 (zero? (system* "python" "setup.py" "test")))))))
a6ac8332
AE
6255 (home-page "https://github.com/rogerbinns/apsw/")
6256 (synopsis "Another Python SQLite Wrapper")
6257 (description "APSW is a Python wrapper for the SQLite
6258embedded relational database engine. In contrast to other wrappers such as
6259pysqlite it focuses on being a minimal layer over SQLite attempting just to
6260translate the complete SQLite API into Python.")
abde5f37 6261 (license license:zlib)))
a6ac8332
AE
6262
6263(define-public python2-apsw
6264 (package-with-python2 python-apsw))
26b307e2
AE
6265
6266(define-public python-lxml
6267 (package
6268 (name "python-lxml")
2054b522 6269 (version "3.8.0")
26b307e2
AE
6270 (source
6271 (origin
6272 (method url-fetch)
97bbc480 6273 (uri (pypi-uri "lxml" version))
26b307e2 6274 (sha256
d58a3203 6275 (base32
2054b522 6276 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
26b307e2
AE
6277 (build-system python-build-system)
6278 (inputs
6279 `(("libxml2" ,libxml2)
f3b98f4f 6280 ("libxslt" ,libxslt)))
26b307e2
AE
6281 (home-page "http://lxml.de/")
6282 (synopsis
6283 "Python XML processing library")
6284 (description
6285 "The lxml XML toolkit is a Pythonic binding for the C libraries
6286libxml2 and libxslt.")
3f641af0 6287 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
6288
6289(define-public python2-lxml
6290 (package-with-python2 python-lxml))
4ed20663 6291
b32a1e47
CAW
6292;; beautifulsoup4 has a totally different namespace than 3.x,
6293;; and pypi seems to put it under its own name, so I guess we should too
6294(define-public python-beautifulsoup4
6295 (package
6296 (name "python-beautifulsoup4")
80e8d851 6297 (version "4.5.3")
b32a1e47
CAW
6298 (source
6299 (origin
6300 (method url-fetch)
6301 (uri (pypi-uri "beautifulsoup4" version))
6302 (sha256
6303 (base32
80e8d851 6304 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
b32a1e47 6305 (build-system python-build-system)
5f37f0b6
LF
6306 (arguments
6307 `(#:phases
6308 (modify-phases %standard-phases
6309 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6310 ;; must use this conversion script when building with Python 3. The
6311 ;; conversion script also runs the tests.
6312 ;; For more information, see the file 'convert-py3k' in the source
6313 ;; distribution.
6314 (replace 'check
6315 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
6316 (home-page
6317 "http://www.crummy.com/software/BeautifulSoup/bs4/")
6318 (synopsis
6319 "Python screen-scraping library")
6320 (description
6321 "Beautiful Soup is a Python library designed for rapidly setting up
6322screen-scraping projects. It offers Pythonic idioms for navigating,
6323searching, and modifying a parse tree, providing a toolkit for
6324dissecting a document and extracting what you need. It automatically
6325converts incoming documents to Unicode and outgoing documents to UTF-8.")
ee94ca11
MB
6326 (license license:expat)
6327 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
b32a1e47
CAW
6328
6329(define-public python2-beautifulsoup4
6330 (package
6331 (inherit (package-with-python2
6332 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 6333 (arguments `(#:python ,python-2))))
b32a1e47 6334
4dcb135e 6335(define-public python-cssutils
092e86f5 6336 (package
4dcb135e 6337 (name "python-cssutils")
58d1d816 6338 (version "1.0.1")
092e86f5
AE
6339 (source
6340 (origin
6341 (method url-fetch)
58d1d816 6342 (uri (pypi-uri "cssutils" version))
092e86f5 6343 (sha256
58d1d816
EF
6344 (base32
6345 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
6346 (build-system python-build-system)
6347 (native-inputs
4dcb135e 6348 `(("unzip" ,unzip))) ; for unpacking the source
092e86f5 6349 (arguments
4dcb135e 6350 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
092e86f5
AE
6351 (home-page "http://cthedot.de/cssutils/")
6352 (synopsis
6353 "CSS Cascading Style Sheets library for Python")
6354 (description
6355 "Cssutils is a Python package for parsing and building CSS
6356Cascading Style Sheets. Currently it provides a DOM only and no rendering
6357options.")
3f641af0 6358 (license license:lgpl3+)))
880ff77c 6359
4dcb135e
EB
6360(define-public python2-cssutils
6361 (package-with-python2 python-cssutils))
6362
880ff77c
AE
6363(define-public python-cssselect
6364 (package
6365 (name "python-cssselect")
d5ccd9ab 6366 (version "0.9.2")
880ff77c
AE
6367 (source
6368 (origin
6369 (method url-fetch)
d5ccd9ab 6370 (uri (pypi-uri "cssselect" version))
880ff77c 6371 (sha256
d5ccd9ab
EF
6372 (base32
6373 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 6374 (build-system python-build-system)
880ff77c
AE
6375 (arguments
6376 ;; tests fail with message
6377 ;; AttributeError: 'module' object has no attribute 'tests'
6378 `(#:tests? #f))
6379 (home-page
6380 "https://pythonhosted.org/cssselect/")
6381 (synopsis
6382 "CSS3 selector parser and translator to XPath 1.0")
6383 (description
6384 "Cssselect ia a Python module that parses CSS3 Selectors and translates
6385them to XPath 1.0 expressions. Such expressions can be used in lxml or
6386another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 6387 (license license:bsd-3)))
880ff77c
AE
6388
6389(define-public python2-cssselect
6390 (package-with-python2 python-cssselect))
60357f99 6391
03702173 6392(define-public python-openid-cla
6393 (package
6394 (name "python-openid-cla")
6395 (version "1.2")
6396 (source
6397 (origin
6398 (method url-fetch)
6399 (uri (pypi-uri "python-openid-cla" version))
6400 (sha256
6401 (base32
6402 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
6403 (build-system python-build-system)
019ccdb6 6404 (arguments '(#:tests? #f)) ; No tests.
03702173 6405 (home-page "https://github.com/puiterwijk/python-openid-cla/")
6406 (synopsis "Implementation of the OpenID CLA extension for python-openid")
6407 (description "@code{openid-cla} is an implementation of the OpenID
6408contributor license agreement extension for python-openid.")
6409 (license license:bsd-3)))
6410
6411(define-public python2-openid-cla
6412 (package-with-python2 python-openid-cla))
6413
a0e41de4 6414(define-public python-openid-teams
6415 (package
6416 (name "python-openid-teams")
6417 (version "1.1")
6418 (source
6419 (origin
6420 (method url-fetch)
6421 (uri (pypi-uri "python-openid-teams" version))
6422 (sha256
6423 (base32
6424 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
6425 (build-system python-build-system)
ac72d3d2 6426 (arguments '(#:tests? #f)) ; No tests.
a0e41de4 6427 (home-page "https://github.com/puiterwijk/python-openid-teams/")
6428 (synopsis "Implementation of the OpenID teams extension for python-openid")
6429 (description
6430 "@code{openid-teams} is an implementation of the OpenID
6431teams extension for python-openid.")
6432 (license license:bsd-3)))
6433
6434(define-public python2-openid-teams
6435 (package-with-python2 python-openid-teams))
6436
60357f99
AE
6437(define-public python-netifaces
6438 (package
6439 (name "python-netifaces")
6440 (version "0.10.4")
6441 (source
6442 (origin
6443 (method url-fetch)
6444 (uri (string-append
6445 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
6446 version
6447 ".tar.gz"))
6448 (sha256
6449 (base32
6450 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
6451 (build-system python-build-system)
60357f99
AE
6452 (home-page
6453 "https://bitbucket.org/al45tair/netifaces")
6454 (synopsis
6455 "Python module for portable network interface information")
6456 (description
6457 "Netifaces is a Python module providing information on network
6458interfaces in an easy and portable manner.")
6459 (license license:expat)))
6460
6461(define-public python2-netifaces
6462 (package-with-python2 python-netifaces))
92cb152b 6463
32f77c04
RW
6464(define-public python-networkx
6465 (package
6466 (name "python-networkx")
a4d9609c 6467 (version "1.11")
32f77c04
RW
6468 (source
6469 (origin
6470 (method url-fetch)
a4d9609c 6471 (uri (pypi-uri "networkx" version))
32f77c04 6472 (sha256
a4d9609c 6473 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
6474 (build-system python-build-system)
6475 ;; python-decorator is needed at runtime
6476 (propagated-inputs
6477 `(("python-decorator" ,python-decorator)))
6478 (native-inputs
f3b98f4f 6479 `(("python-nose" ,python-nose)))
32f77c04
RW
6480 (home-page "http://networkx.github.io/")
6481 (synopsis "Python module for creating and manipulating graphs and networks")
6482 (description
6483 "NetworkX is a Python package for the creation, manipulation, and study
6484of the structure, dynamics, and functions of complex networks.")
3f641af0 6485 (license license:bsd-3)))
32f77c04
RW
6486
6487(define-public python2-networkx
6488 (package-with-python2 python-networkx))
6489
92cb152b
RW
6490(define-public snakemake
6491 (package
6492 (name "snakemake")
1fb9b678 6493 (version "3.13.3")
92cb152b
RW
6494 (source
6495 (origin
6496 (method url-fetch)
7b93d866 6497 (uri (pypi-uri "snakemake" version))
92cb152b 6498 (sha256
1fb9b678 6499 (base32 "1nixb944r4hlskwkzc4wjs34b40xpxpw9gmhhm5p09gvmm22ap5d"))))
92cb152b 6500 (build-system python-build-system)
7b93d866
MB
6501 (arguments
6502 ;; TODO: Package missing test dependencies.
e61bc976
RW
6503 '(#:tests? #f
6504 #:phases
6505 (modify-phases %standard-phases
6506 ;; For cluster execution Snakemake will call Python. Since there is
6507 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6508 ;; this by calling the snakemake wrapper instead.
6509 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6510 (lambda* (#:key outputs #:allow-other-keys)
6511 (substitute* "snakemake/executors.py"
6512 (("\\{sys.executable\\} -m snakemake")
6513 (string-append (assoc-ref outputs "out")
6514 "/bin/snakemake")))
6515 #t)))))
4f9998c6
RW
6516 (propagated-inputs
6517 `(("python-wrapt" ,python-wrapt)
6518 ("python-requests" ,python-requests)))
7b93d866 6519 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
6520 (synopsis "Python-based execution environment for make-like workflows")
6521 (description
6522 "Snakemake aims to reduce the complexity of creating workflows by
6523providing a clean and modern domain specific specification language (DSL) in
6524Python style, together with a fast and comfortable execution environment.")
6525 (license license:expat)))
a1920bc9 6526
35de1fbd
RW
6527(define-public python-seaborn
6528 (package
6529 (name "python-seaborn")
ccc18762 6530 (version "0.7.1")
35de1fbd
RW
6531 (source
6532 (origin
6533 (method url-fetch)
fc899d4f 6534 (uri (pypi-uri "seaborn" version))
35de1fbd 6535 (sha256
ccc18762 6536 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
35de1fbd 6537 (build-system python-build-system)
6f976df6
MB
6538 (arguments
6539 '(#:tests? #f)) ; Tests requires a running X11 server.
35de1fbd
RW
6540 (propagated-inputs
6541 `(("python-pandas" ,python-pandas)
6542 ("python-matplotlib" ,python-matplotlib)
6543 ("python-scipy" ,python-scipy)))
35de1fbd
RW
6544 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6545 (synopsis "Statistical data visualization")
6546 (description
6547 "Seaborn is a library for making attractive and informative statistical
6548graphics in Python. It is built on top of matplotlib and tightly integrated
6549with the PyData stack, including support for numpy and pandas data structures
6550and statistical routines from scipy and statsmodels.")
3f641af0 6551 (license license:bsd-3)
fc899d4f 6552 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
6553
6554(define-public python2-seaborn
fc899d4f
EF
6555 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6556 (package
6557 (inherit base)
6558 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 6559 ,@(package-propagated-inputs base))))))
35de1fbd 6560
58a35665
MB
6561(define-public python-mpmath
6562 (package
6563 (name "python-mpmath")
6564 (version "0.19")
6565 (source (origin
6566 (method url-fetch)
6567 (uri (string-append "http://mpmath.org/files/mpmath-"
6568 version ".tar.gz"))
6569 (sha256
6570 (base32
6571 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6572 (build-system python-build-system)
6573 (arguments
6574 '(#:phases
6575 (modify-phases %standard-phases
6576 (replace 'check
6577 (lambda _
6578 (zero?
6579 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6580 (home-page "http://mpmath.org")
6581 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6582 (description
6583 "@code{mpmath} can be used as an arbitrary-precision substitute for
6584Python's float/complex types and math/cmath modules, but also does much
6585more advanced mathematics.")
6586 (license license:bsd-3)))
6587
6588(define-public python2-mpmath
6589 (package-with-python2 python-mpmath))
35de1fbd 6590
90fc547f
RW
6591(define-public python-sympy
6592 (package
6593 (name "python-sympy")
52f622ef 6594 (version "1.0")
90fc547f
RW
6595 (source
6596 (origin
6597 (method url-fetch)
6598 (uri (string-append
6599 "https://github.com/sympy/sympy/releases/download/sympy-"
6600 version "/sympy-" version ".tar.gz"))
6601 (sha256
52f622ef 6602 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
90fc547f 6603 (build-system python-build-system)
52f622ef
MB
6604 (propagated-inputs
6605 `(("python-mpmath" ,python-mpmath)))
90fc547f
RW
6606 (home-page "http://www.sympy.org/")
6607 (synopsis "Python library for symbolic mathematics")
6608 (description
6609 "SymPy is a Python library for symbolic mathematics. It aims to become a
6610full-featured computer algebra system (CAS) while keeping the code as simple
6611as possible in order to be comprehensible and easily extensible.")
3f641af0 6612 (license license:bsd-3)))
90fc547f
RW
6613
6614(define-public python2-sympy
6615 (package-with-python2 python-sympy))
6616
e8c9b010
SR
6617(define-public python-q
6618 (package
6619 (name "python-q")
6620 (version "2.6")
6621 (source
6622 (origin
6623 (method url-fetch)
6624 (uri (pypi-uri "q" version))
6625 (sha256
6626 (base32
6627 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6628 (build-system python-build-system)
6629 (home-page "https://github.com/zestyping/q")
6630 (synopsis "Quick-and-dirty debugging output for tired programmers")
6631 (description
6632 "q is a Python module for \"print\" style of debugging Python code. It
6633provides convenient short API for print out of values, tracebacks, and
6634falling into the Python interpreter.")
f210e944 6635 (license license:asl2.0)))
e8c9b010
SR
6636
6637(define-public python2-q
f210e944 6638 (package-with-python2 python-q))
e8c9b010 6639
a1920bc9
FB
6640(define-public python-testlib
6641 (package
6642 (name "python-testlib")
6643 (version "0.6.5")
6644 (source
6645 (origin
6646 (method url-fetch)
6647 (uri (string-append
6648 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6649 version ".zip"))
6650 (sha256
6651 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6652 (build-system python-build-system)
a1920bc9 6653 (native-inputs
632735f2 6654 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
6655 (synopsis "Python micro test suite harness")
6656 (description "A micro unittest suite harness for Python.")
6657 (home-page "https://github.com/trentm/testlib")
1cb9c006 6658 (license license:expat)))
a1920bc9
FB
6659
6660(define-public python2-testlib
6661 (package-with-python2 python-testlib))
db62afa5
LC
6662
6663(define-public python2-xlib
6664 (package
6665 (name "python2-xlib")
6666 (version "0.14")
6667 (source (origin
6668 (method url-fetch)
de67e922
LF
6669 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6670 "/" version "/"
db62afa5
LC
6671 "python-xlib-" version ".tar.gz"))
6672 (sha256
6673 (base32
6674 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6675 (build-system python-build-system)
6676 (arguments
6677 `(#:python ,python-2 ;Python 2 only
6678 #:tests? #f)) ;no tests
db62afa5
LC
6679 (home-page "http://python-xlib.sourceforge.net/")
6680 (synopsis "Python X11 client library")
6681 (description
6682 "The Python X Library is intended to be a fully functional X client
6683library for Python programs. It is useful to implement low-level X clients.
6684It is written entirely in Python.")
3f641af0 6685 (license license:gpl2+)))
0234ca06
DT
6686
6687(define-public python-singledispatch
6688 (package
6689 (name "python-singledispatch")
6690 (version "3.4.0.3")
6691 (source
6692 (origin
6693 (method url-fetch)
bdb67d84 6694 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
6695 (sha256
6696 (base32
6697 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6698 (build-system python-build-system)
5e1c9d24
HG
6699 (native-inputs
6700 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
6701 (home-page
6702 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6703 (synopsis "Backport of singledispatch feature from Python 3.4")
6704 (description
6705 "This library brings functools.singledispatch from Python 3.4 to Python
67062.6-3.3.")
6707 (license license:expat)))
6708
6709(define-public python2-singledispatch
6710 (package-with-python2 python-singledispatch))
feaae484 6711
310d218f
RW
6712(define-public python-tornado
6713 (package
6714 (name "python-tornado")
6fdeb324 6715 (version "4.5.1")
310d218f
RW
6716 (source
6717 (origin
6718 (method url-fetch)
a724924b 6719 (uri (pypi-uri "tornado" version))
310d218f 6720 (sha256
6fdeb324 6721 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
310d218f 6722 (build-system python-build-system)
3fe2c209
MB
6723 (arguments
6724 '(;; FIXME: Two tests error out with:
6725 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6726 ;; #:phases
6727 ;; (modify-phases %standard-phases
6728 ;; (replace 'check
6729 ;; (lambda _
6730 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6731 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6732 ;; (zero? (system* "python" "-m" "tornado.test")))))
6733 #:tests? #f))
310d218f 6734 (native-inputs
b455439b 6735 `(("python-certifi" ,python-certifi)))
f22efa01 6736 (propagated-inputs
b455439b 6737 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 6738 (home-page "http://www.tornadoweb.org/")
310d218f
RW
6739 (synopsis "Python web framework and asynchronous networking library")
6740 (description
6741 "Tornado is a Python web framework and asynchronous networking library,
6742originally developed at FriendFeed. By using non-blocking network I/O,
6743Tornado can scale to tens of thousands of open connections, making it ideal
6744for long polling, WebSockets, and other applications that require a long-lived
6745connection to each user.")
3f641af0 6746 (license license:asl2.0)
b455439b 6747 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
6748
6749(define-public python2-tornado
b455439b 6750 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 6751 (package (inherit tornado)
f22efa01 6752 (propagated-inputs
310d218f
RW
6753 `(("python2-backport-ssl-match-hostname"
6754 ,python2-backport-ssl-match-hostname)
b455439b 6755 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 6756 ,@(package-propagated-inputs tornado))))))
310d218f 6757
c795bc79
CB
6758(define-public python-tornado-http-auth
6759 (package
6760 (name "python-tornado-http-auth")
6761 (version "1.1.0")
6762 (source
6763 (origin
6764 (method url-fetch)
6765 (uri (pypi-uri "tornado-http-auth" version))
6766 (sha256
6767 (base32
6768 "0znrgqd7k2s4ia474xizi6h3061zj4sn5n6cq76bkwl3wwshifn5"))))
6769 (build-system python-build-system)
6770 (propagated-inputs
6771 `(("python-tornado" ,python-tornado)))
6772 (home-page
6773 "https://github.com/gvalkov/tornado-http-auth")
6774 (synopsis
6775 "Digest and basic authentication module for Tornado")
6776 (description
6777 "Provides support for adding authentication to services using the Tornado
6778web framework, either via the basic or digest authentication schemes.")
6779 (license license:asl2.0)))
6780
6b59fc10
EF
6781;; the python- version can be removed with python-3.5
6782(define-public python-backports-abc
6783 (package
6784 (name "python-backports-abc")
27f9148e 6785 (version "0.5")
6b59fc10
EF
6786 (source
6787 (origin
6788 (method url-fetch)
6789 (uri (pypi-uri "backports_abc" version))
6790 (sha256
6791 (base32
27f9148e 6792 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6b59fc10 6793 (build-system python-build-system)
6b59fc10 6794 (home-page "https://github.com/cython/backports_abc")
66e07664 6795 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
6796 (description
6797 "Python-backports-abc provides a backport of additions to the
6798'collections.abc' module in Python-3.5.")
3f641af0 6799 (license license:psfl)))
6b59fc10
EF
6800
6801(define-public python2-backports-abc
6802 (package-with-python2 python-backports-abc))
6803
4ff9e868
OP
6804(define-public python-backports-csv
6805 (package
6806 (name "python-backports-csv")
6807 (version "1.0.5")
6808 (source
6809 (origin
6810 (method url-fetch)
6811 (uri (pypi-uri "backports.csv" version))
6812 (sha256
6813 (base32
6814 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6815 (build-system python-build-system)
6816 (home-page "https://github.com/ryanhiebert/backports.csv")
6817 (synopsis "Backport of Python 3's csv module for Python 2")
6818 (description
6819 "Provides a backport of Python 3's @code{csv} module for parsing
6820comma separated values. The API of the @code{csv} module in Python 2
6821is drastically different from the @code{csv} module in Python 3.
6822This is due, for the most part, to the difference between str in
6823Python 2 and Python 3.")
6824 (license license:psfl)))
6825
6826(define-public python2-backports-csv
6827 (package-with-python2 python-backports-csv))
6828
ec074213
TD
6829(define-public python2-backports-shutil-get-terminal-size
6830 (package
6831 (name "python2-backports-shutil-get-terminal-size")
6832 (version "1.0.0")
6833 (source
6834 (origin
6835 (method url-fetch)
6836 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6837 (sha256
6838 (base32
6839 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6840 (build-system python-build-system)
6841 (arguments
c0446791
MB
6842 `(#:python ,python-2
6843 #:phases
6844 (modify-phases %standard-phases
6845 (replace 'check
6846 (lambda _
6847 (zero? (system* "py.test" "-v")))))))
6848 (native-inputs
6849 `(("python2-pytest" ,python2-pytest)))
ec074213
TD
6850 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6851 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6852 (description
6853 "This package provides a backport of the @code{get_terminal_size
6854function} from Python 3.3's @code{shutil}.
6855Unlike the original version it is written in pure Python rather than C,
6856so it might be a tiny bit slower.")
6857 (license license:expat)))
6858
feaae484
SB
6859(define-public python-waf
6860 (package
6861 (name "python-waf")
27bf00e6 6862 (version "1.9.8")
feaae484
SB
6863 (source (origin
6864 (method url-fetch)
bae67829 6865 (uri (string-append "https://waf.io/"
feaae484
SB
6866 "waf-" version ".tar.bz2"))
6867 (sha256
6868 (base32
27bf00e6 6869 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
feaae484
SB
6870 (build-system python-build-system)
6871 (arguments
6872 '(#:phases
6873 (modify-phases %standard-phases
6874 (replace 'build
7dd55dfe
EF
6875 (lambda _
6876 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 6877 (replace 'check
7dd55dfe
EF
6878 (lambda _
6879 (zero? (system* "python" "waf" "--version"))))
feaae484 6880 (replace 'install
7dd55dfe
EF
6881 (lambda _
6882 (copy-file "waf" %output))))))
27bf00e6 6883 (home-page "https://waf.io/")
feaae484
SB
6884 (synopsis "Python-based build system")
6885 (description
6886 "Waf is a Python-based framework for configuring, compiling and installing
6887applications.")
3f641af0 6888 (license license:bsd-3)))
feaae484
SB
6889
6890(define-public python2-waf
6891 (package-with-python2 python-waf))
45203542
RW
6892
6893(define-public python-pyzmq
6894 (package
6895 (name "python-pyzmq")
3655ee76 6896 (version "15.1.0")
45203542
RW
6897 (source
6898 (origin
6899 (method url-fetch)
3655ee76 6900 (uri (pypi-uri "pyzmq" version))
45203542 6901 (sha256
3655ee76 6902 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
6903 (build-system python-build-system)
6904 (arguments
6905 `(#:configure-flags
6906 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6907 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6908 ;; --inplace' for 'python setup.py test' to work.
6909 #:tests? #f))
6910 (inputs
6911 `(("zeromq" ,zeromq)))
6912 (native-inputs
6913 `(("pkg-config" ,pkg-config)
f3b98f4f 6914 ("python-nose" ,python-nose)))
7bf837fd 6915 (home-page "https://github.com/zeromq/pyzmq")
45203542
RW
6916 (synopsis "Python bindings for 0MQ")
6917 (description
6918 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 6919 (license license:bsd-4)))
45203542
RW
6920
6921(define-public python2-pyzmq
6922 (package-with-python2 python-pyzmq))
d889e6c4
CR
6923
6924(define-public python-pep8
6925 (package
6926 (name "python-pep8")
db251311 6927 (version "1.7.0")
d889e6c4
CR
6928 (source
6929 (origin
6930 (method url-fetch)
db251311 6931 (uri (pypi-uri "pep8" version))
d889e6c4
CR
6932 (sha256
6933 (base32
db251311 6934 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 6935 (build-system python-build-system)
d889e6c4
CR
6936 (home-page "http://pep8.readthedocs.org/")
6937 (synopsis "Python style guide checker")
6938 (description
6939 "This tools checks Python code against some of the style conventions in
6940PEP 8.")
6941 (license license:expat)))
6942
6943(define-public python2-pep8
6944 (package-with-python2 python-pep8))
e31d7f44
CR
6945
6946(define-public python-pyflakes
6947 (package
6948 (name "python-pyflakes")
2abc3972 6949 (version "1.0.0")
e31d7f44
CR
6950 (source
6951 (origin
6952 (method url-fetch)
2abc3972 6953 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
6954 (sha256
6955 (base32
2abc3972 6956 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 6957 (build-system python-build-system)
e31d7f44
CR
6958 (home-page
6959 "https://github.com/pyflakes/pyflakes")
6960 (synopsis "Passive checker of Python programs")
6961 (description
6962 "Pyflakes statically checks Python source code for common errors.")
6963 (license license:expat)))
a59e017c 6964
7261d9eb
CR
6965(define-public python2-pyflakes
6966 (package-with-python2 python-pyflakes))
6967
a59e017c
CR
6968(define-public python-mccabe
6969 (package
6970 (name "python-mccabe")
c6ebd40d 6971 (version "0.4.0")
a59e017c
CR
6972 (source
6973 (origin
6974 (method url-fetch)
c6ebd40d 6975 (uri (pypi-uri "mccabe" version))
a59e017c
CR
6976 (sha256
6977 (base32
c6ebd40d 6978 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 6979 (build-system python-build-system)
328bb95d 6980 (native-inputs
c6ebd40d 6981 `(("python-pytest" ,python-pytest)
f3b98f4f 6982 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
6983 (home-page "https://github.com/flintwork/mccabe")
6984 (synopsis "McCabe checker, plugin for flake8")
6985 (description
6986 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6987complexity of Python source code.")
7362371d 6988 (license license:expat)))
a59e017c
CR
6989
6990(define-public python2-mccabe
6991 (package-with-python2 python-mccabe))
e8df8f47 6992
7477fbb1
CR
6993(define-public python-mccabe-0.2.1
6994 (package (inherit python-mccabe)
6995 (version "0.2.1")
6996 (source
6997 (origin
6998 (method url-fetch)
6999 (uri (pypi-uri "mccabe" version))
7000 (sha256
7001 (base32
f3b98f4f 7002 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
7003
7004(define-public python2-mccabe-0.2.1
7005 (package-with-python2 python-mccabe-0.2.1))
7006
e8df8f47
CR
7007;; Flake8 2.4.1 requires an older version of pep8.
7008;; This should be removed ASAP.
7009(define-public python-pep8-1.5.7
7010 (package (inherit python-pep8)
7011 (version "1.5.7")
7012 (source
7013 (origin
7014 (method url-fetch)
7015 (uri (string-append
7016 "https://pypi.python.org/packages/source/p/pep8/pep8-"
7017 version
7018 ".tar.gz"))
7019 (sha256
7020 (base32
73e3060d
MB
7021 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
7022 (arguments
7023 ;; XXX Tests not compatible with Python 3.5.
7024 '(#:tests? #f))))
e8df8f47
CR
7025
7026(define-public python2-pep8-1.5.7
7027 (package-with-python2 python-pep8-1.5.7))
7028
7029;; Flake8 2.4.1 requires an older version of pyflakes.
7030;; This should be removed ASAP.
7031(define-public python-pyflakes-0.8.1
7032 (package (inherit python-pyflakes)
7033 (version "0.8.1")
7034 (source
7035 (origin
7036 (method url-fetch)
7037 (uri (string-append
7038 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
7039 version
7040 ".tar.gz"))
7041 (sha256
7042 (base32
0d84e1ef
MB
7043 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
7044 (arguments
7045 ;; XXX Tests not compatible with Python 3.5.
7046 '(#:tests? #f))))
e8df8f47
CR
7047
7048(define-public python2-pyflakes-0.8.1
7261d9eb 7049 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
7050
7051(define-public python-flake8
7052 (package
7053 (name "python-flake8")
43789136 7054 (version "2.5.4")
e8df8f47
CR
7055 (source
7056 (origin
7057 (method url-fetch)
1b995533 7058 (uri (pypi-uri "flake8" version))
e8df8f47
CR
7059 (sha256
7060 (base32
011271c7
HG
7061 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
7062 (modules '((guix build utils)))
7063 (snippet
7064 '(begin
7065 ;; Remove pre-compiled .pyc files from source.
7066 (for-each delete-file-recursively
7067 (find-files "." "__pycache__" #:directories? #t))
7068 (for-each delete-file (find-files "." "\\.pyc$"))
7069 #t))))
e8df8f47 7070 (build-system python-build-system)
482d9591 7071 (propagated-inputs
f3b98f4f 7072 `(("python-pep8" ,python-pep8)
43789136 7073 ("python-pyflakes" ,python-pyflakes)
482d9591 7074 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
7075 (native-inputs
7076 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
7077 ("python-nose" ,python-nose)))
7078 (home-page "https://gitlab.com/pycqa/flake8")
7079 (synopsis
7080 "The modular source code checker: pep8, pyflakes and co")
7081 (description
7082 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
7083 (license license:expat)))
7084
7085(define-public python2-flake8
7086 (package-with-python2 python-flake8))
61b9ac53 7087
1f42d824
MFM
7088(define-public python-flake8-polyfill
7089 (package
7090 (name "python-flake8-polyfill")
7091 (version "1.0.1")
7092 (source
7093 (origin
7094 (method url-fetch)
7095 (uri (pypi-uri "flake8-polyfill" version))
7096 (sha256
7097 (base32
7098 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
7099 (build-system python-build-system)
2c1cad7a
MB
7100 (arguments
7101 '(#:phases
7102 (modify-phases %standard-phases
7103 (replace 'check
7104 (lambda _
7105 (setenv "PYTHONPATH"
7106 (string-append (getcwd) "/build/lib:"
7107 (getenv "PYTHONPATH")))
7108 (zero? (system* "py.test" "-v")))))))
7109 (native-inputs
7110 `(("python-flake8" ,python-flake8)
7111 ("python-mock" ,python-mock)
7112 ("python-pycodestyle" ,python-pycodestyle)
7113 ("python-pytest" ,python-pytest)))
1f42d824
MFM
7114 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7115 (synopsis "Polyfill package for Flake8 plugins")
7116 (description
7117 "This package that provides some compatibility helpers for Flake8
7118plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7119 (license license:expat)))
7120
7121(define-public python2-flake8-polyfill
7122 (package-with-python2 python-flake8-polyfill))
7123
61b9ac53
FB
7124(define-public python-mistune
7125 (package
7126 (name "python-mistune")
08b81336 7127 (version "0.7.3")
61b9ac53
FB
7128 (source
7129 (origin
7130 (method url-fetch)
eff8d773 7131 (uri (pypi-uri "mistune" version))
61b9ac53
FB
7132 (sha256
7133 (base32
08b81336 7134 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
61b9ac53 7135 (build-system python-build-system)
328bb95d 7136 (native-inputs
f3b98f4f 7137 `(("python-nose" ,python-nose)
61b9ac53
FB
7138 ("python-cython" ,python-cython)))
7139 (home-page "https://github.com/lepture/mistune")
7140 (synopsis "Markdown parser in pure Python")
7141 (description "This package provides a fast markdown parser in pure
7142Python.")
3f641af0 7143 (license license:bsd-3)))
61b9ac53
FB
7144
7145(define-public python2-mistune
7146 (package-with-python2 python-mistune))
6d992d07 7147
b9893908
EE
7148(define-public python-markdown
7149 (package
7150 (name "python-markdown")
4ffbe8c6 7151 (version "2.6.8")
b9893908
EE
7152 (source
7153 (origin
7154 (method url-fetch)
7155 (uri (pypi-uri "Markdown" version))
7156 (sha256
7157 (base32
4ffbe8c6 7158 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
b9893908
EE
7159 (build-system python-build-system)
7160 (arguments
7161 `(#:phases
7162 (modify-phases %standard-phases
7163 (replace 'check
7164 (lambda _
7165 (zero? (system* "python" "run-tests.py")))))))
7166 (native-inputs
7167 `(("python-nose" ,python-nose)
7168 ("python-pyyaml" ,python-pyyaml)))
7169 (home-page "https://pythonhosted.org/Markdown/")
7170 (synopsis "Python implementation of Markdown")
7171 (description
7172 "This package provides a Python implementation of John Gruber's
7173Markdown. The library features international input, various Markdown
7174extensions, and several HTML output formats. A command line wrapper
7175markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 7176 (license license:bsd-3)))
b9893908
EE
7177
7178(define-public python2-markdown
7179 (package-with-python2 python-markdown))
7180
6d992d07
FB
7181(define-public python-ptyprocess
7182 (package
7183 (name "python-ptyprocess")
70fc93cb 7184 (version "0.5.1")
6d992d07
FB
7185 (source
7186 (origin
7187 (method url-fetch)
7188 (uri (string-append
7189 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
7190 version ".tar.gz"))
7191 (sha256
7192 (base32
70fc93cb 7193 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6d992d07 7194 (build-system python-build-system)
328bb95d 7195 (native-inputs
f3b98f4f 7196 `(("python-nose" ,python-nose)))
6d992d07
FB
7197 (arguments
7198 `(#:phases
7199 (modify-phases %standard-phases
7200 (replace 'check
7201 (lambda _
7202 (zero? (system* "nosetests")))))))
7203 (home-page "https://github.com/pexpect/ptyprocess")
7204 (synopsis "Run a subprocess in a pseudo terminal")
7205 (description
7206 "This package provides a Python library used to launch a subprocess in a
7207pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 7208 (license license:isc)))
6d992d07
FB
7209
7210(define-public python2-ptyprocess
7211 (package-with-python2 python-ptyprocess))
4aadb1df 7212
df893a38
MB
7213(define-public python-cram
7214 (package
7215 (name "python-cram")
7216 (version "0.7")
7217 (home-page "https://bitheap.org/cram/")
7218 (source (origin
7219 (method url-fetch)
7220 (uri (list (string-append home-page "cram-"
7221 version ".tar.gz")
7222 (pypi-uri "cram" version)))
7223 (sha256
7224 (base32
7225 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7226 (arguments
7227 '(#:phases
7228 (modify-phases %standard-phases
7229 (add-after 'unpack 'patch-source
7230 (lambda _
7231 (substitute* (find-files "cram" ".*\\.py$")
7232 ;; Replace default shell path.
7233 (("/bin/sh") (which "sh")))
7234 (substitute* (find-files "tests" ".*\\.t$")
7235 (("md5") "md5sum")
7236 (("/bin/bash") (which "bash"))
7237 (("/bin/sh") (which "sh")))
7238 (substitute* "cram/_test.py"
7239 ;; This hack works around a bug triggered by substituting
7240 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7241 ;; "cram -h", which breaks the output at 80 characters. This
7242 ;; causes the line showing the default shell to break into two
7243 ;; lines, but the test expects a single line...
7244 (("env\\['COLUMNS'\\] = '80'")
7245 "env['COLUMNS'] = '160'"))
7246 #t))
7247 (delete 'check)
7248 (add-after 'install 'check
7249 ;; The test phase uses the built library and executable.
7250 ;; It's easier to run it after install since the build
7251 ;; directory contains version-specific PATH.
7252 (lambda* (#:key inputs outputs #:allow-other-keys)
7253 (add-installed-pythonpath inputs outputs)
7254 (setenv "PATH" (string-append (getenv "PATH") ":"
7255 (assoc-ref outputs "out") "/bin"))
7256 (zero? (system* "make" "test")))))))
7257 (build-system python-build-system)
7258 (native-inputs
7259 `(("python-coverage" ,python-coverage)
7260 ("which" ,which)))
7261 (synopsis "Simple testing framework for command line applications")
7262 (description
7263 "Cram is a functional testing framework for command line applications.
7264Cram tests look like snippets of interactive shell sessions. Cram runs each
7265command and compares the command output in the test with the command’s actual
7266output.")
7267 (license license:gpl2+)))
7268
7269(define-public python2-cram
7270 (package-with-python2 python-cram))
7271
4aadb1df
FB
7272(define-public python-terminado
7273 (package
7274 (name "python-terminado")
783fb0a3 7275 (version "0.6")
4aadb1df
FB
7276 (source
7277 (origin
7278 (method url-fetch)
783fb0a3 7279 (uri (pypi-uri "terminado" version))
4aadb1df
FB
7280 (sha256
7281 (base32
783fb0a3 7282 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
7283 (build-system python-build-system)
7284 (propagated-inputs
7285 `(("python-tornado" ,python-tornado)
7286 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
7287 (native-inputs
7288 `(("python-nose" ,python-nose)))
4aadb1df
FB
7289 (arguments
7290 `(#:phases
7291 (modify-phases %standard-phases
7292 (replace 'check
7293 (lambda _
7294 (zero? (system* "nosetests")))))))
7295 (home-page "https://github.com/takluyver/terminado")
7296 (synopsis "Terminals served to term.js using Tornado websockets")
7297 (description "This package provides a Tornado websocket backend for the
7298term.js Javascript terminal emulator library.")
3f641af0 7299 (license license:bsd-2)
783fb0a3 7300 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
7301
7302(define-public python2-terminado
783fb0a3 7303 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 7304 (package (inherit terminado)
783fb0a3
EF
7305 (propagated-inputs
7306 `(("python2-backport-ssl-match-hostname"
7307 ,python2-backport-ssl-match-hostname)
00e10c6e 7308 ,@(package-propagated-inputs terminado))))))
5faa5ce4 7309
789de5e2 7310(define-public python-straight-plugin
7311 (package
7312 (name "python-straight-plugin")
7313 (version "1.4.1")
7314 (source
7315 (origin
7316 (method url-fetch)
7317 (uri (pypi-uri "straight.plugin" version))
7318 (sha256
7319 (base32
7320 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7321 (build-system python-build-system)
7322 (home-page "https://github.com/ironfroggy/straight.plugin")
7323 (synopsis "Simple namespaced plugin facility")
7324 (description "Straight Plugin provides a type of plugin you can create from
7325almost any existing Python modules, and an easy way for outside developers to
7326add functionality and customization to your projects with their own plugins.")
7327 (license license:expat)))
7328
7329(define-public python2-straight-plugin
7330 (package-with-python2 python-straight-plugin))
7331
d582eaac
SB
7332(define-public python-fonttools
7333 (package
7334 (name "python-fonttools")
7335 (version "2.5")
7336 (source (origin
7337 (method url-fetch)
7338 (uri (string-append
7339 "https://pypi.python.org/packages/source/F/FontTools/"
7340 "fonttools-" version ".tar.gz"))
7341 (sha256
7342 (base32
7343 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
7344 (build-system python-build-system)
9e8c6a37
HG
7345 (arguments
7346 '(#:test-target "check"
7347 #:phases
7348 (modify-phases %standard-phases
7349 (add-after 'unpack 'patch-setuppy
7350 ;; Remove the undocumented "extra_path" argument, which adds an
7351 ;; intervening directories between site-packages and the package
7352 ;; directory.
7353 (lambda _
7354 (substitute* "setup.py"
7355 (("^[ \t]*extra_path *= *'FontTools',") ""))
7356 #t)))))
7bf837fd 7357 (home-page "https://github.com/behdad/fonttools")
d582eaac
SB
7358 (synopsis "Tools to manipulate font files")
7359 (description
7360 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 7361supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
7362of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7363also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7364from an XML-based format.")
3f641af0
DC
7365 (license (license:non-copyleft
7366 "file://LICENSE.txt"
7367 "See LICENSE.txt in the distribution."))))
d582eaac
SB
7368
7369(define-public python2-fonttools
7370 (package-with-python2 python-fonttools))
75710da6 7371
5faa5ce4
RW
7372(define-public python-ly
7373 (package
7374 (name "python-ly")
5135354f 7375 (version "0.9.4")
5faa5ce4
RW
7376 (source
7377 (origin
7378 (method url-fetch)
5135354f
RW
7379 (uri (string-append "https://pypi.python.org/packages/57/4f/"
7380 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
7381 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
7382 (sha256
7383 (base32
5135354f 7384 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 7385 (build-system python-build-system)
972cf9be
MB
7386 (arguments
7387 ;; FIXME: Some tests need network access.
7388 '(#:tests? #f))
5faa5ce4
RW
7389 (synopsis "Tool and library for manipulating LilyPond files")
7390 (description "This package provides a Python library to parse, manipulate
7391or create documents in LilyPond format. A command line program ly is also
7392provided that can be used to do various manipulations with LilyPond files.")
7393 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 7394 (license license:gpl2+)))
7e7b27d9
CR
7395
7396(define-public python-appdirs
7397 (package
7398 (name "python-appdirs")
543782e1 7399 (version "1.4.3")
7e7b27d9
CR
7400 (source
7401 (origin
7402 (method url-fetch)
26b16fd9 7403 (uri (pypi-uri "appdirs" version))
7e7b27d9
CR
7404 (sha256
7405 (base32
543782e1 7406 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7e7b27d9 7407 (build-system python-build-system)
7bf837fd 7408 (home-page "https://github.com/ActiveState/appdirs")
7e7b27d9
CR
7409 (synopsis
7410 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7411 (description
7412 "This module provides a portable way of finding out where user data
7413should be stored on various operating systems.")
7414 (license license:expat)))
7415
7416(define-public python2-appdirs
7417 (package-with-python2 python-appdirs))
89b2e0b0
LF
7418
7419(define-public python-llfuse
7420 (package
7421 (name "python-llfuse")
4d31d143 7422 (version "1.2")
89b2e0b0
LF
7423 (source (origin
7424 (method url-fetch)
7425 (uri (string-append
7426 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7427 "llfuse-" version ".tar.bz2"))
7428 (sha256
7429 (base32
4d31d143 7430 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
89b2e0b0
LF
7431 (build-system python-build-system)
7432 (inputs
7433 `(("fuse" ,fuse)
7434 ("attr" ,attr)))
7435 (native-inputs
f3b98f4f 7436 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
7437 (synopsis "Python bindings for FUSE")
7438 (description
7439 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7440 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 7441 (license license:lgpl2.0+)
cd0569c4 7442 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
7443
7444(define-public python2-llfuse
cd0569c4
LF
7445 (package (inherit (package-with-python2
7446 (strip-python2-variant python-llfuse)))
7447 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7448
7449;; For attic-0.16
7450(define-public python-llfuse-0.41
7451 (package (inherit python-llfuse)
229b3661 7452 (version "0.41.1")
cd0569c4
LF
7453 (source (origin
7454 (method url-fetch)
7455 (uri (string-append
7456 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7457 "llfuse-" version ".tar.bz2"))
7458 (sha256
7459 (base32
229b3661 7460 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
7461 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7462 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 7463 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
7464
7465(define-public python-msgpack
7466 (package
7467 (name "python-msgpack")
aed625bd 7468 (version "0.4.8")
641c9871
LF
7469 (source (origin
7470 (method url-fetch)
ae831df4 7471 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
7472 (sha256
7473 (base32
aed625bd 7474 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 7475 (build-system python-build-system)
641c9871
LF
7476 (synopsis "MessagePack (de)serializer")
7477 (description "MessagePack is a fast, compact binary serialization format,
7478suitable for similar data to JSON. This package provides CPython bindings for
7479reading and writing MessagePack data.")
7480 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 7481 (license license:asl2.0)))
bd74be7b
LF
7482
7483(define-public python2-msgpack
f210e944 7484 (package-with-python2 python-msgpack))
641c9871 7485
6e5e39f4
CR
7486(define-public python-netaddr
7487 (package
7488 (name "python-netaddr")
e121be1e 7489 (version "0.7.19")
6e5e39f4
CR
7490 (source
7491 (origin
7492 (method url-fetch)
7493 (uri (string-append
7494 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
7495 version
7496 ".tar.gz"))
7497 (sha256
7498 (base32
e121be1e 7499 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6e5e39f4
CR
7500 (build-system python-build-system)
7501 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
7502 (home-page "https://github.com/drkjam/netaddr/")
7503 (synopsis "Pythonic manipulation of network addresses")
7504 (description
7505 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7506and MAC network addresses.")
3f641af0 7507 (license license:bsd-3)))
6e5e39f4
CR
7508
7509(define-public python2-netaddr
7510 (package-with-python2 python-netaddr))
8c692a52
CR
7511
7512(define-public python-wrapt
7513 (package
7514 (name "python-wrapt")
d25bee26 7515 (version "1.10.8")
8c692a52
CR
7516 (source
7517 (origin
7518 (method url-fetch)
d25bee26 7519 (uri (pypi-uri "wrapt" version))
8c692a52
CR
7520 (sha256
7521 (base32
d25bee26 7522 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
8c692a52
CR
7523 (build-system python-build-system)
7524 (arguments
7525 ;; Tests are not included in the tarball, they are only available in the
7526 ;; git repository.
7527 `(#:tests? #f))
8c692a52
CR
7528 (home-page "https://github.com/GrahamDumpleton/wrapt")
7529 (synopsis "Module for decorators, wrappers and monkey patching")
7530 (description
7531 "The aim of the wrapt module is to provide a transparent object proxy for
7532 Python, which can be used as the basis for the construction of function
7533 wrappers and decorator functions.")
3f641af0 7534 (license license:bsd-2)))
8c692a52
CR
7535
7536(define-public python2-wrapt
7537 (package-with-python2 python-wrapt))
b85c85be
CR
7538
7539(define-public python-iso8601
7540 (package
7541 (name "python-iso8601")
fe84bc9a 7542 (version "0.1.11")
b85c85be
CR
7543 (source
7544 (origin
7545 (method url-fetch)
fe84bc9a 7546 (uri (pypi-uri "iso8601" version))
b85c85be 7547 (sha256
fe84bc9a
EF
7548 (base32
7549 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 7550 (build-system python-build-system)
63b02364
MB
7551 (native-inputs
7552 `(("python-pytest" ,python-pytest)))
b85c85be
CR
7553 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7554 (synopsis "Module to parse ISO 8601 dates")
7555 (description
7556 "This module parses the most common forms of ISO 8601 date strings (e.g.
7557@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7558 (license license:expat)))
7559
7560(define-public python2-iso8601
7561 (package-with-python2 python-iso8601))
5e412b63
CR
7562
7563(define-public python-monotonic
7564 (package
7565 (name "python-monotonic")
7566 (version "0.3")
7567 (source
7568 (origin
7569 (method url-fetch)
7570 (uri (string-append
7571 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7572 version
7573 ".tar.gz"))
7574 (sha256
7575 (base32
7576 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7577 (build-system python-build-system)
5e412b63
CR
7578 (home-page "https://github.com/atdt/monotonic")
7579 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7580 (description
7581 "This module provides a monotonic() function which returns the value (in
7582fractional seconds) of a clock which never goes backwards.")
3f641af0 7583 (license license:asl2.0)))
5e412b63
CR
7584
7585(define-public python2-monotonic
7586 (package-with-python2 python-monotonic))
de34afac
CR
7587
7588(define-public python-webob
7589 (package
7590 (name "python-webob")
b8834c21 7591 (version "1.5.1")
de34afac
CR
7592 (source
7593 (origin
7594 (method url-fetch)
b8834c21 7595 (uri (pypi-uri "WebOb" version))
de34afac
CR
7596 (sha256
7597 (base32
b8834c21 7598 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 7599 (build-system python-build-system)
328bb95d 7600 (native-inputs
f3b98f4f 7601 `(("python-nose" ,python-nose)))
de34afac
CR
7602 (home-page "http://webob.org/")
7603 (synopsis "WSGI request and response object")
7604 (description
7605 "WebOb provides wrappers around the WSGI request environment, and an
7606object to help create WSGI responses.")
7607 (license license:expat)))
7608
7609(define-public python2-webob
7610 (package-with-python2 python-webob))
350ba0a3 7611
02a8a187
BW
7612(define-public python-xlrd
7613 (package
7614 (name "python-xlrd")
c2ad4d70 7615 (version "1.0.0")
02a8a187
BW
7616 (source (origin
7617 (method url-fetch)
e775f48e 7618 (uri (pypi-uri "xlrd" version))
02a8a187
BW
7619 (sha256
7620 (base32
c2ad4d70 7621 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
7622 (build-system python-build-system)
7623 (arguments
7624 `(#:phases
7625 (modify-phases %standard-phases
c2ad4d70 7626 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
7627 ;; run tests instead for now.
7628 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 7629 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
7630 (home-page "http://www.python-excel.org/")
7631 (synopsis "Library for extracting data from Excel files")
7632 (description "This packages provides a library to extract data from
c598e35c 7633spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
7634@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7635Unicode-aware. It is not intended as an end-user tool.")
3f641af0 7636 (license license:bsd-3)))
02a8a187
BW
7637
7638(define-public python2-xlrd
7639 (package-with-python2 python-xlrd))
7640
350ba0a3
CR
7641(define-public python-prettytable
7642 (package
7643 (name "python-prettytable")
7644 (version "0.7.2")
7645 (source
7646 (origin
7647 (method url-fetch)
7648 (uri (string-append
7649 "https://pypi.python.org/packages/source/P/PrettyTable/"
7650 "prettytable-" version ".tar.bz2"))
7651 (sha256
7652 (base32
7653 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7654 (build-system python-build-system)
350ba0a3
CR
7655 (home-page "http://code.google.com/p/prettytable/")
7656 (synopsis "Display tabular data in an ASCII table format")
7657 (description
7658 "A library designed to represent tabular data in visually appealing ASCII
7659tables. PrettyTable allows for selection of which columns are to be printed,
7660independent alignment of columns (left or right justified or centred) and
7661printing of sub-tables by specifying a row range.")
3f641af0 7662 (license license:bsd-3)))
350ba0a3
CR
7663
7664(define-public python2-prettytable
7665 (package-with-python2 python-prettytable))
7a8ac75a 7666
9f8ee3fe
RW
7667(define-public python-tables
7668 (package
7669 (name "python-tables")
7670 (version "3.2.2")
7671 (source
7672 (origin
7673 (method url-fetch)
7674 (uri (pypi-uri "tables" version))
7675 (sha256
7676 (base32
bac23672
HG
7677 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7678 (modules '((guix build utils)))
7679 (snippet
7680 '(begin
7681 ;; Remove pre-compiled .pyc files from source.
7682 (for-each delete-file-recursively
7683 (find-files "." "__pycache__" #:directories? #t))
7684 (for-each delete-file (find-files "." "\\.pyc$"))
7685 #t))))
9f8ee3fe
RW
7686 (build-system python-build-system)
7687 (arguments
7688 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7689 ;; or "check", so we must override the build and check phases.
7690 #:phases
7691 (modify-phases %standard-phases
7692 (add-after 'unpack 'use-gcc
7693 (lambda _
7694 (substitute* "setup.py"
7695 (("compiler = new_compiler\\(\\)" line)
7696 (string-append line
7697 "\ncompiler.set_executables(compiler='gcc',"
7698 "compiler_so='gcc',"
7699 "linker_exe='gcc',"
7700 "linker_so='gcc -shared')")))
7701 #t))
7702 (replace 'build
7703 (lambda* (#:key inputs #:allow-other-keys)
7704 (zero? (system* "python" "setup.py" "build"
7705 (string-append "--hdf5="
7706 (assoc-ref inputs "hdf5"))))))
7707 (replace 'check
7708 (lambda* (#:key inputs #:allow-other-keys)
7709 (zero? (system* "python" "setup.py" "check"
7710 (string-append "--hdf5="
7711 (assoc-ref inputs "hdf5")))))))))
7712 (propagated-inputs
7713 `(("python-numexpr" ,python-numexpr)
7714 ("python-numpy" ,python-numpy)))
7715 (native-inputs
f3b98f4f 7716 `(("python-cython" ,python-cython)
9f8ee3fe
RW
7717 ("pkg-config" ,pkg-config)))
7718 (inputs
7719 `(("hdf5" ,hdf5)
7720 ("bzip2" ,bzip2)
7721 ("zlib" ,zlib)))
7722 (home-page "http://www.pytables.org/")
7723 (synopsis "Hierarchical datasets for Python")
7724 (description "PyTables is a package for managing hierarchical datasets and
d1e4ad1b 7725designed to efficiently cope with extremely large amounts of data.")
3f641af0 7726 (license license:bsd-3)))
9f8ee3fe
RW
7727
7728(define-public python2-tables
7729 (package-with-python2 python-tables))
7730
7a8ac75a
RW
7731(define-public python-pyasn1
7732 (package
7733 (name "python-pyasn1")
5e0ddfba 7734 (version "0.2.3")
7a8ac75a
RW
7735 (source
7736 (origin
7737 (method url-fetch)
caa0edb3 7738 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
7739 (sha256
7740 (base32
5e0ddfba 7741 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7a8ac75a
RW
7742 (build-system python-build-system)
7743 (home-page "http://pyasn1.sourceforge.net/")
7744 (synopsis "ASN.1 types and codecs")
7745 (description
7746 "This is an implementation of ASN.1 types and codecs in Python. It is
7747suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 7748 (license license:bsd-2)))
7a8ac75a
RW
7749
7750(define-public python2-pyasn1
7751 (package-with-python2 python-pyasn1))
9a49a535 7752
5988c299
EF
7753(define-public python-pyasn1-modules
7754 (package
7755 (name "python-pyasn1-modules")
7756 (version "0.0.8")
7757 (source
7758 (origin
7759 (method url-fetch)
7760 (uri (pypi-uri "pyasn1-modules" version))
7761 (sha256
7762 (base32
7763 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7764 (build-system python-build-system)
5988c299
EF
7765 (propagated-inputs
7766 `(("python-pyasn1" ,python-pyasn1)))
3b3b60d0 7767 (home-page "https://sourceforge.net/projects/pyasn1/")
5988c299
EF
7768 (synopsis "ASN.1 codec implementations")
7769 (description
7770 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7771implementations of ASN.1-based codecs and protocols.")
3f641af0 7772 (license license:bsd-3)))
5988c299
EF
7773
7774(define-public python2-pyasn1-modules
7775 (package-with-python2 python-pyasn1-modules))
7776
520af157 7777(define-public python-ipaddress
9a49a535 7778 (package
520af157 7779 (name "python-ipaddress")
36e0d9db 7780 (version "1.0.18")
520af157
DC
7781 (source (origin
7782 (method url-fetch)
7783 (uri (pypi-uri "ipaddress" version))
7784 (sha256
7785 (base32
36e0d9db 7786 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
9a49a535 7787 (build-system python-build-system)
9a49a535
RW
7788 (home-page "https://github.com/phihag/ipaddress")
7789 (synopsis "IP address manipulation library")
7790 (description
520af157
DC
7791 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7792 in Python. This library is used to create, poke at, and manipulate IPv4 and
7793 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7794 module to older versions of Python.")
f210e944 7795 (license license:psfl)))
520af157
DC
7796
7797(define-public python2-ipaddress
f210e944 7798 (package-with-python2 python-ipaddress))
3f00e078 7799
4a238186
HG
7800(define-public python2-ipaddr
7801 (package
7802 (name "python2-ipaddr")
7803 (version "2.1.11")
7804 (source
7805 (origin
7806 (method url-fetch)
7807 (uri (pypi-uri "ipaddr" version))
7808 (sha256
7809 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7810 (build-system python-build-system)
7811 (arguments
7812 `(#:python ,python-2 ;version 2 only
7813 #:phases
7814 (modify-phases %standard-phases
7815 (replace 'check
7816 (lambda* _
7817 (zero? (system* "python" "ipaddr_test.py")))))))
7818 (home-page "https://github.com/google/ipaddr-py")
7819 (synopsis "IP address manipulation library")
7820 (description
7821 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7822IPv6 addresses and networks.
7823
7824For new implementations you may prefer to use the standard module
7825@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7826versions of Python.")
3f641af0 7827 (license license:asl2.0)))
4a238186 7828
3f00e078
RW
7829(define-public python-idna
7830 (package
7831 (name "python-idna")
37c04f91 7832 (version "2.5")
3f00e078
RW
7833 (source
7834 (origin
7835 (method url-fetch)
37c04f91 7836 (uri (pypi-uri "idna" version))
3f00e078
RW
7837 (sha256
7838 (base32
37c04f91 7839 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
3f00e078 7840 (build-system python-build-system)
3f00e078
RW
7841 (home-page "https://github.com/kjd/idna")
7842 (synopsis "Internationalized domain names in applications")
7843 (description
7844 "This is a library to support the Internationalised Domain Names in
7845Applications (IDNA) protocol as specified in RFC 5891. This version of the
7846protocol is often referred to as “IDNA2008” and can produce different results
7847from the earlier standard from 2003. The library is also intended to act as a
7848suitable drop-in replacement for the “encodings.idna” module that comes with
7849the Python standard library but currently only supports the older 2003
7850specification.")
3f641af0 7851 (license license:bsd-4)))
3f00e078
RW
7852
7853(define-public python2-idna
7854 (package-with-python2 python-idna))
36ebf972
RW
7855
7856(define-public python-pretend
7857 (package
7858 (name "python-pretend")
7859 (version "1.0.8")
7860 (source
7861 (origin
7862 (method url-fetch)
7863 (uri (string-append "https://pypi.python.org/packages/source/p/"
7864 "pretend/pretend-" version ".tar.gz"))
7865 (sha256
7866 (base32
7867 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7868 (build-system python-build-system)
36ebf972
RW
7869 (home-page "https://github.com/alex/pretend")
7870 (synopsis "Library for stubbing in Python")
7871 (description
7872 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7873technique for writing tests. You may hear the term mixed up with mocks,
7874fakes, or doubles. Basically, a stub is an object that returns pre-canned
7875responses, rather than doing any computation.")
3f641af0 7876 (license license:bsd-3)))
36ebf972
RW
7877
7878(define-public python2-pretend
7879 (package-with-python2 python-pretend))
aa759a51
RW
7880
7881(define-public python-cryptography-vectors
7882 (package
7883 (name "python-cryptography-vectors")
f73f1f07 7884 (version "2.0.3")
aa759a51
RW
7885 (source
7886 (origin
7887 (method url-fetch)
9c509ca9 7888 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
7889 (sha256
7890 (base32
f73f1f07 7891 "1qa117fs1yd50zn2cfxh7d9l999ds0z4h83m9m7j4fk6ffm33f5y"))))
aa759a51 7892 (build-system python-build-system)
aa759a51 7893 (home-page "https://github.com/pyca/cryptography")
66e07664 7894 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
7895 (description
7896 "This package contains test vectors for the cryptography package.")
7897 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7898 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
7899
7900(define-public python2-cryptography-vectors
7901 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
7902
7903(define-public python-cryptography
7904 (package
7905 (name "python-cryptography")
f37995fa 7906 (version "2.0.3")
88b47cb0
RW
7907 (source
7908 (origin
7909 (method url-fetch)
9c509ca9 7910 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
7911 (sha256
7912 (base32
f37995fa 7913 "0fnck37zyvbzmccbp7w3jy27jgmij1992j5wyy3gxhw6a11b4jyh"))))
88b47cb0
RW
7914 (build-system python-build-system)
7915 (inputs
7916 `(("openssl" ,openssl)))
7917 (propagated-inputs
dc1bd2b5
LF
7918 `(("python-asn1crypto" ,python-asn1crypto)
7919 ("python-cffi" ,python-cffi)
88b47cb0 7920 ("python-six" ,python-six)
88b47cb0
RW
7921 ("python-idna" ,python-idna)
7922 ("python-iso8601" ,python-iso8601)))
7923 (native-inputs
7924 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 7925 ("python-hypothesis" ,python-hypothesis)
88b47cb0 7926 ("python-pretend" ,python-pretend)
912dcbad 7927 ("python-pytz" ,python-pytz)
23b9168d 7928 ("python-pytest" ,python-pytest-3.0)))
88b47cb0
RW
7929 (home-page "https://github.com/pyca/cryptography")
7930 (synopsis "Cryptographic recipes and primitives for Python")
7931 (description
7932 "cryptography is a package which provides cryptographic recipes and
7933primitives to Python developers. It aims to be the “cryptographic standard
7934library” for Python. The package includes both high level recipes, and low
7935level interfaces to common cryptographic algorithms such as symmetric ciphers,
7936message digests and key derivation functions.")
7937 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 7938 (license (list license:bsd-3 license:asl2.0))
519e2f4f 7939 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
7940
7941(define-public python2-cryptography
519e2f4f
LF
7942 (let ((crypto (package-with-python2
7943 (strip-python2-variant python-cryptography))))
88b47cb0
RW
7944 (package (inherit crypto)
7945 (propagated-inputs
7946 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
7947 ("python2-backport-ssl-match-hostname"
7948 ,python2-backport-ssl-match-hostname)
68f1cdec 7949 ("python2-enum34" ,python2-enum34)
88b47cb0 7950 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
7951
7952(define-public python-pyopenssl
7953 (package
7954 (name "python-pyopenssl")
2580c2f0 7955 (version "17.2.0")
5af999b8
RW
7956 (source
7957 (origin
7958 (method url-fetch)
eb68d268 7959 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
7960 (sha256
7961 (base32
2580c2f0 7962 "0d283g4zi0hr9papd24mjl70mi15gyzq6fx618rizi87dgipqqax"))))
5af999b8 7963 (build-system python-build-system)
30e0229a 7964 (arguments
7c6bf660
MB
7965 '(#:phases
7966 (modify-phases %standard-phases
7967 (delete 'check)
7968 (add-after 'install 'check
7969 (lambda* (#:key inputs outputs #:allow-other-keys)
7970 (add-installed-pythonpath inputs outputs)
96bbc41f
MB
7971 (zero? (system* "py.test" "-v" "-k"
7972 (string-append
7973 ;; This test tries to look up certificates from
7974 ;; the compiled-in default path in OpenSSL, which
7975 ;; does not exist in the build environment.
7976 "not test_fallback_default_verify_paths "
7977 ;; This test attempts to make a connection to
7978 ;; an external web service.
7979 "and not test_set_default_verify_paths"))))))))
5af999b8
RW
7980 (propagated-inputs
7981 `(("python-cryptography" ,python-cryptography)
7982 ("python-six" ,python-six)))
7983 (inputs
7984 `(("openssl" ,openssl)))
30e0229a 7985 (native-inputs
2580c2f0
MB
7986 `(("python-flaky" ,python-flaky)
7987 ("python-pretend" ,python-pretend)
96bbc41f 7988 ("python-pytest" ,python-pytest-3.0)))
5af999b8
RW
7989 (home-page "https://github.com/pyca/pyopenssl")
7990 (synopsis "Python wrapper module around the OpenSSL library")
7991 (description
7992 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7993library.")
3f641af0 7994 (license license:asl2.0)))
5af999b8
RW
7995
7996(define-public python2-pyopenssl
519e2f4f 7997 (package-with-python2 python-pyopenssl))
643725a1
CR
7998
7999(define-public python-pip
8000 (package
8001 (name "python-pip")
392c26b0 8002 (version "9.0.1")
643725a1
CR
8003 (source
8004 (origin
8005 (method url-fetch)
6fb54e3b 8006 (uri (pypi-uri "pip" version))
643725a1
CR
8007 (sha256
8008 (base32
392c26b0 8009 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
643725a1 8010 (build-system python-build-system)
392c26b0
MC
8011 (arguments
8012 '(#:tests? #f)) ; there are no tests in the pypi archive.
643725a1 8013 (home-page "https://pip.pypa.io/")
392c26b0 8014 (synopsis "Package manager for Python software")
643725a1 8015 (description
392c26b0 8016 "Pip is a package manager for Python software, that finds packages on the
643725a1
CR
8017Python Package Index (PyPI).")
8018 (license license:expat)))
8019
8020(define-public python2-pip
8021 (package-with-python2 python-pip))
d8c4998f
LC
8022
8023(define-public python-tlsh
8024 (package
8025 (name "python-tlsh")
99b00dc7 8026 (version "3.4.4")
d8c4998f
LC
8027 (home-page "https://github.com/trendmicro/tlsh")
8028 (source (origin
99b00dc7
EF
8029 (method url-fetch)
8030 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
8031 version ".tar.gz"))
d8c4998f
LC
8032 (sha256
8033 (base32
99b00dc7
EF
8034 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
8035 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
8036 (build-system cmake-build-system)
8037 (arguments
8038 '(#:out-of-source? #f
8039 #:phases (modify-phases %standard-phases
8040 (replace
8041 'install
8042 (lambda* (#:key outputs #:allow-other-keys)
8043 ;; Build and install the Python bindings. The underlying
8044 ;; C++ library is apparently not meant to be installed.
8045 (let ((out (assoc-ref outputs "out")))
8046 (with-directory-excursion "py_ext"
8047 (and (system* "python" "setup.py" "build")
8048 (system* "python" "setup.py" "install"
8049 (string-append "--prefix=" out))))))))))
8050 (inputs `(("python" ,python-wrapper))) ;for the bindings
8051 (synopsis "Fuzzy matching library for Python")
8052 (description
8053 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8054Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8055value which can be used for similarity comparisons. Similar objects have
8056similar hash values, which allows for the detection of similar objects by
8057comparing their hash values. The byte stream should have a sufficient amount
8058of complexity; for example, a byte stream of identical bytes will not generate
8059a hash value.")
3f641af0 8060 (license license:asl2.0)))
d8c4998f
LC
8061
8062(define-public python2-tlsh
8063 (package
8064 (inherit python-tlsh)
8065 (name "python2-tlsh")
8066 (inputs `(("python" ,python-2)))))
d96034ed 8067
67f66812
BW
8068(define-public python-termcolor
8069 (package
8070 (name "python-termcolor")
8071 (version "1.1.0")
8072 (source
8073 (origin
8074 (method url-fetch)
a5e8f597 8075 (uri (pypi-uri "termcolor" version))
67f66812
BW
8076 (sha256
8077 (base32
8078 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8079 (build-system python-build-system)
8080 (arguments
8081 ;; There are no tests.
8082 `(#:tests? #f))
8083 (home-page "http://pypi.python.org/pypi/termcolor")
8084 (synopsis "ANSII Color formatting for terminal output")
8085 (description
8086 "This package provides ANSII Color formatting for output in terminals.")
8087 (license license:expat)))
8088
8089(define-public python2-termcolor
8090 (package-with-python2 python-termcolor))
8091
d96034ed
LC
8092(define-public python-libarchive-c
8093 (package
8094 (name "python-libarchive-c")
03fd001c 8095 (version "2.2")
d96034ed
LC
8096 (source (origin
8097 (method url-fetch)
03fd001c 8098 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
8099 (sha256
8100 (base32
03fd001c 8101 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
8102 (build-system python-build-system)
8103 (arguments
8104 '(#:phases (modify-phases %standard-phases
8105 (add-before
8106 'build 'reference-libarchive
8107 (lambda* (#:key inputs #:allow-other-keys)
8108 ;; Retain the absolute file name of libarchive.so.
8109 (let ((libarchive (assoc-ref inputs "libarchive")))
8110 (substitute* "libarchive/ffi.py"
8111 (("find_library\\('archive'\\)")
8112 (string-append "'" libarchive
b41a05ce 8113 "/lib/libarchive.so'")))))))))
d96034ed 8114 (inputs
f3b98f4f 8115 `(("libarchive" ,libarchive)))
d96034ed
LC
8116 (home-page "https://github.com/Changaco/python-libarchive-c")
8117 (synopsis "Python interface to libarchive")
8118 (description
8119 "This package provides Python bindings to libarchive, a C library to
8120access possibly compressed archives in many different formats. It uses
8121Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 8122 (license license:lgpl2.0+)))
d96034ed
LC
8123
8124(define-public python2-libarchive-c
8125 (package-with-python2 python-libarchive-c))
5e1c9367
LC
8126
8127(define-public python-file
8128 (package
8129 (inherit file)
8130 (name "python-file")
8131 (build-system python-build-system)
8132 (arguments
8133 '(#:tests? #f ;no tests
00bf74be 8134 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
8135 #:phases (modify-phases %standard-phases
8136 (add-before 'build 'change-directory
8137 (lambda _
8138 (chdir "python")
8139 #t))
8140 (add-before 'build 'set-library-file-name
8141 (lambda* (#:key inputs #:allow-other-keys)
8142 (let ((file (assoc-ref inputs "file")))
8143 (substitute* "magic.py"
8144 (("find_library\\('magic'\\)")
8145 (string-append "'" file "/lib/libmagic.so'")))
8146 #t))))))
8147 (inputs `(("file" ,file)))
8148 (self-native-input? #f)
daeeea71
CM
8149 (synopsis "Python bindings to the libmagic file type guesser. Note that
8150this module and the python-magic module both provide a \"magic.py\" file;
8151these two modules, which are different and were developed separately, both
f210e944 8152serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
8153
8154(define-public python2-file
f210e944 8155 (package-with-python2 python-file))
85d4aeac
LC
8156
8157(define-public python-debian
8158 (package
8159 (name "python-debian")
02d7f337 8160 (version "0.1.28")
85d4aeac
LC
8161 (source
8162 (origin
8163 (method url-fetch)
5e217a8b 8164 (uri (pypi-uri name version))
85d4aeac
LC
8165 (sha256
8166 (base32
02d7f337 8167 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
85d4aeac 8168 (build-system python-build-system)
f22efa01 8169 (propagated-inputs
85d4aeac 8170 `(("python-six" ,python-six)))
85d4aeac
LC
8171 (home-page "http://packages.debian.org/sid/python-debian")
8172 (synopsis "Debian package related modules")
8173 (description
5c7bdc9a
LC
8174 ;; XXX: Use @enumerate instead of @itemize to work around
8175 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
8176 "This package provides Python modules that abstract many formats of
8177Debian-related files, such as:
8178
5c7bdc9a 8179@enumerate
85d4aeac
LC
8180@item Debtags information;
8181@item @file{debian/changelog} files;
8182@item packages files, pdiffs;
8183@item control files of single or multiple RFC822-style paragraphs---e.g.
8184 @file{debian/control}, @file{.changes}, @file{.dsc};
8185@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8186 contained files and meta-information.
5c7bdc9a 8187@end enumerate\n")
85d4aeac
LC
8188
8189 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 8190 (license license:gpl3+)))
85d4aeac
LC
8191
8192(define-public python2-debian
8193 (package-with-python2 python-debian))
816a6538 8194
2d321bb2
RW
8195(define-public python-nbformat
8196 (package
8197 (name "python-nbformat")
ae7f246c 8198 (version "4.3.0")
2d321bb2
RW
8199 (source
8200 (origin
8201 (method url-fetch)
8202 (uri (pypi-uri "nbformat" version))
8203 (sha256
8204 (base32
ae7f246c 8205 "12s7j4qja8b5bs1kyw5dzmrqbjxxj8wk52cyasbiqbv7fblcrssz"))))
2d321bb2
RW
8206 (build-system python-build-system)
8207 (arguments `(#:tests? #f)) ; no test target
8208 (propagated-inputs
8209 `(("python-ipython-genutils" ,python-ipython-genutils)
8210 ("python-jsonschema" ,python-jsonschema)
8211 ("python-jupyter-core" ,python-jupyter-core)
8212 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
8213 (home-page "http://jupyter.org")
8214 (synopsis "Jupyter Notebook format")
8215 (description "This package provides the reference implementation of the
8216Jupyter Notebook format and Python APIs for working with notebooks.")
8217 (license license:bsd-3)))
8218
8219(define-public python2-nbformat
8220 (package-with-python2 python-nbformat))
8221
55436048
RW
8222(define-public python-bleach
8223 (package
8224 (name "python-bleach")
8225 (version "1.4.3")
8226 (source
8227 (origin
8228 (method url-fetch)
8229 (uri (pypi-uri "bleach" version))
8230 (sha256
8231 (base32
8232 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
8233 (build-system python-build-system)
8234 (propagated-inputs
8235 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
8236 ("python-six" ,python-six)))
8237 (native-inputs
8238 `(("python-nose" ,python-nose)))
7bf837fd 8239 (home-page "https://github.com/jsocol/bleach")
55436048
RW
8240 (synopsis "Whitelist-based HTML-sanitizing tool")
8241 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8242 (license license:asl2.0)))
8243
8244(define-public python2-bleach
8245 (package-with-python2 python-bleach))
8246
60590a3a
RW
8247(define-public python-entrypoints
8248 (package
8249 (name "python-entrypoints")
8250 (version "0.2.2")
8251 (source
8252 (origin
8253 (method url-fetch)
8254 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
8255 version ".tar.gz"))
8256 (file-name (string-append name "-" version ".tar.gz"))
8257 (sha256
8258 (base32
8259 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
8260 (build-system python-build-system)
8261 ;; The package does not come with a setup.py file, so we have to generate
8262 ;; one ourselves.
8263 (arguments
8264 `(#:tests? #f
8265 #:phases
8266 (modify-phases %standard-phases
8267 (add-after 'unpack 'create-setup.py
8268 (lambda _
8269 (call-with-output-file "setup.py"
8270 (lambda (port)
8271 (format port "\
8272from setuptools import setup
8273setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8274" ,version))))))))
8275 (home-page "https://github.com/takluyver/entrypoints")
8276 (synopsis "Discover and load entry points from installed Python packages")
8277 (description "Entry points are a way for Python packages to advertise
8278objects with some common interface. The most common examples are
8279@code{console_scripts} entry points, which define shell commands by
8280identifying a Python function to run. The @code{entrypoints} module contains
8281functions to find and load entry points.")
8282 (license license:expat)))
8283
8284(define-public python2-entrypoints
8285 (package-with-python2 python-entrypoints))
8286
c60898a8
RW
8287(define-public python-nbconvert
8288 (package
8289 (name "python-nbconvert")
8290 (version "5.0.0b1")
8291 (source
8292 (origin
8293 (method url-fetch)
8294 (uri (pypi-uri "nbconvert" version))
8295 (sha256
8296 (base32
8297 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8298 (build-system python-build-system)
497355dc
MB
8299 (arguments
8300 `(;; The "bdist_egg" target is disabled by default, causing the installation
8301 ;; to fail.
8302 #:configure-flags (list "bdist_egg")
8303 ;; FIXME: 5 failures, 40 errors.
8304 #:tests? #f))
8305 ;; #:phases
8306 ;; (modify-phases %standard-phases
8307 ;; (replace 'check
8308 ;; (lambda _
8309 ;; (zero? (system* "py.test" "-v")))))
8310 (native-inputs
8311 `(("python-pytest" ,python-pytest)))
c60898a8
RW
8312 (propagated-inputs
8313 `(("python-bleach" ,python-bleach)
8314 ("python-entrypoints" ,python-entrypoints)
8315 ("python-jinja2" ,python-jinja2)
8316 ("python-jupyter-core" ,python-jupyter-core)
8317 ("python-mistune" ,python-mistune)
8318 ("python-nbformat" ,python-nbformat)
8319 ("python-pygments" ,python-pygments)
c60898a8
RW
8320 ("python-traitlets" ,python-traitlets)))
8321 (home-page "http://jupyter.org")
8322 (synopsis "Converting Jupyter Notebooks")
8323 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8324notebooks to various other formats via Jinja templates. It allows you to
8325convert an @code{.ipynb} notebook file into various static formats including:
8326
8327@enumerate
8328@item HTML
8329@item LaTeX
8330@item PDF
8331@item Reveal JS
8332@item Markdown (md)
8333@item ReStructured Text (rst)
8334@item executable script
8335@end enumerate\n")
8336 (license license:bsd-3)))
8337
8338(define-public python2-nbconvert
8339 (package-with-python2 python-nbconvert))
8340
a0d62280
RW
8341(define-public python-notebook
8342 (package
8343 (name "python-notebook")
8344 (version "4.2.3")
8345 (source (origin
8346 (method url-fetch)
8347 (uri (pypi-uri "notebook" version))
8348 (sha256
8349 (base32
8350 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
8351 (build-system python-build-system)
8352 (arguments
8353 `(#:phases
8354 (modify-phases %standard-phases
8355 (replace 'check
8356 (lambda _
8357 ;; HOME must be set for tests
8358 (setenv "HOME" "/tmp")
8359 (zero? (system* "nosetests")))))))
8360 (propagated-inputs
8361 `(("python-jupyter-core" ,python-jupyter-core)
8362 ("python-nbformat" ,python-nbformat)
8363 ("python-nbconvert" ,python-nbconvert)
8364 ("python-ipython" ,python-ipython)))
8365 (native-inputs
8366 `(("python-nose" ,python-nose)
8367 ("python-sphinx" ,python-sphinx)
8368 ("python-requests" ,python-requests)))
8369 (home-page "http://jupyter.org/")
8370 (synopsis "Web-based notebook environment for interactive computing")
8371 (description
8372 "The Jupyter HTML notebook is a web-based notebook environment for
8373interactive computing.")
3a735ecf 8374 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
8375 (license license:bsd-3)))
8376
8377(define-public python2-notebook
3a735ecf
HG
8378 (let ((base (package-with-python2
8379 (strip-python2-variant python-notebook))))
8380 (package (inherit base)
8381 (native-inputs
8382 `(("python2-mock" ,python2-mock)
8383 ,@(package-native-inputs base)))
8384 (arguments
8385 (substitute-keyword-arguments (package-arguments base)
8386 ((#:phases phases)
8387 `(modify-phases ,phases
8388 (add-before 'check 'disable-test-case
8389 ;; The test requires network access to localhost. Curiously it
8390 ;; fails with Python 2 only. Simply make the test-case return
8391 ;; immediately.
8392 (lambda _
8393 (substitute*
8394 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8395 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 8396
d55724ed
RW
8397(define-public python-widgetsnbextension
8398 (package
8399 (name "python-widgetsnbextension")
8400 (version "1.2.6")
8401 (source
8402 (origin
8403 (method url-fetch)
8404 (uri (pypi-uri "widgetsnbextension" version))
8405 (sha256
8406 (base32
8407 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
8408 (build-system python-build-system)
8409 (propagated-inputs
8410 `(("python-notebook" ,python-notebook)))
8411 (native-inputs
58f5fae7
MB
8412 `(("python-certifi" ,python-certifi)
8413 ("python-nose" ,python-nose)))
d55724ed
RW
8414 (home-page "http://ipython.org")
8415 (synopsis "IPython HTML widgets for Jupyter")
8416 (description "This package provides interactive HTML widgets for Jupyter
8417notebooks.")
8418 (license license:bsd-3)))
8419
8420(define-public python2-widgetsnbextension
8421 (package-with-python2 python-widgetsnbextension))
8422
4fe2e344
RW
8423(define-public python-ipywidgets
8424 (package
8425 (name "python-ipywidgets")
8426 (version "5.2.2")
8427 (source
8428 (origin
8429 (method url-fetch)
8430 (uri (pypi-uri "ipywidgets" version))
8431 (sha256
8432 (base32
8433 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8434 (build-system python-build-system)
8435 ;; FIXME: it's not clear how to run the tests.
8436 (arguments `(#:tests? #f))
8437 (propagated-inputs
8438 `(("python-ipykernel" ,python-ipykernel)
8439 ("python-ipython" ,python-ipython)
4fe2e344
RW
8440 ("python-traitlets" ,python-traitlets)
8441 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8442 (home-page "http://ipython.org")
8443 (synopsis "IPython HTML widgets for Jupyter")
8444 (description "Ipywidgets are interactive HTML widgets for Jupyter
8445notebooks and the IPython kernel. Notebooks come alive when interactive
8446widgets are used. Users gain control of their data and can visualize changes
8447in the data.")
8448 (license license:bsd-3)))
8449
8450(define-public python2-ipywidgets
8451 (package-with-python2 python-ipywidgets))
8452
8ceebf8f
RW
8453(define-public python-jupyter-console
8454 (package
8455 (name "python-jupyter-console")
8456 (version "5.0.0")
8457 (source
8458 (origin
8459 (method url-fetch)
8460 (uri (pypi-uri "jupyter_console" version))
8461 (sha256
8462 (base32
8463 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
8464 (build-system python-build-system)
8465 ;; FIXME: it's not clear how to run the tests.
8466 (arguments `(#:tests? #f))
8467 (propagated-inputs
8468 `(("python-ipykernel" ,python-ipykernel)
8469 ("python-ipython" ,python-ipython)
8470 ("python-jupyter-client" ,python-jupyter-client)
8471 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 8472 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
8473 (home-page "https://jupyter.org")
8474 (synopsis "Jupyter terminal console")
8475 (description "This package provides a terminal-based console frontend for
8476Jupyter kernels. It also allows for console-based interaction with non-Python
8477Jupyter kernels such as IJulia and IRKernel.")
8478 (license license:bsd-3)))
8479
8480(define-public python2-jupyter-console
8481 (package-with-python2 python-jupyter-console))
8482
c27ae827
RW
8483(define-public jupyter
8484 (package
8485 (name "jupyter")
8486 (version "1.0.0")
8487 (source
8488 (origin
8489 (method url-fetch)
8490 (uri (pypi-uri "jupyter" version))
8491 (sha256
8492 (base32
8493 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8494 (build-system python-build-system)
8495 ;; FIXME: it's not clear how to run the tests.
8496 (arguments `(#:tests? #f))
8497 (propagated-inputs
8498 `(("python-ipykernel" ,python-ipykernel)
8499 ("python-ipywidgets" ,python-ipywidgets)
8500 ("python-jupyter-console" ,python-jupyter-console)
8501 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 8502 ("python-notebook" ,python-notebook)))
c27ae827
RW
8503 (home-page "http://jupyter.org")
8504 (synopsis "Web application for interactive documents")
8505 (description
8506 "The Jupyter Notebook is a web application that allows you to create and
8507share documents that contain live code, equations, visualizations and
8508explanatory text. Uses include: data cleaning and transformation, numerical
8509simulation, statistical modeling, machine learning and much more.")
8510 (license license:bsd-3)))
8511
816a6538
LC
8512(define-public python-chardet
8513 (package
8514 (name "python-chardet")
8515 (version "2.3.0")
8516 (source
8517 (origin
8518 (method url-fetch)
8519 (uri (string-append
8520 "https://pypi.python.org/packages/source/c/chardet/chardet-"
8521 version
8522 ".tar.gz"))
8523 (sha256
8524 (base32
8525 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
8526 (build-system python-build-system)
816a6538
LC
8527 (home-page "https://github.com/chardet/chardet")
8528 (synopsis "Universal encoding detector for Python 2 and 3")
8529 (description
8530 "This package provides @code{chardet}, a Python module that can
8531automatically detect a wide range of file encodings.")
3f641af0 8532 (license license:lgpl2.1+)))
816a6538
LC
8533
8534(define-public python2-chardet
8535 (package-with-python2 python-chardet))
2fc5f186 8536
1872f1bb
KM
8537(define-public python-docopt
8538 (package
8539 (name "python-docopt")
8540 (version "0.6.2")
8541 (source
8542 (origin
8543 (method url-fetch)
8544 ;; The release on PyPI does not include tests.
8545 (uri (string-append
8546 "https://github.com/docopt/docopt/archive/"
8547 version ".tar.gz"))
8548 (file-name (string-append name "-" version ".tar.gz"))
8549 (sha256
8550 (base32
8551 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8552 (build-system python-build-system)
8553 (native-inputs
f3b98f4f 8554 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
8555 (arguments
8556 `(#:phases (alist-replace
8557 'check
8558 (lambda _ (zero? (system* "py.test")))
8559 %standard-phases)))
8560 (home-page "http://docopt.org")
8561 (synopsis "Command-line interface description language for Python")
8562 (description "This library allows the user to define a command-line
8563interface from a program's help message rather than specifying it
8564programatically with command-line parsers like @code{getopt} and
8565@code{argparse}.")
8566 (license license:expat)))
8567
8568(define-public python2-docopt
8569 (package-with-python2 python-docopt))
8570
2fc5f186
LF
8571(define-public python-zope-event
8572 (package
8573 (name "python-zope-event")
8574 (version "4.1.0")
8575 (source
8576 (origin
8577 (method url-fetch)
8578 (uri (string-append "https://pypi.python.org/packages/source/z"
8579 "/zope.event/zope.event-" version ".tar.gz"))
8580 (sha256
8581 (base32
8582 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8583 (build-system python-build-system)
2fc5f186
LF
8584 (home-page "http://pypi.python.org/pypi/zope.event")
8585 (synopsis "Event publishing system for Python")
8586 (description "Zope.event provides an event publishing API, intended for
8587use by applications which are unaware of any subscribers to their events. It
8588is a simple event-dispatching system on which more sophisticated event
8589dispatching systems can be built.")
3f641af0 8590 (license license:zpl2.1)))
2fc5f186
LF
8591
8592(define-public python2-zope-event
8593 (package-with-python2 python-zope-event))
97abe268
LF
8594
8595(define-public python-zope-interface
8596 (package
8597 (name "python-zope-interface")
8598 (version "4.1.3")
8599 (source
8600 (origin
8601 (method url-fetch)
8602 (uri (string-append "https://pypi.python.org/packages/source/z"
8603 "/zope.interface/zope.interface-" version ".tar.gz"))
8604 (sha256
8605 (base32
8606 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8607 (build-system python-build-system)
38d480a8 8608 (native-inputs
97abe268
LF
8609 `(("python-zope-event" ,python-zope-event)))
8610 (home-page "https://github.com/zopefoundation/zope.interface")
8611 (synopsis "Python implementation of the \"design by contract\"
8612methodology")
8613 (description "Zope.interface provides an implementation of \"object
8614interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8615conforming to a given API or contract.")
3f641af0 8616 (license license:zpl2.1)))
97abe268
LF
8617
8618(define-public python2-zope-interface
8619 (package-with-python2 python-zope-interface))
81f2373c
LF
8620
8621(define-public python-zope-exceptions
8622 (package
8623 (name "python-zope-exceptions")
8624 (version "4.0.8")
8625 (source
8626 (origin
8627 (method url-fetch)
8628 (uri (string-append "https://pypi.python.org/packages/source/z"
8629 "/zope.exceptions/zope.exceptions-"
8630 version ".tar.gz"))
8631 (sha256
8632 (base32
8633 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8634 (build-system python-build-system)
8635 (arguments
8636 '(#:tests? #f)) ; circular dependency with zope.testrunner
8637 (propagated-inputs
8638 `(("python-zope-interface" ,python-zope-interface)))
8639 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8640 (synopsis "Zope exceptions")
8641 (description "Zope.exceptions provides general-purpose exception types
8642that have uses outside of the Zope framework.")
3f641af0 8643 (license license:zpl2.1)))
81f2373c
LF
8644
8645(define-public python2-zope-exceptions
8646 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
8647
8648(define-public python-zope-testing
8649 (package
8650 (name "python-zope-testing")
8651 (version "4.5.0")
8652 (source
8653 (origin
8654 (method url-fetch)
8655 (uri (string-append "https://pypi.python.org/packages/source/z"
8656 "/zope.testing/zope.testing-" version ".tar.gz"))
8657 (sha256
8658 (base32
b02f7a21
HG
8659 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8660 (modules '((guix build utils)))
8661 (snippet
8662 '(begin
8663 ;; Remove pre-compiled .pyc files backup files from source.
8664 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8665 #t))))
900e3c0e
LF
8666 (build-system python-build-system)
8667 (native-inputs
8668 `(("python-zope-exceptions" ,python-zope-exceptions)))
8669 (propagated-inputs
8670 `(("python-zope-interface" ,python-zope-interface)))
8671 (home-page "http://pypi.python.org/pypi/zope.testing")
8672 (synopsis "Zope testing helpers")
8673 (description "Zope.testing provides a number of testing utilities for HTML
8674forms, HTTP servers, regular expressions, and more.")
3f641af0 8675 (license license:zpl2.1)))
900e3c0e
LF
8676
8677(define-public python2-zope-testing
8678 (package-with-python2 python-zope-testing))
01614c4f
LF
8679
8680(define-public python-zope-testrunner
8681 (package
8682 (name "python-zope-testrunner")
8683 (version "4.4.9")
8684 (source
8685 (origin
8686 (method url-fetch)
8687 (uri (string-append "https://pypi.python.org/packages/source/z"
8688 "/zope.testrunner/zope.testrunner-"
8689 version ".zip"))
8690 (sha256
8691 (base32
8692 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8693 (build-system python-build-system)
385871e5
MB
8694 (arguments
8695 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
8696 (native-inputs
8697 `(("python-six" ,python-six)
e408ffc3 8698 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
8699 ("python-zope-exceptions" ,python-zope-exceptions)
8700 ("python-zope-testing" ,python-zope-testing)
8701 ("unzip" ,unzip)))
8702 (propagated-inputs
8703 `(("python-zope-interface" ,python-zope-interface)))
8704 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8705 (synopsis "Zope testrunner script")
8706 (description "Zope.testrunner provides a script for running Python
8707tests.")
3f641af0 8708 (license license:zpl2.1)))
01614c4f
LF
8709
8710(define-public python2-zope-testrunner
8711 (let ((base (package-with-python2 python-zope-testrunner)))
8712 (package
8713 (inherit base)
8714 (native-inputs
8715 (append (package-native-inputs base)
8716 `(("python2-subunit" ,python2-subunit)
8717 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
8718
8719(define-public python-zope-i18nmessageid
8720 (package
8721 (name "python-zope-i18nmessageid")
8722 (version "4.0.3")
8723 (source
8724 (origin
8725 (method url-fetch)
8726 (uri (string-append
8727 "https://pypi.python.org/packages/source/z"
8728 "/zope.i18nmessageid/zope.i18nmessageid-"
8729 version ".tar.gz"))
8730 (sha256
8731 (base32
8732 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8733 (build-system python-build-system)
6a5c710c
LF
8734 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8735 (synopsis "Message identifiers for internationalization")
8736 (description "Zope.i18nmessageid provides facilities for declaring
8737internationalized messages within program source text.")
3f641af0 8738 (license license:zpl2.1)))
6a5c710c
LF
8739
8740(define-public python2-zope-i18nmessageid
8741 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
8742
8743(define-public python-zope-schema
8744 (package
8745 (name "python-zope-schema")
8746 (version "4.4.2")
8747 (source
8748 (origin
8749 (method url-fetch)
8750 (uri (string-append "https://pypi.python.org/packages/source/z"
8751 "/zope.schema/zope.schema-" version ".tar.gz"))
8752 (sha256
8753 (base32
8754 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8755 (build-system python-build-system)
22dba2ef
MB
8756 (arguments
8757 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
8758 (propagated-inputs
8759 `(("python-zope-event" ,python-zope-event)
2b9e4bea 8760 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
8761 ("python-zope-interface" ,python-zope-interface)))
8762 (native-inputs
47f77210
HG
8763 `(("python-zope-testing" ,python-zope-testing)
8764 ("python-coverage" ,python-coverage)
8765 ("python-nose" ,python-nose)))
71fb09f3
LF
8766 (home-page "http://pypi.python.org/pypi/zope.schema")
8767 (synopsis "Zope data schemas")
8768 (description "Zope.scheme provides extensions to zope.interface for
8769defining data schemas.")
3f641af0 8770 (license license:zpl2.1)))
71fb09f3
LF
8771
8772(define-public python2-zope-schema
8773 (package-with-python2 python-zope-schema))
fbac9b17
LF
8774
8775(define-public python-zope-configuration
8776 (package
8777 (name "python-zope-configuration")
8778 (version "4.0.3")
8779 (source (origin
8780 (method url-fetch)
8781 (uri (string-append "https://pypi.python.org/packages/source/z"
8782 "/zope.configuration/zope.configuration-"
8783 version ".tar.gz"))
8784 (sha256
8785 (base32
8786 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8787 (build-system python-build-system)
7e8b1bfa
MB
8788 (arguments
8789 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
8790 (propagated-inputs
8791 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8792 ("python-zope-schema" ,python-zope-schema)))
8793 (home-page "http://pypi.python.org/pypi/zope.configuration")
8794 (synopsis "Zope Configuration Markup Language")
8795 (description "Zope.configuration implements ZCML, the Zope Configuration
8796Markup Language.")
3f641af0 8797 (license license:zpl2.1)))
fbac9b17
LF
8798
8799(define-public python2-zope-configuration
8800 (package-with-python2 python-zope-configuration))
2ad52086
LF
8801
8802(define-public python-zope-proxy
8803 (package
8804 (name "python-zope-proxy")
8805 (version "4.1.6")
8806 (source
8807 (origin
8808 (method url-fetch)
8809 (uri (string-append "https://pypi.python.org/packages/source/z"
8810 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8811 (sha256
8812 (base32
8813 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8814 (build-system python-build-system)
66b3aadb
MB
8815 (arguments
8816 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
8817 (propagated-inputs
8818 `(("python-zope-interface" ,python-zope-interface)))
8819 (home-page "http://pypi.python.org/pypi/zope.proxy")
8820 (synopsis "Generic, transparent proxies")
8821 (description "Zope.proxy provides generic, transparent proxies for Python.
8822Proxies are special objects which serve as mostly-transparent wrappers around
8823another object, intervening in the apparent behavior of the wrapped object
8824only when necessary to apply the policy (e.g., access checking, location
8825brokering, etc.) for which the proxy is responsible.")
3f641af0 8826 (license license:zpl2.1)))
2ad52086
LF
8827
8828(define-public python2-zope-proxy
8829 (package-with-python2 python-zope-proxy))
f404b5ea
LF
8830
8831(define-public python-zope-location
8832 (package
8833 (name "python-zope-location")
8834 (version "4.0.3")
8835 (source
8836 (origin
8837 (method url-fetch)
8838 (uri (string-append "https://pypi.python.org/packages/source/z"
8839 "/zope.location/zope.location-" version ".tar.gz"))
8840 (sha256
8841 (base32
8842 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8843 (build-system python-build-system)
40bb8e07
MB
8844 (arguments
8845 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 8846 (propagated-inputs
f404b5ea
LF
8847 `(("python-zope-proxy" ,python-zope-proxy)
8848 ("python-zope-schema" ,python-zope-schema)))
8849 (home-page "http://pypi.python.org/pypi/zope.location/")
8850 (synopsis "Zope location library")
8851 (description "Zope.location implements the concept of \"locations\" in
8852Zope3, which are are special objects that have a structural location.")
3f641af0 8853 (license license:zpl2.1)))
f404b5ea
LF
8854
8855(define-public python2-zope-location
8856 (package-with-python2 python-zope-location))
d4b77f36
LF
8857
8858(define-public python-zope-security
8859 (package
8860 (name "python-zope-security")
8861 (version "4.0.3")
8862 (source
8863 (origin
8864 (method url-fetch)
8865 (uri (string-append "https://pypi.python.org/packages/source/z"
8866 "/zope.security/zope.security-" version ".tar.gz"))
8867 (sha256
8868 (base32
8869 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8870 (build-system python-build-system)
a74f9b12
MB
8871 (arguments
8872 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
8873 (propagated-inputs
8874 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 8875 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 8876 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
8877 (native-inputs
8878 `(("python-six" ,python-six)
8879 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
8880 ("python-zope-configuration" ,python-zope-configuration)
8881 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
8882 ("python-zope-testrunner" ,python-zope-testrunner)
8883 ("python-zope-testing" ,python-zope-testing)))
8884 (home-page "http://pypi.python.org/pypi/zope.security")
8885 (synopsis "Zope security framework")
8886 (description "Zope.security provides a generic mechanism to implement
8887security policies on Python objects.")
3f641af0 8888 (license license:zpl2.1)))
d4b77f36
LF
8889
8890(define-public python2-zope-security
04417662
EF
8891 (let ((zope-security (package-with-python2 python-zope-security)))
8892 (package (inherit zope-security)
8893 (propagated-inputs
8894 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8895 ,@(alist-delete
8896 "python-zope-testrunner"
8897 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
8898
8899(define-public python-zope-component
8900 (package
8901 (name "python-zope-component")
35e1a0f1 8902 (version "4.3.0")
a6b61b27
LF
8903 (source
8904 (origin
8905 (method url-fetch)
35e1a0f1 8906 (uri (pypi-uri "zope.component" version))
a6b61b27
LF
8907 (sha256
8908 (base32
35e1a0f1 8909 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
a6b61b27
LF
8910 (build-system python-build-system)
8911 (arguments
8912 ;; Skip tests due to circular dependency with python-zope-security.
8913 '(#:tests? #f))
8914 (native-inputs
8915 `(("python-zope-testing" ,python-zope-testing)))
8916 (propagated-inputs
8917 `(("python-zope-event" ,python-zope-event)
8918 ("python-zope-interface" ,python-zope-interface)
8919 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8920 ("python-zope-configuration" ,python-zope-configuration)))
8921 (home-page "https://github.com/zopefoundation/zope.component")
8922 (synopsis "Zope Component Architecture")
8923 (description "Zope.component represents the core of the Zope Component
8924Architecture. Together with the zope.interface package, it provides
8925facilities for defining, registering and looking up components.")
3f641af0 8926 (license license:zpl2.1)))
a6b61b27
LF
8927
8928(define-public python2-zope-component
8929 (package-with-python2 python-zope-component))
3859ac12 8930
1ae44b80 8931(define-public python-pythondialog
b5f218be 8932 (package
1ae44b80 8933 (name "python-pythondialog")
42c4b246 8934 (version "3.4.0")
b5f218be
LF
8935 (source
8936 (origin
8937 (method url-fetch)
1ae44b80 8938 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
8939 (sha256
8940 (base32
1ae44b80 8941 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
8942 (build-system python-build-system)
8943 (arguments
8944 `(#:phases
8945 (modify-phases %standard-phases
8946 (add-after 'unpack 'patch-path
8947 (lambda* (#:key inputs #:allow-other-keys)
8948 (let* ((dialog (assoc-ref inputs "dialog")))
8949 ;; Since this library really wants to grovel the search path, we
8950 ;; must hardcode dialog's store path into it.
8951 (substitute* "dialog.py"
8952 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8953 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8954 #t))))
b5f218be
LF
8955 #:tests? #f)) ; no test suite
8956 (propagated-inputs
8957 `(("dialog" ,dialog)))
8958 (home-page "http://pythondialog.sourceforge.net/")
8959 (synopsis "Python interface to the UNIX dialog utility")
8960 (description "A Python wrapper for the dialog utility. Its purpose is to
8961provide an easy to use, pythonic and comprehensive Python interface to dialog.
8962This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 8963 (license license:lgpl2.1)
1ae44b80
LF
8964 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8965
8966(define-public python2-pythondialog
8967 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8968 (package
8969 (inherit base)
8970 (version (package-version python-pythondialog))
8971 (source (origin
8972 (method url-fetch)
8973 (uri (pypi-uri "python2-pythondialog" version))
8974 (sha256
8975 (base32
8976 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 8977
3859ac12
LF
8978(define-public python-pyrfc3339
8979 (package
8980 (name "python-pyrfc3339")
d9aa097b 8981 (version "1.0")
3859ac12
LF
8982 (source
8983 (origin
8984 (method url-fetch)
d9aa097b 8985 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
8986 (sha256
8987 (base32
d9aa097b 8988 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
8989 (build-system python-build-system)
8990 (propagated-inputs
8991 `(("python-pytz" ,python-pytz)))
8992 (native-inputs
f3b98f4f 8993 `(("python-nose" ,python-nose)))
3859ac12
LF
8994 (home-page "https://github.com/kurtraschke/pyRFC3339")
8995 (synopsis "Python timestamp library")
8996 (description "Python library for generating and parsing RFC 3339-compliant
8997timestamps.")
8998 (license license:expat)))
8999
9000(define-public python2-pyrfc3339
9001 (package-with-python2 python-pyrfc3339))
5eea2005
LF
9002
9003(define-public python-werkzeug
9004 (package
9005 (name "python-werkzeug")
bbb99d6b 9006 (version "0.11.15")
5eea2005
LF
9007 (source
9008 (origin
9009 (method url-fetch)
4b47cbfa 9010 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
9011 (sha256
9012 (base32
bbb99d6b 9013 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
5eea2005
LF
9014 (build-system python-build-system)
9015 (native-inputs
9016 `(("python-pytest" ,python-pytest)))
9017 (home-page "http://werkzeug.pocoo.org/")
9018 (synopsis "Utilities for WSGI applications")
9019 (description "One of the most advanced WSGI utility modules. It includes a
9020powerful debugger, full-featured request and response objects, HTTP utilities to
9021handle entity tags, cache control headers, HTTP dates, cookie handling, file
9022uploads, a powerful URL routing system and a bunch of community-contributed
9023addon modules.")
3f641af0 9024 (license license:x11)))
5eea2005
LF
9025
9026(define-public python2-werkzeug
9027 (package-with-python2 python-werkzeug))
99fffa8a
LF
9028
9029(define-public python-configobj
9030 (package
9031 (name "python-configobj")
9032 (version "5.0.6")
9033 (source (origin
9034 (method url-fetch)
9035 (uri (string-append
9036 "https://pypi.python.org/packages/source/c/configobj/"
9037 "configobj-" version ".tar.gz"))
9038 (sha256
9039 (base32
9040 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
9041 ;; Patch setup.py so it looks for python-setuptools, which is
9042 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 9043 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 9044 (build-system python-build-system)
861f70c9 9045 (propagated-inputs
f3b98f4f 9046 `(("python-six" ,python-six)))
99fffa8a
LF
9047 (synopsis "Config file reading, writing and validation")
9048 (description "ConfigObj is a simple but powerful config file reader and
9049writer: an ini file round tripper. Its main feature is that it is very easy to
9050use, with a straightforward programmer’s interface and a simple syntax for
9051config files.")
9052 (home-page "https://github.com/DiffSK/configobj")
3f641af0 9053 (license license:bsd-3)))
99fffa8a
LF
9054
9055(define-public python2-configobj
9056 (package-with-python2 python-configobj))
79e8a291
LF
9057
9058(define-public python-configargparse
9059 (package
9060 (name "python-configargparse")
9061 (version "0.10.0")
9062 (source (origin
9063 (method url-fetch)
9064 (uri (string-append
9065 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
9066 "ConfigArgParse-" version ".tar.gz"))
9067 (sha256
9068 (base32
9069 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
9070 (build-system python-build-system)
9071 (arguments
9072 ;; FIXME: Bug in test suite filed upstream:
9073 ;; https://github.com/bw2/ConfigArgParse/issues/32
9074 '(#:tests? #f))
9075 (synopsis "Replacement for argparse")
9076 (description "A drop-in replacement for argparse that allows options to also
9077be set via config files and/or environment variables.")
9078 (home-page "https://github.com/bw2/ConfigArgParse")
9079 (license license:expat)))
9080
9081(define-public python2-configargparse
9082 (package-with-python2 python-configargparse))
ab41f979
LF
9083
9084(define-public python-ndg-httpsclient
9085 (package
9086 (name "python-ndg-httpsclient")
ae476d01 9087 (version "0.4.2")
ab41f979
LF
9088 (source (origin
9089 (method url-fetch)
7be13d00 9090 (uri (pypi-uri "ndg_httpsclient" version))
ab41f979
LF
9091 (sha256
9092 (base32
ae476d01 9093 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
ab41f979 9094 (build-system python-build-system)
a39cc016
LF
9095 (arguments
9096 '(;; The tests appear to require networking.
9097 #:tests? #f))
ab41f979
LF
9098 (propagated-inputs
9099 `(("python-pyopenssl" ,python-pyopenssl)))
9100 (synopsis "HTTPS support for Python's httplib and urllib2")
9101 (description "This is a HTTPS client implementation for httplib and urllib2
9102based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
9103over the default provided with Python and importantly enables full verification
9104of the SSL peer.")
9105 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 9106 (license license:bsd-3)))
ab41f979
LF
9107
9108;; python2-openssl requires special care, so package-with-python2 is
9109;; insufficient.
9110(define-public python2-ndg-httpsclient
9111 (package (inherit python-ndg-httpsclient)
9112 (name "python2-ndg-httpsclient")
9113 (arguments `(#:python ,python-2))
9114 (propagated-inputs
9115 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
9116
9117(define-public python-contextlib2
9118 (package
9119 (name "python-contextlib2")
9120 (version "0.4.0")
9121 (source
9122 (origin
9123 (method url-fetch)
9124 (uri (pypi-uri "contextlib2" version))
9125 (sha256
9126 (base32
9127 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
9128 (build-system python-build-system)
9129 (arguments
9130 `(#:phases
9131 (modify-phases %standard-phases
9132 (replace 'check
9133 (lambda _ (zero?
9134 (system*
b3546174 9135 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
9136 (home-page "http://contextlib2.readthedocs.org/")
9137 (synopsis "Tools for decorators and context managers")
9138 (description "This module is primarily a backport of the Python
91393.2 contextlib to earlier Python versions. Like contextlib, it
9140provides utilities for common tasks involving decorators and context
9141managers. It also contains additional features that are not part of
9142the standard library.")
3f641af0 9143 (license license:psfl)))
03f964a5
CM
9144
9145(define-public python2-contextlib2
9146 (package-with-python2 python-contextlib2))
210bf497
DT
9147
9148(define-public python-texttable
9149 (package
9150 (name "python-texttable")
4c4d4df3 9151 (version "0.8.7")
210bf497
DT
9152 (source
9153 (origin
9154 (method url-fetch)
9155 (uri (pypi-uri "texttable" version))
9156 (sha256
9157 (base32
4c4d4df3 9158 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
210bf497
DT
9159 (build-system python-build-system)
9160 (arguments '(#:tests? #f)) ; no tests
9161 (home-page "https://github.com/foutaise/texttable/")
9162 (synopsis "Python module for creating simple ASCII tables")
9163 (description "Texttable is a Python module for creating simple ASCII
9164tables.")
3f641af0 9165 (license license:lgpl2.1+)))
210bf497
DT
9166
9167(define-public python2-texttable
9168 (package-with-python2 python-texttable))
67c52bb3
DT
9169
9170(define-public python-websocket-client
9171 (package
9172 (name "python-websocket-client")
6b810897 9173 (version "0.37.0")
67c52bb3
DT
9174 (source
9175 (origin
9176 (method url-fetch)
6b810897 9177 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
9178 (sha256
9179 (base32
6b810897 9180 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 9181 (build-system python-build-system)
a5333f7c
HG
9182 (propagated-inputs
9183 `(("python-six" ,python-six)))
67c52bb3
DT
9184 (home-page "https://github.com/liris/websocket-client")
9185 (synopsis "WebSocket client for Python")
9186 (description "The Websocket-client module provides the low level APIs for
9187WebSocket usage in Python programs.")
3f641af0 9188 (license license:lgpl2.1+)))
67c52bb3
DT
9189
9190(define-public python2-websocket-client
9191 (package-with-python2 python-websocket-client))
5c6eea2a
LF
9192
9193(define-public python-atomicwrites
9194 (package
9195 (name "python-atomicwrites")
c56ad5e2 9196 (version "1.1.5")
5c6eea2a
LF
9197 (source (origin
9198 (method url-fetch)
9199 (uri (pypi-uri "atomicwrites" version))
9200 (sha256
9201 (base32
c56ad5e2 9202 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
5c6eea2a
LF
9203 (build-system python-build-system)
9204 (synopsis "Atomic file writes in Python")
9205 (description "Library for atomic file writes using platform dependent tools
8f65585b 9206for atomic file system operations.")
5c6eea2a 9207 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 9208 (license license:expat)))
9bb6d184
LF
9209
9210(define-public python2-atomicwrites
f210e944 9211 (package-with-python2 python-atomicwrites))
561bb3cb
LF
9212
9213(define-public python-requests-toolbelt
9214 (package
9215 (name "python-requests-toolbelt")
c02af1c8 9216 (version "0.6.2")
561bb3cb
LF
9217 (source (origin
9218 (method url-fetch)
c02af1c8
LF
9219 (uri (string-append
9220 "https://pypi.python.org/packages/"
9221 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
9222 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
9223 (sha256
9224 (base32
c02af1c8 9225 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 9226 (build-system python-build-system)
759aadd4
LF
9227 (native-inputs
9228 `(("python-betamax" ,python-betamax)
9229 ("python-mock" ,python-mock)
9230 ("python-pytest" ,python-pytest)))
561bb3cb
LF
9231 (propagated-inputs
9232 `(("python-requests" ,python-requests)))
9233 (synopsis "Extensions to python-requests")
9234 (description "This is a toolbelt of useful classes and functions to be used
9235with python-requests.")
9236 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 9237 (license license:asl2.0)))
d1deb90b
LF
9238
9239(define-public python-click-threading
9240 (package
9241 (name "python-click-threading")
19ecdbed 9242 (version "0.4.3")
d1deb90b
LF
9243 (source (origin
9244 (method url-fetch)
19ecdbed 9245 (uri (pypi-uri "click-threading" version))
d1deb90b
LF
9246 (sha256
9247 (base32
19ecdbed 9248 "0xs4bg2ws0zgyiplk312l049hi23c2zqf1g771rjhh5vr2msk4cg"))))
d1deb90b
LF
9249 (build-system python-build-system)
9250 (propagated-inputs
9251 `(("python-click" ,python-click)))
9252 (synopsis "Utilities for multithreading in Click")
9253 (description "This package provides utilities for multithreading in Click
9254applications.")
9255 (home-page "https://github.com/click-contrib/click-threading")
9256 (license license:expat)))
7b17cab9
LF
9257
9258(define-public python-click-log
9259 (package
9260 (name "python-click-log")
3a91ac83 9261 (version "0.2.0")
7b17cab9
LF
9262 (source (origin
9263 (method url-fetch)
9264 (uri (pypi-uri "click-log" version))
9265 (sha256
9266 (base32
3a91ac83 9267 "1bjrfxji1yv4fj0g78ri2yfgn2wbivn8g69fxfinxvxpmighhshp"))))
7b17cab9
LF
9268 (build-system python-build-system)
9269 (propagated-inputs
9270 `(("python-click" ,python-click)))
9271 (synopsis "Logging for click applications")
9272 (description "This package provides a Python library for logging Click
9273applications.")
9274 (home-page "https://github.com/click-contrib/click-log")
9275 (license license:expat)))
7b3a4ee4
LF
9276
9277(define-public python-apipkg
9278 (package
9279 (name "python-apipkg")
9280 (version "1.4")
9281 (source (origin
9282 (method url-fetch)
9283 (uri (pypi-uri "apipkg" version))
9284 (sha256
9285 (base32
9286 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
9287 (build-system python-build-system)
328bb95d 9288 (native-inputs
7b3a4ee4
LF
9289 `(("python-pytest" ,python-pytest)))
9290 (synopsis "Namespace control and lazy-import mechanism")
9291 (description "With apipkg you can control the exported namespace of a Python
9292package and greatly reduce the number of imports for your users. It is a small
9293pure Python module that works on virtually all Python versions.")
9294 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 9295 (license license:expat)))
e08739c3
CAW
9296
9297(define-public python2-apipkg
f210e944 9298 (package-with-python2 python-apipkg))
848964fe
LF
9299
9300(define-public python-execnet
9301 (package
9302 (name "python-execnet")
9303 (version "1.4.1")
9304 (source (origin
9305 (method url-fetch)
9306 (uri (pypi-uri "execnet" version))
9307 (sha256
9308 (base32
9309 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9310 (build-system python-build-system)
ca0eee9d
LF
9311 (arguments
9312 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9313 ;; The two test failures are caused by the lack of an `ssh` executable.
9314 ;; The test suite can be run with pytest after the 'install' phase.
9315 #:tests? #f))
848964fe 9316 (native-inputs
ca0eee9d
LF
9317 `(("python-pytest" ,python-pytest)
9318 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 9319 (propagated-inputs
848964fe
LF
9320 `(("python-apipkg" ,python-apipkg)))
9321 (synopsis "Rapid multi-Python deployment")
9322 (description "Execnet provides a share-nothing model with
9323channel-send/receive communication for distributing execution across many
9324Python interpreters across version, platform and network barriers. It has a
d1e4ad1b 9325minimal and fast API targeting the following uses:
848964fe
LF
9326@enumerate
9327@item distribute tasks to (many) local or remote CPUs
9328@item write and deploy hybrid multi-process applications
9329@item write scripts to administer multiple environments
9330@end enumerate")
9331 (home-page "http://codespeak.net/execnet/")
f210e944 9332 (license license:expat)))
16c84f90
CAW
9333
9334(define-public python2-execnet
f210e944 9335 (package-with-python2 python-execnet))
6720dbb4 9336
d5bbf806 9337(define-public python-trollius-redis
9338 (package
9339 (name "python-trollius-redis")
9340 (version "0.1.4")
9341 (source
9342 (origin
9343 (method url-fetch)
9344 (uri (pypi-uri "trollius_redis" version))
9345 (sha256
9346 (base32
9347 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
9348 (build-system python-build-system)
97b62eb0
MB
9349 ;; TODO: Tests require packaging 'hiredis'.
9350 (arguments '(#:tests? #f))
d5bbf806 9351 (home-page "https://github.com/benjolitz/trollius-redis")
9352 (synopsis "Port of asyncio-redis to trollius")
9353 (description "@code{trollius-redis} is a Redis client for Python
9354 trollius. It is an asynchronious IO (PEP 3156) implementation of the
9355 Redis protocol.")
9356 (license license:bsd-2)))
9357
9358(define-public python2-trollius-redis
9359 (package-with-python2 python-trollius-redis))
9360
6720dbb4
LF
9361;;; The software provided by this package was integrated into pytest 2.8.
9362(define-public python-pytest-cache
9363 (package
9364 (name "python-pytest-cache")
9365 (version "1.0")
9366 (source (origin
9367 (method url-fetch)
9368 (uri (pypi-uri "pytest-cache" version))
9369 (sha256
9370 (base32
9371 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
9372 (build-system python-build-system)
f22efa01 9373 (propagated-inputs
630d938f
EF
9374 `(("python-apipkg" ,python-apipkg)
9375 ("python-execnet" ,python-execnet)
9376 ("python-py" ,python-py)
9377 ("python-pytest" ,python-pytest)))
6720dbb4
LF
9378 (synopsis "Py.test plugin with mechanisms for caching across test runs")
9379 (description "The pytest-cache plugin provides tools to rerun failures from
9380the last py.test invocation.")
9381 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 9382 (license license:expat)))
0adc21c2
EF
9383
9384(define-public python2-pytest-cache
f210e944 9385 (package-with-python2 python-pytest-cache))
d7e729fe
LF
9386
9387(define-public python-pytest-localserver
9388 (package
9389 (name "python-pytest-localserver")
29f20168 9390 (version "0.3.5")
d7e729fe
LF
9391 (source (origin
9392 (method url-fetch)
29f20168 9393 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
9394 (sha256
9395 (base32
29f20168 9396 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
9397 (build-system python-build-system)
9398 (arguments
9399 `(#:phases (modify-phases %standard-phases
9400 (replace 'check
9401 (lambda _
9402 (zero? (system* "py.test" "--genscript=runtests.py"))
9403 (zero? (system* "py.test")))))))
9404 (native-inputs
d7e729fe
LF
9405 `(("python-pytest" ,python-pytest)
9406 ("python-requests" ,python-requests)
9ba40f05 9407 ("python-six" ,python-six)))
f22efa01 9408 (propagated-inputs
9ba40f05 9409 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
9410 (synopsis "Py.test plugin to test server connections locally")
9411 (description "Pytest-localserver is a plugin for the pytest testing
9412framework which enables you to test server connections locally.")
9413 (home-page "https://pypi.python.org/pypi/pytest-localserver")
9414 (license license:expat)))
28cecbb7
LF
9415
9416(define-public python-wsgi-intercept
9417 (package
9418 (name "python-wsgi-intercept")
909fbd2b 9419 (version "1.2.2")
28cecbb7
LF
9420 (source (origin
9421 (method url-fetch)
909fbd2b
LF
9422 (uri (string-append
9423 "https://pypi.python.org/packages/"
9424 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
9425 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
9426 (sha256
9427 (base32
909fbd2b 9428 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 9429 (build-system python-build-system)
b9fc496f
HG
9430 (propagated-inputs
9431 `(("python-six" ,python-six)))
28cecbb7 9432 (native-inputs
9d813ec1 9433 `(("python-pytest" ,python-pytest)
b9fc496f
HG
9434 ("python-httplib2" ,python-httplib2)
9435 ("python-requests" ,python-requests)
8757f050 9436 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
9437 (synopsis "Puts a WSGI application in place of a real URI for testing")
9438 (description "Wsgi_intercept installs a WSGI application in place of a real
9439URI for testing. Testing a WSGI application normally involves starting a
9440server at a local host and port, then pointing your test code to that address.
9441Instead, this library lets you intercept calls to any specific host/port
9442combination and redirect them into a WSGI application importable by your test
9443program. Thus, you can avoid spawning multiple processes or threads to test
9444your Web app.")
9445 (home-page "https://github.com/cdent/wsgi-intercept")
9446 (license license:expat)))
89b8a551
LF
9447
9448(define-public python-pytest-xprocess
9449 (package
9450 (name "python-pytest-xprocess")
9451 (version "0.9.1")
9452 (source (origin
9453 (method url-fetch)
9454 (uri (pypi-uri "pytest-xprocess" version))
9455 (sha256
9456 (base32
9457 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
9458 (build-system python-build-system)
9459 (propagated-inputs
9460 `(("python-pytest" ,python-pytest)
9461 ("python-pytest-cache" ,python-pytest-cache)
9462 ("python-psutil" ,python-psutil)))
9463 (synopsis "Pytest plugin to manage external processes across test runs")
9464 (description "Pytest-xprocess is an experimental py.test plugin for managing
9465processes across test runs.")
9466 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
9467 (license license:expat)))
5c299bf0
LF
9468
9469(define-public python-icalendar
9470 (package
9471 (name "python-icalendar")
2da21e48 9472 (version "3.11.7")
5c299bf0
LF
9473 (source (origin
9474 (method url-fetch)
9475 (uri (pypi-uri "icalendar" version))
9476 (sha256
9477 (base32
2da21e48 9478 "0ahf1i98wjizhld2qd7v2vmvzsmdw08mmins82bf3fpbnp2sxbgc"))))
5c299bf0
LF
9479 (build-system python-build-system)
9480 (propagated-inputs
22d7360b 9481 `(("python-dateutil" ,python-dateutil)
5c299bf0
LF
9482 ("python-pytz" ,python-pytz)))
9483 (synopsis "Python library for parsing iCalendar files")
9484 (description "The icalendar package is a parser/generator of iCalendar
9485files for use with Python.")
9486 (home-page "https://github.com/collective/icalendar")
3f641af0 9487 (license license:bsd-2)))
6bbbb53e
LF
9488
9489(define-public python-sphinxcontrib-newsfeed
9490 (package
9491 (name "python-sphinxcontrib-newsfeed")
9492 (version "0.1.4")
9493 (source (origin
9494 (method url-fetch)
9495 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
9496 (sha256
9497 (base32
9498 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
3d2a544c 9499 (arguments '(#:tests? #f)) ; No tests.
6bbbb53e
LF
9500 (build-system python-build-system)
9501 (propagated-inputs
251ed7f2 9502 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
9503 (synopsis "News Feed extension for Sphinx")
9504 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
9505Blog, News or Announcements section to a Sphinx website.")
9506 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 9507 (license license:bsd-2)))
2216e15c
SB
9508
9509(define-public python-args
9510 (package
9511 (name "python-args")
9512 (version "0.1.0")
9513 (source (origin
9514 (method url-fetch)
9515 (uri (pypi-uri "args" version))
9516 (sha256
9517 (base32
9518 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9519 (build-system python-build-system)
2216e15c
SB
9520 (home-page "https://github.com/kennethreitz/args")
9521 (synopsis "Command-line argument parser")
9522 (description
9523 "This library provides a Python module to parse command-line arguments.")
3f641af0 9524 (license license:bsd-3)))
2216e15c
SB
9525
9526(define-public python2-args
9527 (package-with-python2 python-args))
c06a3de9
SB
9528
9529(define-public python-clint
9530 (package
9531 (name "python-clint")
9532 (version "0.5.1")
9533 (source (origin
9534 (method url-fetch)
9535 (uri (pypi-uri "clint" version))
9536 (sha256
9537 (base32
9538 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9539 (build-system python-build-system)
6145b604
MB
9540 (arguments
9541 '(#:phases
9542 (modify-phases %standard-phases
9543 (replace 'check
9544 (lambda _
9545 (zero? (system* "py.test" "-v")))))))
9546 (native-inputs
9547 `(("python-pytest" ,python-pytest)))
f22efa01 9548 (propagated-inputs
f3b98f4f 9549 `(("python-args" ,python-args)))
c06a3de9
SB
9550 (home-page "https://github.com/kennethreitz/clint")
9551 (synopsis "Command-line interface tools")
9552 (description
9553 "Clint is a Python module filled with a set of tools for developing
9554command-line applications, including tools for colored and indented
9555output, progress bar display, and pipes.")
3f641af0 9556 (license license:isc)))
c06a3de9
SB
9557
9558(define-public python2-clint
9559 (package-with-python2 python-clint))
4ecdeef8
SB
9560
9561(define-public python-astor
9562 (package
9563 (name "python-astor")
9564 (version "0.5")
9565 (source (origin
9566 (method url-fetch)
9567 (uri (pypi-uri "astor" version))
9568 (sha256
9569 (base32
9570 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9571 (build-system python-build-system)
4ecdeef8
SB
9572 (home-page "https://github.com/berkerpeksag/astor")
9573 (synopsis "Read and write Python ASTs")
9574 (description
9575 "Astor is designed to allow easy manipulation of Python source via the
9576Abstract Syntax Tree.")
3f641af0 9577 (license license:bsd-3)))
4ecdeef8
SB
9578
9579(define-public python2-astor
9580 (package-with-python2 python-astor))
e224b7d0
SB
9581
9582(define-public python-rply
9583 (package
9584 (name "python-rply")
9585 (version "0.7.4")
9586 (source (origin
9587 (method url-fetch)
9588 (uri (pypi-uri "rply" version))
9589 (sha256
9590 (base32
9591 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9592 (build-system python-build-system)
f22efa01 9593 (propagated-inputs
f3b98f4f 9594 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
9595 (home-page "https://github.com/alex/rply")
9596 (synopsis "Parser generator for Python")
9597 (description
9598 "This package provides a pure Python based parser generator, that also
9599works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9600with a new public API, and RPython support.")
3f641af0 9601 (license license:bsd-3)))
e224b7d0
SB
9602
9603(define-public python2-rply
9604 (package-with-python2 python-rply))
c3e919d7
SB
9605
9606(define-public python-hy
9607 (package
9608 (name "python-hy")
9609 (version "0.11.1")
9610 (source (origin
9611 (method url-fetch)
9612 (uri (pypi-uri "hy" version))
9613 (sha256
9614 (base32
9615 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9616 (build-system python-build-system)
15c37077
MB
9617 (arguments
9618 '(#:phases
9619 (modify-phases %standard-phases
9620 (replace 'check
9621 (lambda _
9622 ;; Tests require write access to HOME.
9623 (setenv "HOME" "/tmp")
9624 (zero? (system* "nosetests")))))))
9625 (native-inputs
9626 `(("python-coverage" ,python-coverage)
9627 ("python-nose" ,python-nose)))
f22efa01 9628 (propagated-inputs
c3e919d7
SB
9629 `(("python-astor" ,python-astor)
9630 ("python-clint" ,python-clint)
f3b98f4f 9631 ("python-rply" ,python-rply)))
c3e919d7
SB
9632 (home-page "http://hylang.org/")
9633 (synopsis "Lisp frontend to Python")
9634 (description
9635 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9636its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9637Python at your fingertips, in Lisp form.")
9638 (license license:expat)))
9639
9640(define-public python2-hy
9641 (package-with-python2 python-hy))
7a5b944e 9642
81f7f297
EF
9643(define-public python-rauth
9644 (package
9645 (name "python-rauth")
06fe79f2 9646 (version "0.7.3")
81f7f297
EF
9647 (source
9648 (origin
9649 (method url-fetch)
9650 (uri (pypi-uri "rauth" version))
9651 (sha256
9652 (base32
06fe79f2 9653 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
81f7f297
EF
9654 (build-system python-build-system)
9655 (arguments
9656 `(#:test-target "check"))
f22efa01 9657 (propagated-inputs
81f7f297
EF
9658 `(("python-requests" ,python-requests)))
9659 (home-page "https://github.com/litl/rauth")
9660 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9661 (description
9662 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9663provides service wrappers for convenient connection initialization and
9664authenticated session objects providing things like keep-alive.")
0848d8d3
EF
9665 (license license:expat)
9666 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
9667
9668(define-public python2-rauth
0848d8d3
EF
9669 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9670 (package
9671 (inherit base)
00e10c6e 9672 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 9673 ,@(package-native-inputs base))))))
81f7f297 9674
1abe448d
EF
9675(define-public python2-functools32
9676 (package
9677 (name "python2-functools32")
9678 (version "3.2.3-2")
9679 (source
9680 (origin
9681 (method url-fetch)
9682 (uri (pypi-uri "functools32" version))
9683 (sha256
9684 (base32
9685 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9686 (build-system python-build-system)
9687 (arguments
9688 `(#:python ,python-2
9689 #:tests? #f)) ; no test target
1abe448d
EF
9690 (home-page "https://github.com/MiCHiLU/python-functools32")
9691 (synopsis
9692 "Backport of the functools module from Python 3.2.3")
9693 (description
9694 "This package is a backport of the @code{functools} module from Python
96953.2.3 for use with older versions of Python and PyPy.")
9696 (license license:expat)))
9697
550bd98b
MB
9698(define-public python2-subprocess32
9699 (package
9700 (name "python2-subprocess32")
9701 (version "3.2.7")
9702 (source (origin
9703 (method url-fetch)
9704 (uri (pypi-uri "subprocess32" version))
9705 (sha256
9706 (base32
9707 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9708 (patches
9709 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9710 (build-system python-build-system)
9711 (arguments
9712 `(#:python ,python-2
9713 #:phases
9714 (modify-phases %standard-phases
9715 (add-after 'unpack 'patch-/bin/sh
9716 (lambda _
9717 (substitute* '("subprocess32.py"
9718 "test_subprocess32.py")
9719 (("/bin/sh") (which "sh")))
9720 #t))
9721 (delete 'check)
9722 (add-after 'install 'check
9723 (lambda* (#:key inputs outputs #:allow-other-keys)
9724 ;; For some reason this package fails to import
9725 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9726 ;; directory. Running tests after install is easier.
9727 (add-installed-pythonpath inputs outputs)
9728 (zero? (system* "python" "test_subprocess32.py")))))))
9729 (home-page "https://github.com/google/python-subprocess32")
9730 (synopsis "Backport of the subprocess module from Python 3.2")
9731 (description
9732 "This is a backport of the @code{subprocess} standard library module
9733from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9734new features. On POSIX systems it is guaranteed to be reliable when used
9735in threaded applications. It includes timeout support from Python 3.3 but
9736otherwise matches 3.2’s API.")
9737 (license license:psfl)))
9738
877889f3 9739(define-public python2-futures
7a5b944e 9740 (package
877889f3 9741 (name "python2-futures")
e17a1248 9742 (version "3.0.5")
7a5b944e
EF
9743 (source
9744 (origin
9745 (method url-fetch)
9746 (uri (pypi-uri "futures" version))
9747 (sha256
9748 (base32
e17a1248 9749 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7a5b944e 9750 (build-system python-build-system)
877889f3 9751 (arguments `(#:python ,python-2))
7a5b944e
EF
9752 (home-page "https://github.com/agronholm/pythonfutures")
9753 (synopsis
9754 "Backport of the concurrent.futures package from Python 3.2")
9755 (description
9756 "The concurrent.futures module provides a high-level interface for
9757asynchronously executing callables. This package backports the
9758concurrent.futures package from Python 3.2")
3f641af0 9759 (license license:bsd-3)))
7a5b944e 9760
5cb2fe44
EF
9761(define-public python-promise
9762 (package
9763 (name "python-promise")
9764 (version "0.4.2")
9765 (source
9766 (origin
9767 (method url-fetch)
9768 (uri (pypi-uri "promise" version))
9769 (sha256
9770 (base32
9771 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9772 (build-system python-build-system)
9773 ;; Tests wants python-futures, which is a python2 only program, and
9774 ;; can't be found by python-promise at test time.
9775 (arguments `(#:tests? #f))
9776 (home-page "https://github.com/syrusakbary/promise")
9777 (synopsis "Promises/A+ implementation for Python")
9778 (description
9779 "Promises/A+ implementation for Python")
9780 (properties `((python2-variant . ,(delay python2-promise))))
9781 (license license:expat)))
9782
9783(define-public python2-promise
9784 (let ((promise (package-with-python2
9785 (strip-python2-variant python-promise))))
9786 (package (inherit promise)
9787 (arguments (substitute-keyword-arguments (package-arguments promise)
9788 ((#:tests? _) #t)))
9789 (native-inputs
9790 `(("python2-futures" ,python2-futures)
9791 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
9792 ,@(package-native-inputs promise))))))
9793
c18f6368
EF
9794(define-public python-urllib3
9795 (package
9796 (name "python-urllib3")
6178274d 9797 (version "1.18.1")
c18f6368
EF
9798 (source
9799 (origin
9800 (method url-fetch)
9801 (uri (pypi-uri "urllib3" version))
9802 (sha256
9803 (base32
6178274d 9804 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
9805 (build-system python-build-system)
9806 (arguments `(#:tests? #f))
9807 (native-inputs
f3b98f4f 9808 `(;; some packages for tests
c18f6368
EF
9809 ("python-nose" ,python-nose)
9810 ("python-mock" ,python-mock)
9811 ("python-tornado" ,python-tornado)))
9812 (propagated-inputs
8322749a 9813 `(;; extra packages for https security
c18f6368
EF
9814 ("python-certifi" ,python-certifi)
9815 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9816 ("python-pyasn1" ,python-pyasn1)
9817 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 9818 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
9819 (synopsis "HTTP library with thread-safe connection pooling")
9820 (description
9821 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9822can reuse the same socket connection for multiple requests, it can POST files,
9823supports url redirection and retries, and also gzip and deflate decoding.")
9824 (license license:expat)))
9825
9826(define-public python2-urllib3
9827 (package-with-python2 python-urllib3))
2b2f2fc1
DT
9828
9829(define-public python-colorama
9830 (package
9831 (name "python-colorama")
f92576f9 9832 (version "0.3.7")
2b2f2fc1
DT
9833 (source
9834 (origin
9835 (method url-fetch)
9836 (uri (pypi-uri "colorama" version))
9837 (sha256
9838 (base32
f92576f9 9839 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
2b2f2fc1 9840 (build-system python-build-system)
46e110cc 9841 (synopsis "Colored terminal text rendering for Python")
2b2f2fc1
DT
9842 (description "Colorama is a Python library for rendering colored terminal
9843text.")
9844 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 9845 (license license:bsd-3)))
2b2f2fc1
DT
9846
9847(define-public python2-colorama
9848 (package-with-python2 python-colorama))
f5bcec6e
DT
9849
9850(define-public python-rsa
9851 (package
9852 (name "python-rsa")
ecd68c53 9853 (version "3.4.2")
f5bcec6e
DT
9854 (source
9855 (origin
9856 (method url-fetch)
9857 (uri (pypi-uri "rsa" version))
9858 (sha256
9859 (base32
ecd68c53 9860 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 9861 (build-system python-build-system)
f22efa01 9862 (propagated-inputs
f3b98f4f 9863 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
9864 (synopsis "Pure-Python RSA implementation")
9865 (description "Python-RSA is a pure-Python RSA implementation. It supports
9866encryption and decryption, signing and verifying signatures, and key
9867generation according to PKCS#1 version 1.5. It can be used as a Python
9868library as well as on the command line.")
9869 (home-page "http://stuvel.eu/rsa")
3f641af0 9870 (license license:asl2.0)))
f5bcec6e
DT
9871
9872(define-public python2-rsa
9873 (package-with-python2 python-rsa))
c0aacfa5
DT
9874
9875(define-public python-pluggy
9876 (package
9877 (name "python-pluggy")
9878 (version "0.3.1")
9879 (source
9880 (origin
9881 (method url-fetch)
9882 (uri (pypi-uri "pluggy" version))
9883 (sha256
9884 (base32
9885 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9886 (build-system python-build-system)
c0aacfa5
DT
9887 (synopsis "Plugin and hook calling mechanism for Python")
9888 (description "Pluggy is an extraction of the plugin manager as used by
9889Pytest but stripped of Pytest specific details.")
9890 (home-page "https://pypi.python.org/pypi/pluggy")
9891 (license license:expat)))
9892
9893(define-public python2-pluggy
9894 (package-with-python2 python-pluggy))
a4af21ca
DT
9895
9896(define-public python-tox
9897 (package
9898 (name "python-tox")
c98f9c52 9899 (version "2.8.0")
a4af21ca
DT
9900 (source
9901 (origin
9902 (method url-fetch)
9903 (uri (pypi-uri "tox" version))
9904 (sha256
9905 (base32
c98f9c52 9906 "00lrql2cfzhb712v70inac6mrgdv8s8fmvz7qpggkk623hkm2pgc"))))
a4af21ca
DT
9907 (build-system python-build-system)
9908 (arguments
7ba07edf
HG
9909 ;; FIXME: Tests require pytest-timeout, which itself requires
9910 ;; pytest>=2.8.0 for installation.
a4af21ca 9911 '(#:tests? #f))
482d9591
HG
9912 (propagated-inputs
9913 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 9914 ("python-py" ,python-py)
482d9591 9915 ("python-virtualenv" ,python-virtualenv)))
328bb95d 9916 (native-inputs
7ba07edf 9917 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
c98f9c52
CR
9918 ("python-pytest" ,python-pytest) ; >= 2.3.5
9919 ("python-setuptools-scm" ,python-setuptools-scm)))
a4af21ca
DT
9920 (home-page "http://tox.testrun.org/")
9921 (synopsis "Virtualenv-based automation of test activities")
9922 (description "Tox is a generic virtualenv management and test command line
9923tool. It can be used to check that a package installs correctly with
9924different Python versions and interpreters, or run tests in each type of
9925supported environment, or act as a frontend to continuous integration
9926servers.")
9927 (license license:expat)))
9928
9929(define-public python2-tox
9930 (package-with-python2 python-tox))
ba9da248
DT
9931
9932(define-public python-jmespath
9933 (package
9934 (name "python-jmespath")
9935 (version "0.9.0")
9936 (source
9937 (origin
9938 (method url-fetch)
9939 (uri (pypi-uri "jmespath" version))
9940 (sha256
9941 (base32
9942 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9943 (build-system python-build-system)
52a75a83
MB
9944 (native-inputs
9945 `(("python-nose" ,python-nose)))
ba9da248
DT
9946 (synopsis "JSON Matching Expressions")
9947 (description "JMESPath (pronounced “james path”) is a Python library that
9948allows one to declaratively specify how to extract elements from a JSON
9949document.")
9950 (home-page "https://github.com/jmespath/jmespath.py")
9951 (license license:expat)))
9952
9953(define-public python2-jmespath
9954 (package-with-python2 python-jmespath))
935fcd5c
DT
9955
9956(define-public python-botocore
9957 (package
9958 (name "python-botocore")
d93985fe 9959 (version "1.5.26")
935fcd5c
DT
9960 (source
9961 (origin
9962 (method url-fetch)
9963 (uri (pypi-uri "botocore" version))
9964 (sha256
9965 (base32
d93985fe 9966 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
935fcd5c 9967 (build-system python-build-system)
877fdac9
MB
9968 (arguments
9969 ;; FIXME: Many tests are failing.
9970 '(#:tests? #f))
482d9591 9971 (propagated-inputs
22d7360b 9972 `(("python-dateutil" ,python-dateutil)
935fcd5c 9973 ("python-docutils" ,python-docutils)
482d9591 9974 ("python-jmespath" ,python-jmespath)))
8fa6890b 9975 (native-inputs
482d9591 9976 `(("python-mock" ,python-mock)
935fcd5c 9977 ("python-nose" ,python-nose)
482d9591 9978 ("behave" ,behave)
935fcd5c 9979 ("python-tox" ,python-tox)
482d9591 9980 ("python-wheel" ,python-wheel)))
935fcd5c
DT
9981 (home-page "https://github.com/boto/botocore")
9982 (synopsis "Low-level interface to AWS")
9983 (description "Botocore is a Python library that provides a low-level
9984interface to the Amazon Web Services (AWS) API.")
3f641af0 9985 (license license:asl2.0)))
935fcd5c
DT
9986
9987(define-public python2-botocore
9988 (package-with-python2 python-botocore))
f861b8b8
DT
9989
9990(define-public awscli
9991 (package
9992 (name "awscli")
192b887a 9993 (version "1.11.63")
f861b8b8
DT
9994 (source
9995 (origin
9996 (method url-fetch)
d5ccf71e 9997 (uri (pypi-uri name version))
f861b8b8
DT
9998 (sha256
9999 (base32
192b887a 10000 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
f861b8b8 10001 (build-system python-build-system)
482d9591 10002 (propagated-inputs
f861b8b8 10003 `(("python-colorama" ,python-colorama)
482d9591
HG
10004 ("python-botocore" ,python-botocore)
10005 ("python-s3transfer" ,python-s3transfer)
f861b8b8 10006 ("python-docutils" ,python-docutils)
0cb9fba3 10007 ("python-pyyaml" ,python-pyyaml)
482d9591 10008 ("python-rsa" ,python-rsa)))
619bfd81
MB
10009 (arguments
10010 ;; FIXME: The 'pypi' release does not contain tests.
10011 '(#:tests? #f))
60a8be3a 10012 (home-page "https://aws.amazon.com/cli/")
f861b8b8
DT
10013 (synopsis "Command line client for AWS")
10014 (description "AWS CLI provides a unified command line interface to the
10015Amazon Web Services (AWS) API.")
3f641af0 10016 (license license:asl2.0)))
6a44697d
LF
10017
10018(define-public python-hypothesis
10019 (package
10020 (name "python-hypothesis")
bea6d94d 10021 (version "3.1.0")
6a44697d
LF
10022 (source (origin
10023 (method url-fetch)
10024 (uri (pypi-uri "hypothesis" version))
10025 (sha256
10026 (base32
bea6d94d 10027 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 10028 (build-system python-build-system)
bd100c71 10029 (native-inputs
6a44697d
LF
10030 `(("python-flake8" ,python-flake8)
10031 ("python-pytest" ,python-pytest)))
10032 (synopsis "Library for property based testing")
10033 (description "Hypothesis is a library for testing your Python code against a
10034much larger range of examples than you would ever want to write by hand. It’s
10035based on the Haskell library, Quickcheck, and is designed to integrate
10036seamlessly into your existing Python unit testing work flow.")
10037 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 10038 (license license:mpl2.0)
6f068e08 10039 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
10040
10041(define-public python2-hypothesis
6f068e08
EF
10042 (let ((hypothesis (package-with-python2
10043 (strip-python2-variant python-hypothesis))))
10044 (package (inherit hypothesis)
10045 (native-inputs
bd100c71
MB
10046 `(("python2-enum34" ,python2-enum34)
10047 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
10048
10049(define-public python-pytest-subtesthack
10050 (package
10051 (name "python-pytest-subtesthack")
10052 (version "0.1.1")
10053 (source (origin
10054 (method url-fetch)
10055 (uri (pypi-uri "pytest-subtesthack" version))
10056 (sha256
10057 (base32
10058 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
10059 (build-system python-build-system)
7517e73c
LF
10060 (propagated-inputs
10061 `(("python-pytest" ,python-pytest)))
10062 (synopsis "Set-up and tear-down fixtures for unit tests")
10063 (description "This plugin allows you to set up and tear down fixtures within
10064unit test functions that use @code{py.test}. This is useful for using
10065@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
10066function multiple times, without setting up or tearing down fixture state as is
10067normally the case.")
10068 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 10069 (license license:unlicense)))
7517e73c
LF
10070
10071(define-public python2-pytest-subtesthack
10072 (package-with-python2 python-pytest-subtesthack))
0bdc1671 10073
7637de23 10074(define-public python-xdo
0bdc1671 10075 (package
7637de23 10076 (name "python-xdo")
e871c332 10077 (version "0.3")
0bdc1671
CAW
10078 (source (origin
10079 (method url-fetch)
10080 (uri (string-append
10081 "http://http.debian.net/debian/pool/main/p/python-xdo/"
10082 "python-xdo_" version ".orig.tar.gz"))
10083 (sha256
10084 (base32
e871c332 10085 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
0bdc1671
CAW
10086 (build-system python-build-system)
10087 (arguments
736cfc10
SB
10088 '(#:phases
10089 (modify-phases %standard-phases
10090 (add-before 'install 'patch-libxdo-path
10091 ;; Hardcode the path of dynamically loaded libxdo library.
10092 (lambda* (#:key inputs #:allow-other-keys)
10093 (let ((libxdo (string-append
10094 (assoc-ref inputs "xdotool")
10095 "/lib/libxdo.so")))
10096 (substitute* "xdo/_xdo.py"
10097 (("find_library\\(\"xdo\"\\)")
10098 (simple-format #f "\"~a\"" libxdo)))
10099 #t))))
10100 #:tests? #f)) ; no tests provided
0b5e0863
SB
10101 (propagated-inputs
10102 `(("python-six" ,python-six)))
0bdc1671
CAW
10103 (inputs
10104 `(("xdotool" ,xdotool)
10105 ("libX11" ,libx11)))
10106 (home-page "https://tracker.debian.org/pkg/python-xdo")
10107 (synopsis "Python library for simulating X11 keyboard/mouse input")
10108 (description "Provides bindings to libxdo for manipulating X11 via simulated
10109input. (Note that this is mostly a legacy library; you may wish to look at
10110python-xdo for newer bindings.)")
3f641af0 10111 (license license:bsd-3)))
0bdc1671 10112
7637de23
LF
10113(define-public python2-xdo
10114 (package-with-python2 python-xdo))
10115
cb34dc6c
CAW
10116(define-public python-wtforms
10117 (package
10118 (name "python-wtforms")
10119 (version "2.1")
10120 (source
10121 (origin
10122 (method url-fetch)
10123 (uri (pypi-uri "WTForms" version ".zip"))
10124 (sha256
10125 (base32
10126 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
10127 (build-system python-build-system)
13c4d874
EF
10128 (arguments
10129 '(#:phases
10130 (modify-phases %standard-phases
10131 (add-after 'unpack 'remove-django-test
10132 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
10133 (lambda _
10134 (substitute*
10135 "tests/runtests.py"
10136 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
10137 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
10138 #t)))))
cb34dc6c
CAW
10139 (native-inputs
10140 `(("unzip" ,unzip)))
10141 (home-page "http://wtforms.simplecodes.com/")
10142 (synopsis
10143 "Form validation and rendering library for Python web development")
10144 (description
10145 "WTForms is a flexible forms validation and rendering library
10146for Python web development. It is very similar to the web form API
10147available in Django, but is a standalone package.")
f210e944 10148 (license license:bsd-3)))
cb34dc6c
CAW
10149
10150(define-public python2-wtforms
f210e944 10151 (package-with-python2 python-wtforms))
50aaec25
DT
10152
10153(define-public python-mako
10154 (package
10155 (name "python-mako")
3753f2e6 10156 (version "1.0.6")
50aaec25
DT
10157 (source
10158 (origin
10159 (method url-fetch)
10160 (uri (pypi-uri "Mako" version))
10161 (sha256
10162 (base32
3753f2e6 10163 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
50aaec25 10164 (build-system python-build-system)
482d9591
HG
10165 (propagated-inputs
10166 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 10167 (native-inputs
482d9591 10168 `(("python-mock" ,python-mock)
e435af5c
MB
10169 ("python-nose" ,python-nose)
10170 ("python-pytest" ,python-pytest)))
50aaec25
DT
10171 (home-page "http://www.makotemplates.org/")
10172 (synopsis "Templating language for Python")
10173 (description "Mako is a templating language for Python that compiles
10174templates into Python modules.")
f210e944 10175 (license license:expat)))
50aaec25
DT
10176
10177(define-public python2-mako
f210e944 10178 (package-with-python2 python-mako))
ae00a41f
CAW
10179
10180(define-public python-waitress
10181 (package
10182 (name "python-waitress")
10183 (version "0.8.10")
10184 (source
10185 (origin
10186 (method url-fetch)
10187 (uri (pypi-uri "waitress" version))
10188 (sha256
10189 (base32
10190 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
10191 (build-system python-build-system)
10192 (home-page "https://github.com/Pylons/waitress")
10193 (synopsis "Waitress WSGI server")
10194 (description "Waitress is meant to be a production-quality pure-Python WSGI
10195server with very acceptable performance.")
f210e944 10196 (license license:zpl2.1)))
ae00a41f
CAW
10197
10198(define-public python2-waitress
f210e944 10199 (package-with-python2 python-waitress))
778a284b
CAW
10200
10201(define-public python-wsgiproxy2
10202 (package
10203 (name "python-wsgiproxy2")
10204 (version "0.4.2")
10205 (source
10206 (origin
10207 (method url-fetch)
10208 (uri (pypi-uri "WSGIProxy2" version ".zip"))
10209 (sha256
10210 (base32
10211 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
10212 (build-system python-build-system)
e359b31a
LF
10213 (arguments
10214 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
10215 ;; support Python 3:
10216 ;; https://github.com/benoitc/restkit/issues/140
10217 #:tests? #f))
778a284b
CAW
10218 (native-inputs
10219 `(("unzip" ,unzip)
10220 ("python-nose" ,python-nose)
10221 ("python-coverage" ,python-coverage)))
10222 (propagated-inputs
10223 `(("python-six" ,python-six)
10224 ("python-webob" ,python-webob)))
10225 (home-page
10226 "https://github.com/gawel/WSGIProxy2/")
10227 (synopsis "WSGI Proxy with various http client backends")
10228 (description "WSGI turns HTTP requests into WSGI function calls.
10229WSGIProxy turns WSGI function calls into HTTP requests.
10230It also includes code to sign requests and pass private data,
10231and to spawn subprocesses to handle requests.")
f210e944 10232 (license license:expat)))
778a284b
CAW
10233
10234(define-public python2-wsgiproxy2
f210e944 10235 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
10236
10237(define-public python-pastedeploy
10238 (package
10239 (name "python-pastedeploy")
10240 (version "1.5.2")
10241 (source
10242 (origin
10243 (method url-fetch)
10244 (uri (pypi-uri "PasteDeploy" version))
10245 (sha256
10246 (base32
10247 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
10248 (build-system python-build-system)
10249 (native-inputs
10250 `(("python-nose" ,python-nose)))
bb7518b1
CAW
10251 (home-page "http://pythonpaste.org/deploy/")
10252 (synopsis
10253 "Load, configure, and compose WSGI applications and servers")
10254 (description
10255 "This tool provides code to load WSGI applications and servers from URIs;
10256these URIs can refer to Python Eggs for INI-style configuration files. Paste
10257Script provides commands to serve applications based on this configuration
10258file.")
10259 (license license:expat)))
10260
10261(define-public python2-pastedeploy
10262 (package-with-python2 python-pastedeploy))
1cf53652 10263
c4a7904c
CAW
10264(define-public python-paste
10265 (package
10266 (name "python-paste")
ba1731da 10267 (version "2.0.3")
c4a7904c
CAW
10268 (source
10269 (origin
10270 (method url-fetch)
10271 (uri (pypi-uri "Paste" version))
10272 (sha256
10273 (base32
ba1731da 10274 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
fc1adab1
AK
10275 (patches (search-patches "python-paste-remove-website-test.patch"
10276 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
10277 (build-system python-build-system)
10278 (native-inputs
10279 `(("python-nose" ,python-nose)))
10280 (propagated-inputs
f3b98f4f 10281 `(("python-six" ,python-six)))
c4a7904c
CAW
10282 (home-page "http://pythonpaste.org")
10283 (synopsis
10284 "Python web development tools, focusing on WSGI")
10285 (description
10286 "Paste provides a variety of web development tools and middleware which
10287can be nested together to build web applications. Paste's design closely
10288follows ideas flowing from WSGI (Web Standard Gateway Interface).")
ba1731da 10289 (license license:expat)))
c4a7904c
CAW
10290
10291(define-public python2-paste
ba1731da 10292 (package-with-python2 python-paste))
c4a7904c 10293
a8f20f63
CAW
10294(define-public python-pastescript
10295 (package
10296 (name "python-pastescript")
10297 (version "2.0.2")
10298 (source
10299 (origin
10300 (method url-fetch)
10301 (uri (pypi-uri "PasteScript" version))
10302 (sha256
10303 (base32
10304 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
10305 (build-system python-build-system)
10306 (native-inputs
10307 `(("python-nose" ,python-nose)))
10308 (propagated-inputs
f3b98f4f 10309 `(("python-paste" ,python-paste)
a8f20f63
CAW
10310 ("python-pastedeploy" ,python-pastedeploy)))
10311 (home-page "http://pythonpaste.org/script/")
10312 (arguments
10313 '(;; Unfortunately, this requires the latest unittest2,
10314 ;; but that requires traceback2 which requires linecache2 which requires
10315 ;; unittest2. So we're skipping tests for now.
10316 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
10317 ;; so in theory we could get around this situation somehow.)
10318 #:tests? #f))
10319 (synopsis
10320 "Pluggable command line tool for serving web applications and more")
10321 (description
10322 "PasteScript is a plugin-friendly command line tool which provides a
10323variety of features, from launching web applications to bootstrapping project
10324layouts.")
10325 (license license:expat)))
10326
10327(define-public python2-pastescript
10328 (package-with-python2 python-pastescript))
10329
1cf53652
CAW
10330(define-public python-pyquery
10331 (package
10332 (name "python-pyquery")
ab0c3429 10333 (version "1.2.17")
1cf53652
CAW
10334 (source
10335 (origin
10336 (method url-fetch)
10337 (uri (pypi-uri "pyquery" version))
10338 (sha256
10339 (base32
ab0c3429 10340 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
1cf53652 10341 (build-system python-build-system)
2ddbfa8c
LF
10342 (native-inputs
10343 `(("python-webob" ,python-webob)
10344 ("python-webtest" ,python-webtest)))
1cf53652
CAW
10345 (propagated-inputs
10346 `(("python-lxml" ,python-lxml)
10347 ("python-cssselect" ,python-cssselect)))
10348 (home-page "https://github.com/gawel/pyquery")
10349 (synopsis "Make jQuery-like queries on xml documents")
10350 (description "pyquery allows you to make jQuery queries on xml documents.
10351The API is as much as possible the similar to jQuery. pyquery uses lxml for
10352fast xml and html manipulation.")
f210e944 10353 (license license:bsd-3)))
1cf53652
CAW
10354
10355(define-public python2-pyquery
f210e944 10356 (package-with-python2 python-pyquery))
aa6313d6
CAW
10357
10358(define-public python-webtest
10359 (package
10360 (name "python-webtest")
10361 (version "2.0.20")
10362 (source
10363 (origin
10364 (method url-fetch)
10365 (uri (pypi-uri "WebTest" version))
10366 (sha256
10367 (base32
10368 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
10369 (build-system python-build-system)
10370 (arguments
10371 `(;; Unfortunately we have to disable tests!
10372 ;; This release of WebTest is pinned to python-nose < 1.3,
10373 ;; but older versions of python-nose are plagued with the following
10374 ;; bug(s), which rears its ugly head during test execution:
10375 ;; https://github.com/nose-devs/nose/issues/759
10376 ;; https://github.com/nose-devs/nose/pull/811
10377 #:tests? #f))
10378 ;; Commented out code is no good, but in this case, once tests
10379 ;; are ready to be enabled again, we should put the following
10380 ;; in place:
10381 ;; (native-inputs
10382 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
10383 ;; ; but see above comment
10384 ;; ("python-coverage" ,python-coverage)
10385 ;; ("python-mock" ,python-mock)
10386 ;; ("python-pastedeploy" ,python-pastedeploy)
10387 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
10388 ;; ("python-pyquery" ,python-pyquery)))
10389 (propagated-inputs
10390 `(("python-waitress" ,python-waitress)
10391 ("python-webob" ,python-webob)
10392 ("python-six" ,python-six)
10393 ("python-beautifulsoup4" ,python-beautifulsoup4)))
10394 (home-page "http://webtest.pythonpaste.org/")
10395 (synopsis "Helper to test WSGI applications")
10396 (description "Webtest allows you to test your Python web applications
10397without starting an HTTP server. It supports anything that supports the
10398minimum of WSGI.")
f210e944 10399 (license license:expat)))
aa6313d6
CAW
10400
10401(define-public python2-webtest
f210e944 10402 (package-with-python2 python-webtest))
4cb122cd
CAW
10403
10404(define-public python-anyjson
10405 (package
10406 (name "python-anyjson")
10407 (version "0.3.3")
10408 (source
10409 (origin
10410 (method url-fetch)
10411 (uri (pypi-uri "anyjson" version))
10412 (sha256
10413 (base32
10414 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
10415 (build-system python-build-system)
10416 (arguments
10417 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
10418 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
10419 ;; whatever) so this transformation needs to be done before the tests
10420 ;; can be run. Maybe we could add a build step to transform beforehand
10421 ;; but it could be annoying/difficult.
10422 ;; We can enable tests for the Python 2 version, though, and do below.
10423 #:tests? #f))
10424 (home-page "http://bitbucket.org/runeh/anyjson/")
10425 (synopsis
10426 "Wraps best available JSON implementation in a common interface")
10427 (description
10428 "Anyjson loads whichever is the fastest JSON module installed
10429and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 10430 (license license:bsd-3)
4cb122cd
CAW
10431 (properties `((python2-variant . ,(delay python2-anyjson))))))
10432
10433(define-public python2-anyjson
10434 (let ((anyjson (package-with-python2
10435 (strip-python2-variant python-anyjson))))
10436 (package
10437 (inherit anyjson)
10438 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10439 #:tests? #t
10440 ,@(package-arguments anyjson)))
00e10c6e 10441 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
10442
10443(define-public python-amqp
10444 (package
10445 (name "python-amqp")
10446 (version "1.4.9")
10447 (source
10448 (origin
10449 (method url-fetch)
10450 (uri (pypi-uri "amqp" version))
10451 (sha256
10452 (base32
10453 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
10454 (build-system python-build-system)
10455 (native-inputs
10456 `(("python-nose" ,python-nose)
10457 ("python-mock" ,python-mock)))
7bf837fd 10458 (home-page "https://github.com/celery/py-amqp")
8dfceab7
CAW
10459 (synopsis
10460 "Low-level AMQP client for Python (fork of amqplib)")
10461 (description
10462 "This is a fork of amqplib which was originally written by Barry Pederson.
10463It is maintained by the Celery project, and used by kombu as a pure python
10464alternative when librabbitmq is not available.")
3f641af0 10465 (license license:lgpl2.1+)
8dfceab7
CAW
10466 (properties `((python2-variant . ,(delay python2-amqp))))))
10467
10468(define-public python2-amqp
10469 (let ((amqp (package-with-python2
10470 (strip-python2-variant python-amqp))))
10471 (package
10472 (inherit amqp)
10473 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10474 ;; unmaintained. Weirdly, does not do this on the python 3
10475 ;; version?
10476 #:tests? #f
00e10c6e 10477 ,@(package-arguments amqp))))))
7d387305
CAW
10478
10479(define-public python-kombu
10480 (package
10481 (name "python-kombu")
0cb59822 10482 (version "3.0.37")
7d387305
CAW
10483 (source
10484 (origin
10485 (method url-fetch)
10486 (uri (pypi-uri "kombu" version))
10487 (sha256
10488 (base32
0cb59822 10489 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
10490 (build-system python-build-system)
10491 (native-inputs
10492 `(("python-mock" ,python-mock)
10493 ("python-nose" ,python-nose)))
10494 (propagated-inputs
10495 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
10496 ("python-amqp" ,python-amqp)
10497 ("python-redis" ,python-redis)))
7d387305
CAW
10498 (home-page "http://kombu.readthedocs.org")
10499 (synopsis "Message passing library for Python")
10500 (description "The aim of Kombu is to make messaging in Python as easy as
10501possible by providing an idiomatic high-level interface for the AMQ protocol,
10502and also provide proven and tested solutions to common messaging problems.
10503AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10504message orientation, queuing, routing, reliability and security, for which the
10505RabbitMQ messaging server is the most popular implementation.")
3f641af0 10506 (license license:bsd-3)
7d387305
CAW
10507 (properties `((python2-variant . ,(delay python2-kombu))))))
10508
10509(define-public python2-kombu
10510 (let ((kombu (package-with-python2
10511 (strip-python2-variant python-kombu))))
10512 (package
10513 (inherit kombu)
752eb9e0
MB
10514 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10515 ;; It works fine on the python3 variant.
10516 #:tests? #f
10517 ,@(package-arguments kombu)))
328bb95d
HG
10518 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10519 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
10520
10521(define-public python-billiard
10522 (package
10523 (name "python-billiard")
a6bb9e44 10524 (version "3.3.0.23")
b6f0b9fb
CAW
10525 (source
10526 (origin
10527 (method url-fetch)
10528 (uri (pypi-uri "billiard" version))
10529 (sha256
10530 (base32
a6bb9e44 10531 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
10532 (build-system python-build-system)
10533 (native-inputs
10534 `(("python-nose" ,python-nose)))
7bf837fd 10535 (home-page "https://github.com/celery/billiard")
b6f0b9fb
CAW
10536 (synopsis
10537 "Python multiprocessing fork with improvements and bugfixes")
10538 (description
10539 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10540multiprocessing package itself is a renamed and updated version of R Oudkerk's
10541pyprocessing package. This standalone variant is intended to be compatible with
10542Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 10543 (license license:bsd-3)
b6f0b9fb
CAW
10544 (properties `((python2-variant . ,(delay python2-billiard))))))
10545
10546(define-public python2-billiard
10547 (let ((billiard (package-with-python2
10548 (strip-python2-variant python-billiard))))
10549 (package
10550 (inherit billiard)
00e10c6e 10551 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
10552 ("python2-mock" ,python2-mock)
10553 ,@(package-native-inputs billiard))))))
22df6419
CAW
10554
10555(define-public python-celery
10556 (package
10557 (name "python-celery")
9ebe87fe 10558 (version "3.1.24")
22df6419
CAW
10559 (source
10560 (origin
10561 (method url-fetch)
10562 (uri (pypi-uri "celery" version))
10563 (sha256
10564 (base32
9ebe87fe 10565 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 10566 (build-system python-build-system)
9ebe87fe
LF
10567 (arguments
10568 `(#:phases
10569 (modify-phases %standard-phases
10570 ;; These tests break with Python 3.5:
10571 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10572 (replace 'check
10573 (lambda _
10574 (zero?
10575 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
10576 (native-inputs
10577 `(("python-nose" ,python-nose)))
f22efa01 10578 (propagated-inputs
22df6419
CAW
10579 `(("python-pytz" ,python-pytz)
10580 ("python-billiard" ,python-billiard)
10581 ("python-kombu" ,python-kombu)))
10582 (home-page "http://celeryproject.org")
10583 (synopsis "Distributed Task Queue")
10584 (description "Celery is an asynchronous task queue/job queue based on
10585distributed message passing. It is focused on real-time operation, but
10586supports scheduling as well. The execution units, called tasks, are executed
10587concurrently on a single or more worker servers using multiprocessing,
10588Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10589synchronously (wait until ready).")
3f641af0 10590 (license license:bsd-3)
22df6419
CAW
10591 (properties `((python2-variant . ,(delay python2-celery))))))
10592
10593(define-public python2-celery
10594 (let ((celery (package-with-python2
10595 (strip-python2-variant python-celery))))
10596 (package
10597 (inherit celery)
00e10c6e 10598 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
10599 ("python2-mock" ,python2-mock)
10600 ,@(package-native-inputs celery))))))
97e32948
CAW
10601
10602(define-public python-translitcodec
10603 (package
10604 (name "python-translitcodec")
10605 (version "0.4.0")
10606 (source
10607 (origin
10608 (method url-fetch)
10609 (uri (pypi-uri "translitcodec" version))
10610 (sha256
10611 (base32
10612 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10613 (build-system python-build-system)
10614 (arguments
10615 `(#:tests? #f)) ; no tests provided
10616 (home-page
10617 "https://github.com/claudep/translitcodec")
10618 (synopsis
10619 "Unicode to 8-bit charset transliteration codec")
10620 (description
10621 "This package contains codecs for transliterating ISO 10646 texts into
10622best-effort representations using smaller coded character sets (ASCII,
10623ISO 8859, etc.).")
f210e944 10624 (license license:expat)))
97e32948
CAW
10625
10626(define-public python2-translitcodec
f210e944 10627 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
10628
10629(define-public python-editor
10630 (package
10631 (name "python-editor")
10632 (version "0.5")
10633 (source
10634 (origin
10635 (method url-fetch)
10636 (uri (pypi-uri "python-editor" version))
10637 (sha256
10638 (base32
10639 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10640 (build-system python-build-system)
10641 (home-page
10642 "https://github.com/fmoo/python-editor")
10643 (synopsis
10644 "Programmatically open an editor, capture the result")
10645 (description
10646 "python-editor is a library that provides the editor module for
10647programmatically interfacing with your system's $EDITOR.")
f210e944 10648 (license license:asl2.0)))
0c3b90d4
CAW
10649
10650(define-public python2-editor
f210e944 10651 (package-with-python2 python-editor))
3276517c
LF
10652
10653(define-public python-sphinxcontrib-programoutput
10654 (package
10655 (name "python-sphinxcontrib-programoutput")
b9ce9eca 10656 (version "0.10")
3276517c
LF
10657 (source (origin
10658 (method url-fetch)
10659 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10660 (sha256
10661 (base32
b9ce9eca 10662 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
3276517c 10663 (build-system python-build-system)
e2cb140e
MB
10664 (arguments
10665 ;; FIXME: Many tests are failing and the upstream is gone.
10666 '(#:tests? #f))
3276517c 10667 (propagated-inputs
a0a09859 10668 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
10669 (synopsis "Sphinx extension to include program output")
10670 (description "A Sphinx extension to literally insert the output of arbitrary
10671commands into documents, helping you to keep your command examples up to date.")
10672 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 10673 (license license:bsd-2)))
3276517c
LF
10674
10675(define-public python2-sphinxcontrib-programoutput
f210e944 10676 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
10677
10678(define-public python-sphinx-repoze-autointerface
10679 (package
10680 (name "python-sphinx-repoze-autointerface")
328ae341 10681 (version "0.8")
548d7165
LF
10682 (source (origin
10683 (method url-fetch)
10684 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10685 (sha256
10686 (base32
328ae341 10687 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165 10688 (build-system python-build-system)
5b3c3d4b 10689 (arguments '(#:tests? #f)) ; No tests.
548d7165 10690 (propagated-inputs
47c7dc4a 10691 `(("python-sphinx" ,python-sphinx)
548d7165
LF
10692 ("python-zope-interface" ,python-zope-interface)))
10693 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10694 (description "This package defines an extension for the Sphinx documentation
10695system. The extension allows generation of API documentation by
10696introspection of @code{zope.interface} instances in code.")
10697 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 10698 (license license:repoze)))
548d7165
LF
10699
10700(define-public python2-sphinx-repoze-autointerface
10701 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
10702
10703(define-public python-psycopg2
10704 (package
10705 (name "python-psycopg2")
8e718963 10706 (version "2.6.2")
b31fbea5
DM
10707 (source
10708 (origin
10709 (method url-fetch)
10710 (uri (pypi-uri "psycopg2" version))
10711 (sha256
10712 (base32
8e718963 10713 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
b31fbea5
DM
10714 (build-system python-build-system)
10715 (arguments
10716 ;; Tests would require a postgresql database "psycopg2_test"
10717 ;; and a running postgresql database management service.
10718 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10719 (inputs
10720 `(("postgresql" ,postgresql))) ; libpq
10721 (home-page "http://initd.org/psycopg/")
10722 (synopsis "Python PostgreSQL adapter")
10723 (description
10724 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 10725 (license license:lgpl3+)))
b31fbea5
DM
10726
10727(define-public python2-psycopg2
f210e944 10728 (package-with-python2 python-psycopg2))
eed1a61f
LF
10729
10730(define-public python-vobject
10731 (package
10732 (name "python-vobject")
e00a5909 10733 (version "0.9.5")
eed1a61f
LF
10734 (source (origin
10735 (method url-fetch)
10736 (uri (pypi-uri "vobject" version))
10737 (sha256
10738 (base32
e00a5909 10739 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
eed1a61f 10740 (build-system python-build-system)
a9871b7b
LF
10741 (arguments
10742 '(;; The test suite relies on some non-portable Windows interfaces.
10743 #:tests? #f))
f22efa01 10744 (propagated-inputs
22d7360b 10745 `(("python-dateutil" ,python-dateutil)
eed1a61f
LF
10746 ("python-pyicu" ,python-pyicu)))
10747 (synopsis "Parse and generate vCard and vCalendar files")
10748 (description "Vobject is intended to be a full featured Python package for
10749parsing and generating vCard and vCalendar files. Currently, iCalendar files
10750are supported and well tested. vCard 3.0 files are supported, and all data
10751should be imported, but only a few components are understood in a sophisticated
10752way.")
10753 (home-page "http://eventable.github.io/vobject/")
f210e944 10754 (license license:asl2.0)))
eed1a61f
LF
10755
10756(define-public python2-vobject
f210e944 10757 (package-with-python2 python-vobject))
cedac813
LF
10758
10759(define-public python-munkres
10760 (package
10761 (name "python-munkres")
38e81a2c 10762 (version "1.0.8")
cedac813
LF
10763 (source (origin
10764 (method url-fetch)
10765 (uri (pypi-uri "munkres" version))
10766 (sha256
10767 (base32
38e81a2c 10768 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
10769 (build-system python-build-system)
10770 (arguments
10771 '(#:tests? #f)) ; no test suite
10772 (home-page "http://software.clapper.org/munkres/")
10773 (synopsis "Implementation of the Munkres algorithm")
10774 (description "The Munkres module provides an implementation of the Munkres
10775algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10776useful for solving the Assignment Problem.")
3f641af0 10777 (license license:bsd-3)))
cedac813
LF
10778
10779(define-public python2-munkres
10780 (package-with-python2 python-munkres))
f3b3d78f
LF
10781
10782(define-public python-flask
10783 (package
10784 (name "python-flask")
c6c80104 10785 (version "0.11.1")
f3b3d78f
LF
10786 (source (origin
10787 (method url-fetch)
10788 (uri (pypi-uri "Flask" version))
10789 (sha256
10790 (base32
c6c80104 10791 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
10792 (build-system python-build-system)
10793 (propagated-inputs
10794 `(("python-itsdangerous" ,python-itsdangerous)
10795 ("python-jinja2" ,python-jinja2)
8f35c030 10796 ("python-click" ,python-click)
f3b3d78f
LF
10797 ("python-werkzeug" ,python-werkzeug)))
10798 (home-page "https://github.com/mitsuhiko/flask/")
10799 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10800 (description "Flask is a micro web framework based on the Werkzeug toolkit
10801and Jinja2 template engine. It is called a micro framework because it does not
10802presume or force a developer to use a particular tool or library.")
f210e944 10803 (license license:bsd-3)))
f3b3d78f
LF
10804
10805(define-public python2-flask
f210e944 10806 (package-with-python2 python-flask))
603d665b 10807
a7ad802b 10808(define-public python-flask-wtf
10809 (package
10810 (name "python-flask-wtf")
10811 (version "0.13.1")
10812 (source
10813 (origin
10814 (method url-fetch)
10815 (uri (pypi-uri "Flask-WTF" version))
10816 (sha256
10817 (base32
10818 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10819 (build-system python-build-system)
d296d300
MB
10820 (arguments
10821 '(#:phases
10822 (modify-phases %standard-phases
10823 (add-before 'check 'drop-failing-test
10824 (lambda _
10825 ;; FIXME: This file tries resolving an external server, which
10826 ;; fails. Try to patch out the offending section instead of
10827 ;; deleting the whole thing.
10828 (delete-file "tests/test_recaptcha.py")
10829 #t)))))
a7ad802b 10830 (propagated-inputs
10831 `(("python-flask-babel" ,python-flask-babel)
10832 ("python-babel" ,python-babel)
10833 ("python-wtforms" ,python-wtforms)))
10834 (native-inputs
10835 `(("python-nose" ,python-nose)))
10836 (home-page "https://github.com/lepture/flask-wtf")
10837 (synopsis "Simple integration of Flask and WTForms")
10838 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10839upload, and reCAPTCHA.")
10840 (license license:bsd-3)))
10841
10842(define-public python2-flask-wtf
10843 (package-with-python2 python-flask-wtf))
10844
a2c7d88e 10845(define-public python-flask-multistatic
10846 (package
10847 (name "python-flask-multistatic")
10848 (version "1.0")
10849 (source
10850 (origin
10851 (method url-fetch)
10852 (uri (pypi-uri "flask-multistatic" version))
10853 (sha256
10854 (base32
10855 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10856 (build-system python-build-system)
10857 (propagated-inputs
10858 `(("python-flask" ,python-flask)))
10859 (home-page "https://pagure.io/flask-multistatic")
10860 (synopsis "Flask plugin to allow overriding static files")
10861 (description "@code{flask-multistatic} is a flask plugin that adds support
10862for overriding static files.")
10863 (license license:gpl3+)))
10864
10865(define-public python2-flask-multistatic
10866 (package-with-python2 python-flask-multistatic))
10867
603d665b
LF
10868(define-public python-cookies
10869 (package
10870 (name "python-cookies")
10871 (version "2.2.1")
10872 (source (origin
10873 (method url-fetch)
10874 (uri (pypi-uri "cookies" version))
10875 (sha256
10876 (base32
10877 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10878 (build-system python-build-system)
10879 (arguments
10880 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10881 #:tests? #f))
10882 (native-inputs
10883 `(("python-pytest" ,python2-pytest)))
10884 (synopsis "HTTP cookie parser and renderer")
10885 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10886Python.")
10887 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 10888 (license license:expat)))
603d665b
LF
10889
10890(define-public python2-cookies
f210e944 10891 (package-with-python2 python-cookies))
0efde7d6
LF
10892
10893(define-public python-responses
10894 (package
10895 (name "python-responses")
10896 (version "0.5.1")
10897 (source (origin
10898 (method url-fetch)
10899 (uri (pypi-uri "responses" version))
10900 (sha256
10901 (base32
10902 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10903 (build-system python-build-system)
10904 (arguments
10905 `(;; Test suite is not distributed:
10906 ;; https://github.com/getsentry/responses/issues/38
10907 #:tests? #f))
10908 (native-inputs
d8ea5f2f 10909 `(("python-mock" ,python-mock)))
0efde7d6
LF
10910 (propagated-inputs
10911 `(("python-requests" ,python-requests)
d8ea5f2f 10912 ("python-cookies" ,python-cookies)
0efde7d6
LF
10913 ("python-six" ,python-six)))
10914 (home-page "https://github.com/getsentry/responses")
10915 (synopsis "Utility for mocking out the `requests` Python library")
10916 (description "A utility library for mocking out the `requests` Python
10917library.")
f210e944 10918 (license license:asl2.0)))
0efde7d6
LF
10919
10920(define-public python2-responses
f210e944 10921 (package-with-python2 python-responses))
76b94885 10922
b7afd018
RW
10923(define-public python-whoosh
10924 (package
10925 (name "python-whoosh")
10926 (version "2.7.4")
10927 (source
10928 (origin
10929 (method url-fetch)
10930 (uri (pypi-uri "Whoosh" version))
10931 (sha256
10932 (base32
10933 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10934 (build-system python-build-system)
10935 (native-inputs
f3b98f4f 10936 `(("python-pytest" ,python-pytest)))
b7afd018
RW
10937 (home-page "http://bitbucket.org/mchaput/whoosh")
10938 (synopsis "Full text indexing, search, and spell checking library")
10939 (description
10940 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10941checking library.")
10942 (license license:bsd-2)))
10943
10944(define-public python2-whoosh
10945 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10946 (package (inherit whoosh)
10947 (propagated-inputs
10948 `(("python2-backport-ssl-match-hostname"
10949 ,python2-backport-ssl-match-hostname)
10950 ,@(package-propagated-inputs whoosh))))))
10951
76b94885
LF
10952(define-public python-pathlib
10953 (package
10954 (name "python-pathlib")
10955 (version "1.0.1")
10956 (source (origin
10957 (method url-fetch)
10958 (uri (pypi-uri "pathlib" version))
10959 (sha256
10960 (base32
10961 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10962 (build-system python-build-system)
92a312dc
RW
10963 ;; The tests depend on the internal "test" module, which does not provide
10964 ;; a stable interface.
10965 (arguments `(#:tests? #f))
76b94885 10966 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
10967 (synopsis "Object-oriented file system paths")
10968 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
10969It offers the following advantages over using string objects:
10970
10971@enumerate
10972@item No more cumbersome use of os and os.path functions. Everything can
10973be done easily through operators, attribute accesses, and method calls.
10974@item Embodies the semantics of different path types. For example,
10975comparing Windows paths ignores casing.
10976@item Well-defined semantics, eliminating any inconsistencies or
10977ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
10978@end enumerate
10979
10980Note: In Python 3.4, pathlib is now part of the standard library. For other
10981Python versions please consider python-pathlib2 instead, which tracks the
10982standard library module. This module (python-pathlib) isn't maintained
10983anymore.")
76b94885
LF
10984 (license license:expat)))
10985
10986(define-public python2-pathlib
10987 (package-with-python2 python-pathlib))
25a7db0a 10988
b7703c81
HG
10989(define-public python2-pathlib2
10990 (package
10991 (name "python2-pathlib2")
10992 (version "2.1.0")
10993 (source (origin
10994 (method url-fetch)
10995 (uri (pypi-uri "pathlib2" version))
10996 (sha256
10997 (base32
10998 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10999 (build-system python-build-system)
49a531f5
HG
11000 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11001 ;; version is 3.4 which already includes this package as part of the
11002 ;; standard library.
b7703c81
HG
11003 (arguments
11004 `(#:python ,python-2))
11005 (native-inputs
f3b98f4f 11006 `(("python2-six" ,python2-six)))
b7703c81
HG
11007 (home-page "http://pypi.python.org/pypi/pathlib2/")
11008 (synopsis "Object-oriented file system paths - backport of standard
11009pathlib module")
11010 (description "The goal of pathlib2 is to provide a backport of standard
11011pathlib module which tracks the standard library module, so all the newest
11012features of the standard pathlib can be used also on older Python versions.
11013
11014Pathlib offers a set of classes to handle file system paths. It offers the
11015following advantages over using string objects:
11016
11017@enumerate
11018@item No more cumbersome use of os and os.path functions. Everything can
11019be done easily through operators, attribute accesses, and method calls.
11020@item Embodies the semantics of different path types. For example,
11021comparing Windows paths ignores casing.
11022@item Well-defined semantics, eliminating any inconsistencies or
11023ambiguities (forward vs. backward slashes, etc.).
11024@end enumerate")
11025 (license license:expat)))
11026
25a7db0a
LF
11027(define-public python-jellyfish
11028 (package
11029 (name "python-jellyfish")
8c4964dd 11030 (version "0.5.6")
25a7db0a
LF
11031 (source (origin
11032 (method url-fetch)
11033 (uri (pypi-uri "jellyfish" version))
11034 (sha256
11035 (base32
8c4964dd 11036 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
11037 (build-system python-build-system)
11038 (native-inputs
11039 `(("python-pytest" ,python-pytest)))
11040 (home-page "https://github.com/jamesturk/jellyfish")
11041 (synopsis "Approximate and phonetic matching of strings")
11042 (description "Jellyfish uses a variety of string comparison and phonetic
11043encoding algorithms to do fuzzy string matching.")
3f641af0 11044 (license license:bsd-2)
25a7db0a
LF
11045 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11046
11047(define-public python2-jellyfish
11048 (let ((jellyfish (package-with-python2
11049 (strip-python2-variant python-jellyfish))))
11050 (package (inherit jellyfish)
00e10c6e 11051 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 11052 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
11053
11054(define-public python2-unicodecsv
11055 (package
11056 (name "python2-unicodecsv")
11057 (version "0.14.1")
11058 (source (origin
11059 (method url-fetch)
11060 ;; The test suite is not included in the PyPi release.
11061 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11062 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
11063 "archive/" version ".tar.gz"))
11064 (file-name (string-append name "-" version ".tar.gz"))
11065 (sha256
11066 (base32
11067 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
11068 (build-system python-build-system)
11069 (arguments
11070 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11071 #:python ,python-2))
11072 (native-inputs
f3b98f4f 11073 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
11074 (home-page "https://github.com/jdunck/python-unicodecsv")
11075 (synopsis "Unicode CSV module for Python 2")
11076 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11077module, adding support for Unicode strings.")
3f641af0 11078 (license license:bsd-2)))
064503aa
LF
11079
11080(define-public python-rarfile
11081 (package
11082 (name "python-rarfile")
67824447 11083 (version "2.8")
064503aa
LF
11084 (source (origin
11085 (method url-fetch)
11086 (uri (pypi-uri "rarfile" version))
11087 (sha256
11088 (base32
67824447 11089 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
11090 (build-system python-build-system)
11091 (arguments
11092 '(#:phases
11093 (modify-phases %standard-phases
11094 (replace 'check
11095 ;; Many tests fail, but the installation proceeds.
11096 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
11097 (native-inputs
11098 `(("which" ,which))) ; required for tests
11099 (propagated-inputs
11100 `(("libarchive" ,libarchive)))
11101 (home-page "https://github.com/markokr/rarfile")
11102 (synopsis "RAR archive reader for Python")
11103 (description "This is Python module for RAR archive reading. The interface
11104is made as zipfile like as possible.")
3f641af0 11105 (license license:isc)))
064503aa
LF
11106
11107(define-public python2-rarfile
11108 (package-with-python2 python-rarfile))
daeeea71
CM
11109
11110(define-public python-magic
11111 (package
11112 (name "python-magic")
11113 (version "0.4.3")
11114 (source
11115 (origin
11116 (method url-fetch)
11117 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
11118 version ".tar.gz"))
11119 (sha256
11120 (base32
11121 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
11122 (file-name (string-append name "-" version "-checkout"))))
11123 (build-system python-build-system)
11124 (arguments
11125 ;; The tests are unreliable, so don't run them. The tests fail
11126 ;; under Python3 because they were written for Python2 and
11127 ;; contain import statements that do not work in Python3. One of
11128 ;; the tests fails under Python2 because its assertions are
11129 ;; overly stringent; it relies on comparing output strings which
11130 ;; are brittle and can change depending on the version of
11131 ;; libmagic being used and the system on which the test is
11132 ;; running. In my case, under GuixSD 0.10.0, only one test
11133 ;; failed, and it seems to have failed only because the version
11134 ;; of libmagic that is packaged in Guix outputs a slightly
11135 ;; different (but not wrong) string than the one that the test
11136 ;; expected.
11137 '(#:tests? #f
11138 #:phases (modify-phases %standard-phases
11139 ;; Replace a specific method call with a hard-coded
11140 ;; path to the necessary libmagic.so file in the
11141 ;; store. If we don't do this, then the method call
11142 ;; will fail to find the libmagic.so file, which in
11143 ;; turn will cause any application using
11144 ;; python-magic to fail.
11145 (add-before 'build 'hard-code-path-to-libmagic
11146 (lambda* (#:key inputs #:allow-other-keys)
11147 (let ((file (assoc-ref inputs "file")))
11148 (substitute* "magic.py"
11149 (("ctypes.util.find_library\\('magic'\\)")
11150 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
11151 #t)))
11152 (add-before 'install 'disable-egg-compression
11153 (lambda _
11154 (let ((port (open-file "setup.cfg" "a")))
11155 (display "\n[easy_install]\nzip_ok = 0\n"
11156 port)
11157 (close-port port)
11158 #t))))))
daeeea71
CM
11159 (inputs
11160 ;; python-magic needs to be able to find libmagic.so.
11161 `(("file" ,file)))
11162 (home-page "https://github.com/ahupp/python-magic")
11163 (synopsis "File type identification using libmagic")
11164 (description
11165 "This module uses ctypes to access the libmagic file type
11166identification library. It makes use of the local magic database and
11167supports both textual and MIME-type output. Note that this module and
11168the python-file module both provide a \"magic.py\" file; these two
11169modules, which are different and were developed separately, both serve
11170the same purpose: to provide Python bindings for libmagic.")
11171 (license license:expat)))
11172
11173(define-public python2-magic
11174 (package-with-python2 python-magic))
12af303f
CM
11175
11176(define-public python2-s3cmd
11177 (package
11178 (name "python2-s3cmd")
11179 (version "1.6.1")
11180 (source
11181 (origin
11182 (method url-fetch)
de67e922 11183 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
11184 "s3cmd-" version ".tar.gz"))
11185 (sha256
11186 (base32
11187 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
11188 (build-system python-build-system)
11189 (arguments
11190 ;; s3cmd is written for python2 only and contains no tests.
11191 `(#:python ,python-2
11192 #:tests? #f))
f22efa01 11193 (propagated-inputs
12af303f
CM
11194 `(("python2-dateutil" ,python2-dateutil)
11195 ;; The python-file package also provides a magic.py module.
11196 ;; This is an unfortunate state of affairs; however, s3cmd
11197 ;; fails to install if it cannot find specifically the
11198 ;; python-magic package. Thus we include it, instead of using
11199 ;; python-file. Ironically, s3cmd sometimes works better
11200 ;; without libmagic bindings at all:
11201 ;; https://github.com/s3tools/s3cmd/issues/198
11202 ("python2-magic" ,python2-magic)))
11203 (home-page "http://s3tools.org/s3cmd")
11204 (synopsis "Command line tool for S3-compatible storage services")
11205 (description
11206 "S3cmd is a command line tool for uploading, retrieving and managing data
11207in storage services that are compatible with the Amazon Simple Storage
11208Service (S3) protocol, including S3 itself. It supports rsync-like backup,
11209GnuPG encryption, and more. It also supports management of Amazon's
11210CloudFront content delivery network.")
3f641af0 11211 (license license:gpl2+)))
4323a5f0
AE
11212
11213(define-public python-pkgconfig
11214 (package
11215 (name "python-pkgconfig")
11216 (version "1.1.0")
11217 (source
11218 (origin
11219 (method url-fetch)
11220 (uri (pypi-uri "pkgconfig" version))
11221 (sha256
11222 (base32
11223 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
11224 (build-system python-build-system)
11225 (native-inputs
f3b98f4f 11226 `(("python-nose" ,python-nose)))
4323a5f0
AE
11227 (inputs
11228 `(("pkg-config" ,pkg-config)))
11229 (arguments
11230 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
11231 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
11232 #:tests? #f
4323a5f0
AE
11233 ;; Hard-code the path to pkg-config.
11234 #:phases
11235 (modify-phases %standard-phases
11236 (add-before
11237 'build 'patch
11238 (lambda _
11239 (substitute* "pkgconfig/pkgconfig.py"
11240 (("cmd = 'pkg-config")
11241 (string-append "cmd = '" (which "pkg-config"))))
11242 #t)))))
7bf837fd 11243 (home-page "https://github.com/matze/pkgconfig")
4323a5f0
AE
11244 (synopsis "Python interface for pkg-config")
11245 (description "This module provides a Python interface to pkg-config. It
11246can be used to find all pkg-config packages, check if a package exists,
11247check if a package meets certain version requirements, query CFLAGS and
11248LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 11249 (license license:expat)))
4323a5f0
AE
11250
11251(define-public python2-pkgconfig
11252 (package-with-python2 python-pkgconfig))
11253
2e697322
BW
11254(define-public python-bz2file
11255 (package
11256 (name "python-bz2file")
11257 (version "0.98")
11258 (source
11259 (origin
11260 (method url-fetch)
11261 (uri (pypi-uri "bz2file" version))
11262 (sha256
11263 (base32
11264 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11265 (build-system python-build-system)
11266 (arguments
124df723 11267 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
11268 (home-page "https://github.com/nvawda/bz2file")
11269 (synopsis "Read and write bzip2-compressed files")
11270 (description
11271 "Bz2file is a Python library for reading and writing bzip2-compressed
11272files. It contains a drop-in replacement for the I/O interface in the
11273standard library's @code{bz2} module, including features from the latest
11274development version of CPython that are not available in older releases.")
3f641af0 11275 (license license:asl2.0)
2e697322
BW
11276 (properties `((python2-variant . ,(delay python2-bz2file))))))
11277
11278(define-public python2-bz2file
11279 (let ((base (package-with-python2
11280 (strip-python2-variant python-bz2file))))
11281 (package
11282 (inherit base)
124df723 11283 (arguments
752bb447
BW
11284 `(#:python ,python-2
11285 #:phases
124df723
BW
11286 (modify-phases %standard-phases
11287 ;; 'python setup.py test' does not work as of 0.98.
11288 ;; There is only the one test file, so we run it directly.
11289 (replace 'check
11290 (lambda _ (zero? (system* "python"
11291 "test_bz2file.py"))))))))))
2e697322 11292
da4ac1aa
BW
11293(define-public python-future
11294 (package
11295 (name "python-future")
c522f57e 11296 (version "0.16.0")
da4ac1aa
BW
11297 (source
11298 (origin
11299 (method url-fetch)
11300 (uri (pypi-uri "future" version))
11301 (sha256
11302 (base32
c522f57e 11303 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
da4ac1aa
BW
11304 (build-system python-build-system)
11305 ;; Many tests connect to the network or are otherwise flawed.
11306 ;; https://github.com/PythonCharmers/python-future/issues/210
11307 (arguments
11308 `(#:tests? #f))
11309 (home-page "http://python-future.org")
11310 (synopsis "Single-source support for Python 3 and 2")
11311 (description
11312 "@code{python-future} is the missing compatibility layer between Python 2 and
11313Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
11314to support both Python 2 and Python 3 with minimal overhead.")
f210e944 11315 (license license:expat)))
da4ac1aa
BW
11316
11317(define-public python2-future
f210e944 11318 (package-with-python2 python-future))
da4ac1aa 11319
8e451885
AE
11320(define-public python-cysignals
11321 (package
11322 (name "python-cysignals")
11323 (version "1.1.0")
11324 (source
11325 (origin
11326 (method url-fetch)
11327 (uri (pypi-uri "cysignals" version ".tar.bz2"))
11328 (sha256
11329 (base32
11330 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
11331 (build-system python-build-system)
11332 (native-inputs
11333 `(("python-cython" ,python-cython)
8e451885
AE
11334 ("python-sphinx" ,python-sphinx)))
11335 (inputs
11336 `(("pari-gp" ,pari-gp)))
11337 (arguments
11338 `(#:modules ((guix build python-build-system)
11339 ((guix build gnu-build-system) #:prefix gnu:)
11340 (guix build utils))
11341 ;; FIXME: Tests are executed after installation and currently fail
11342 ;; when not installing into standard locations; the author is working
11343 ;; on a fix.
11344 #:tests? #f
11345 #:phases
11346 (modify-phases %standard-phases
11347 (add-before
11348 'build 'configure
11349 (assoc-ref gnu:%standard-phases 'configure)))))
11350 (home-page
11351 "https://github.com/sagemath/cysignals")
11352 (synopsis
11353 "Handling of interrupts and signals for Cython")
11354 (description
11355 "The cysignals package provides mechanisms to handle interrupts (and
11356other signals and errors) in Cython code, using two related approaches,
11357for mixed Cython/Python code or external C libraries and pure Cython code,
11358respectively.")
3f641af0 11359 (license license:lgpl3+)))
8e451885
AE
11360
11361(define-public python2-cysignals
11362 (package-with-python2 python-cysignals))
11363
63bcec71
DM
11364(define-public python2-shedskin
11365 (package
11366 (name "python2-shedskin")
11367 (version "0.9.4")
11368 (source
11369 (origin
11370 (method url-fetch)
11371 (uri (string-append "https://github.com/shedskin/shedskin/"
11372 "releases/download/v" version
11373 "/shedskin-" version ".tgz"))
11374 (sha256
11375 (base32
11376 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
11377 (build-system python-build-system)
11378 (arguments
11379 `(#:python ,python-2
11380 #:phases (modify-phases %standard-phases
11381 (add-after 'unpack 'fix-resulting-include-libs
11382 (lambda* (#:key inputs #:allow-other-keys)
11383 (let ((libgc (assoc-ref inputs "libgc"))
11384 (pcre (assoc-ref inputs "pcre")))
11385 (substitute* "shedskin/makefile.py"
11386 (("variable == 'CCFLAGS':[ ]*")
11387 (string-append "variable == 'CCFLAGS':\n"
11388 " line += ' -I " pcre "/include"
11389 " -I " libgc "/include'"))
11390 (("variable == 'LFLAGS':[ ]*")
11391 (string-append "variable == 'LFLAGS':\n"
11392 " line += ' -L" pcre "/lib"
11393 " -L " libgc "/lib'")))
11394 #t))))))
63bcec71
DM
11395 (inputs `(("pcre" ,pcre)
11396 ("libgc" ,libgc)))
11397 (home-page "https://shedskin.github.io/")
11398 (synopsis "Experimental Python-2 to C++ Compiler")
11399 (description (string-append "This is an experimental compiler for a subset of
11400Python. It generates C++ code and a Makefile."))
3f641af0 11401 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
11402
11403(define-public python2-rope
11404 (package
11405 (name "python2-rope")
11406 (version "0.10.3")
11407 (source
11408 (origin
11409 (method url-fetch)
11410 (uri (pypi-uri "rope" version))
11411 (sha256
11412 (base32
11413 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
11414 (arguments
11415 ;; Rope is currently python-2 only.
11416 ;; https://github.com/python-rope/rope/issues/57
11417 `(#:python ,python-2))
11418 (build-system python-build-system)
11419 (native-inputs
f3b98f4f 11420 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
11421 (home-page "https://github.com/python-rope/rope")
11422 (synopsis "Refactoring library for Python")
11423 (description "Rope is a refactoring library for Python. It facilitates
11424the renaming, moving and extracting of attributes, functions, modules, fields
11425and parameters in Python 2 source code. These refactorings can also be applied
d1e4ad1b 11426to occurrences in strings and comments.")
3f641af0 11427 (license license:gpl2)))
6ba8ca17
11428
11429(define-public python-py3status
11430 (package
11431 (name "python-py3status")
d2262d70 11432 (version "3.1")
6ba8ca17
11433 (source
11434 (origin
11435 (method url-fetch)
11436 (uri (pypi-uri "py3status" version))
11437 (sha256
11438 (base32
d2262d70 11439 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 11440 (build-system python-build-system)
8653c1d5
MB
11441 (arguments
11442 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
6ba8ca17
11443 (home-page "https://github.com/ultrabug/py3status")
11444 (synopsis "Extensible i3status wrapper written in Python")
11445 (description "py3status is an i3status wrapper which extends i3status
11446functionality in a modular way, allowing you to extend your panel with your
11447own code, responding to click events and updating clock every second.")
3f641af0 11448 (license license:bsd-3)))
b8fdbca3
HG
11449
11450(define-public python-tblib
11451 (package
11452 (name "python-tblib")
11453 (version "1.3.0")
11454 (source (origin
11455 (method url-fetch)
11456 (uri (pypi-uri "tblib" version))
11457 (sha256 (base32
11458 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
11459 (build-system python-build-system)
11460 (arguments
11461 `(#:phases
11462 (modify-phases %standard-phases
11463 (replace 'check
11464 (lambda _
11465 ;; Upstream runs tests after installation and the package itself
11466 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11467 ;; found.
11468 (setenv "PYTHONPATH"
11469 (string-append (getcwd) "/build/lib:"
11470 (getenv "PYTHONPATH")))
11471 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
11472 (native-inputs
11473 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
11474 ("python-six" ,python-six)))
11475 (home-page "https://github.com/ionelmc/python-tblib")
11476 (synopsis "Traceback serialization library")
11477 (description
11478 "Traceback serialization allows you to:
11479
11480@enumerate
11481@item Pickle tracebacks and raise exceptions with pickled tracebacks in
11482different processes. This allows better error handling when running code over
11483multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11484
11485@item Parse traceback strings and raise with the parsed tracebacks.
9657aeb1 11486@end enumerate\n")
3f641af0 11487 (license license:bsd-3)))
b8fdbca3
HG
11488
11489(define-public python2-tblib
11490 (package-with-python2 python-tblib))
1a024de4
HG
11491
11492(define-public python-sqlparse
11493 (package
11494 (name "python-sqlparse")
11495 (version "0.1.19")
11496 (source (origin
11497 (method url-fetch)
11498 (uri (pypi-uri "sqlparse" version))
11499 (sha256
11500 (base32
11501 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
11502 (build-system python-build-system)
11503 (arguments
11504 `(#:phases
11505 (modify-phases %standard-phases
11506 (replace 'check
11507 (lambda* _
11508 ;; setup.py-integrated 2to3 only affects the build files, but
11509 ;; py.test is using the source files. So we need to convert them
11510 ;; manually.
11511 (when (zero? (system* "python3"))
11512 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
11513 (zero? (system* "py.test")))))))
11514 (native-inputs
f3b98f4f 11515 `(("python-pytest" ,python-pytest)))
1a024de4
HG
11516 (home-page "https://github.com/andialbrecht/sqlparse")
11517 (synopsis "Non-validating SQL parser")
11518 (description "Sqlparse is a non-validating SQL parser for Python. It
11519provides support for parsing, splitting and formatting SQL statements.")
3f641af0 11520 (license license:bsd-3)))
1a024de4
HG
11521
11522(define-public python2-sqlparse
11523 (package-with-python2 python-sqlparse))
68b9d242
SB
11524
11525(define-public python-greenlet
11526 (package
11527 (name "python-greenlet")
1f89fb16 11528 (version "0.4.11")
68b9d242
SB
11529 (source (origin
11530 (method url-fetch)
11531 (uri (pypi-uri "greenlet" version))
11532 (sha256
11533 (base32
1f89fb16 11534 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
68b9d242 11535 (build-system python-build-system)
68b9d242
SB
11536 (home-page "https://greenlet.readthedocs.io/")
11537 (synopsis "Lightweight in-process concurrent programming")
11538 (description
11539 "Greenlet package is a spin-off of Stackless, a version of CPython
11540that supports micro-threads called \"tasklets\". Tasklets run
11541pseudo-concurrently (typically in a single or a few OS-level threads) and
11542are synchronized with data exchanges on \"channels\".")
3f641af0 11543 (license (list license:psfl license:expat))))
68b9d242
SB
11544
11545(define-public python2-greenlet
11546 (package-with-python2 python-greenlet))
d79a343b
SB
11547
11548(define-public python-gevent
11549 (package
11550 (name "python-gevent")
11551 (version "1.1.1")
11552 (source (origin
11553 (method url-fetch)
11554 (uri (pypi-uri "gevent" version))
11555 (sha256
11556 (base32
11557 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11558 (modules '((guix build utils)))
11559 (snippet
11560 '(begin
11561 ;; unbunding libev and c-ares
11562 (for-each delete-file-recursively '("libev" "c-ares"))
11563 ;; fixing testsuite
11564 (call-with-output-file "greentest/__init__.py" noop)
11565 (substitute* "greentest/testrunner.py"
11566 (("import util") "from . import util")
11567 (("from util import log") "from .util import log"))))))
11568 (build-system python-build-system)
11569 (propagated-inputs
11570 `(("python-greenlet" ,python-greenlet)))
11571 (native-inputs
f3b98f4f 11572 `(("python-six" ,python-six)))
d79a343b
SB
11573 (inputs
11574 `(("c-ares" ,c-ares)
11575 ("libev" ,libev)))
11576 (home-page "http://www.gevent.org/")
11577 (synopsis "Coroutine-based network library")
11578 (description
11579 "gevent is a coroutine-based Python networking library that uses greenlet
11580to provide a high-level synchronous API on top of the libev event loop.")
11581 (license license:expat)))
11582
11583(define-public python2-gevent
11584 (package-with-python2 python-gevent))
da3aeeb6 11585
c9a18125
MB
11586(define-public python-geventhttpclient
11587 (package
11588 (name "python-geventhttpclient")
11589 (version "1.3.1")
11590 (source (origin
11591 (method url-fetch)
11592 (uri (pypi-uri "geventhttpclient" version))
11593 (sha256
11594 (base32
11595 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11596 (modules '((guix build utils)))
11597 (snippet
11598 '(begin
11599 ;; Delete pre-compiled files.
11600 (for-each delete-file (find-files "src/geventhttpclient"
11601 ".*\\.pyc"))
11602 #t))))
11603 (build-system python-build-system)
11604 (arguments
11605 '(#:phases
11606 (modify-phases %standard-phases
11607 (add-after 'unpack 'delete-network-tests
11608 (lambda _
11609 (delete-file "src/geventhttpclient/tests/test_client.py")
11610 #t))
11611 (delete 'check)
11612 (add-after 'install 'check
11613 (lambda* (#:key inputs outputs #:allow-other-keys)
11614 (add-installed-pythonpath inputs outputs)
11615 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11616 (native-inputs
11617 `(("python-pytest" ,python-pytest)))
11618 (propagated-inputs
11619 `(("python-certifi" ,python-certifi)
11620 ("python-gevent" ,python-gevent)
11621 ("python-six" ,python-six)))
11622 (home-page "https://github.com/gwik/geventhttpclient")
11623 (synopsis "HTTP client library for gevent")
11624 (description "@code{python-geventhttpclient} is a high performance,
11625concurrent HTTP client library for python using @code{gevent}.")
11626 (license license:expat)))
11627
11628(define-public python2-geventhttpclient
11629 (package-with-python2 python-geventhttpclient))
11630
b585e361
DM
11631(define-public python-fastimport
11632 (package
11633 (name "python-fastimport")
11634 (version "0.9.6")
11635 (source
11636 (origin
11637 (method url-fetch)
11638 (uri (pypi-uri "fastimport" version))
11639 (sha256
11640 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11641 (build-system python-build-system)
11642 (home-page "https://github.com/jelmer/python-fastimport")
11643 (synopsis "VCS fastimport parser and generator in Python")
11644 (description "This package provides a parser for and generator of the Git
11645@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11646format.")
11647 (license license:gpl2+)))
11648
11649(define-public python2-fastimport
11650 (package-with-python2 python-fastimport))
11651
da3aeeb6
SB
11652(define-public python-twisted
11653 (package
11654 (name "python-twisted")
11655 (version "16.2.0")
11656 (source (origin
11657 (method url-fetch)
8ea8e8d3 11658 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
11659 (sha256
11660 (base32
11661 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11662 (build-system python-build-system)
a960e73f
MB
11663 (arguments
11664 '(#:tests? #f)) ; FIXME: Some tests are failing.
11665 ;; #:phases
11666 ;; (modify-phases %standard-phases
11667 ;; (replace 'check
11668 ;; (lambda _
11669 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170
SB
11670 (propagated-inputs
11671 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
11672 (home-page "https://twistedmatrix.com/")
11673 (synopsis "Asynchronous networking framework written in Python")
11674 (description
11675 "Twisted is an extensible framework for Python programming, with special
11676focus on event-based network programming and multiprotocol integration.")
11677 (license license:expat)))
11678
11679(define-public python2-twisted
11680 (package-with-python2 python-twisted))
d0b6fed6 11681
4d3fa5a4
EF
11682(define-public python-pika
11683 (package
11684 (name "python-pika")
11685 (version "0.10.0")
11686 (source
11687 (origin
11688 (method url-fetch)
11689 (uri (pypi-uri "pika" version))
11690 (sha256
11691 (base32
11692 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11693 (build-system python-build-system)
11694 (native-inputs
269d9172
LF
11695 `(("python-pyev" ,python-pyev)
11696 ("python-tornado" ,python-tornado)
11697 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
11698 (home-page "https://pika.readthedocs.org")
11699 (synopsis "Pure Python AMQP Client Library")
11700 (description
11701 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11702Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11703network support library.")
11704 (license license:bsd-3)))
11705
11706(define-public python2-pika
11707 (package-with-python2 python-pika))
11708
d0b6fed6
DM
11709(define-public python-ply
11710 (package
11711 (name "python-ply")
234ade2d 11712 (version "3.9")
d0b6fed6
DM
11713 (source
11714 (origin
11715 (method url-fetch)
234ade2d 11716 (uri (pypi-uri "ply" version))
d0b6fed6
DM
11717 (sha256
11718 (base32
234ade2d 11719 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
d0b6fed6
DM
11720 (build-system python-build-system)
11721 (home-page "http://www.dabeaz.com/ply/")
11722 (synopsis "Python Lex & Yacc")
11723 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11724It uses LR parsing and does extensive error checking.")
f210e944 11725 (license license:bsd-3)))
d0b6fed6
DM
11726
11727(define-public python2-ply
f210e944 11728 (package-with-python2 python-ply))
d951bd54
SB
11729
11730(define-public python-tabulate
11731 (package
11732 (name "python-tabulate")
e6ace98d 11733 (version "0.7.7")
d951bd54
SB
11734 (source (origin
11735 (method url-fetch)
11736 (uri (pypi-uri "tabulate" version))
11737 (sha256
11738 (base32
fe2ba3a8 11739 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
d951bd54 11740 (build-system python-build-system)
fe2ba3a8
MB
11741 (arguments
11742 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11743 ;; and the latest release is not tagged in the upstream repository.
11744 '(#:tests? #f))
d951bd54
SB
11745 (home-page "https://bitbucket.org/astanin/python-tabulate")
11746 (synopsis "Pretty-print tabular data")
11747 (description
11748 "Tabulate is a library and command-line utility to pretty-print tabular
11749data in Python.")
11750 (license license:expat)))
11751
11752(define-public python2-tabulate
11753 (package-with-python2 python-tabulate))
1c4c8a33
SB
11754
11755(define-public python-kazoo
11756 (package
11757 (name "python-kazoo")
11758 (version "2.2.1")
11759 (source
11760 (origin
11761 (method url-fetch)
11762 (uri (pypi-uri "kazoo" version))
11763 (sha256
11764 (base32
11765 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11766 (build-system python-build-system)
11767 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
11768 (propagated-inputs
11769 `(("python-six" ,python-six)))
1c4c8a33
SB
11770 (home-page "https://kazoo.readthedocs.org")
11771 (synopsis "High-level Zookeeper client library")
11772 (description
11773 "Kazoo is a Python client library for the Apache Zookeeper distributed
11774application service. It is designed to be easy to use and to avoid common
11775programming errors.")
3f641af0 11776 (license license:asl2.0)))
1c4c8a33
SB
11777
11778(define-public python2-kazoo
11779 (package-with-python2 python-kazoo))
45dda35e
SB
11780
11781(define-public python-pykafka
11782 (package
11783 (name "python-pykafka")
11784 (version "2.4.0")
11785 (source (origin
11786 (method url-fetch)
c6bccf71
EF
11787 (uri (string-append
11788 "https://pypi.python.org/packages/8b/3e/"
11789 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11790 "pykafka-" version ".tar.gz"))
45dda35e
SB
11791 (sha256
11792 (base32
11793 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11794 (build-system python-build-system)
11795 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 11796 (propagated-inputs
45dda35e
SB
11797 `(("python-gevent" ,python-gevent)
11798 ("python-kazoo" ,python-kazoo)
45dda35e
SB
11799 ("python-tabulate" ,python-tabulate)))
11800 (inputs
11801 `(("librdkafka" ,librdkafka)))
11802 (home-page "https://pykafka.readthedocs.io/")
11803 (synopsis "Apache Kafka client for Python")
11804 (description
11805 "PyKafka is a client for the Apache Kafka distributed messaging system.
11806It includes Python implementations of Kafka producers and consumers, which
11807are optionally backed by a C extension built on librdkafka.")
3f641af0 11808 (license license:asl2.0)))
45dda35e
SB
11809
11810(define-public python2-pykafka
11811 (package-with-python2 python-pykafka))
a44fd439
DM
11812
11813(define-public python-wcwidth
11814 (package
11815 (name "python-wcwidth")
9e59478f 11816 (version "0.1.7")
a44fd439
DM
11817 (source
11818 (origin
11819 (method url-fetch)
9e59478f 11820 (uri (pypi-uri "wcwidth" version))
a44fd439
DM
11821 (sha256
11822 (base32
9e59478f 11823 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
a44fd439
DM
11824 (build-system python-build-system)
11825 (home-page "https://github.com/jquast/wcwidth")
66e07664 11826 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
11827 (description "Wcwidth measures the number of terminal column cells of
11828wide-character codes. It is useful for those implementing a terminal emulator,
11829or programs that carefully produce output to be interpreted by one. It is a
11830Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11831specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 11832 (license license:expat)))
a44fd439
DM
11833
11834(define-public python2-wcwidth
f210e944 11835 (package-with-python2 python-wcwidth))
0de78c95
DP
11836
11837(define-public python2-jsonrpclib
11838 (package
11839 (name "python2-jsonrpclib")
11840 (version "0.1.7")
11841 (source (origin
11842 (method url-fetch)
11843 (uri (string-append
11844 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11845 "jsonrpclib-" version ".tar.gz"))
11846 (sha256
11847 (base32
11848 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11849 (build-system python-build-system)
0de78c95
DP
11850 (arguments
11851 `(#:tests? #f
11852 #:python ,python-2))
11853 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11854 (synopsis "Implementation of JSON-RPC specification for Python")
11855 (description
11856 "This library is an implementation of the JSON-RPC specification.
11857It supports both the original 1.0 specification, as well as the
11858new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11859etc.")
3f641af0 11860 (license license:asl2.0)))
9250b0f3
SB
11861
11862(define-public python-chai
11863 (package
11864 (name "python-chai")
11865 (version "1.1.1")
11866 (source (origin
11867 (method url-fetch)
11868 (uri (pypi-uri "chai" version))
11869 (sha256
11870 (base32
11871 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11872 (build-system python-build-system)
9250b0f3
SB
11873 (home-page "https://github.com/agoragames/chai")
11874 (synopsis "Mocking framework for Python")
11875 (description
11876 "Chai provides an api for mocking, stubbing and spying your python
11877objects, patterned after the Mocha library for Ruby.")
3f641af0 11878 (license license:bsd-3)))
9250b0f3
SB
11879
11880(define-public python2-chai
11881 (package-with-python2 python-chai))
11882
ae43baa8
SB
11883(define-public python-arrow
11884 (package
11885 (name "python-arrow")
11886 (version "0.8.0")
11887 (source (origin
11888 (method url-fetch)
11889 (uri (pypi-uri "arrow" version))
11890 (sha256
11891 (base32
11892 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11893 (build-system python-build-system)
11894 (native-inputs
f3b98f4f 11895 `(;; For testing
ae43baa8
SB
11896 ("python-chai" ,python-chai)
11897 ("python-simplejson" ,python-simplejson)))
36aed736 11898 (propagated-inputs
22d7360b 11899 `(("python-dateutil" ,python-dateutil)))
ae43baa8
SB
11900 (home-page "https://github.com/crsmithdev/arrow/")
11901 (synopsis "Dates and times for Python")
11902 (description
11903 "Arrow is a Python library to creating, manipulating, formatting and
11904converting dates, times, and timestamps. It implements and updates the
11905datetime type.")
3f641af0 11906 (license license:asl2.0)))
ae43baa8
SB
11907
11908(define-public python2-arrow
11909 (package-with-python2 python-arrow))
11910
1f2b62a4
SB
11911(define-public python-inflection
11912 (package
11913 (name "python-inflection")
11914 (version "0.3.1")
11915 (source
11916 (origin (method url-fetch)
11917 (uri (pypi-uri "inflection" version))
11918 (sha256
11919 (base32
11920 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11921 (build-system python-build-system)
e9127525
MB
11922 (native-inputs
11923 `(("python-pytest" ,python-pytest)))
7bf837fd 11924 (home-page "https://github.com/jpvanhal/inflection")
1f2b62a4
SB
11925 (synopsis "Python string transformation library")
11926 (description
11927 "Inflection is a string transformation library. It singularizes
11928and pluralizes English words, and transforms strings from CamelCase to
11929underscored string.")
11930 (license license:expat)))
11931
11932(define-public python2-inflection
11933 (package-with-python2 python-inflection))
11934
18995566
SB
11935(define-public python-pylev
11936 (package
11937 (name "python-pylev")
11938 (version "1.3.0")
11939 (source (origin
11940 (method url-fetch)
11941 (uri (pypi-uri "pylev" version))
11942 (sha256
11943 (base32
11944 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11945 (build-system python-build-system)
7bf837fd 11946 (home-page "https://github.com/toastdriven/pylev")
18995566
SB
11947 (synopsis "Levenshtein distance implementation in Python")
11948 (description "Pure Python Levenshtein implementation, based off the
11949Wikipedia code samples at
11950@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 11951 (license license:bsd-3)))
18995566
SB
11952
11953(define-public python2-pylev
11954 (package-with-python2 python-pylev))
11955
f5deff7a
SB
11956(define-public python-cleo
11957 (package
11958 (name "python-cleo")
11959 (version "0.4.1")
11960 (source (origin
11961 (method url-fetch)
11962 (uri (pypi-uri "cleo" version))
11963 (sha256
11964 (base32
11965 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11966 (build-system python-build-system)
11967 (native-inputs
f3b98f4f 11968 `(;; For testing
f5deff7a
SB
11969 ("python-mock" ,python-mock)
11970 ("python-pytest" ,python-pytest)))
9403150a
SB
11971 (propagated-inputs
11972 `(("python-psutil" ,python-psutil)
11973 ("python-pylev" ,python-pylev)))
f5deff7a
SB
11974 (home-page "https://github.com/sdispater/cleo")
11975 (synopsis "Command-line arguments library for Python")
11976 (description
11977 "Cleo allows you to create command-line commands with signature in
11978docstring and colored output.")
11979 (license license:expat)))
11980
11981(define-public python2-cleo
11982 (package-with-python2 python-cleo))
11983
77cadb43
SB
11984(define-public python-lazy-object-proxy
11985 (package
11986 (name "python-lazy-object-proxy")
11987 (version "1.2.2")
11988 (source (origin
11989 (method url-fetch)
11990 (uri (pypi-uri "lazy-object-proxy" version))
11991 (sha256
11992 (base32
11993 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11994 (build-system python-build-system)
77cadb43
SB
11995 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11996 (synopsis "Lazy object proxy for python")
11997 (description
11998 "Lazy object proxy is an object that wraps a callable but defers the call
11999until the object is actually required, and caches the result of said call.")
3f641af0 12000 (license license:bsd-2)))
77cadb43
SB
12001
12002(define-public python2-lazy-object-proxy
12003 (package-with-python2 python-lazy-object-proxy))
12004
5477e05f
SB
12005(define-public python-dnspython
12006 (package
12007 (name "python-dnspython")
6c514128 12008 (version "1.15.0")
5477e05f
SB
12009 (source (origin
12010 (method url-fetch)
12011 (uri (string-append "http://www.dnspython.org/kits/"
12012 version "/dnspython-" version ".tar.gz"))
12013 (sha256
12014 (base32
6c514128 12015 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
12016 (build-system python-build-system)
12017 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
12018 (home-page "http://www.dnspython.org")
12019 (synopsis "DNS toolkit for Python")
12020 (description
12021 "dnspython is a DNS toolkit for Python. It supports almost all record
12022types. It can be used for queries, zone transfers, and dynamic updates.
12023It supports TSIG authenticated messages and EDNS0.")
12024 (license license:expat)))
12025
12026(define-public python2-dnspython
12027 (package-with-python2 python-dnspython))
12028
22711e25
SB
12029(define-public python-email-validator
12030 (package
12031 (name "python-email-validator")
b165c215 12032 (version "1.0.2")
22711e25
SB
12033 (source
12034 (origin (method url-fetch)
12035 (uri (pypi-uri "email_validator" version))
12036 (sha256
12037 (base32
b165c215 12038 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
22711e25
SB
12039 (build-system python-build-system)
12040 (arguments
12041 '(#:phases
12042 (modify-phases %standard-phases
12043 (add-before 'build 'use-dnspython
12044 (lambda _
12045 (substitute* "setup.py"
12046 (("dnspython3") "dnspython"))
12047 #t)))))
d42560bd 12048 (propagated-inputs
22711e25 12049 `(("python-dnspython" ,python-dnspython)
d42560bd 12050 ("python-idna" ,python-idna)))
22711e25
SB
12051 (home-page "https://github.com/JoshData/python-email-validator")
12052 (synopsis "Email address validation library for Python")
12053 (description
12054 "This library validates email address syntax and deliverability.")
3f641af0 12055 (license license:cc0)))
22711e25
SB
12056
12057(define-public python2-email-validator
12058 (package-with-python2 python-email-validator))
12059
8987d91e
SB
12060(define-public python-ukpostcodeparser
12061 (package
12062 (name "python-ukpostcodeparser")
12063 (version "1.0.3")
12064 (source (origin
12065 (method url-fetch)
12066 (uri (pypi-uri "UkPostcodeParser" version))
12067 (sha256
12068 (base32
12069 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
12070 (build-system python-build-system)
8987d91e
SB
12071 (home-page "https://github.com/hamstah/ukpostcodeparser")
12072 (synopsis "UK Postcode parser for Python")
12073 (description
12074 "This library provides the @code{parse_uk_postcode} function for
12075parsing UK postcodes.")
12076 (license license:expat)))
12077
12078(define-public python2-ukpostcodeparser
12079 (package-with-python2 python-ukpostcodeparser))
ea92ae01 12080
ce7911dd
MB
12081(define-public python-faker
12082 (package
12083 (name "python-faker")
12084 (version "0.7.9")
12085 (source (origin
12086 (method url-fetch)
12087 (uri (pypi-uri "Faker" version))
12088 (sha256
12089 (base32
12090 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
12091 (patches
12092 (search-patches "python-faker-fix-build-32bit.patch"))
12093 (modules '((guix build utils)))
12094 (snippet
12095 '(begin
12096 (for-each delete-file (find-files "." "\\.pyc$"))
12097 #t))))
12098 (build-system python-build-system)
12099 (arguments
12100 '(#:phases
12101 (modify-phases %standard-phases
12102 (replace 'check
12103 (lambda _
12104 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
12105 (native-inputs
12106 `(;; For testing
12107 ("python-email-validator" ,python-email-validator)
12108 ("python-mock" ,python-mock)
12109 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
12110 (propagated-inputs
12111 `(("python-dateutil" ,python-dateutil)
12112 ("python-six" ,python-six)))
12113 (home-page "https://github.com/joke2k/faker")
12114 (synopsis "Python package that generates fake data")
12115 (description
12116 "Faker is a Python package that generates fake data such as names,
12117addresses, and phone numbers.")
12118 (license license:expat)
12119 (properties `((python2-variant . ,(delay python2-faker))))))
12120
12121(define-public python2-faker
12122 (let ((base (package-with-python2 (strip-python2-variant
12123 python-faker))))
12124 (package
12125 (inherit base)
12126 (propagated-inputs
12127 `(("python2-ipaddress" ,python2-ipaddress)
12128 ,@(package-propagated-inputs base))))))
12129
b49504fd
SB
12130(define-public python-pyaml
12131 (package
12132 (name "python-pyaml")
12133 (version "15.8.2")
12134 (source (origin
12135 (method url-fetch)
12136 (uri (pypi-uri "pyaml" version))
12137 (sha256
12138 (base32
12139 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
12140 (build-system python-build-system)
f620311a
MB
12141 (native-inputs
12142 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
12143 (propagated-inputs
12144 `(("python-pyyaml" ,python-pyyaml)))
12145 (home-page "https://github.com/mk-fg/pretty-yaml")
12146 (synopsis "YAML pretty-print library for Python")
12147 (description
12148 "pyaml is a PyYAML based python module to produce pretty and readable
12149YAML-serialized data.")
3f641af0 12150 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
12151
12152(define-public python2-pyaml
12153 (package-with-python2 python-pyaml))
12154
347175a2
SB
12155(define-public python-flexmock
12156 (package
12157 (name "python-flexmock")
12158 (version "0.10.2")
12159 (source (origin
12160 (method url-fetch)
12161 (uri (pypi-uri "flexmock" version))
12162 (sha256
12163 (base32
12164 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
12165 (build-system python-build-system)
347175a2
SB
12166 (home-page "https://flexmock.readthedocs.org")
12167 (synopsis "Testing library for Python")
12168 (description
12169 "flexmock is a testing library for Python that makes it easy to create
12170mocks, stubs and fakes.")
3f641af0 12171 (license license:bsd-3)))
347175a2
SB
12172
12173(define-public python2-flexmock
12174 (package-with-python2 python-flexmock))
12175
5a744191
SB
12176(define-public python-orator
12177 (package
12178 (name "python-orator")
12179 (version "0.8.2")
12180 (source (origin
12181 (method url-fetch)
12182 (uri (pypi-uri "orator" version))
12183 (sha256
12184 (base32
12185 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
12186 (build-system python-build-system)
12187 (arguments '(#:tests? #f)) ; no tests
b2676030 12188 (propagated-inputs
5a744191
SB
12189 `(("python-arrow" ,python-arrow)
12190 ("python-blinker" ,python-blinker)
12191 ("python-cleo" ,python-cleo)
ce7911dd 12192 ("python-faker" ,python-faker)
5a744191
SB
12193 ("python-inflection" ,python-inflection)
12194 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
12195 ("python-pyaml" ,python-pyaml)
5a744191
SB
12196 ("python-simplejson" ,python-simplejson)
12197 ("python-wrapt" ,python-wrapt)))
12198 (home-page "https://orator-orm.com/")
12199 (synopsis "ActiveRecord ORM for Python")
12200 (description
12201 "Orator provides a simple ActiveRecord-like Object Relational Mapping
12202implementation for Python.")
12203 (license license:expat)
12204 (properties `((python2-variant . ,(delay python2-orator))))))
12205
12206(define-public python2-orator
12207 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
12208 (package
12209 (inherit base)
06961617 12210 (propagated-inputs
5a744191 12211 `(("python2-ipaddress" ,python2-ipaddress)
06961617 12212 ,@(package-propagated-inputs base))))))
f4155188
DM
12213
12214(define-public python-prompt-toolkit
12215 (package
12216 (name "python-prompt-toolkit")
6a34f4cc 12217 (version "1.0.9")
f4155188
DM
12218 (source
12219 (origin
12220 (method url-fetch)
d15e2ef0 12221 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
12222 (sha256
12223 (base32
6a34f4cc 12224 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
f4155188 12225 (build-system python-build-system)
bae18710
LF
12226 (arguments
12227 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
12228 (propagated-inputs
12229 `(("python-wcwidth" ,python-wcwidth)
2c199b55 12230 ("python-six" ,python-six)
f22efa01 12231 ("python-pygments" ,python-pygments)))
f4155188
DM
12232 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
12233 (synopsis "Library for building command line interfaces in Python")
12234 (description
12235 "Prompt-Toolkit is a library for building interactive command line
12236interfaces in Python. It's like GNU Readline but it also features syntax
12237highlighting while typing, out-of-the-box multi-line input editing, advanced
12238code completion, incremental search, support for Chinese double-width
12239characters, mouse support, and auto suggestions.")
f210e944 12240 (license license:bsd-3)))
f4155188
DM
12241
12242(define-public python2-prompt-toolkit
f210e944 12243 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
12244
12245(define-public python-jedi
12246 (package
12247 (name "python-jedi")
12248 (version "0.9.0")
12249 (source
12250 (origin
12251 (method url-fetch)
12252 (uri (pypi-uri "jedi" version))
12253 (sha256
12254 (base32
12255 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
12256 (build-system python-build-system)
bfce8a34
MB
12257 (arguments
12258 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
12259 '(#:tests? #f))
12260 (native-inputs
12261 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
12262 (home-page "https://github.com/davidhalter/jedi")
12263 (synopsis
12264 "Autocompletion for Python that can be used for text editors")
12265 (description
12266 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 12267 (license license:expat)))
a502dfbf
DM
12268
12269(define-public python2-jedi
f210e944 12270 (package-with-python2 python-jedi))
c2f0dc6e
DM
12271
12272(define-public ptpython
12273 (package
12274 (name "ptpython")
12275 (version "0.34")
12276 (source (origin
12277 (method url-fetch)
12278 (uri (pypi-uri "ptpython" version))
12279 (sha256
12280 (base32
12281 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
12282 (build-system python-build-system)
32955348
MB
12283 (arguments
12284 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
f22efa01 12285 (propagated-inputs
c2f0dc6e
DM
12286 `(("python-docopt" ,python-docopt)
12287 ("python-jedi" ,python-jedi)
12288 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 12289 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
12290 (home-page "https://github.com/jonathanslenders/ptpython")
12291 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
12292 (description
12293 "ptpython is a Python read-eval-print loop with IDE-like features.
12294It supports syntax highlighting, multiline editing, autocompletion, mouse,
12295color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
12296etc.")
3f641af0 12297 (license license:bsd-3)
c2f0dc6e
DM
12298 (properties `((python2-variant . ,(delay ptpython-2))))))
12299
12300(define-public ptpython-2
12301 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
12302 (package
12303 (inherit base)
12304 (name "ptpython2"))))
b227f0be 12305
b04a52a6
DJ
12306(define-public python-requests-oauthlib
12307 (package
12308 (name "python-requests-oauthlib")
12309 (version "0.6.2")
12310 (source
12311 (origin
12312 (method url-fetch)
12313 (uri (pypi-uri "requests-oauthlib" version))
12314 (sha256
12315 (base32
12316 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
12317 (build-system python-build-system)
12318 (arguments
12319 `(#:phases
12320 (modify-phases %standard-phases
12321 ;; removes tests that require network access
12322 (add-before 'check 'pre-check
12323 (lambda _
12324 (delete-file "tests/test_core.py")
12325 #t)))))
12326 (native-inputs
12327 `(("python-requests-mock" ,python-requests-mock)
12328 ("python-mock" ,python-mock)))
f22efa01 12329 (propagated-inputs
b04a52a6
DJ
12330 `(("python-oauthlib" ,python-oauthlib)
12331 ("python-requests" ,python-requests)))
12332 (home-page
12333 "https://github.com/requests/requests-oauthlib")
12334 (synopsis
12335 "OAuthlib authentication support for Requests")
12336 (description
12337 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
12338provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 12339 (license license:isc)))
b04a52a6
DJ
12340
12341(define-public python2-requests-oauthlib
f210e944 12342 (package-with-python2 python-requests-oauthlib))
b04a52a6 12343
b227f0be 12344(define-public python-stem
12345 (package
12346 (name "python-stem")
0bb1c35a 12347 (version "1.5.4")
b227f0be 12348 (source
12349 (origin
12350 (method url-fetch)
c976b319 12351 (uri (pypi-uri "stem" version))
b227f0be 12352 (sha256
12353 (base32
0bb1c35a 12354 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
b227f0be 12355 (build-system python-build-system)
12356 (arguments
12357 `(#:phases
12358 (modify-phases %standard-phases
12359 (replace 'check
12360 (lambda _
12361 (zero? (system* "./run_tests.py" "--unit")))))))
12362 (native-inputs
12363 `(("python-mock" ,python-mock)
12364 ("python-pep8" ,python-pep8)
12365 ("python-pyflakes" ,python-pyflakes)))
b227f0be 12366 (home-page "https://stem.torproject.org/")
12367 (synopsis
12368 "Python controller library that allows applications to interact with Tor")
12369 (description
12370 "Stem is a Python controller library for Tor. With it you can use Tor's
12371control protocol to script against the Tor process and read descriptor data
12372relays publish about themselves.")
3f641af0 12373 (license license:lgpl3)))
b227f0be 12374
12375(define-public python2-stem
12376 (package-with-python2 python-stem))
517a6c0c
DM
12377
12378(define-public python-pyserial
12379 (package
12380 (name "python-pyserial")
12381 (version "3.1.1")
12382 (source
12383 (origin
12384 (method url-fetch)
12385 (uri (pypi-uri "pyserial" version))
12386 (sha256
12387 (base32
12388 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
12389 (build-system python-build-system)
0a702009
MB
12390 (arguments
12391 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12392 ;; #:phases
12393 ;; (modify-phases %standard-phases
12394 ;; (replace 'check
12395 ;; (lambda _
12396 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
517a6c0c
DM
12397 (home-page
12398 "https://github.com/pyserial/pyserial")
12399 (synopsis "Python Serial Port Bindings")
12400 (description "@code{pyserial} provide serial port bindings for Python. It
12401supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12402and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 12403 (license license:bsd-3)))
517a6c0c
DM
12404
12405(define-public python2-pyserial
f210e944 12406 (package-with-python2 python-pyserial))
6eb7af2a
DJ
12407
12408(define-public python-kivy
12409 (package
12410 (name "python-kivy")
12411 (version "1.9.1")
12412 (source
12413 (origin
12414 (method url-fetch)
12415 (uri (pypi-uri "kivy" version))
12416 (file-name (string-append name "-" version ".tar.gz"))
12417 (sha256
12418 (base32
12419 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
12420 (build-system python-build-system)
12421 (arguments
12422 `(#:tests? #f ; Tests require many optional packages
12423 #:phases
12424 (modify-phases %standard-phases
12425 (replace 'build (lambda _ (zero? (system* "make" "force"))))
12426 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12427 (lambda* (#:key inputs #:allow-other-keys)
12428 (setenv "KIVY_SDL2_PATH"
12429 (string-append (assoc-ref inputs "sdl-union")
12430 "/include/SDL2"))
12431 #t)))))
12432 (native-inputs
f2516de2
HG
12433 `(("pkg-config" ,pkg-config)
12434 ("python-cython" ,python-cython)))
6eb7af2a 12435 (inputs
f2516de2 12436 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
12437 ("mesa" ,mesa)
12438 ("sdl-union"
12439 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12440 (home-page "http://kivy.org")
12441 (synopsis
12442 "Multitouch application framework")
12443 (description
12444 "A software library for rapid development of
12445hardware-accelerated multitouch applications.")
12446 (license license:expat)))
12447
12448(define-public python2-kivy
12449 (package-with-python2 python-kivy))
12450
12451(define-public python-kivy-next
12452 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
12453 (revision "1"))
12454 (package (inherit python-kivy)
12455 (name "python-kivy-next")
d80a71eb 12456 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
12457 (string-take commit 7)))
12458 (source
12459 (origin
12460 (method git-fetch)
12461 (uri (git-reference
12462 (url "https://github.com/kivy/kivy")
12463 (commit commit)))
12464 (file-name (string-append name "-" version "-checkout"))
12465 (sha256
12466 (base32
12467 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
12468
12469(define-public python2-kivy-next
12470 (package-with-python2 python-kivy-next))
8794bd8b
DC
12471
12472(define-public python-binaryornot
12473 (package
12474 (name "python-binaryornot")
12475 (version "0.4.0")
12476 (source (origin
12477 (method url-fetch)
12478 (uri (pypi-uri "binaryornot" version))
12479 (sha256
12480 (base32
12481 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
12482 (build-system python-build-system)
f22efa01 12483 (propagated-inputs
8794bd8b
DC
12484 `(("python-chardet" ,python-chardet)
12485 ("python-hypothesis" ,python-hypothesis)))
12486 (home-page "https://github.com/audreyr/binaryornot")
12487 (synopsis "Package to check if a file is binary or text")
12488 (description "Ultra-lightweight pure Python package to check if a file is
12489binary or text.")
12490 (license license:bsd-3)
12491 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12492
12493(define-public python2-binaryornot
12494 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12495 (package (inherit base)
f22efa01 12496 (propagated-inputs
8794bd8b 12497 `(("python2-enum34" ,python2-enum34)
f22efa01 12498 ,@(package-propagated-inputs base))))))
a9ac982a
DC
12499
12500(define-public python-nltk
12501 (package
12502 (name "python-nltk")
12503 (version "3.2.1")
12504 (source (origin
12505 (method url-fetch)
12506 (uri (pypi-uri "nltk" version))
12507 (sha256
12508 (base32
12509 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12510 (build-system python-build-system)
59f12985
LF
12511 (arguments
12512 '(;; The tests require some extra resources to be downloaded.
12513 ;; TODO Try packaging these resources.
12514 #:tests? #f))
a9ac982a
DC
12515 (home-page "http://nltk.org/")
12516 (synopsis "Natural Language Toolkit")
12517 (description "It provides interfaces to over 50 corpora and lexical
12518resources such as WordNet, along with a suite of text processing libraries
12519for classification, tokenization, stemming, tagging, parsing, and semantic
12520reasoning, wrappers for natural language processing libraries.")
f210e944 12521 (license license:asl2.0)))
a9ac982a
DC
12522
12523(define-public python2-nltk
f210e944 12524 (package-with-python2 python-nltk))
691cd90d
DC
12525
12526(define-public python-pymongo
12527 (package
12528 (name "python-pymongo")
12529 (version "3.3.0")
12530 (source (origin
12531 (method url-fetch)
12532 (uri (pypi-uri "pymongo" version))
12533 (sha256
12534 (base32
12535 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12536 (build-system python-build-system)
f22efa01 12537 (propagated-inputs
691cd90d 12538 `(("python-certifi" ,python-certifi)))
7bf837fd 12539 (home-page "https://github.com/mongodb/mongo-python-driver")
691cd90d
DC
12540 (synopsis "Python driver for MongoDB")
12541 (description "Python driver for MongoDB.")
f210e944 12542 (license license:asl2.0)))
691cd90d
DC
12543
12544(define-public python2-pymongo
f210e944 12545 (package-with-python2 python-pymongo))
6a6c9d43
DC
12546
12547(define-public python-sh
12548 (package
12549 (name "python-sh")
12550 (version "1.11")
12551 (source (origin
12552 (method url-fetch)
12553 (uri (pypi-uri "sh" version))
12554 (sha256
12555 (base32
12556 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12557 (build-system python-build-system)
12558 (arguments
12559 `(#:tests? #f)) ; no tests
12560 (home-page "https://github.com/amoffat/sh")
12561 (synopsis "Python subprocess interface")
12562 (description "Abstracts process invocation by providing a function
12563interface for programs.")
f210e944 12564 (license license:expat)))
6a6c9d43
DC
12565
12566(define-public python2-sh
f210e944 12567 (package-with-python2 python-sh))
05b59190 12568
25702397
EF
12569(define-public python-consul
12570 (package
12571 (name "python-consul")
12572 (version "0.6.1")
12573 (source
12574 (origin
12575 (method url-fetch)
12576 (uri (pypi-uri "python-consul" version))
12577 (sha256
12578 (base32
12579 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12580 (build-system python-build-system)
12581 (native-inputs
fd1d6de7
HG
12582 `(("python-pytest" ,python-pytest)))
12583 (propagated-inputs
12584 `(("python-requests" ,python-requests)
25702397
EF
12585 ("python-six" ,python-six)))
12586 (home-page "https://github.com/cablehead/python-consul")
12587 (synopsis "Python client for Consul")
12588 (description
12589 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12590discovery, monitoring and configuration.")
12591 (license license:expat)))
12592
12593(define-public python2-consul
f210e944 12594 (package-with-python2 python-consul))
25702397 12595
05b59190
DC
12596(define-public python-schematics
12597 (package
12598 (name "python-schematics")
12599 (version "1.1.1")
12600 (source
12601 (origin
12602 (method url-fetch)
12603 (uri (string-append
12604 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12605 (file-name (string-append name "-" version ".tar.gz"))
12606 (sha256
12607 (base32
12608 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12609 (build-system python-build-system)
f22efa01 12610 (propagated-inputs
05b59190
DC
12611 `(("python-six" ,python-six)))
12612 (arguments
12613 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12614 ; version requirements (eg python-coveralls)
12615 (home-page "https://github.com/schematics/schematics")
12616 (synopsis "Python Data Structures for Humans")
12617 (description "Python Data Structures for Humans.")
f210e944 12618 (license license:bsd-3)))
05b59190
DC
12619
12620(define-public python2-schematics
f210e944 12621 (package-with-python2 python-schematics))
d6907ff7
DC
12622
12623(define-public python-publicsuffix
12624 (package
12625 (name "python-publicsuffix")
12626 (version "1.1.0")
12627 (source (origin
12628 (method url-fetch)
12629 (uri (pypi-uri "publicsuffix" version))
12630 (sha256
12631 (base32
12632 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12633 (build-system python-build-system)
12634 (arguments
12635 `(#:tests? #f)) ; tests use the internet
12636 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12637 (synopsis "Get suffix for a domain name")
12638 (description "Get a public suffix for a domain name using the Public Suffix
12639List.")
f210e944 12640 (license license:expat)))
d6907ff7
DC
12641
12642(define-public python2-publicsuffix
f210e944 12643 (package-with-python2 python-publicsuffix))
b2319996
DC
12644
12645(define-public python-publicsuffix2
12646 (package
12647 (name "python-publicsuffix2")
91862162 12648 (version "2.20160818")
b2319996
DC
12649 (source
12650 (origin
12651 (method url-fetch)
12652 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12653 (sha256
12654 (base32
91862162 12655 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
b2319996 12656 (build-system python-build-system)
10797a0a
LF
12657 (arguments
12658 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
12659 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12660 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12661 (description "Get a public suffix for a domain name using the Public Suffix
12662List. Forked from and using the same API as the publicsuffix package.")
f210e944 12663 (license (list license:expat license:mpl2.0))))
b2319996
DC
12664
12665(define-public python2-publicsuffix2
f210e944 12666 (package-with-python2 python-publicsuffix2))
81f1515d
DC
12667
12668(define-public python-url
12669 (package
12670 (name "python-url")
12671 (version "0.2.0")
12672 (source (origin
12673 (method url-fetch)
12674 (uri (pypi-uri "url" version))
12675 (sha256
12676 (base32
12677 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12678 (build-system python-build-system)
f22efa01 12679 (propagated-inputs
81f1515d
DC
12680 `(("python-publicsuffix" ,python-publicsuffix)))
12681 (native-inputs
12682 `(("python-coverage" ,python-coverage)
12683 ("python-nose" ,python-nose)))
12684 (arguments
12685 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
7bf837fd 12686 (home-page "https://github.com/seomoz/url-py")
81f1515d
DC
12687 (synopsis "URL Parsing")
12688 (description "Library for parsing urls.")
12689 (license license:expat)
12690 (properties `((python2-variant . ,(delay python2-url))))))
12691
12692(define-public python2-url
12693 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12694 (package (inherit base)
f22efa01 12695 (propagated-inputs
f210e944 12696 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
12697
12698(define-public python-freezegun
12699 (package
12700 (name "python-freezegun")
0c315fb3 12701 (version "0.3.8")
974ee2c1
TS
12702 (source
12703 (origin
12704 (method url-fetch)
12705 (uri (pypi-uri "freezegun" version))
12706 (sha256
12707 (base32
0c315fb3 12708 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
974ee2c1
TS
12709 (build-system python-build-system)
12710 (native-inputs
12711 `(("python-mock" ,python-mock)
12712 ("python-nose" ,python-nose)
4e096968 12713 ("python-coverage" ,python-coverage)))
f22efa01 12714 (propagated-inputs
4e096968 12715 `(("python-six" ,python-six)
22d7360b 12716 ("python-dateutil" ,python-dateutil)))
974ee2c1
TS
12717 (arguments
12718 `(#:phases (modify-phases %standard-phases
12719 ;; The tests are normally executed via `make test`, but the PyPi
12720 ;; package does not include the Makefile.
12721 (replace 'check
12722 (lambda _
12723 (zero? (system* "nosetests" "./tests/")))))))
12724 (home-page "https://github.com/spulec/freezegun")
12725 (synopsis "Test utility for mocking the datetime module")
12726 (description
12727 "FreezeGun is a library that allows your python tests to travel through
12728time by mocking the datetime module.")
12729 (license license:asl2.0)))
12730
12731(define-public python2-freezegun
f210e944
HG
12732 (package-with-python2 python-freezegun))
12733
dddcb25c
MB
12734
12735(define-public python-odfpy
12736 (package
12737 (name "python-odfpy")
12738 (version "1.3.3")
12739 (source (origin
12740 (method url-fetch)
12741 (uri (pypi-uri "odfpy" version))
12742 (sha256
12743 (base32
12744 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12745 (arguments
12746 `(#:modules ((srfi srfi-1)
12747 (guix build python-build-system)
12748 (guix build utils))
12749 #:phases
12750 (modify-phases %standard-phases
12751 (replace 'check
12752 ;; The test runner invokes python2 and python3 for test*.py.
12753 ;; To avoid having both in inputs, we replicate it here.
12754 (lambda _
12755 (every (lambda (test-file)
12756 (zero? (system* "python" test-file)))
12757 (find-files "tests" "^test.*\\.py$")))))))
12758 (build-system python-build-system)
12759 (home-page "https://github.com/eea/odfpy")
12760 (synopsis "Python API and tools to manipulate OpenDocument files")
12761 (description "Collection of libraries and utility programs written in
12762Python to manipulate OpenDocument 1.2 files.")
12763 (license
12764 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12765 ;; number of files with other licenses.
12766 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12767
12768(define-public python2-odfpy
12769 (package-with-python2 python-odfpy))
b30565bd
MB
12770
12771(define-public python-cachecontrol
12772 (package
12773 (name "python-cachecontrol")
12774 (version "0.11.6")
12775 (source
12776 (origin
12777 (method url-fetch)
12778 ;; Pypi does not have tests.
12779 (uri (string-append
12780 "https://github.com/ionrock/cachecontrol/archive/v"
12781 version ".tar.gz"))
12782 (file-name (string-append name "-" version ".tar.gz"))
12783 (sha256
12784 (base32
12785 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12786 (build-system python-build-system)
12787 (arguments
12788 `(#:phases
12789 (modify-phases %standard-phases
12790 (replace 'check
12791 (lambda _
12792 ;; Drop test that requires internet access.
12793 (delete-file "tests/test_regressions.py")
12794 (setenv "PYTHONPATH"
12795 (string-append (getcwd) "/build/lib:"
12796 (getenv "PYTHONPATH")))
12797 (zero? (system* "py.test" "-vv")))))))
12798 (native-inputs
12799 `(("python-pytest" ,python-pytest)
12800 ("python-redis" ,python-redis)
12801 ("python-webtest" ,python-webtest)
12802 ("python-mock" ,python-mock)))
12803 (propagated-inputs
12804 `(("python-requests" ,python-requests)
12805 ("python-lockfile" ,python-lockfile)))
12806 (home-page "https://github.com/ionrock/cachecontrol")
12807 (synopsis "The httplib2 caching algorithms for use with requests")
12808 (description "CacheControl is a port of the caching algorithms in
12809@code{httplib2} for use with @code{requests} session objects.")
f210e944 12810 (license license:asl2.0)))
b30565bd
MB
12811
12812(define-public python2-cachecontrol
f210e944 12813 (package-with-python2 python-cachecontrol))
243db824
DM
12814
12815(define-public python-lit
12816 (package
12817 (name "python-lit")
12818 (version "0.5.0")
12819 (source
12820 (origin
12821 (method url-fetch)
12822 (uri (pypi-uri "lit" version))
12823 (sha256
12824 (base32
12825 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12826 (build-system python-build-system)
12827 (home-page "http://llvm.org/")
12828 (synopsis "LLVM Software Testing Tool")
12829 (description "@code{lit} is a portable tool for executing LLVM and Clang
12830style test suites, summarizing their results, and providing indication of
12831failures.")
f210e944 12832 (license license:ncsa)))
243db824
DM
12833
12834(define-public python2-lit
f210e944 12835 (package-with-python2 python-lit))
66f95b20
MB
12836
12837(define-public python-pytest-pep8
12838 (package
12839 (name "python-pytest-pep8")
12840 (version "1.0.6")
12841 (source (origin
12842 (method url-fetch)
12843 (uri (pypi-uri "pytest-pep8" version))
12844 (sha256
12845 (base32
12846 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12847 (build-system python-build-system)
12848 (arguments
b41a05ce 12849 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
12850 (native-inputs
12851 `(("python-pytest" ,python-pytest)))
12852 (propagated-inputs
12853 `(("python-pep8" ,python-pep8)))
12854 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12855 (synopsis "Py.test plugin to check PEP8 requirements")
12856 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 12857 (license license:expat)))
66f95b20
MB
12858
12859(define-public python2-pytest-pep8
f210e944 12860 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
12861
12862(define-public python-pytest-flakes
12863 (package
12864 (name "python-pytest-flakes")
12865 (version "1.0.1")
12866 (source (origin
12867 (method url-fetch)
12868 (uri (pypi-uri "pytest-flakes" version))
12869 (sha256
12870 (base32
12871 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12872 (build-system python-build-system)
12873 (arguments
b41a05ce 12874 `(#:phases
df94a6b5
MB
12875 (modify-phases %standard-phases
12876 (delete 'check)
12877 (add-after 'install 'check
05c2fd36
HG
12878 (lambda* (#:key outputs inputs #:allow-other-keys)
12879 ;; It's easier to run tests after install.
12880 ;; Make installed package available for running the tests
12881 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
12882 (zero? (system* "py.test" "-vv")))))))
12883 (native-inputs
12884 `(("python-coverage" ,python-coverage)
12885 ("python-pytest" ,python-pytest)
12886 ("python-pytest-cache" ,python-pytest-cache)
12887 ("python-pytest-pep8" ,python-pytest-pep8)))
12888 (propagated-inputs
12889 `(("python-pyflakes" ,python-pyflakes)))
12890 (home-page "https://github.com/fschulze/pytest-flakes")
12891 (synopsis "Py.test plugin to check source code with pyflakes")
12892 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 12893 (license license:expat)))
df94a6b5
MB
12894
12895(define-public python2-pytest-flakes
f210e944 12896 (package-with-python2 python-pytest-flakes))
5467ea62
MB
12897
12898(define-public python-natsort
12899 (package
12900 (name "python-natsort")
a06cd95a 12901 (version "5.0.2")
5467ea62
MB
12902 (source (origin
12903 (method url-fetch)
12904 (uri (pypi-uri "natsort" version))
12905 (sha256
12906 (base32
a06cd95a 12907 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
5467ea62
MB
12908 (build-system python-build-system)
12909 (arguments
12910 `(#:phases
12911 (modify-phases %standard-phases
12912 (add-before 'check 'set-cachedir
12913 ;; Tests require write access to $HOME by default
12914 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12915 (native-inputs
12916 `(("python-hypothesis" ,python-hypothesis)
12917 ("python-pytest-cache" ,python-pytest-cache)
12918 ("python-pytest-cov" ,python-pytest-cov)
12919 ("python-pytest-flakes" ,python-pytest-flakes)
12920 ("python-pytest-pep8" ,python-pytest-pep8)))
12921 (propagated-inputs ; TODO: Add python-fastnumbers.
12922 `(("python-pyicu" ,python-pyicu)))
12923 (home-page "https://github.com/SethMMorton/natsort")
12924 (synopsis "Natural sorting for python and shell")
12925 (description
12926 "Natsort lets you apply natural sorting on lists instead of
12927lexicographical. If you use the built-in @code{sorted} method in python
12928on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12929returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12930function @code{natsorted} that identifies numbers and sorts them separately
12931from strings. It can also sort version numbers, real numbers, mixed types
12932and more, and comes with a shell command @command{natsort} that exposes this
12933functionality in the command line.")
12934 (license license:expat)
12935 (properties `((python2-variant . ,(delay python2-natsort))))))
12936
12937(define-public python2-natsort
12938 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12939 (package (inherit base)
12940 (native-inputs
00e10c6e 12941 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
12942 ("python2-mock" ,python2-mock)
12943 ("python2-enum34" ,python2-enum34)
12944 ,@(package-native-inputs base))))))
4efb9c54
SR
12945
12946(define-public python-glances
12947 (package
12948 (name "python-glances")
12949 (version "2.7.1")
12950 (source
12951 (origin
12952 (method url-fetch)
12953 (uri (pypi-uri "Glances" version))
12954 (sha256
12955 (base32
12956 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12957 (build-system python-build-system)
f22efa01 12958 (propagated-inputs
4efb9c54
SR
12959 `(("python-psutil" ,python-psutil)))
12960 (home-page
12961 "https://github.com/nicolargo/glances")
12962 (synopsis
12963 "A cross-platform curses-based monitoring tool")
12964 (description
12965 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12966Glances uses the PsUtil library to get information from your system. It monitors
12967CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 12968 (license license:lgpl3+)))
4efb9c54
SR
12969
12970(define-public python2-glances
f210e944 12971 (package-with-python2 python-glances))
05b7a593
EF
12972
12973(define-public python-graphql-core
12974 (package
12975 (name "python-graphql-core")
12976 (version "0.5.3")
12977 (source
12978 (origin
12979 (method url-fetch)
12980 (uri (pypi-uri "graphql-core" version))
12981 (sha256
12982 (base32
12983 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12984 (build-system python-build-system)
12985 (arguments
326f8285
LF
12986 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12987 #:phases
05b7a593
EF
12988 (modify-phases %standard-phases
12989 (add-after 'unpack 'patch-hardcoded-version
12990 (lambda _ (substitute*
12991 "setup.py"
12992 (("'gevent==1.1rc1'") "'gevent'"))
12993 #t)))))
12994 (native-inputs
12995 `(("python-gevent" ,python-gevent)
12996 ("python-mock" ,python-mock)
12997 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 12998 (propagated-inputs
05b7a593
EF
12999 `(("python-promise" ,python-promise)
13000 ("python-six" ,python-six)))
13001 (home-page "https://github.com/graphql-python/graphql-core")
13002 (synopsis "GraphQL implementation for Python")
13003 (description
13004 "GraphQL implementation for Python. GraphQL is a data query language and
13005runtime designed and used to request and deliver data to mobile and web apps.
13006This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
13007to Python.")
05b7a593
EF
13008 (license license:expat)))
13009
13010(define-public python2-graphql-core
f210e944 13011 (package-with-python2 python-graphql-core))
7ee51575
EF
13012
13013(define-public python-graphql-relay
13014 (package
13015 (name "python-graphql-relay")
b13a5b4d 13016 (version "0.4.5")
7ee51575
EF
13017 (source
13018 (origin
13019 (method url-fetch)
13020 (uri (pypi-uri "graphql-relay" version))
13021 (sha256
13022 (base32
b13a5b4d 13023 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
7ee51575
EF
13024 (build-system python-build-system)
13025 (native-inputs
13026 `(("python-pytest" ,python-pytest)))
f22efa01 13027 (propagated-inputs
7ee51575
EF
13028 `(("python-graphql-core" ,python-graphql-core)
13029 ("python-promise" ,python-promise)
13030 ("python-six" ,python-six)))
13031 (home-page "https://github.com/graphql-python/graphql-relay-py")
13032 (synopsis "Relay implementation for Python")
13033 (description
13034 "This is a library to allow the easy creation of Relay-compliant servers
13035using the GraphQL Python reference implementation of a GraphQL server. It
13036should be noted that the code is a exact port of the original
13037@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
13038from Facebook.")
7ee51575
EF
13039 (license license:expat)))
13040
13041(define-public python2-graphql-relay
f210e944 13042 (package-with-python2 python-graphql-relay))
ddc63a56
EF
13043
13044(define-public python-graphene
13045 (package
13046 (name "python-graphene")
13047 (version "0.10.2")
13048 (source
13049 (origin
13050 (method url-fetch)
13051 (uri (pypi-uri "graphene" version))
13052 (sha256
13053 (base32
13054 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
13055 (build-system python-build-system)
13056 (native-inputs
13057 `(("python-django-filter" ,python-django-filter)
13058 ("python-mock" ,python-mock)
13059 ("python-psycopg2" ,python-psycopg2)
13060 ("python-pytest-django" ,python-pytest-django)
13061 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 13062 (propagated-inputs
ddc63a56
EF
13063 `(("python-graphql-core" ,python-graphql-core)
13064 ("python-graphql-relay" ,python-graphql-relay)
13065 ("python-iso8601" ,python-iso8601)
13066 ("python-promise" ,python-promise)
13067 ("python-six" ,python-six)))
13068 (home-page "http://graphene-python.org/")
13069 (synopsis "GraphQL Framework for Python")
13070 (description
13071 "Graphene is a Python library for building GraphQL schemas/types.
13072A GraphQL schema describes your data model, and provides a GraphQL server
13073with an associated set of resolve methods that know how to fetch data.")
13074 (properties `((python2-variant . ,(delay python2-graphene))))
13075 (license license:expat)))
13076
13077(define-public python2-graphene
13078 (let ((base (package-with-python2
13079 (strip-python2-variant python-graphene))))
13080 (package (inherit base)
13081 (native-inputs
00e10c6e 13082 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 13083 ,@(package-native-inputs base))))))
d488d5d6
EF
13084
13085(define-public python-nautilus
13086 (package
13087 (name "python-nautilus")
13088 (version "0.4.9")
13089 (source
13090 (origin
13091 (method url-fetch)
13092 (uri (pypi-uri "nautilus" version))
13093 (sha256
13094 (base32
13095 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
13096 (build-system python-build-system)
13097 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 13098 (propagated-inputs
d488d5d6
EF
13099 `(("python-bcrypt" ,python-bcrypt)
13100 ("python-click" ,python-click)
13101 ("python-consul" ,python-consul)
d488d5d6
EF
13102 ("python-graphene" ,python-graphene)
13103 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
13104 ("python-peewee" ,python-peewee)
13105 ("python-pika" ,python-pika)
d488d5d6
EF
13106 ("python-tornado" ,python-tornado)
13107 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
13108 (native-inputs
13109 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
13110 (home-page "https://github.com/AlecAivazis/nautilus")
13111 (synopsis "Library for creating microservice applications")
13112 (description
13113 "Nautilus is a framework for flux based microservices that looks to
13114provide extendible implementations of common aspects of a cloud so that you can
13115focus on building massively scalable web applications.")
13116 (license license:expat)))
94cffc63 13117
89cd988b
DM
13118(define-public python-snowballstemmer
13119 (package
13120 (name "python-snowballstemmer")
13121 (version "1.2.1")
13122 (source (origin
1bd858cc
MB
13123 (method url-fetch)
13124 (uri (pypi-uri "snowballstemmer" version))
13125 (sha256
13126 (base32
13127 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
89cd988b
DM
13128 (build-system python-build-system)
13129 (arguments
13130 `(;; No tests exist
13131 #:tests? #f))
13132 (home-page "https://github.com/shibukawa/snowball_py")
13133 (synopsis "Snowball stemming library collection for Python")
13134 (description "This package provides 16 word stemmer algorithms generated
13135from Snowball algorithms. It includes the 15 original ones plus the Poerter
13136English stemmer.")
13137 (license license:bsd-3)))
13138
13139(define-public python2-snowballstemmer
13140 (package-with-python2 python-snowballstemmer))
13141
754bfd70
DM
13142(define-public python-sphinx-cloud-sptheme
13143 (package
13144 (name "python-sphinx-cloud-sptheme")
5095bc7d 13145 (version "1.8.0")
754bfd70 13146 (source (origin
1bd858cc
MB
13147 (method url-fetch)
13148 (uri (pypi-uri "cloud_sptheme" version))
13149 (sha256
13150 (base32
5095bc7d 13151 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
1bd858cc 13152 (build-system python-build-system)
a31e2f1a
MB
13153 ;; FIXME: The 'pypi' release archive does not contain tests.
13154 (arguments '(#:tests? #f))
1bd858cc
MB
13155 (native-inputs
13156 `(("python-sphinx" ,python-sphinx)))
13157 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
13158 (synopsis "'Cloud' theme for Sphinx documenter")
13159 (description "This package contains the \"Cloud\" theme for Sphinx and some
754bfd70 13160related extensions.")
1bd858cc 13161 (license license:bsd-3)))
754bfd70
DM
13162
13163(define-public python2-sphinx-cloud-sptheme
13164 (package-with-python2 python-sphinx-cloud-sptheme))
13165
807a5b32
DM
13166(define-public python-sphinx-alabaster-theme
13167 (package
13168 (name "python-sphinx-alabaster-theme")
13169 (version "0.7.9")
1bd858cc
MB
13170 (source (origin
13171 (method url-fetch)
13172 (uri (pypi-uri "alabaster" version))
13173 (sha256
13174 (base32
13175 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
807a5b32
DM
13176 (build-system python-build-system)
13177 (propagated-inputs
13178 `(("python-pygments" ,python-pygments)))
13179 (home-page "https://alabaster.readthedocs.io/")
13180 (synopsis "Configurable sidebar-enabled Sphinx theme")
13181 (description "Alabaster is a visually (c)lean, responsive, configurable
13182theme for the Sphinx documentation system. It's the default theme of Sphinx.")
13183 (license license:bsd-3)))
13184
13185(define-public python2-sphinx-alabaster-theme
13186 (package-with-python2 python-sphinx-alabaster-theme))
13187
66d3f50a
LF
13188(define-public python-betamax
13189 (package
13190 (name "python-betamax")
13191 (version "0.8.0")
13192 (source
13193 (origin
13194 (method url-fetch)
13195 (uri (pypi-uri "betamax" version))
13196 (sha256
13197 (base32
13198 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
13199 (build-system python-build-system)
13200 (arguments
13201 '(;; Many tests fail because they require networking.
13202 #:tests? #f))
c415f763 13203 (propagated-inputs
66d3f50a
LF
13204 `(("python-requests" ,python-requests)))
13205 (home-page "https://github.com/sigmavirus24/betamax")
13206 (synopsis "Record HTTP interactions with python-requests")
13207 (description "Betamax will record your test suite's HTTP interactions and
13208replay them during future tests. It is designed to work with python-requests.")
f210e944 13209 (license license:expat)))
66d3f50a
LF
13210
13211(define-public python2-betamax
f210e944 13212 (package-with-python2 python-betamax))
ca0635b4 13213
1eb6b724
OP
13214(define-public python-betamax-matchers
13215 (package
13216 (name "python-betamax-matchers")
13217 (version "0.4.0")
13218 (source
13219 (origin
13220 (method url-fetch)
13221 (uri (pypi-uri "betamax-matchers" version))
13222 (sha256
13223 (base32
13224 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
13225 (build-system python-build-system)
13226 (propagated-inputs
13227 `(("python-betamax" ,python-betamax)
13228 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13229 (home-page "https://github.com/sigmavirus24/betamax_matchers")
13230 (synopsis "VCR imitation for python-requests")
13231 (description "@code{betamax-matchers} provides a set of Matchers for
13232Betamax.")
13233 (license license:asl2.0)))
13234
13235(define-public python2-betamax-matchers
13236 (package-with-python2 python-betamax-matchers))
13237
94cffc63
LF
13238(define-public python-s3transfer
13239 (package
13240 (name "python-s3transfer")
1b5ea092 13241 (version "0.1.10")
94cffc63
LF
13242 (source (origin
13243 (method url-fetch)
13244 (uri (pypi-uri "s3transfer" version))
13245 (sha256
13246 (base32
1b5ea092 13247 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
94cffc63 13248 (build-system python-build-system)
fad8bf97
LF
13249 (arguments
13250 `(#:phases
13251 (modify-phases %standard-phases
13252 (replace 'check
13253 (lambda _
13254 ;; 7 of the 'integration' tests require network access or login
13255 ;; credentials.
13256 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 13257 (native-inputs
fad8bf97
LF
13258 `(("python-docutils" ,python-docutils)
13259 ("python-mock" ,python-mock)
13260 ("python-nose" ,python-nose)))
f22efa01 13261 (propagated-inputs
94cffc63
LF
13262 `(("python-botocore" ,python-botocore)))
13263 (synopsis "Amazon S3 Transfer Manager")
13264 (description "S3transfer is a Python library for managing Amazon S3
13265transfers.")
13266 (home-page "https://github.com/boto/s3transfer")
13267 (license license:asl2.0)
13268 (properties `((python2-variant . ,(delay python2-s3transfer))))))
13269
13270(define-public python2-s3transfer
13271 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
13272 (package
13273 (inherit base)
13274 (native-inputs
13275 `(("python2-futures" ,python2-futures)
94cffc63 13276 ,@(package-native-inputs base))))))
8ab59181
HG
13277
13278(define-public python-setproctitle
13279(package
13280 (name "python-setproctitle")
13281 (version "1.1.10")
13282 (source
13283 (origin
13284 (method url-fetch)
13285 (uri (pypi-uri "setproctitle" version))
13286 (sha256
13287 (base32
13288 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
13289 (build-system python-build-system)
13290 (arguments
13291 '(#:phases
13292 (modify-phases %standard-phases
13293 (add-before 'check 'patch-Makefile
13294 ;; Stricly this is only required for the python2 variant.
13295 ;; But adding a phase in an inherited package seems to be
13296 ;; cumbersum. So we patch even for python3.
13297 (lambda _
13298 (let ((nose (assoc-ref %build-inputs "python2-nose")))
13299 (when nose
13300 (substitute* "Makefile"
13301 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
13302 (string-append nose "/bin/nosetests "))))
13303 #t)))
13304 (replace 'check
13305 (lambda _
13306 (setenv "PYTHON" (or (which "python3") (which "python")))
13307 (setenv "PYCONFIG" (or (which "python3-config")
13308 (which "python-config")))
13309 (setenv "CC" "gcc")
13310 ;; No need to extend PYTHONPATH to find the built package, since
13311 ;; the Makefile will build anyway
13312 (zero? (system* "make" "check")))))))
13313 (native-inputs
13314 `(("procps" ,procps))) ; required for tests
13315 (home-page
13316 "https://github.com/dvarrazzo/py-setproctitle")
13317 (synopsis
13318 "Setproctitle implementation for Python to customize the process title")
13319 (description "The library allows a process to change its title (as displayed
13320by system tools such as ps and top).
13321
13322Changing the title is mostly useful in multi-process systems, for
13323example when a master process is forked: changing the children's title
13324allows to identify the task each process is busy with. The technique
13325is used by PostgreSQL and the OpenSSH Server for example.")
13326 (license license:bsd-3)
13327 (properties `((python2-variant . ,(delay python2-setproctitle))))))
13328
13329(define-public python2-setproctitle
13330 (let ((base (package-with-python2
13331 (strip-python2-variant python-setproctitle))))
13332 (package
13333 (inherit base)
13334 (native-inputs `(("python2-nose" ,python2-nose)
13335 ,@(package-native-inputs base))))))
162e42d8
HG
13336
13337(define-public python-validictory
13338 (package
13339 (name "python-validictory")
13340 (version "1.0.1")
13341 (source
13342 (origin
13343 (method url-fetch)
13344 (uri (pypi-uri "validictory" version))
13345 (sha256
13346 (base32
13347 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
13348 (build-system python-build-system)
13349 (arguments
13350 '(#:phases
13351 (modify-phases %standard-phases
13352 (add-after 'unpack 'bootstrap
13353 ;; Move the tests out of the package directory to avoid
13354 ;; packaging them.
13355 (lambda* _
13356 (rename-file "validictory/tests" "tests")
13357 (delete-file "tests/__init__.py")))
13358 (replace 'check
13359 (lambda _
13360 ;; Extend PYTHONPATH so the built package will be found.
13361 (setenv "PYTHONPATH"
13362 (string-append (getcwd) "/build/lib:"
13363 (getenv "PYTHONPATH")))
13364 (zero? (system* "py.test" "-vv" )))))))
13365 (native-inputs
13366 `(("python-pytest" ,python-pytest)))
13367 (home-page
13368 "https://github.com/jamesturk/validictory")
13369 (synopsis "General purpose Python data validator")
13370 (description "It allows validation of arbitrary Python data structures.
13371
13372The schema format is based on the JSON Schema
13373proposal (http://json-schema.org), so combined with json the library is also
13374useful as a validator for JSON data.")
f210e944 13375 (license license:expat)))
162e42d8
HG
13376
13377(define-public python2-validictory
f210e944 13378 (package-with-python2 python-validictory))
0990edfe
DM
13379
13380(define-public python-aniso8601
13381 (package
13382 (name "python-aniso8601")
13383 (version "1.1.0")
13384 (source
13385 (origin
13386 (method url-fetch)
13387 (uri (pypi-uri "aniso8601" version))
13388 (sha256
13389 (base32
13390 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
13391 (build-system python-build-system)
13392 (propagated-inputs
22d7360b 13393 `(("python-dateutil" ,python-dateutil)))
0990edfe
DM
13394 (home-page
13395 "https://bitbucket.org/nielsenb/aniso8601")
13396 (synopsis
13397 "Python library for parsing ISO 8601 strings")
13398 (description
13399 "This package contains a library for parsing ISO 8601 datetime strings.")
13400 (license license:bsd-3)))
999d964d
DM
13401
13402(define-public python-flask-restful
13403 (package
13404 (name "python-flask-restful")
13405 (version "0.3.5")
13406 (source
13407 (origin
13408 (method url-fetch)
13409 (uri (pypi-uri "Flask-RESTful" version))
13410 (sha256
13411 (base32
13412 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
13413 (build-system python-build-system)
13414 (propagated-inputs
13415 `(("python-aniso8601" ,python-aniso8601)
13416 ("python-flask" ,python-flask)
13417 ("python-pycrypto" ,python-pycrypto)
13418 ("python-pytz" ,python-pytz)))
13419 (native-inputs
13420 `(;; Optional dependency of Flask. Tests need it.
13421 ("python-blinker" ,python-blinker)
13422 ("python-mock" ,python-mock) ; For tests
13423 ("python-nose" ,python-nose) ; For tests
13424 ("python-sphinx" ,python-sphinx)))
13425 (home-page
13426 "https://www.github.com/flask-restful/flask-restful/")
13427 (synopsis
13428 "Flask module for creating REST APIs")
13429 (description
13430 "This package contains a Flask module for creating REST APIs.")
13431 (license license:bsd-3)))
31288222
DM
13432
13433(define-public python-flask-basicauth
13434 (package
13435 (name "python-flask-basicauth")
13436 (version "0.2.0")
13437 (source
13438 (origin
13439 (method url-fetch)
13440 (uri (pypi-uri "Flask-BasicAuth" version))
13441 (sha256
13442 (base32
13443 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
13444 (build-system python-build-system)
13445 (propagated-inputs
13446 `(("python-flask" ,python-flask)))
13447 (home-page
13448 "https://github.com/jpvanhal/flask-basicauth")
13449 (synopsis
13450 "HTTP basic access authentication for Flask")
13451 (description
13452 "This package provides HTTP basic access authentication for Flask.")
13453 (license license:bsd-3)))
903276d0
DM
13454
13455(define-public python-flask-sqlalchemy
13456 (package
13457 (name "python-flask-sqlalchemy")
13458 (version "2.1")
13459 (source
13460 (origin
13461 (method url-fetch)
13462 (uri (pypi-uri "Flask-SQLAlchemy" version))
13463 (sha256
13464 (base32
13465 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
13466 (build-system python-build-system)
13467 (propagated-inputs
13468 `(("python-flask" ,python-flask)
13469 ("python-sqlalchemy" ,python-sqlalchemy)))
13470 (home-page
7bf837fd 13471 "https://github.com/mitsuhiko/flask-sqlalchemy")
903276d0
DM
13472 (synopsis
13473 "Module adding SQLAlchemy support to your Flask application")
13474 (description
13475 "This package adds SQLAlchemy support to your Flask application.")
13476 (license license:bsd-3)))
329b4b3b
LF
13477
13478(define-public python-pyev
13479 (package
13480 (name "python-pyev")
13481 (version "0.9.0")
13482 (source
13483 (origin
13484 (method url-fetch)
13485 (uri (pypi-uri "pyev" version))
13486 (sha256
13487 (base32
13488 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13489 (build-system python-build-system)
13490 (arguments
13491 `(#:tests? #f ; no test suite
13492 #:phases
13493 (modify-phases %standard-phases
13494 (add-after 'unpack 'patch
13495 (lambda* (#:key inputs #:allow-other-keys)
13496 (let ((libev (string-append (assoc-ref inputs "libev")
13497 "/lib/libev.so.4")))
13498 (substitute* "setup.py"
13499 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13500 (string-append "libev_dll_name = \"" libev "\"")))))))))
13501 (inputs
13502 `(("libev" ,libev)))
13503 (home-page "http://pythonhosted.org/pyev/")
13504 (synopsis "Python libev interface")
13505 (description "Pyev provides a Python interface to libev.")
13506 (license license:gpl3)))
13507
13508(define-public python2-pyev
13509 (package-with-python2 python-pyev))
45b4f127
DM
13510
13511(define-public python-imagesize
13512 (package
13513 (name "python-imagesize")
13514 (version "0.7.1")
13515 (source
13516 (origin
13517 (method url-fetch)
13518 (uri (pypi-uri "imagesize" version))
13519 (sha256
13520 (base32
13521 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
13522 (build-system python-build-system)
9422c98a
LF
13523 (arguments
13524 '(;; Test files are not distributed on PyPi:
13525 ;; https://github.com/shibukawa/imagesize_py/issues/7
13526 #:tests? #f))
45b4f127
DM
13527 (home-page "https://github.com/shibukawa/imagesize_py")
13528 (synopsis "Gets image size of files in variaous formats in Python")
13529 (description
13530 "This package allows determination of image size from
13531PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 13532 (license license:expat)))
45b4f127
DM
13533
13534(define-public python2-imagesize
f210e944 13535 (package-with-python2 python-imagesize))
2f6dd9cd
AI
13536
13537(define-public python-axolotl-curve25519
13538 (package
13539 (name "python-axolotl-curve25519")
13540 (version "0.1")
13541 (source
13542 (origin
13543 (method git-fetch)
13544 (uri (git-reference
5f13bf09 13545 (url "https://github.com/tgalal/python-axolotl-curve25519")
2f6dd9cd
AI
13546 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13547 (file-name (string-append name "-" version "-checkout"))
13548 (sha256
13549 (base32
13550 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13551 (build-system python-build-system)
13552 (arguments
13553 `(;; Prevent creation of the egg. This works around
13554 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13555 #:configure-flags '("--root=/")))
2f6dd9cd
AI
13556 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13557 (synopsis "Python wrapper for curve25519 library")
13558 (description "This is a python wrapper for the curve25519 library
13559with ed25519 signatures. The C code was pulled from
13560libaxolotl-android. At the moment this wrapper is meant for use by
13561python-axolotl.")
13562 (license (list license:gpl3 ; Most files
683cdbf5 13563 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
13564
13565(define-public python2-axolotl-curve25519
13566 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
13567
13568(define-public python-axolotl
13569 (package
13570 (name "python-axolotl")
13571 (version "0.1.35")
13572 (source
13573 (origin
13574 (method url-fetch)
13575 (uri (string-append
13576 "https://github.com/tgalal/python-axolotl/archive/"
13577 version ".tar.gz"))
13578 (file-name (string-append name "-" version ".tar.gz"))
13579 (sha256
13580 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13581 (build-system python-build-system)
13582 (arguments
13583 `(#:phases
13584 (modify-phases %standard-phases
13585 ;; Don't install tests
13586 (add-before 'install 'remove-tests
13587 (lambda _
13588 (for-each delete-file-recursively
13589 '("axolotl/tests" "build/lib/axolotl/tests"))
01fb9f66 13590 #t)))))
06ff0837
AI
13591 (propagated-inputs
13592 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13593 ("python-dateutil" ,python-dateutil)
13594 ("python-protobuf" ,python-protobuf)
13595 ("python-pycrypto" ,python-pycrypto)))
13596 (home-page "https://github.com/tgalal/python-axolotl")
13597 (synopsis "Python port of libaxolotl-android")
13598 (description "This is a python port of libaxolotl-android. This
13599is a ratcheting forward secrecy protocol that works in synchronous and
13600asynchronous messaging environments.")
13601 (license license:gpl3)))
13602
13603(define-public python2-axolotl
13604 (package-with-python2 python-axolotl))
e2fca490
DM
13605
13606(define-public python-termstyle
13607 (package
13608 (name "python-termstyle")
13609 (version "0.1.11")
13610 (source
13611 (origin
13612 (method url-fetch)
13613 (uri (pypi-uri "termstyle" version))
13614 (sha256
13615 (base32
13616 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13617 (build-system python-build-system)
7917a135
MB
13618 (arguments
13619 '(#:phases
13620 (modify-phases %standard-phases
13621 (replace 'check
13622 (lambda _
13623 (zero? (system* "python" "test3.py")))))))
7bf837fd 13624 (home-page "https://github.com/gfxmonk/termstyle")
e2fca490
DM
13625 (synopsis "Console text coloring for Python")
13626 (description "This package provides console text coloring for Python.")
13627 (license license:bsd-3)))
1e6112d8
DM
13628
13629(define-public python-rednose
13630 (package
13631 (name "python-rednose")
13632 (version "1.2.1")
13633 (source
13634 (origin
13635 (method url-fetch)
13636 (uri (pypi-uri "rednose" version))
13637 (sha256
13638 (base32
13639 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13640 (build-system python-build-system)
13641 (arguments
13642 `(#:phases
13643 (modify-phases %standard-phases
13644 (add-after 'unpack 'fix-deps
13645 (lambda _
13646 ;; See <https://github.com/JBKahn/rednose/issues/12>
13647 (substitute* "setup.py"
13648 (("python-termstyle") "termstyle"))
13649 #t)))))
13650 (propagated-inputs
13651 `(("python-colorama" ,python-colorama)
13652 ("python-termstyle" ,python-termstyle)))
13653 (native-inputs
13654 `(("python-six" ,python-six)
13655 ("python-nose" ,python-nose)))
13656 (home-page "https://github.com/JBKahn/rednose")
13657 (synopsis "Colored output for Python nosetests")
13658 (description "This package provides colored output for the
13659@command{nosetests} command of the Python Nose unit test framework.")
13660 (license license:bsd-3)))
0a7f17f0 13661
ef74a425
MFM
13662(define-public python2-rednose
13663 (package-with-python2 python-rednose))
13664
0a7f17f0
DM
13665(define-public python-flask-restplus
13666 (package
13667 (name "python-flask-restplus")
13668 (version "0.9.2")
13669 (source
13670 (origin
13671 (method url-fetch)
13672 (uri (pypi-uri "flask-restplus" version))
13673 (sha256
13674 (base32
13675 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13676 (build-system python-build-system)
59f74825
MB
13677 (arguments
13678 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13679 ;; #:phases
13680 ;; (modify-phases %standard-phases
13681 ;; (replace 'check
13682 ;; (lambda _
13683 ;; (zero? (system* "nosetests")))))))
0a7f17f0
DM
13684 (propagated-inputs
13685 `(("python-aniso8601" ,python-aniso8601)
13686 ("python-flask" ,python-flask)
13687 ("python-jsonschema" ,python-jsonschema)
13688 ("python-pytz" ,python-pytz)
13689 ("python-six" ,python-six)))
13690 (native-inputs
13691 `(("python-tzlocal" ,python-tzlocal)
13692 ("python-blinker" ,python-blinker)
13693 ("python-nose" ,python-nose)
13694 ("python-rednose" ,python-rednose)))
13695 (home-page "https://github.com/noirbizarre/flask-restplus")
13696 (synopsis "Framework for documented API development with Flask")
13697 (description "This package provides a framework for API development with
13698the Flask web framework in Python. It is similar to package
13699@code{python-flask-restful} but supports the @code{python-swagger}
13700documentation builder.")
13701 (license license:expat)))
1ed21519
DM
13702
13703(define-public python-sadisplay
13704 (package
13705 (name "python-sadisplay")
13706 (version "0.4.6")
13707 (source
13708 (origin
13709 (method url-fetch)
13710 (uri (pypi-uri "sadisplay" version))
13711 (sha256
13712 (base32
13713 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13714 (build-system python-build-system)
13715 (propagated-inputs
13716 `(("python-sqlalchemy" ,python-sqlalchemy)))
13717 (native-inputs
13718 `(("python-nose" ,python-nose)))
13719 (home-page "https://bitbucket.org/estin/sadisplay")
13720 (synopsis "SQLAlchemy schema displayer")
13721 (description "This package provides a program to build Entity
13722Relationship diagrams from a SQLAlchemy model (or directly from the
13723database).")
13724 (license license:bsd-3)))
13725
13726(define-public python2-sadisplay
13727 (package-with-python2 python-sadisplay))
444a79b6
DM
13728
13729(define-public python-flask-restful-swagger
13730 (package
13731 (name "python-flask-restful-swagger")
13732 (version "0.19")
13733 (source
13734 (origin
13735 (method url-fetch)
13736 (uri (pypi-uri "flask-restful-swagger" version))
13737 (sha256
13738 (base32
13739 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13740 (build-system python-build-system)
13741 (propagated-inputs
13742 `(("python-flask-restful" ,python-flask-restful)))
13743 (home-page "https://github.com/rantav/flask-restful-swagger")
13744 (synopsis "Extract Swagger specs from Flask-Restful projects")
13745 (description "This package lets you extract Swagger API documentation
13746specs from your Flask-Restful projects.")
13747 (license license:expat)))
13748
13749(define-public python2-flask-restful-swagger
13750 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
13751
13752(define-public python-argcomplete
13753 (package
13754 (name "python-argcomplete")
13755 (version "1.7.0")
13756 (source
13757 (origin
13758 (method url-fetch)
13759 (uri (pypi-uri "argcomplete" version))
13760 (sha256
13761 (base32
13762 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13763 (build-system python-build-system)
80ce42bd
MB
13764 (native-inputs
13765 `(("python-pexpect" ,python-pexpect)
240d3cef
LC
13766 ("tcsh" ,tcsh)
13767 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
6c2e82bc
TGR
13768 (home-page "https://github.com/kislyuk/argcomplete")
13769 (synopsis "Shell tab completion for Python argparse")
13770 (description "argcomplete provides extensible command line tab completion
13771of arguments and options for Python scripts using @code{argparse}. It's
13772particularly useful for programs with many options or sub-parsers that can
13773dynamically suggest completions; for example, when browsing resources over the
13774network.")
13775 (license license:asl2.0)))
13776
13777(define-public python2-argcomplete
13778 (package-with-python2 python-argcomplete))
361a2fcf
TGR
13779
13780(define-public python-xopen
13781 (package
13782 (name "python-xopen")
13783 (version "0.1.1")
13784 (source
13785 (origin
13786 (method url-fetch)
13787 (uri (pypi-uri "xopen" version))
13788 (sha256
13789 (base32
13790 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13791 (file-name (string-append name "-" version ".tar.gz"))))
13792 (build-system python-build-system)
13793 (home-page "https://github.com/marcelm/xopen/")
13794 (synopsis "Open compressed files transparently")
13795 (description "This module provides an @code{xopen} function that works like
13796Python's built-in @code{open} function, but can also deal with compressed files.
13797Supported compression formats are gzip, bzip2 and, xz, and are automatically
13798recognized by their file extensions. The focus is on being as efficient as
13799possible on all supported Python versions.")
13800 (license license:expat)))
13801
13802(define-public python2-xopen
13803 (package-with-python2 python-xopen))
8d67610b
DM
13804
13805(define-public python2-cheetah
13806 (package
13807 (name "python2-cheetah")
13808 (version "2.4.4")
13809 (source
13810 (origin
13811 (method url-fetch)
13812 (uri (pypi-uri "Cheetah" version))
13813 (sha256
13814 (base32
13815 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13816 (build-system python-build-system)
13817 (arguments
13818 `(#:python ,python-2))
13819 (propagated-inputs
13820 `(("python2-markdown" ,python2-markdown)))
13821 (home-page "https://pythonhosted.org/Cheetah/")
13822 (synopsis "Template engine")
13823 (description "Cheetah is a text-based template engine and Python code
13824generator.
13825
13826Cheetah can be used as a standalone templating utility or referenced as
13827a library from other Python applications. It has many potential uses,
13828but web developers looking for a viable alternative to ASP, JSP, PHP and
13829PSP are expected to be its principle user group.
13830
13831Features:
13832@enumerate
13833@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13834 text-based format.
13835@item Cleanly separates content, graphic design, and program code.
13836@item Blends the power and flexibility of Python with a simple template language
13837 that non-programmers can understand.
13838@item Gives template writers full access to any Python data structure, module,
13839 function, object, or method in their templates.
13840@item Makes code reuse easy by providing an object-orientated interface to
13841 templates that is accessible from Python code or other Cheetah templates.
13842 One template can subclass another and selectively reimplement sections of it.
13843@item Provides a simple, yet powerful, caching mechanism that can dramatically
13844 improve the performance of a dynamic website.
13845@item Compiles templates into optimized, yet readable, Python code.
13846@end enumerate")
13847 (license (license:x11-style "file://LICENSE"))))
916aafa4 13848
d83d8722
DM
13849(define-public python-dulwich
13850 (package
13851 (name "python-dulwich")
13852 (version "0.16.3")
13853 (source
13854 (origin
13855 (method url-fetch)
13856 (uri (list (string-append "https://www.dulwich.io/releases/"
13857 "dulwich-" version ".tar.gz")
13858 (pypi-uri "dulwich" version)))
13859 (sha256
13860 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13861 (build-system python-build-system)
13862 (arguments
13863 `(#:phases
13864 (modify-phases %standard-phases
13865 (add-before 'check 'fix-tests
13866 (lambda* (#:key inputs #:allow-other-keys)
13867 ;; The tests use Popen with a custom environment which doesn't
13868 ;; include PATH.
13869 (substitute* "dulwich/tests/compat/utils.py"
13870 (("'git'") (string-append "'"
13871 (which "git")
13872 "'")))
13873 (substitute* '("dulwich/tests/test_repository.py"
13874 "dulwich/tests/test_hooks.py")
13875 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13876 (setenv "TEST_RUNNER" "unittest")
13877 (setenv "PYTHONHASHSEED" "random")
13878 #t)))))
13879 (propagated-inputs
13880 `(("python-fastimport" ,python-fastimport)))
13881 (native-inputs
13882 `(("python-mock" ,python-mock)
13883 ("python-geventhttpclient" ,python-geventhttpclient)
13884 ("git" ,git)))
13885 (home-page "https://www.dulwich.io/")
13886 (synopsis "Git implementation in Python")
13887 (description "Dulwich is an implementation of the Git file formats and
13888protocols written in pure Python.")
13889 ;; Can be used with either license.
13890 (license (list license:asl2.0 license:gpl2+))))
13891
13892(define-public python2-dulwich
13893 (package-with-python2 python-dulwich))
424b1ae7 13894
916aafa4
CZ
13895(define-public python-pbkdf2
13896 (package
13897 (name "python-pbkdf2")
13898 (version "1.3")
13899 (source
13900 (origin
13901 (method url-fetch)
13902 (uri (pypi-uri "pbkdf2" version))
13903 (sha256
13904 (base32
13905 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13906 (build-system python-build-system)
fffcd8b8
MB
13907 (arguments
13908 '(#:phases
13909 (modify-phases %standard-phases
13910 (replace 'check
13911 (lambda _
13912 (setenv "PYTHONPATH"
13913 (string-append (getcwd) "/build/lib:"
13914 (getenv "PYTHONPATH")))
13915 (zero? (system* "python" "test/test_pbkdf2.py")))))))
916aafa4
CZ
13916 (propagated-inputs
13917 `(("python-pycrypto" ,python-pycrypto))) ; optional
13918 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13919 (synopsis "Password-based key derivation")
13920 (description "This module implements the password-based key derivation
13921function, PBKDF2, specified in RSA PKCS#5 v2.0.
13922
13923PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13924is part of the RSA Public Key Cryptography Standards series. The provided
13925implementation takes a password or a passphrase and a salt value (and
13926optionally a iteration count, a digest module, and a MAC module) and provides
13927a file-like object from which an arbitrarly-sized key can be read.")
13928 (license license:expat)))
13929
13930(define-public python2-pbkdf2
13931 (package-with-python2 python-pbkdf2))
cba84a38
CZ
13932
13933(define-public python-qrcode
13934 (package
13935 (name "python-qrcode")
13936 (version "5.3")
13937 (source
13938 (origin
13939 (method url-fetch)
13940 (uri (pypi-uri "qrcode" version))
13941 (sha256
13942 (base32
13943 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13944 (build-system python-build-system)
6925cd78
MB
13945 (arguments
13946 ;; FIXME: Tests require packaging 'pymaging'.
13947 '(#:tests? #f))
cba84a38
CZ
13948 (propagated-inputs
13949 `(("python-lxml" ,python-lxml) ; for SVG output
13950 ("python-pillow" ,python-pillow) ; for PNG output
13951 ("python-six" ,python-six)))
13952 (home-page "https://github.com/lincolnloop/python-qrcode")
13953 (synopsis "QR Code image generator")
13954 (description "This package provides a pure Python QR Code generator
13955module. It uses the Python Imaging Library (PIL) to allow for the generation
13956of QR Codes.
13957
13958In addition this package provides a command line tool to generate QR codes and
13959either write these QR codes to a file or do the output as ascii art at the
13960console.")
13961 (license license:bsd-3)))
13962
13963(define-public python2-qrcode
13964 (package-with-python2 python-qrcode))
af7caada
CZ
13965
13966;; SlowAES isn't compatible with Python 3.
13967(define-public python2-slowaes
13968 (package
13969 (name "python2-slowaes")
13970 (version "0.1a1")
13971 (source
13972 (origin
13973 (method url-fetch)
13974 (uri (pypi-uri "slowaes" version))
13975 (sha256
13976 (base32
13977 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13978 (build-system python-build-system)
13979 (arguments `(#:python ,python-2))
13980 (home-page "http://code.google.com/p/slowaes/")
13981 (synopsis "Implementation of AES in Python")
13982 (description "This package contains an implementation of AES in Python.
13983This implementation is slow (hence the project name) but still useful when
13984faster ones are not available.")
13985 (license license:asl2.0)))
1a917fc9
MFM
13986
13987(define-public python-rst2ansi
13988 (package
13989 (name "python-rst2ansi")
13990 (version "0.1.5")
13991 (source
13992 (origin
13993 (method url-fetch)
13994 (uri (pypi-uri "rst2ansi" version))
13995 (sha256
13996 (base32
13997 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13998 (build-system python-build-system)
13999 (propagated-inputs
14000 `(("python-docutils" ,python-docutils)))
14001 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14002 (synopsis "Convert RST to ANSI-decorated console output")
14003 (description
14004 "Python module dedicated to rendering RST (reStructuredText) documents
14005to ansi-escaped strings suitable for display in a terminal.")
14006 (license license:expat)))
2f4623db 14007
ca0e62bf
SR
14008(define-public python-ansi2html
14009 (package
14010 (name "python-ansi2html")
14011 (version "1.2.0")
14012 (source
14013 (origin
14014 (method url-fetch)
14015 (uri (pypi-uri "ansi2html" version))
14016 (sha256
14017 (base32
14018 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14019 (build-system python-build-system)
14020 (native-inputs
14021 `(("python-mock" ,python-mock)
14022 ("python-nose" ,python-nose)))
14023 (propagated-inputs
14024 `(("python-six" ,python-six)))
14025 (home-page "http://github.com/ralphbean/ansi2html")
14026 (synopsis "Convert ANSI-decorated console output to HTML")
14027 (description
14028 "@command{ansi2html} is a Python library and command line utility for
14029convering text with ANSI color codes to HTML or LaTeX.")
14030 (license license:gpl3+)))
14031
14032(define-public python2-ansi2html
14033 (package-with-python2 python-ansi2html))
14034
2f4623db
MFM
14035(define-public python-ddt
14036 (package
14037 (name "python-ddt")
14038 (version "1.1.1")
14039 (source
14040 (origin
14041 (method url-fetch)
14042 (uri (pypi-uri "ddt" version))
14043 (sha256
14044 (base32
14045 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
14046 (build-system python-build-system)
14047 (native-inputs
14048 `(("python-mock" ,python-mock)
14049 ("python-nose" ,python-nose)))
14050 (propagated-inputs
14051 `(("python-six" ,python-six)
14052 ("python-pyyaml" ,python-pyyaml)))
14053 (home-page "https://github.com/txels/ddt")
14054 (synopsis "Data-Driven Tests")
14055 (description
14056 "DDT (Data-Driven Tests) allows you to multiply one test case by running
14057it with different test data, and make it appear as multiple test cases.")
14058 (license license:expat)))
14059
14060(define-public python2-ddt
14061 (package-with-python2 python-ddt))
2299b137
MFM
14062
14063(define-public python-pycosat
14064 (package
14065 (name "python-pycosat")
14066 (version "0.6.1")
14067 (source
14068 (origin
14069 (method url-fetch)
14070 (uri (pypi-uri "pycosat" version))
14071 (sha256
14072 (base32
14073 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
14074 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14075 (build-system python-build-system)
14076 (home-page "https://github.com/ContinuumIO/pycosat")
14077 (synopsis "Bindings to picosat (a SAT solver)")
14078 (description
14079 "This package provides efficient Python bindings to @code{picosat} on
14080the C level. When importing pycosat, the @code{picosat} solver becomes part
14081of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14082Problem} (SAT) solver.")
14083 (license license:expat)))
14084
14085(define-public python2-pycosat
14086 (package-with-python2 python-pycosat))
8fd68504
MFM
14087
14088(define-public python2-ruamel.ordereddict
14089 (package
14090 (name "python2-ruamel.ordereddict")
14091 (version "0.4.9")
14092 (source
14093 (origin
14094 (method url-fetch)
14095 (uri (pypi-uri "ruamel.ordereddict" version))
14096 (sha256
14097 (base32
14098 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14099 (build-system python-build-system)
14100 (arguments
14101 `(#:python ,python-2
14102 #:phases
14103 (modify-phases %standard-phases
14104 (delete 'check)
14105 (add-after 'install 'check
14106 (lambda* (#:key inputs outputs #:allow-other-keys)
14107 (add-installed-pythonpath inputs outputs)
14108 (zero? (system* "python" "test/testordereddict.py")))))))
14109 (home-page "https://bitbucket.org/ruamel/ordereddict")
14110 (synopsis "Version of dict that keeps keys in insertion order")
14111 (description
14112 "This is an implementation of an ordered dictionary with @dfn{Key
14113Insertion Order} (KIO: updates of values do not affect the position of the
14114key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14115removed and put at the back). The standard library module @code{OrderedDict},
14116implemented later, implements a subset of @code{ordereddict} functionality.
14117Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14118Order} (KSO, no sorting function can be specified, but a transform can be
14119specified to apply on the key before comparison (e.g. @code{string.lower})).")
14120 (license license:expat)))
d8768e31
EB
14121
14122(define-public python-pypeg2
14123 (package
14124 (name "python-pypeg2")
14125 (version "2.15.2")
14126 (source
14127 (origin
14128 (method url-fetch)
14129 (uri (pypi-uri "pyPEG2" version))
14130 (sha256
14131 (base32
14132 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14133 (build-system python-build-system)
14134 (propagated-inputs `(("python-lxml" ,python-lxml)))
14135 (arguments
14136 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14137 '(#:tests? #f))
14138 (home-page "https://fdik.org/pyPEG/")
14139 (synopsis "Parsering Expression Grammars in Python")
14140 (description "PyPEG is an intrinsic parser interpreter framework for
14141Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
14142parse many formal languages.")
14143 (license license:gpl2)))
33e9490c
AI
14144
14145(define-public python2-cliapp
14146 (package
14147 (name "python2-cliapp")
f6c58215 14148 (version "1.20170823")
33e9490c
AI
14149 (source
14150 (origin
14151 (method url-fetch)
14152 (uri (string-append
14153 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
14154 version ".tar.gz"))
14155 (sha256
14156 (base32
f6c58215 14157 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
33e9490c
AI
14158 (build-system python-build-system)
14159 (arguments
689042e5
AI
14160 `(#:python ,python-2
14161 #:phases
14162 (modify-phases %standard-phases
14163 ;; check phase needs to be run before the build phase. If not,
14164 ;; coverage-test-runner looks for tests for the built source files,
14165 ;; and fails.
14166 (delete 'check)
14167 (add-before 'build 'check
14168 (lambda _
14169 ;; Disable python3 tests
14170 (substitute* "check"
14171 (("python3") "# python3"))
14172 (zero? (system* "./check")))))))
14173 (native-inputs
14174 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14175 ("python2-pep8" ,python2-pep8)))
33e9490c
AI
14176 (propagated-inputs
14177 `(("python2-pyaml" ,python2-pyaml)))
14178 (home-page "https://liw.fi/cliapp/")
14179 (synopsis "Python framework for command line programs")
14180 (description "@code{python2-cliapp} is a python framework for
14181command line programs. It contains the typical stuff such programs
14182need to do, such as parsing the command line for options, and
14183iterating over input files.")
14184 (license license:gpl2+)))
14185
77e99411
AI
14186(define-public python2-ttystatus
14187 (package
14188 (name "python2-ttystatus")
2d6da794 14189 (version "0.35")
77e99411
AI
14190 (source
14191 (origin
14192 (method url-fetch)
14193 (uri (string-append
14194 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
14195 version ".tar.gz"))
14196 (sha256
14197 (base32
2d6da794 14198 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
77e99411 14199 (build-system python-build-system)
f6180862
AI
14200 (native-inputs
14201 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14202 ("python2-pep8" ,python2-pep8)))
77e99411 14203 (arguments
f6180862
AI
14204 `(#:python ,python-2
14205 #:phases
14206 (modify-phases %standard-phases
14207 ;; check phase needs to be run before the build phase. If not,
14208 ;; coverage-test-runner looks for tests for the built source files,
14209 ;; and fails.
14210 (delete 'check)
14211 (add-before 'build 'check
14212 (lambda _
14213 (zero? (system* "make" "check")))))))
77e99411
AI
14214 (home-page "https://liw.fi/ttystatus/")
14215 (synopsis "Python library for showing progress reporting and
14216status updates on terminals")
14217 (description "@code{python2-ttystatus} is a python library for
14218showing progress reporting and status updates on terminals, for
14219command line programs. Output is automatically adapted to the width
14220of the terminal: truncated if it does not fit, and resized if the
14221terminal size changes.")
14222 (license license:gpl3+)))
c220f0b4
AI
14223
14224(define-public python2-tracing
14225 (package
14226 (name "python2-tracing")
14227 (version "0.10")
14228 (source
14229 (origin
14230 (method url-fetch)
14231 (uri (string-append
14232 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
14233 version ".tar.gz"))
14234 (sha256
14235 (base32
14236 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
14237 (build-system python-build-system)
14238 (arguments
14239 `(#:python ,python-2))
14240 (home-page "https://liw.fi/tracing/")
14241 (synopsis "Python debug logging helper")
14242 (description "@code{python2-tracing} is a python library for
14243logging debug messages. It provides a way to turn debugging messages
14244on and off, based on the filename they occur in. It is much faster
14245than using @code{logging.Filter} to accomplish the same thing, which
14246matters when code is run in production mode. The actual logging still
14247happens using the @code{logging} library.")
14248 (license license:gpl3+)))
b6b2ca5d
AI
14249
14250(define-public python2-larch
14251 (package
14252 (name "python2-larch")
14253 (version "1.20151025")
14254 (source
14255 (origin
14256 (method url-fetch)
14257 (uri (string-append
14258 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
14259 version ".tar.gz"))
a0596a2f
AI
14260 (patches (search-patches
14261 "python2-larch-coverage-4.0a6-compatibility.patch"))
b6b2ca5d
AI
14262 (sha256
14263 (base32
14264 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
14265 (build-system python-build-system)
14266 (arguments
a0596a2f
AI
14267 `(#:python ,python-2
14268 #:phases
14269 (modify-phases %standard-phases
14270 ;; check phase needs to be run before the build phase. If not,
14271 ;; coverage-test-runner looks for tests for the built source files,
14272 ;; and fails.
14273 (delete 'check)
14274 (add-before 'build 'check
14275 (lambda _
14276 (zero? (system* "make" "check")))))))
14277 (native-inputs
14278 `(("cmdtest" ,cmdtest)
14279 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
b6b2ca5d
AI
14280 (propagated-inputs
14281 `(("python2-tracing" ,python2-tracing)))
14282 (home-page "https://liw.fi/larch/")
14283 (synopsis "Python copy-on-write B-tree library")
14284 (description "@code{python2-larch} is an implementation of
14285particular kind of B-tree, based on research by Ohad Rodeh. See
14286@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
14287on the data structure.
14288
14289The distinctive feature of this B-tree is that a node is never
14290(conceptually) modified. Instead, all updates are done by
14291copy-on-write. This makes it easy to clone a tree, and modify only the
14292clone, while other processes access the original tree.")
14293 (license license:gpl3+)))
35db2d3c
AP
14294
14295(define-public python-htmlmin
14296 (package
14297 (name "python-htmlmin")
14298 (version "0.1.10")
14299 (source
14300 (origin
14301 (method url-fetch)
14302 (uri (pypi-uri "htmlmin" version))
14303 (sha256
14304 (base32
14305 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
14306 (arguments
14307 `(#:tests? #f)) ;htmlmin has no tests
14308 (build-system python-build-system)
14309 (home-page "https://htmlmin.readthedocs.org/en/latest/")
14310 (synopsis "HTML minifier")
14311 (description "@code{htmlmin} is an HTML minifier that just works.
14312It comes with safe defaults and easily configurable options.")
14313 (license license:bsd-3)))
14314
14315(define-public python2-htmlmin
14316 (package-with-python2 python-htmlmin))
78c55663
AP
14317
14318(define-public python-flask-htmlmin
14319 (package
14320 (name "python-flask-htmlmin")
14321 (version "1.2")
14322 (source
14323 (origin
14324 (method url-fetch)
14325 (uri (pypi-uri "Flask-HTMLmin" version))
14326 (sha256
14327 (base32
14328 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
14329 (propagated-inputs
14330 `(("python-flask" ,python-flask)
14331 ("python-htmlmin" ,python-htmlmin)))
14332 (build-system python-build-system)
14333 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
14334 (synopsis "HTML response minifier for Flask")
14335 (description
14336 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
14337 (license license:bsd-3)))
14338
14339(define-public python2-flask-htmlmin
14340 (package-with-python2 python-flask-htmlmin))
a71c8638
AP
14341
14342(define-public python-flask-login
14343 (package
14344 (name "python-flask-login")
14345 (version "0.4.0")
14346 (source
14347 (origin
14348 (method url-fetch)
14349 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
14350 version ".tar.gz"))
14351 (file-name (string-append name "-" version ".tar.gz"))
14352 (sha256
14353 (base32
14354 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
14355 (arguments
14356 ;; Tests fail PEP8 compliance. See:
14357 ;; https://github.com/maxcountryman/flask-login/issues/340
14358 `(#:tests? #f))
14359 (build-system python-build-system)
14360 (home-page "https://github.com/maxcountryman/flask-login")
14361 (synopsis "User session management for Flask")
14362 (description
14363 "@code{Flask-Login} provides user session management for Flask. It
14364handles the common tasks of logging in, logging out, and remembering your
14365users' sessions over extended periods of time.")
14366 (license license:expat)))
14367
14368(define-public python2-flask-login
14369 (package-with-python2 python-flask-login))
d5ef113c
AI
14370
14371(define-public python-astroid
14372 (package
14373 (name "python-astroid")
de2f56cf 14374 (version "1.5.3")
d5ef113c
AI
14375 (source
14376 (origin
14377 (method url-fetch)
14378 (uri (string-append
14379 "https://github.com/PyCQA/astroid/archive/astroid-"
14380 version ".tar.gz"))
14381 (sha256
14382 (base32
de2f56cf 14383 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
d5ef113c
AI
14384 (build-system python-build-system)
14385 (propagated-inputs
14386 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
14387 ("python-six" ,python-six)
14388 ("python-wrapt" ,python-wrapt)))
14389 (arguments
14390 `(#:phases
14391 (modify-phases %standard-phases
14392 (replace 'check
14393 (lambda _
14394 (zero? (system* "python" "-m" "unittest" "discover"
14395 "-p" "unittest*.py")))))))
14396 (home-page "https://github.com/PyCQA/astroid")
14397 (synopsis "Common base representation of python source code for pylint and
14398other projects")
14399 (description "@code{python-astroid} provides a common base representation
14400of python source code for projects such as pychecker, pyreverse, pylint, etc.
14401
14402It provides a compatible representation which comes from the _ast module. It
14403rebuilds the tree generated by the builtin _ast module by recursively walking
14404down the AST and building an extended ast. The new node classes have
14405additional methods and attributes for different usages. They include some
14406support for static inference and local name scopes. Furthermore, astroid
14407builds partial trees by inspecting living objects.")
de2f56cf
MB
14408 (license license:lgpl2.1+)
14409 (properties `((python2-variant . ,(delay python2-astroid))))))
d5ef113c
AI
14410
14411(define-public python2-astroid
de2f56cf
MB
14412 (let ((base (package-with-python2
14413 (strip-python2-variant python-astroid))))
14414 (package (inherit base)
14415 (propagated-inputs
14416 `(("python2-backports-functools-lru-cache"
14417 ,python2-backports-functools-lru-cache)
14418 ("python2-enum34" ,python2-enum34)
14419 ("python2-singledispatch" ,python2-singledispatch)
14420 ,@(package-propagated-inputs base))))))
6ba0af79
AI
14421
14422(define-public python-isort
14423 (package
14424 (name "python-isort")
14425 (version "4.2.5")
14426 (source
14427 (origin
14428 (method url-fetch)
14429 (uri (string-append
14430 "https://github.com/timothycrosley/isort/archive/"
14431 version ".tar.gz"))
14432 (file-name (string-append name "-" version ".tar.gz"))
14433 (sha256
14434 (base32
14435 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
14436 (build-system python-build-system)
14437 (native-inputs
14438 `(("python-mock" ,python-mock)
14439 ("python-pytest" ,python-pytest)))
14440 (home-page "https://github.com/timothycrosley/isort")
14441 (synopsis "Python utility/library to sort python imports")
14442 (description "@code{python-isort} is a python utility/library to sort
14443imports alphabetically, and automatically separated into sections. It
14444provides a command line utility, a python library and plugins for various
14445editors.")
14446 (license license:expat)))
14447
14448(define-public python2-isort
14449 (package-with-python2 python-isort))
965a083e
AI
14450
14451(define-public python2-backports-functools-lru-cache
14452 (package
14453 (name "python2-backports-functools-lru-cache")
14454 (version "1.3")
14455 (source
14456 (origin
14457 (method url-fetch)
14458 ;; only the pypi tarballs contain the necessary metadata
14459 (uri (pypi-uri "backports.functools_lru_cache" version))
14460 (sha256
14461 (base32
14462 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
14463 (build-system python-build-system)
14464 (native-inputs
14465 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14466 (arguments
14467 `(#:python ,python-2))
14468 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14469 (synopsis "Backport of functools.lru_cache from Python 3.3")
14470 (description "@code{python2-backports-functools-lru-cache} is a backport
14471of @code{functools.lru_cache} from python 3.3.")
14472 (license license:expat)))
23db3fc6
AI
14473
14474(define-public python-configparser
14475 (package
14476 (name "python-configparser")
14477 (version "3.5.0")
14478 (source
14479 (origin
14480 (method url-fetch)
14481 (uri (string-append
14482 "https://bitbucket.org/ambv/configparser/get/"
14483 version ".tar.bz2"))
14484 (file-name (string-append name "-" version ".tar.gz"))
14485 (sha256
14486 (base32
14487 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
14488 (build-system python-build-system)
14489 (home-page "http://docs.python.org/py3k/library/configparser.html")
14490 (synopsis "Backport of configparser from python 3.5")
14491 (description "@code{python-configparser} is a backport of
14492@code{configparser} from Python 3.5 so that it can be used directly
14493in other versions.")
14494 (license license:expat)))
14495
14496(define-public python2-configparser
14497 (package-with-python2 python-configparser))
61550ded
AI
14498
14499(define-public python2-coverage-test-runner
14500 (package
14501 (name "python2-coverage-test-runner")
14502 (version "1.11")
14503 (source
14504 (origin
14505 (method url-fetch)
14506 (uri (string-append
14507 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
14508 "coverage-test-runner/snapshot/coverage-test-runner-"
14509 version ".tar.gz"))
14510 (sha256
14511 (base32
14512 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
14513 (build-system python-build-system)
14514 (arguments
14515 `(#:python ,python-2
14516 #:phases
14517 (modify-phases %standard-phases
14518 (replace 'check
14519 (lambda _
14520 (zero? (system* "./testrun")))))))
14521 (propagated-inputs
14522 `(("python2-coverage" ,python2-coverage)))
14523 (home-page "https://liw.fi/coverage-test-runner/")
14524 (synopsis "Python module for running unit tests")
14525 (description "@code{CoverageTestRunner} is a python module for running
d1e4ad1b 14526unit tests and failing them if the unit test module does not exercise all
61550ded
AI
14527statements in the module it tests.")
14528 (license license:gpl3+)))
315944a3
AI
14529
14530(define-public python-pylint
14531 (package
14532 (name "python-pylint")
a8a964db 14533 (version "1.7.2")
315944a3
AI
14534 (source
14535 (origin
14536 (method url-fetch)
14537 (uri (string-append
14538 "https://github.com/PyCQA/pylint/archive/pylint-"
14539 version ".tar.gz"))
14540 (sha256
14541 (base32
a8a964db 14542 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
315944a3
AI
14543 (build-system python-build-system)
14544 (native-inputs
a8a964db
MB
14545 `(("python-pytest" ,python-pytest)
14546 ("python-pytest-runner" ,python-pytest-runner)
14547 ("python-tox" ,python-tox)))
315944a3
AI
14548 (propagated-inputs
14549 `(("python-astroid" ,python-astroid)
14550 ("python-isort" ,python-isort)
14551 ("python-mccabe" ,python-mccabe)
14552 ("python-six" ,python-six)))
14553 (arguments
14554 `(#:phases
14555 (modify-phases %standard-phases
14556 (replace 'check
14557 (lambda _
14558 ;; Somehow, tests for python2-pylint
14559 ;; fail if run from the build directory
14560 (let ((work "/tmp/work"))
14561 (mkdir-p work)
14562 (setenv "PYTHONPATH"
14563 (string-append (getenv "PYTHONPATH") ":" work))
14564 (copy-recursively "." work)
14565 (with-directory-excursion "/tmp"
14566 (zero? (system* "python" "-m" "unittest" "discover"
14567 "-s" (string-append work "/pylint/test")
14568 "-p" "*test_*.py")))))))))
14569 (home-page "https://github.com/PyCQA/pylint")
14570 (synopsis "Python source code analyzer which looks for coding standard
14571errors")
14572 (description "Pylint is a Python source code analyzer which looks
14573for programming errors, helps enforcing a coding standard and sniffs
14574for some code smells (as defined in Martin Fowler's Refactoring book).
14575
14576Pylint has many rules enabled by default, way too much to silence them
14577all on a minimally sized program. It's highly configurable and handle
14578pragmas to control it from within your code. Additionally, it is
14579possible to write plugins to add your own checks.")
462ae6f6 14580 (properties `((python2-variant . ,(delay python2-pylint))))
315944a3
AI
14581 (license license:gpl2+)))
14582
14583(define-public python2-pylint
462ae6f6
DM
14584 (let ((pylint (package-with-python2
14585 (strip-python2-variant python-pylint))))
315944a3
AI
14586 (package (inherit pylint)
14587 (propagated-inputs
14588 `(("python2-backports-functools-lru-cache"
14589 ,python2-backports-functools-lru-cache)
14590 ("python2-configparser" ,python2-configparser)
14591 ,@(package-propagated-inputs pylint))))))
5d0c3ba8
MFM
14592
14593(define-public python-paramunittest
14594 (package
14595 (name "python-paramunittest")
14596 (version "0.2")
14597 (source
14598 (origin
14599 (method url-fetch)
14600 (uri (pypi-uri "ParamUnittest" version))
14601 (sha256
14602 (base32
14603 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14604 (build-system python-build-system)
14605 (home-page
14606 "https://github.com/rik0/ParamUnittest")
14607 (synopsis
14608 "Simple extension to have parametrized unit tests")
14609 (description
14610 "This package allows to create parametrized unit-tests that work with the standard
14611unittest package. A parametrized test case is automatically converted to multiple test
14612cases. Since they are TestCase subclasses, they work with other test suites that
14613recognize TestCases.")
14614 (license license:bsd-2)))
14615
14616(define-public python2-python-paramunittest
14617 (package-with-python2 python-paramunittest))
eec21d4b
MFM
14618
14619(define-public python-mando
14620 (package
14621 (name "python-mando")
14622 (version "0.5")
14623 (source
14624 (origin
14625 (method url-fetch)
14626 (uri (pypi-uri "mando" version))
14627 (sha256
14628 (base32
14629 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14630 (build-system python-build-system)
14631 (propagated-inputs
14632 `(("python-rst2ansi" ,python-rst2ansi)))
14633 (native-inputs
14634 `(("python-sphinx" ,python-sphinx-1.5.3)
14635 ("python-paramunittest" ,python-paramunittest)))
14636 (home-page "https://mando.readthedocs.org/")
14637 (synopsis
14638 "Wrapper around argparse, allowing creation of complete CLI applications")
14639 (description
14640 "This package is a wrapper around argparse, allowing you to write complete CLI
14641 applications in seconds while maintaining all the flexibility.")
14642 (license license:expat)))
14643
14644(define-public python2-mando
14645 (package-with-python2 python-mando))
b98d4ec0
MFM
14646
14647(define-public python-mando-0.3.1
14648 ;; python-radon (version 1.5.0) has a requirement
14649 ;; for mando<0.4,>=0.3
14650 (package
14651 (inherit python-mando)
14652 (name "python-mando")
14653 (version "0.3.1")
14654 (source
14655 (origin
14656 (method url-fetch)
14657 (uri (string-append "https://github.com/rubik/mando/archive/v"
14658 version
14659 ".tar.gz"))
14660 (sha256
14661 (base32
14662 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
16fe516e
BS
14663
14664(define-public python-fudge
14665 (package
14666 (name "python-fudge")
14667 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14668 ;; package, which is currently the only use of this package.
14669 (version "0.9.6")
14670 (source
14671 (origin
14672 (method url-fetch)
14673 (uri (pypi-uri "fudge" version))
14674 (sha256
14675 (base32
14676 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14677 (build-system python-build-system)
14678 (arguments
14679 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14680 (home-page "https://github.com/fudge-py/fudge")
14681 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14682 (description
14683 "Fudge is a Python module for using fake objects (mocks and stubs) to
14684test real ones.
14685
14686In readable Python code, you declare the methods available on your fake object
14687and how they should be called. Then you inject that into your application and
14688start testing. This declarative approach means you don’t have to record and
14689playback actions and you don’t have to inspect your fakes after running code.
14690If the fake object was used incorrectly then you’ll see an informative
14691exception message with a traceback that points to the culprit.")
14692 (license license:expat)))
14693
14694(define-public python2-fudge
14695 (package-with-python2 python-fudge))
f3f8d159
DM
14696
14697(define-public python-oauth2client
14698 (package
14699 (name "python-oauth2client")
14700 (version "4.0.0")
14701 (source
14702 (origin
14703 (method url-fetch)
14704 (uri (pypi-uri "oauth2client" version))
14705 (sha256
14706 (base32
14707 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14708 (build-system python-build-system)
14709 (arguments
14710 `(#:tests? #f))
14711 (propagated-inputs
14712 `(("python-httplib2" ,python-httplib2)
14713 ("python-pyasn1" ,python-pyasn1)
14714 ("python-pyasn1-modules" ,python-pyasn1-modules)
14715 ("python-rsa" ,python-rsa)
14716 ("python-six" ,python-six)))
14717 (home-page "http://github.com/google/oauth2client/")
14718 (synopsis "OAuth 2.0 client library")
14719 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14720library for Python")
14721 (license license:asl2.0)))
6e7302e9
DM
14722
14723(define-public python-flask-oidc
14724 (package
14725 (name "python-flask-oidc")
14726 (version "1.1.1")
14727 (source
14728 (origin
14729 (method url-fetch)
14730 (uri (pypi-uri "flask-oidc" version))
14731 (sha256
14732 (base32
14733 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14734 (build-system python-build-system)
14735 (propagated-inputs
14736 `(("python-flask" ,python-flask)
14737 ("python-itsdangerous" ,python-itsdangerous)
14738 ("python-oauth2client" ,python-oauth2client)
14739 ("python-six" ,python-six)))
14740 (native-inputs
14741 `(("python-nose" ,python-nose)
14742 ("python-mock" ,python-mock)))
14743 (home-page "https://github.com/puiterwijk/flask-oidc")
14744 (synopsis "OpenID Connect extension for Flask")
14745 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14746for Flask.")
14747 (license license:bsd-2)))
7e16478f
DM
14748
14749(define-public python-mwclient
14750 (package
14751 (name "python-mwclient")
14752 (version "0.8.4")
14753 (source
14754 (origin
14755 (method url-fetch)
14756 ;; The PyPI version wouldn't contain tests.
14757 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14758 "v" version ".tar.gz"))
14759 (sha256
14760 (base32
14761 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14762 (build-system python-build-system)
14763 (propagated-inputs
14764 `(("python-requests" ,python-requests)
14765 ("python-requests-oauthlib"
14766 ,python-requests-oauthlib)
14767 ("python-six" ,python-six)))
14768 (native-inputs
14769 `(("python-mock" ,python-mock)
14770 ("python-pytest" ,python-pytest)
14771 ("python-pytest-pep8" ,python-pytest-pep8)
14772 ("python-pytest-cache" ,python-pytest-cache)
14773 ("python-pytest-cov" ,python-pytest-cov)
14774 ("python-responses" ,python-responses)))
14775 (home-page "https://github.com/btongminh/mwclient")
14776 (synopsis "MediaWiki API client")
14777 (description "This package provides a MediaWiki API client.")
14778 (license license:expat)))
14779
14780(define-public python2-mwclient
14781 (package-with-python2 python-mwclient))
59a97288
JL
14782
14783(define-public python-pytest-warnings
14784 (package
14785 (name "python-pytest-warnings")
14786 (version "0.2.0")
14787 (source
14788 (origin
14789 (method url-fetch)
14790 (uri (pypi-uri "pytest-warnings" version))
14791 (sha256
14792 (base32
14793 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14794 (build-system python-build-system)
14795 (propagated-inputs
14796 `(("pytest" ,python-pytest-3.0)))
14797 (home-page "https://github.com/fschulze/pytest-warnings")
14798 (synopsis "Pytest plugin to list Python warnings in pytest report")
14799 (description
14800 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14801pytest report.")
14802 (license license:expat)))
14803
14804(define-public python2-pytest-warnings
14805 (package-with-python2 python-pytest-warnings))
2d6e56ba 14806
a12b30a0
DM
14807(define-public python-pytest-capturelog
14808 (package
14809 (name "python-pytest-capturelog")
14810 (version "0.7")
14811 (source
14812 (origin
14813 (method url-fetch)
14814 (uri (pypi-uri "pytest-capturelog" version ".tar.gz"))
14815 (sha256
14816 (base32
14817 "038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
14818 (build-system python-build-system)
14819 (propagated-inputs
14820 `(("pytest" ,python-pytest-3.0)))
14821 (home-page "http://bitbucket.org/memedough/pytest-capturelog/overview")
14822 (synopsis "Pytest plugin to catch log messages")
14823 (description
14824 "Python-pytest-catchlog is a pytest plugin to catch log messages.")
14825 (license license:expat)))
14826
14827(define-public python2-pytest-capturelog
14828 (package-with-python2 python-pytest-capturelog))
14829
2d6e56ba
JL
14830(define-public python-pytest-catchlog
14831 (package
14832 (name "python-pytest-catchlog")
14833 (version "1.2.2")
14834 (source
14835 (origin
14836 (method url-fetch)
14837 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14838 (sha256
14839 (base32
14840 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14841 (build-system python-build-system)
14842 (native-inputs
14843 `(("unzip" ,unzip)))
14844 (propagated-inputs
14845 `(("pytest" ,python-pytest-3.0)))
14846 (home-page "https://github.com/eisensheng/pytest-catchlog")
14847 (synopsis "Pytest plugin to catch log messages")
14848 (description
14849 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14850a fork of pytest-capturelog.")
14851 (license license:expat)))
14852
14853(define-public python2-pytest-catchlog
14854 (package-with-python2 python-pytest-catchlog))
75805449
JL
14855
14856(define-public python-utils
14857 (package
14858 (name "python-utils")
14859 (version "2.1.0")
14860 (source (origin
14861 (method url-fetch)
14862 (uri (pypi-uri "python-utils" version))
14863 (sha256
14864 (base32
14865 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14866 (build-system python-build-system)
14867 (native-inputs
14868 `(("pytest-runner" ,python-pytest-runner)
14869 ("pytest" ,python-pytest)
14870 ("six" ,python-six)))
14871 (home-page "https://github.com/WoLpH/python-utils")
14872 (synopsis "Convenient utilities not included with the standard Python install")
14873 (description
14874 "Python Utils is a collection of small Python functions and classes which
14875make common patterns shorter and easier.")
14876 (license license:bsd-2)))
14877
14878(define-public python2-utils
14879 (package-with-python2 python-utils))
709a5a93
JL
14880
14881(define-public python-webassets
14882 (package
14883 (name "python-webassets")
14884 (version "0.12.1")
14885 (source
14886 (origin
14887 (method url-fetch)
14888 (uri (pypi-uri "webassets" version))
14889 (sha256
14890 (base32
14891 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14892 (build-system python-build-system)
14893 (native-inputs
14894 `(("python-jinja2" ,python-jinja2)
14895 ("python-mock" ,python-mock)
14896 ("python-nose" ,python-nose)
14897 ("python-pytest" ,python-pytest)))
14898 (home-page "https://github.com/miracle2k/webassets")
14899 (synopsis "Media asset management")
14900 (description "Merges, minifies and compresses Javascript and CSS files,
14901supporting a variety of different filters, including YUI, jsmin, jspacker or
14902CSS tidy. Also supports URL rewriting in CSS files.")
14903 (license license:bsd-2)))
4c066b72
JL
14904
14905(define-public python-sphinx-me
14906 (package
14907 (name "python-sphinx-me")
14908 (version "0.3")
14909 (source
14910 (origin
14911 (method url-fetch)
14912 (uri (pypi-uri "sphinx-me" version))
14913 (sha256
14914 (base32
14915 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14916 (build-system python-build-system)
14917 (home-page "https://github.com/stephenmcd/sphinx-me")
14918 (synopsis "Create a Sphinx documentation shell")
14919 (description
14920 "Create a Sphinx documentation shell for your project and include the
14921README file as the documentation index. It handles extracting the required
14922meta data such as the project name, author and version from your project for
14923use in your Sphinx docs.")
14924 (license license:bsd-2)))
14925
14926(define-public python2-sphinx-me
14927 (package-with-python2 python-sphinx-me))
03ded2fd
JL
14928
14929(define-public python-cssmin
14930 (package
14931 (name "python-cssmin")
14932 (version "0.2.0")
14933 (source
14934 (origin
14935 (method url-fetch)
14936 (uri (pypi-uri "cssmin" version))
14937 (sha256
14938 (base32
14939 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14940 (build-system python-build-system)
14941 (home-page "https://github.com/zacharyvoase/cssmin")
14942 (synopsis "Python port of the YUI CSS Compressor")
14943 (description "Python port of the YUI CSS Compressor.")
14944 (license (list license:expat license:bsd-3))))
14945
14946(define-public python2-cssmin
14947 (package-with-python2 python-cssmin))
186d4f8d
JL
14948
14949(define-public python-diff-match-patch
14950 (package
14951 (name "python-diff-match-patch")
14952 (version "20121119")
14953 (source
14954 (origin
14955 (method url-fetch)
14956 (uri (pypi-uri "diff-match-patch" version))
14957 (sha256
14958 (base32
14959 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14960 (build-system python-build-system)
14961 (home-page "https://code.google.com/p/google-diff-match-patch")
14962 (synopsis "Synchronize plain text")
14963 (description "Diff Match and Patch libraries offer robust algorithms to
14964perform the operations required for synchronizing plain text.")
14965 (license license:asl2.0)))
14966
14967(define-public python2-diff-match-patch
14968 (package-with-python2 python-diff-match-patch))
d15a4791
JL
14969
14970(define-public python-dirsync
14971 (package
14972 (name "python-dirsync")
14973 (version "2.2.2")
14974 (source
14975 (origin
14976 (method url-fetch)
14977 (uri (pypi-uri "dirsync" version ".zip"))
14978 (sha256
14979 (base32
14980 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14981 (build-system python-build-system)
14982 (native-inputs
14983 `(("unzip" ,unzip)))
14984 (propagated-inputs
14985 `(("six" ,python-six)))
14986 (home-page "https://bitbucket.org/tkhyn/dirsync")
14987 (synopsis "Advanced directory tree synchronisation tool")
14988 (description "Advanced directory tree synchronisation tool.")
14989 (license license:expat)))
14990
14991(define-public python2-dirsync
14992 (package-with-python2 python-dirsync))
1b16f1ec
JL
14993
14994(define-public python-nosexcover
14995 (package
14996 (name "python-nosexcover")
14997 (version "1.0.11")
14998 (source (origin
14999 (method url-fetch)
15000 (uri (pypi-uri "nosexcover" version))
15001 (sha256
15002 (base32
15003 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
15004 (build-system python-build-system)
15005 (propagated-inputs
15006 `(("python-coverage" ,python-coverage)
15007 ("python-nose" ,python-nose)))
15008 (home-page "http://github.com/cmheisel/nose-xcover")
15009 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
15010 (description "Nose-xcover is a companion to the built-in
15011@code{nose.plugins.cover}. This plugin will write out an XML coverage report
15012to a file named coverage.xml.
15013
15014It will honor all the options you pass to the Nose coverage plugin,
15015especially -cover-package.")
15016 (license license:expat)))
15017
15018(define-public python2-nosexcover
15019 (package-with-python2 python-nosexcover))
afdfbb1d
JL
15020
15021(define-public python-elasticsearch
15022 (package
15023 (name "python-elasticsearch")
15024 (version "1.0.0")
15025 (source
15026 (origin
15027 (method url-fetch)
15028 (uri (pypi-uri "elasticsearch" version))
15029 (sha256
15030 (base32
15031 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
15032 (build-system python-build-system)
15033 (native-inputs
15034 `(("python-mock" ,python-mock)
15035 ("python-nosexcover" ,python-nosexcover)
15036 ("python-pyaml" ,python-pyaml)
15037 ("python-requests" ,python-requests)))
15038 (propagated-inputs
15039 `(("urllib3" ,python-urllib3)))
15040 (arguments
15041 ;; tests require the test_elasticsearch module but it is not distributed.
15042 `(#:tests? #f))
15043 (home-page "https://github.com/elastic/elasticsearch-py")
15044 (synopsis "Low-level client for Elasticsearch")
15045 (description "Official low-level client for Elasticsearch. Its goal is to
15046provide common ground for all Elasticsearch-related code in Python; because of
15047this it tries to be opinion-free and very extendable.")
15048 (license license:expat)))
15049
15050(define-public python2-elasticsearch
15051 (package-with-python2 python-elasticsearch))
a17ccbbb
JL
15052
15053(define-public python-levenshtein
15054 (package
15055 (name "python-levenshtein")
15056 (version "0.12.0")
15057 (source
15058 (origin
15059 (method url-fetch)
15060 (uri (pypi-uri "python-Levenshtein" version))
15061 (sha256
15062 (base32
15063 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15064 (build-system python-build-system)
15065 (home-page "https://github.com/ztane/python-Levenshtein")
15066 (synopsis "Fast computation of Levenshtein distance and string similarity")
15067 (description
15068 "The Levenshtein Python C extension module contains functions for fast computation of
15069@enumerate
15070@item Levenshtein (edit) distance, and edit operations
15071@item string similarity
15072@item approximate median strings, and generally string averaging
15073@item string sequence and set similarity
15074@end enumerate
15075It supports both normal and Unicode strings.")
15076 (license license:gpl2+)))
15077
15078(define-public python2-levenshtein
15079 (package-with-python2 python-levenshtein))
38a370d2
JL
15080
15081(define-public python-scandir
15082 (package
15083 (name "python-scandir")
15084 (version "1.4")
15085 (source
15086 (origin
15087 (method url-fetch)
15088 (uri (pypi-uri "scandir" version))
15089 (sha256
15090 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
15091 (build-system python-build-system)
15092 (home-page "https://github.com/benhoyt/scandir")
15093 (synopsis "Directory iteration function")
15094 (description
15095 "Directory iteration function like os.listdir(), except that instead of
15096returning a list of bare filenames, it yields DirEntry objects that include
15097file type and stat information along with the name. Using scandir() increases
15098the speed of os.walk() by 2-20 times (depending on the platform and file
15099system) by avoiding unnecessary calls to os.stat() in most cases.")
15100 (license license:bsd-3)))
15101
15102(define-public python2-scandir
15103 (package-with-python2 python-scandir))
18c25460
JL
15104
15105(define-public python2-stemming
15106 (package
15107 (name "python2-stemming")
15108 (version "1.0.1")
15109 (source
15110 (origin
15111 (method url-fetch)
15112 (uri (pypi-uri "stemming" version))
15113 (sha256
15114 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15115 (build-system python-build-system)
15116 (arguments
15117 `(#:python ,python-2))
15118 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15119 (synopsis "Python implementations of various stemming algorithms")
15120 (description
15121 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15122stemming algorithms for English. These implementations are straightforward and
15123efficient, unlike some Python versions of the same algorithms available on the
15124Web. This package is an extraction of the stemming code included in the Whoosh
15125search engine.")
15126 (license license:public-domain)))
54153b85
JL
15127
15128(define-public python-factory-boy
15129 (package
15130 (name "python-factory-boy")
15131 (version "2.8.1")
15132 (source
15133 (origin
15134 (method url-fetch)
15135 (uri (pypi-uri "factory_boy" version))
15136 (sha256
15137 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15138 (build-system python-build-system)
15139 (arguments
15140 ;; Tests are not included in the tarball.
15141 `(#:tests? #f))
15142 (propagated-inputs
15143 `(("faker" ,python-faker)))
15144 (home-page "https://github.com/benhoyt/scandir")
15145 (synopsis "Versatile test fixtures replacement")
15146 (description
15147 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15148
15149As a fixtures replacement tool, it aims to replace static, hard to maintain
15150fixtures with easy-to-use factories for complex object.
15151
15152Instead of building an exhaustive test setup with every possible combination
15153of corner cases, factory_boy allows you to use objects customized for the
15154current test, while only declaring the test-specific fields")
15155 (license license:expat)))
15156
15157(define-public python2-factory-boy
15158 (package-with-python2 python-factory-boy))
5f25fd69
JL
15159
15160(define-public python-translate-toolkit
15161 (package
15162 (name "python-translate-toolkit")
15163 (version "2.1.0")
15164 (source
15165 (origin
15166 (method url-fetch)
15167 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15168 (sha256
15169 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15170 (build-system python-build-system)
15171 (native-inputs
15172 `(("python-pytest" ,python-pytest)
15173 ("python-sphinx" ,python-sphinx)))
15174 (propagated-inputs
15175 `(("python-babel" ,python-babel)
15176 ("python-beautifulsoup4" ,python-beautifulsoup4)
15177 ("python-chardet" ,python-chardet)
15178 ("python-diff-match-patch" ,python-diff-match-patch)
15179 ("python-levenshtein" ,python-levenshtein)
15180 ("python-lxml" ,python-lxml)
15181 ("python-six" ,python-six)
15182 ("python-vobject" ,python-vobject)
15183 ("python-pyyaml" ,python-pyyaml)))
15184 (arguments
15185 ;; TODO: tests are not run, because they end with
15186 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15187 ;; 'parse_funcs'
15188 ;; during test setup.
15189 `(#:tests? #f))
15190 (home-page "http://toolkit.translatehouse.org")
15191 (synopsis "Tools and API for translation and localization engineering")
15192 (description
15193 "Tools and API for translation and localization engineering. It contains
15194several utilities, as well as an API for building localization tools.")
15195 (license license:gpl2+)))
15196
15197(define-public python2-translate-toolkit
15198 (package-with-python2 python-translate-toolkit))
3b08d1a6
JL
15199
15200(define-public python-mysqlclient
15201 (package
15202 (name "python-mysqlclient")
15203 (version "1.3.10")
15204 (source
15205 (origin
15206 (method url-fetch)
15207 (uri (pypi-uri "mysqlclient" version))
15208 (sha256
15209 (base32
15210 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
15211 (build-system python-build-system)
15212 (native-inputs
15213 `(("mariadb" ,mariadb)
15214 ("nose" ,python-nose)
15215 ("mock" ,python-mock)
15216 ("py.test" ,python-pytest)))
15217 (inputs
15218 `(("mysql" ,mysql)
15219 ("libz" ,zlib)
15220 ("openssl" ,openssl)))
15221 (home-page "https://github.com/PyMySQL/mysqlclient-python")
15222 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
15223 (description "MySQLdb is an interface to the popular MySQL database server
15224for Python. The design goals are:
15225@enumerate
15226@item Compliance with Python database API version 2.0 [PEP-0249],
15227@item Thread-safety,
15228@item Thread-friendliness (threads will not block each other).
15229@end enumerate")
15230 (license license:gpl2)))
15231
15232(define-public python2-mysqlclient
15233 (package-with-python2 python-mysqlclient))
c009e934
JL
15234
15235(define-public python-hiredis
15236 (package
15237 (name "python-hiredis")
15238 (version "0.2.0")
15239 (source
15240 (origin
15241 (method url-fetch)
15242 (uri (pypi-uri "hiredis" version))
15243 (sha256
15244 (base32
15245 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
15246 (build-system python-build-system)
15247 (arguments
15248 ;; no tests
15249 `(#:tests? #f))
15250 (home-page "https://github.com/redis/hiredis-py")
15251 (synopsis "Python extension that wraps protocol parsing code in hiredis")
15252 (description "Python-hiredis is a python extension that wraps protocol
15253parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
15254 (license license:bsd-3)))
15255
15256(define-public python2-hiredis
15257 (package-with-python2 python-hiredis))
91154d4a
JL
15258
15259(define-public python-fakeredis
15260 (package
15261 (name "python-fakeredis")
15262 (version "0.8.2")
15263 (source
15264 (origin
15265 (method url-fetch)
15266 (uri (pypi-uri "fakeredis" version))
15267 (sha256
15268 (base32
15269 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
15270 (build-system python-build-system)
15271 (arguments
15272 ;; no tests
15273 `(#:tests? #f))
15274 (home-page "https://github.com/jamesls/fakeredis")
15275 (synopsis "Fake implementation of redis API for testing purposes")
15276 (description "Fakeredis is a pure python implementation of the redis-py
15277python client that simulates talking to a redis server. This was created for a
15278single purpose: to write unittests. Setting up redis is not hard, but many time
15279 you want to write unittests that do not talk to an external server (such as
15280redis). This module now allows tests to simply use this module as a reasonable
15281substitute for redis.")
15282 (license license:bsd-3)))
15283
15284(define-public python2-fakeredis
15285 (package-with-python2 python-fakeredis))
d1693269
DM
15286
15287(define-public python-behave-web-api
15288 (package
15289 (name "python-behave-web-api")
15290 (version "1.0.6")
15291 (source
15292 (origin
15293 (method url-fetch)
15294 (uri (pypi-uri "behave-web-api" version))
15295 (sha256
15296 (base32
15297 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
15298 (build-system python-build-system)
15299 (arguments
15300 `(#:phases
15301 (modify-phases %standard-phases
15302 (add-after 'unpack 'fix-dependencies
15303 (lambda _
15304 (substitute* "setup.py"
15305 (("'wheel'") "") ; We don't use it.
15306 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
15307 (propagated-inputs
15308 `(("behave" ,behave)
15309 ("python-requests" ,python-requests)))
15310 (home-page "https://github.com/jefersondaniel/behave-web-api")
15311 (synopsis "Provides testing for JSON APIs with Behave for Python")
15312 (description "This package provides testing utility modules for testing
15313JSON APIs with Behave.")
15314 (license license:expat)))
15315
15316(define-public python2-behave-web-api
15317 (package-with-python2 python-behave-web-api))
75baf319
DM
15318
15319(define-public python-flask-script
15320 (package
15321 (name "python-flask-script")
15322 (version "2.0.5")
15323 (source
15324 (origin
15325 (method url-fetch)
15326 (uri (pypi-uri "Flask-Script" version))
15327 (sha256
15328 (base32
15329 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
15330 (build-system python-build-system)
15331 (propagated-inputs
15332 `(("python-flask" ,python-flask)
15333 ("python-argcomplete" ,python-argcomplete)
15334 ("python-werkzeug" ,python-werkzeug)))
15335 (native-inputs
15336 `(("python-pytest" ,python-pytest)))
15337 (home-page
15338 "http://github.com/smurfix/flask-script")
15339 (synopsis "Scripting support for Flask")
15340 (description "The Flask-Script extension provides support for writing
15341external scripts in Flask. This includes running a development server,
15342a customised Python shell, scripts to set up your database, cronjobs,
15343and other command-line tasks that belong outside the web application
15344itself.")
15345 (license license:bsd-3)))
15346
15347(define-public python2-flask-script
15348 (package-with-python2 python-flask-script))
013e1e85
DM
15349
15350(define-public python-flask-migrate
15351 (package
15352 (name "python-flask-migrate")
15353 (version "2.0.3")
15354 (source
15355 (origin
15356 (method url-fetch)
15357 (uri (pypi-uri "Flask-Migrate" version))
15358 (sha256
15359 (base32
15360 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
15361 (build-system python-build-system)
15362 (propagated-inputs
15363 `(("python-flask" ,python-flask)
15364 ("python-alembic" ,python-alembic)
15365 ("python-sqlalchemy" ,python-sqlalchemy)
15366 ("python-flask-script" ,python-flask-script)
15367 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
15368 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
15369 (synopsis "SQLAlchemy database migrations for Flask programs using
15370Alembic")
15371 (description "This package contains SQLAlchemy database migration tools
15372for Flask programs that are using @code{python-alembic}.")
15373 (license license:expat)))
15374
15375(define-public python2-flask-migrate
15376 (package-with-python2 python-flask-migrate))
c0f5b802
LF
15377
15378(define-public python-packaging
15379 (package
15380 (name "python-packaging")
15381 (version "16.8")
15382 (source
15383 (origin
15384 (method url-fetch)
15385 (uri (pypi-uri "packaging" version))
15386 (sha256
15387 (base32
15388 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
15389 (build-system python-build-system)
15390 (native-inputs
15391 `(("python-pretend" ,python-pretend)
15392 ("python-pytest" ,python-pytest)))
15393 (propagated-inputs
15394 `(("python-pyparsing" ,python-pyparsing)
15395 ("python-six" ,python-six)))
15396 (home-page "https://github.com/pypa/packaging")
15397 (synopsis "Core utilities for Python packages")
15398 (description "Packaging is a Python module for dealing with Python packages.
15399It offers an interface for working with package versions, names, and dependency
15400information.")
15401 ;; From 'LICENSE': This software is made available under the terms of
15402 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15403 ;; Contributions to this software is made under the terms of *both* these
15404 ;; licenses.
15405 (license (list license:asl2.0 license:bsd-2))))
15406
15407(define-public python2-packaging
15408 (package-with-python2 python-packaging))
ad2ef260
AP
15409
15410(define-public python-sql
15411 (package
15412 (name "python-sql")
15413 (version "0.9")
15414 (source
15415 (origin
15416 (method url-fetch)
15417 (uri (pypi-uri "python-sql" version))
15418 (sha256
15419 (base32
15420 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
15421 (build-system python-build-system)
15422 (home-page "https://python-sql.tryton.org/")
15423 (synopsis "Library to write SQL queries in a pythonic way")
15424 (description "@code{python-sql} is a library to write SQL queries, that
15425transforms idiomatic python function calls to well-formed SQL queries.")
15426 (license license:bsd-3)))
15427
15428(define-public python2-sql
15429 (package-with-python2 python-sql))
b208f71b
AP
15430
15431(define-public python-genshi
15432 (package
15433 (name "python-genshi")
15434 (version "0.7")
15435 (source
15436 (origin
15437 (method url-fetch)
15438 (uri (string-append
15439 "https://ftp.edgewall.org/pub/genshi/Genshi-"
15440 version ".tar.gz"))
15441 (patches
15442 (search-patches
15443 ;; The first 4 patches are in the master branch upstream.
15444 ;; See this as a reference https://genshi.edgewall.org/ticket/582
15445 ;; The last 2 are NOT in any branch.
15446 ;; They were sent as attachments to a ticket opened at
15447 ;; https://genshi.edgewall.org/ticket/602#no1
15448 "python-genshi-stripping-of-unsafe-script-tags.patch"
15449 "python-genshi-disable-speedups-on-python-3.3.patch"
15450 "python-genshi-isstring-helper.patch"
15451 "python-genshi-add-support-for-python-3.4-AST.patch"
15452 "python-genshi-fix-tests-on-python-3.5.patch"
15453 "python-genshi-buildable-on-python-2.7.patch"))
15454 (sha256
15455 (base32
15456 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
15457 (build-system python-build-system)
15458 (home-page "https://genshi.edgewall.org/")
15459 (synopsis "Toolkit for generation of output for the web")
15460 (description "Genshi is a Python library that provides an integrated set
15461of components for parsing, generating, and processing HTML, XML or other
15462textual content for output generation on the web.")
15463 (license license:bsd-3)))
15464
15465;; The linter here claims that patch file names should start with the package
15466;; name. But, in this case the patches are inherited from python-genshi with
15467;; the "python-genshi-" prefix instead of "python2-genshi-".
15468(define-public python2-genshi
15469 (package-with-python2 python-genshi))
ecca63b6
AP
15470
15471(define-public python-relatorio
15472 (package
15473 (name "python-relatorio")
15474 (version "0.6.4")
15475 (source
15476 (origin
15477 (method url-fetch)
15478 (uri (pypi-uri "relatorio" version))
15479 (sha256
15480 (base32
15481 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
15482 (build-system python-build-system)
15483 (propagated-inputs
15484 `(("python-lxml" ,python-lxml)
15485 ("python-genshi" ,python-genshi)))
15486 (home-page "https://relatorio.tryton.org/")
15487 (synopsis "Templating library able to output ODT and PDF files")
15488 (description "Relatorio is a templating library which provides a way to
15489easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15490for more filetypes can be easily added by creating plugins for them.")
15491 (license license:gpl3+)))
15492
15493(define-public python2-relatorio
15494 (package-with-python2 python-relatorio))
65e7d52a
MFM
15495
15496(define-public python-radon
15497 (package
15498 (name "python-radon")
15499 (version "1.5.0")
15500 (source
15501 (origin
15502 (method url-fetch)
15503 (uri (pypi-uri "radon" version))
15504 (sha256
15505 (base32
15506 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
15507 (build-system python-build-system)
15508 (propagated-inputs
15509 `(("python-colorama" ,python-colorama)
15510 ("python-flake8-polyfill" ,python-flake8-polyfill)
15511 ("python-mando" ,python-mando-0.3.1)))
15512 (native-inputs
15513 `(("python-flake8" ,python-flake8)
15514 ("python-tox" ,python-tox)
15515 ("python-pytest" ,python-pytest)
15516 ("python-paramunittest" ,python-paramunittest)))
15517 (home-page "https://radon.readthedocs.org/")
15518 (synopsis "Code Metrics in Python")
15519 (description "Radon is a Python tool which computes various code metrics.
15520Supported metrics are:
15521@itemize @bullet
15522@item raw metrics: SLOC, comment lines, blank lines, &c.
15523@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15524@item Halstead metrics (all of them)
15525@item the Maintainability Index (a Visual Studio metric)
15526@end itemize")
15527 (license license:expat)))
15528
15529(define-public python2-radon
15530 (package-with-python2 python-radon))
50d586f6
MFM
15531
15532(define-public python-sure
15533 (package
15534 (name "python-sure")
15535 (version "1.4.6")
15536 (source
15537 (origin
15538 (method url-fetch)
15539 (uri (pypi-uri "sure" version))
15540 (sha256
15541 (base32
15542 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
15543 (build-system python-build-system)
15544 (propagated-inputs
15545 `(("python-mock" ,python-mock)
15546 ("python-six" ,python-six)))
15547 (native-inputs
15548 `(("python-nose" ,python-nose)))
15549 (home-page "https://github.com/gabrielfalcao/sure")
15550 (synopsis "Automated testing library in python for python")
15551 (description
15552 "Sure is a python library that leverages a DSL for writing assertions.
15553Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15554 (license license:gpl3+)))
15555
15556(define-public python2-sure
15557 (package-with-python2 python-sure))
a0ffc701
MFM
15558
15559(define-public python2-couleur
15560 ;; This package does not seem to support python3 at all, hence,
15561 ;; only the python2 variant definition is provided.
15562 (package
15563 (name "python2-couleur")
15564 (version "0.6.2")
15565 (source
15566 (origin
15567 (method url-fetch)
15568 (uri (pypi-uri "couleur" version))
15569 (sha256
15570 (base32
15571 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15572 (build-system python-build-system)
15573 (arguments
15574 `(#:python ,python-2))
15575 (home-page "https://github.com/gabrielfalcao/couleur")
15576 (synopsis
15577 "ANSI terminal tool for python, colored shell and other handy fancy features")
15578 (description
15579 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15580terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15581 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15582 ;; https://github.com/gabrielfalcao/couleur/issues/11
15583 (license license:lgpl3+)))
511b47de
MFM
15584
15585(define-public python-misaka
15586 (package
15587 (name "python-misaka")
15588 (version "2.1.0")
15589 (source
15590 (origin
15591 (method url-fetch)
15592 (uri (pypi-uri "misaka" version))
15593 (sha256
15594 (base32
15595 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
15596 (build-system python-build-system)
15597 (arguments
15598 `(;; Line 37 of setup.py calls self.run_command('develop')
15599 ;; in the 'check' phase. This command seems to be trying
15600 ;; to write to
15601 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15602 ;; for which it does not have the permission to write.
15603 #:tests? #f))
15604 (propagated-inputs
15605 `(("python-cffi" ,python-cffi)))
15606 (home-page "https://github.com/FSX/misaka")
15607 (synopsis "Python binding for Hoedown")
15608 (description
15609 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15610library written in C. It features a fast HTML renderer and functionality to make custom
15611renderers (e.g. man pages or LaTeX).")
15612 (license license:expat)))
15613
15614(define-public python2-misaka
15615 (package-with-python2 python-misaka))
5786b47c
MFM
15616
15617(define-public python2-steadymark
15618 ;; This is forced into being a python2 only variant
15619 ;; due to its dependence on couleur that has no support
15620 ;; for python3
15621 (package
15622 (name "python2-steadymark")
15623 (version "0.7.3")
15624 (source
15625 (origin
15626 (method url-fetch)
15627 (uri (pypi-uri "steadymark" version))
15628 (sha256
15629 (base32
15630 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15631 (build-system python-build-system)
15632 (native-inputs
15633 `(("python-couleur" ,python2-couleur)
15634 ("python-sure" ,python2-sure)
15635 ("python-misaka" ,python2-misaka)))
15636 (arguments
15637 `(#:python ,python-2
15638 #:phases
15639 (modify-phases %standard-phases
15640 (add-before 'build 'patch-setup-py
15641 (lambda _
15642 ;; Update requirements from dependency==version
15643 ;; to dependency>=version
15644 (substitute* "setup.py"
15645 (("==") ">="))
15646 #t)))))
15647 (home-page "https://github.com/gabrielfalcao/steadymark")
15648 (synopsis "Markdown-based test runner for python")
15649 (description
15650 "@code{Steadymark} allows documentation to be written in github-flavoured
15651markdown. The documentation may contain snippets of code surrounded by python
15652code blocks and @code{Steadymark} will find these snippets and run them, making
15653sure that there are no old malfunctional examples in the documentation examples.")
15654 (license license:expat)))
7e488f99
MFM
15655
15656(define-public python-nose-randomly
15657 (package
15658 (name "python-nose-randomly")
15659 (version "1.2.5")
15660 (source
15661 (origin
15662 (method url-fetch)
15663 (uri (pypi-uri "nose-randomly" version))
15664 (sha256
15665 (base32
15666 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15667 (build-system python-build-system)
15668 (native-inputs
15669 `(("python-nose" ,python-nose)
15670 ("python-numpy" ,python-numpy)))
15671 (home-page "https://github.com/adamchainz/nose-randomly")
15672 (synopsis
15673 "Nose plugin to randomly order tests and control random.seed")
15674 (description
15675 "This is a @code{Nose} plugin to randomly order tests which can be quite
15676powerful in discovering hidden flaws in the tests themselves, while helping to
15677reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15678by resetting it to a repeatable number for each test, enabling the tests to
15679create data based on random numbers and yet remain repeatable.")
15680 (license license:bsd-3)))
15681
15682(define-public python2-nose-randomly
15683 (package-with-python2 python-nose-randomly))
1e92287d
DM
15684
15685(define-public python-jsonpointer
15686 (package
15687 (name "python-jsonpointer")
15688 (version "1.10")
15689 (source
15690 (origin
15691 (method url-fetch)
15692 (uri (pypi-uri "jsonpointer" version))
15693 (sha256
15694 (base32
15695 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15696 (build-system python-build-system)
15697 (home-page "https://github.com/stefankoegl/python-json-pointer")
15698 (synopsis "Identify specific nodes in a JSON document")
15699 (description "@code{jsonpointer} allows you to access specific nodes
15700by path in a JSON document (see RFC 6901).")
15701 (license license:bsd-3)))
15702
15703(define-public python2-jsonpointer
15704 (package-with-python2 python-jsonpointer))
7d88093f 15705
841e5908
OP
15706(define-public python-jsonpatch
15707 (package
15708 (name "python-jsonpatch")
15709 (version "1.16")
15710 (source
15711 (origin
15712 (method url-fetch)
15713 ;; pypi version lacks tests.js
15714 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15715 "archive/v" version ".tar.gz"))
15716 (file-name (string-append name "-" version ".tar.gz"))
15717 (sha256
15718 (base32
15719 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
15720 (build-system python-build-system)
15721 (native-inputs
15722 `(("python-jsonpointer" ,python-jsonpointer)))
15723 (home-page "https://github.com/stefankoegl/python-json-patch")
15724 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
15725 (description "@code{jsonpatch} is a library and program that allows
15726applying JSON Patches according to RFC 6902.")
15727 (license license:bsd-3)))
15728
15729(define-public python2-jsonpatch
15730 (package-with-python2 python-jsonpatch))
15731
15732(define-public python-jsonpatch-0.4
15733 (package (inherit python-jsonpatch)
15734 (name "python-jsonpatch")
15735 (version "0.4")
15736 (source
15737 (origin
15738 (method url-fetch)
15739 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15740 "archive/v" version ".tar.gz"))
15741 (file-name (string-append name "-" version ".tar.gz"))
15742 (sha256
15743 (base32
15744 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
15745
15746(define-public python2-jsonpatch-0.4
15747 (package-with-python2 python-jsonpatch-0.4))
15748
7d88093f
DM
15749(define-public python-rfc3987
15750 (package
15751 (name "python-rfc3987")
15752 (version "1.3.7")
15753 (source
15754 (origin
15755 (method url-fetch)
15756 (uri (pypi-uri "rfc3987" version))
15757 (sha256
15758 (base32
15759 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15760 (build-system python-build-system)
15761 (home-page "http://pypi.python.org/pypi/rfc3987")
15762 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15763 (description "@code{rfc3987} provides routines for parsing and
15764validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15765 (license license:gpl3+)))
15766
15767(define-public python2-rfc3987
15768 (package-with-python2 python-rfc3987))
0960bf8b
DM
15769
15770(define-public python-validate-email
15771 (package
15772 (name "python-validate-email")
15773 (version "1.3")
15774 (source
15775 (origin
15776 (method url-fetch)
15777 (uri (pypi-uri "validate_email" version))
15778 (sha256
15779 (base32
15780 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15781 (build-system python-build-system)
15782 (home-page "http://github.com/syrusakbary/validate_email")
15783 (synopsis "Verifies if an email address is valid and really exists")
15784 (description "@code{validate_email} can be used to verify if an email
15785address is valid and really exists.")
15786 (license license:lgpl3+)))
15787
15788(define-public python2-validate-email
15789 (package-with-python2 python-validate-email))
620b59ea
DM
15790
15791(define-public python-flex
15792 (package
15793 (name "python-flex")
15794 (version "6.10.0")
15795 (source
15796 (origin
15797 (method url-fetch)
15798 (uri (pypi-uri "flex" version))
15799 (sha256
15800 (base32
15801 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15802 (build-system python-build-system)
15803 (propagated-inputs
15804 `(("python-click" ,python-click)
15805 ("python-iso8601" ,python-iso8601)
15806 ("python-jsonpointer" ,python-jsonpointer)
15807 ("python-pyyaml" ,python-pyyaml)
15808 ("python-requests" ,python-requests)
15809 ("python-rfc3987" ,python-rfc3987)
15810 ("python-six" ,python-six)
15811 ("python-validate-email" ,python-validate-email)))
15812 (home-page "https://github.com/pipermerriam/flex")
15813 (synopsis "Validates Swagger schemata")
15814 (description "@code{flex} can be used to validate Swagger schemata.")
15815 (license license:bsd-3)))
15816
15817(define-public python2-flex
15818 (package-with-python2 python-flex))
235bc01b
DM
15819
15820(define-public python-marshmallow
15821 (package
15822 (name "python-marshmallow")
58f3d459 15823 (version "3.0.0b3")
235bc01b
DM
15824 (source
15825 (origin
15826 (method url-fetch)
15827 (uri (pypi-uri "marshmallow" version))
15828 (sha256
15829 (base32
58f3d459 15830 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
235bc01b
DM
15831 (build-system python-build-system)
15832 (propagated-inputs
15833 `(("python-dateutil" ,python-dateutil)
15834 ("python-simplejson" ,python-simplejson)))
15835 (native-inputs
15836 `(("python-pytest-3.0" ,python-pytest-3.0)
15837 ("python-pytz" ,python-pytz)))
15838 (home-page "https://github.com/marshmallow-code/marshmallow")
15839 (synopsis "Convert complex datatypes to and from native
15840Python datatypes.")
15841 (description "@code{marshmallow} provides a library for converting
15842complex datatypes to and from native Python datatypes.")
15843 (license license:expat)))
15844
15845(define-public python2-marshmallow
15846 (package-with-python2 python-marshmallow))
d270df8d
DM
15847
15848(define-public python-bottle
15849 (package
15850 (name "python-bottle")
15851 (version "0.12.13")
15852 (source
15853 (origin
15854 (method url-fetch)
15855 (uri (pypi-uri "bottle" version))
15856 (sha256
15857 (base32
15858 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
15859 (build-system python-build-system)
15860 (home-page "http://bottlepy.org/")
15861 (synopsis "WSGI framework for small web-applications.")
15862 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
15863 (license license:expat)))
15864
15865(define-public python2-bottle
15866 (package-with-python2 python-bottle))
635b3636
DM
15867
15868(define-public python-apispec
15869 (package
15870 (name "python-apispec")
15871 (version "0.22.0")
15872 (source
15873 (origin
15874 (method url-fetch)
15875 (uri (pypi-uri "apispec" version))
15876 (sha256
15877 (base32
15878 "0y3jxmgp2d24am3hxl40f5rw9abb0r8037sagax3dv64h4n1azwq"))))
15879 (build-system python-build-system)
15880 (propagated-inputs
15881 `(("python-pyyaml" ,python-pyyaml)))
15882 (native-inputs
15883 `(("python-pytest-3.0" ,python-pytest-3.0)
15884 ("python-flask" ,python-flask)
15885 ("python-marshmallow" ,python-marshmallow)
15886 ("python-tornado" ,python-tornado)
15887 ("python-bottle" ,python-bottle)
15888 ("python-mock" ,python-mock)))
15889 (home-page "https://github.com/marshmallow-code/apispec")
15890 (synopsis "Swagger 2.0 API specification generator")
15891 (description "@code{python-apispec} is a pluggable API specification
15892generator. Currently supports the OpenAPI specification (f.k.a.
15893Swagger 2.0).")
15894 (license license:expat)))
15895
15896(define-public python2-apispec
15897 (package-with-python2 python-apispec))
543c5f3f
DM
15898
15899(define-public python-flasgger
15900 (package
15901 (name "python-flasgger")
15902 (version "0.6.3")
15903 (source
15904 (origin
15905 (method url-fetch)
15906 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
15907 version ".tar.gz"))
15908 (file-name (string-append name "-" version ".tar.gz"))
15909 (sha256
15910 (base32
15911 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
15912 (build-system python-build-system)
15913 (arguments
15914 `(#:phases
15915 (modify-phases %standard-phases
15916 (replace 'check
15917 (lambda* (#:key inputs outputs #:allow-other-keys)
15918 (substitute* "Makefile"
15919 (("flake8 flasgger --ignore=F403")
15920 "flake8 flasgger --ignore=E731,F403"))
15921 (setenv "PYTHONPATH" (string-append (getcwd)
15922 ":"
15923 (getenv "PYTHONPATH")))
15924 (zero? (system* "py.test")))))))
15925 (propagated-inputs
15926 `(("python-flask" ,python-flask)
15927 ("python-pyyaml" ,python-pyyaml)
15928 ("python-jsonschema" ,python-jsonschema)
15929 ("python-mistune" ,python-mistune)
15930 ("python-six" ,python-six)))
15931 (native-inputs
15932 `(("python-decorator" ,python-decorator)
15933 ("python-flake8" ,python-flake8)
15934 ("python-flask-restful" ,python-flask-restful)
15935 ("python-flex" ,python-flex)
15936 ("python-pytest-3.0" ,python-pytest-3.0)
15937 ("python-pytest-cov" ,python-pytest-cov)
15938 ("python-marshmallow" ,python-marshmallow)
15939 ("python-apispec" ,python-apispec)))
15940 (home-page "https://github.com/rochacbruno/flasgger/")
15941 (synopsis "Extract Swagger specs from your Flask project")
15942 (description "@code{python-flasgger} allows extracting Swagger specs
15943from your Flask project. It is a fork of Flask-Swagger.")
15944 (license license:expat)))
15945
15946(define-public python2-flasgger
15947 (package-with-python2 python-flasgger))
4eadc8b9
DM
15948
15949(define-public python-swagger-spec-validator
15950 (package
15951 (name "python-swagger-spec-validator")
15952 (version "2.1.0")
15953 (source
15954 (origin
15955 (method url-fetch)
15956 (uri (pypi-uri "swagger-spec-validator" version))
15957 (sha256
15958 (base32
15959 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
15960 (build-system python-build-system)
15961 (propagated-inputs
15962 `(("python-jsonschema" ,python-jsonschema)
15963 ("python-six" ,python-six)))
15964 (home-page
15965 "http://github.com/Yelp/swagger_spec_validator")
15966 (synopsis "Validation of Swagger specifications")
15967 (description "@code{swagger_spec_validator} provides a library for
15968validating Swagger API specifications.")
15969 (license license:asl2.0)))
15970
15971(define-public python2-swagger-spec-validator
15972 (package-with-python2 python-swagger-spec-validator))
7ea498e5
DM
15973
15974(define-public python-apache-libcloud
15975 (package
15976 (name "python-apache-libcloud")
15977 (version "2.0.0")
15978 (source
15979 (origin
15980 (method url-fetch)
15981 (uri (pypi-uri "apache-libcloud" version))
15982 (sha256
15983 (base32
15984 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
15985 (build-system python-build-system)
15986 (arguments
15987 `(#:phases
15988 (modify-phases %standard-phases
15989 (add-after 'unpack 'patch-ssh
15990 (lambda* (#:key inputs #:allow-other-keys)
15991 (substitute* "libcloud/compute/ssh.py"
15992 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15993 "/bin/ssh" "'")))
15994 #t))
15995 (add-after 'unpack 'patch-tests
15996 (lambda _
15997 (substitute* "./libcloud/test/test_file_fixtures.py"
15998 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15999 (("def _ascii") "def _raw_data(self, method, url, body, headers):
16000 return (httplib.OK,
16001 \"1234abcd\",
16002 {\"test\": \"value\"},
16003 httplib.responses[httplib.OK])
16004 def _ascii"))
16005 (substitute* "libcloud/test/compute/test_ssh_client.py"
16006 (("class ShellOutSSHClientTests")
16007 "@unittest.skip(\"Guix container doesn't have ssh service\")
16008class ShellOutSSHClientTests")
16009 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
16010 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
16011 (("'.xF0', '.x90', '.x8D', '.x88'")
16012 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
16013 #t)))))
16014 (inputs
16015 `(("openssh" ,openssh)))
16016 (propagated-inputs
16017 `(("python-paramiko" ,python-paramiko)
16018 ("python-requests" ,python-requests)))
16019 (native-inputs
16020 `(("python-lockfile" ,python-lockfile)
16021 ("python-mock" ,python-mock)
16022 ("python-requests-mock" ,python-requests-mock)))
16023 (home-page "https://libcloud.apache.org/")
16024 (synopsis "Unified Cloud API")
16025 (description "@code{libcloud} is a Python library for interacting with
16026many of the popular cloud service providers using a unified API.")
16027 (license license:asl2.0)))
16028
16029(define-public python2-apache-libcloud
16030 (package-with-python2 python-apache-libcloud))
7fadeab4
DM
16031
16032(define-public python-smmap2
16033 (package
16034 (name "python-smmap2")
16035 (version "2.0.3")
16036 (source
16037 (origin
16038 (method url-fetch)
16039 (uri (pypi-uri "smmap2" version))
16040 (sha256
16041 (base32
16042 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
16043 (build-system python-build-system)
16044 (native-inputs
16045 `(("python-nosexcover" ,python-nosexcover)))
16046 (home-page "https://github.com/Byron/smmap")
16047 (synopsis "Python sliding window memory map manager")
16048 (description "@code{smmap2} is a pure Python implementation of a sliding
16049window memory map manager.")
16050 (license license:bsd-3)))
16051
16052(define-public python2-smmap2
16053 (package-with-python2 python-smmap2))
fa3f5f47
RJ
16054
16055(define-public python-regex
16056 (package
16057 (name "python-regex")
16058 (version "2017.06.07")
16059 (source (origin
16060 (method url-fetch)
16061 (uri (pypi-uri "regex" version))
16062 (sha256
16063 (base32
16064 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
16065 (build-system python-build-system)
16066 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16067 (synopsis "Alternative regular expression module")
16068 (description "This regular expression implementation is backwards-
16069compatible with the standard @code{re} module, but offers additional
16070functionality like full case-folding for case-insensitive matches in Unicode.")
16071 (license license:psfl)))
16072
16073(define-public python2-regex
16074 (package-with-python2 python-regex))
f817b4d9
RH
16075
16076(define-public python2-pyopengl
16077 (package
16078 (name "python2-pyopengl")
16079 (version "3.1.0")
16080 (source
16081 (origin
16082 (method url-fetch)
16083 (uri (pypi-uri "PyOpenGL" version))
16084 (sha256
16085 (base32
16086 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
16087 (arguments
16088 `(#:python ,python-2))
16089 (build-system python-build-system)
16090 (home-page "http://pyopengl.sourceforge.net")
16091 (synopsis "Standard OpenGL bindings for Python")
16092 (description
16093 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16094related APIs. The binding is created using the standard @code{ctypes}
16095library.")
16096 (license license:bsd-3)))
7efd98be
RH
16097
16098(define-public python-rencode
16099 (package
16100 (name "python-rencode")
16101 (version "1.0.3")
16102 (source
16103 (origin
16104 (method url-fetch)
16105 (uri (pypi-uri "rencode" version))
16106 (sha256
16107 (base32
16108 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
16109 (build-system python-build-system)
16110 (native-inputs `(("pkg-config" ,pkg-config)
16111 ("python-cython", python-cython)))
16112 (home-page "https://github.com/aresch/rencode")
16113 (synopsis "Serialization of heterogeneous data structures")
16114 (description
16115 "The @code{rencode} module is a data structure serialization library,
16116similar to @code{bencode} from the BitTorrent project. For complex,
16117heterogeneous data structures with many small elements, r-encoding stake up
16118significantly less space than b-encodings. This version of rencode is a
16119complete rewrite in Cython to attempt to increase the performance over the
16120pure Python module.")
16121 (license license:bsd-3)))
16122
16123(define-public python2-rencode
16124 (package-with-python2 python-rencode))
9ea61b1c 16125
2038a48f
MFM
16126(define-public python-xenon
16127 (package
16128 (name "python-xenon")
16129 (version "0.5.1")
16130 (source
16131 (origin
16132 (method url-fetch)
16133 (uri (pypi-uri "xenon" version))
16134 (sha256
16135 (base32
16136 "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
16137 (build-system python-build-system)
16138 (native-inputs
16139 `(("python-pyyaml" ,python-pyyaml)
16140 ("python-radon" ,python-radon)
16141 ("python-requests" ,python-requests)
16142 ("python-flake8" ,python-flake8)
16143 ("python-tox" ,python-tox)))
16144 (arguments
16145 `(#:phases
16146 (modify-phases %standard-phases
16147 (add-before 'build 'patch-test-requirements
16148 (lambda* (#:key inputs #:allow-other-keys)
16149 ;; Update requirements from dependency==version to
16150 ;; dependency>=version.
16151 (substitute* "requirements.txt"
16152 (("==") ">=")
16153 ((",<1.5.0") ""))
16154 ;; Remove httpretty dependency for tests.
16155 (substitute* "setup.py"
16156 (("httpretty") ""))
16157 #t)))))
16158 (home-page "https://xenon.readthedocs.org/")
16159 (synopsis "Monitor code metrics for Python on your CI server")
16160 (description
16161 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16162Ideally, @code{xenon} is run every time code is committed. Through command
16163line options, various thresholds can be set for the complexity of code. It
16164will fail (i.e. it will exit with a non-zero exit code) when any of these
16165requirements is not met.")
16166 (license license:expat)))
16167
16168(define-public python2-xenon
16169 (package-with-python2 python-xenon))
16170
9ea61b1c
DM
16171(define-public python-flask-principal
16172 (package
16173 (name "python-flask-principal")
16174 (version "0.4.0")
16175 (source
16176 (origin
16177 (method url-fetch)
16178 (uri (pypi-uri "Flask-Principal" version))
16179 (sha256
16180 (base32
16181 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
16182 (build-system python-build-system)
16183 (propagated-inputs
16184 `(("python-blinker" ,python-blinker)))
16185 (native-inputs
16186 `(("python-flask" ,python-flask)
16187 ("python-nose" ,python-nose)))
16188 (home-page "http://packages.python.org/Flask-Principal/")
16189 (synopsis "Identity management for Flask")
16190 (description "@code{flask_principal} is a identity management library for
16191Flask. It supports managing both authentication and authorization data in a
16192thread-local variable.")
16193 (license license:expat)))
16194
16195(define-public python2-flask-principal
16196 (package-with-python2 python-flask-principal))
18c6a7b4
DM
16197
16198(define-public python-flask-httpauth
16199 (package
16200 (name "python-flask-httpauth")
16201 (version "3.2.3")
16202 (source
16203 (origin
16204 (method url-fetch)
16205 (uri (pypi-uri "Flask-HTTPAuth" version))
16206 (sha256
16207 (base32
16208 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
16209 (build-system python-build-system)
16210 (native-inputs
16211 `(("python-flask" ,python-flask)))
16212 (home-page "http://github.com/miguelgrinberg/flask-httpauth/")
16213 (synopsis "Basic and Digest HTTP authentication for Flask routes")
16214 (description "@code{flask_httpauth} provides Basic and Digest HTTP
16215authentication for Flask routes.")
16216 (license license:expat)))
16217
16218(define-public python2-flask-httpauth
16219 (package-with-python2 python-flask-httpauth))
07e62ae1
CZ
16220
16221(define-public python-pysocks
16222 (package
16223 (name "python-pysocks")
16224 (version "1.6.7")
16225 (source
16226 (origin
16227 (method url-fetch)
16228 (uri (pypi-uri "PySocks" version))
16229 (sha256
16230 (base32
16231 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
16232 (build-system python-build-system)
16233 (arguments `(#:tests? #f))
16234 (home-page "https://github.com/Anorov/PySocks")
16235 (synopsis "SOCKS client module")
16236 (description "@code{pysocks} is an updated and semi-actively maintained
16237version of @code{SocksiPy} with bug fixes and extra features.")
16238 (license license:bsd-3)))
16239
16240(define-public python2-pysocks
16241 (package-with-python2 python-pysocks))
7a276cd9
CZ
16242
16243(define-public python-pyaes
16244 (package
16245 (name "python-pyaes")
16246 (version "1.6.0")
16247 (source
16248 (origin
16249 (method url-fetch)
16250 (uri (pypi-uri "pyaes" version))
16251 (sha256
16252 (base32
16253 "0bp9bjqy1n6ij1zb86wz9lqa1dhla8qr1d7w2kxyn7jbj56sbmcw"))))
16254 (build-system python-build-system)
16255 (home-page "https://github.com/ricmoo/pyaes")
16256 (synopsis "Implementation of AES in Python")
16257 (description "This package contains a pure-Python implementation of the
16258AES block cipher algorithm and the common modes of operation (CBC, CFB, CTR,
16259ECB and OFB).")
16260 (license license:expat)))
16261
16262(define-public python2-pyaes
16263 (package-with-python2 python-pyaes))
4967946b
OP
16264
16265(define-public python-uritemplate
16266 (package
16267 (name "python-uritemplate")
16268 (version "3.0.0")
16269 (source
16270 (origin
16271 (method url-fetch)
16272 (uri (pypi-uri "uritemplate" version))
16273 (sha256
16274 (base32
16275 "0781gm9g34wa0asc19dx81ng0nqq07igzv3bbvdqmz13pv7469n0"))))
16276 (build-system python-build-system)
16277 (home-page "https://uritemplate.readthedocs.org")
16278 (synopsis "Library to deal with URI Templates")
16279 (description "@code{uritemplate} provides Python library to deal with URI
16280Templates.")
16281 (license license:bsd-2)))
16282
16283(define-public python2-uritemplate
16284 (package-with-python2 python-uritemplate))