gnu: mesa: Update to 17.2.5.
[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>
04fb4516 15;;; Copyright © 2015, 2017 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>
b89e3c77 18;;; Copyright © 2015, 2017 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>
bb3b4b4e 25;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
b3593688 26;;; Copyright © 2016, 2017 ng0 <ng0@infotropique.org>
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)
5eebe8dc 83 #:use-module (gnu packages graphics)
6eb7af2a 84 #:use-module (gnu packages gstreamer)
4ed20663 85 #:use-module (gnu packages gtk)
421a80a2 86 #:use-module (gnu packages icu4c)
c937562e 87 #:use-module (gnu packages image)
4ed20663 88 #:use-module (gnu packages imagemagick)
d79a343b 89 #:use-module (gnu packages libevent)
b10ab723 90 #:use-module (gnu packages libffi)
89b2e0b0 91 #:use-module (gnu packages linux)
ed118043 92 #:use-module (gnu packages man)
0da98533 93 #:use-module (gnu packages maths)
4ed20663 94 #:use-module (gnu packages multiprecision)
45203542 95 #:use-module (gnu packages networking)
be7134bf 96 #:use-module (gnu packages ncurses)
b04a52a6 97 #:use-module (gnu packages openstack)
d488d5d6 98 #:use-module (gnu packages password-utils)
c9b1b4f9 99 #:use-module (gnu packages pcre)
4ed20663 100 #:use-module (gnu packages perl)
b10ab723 101 #:use-module (gnu packages pkg-config)
06ff0837 102 #:use-module (gnu packages protobuf)
4535a93a 103 #:use-module (gnu packages qt)
4ed20663 104 #:use-module (gnu packages readline)
6eb7af2a 105 #:use-module (gnu packages sdl)
5f94ec91 106 #:use-module (gnu packages search)
80ce42bd 107 #:use-module (gnu packages shells)
7ea498e5 108 #:use-module (gnu packages ssh)
c9b1b4f9 109 #:use-module (gnu packages statistics)
8f9ac901 110 #:use-module (gnu packages tex)
1c65314c 111 #:use-module (gnu packages texinfo)
cc2b77df 112 #:use-module (gnu packages tls)
e25f0174 113 #:use-module (gnu packages version-control)
02f8f804 114 #:use-module (gnu packages video)
8d12be1e 115 #:use-module (gnu packages web)
ce0614dd 116 #:use-module (gnu packages base)
26b307e2 117 #:use-module (gnu packages xml)
6fa14469 118 #:use-module (gnu packages xorg)
0bdc1671 119 #:use-module (gnu packages xdisorg)
afa181ff 120 #:use-module (gnu packages tcl)
63bcec71 121 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
122 #:use-module (guix packages)
123 #:use-module (guix download)
ea5456c8 124 #:use-module (guix git-download)
11bb85a1 125 #:use-module (guix utils)
acc26ff1 126 #:use-module (guix build-system gnu)
d8c4998f 127 #:use-module (guix build-system cmake)
898238b9 128 #:use-module (guix build-system python)
1c65314c
FB
129 #:use-module (guix build-system trivial)
130 #:use-module (srfi srfi-1))
a01b6da7 131
45848023 132(define-public python-2.7
a01b6da7
NK
133 (package
134 (name "python")
603a6492 135 (version "2.7.14")
a01b6da7
NK
136 (source
137 (origin
138 (method url-fetch)
9b43a0ff 139 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
140 version "/Python-" version ".tar.xz"))
141 (sha256
142 (base32
603a6492 143 "0rka541ys16jwzcnnvjp2v12m4cwgd2jp6wj4kj511p715pb5zvi"))
c3052d6b
ML
144 (patches (search-patches "python-2.7-search-paths.patch"
145 "python-2-deterministic-build-info.patch"
15e57f57 146 "python-2.7-site-prefixes.patch"
dc5cec21 147 "python-2.7-source-date-epoch.patch"
603a6492 148 "python-2.7-adjust-tests.patch"))
10a42aa2
EF
149 (modules '((guix build utils)))
150 ;; suboptimal to delete failing tests here, but if we delete them in the
151 ;; arguments then we need to make sure to strip out that phase when it
152 ;; gets inherited by python and python-minimal.
153 (snippet
154 '(begin
155 (for-each delete-file
156 '("Lib/test/test_compileall.py"
f0499100 157 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
158 "Lib/test/test_distutils.py"
159 "Lib/test/test_import.py"
160 "Lib/test/test_shutil.py"
161 "Lib/test/test_socket.py"
1bb163b0 162 "Lib/test/test_subprocess.py"))
10a42aa2 163 #t))))
02f0c3b2
LC
164 (outputs '("out"
165 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 166 (build-system gnu-build-system)
3fdc99da 167 (arguments
10a42aa2 168 `(;; 356 tests OK.
e7e7a1eb
EF
169 ;; 6 tests failed:
170 ;; test_compileall test_distutils test_import test_shutil test_socket
171 ;; test_subprocess
172 ;; 39 tests skipped:
ff6f33cf
ED
173 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
174 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
175 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
176 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
177 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
178 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
179 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
180 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
181 ;; test_winreg test_winsound test_zipfile64
182 ;; 4 skips unexpected on linux2:
183 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 184 #:test-target "test"
3fdc99da 185 #:configure-flags
6a20289d
LC
186 (list "--enable-shared" ;allow embedding
187 "--with-system-ffi" ;build ctypes
aaf75c89 188 "--with-ensurepip=install" ;install pip and setuptools
a282d7ff 189 "--enable-unicode=ucs4"
6a20289d
LC
190 (string-append "LDFLAGS=-Wl,-rpath="
191 (assoc-ref %outputs "out") "/lib"))
fd982732 192
d2cc9c7c
LC
193 #:modules ((ice-9 ftw) (ice-9 match)
194 (guix build utils) (guix build gnu-build-system))
fd982732 195 #:phases
46472ecd
MW
196 (modify-phases %standard-phases
197 (add-before
198 'configure 'patch-lib-shells
199 (lambda _
200 ;; Filter for existing files, since some may not exist in all
201 ;; versions of python that are built with this recipe.
202 (substitute* (filter file-exists?
203 '("Lib/subprocess.py"
204 "Lib/popen2.py"
205 "Lib/distutils/tests/test_spawn.py"
b18226c3 206 "Lib/test/support/__init__.py"
46472ecd
MW
207 "Lib/test/test_subprocess.py"))
208 (("/bin/sh") (which "sh")))
dedc8320
LC
209
210 ;; Use zero as the timestamp in .pyc files so that builds are
211 ;; deterministic. TODO: Remove it when this variable is set in
212 ;; gnu-build-system.scm.
a665996f 213 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 214 #t))
5b4e2791
LC
215 (add-before 'configure 'do-not-record-configure-flags
216 (lambda* (#:key configure-flags #:allow-other-keys)
217 ;; Remove configure flags from the installed '_sysconfigdata.py'
218 ;; and 'Makefile' so we don't end up keeping references to the
219 ;; build tools.
220 ;;
221 ;; Preserve at least '--with-system-ffi' since otherwise the
222 ;; thing tries to build libffi, fails, and we end up with a
223 ;; Python that lacks ctypes.
224 (substitute* "configure"
225 (("^CONFIG_ARGS=.*$")
226 (format #f "CONFIG_ARGS='~a'\n"
227 (if (member "--with-system-ffi" configure-flags)
228 "--with-system-ffi"
229 ""))))
230 #t))
46472ecd
MW
231 (add-before
232 'check 'pre-check
233 (lambda _
234 ;; 'Lib/test/test_site.py' needs a valid $HOME
235 (setenv "HOME" (getcwd))
236 #t))
237 (add-after
238 'unpack 'set-source-file-times-to-1980
239 ;; XXX One of the tests uses a ZIP library to pack up some of the
240 ;; source tree, and fails with "ZIP does not support timestamps
241 ;; before 1980". Work around this by setting the file times in the
242 ;; source tree to sometime in early 1980.
243 (lambda _
244 (let ((circa-1980 (* 10 366 24 60 60)))
245 (ftw "." (lambda (file stat flag)
246 (utime file circa-1980 circa-1980)
247 #t))
02f0c3b2 248 #t)))
9ffe61b0
LC
249 (add-after 'install 'remove-tests
250 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
251 ;; because these files are used by some libraries out there.
252 (lambda* (#:key outputs #:allow-other-keys)
253 (let ((out (assoc-ref outputs "out")))
254 (match (scandir (string-append out "/lib")
255 (lambda (name)
256 (string-prefix? "python" name)))
257 ((pythonX.Y)
258 (let ((testdir (string-append out "/lib/" pythonX.Y
259 "/test")))
260 (with-directory-excursion testdir
261 (for-each delete-file-recursively
262 (scandir testdir
263 (match-lambda
264 ((or "." "..") #f)
265 (file
266 (not
267 (string-prefix? "test_support."
268 file))))))
269 (call-with-output-file "__init__.py" (const #t))
270 #t)))))))
216c283b
LC
271 (add-before 'strip 'make-libraries-writable
272 (lambda* (#:key outputs #:allow-other-keys)
273 ;; Make .so files writable so they can be stripped.
274 (let ((out (assoc-ref outputs "out")))
275 (for-each (lambda (file)
276 (chmod file #o755))
277 (find-files (string-append out "/lib")
278 "\\.so"))
279 #t)))
02f0c3b2
LC
280 (add-after 'install 'move-tk-inter
281 (lambda* (#:key outputs #:allow-other-keys)
282 ;; When Tkinter support is built move it to a separate output so
283 ;; that the main output doesn't contain a reference to Tcl/Tk.
284 (let ((out (assoc-ref outputs "out"))
285 (tk (assoc-ref outputs "tk")))
286 (when tk
287 (match (find-files out "tkinter.*\\.so")
288 ((tkinter.so)
289 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
290 ;; want it under TK/lib/pythonX.Y/site-packages.
291 (let* ((len (string-length out))
292 (target (string-append
293 tk "/"
294 (string-drop
295 (dirname (dirname tkinter.so))
296 len)
297 "/site-packages")))
298 (install-file tkinter.so target)
299 (delete-file tkinter.so)))))
300 #t))))))
a01b6da7 301 (inputs
3fdc99da
CR
302 `(("bzip2" ,bzip2)
303 ("gdbm" ,gdbm)
b10ab723 304 ("libffi" ,libffi) ; for ctypes
b88e1b0a 305 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 306 ("openssl" ,openssl)
3fdc99da 307 ("readline" ,readline)
afa181ff
LC
308 ("zlib" ,zlib)
309 ("tcl" ,tcl)
310 ("tk" ,tk))) ; for tkinter
b10ab723
CR
311 (native-inputs
312 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
313 (native-search-paths
314 (list (search-path-specification
315 (variable "PYTHONPATH")
af070955 316 (files '("lib/python2.7/site-packages")))))
f0499100 317 (home-page "https://www.python.org")
afa181ff 318 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
319 (description
320 "Python is a remarkably powerful dynamic programming language that
321is used in a wide variety of application domains. Some of its key
322distinguishing features include: clear, readable syntax; strong
323introspection capabilities; intuitive object orientation; natural
324expression of procedural code; full modularity, supporting hierarchical
325packages; exception-based error handling; and very high level dynamic
326data types.")
3f641af0 327 (license license:psfl)))
acc26ff1 328
45848023
HG
329;; Current 2.x version.
330(define-public python-2 python-2.7)
331
b18226c3 332(define-public python-3.6
b24d1cfc 333 (package (inherit python-2)
b18226c3 334 (version "3.6.3")
717003e3
LC
335 (source (origin
336 (method url-fetch)
337 (uri (string-append "https://www.python.org/ftp/python/"
338 version "/Python-" version ".tar.xz"))
fc1adab1
AK
339 (patches (search-patches
340 "python-fix-tests.patch"
b18226c3 341 "python-3-fix-tests.patch"
fc1adab1
AK
342 "python-3-deterministic-build-info.patch"
343 "python-3-search-paths.patch"))
717003e3
LC
344 (patch-flags '("-p0"))
345 (sha256
346 (base32
b18226c3 347 "1nl1raaagr4car787a2hmjv2dw6gqny53xfd6wisbgx4r5kxk9yd"))
fd615918 348 (snippet
e46e9573
EF
349 '(begin
350 (for-each delete-file
49c620e0
EF
351 '("Lib/ctypes/test/test_structures.py" ; fails on aarch64
352 "Lib/ctypes/test/test_win32.py" ; fails on aarch64
353 "Lib/test/test_fcntl.py")) ; fails on aarch64
e46e9573 354 #t))))
1f434457
MW
355 (arguments (substitute-keyword-arguments (package-arguments python-2)
356 ((#:tests? _) #t)))
1aebc0cb
AE
357 (native-search-paths
358 (list (search-path-specification
359 (variable "PYTHONPATH")
0e05d01e
SB
360 (files (list (string-append "lib/python"
361 (version-major+minor version)
362 "/site-packages"))))))))
f26a77ff 363
45848023 364;; Current 3.x version.
b18226c3 365(define-public python-3 python-3.6)
45848023
HG
366
367;; Current major version.
368(define-public python python-3)
369
95288fcc
LC
370;; Minimal variants of Python, mostly used to break the cycle between Tk and
371;; Python (Tk -> libxcb -> Python.)
372
373(define-public python2-minimal
374 (package (inherit python-2)
375 (name "python-minimal")
02f0c3b2 376 (outputs '("out"))
5927a843
LC
377
378 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
379 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
380 ;; libffi.
381 (inputs `(("libffi" ,libffi)
382 ("zlib" ,zlib)))))
95288fcc
LC
383
384(define-public python-minimal
898238b9 385 (package (inherit python)
95288fcc 386 (name "python-minimal")
02f0c3b2 387 (outputs '("out"))
95288fcc 388
d0b73960 389 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
390 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
391 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
392 (inputs `(("libffi" ,libffi)
393 ("openssl" ,openssl)
95288fcc
LC
394 ("zlib" ,zlib)))))
395
64cb064c
LC
396(define* (wrap-python3 python
397 #:optional
398 (name (string-append (package-name python) "-wrapper")))
898238b9 399 (package (inherit python)
95288fcc 400 (name name)
898238b9
AE
401 (source #f)
402 (build-system trivial-build-system)
02f0c3b2 403 (outputs '("out"))
3969ca54 404 (inputs `(("bash" ,bash)))
3c0f2329 405 (propagated-inputs `(("python" ,python)))
898238b9
AE
406 (arguments
407 `(#:modules ((guix build utils))
408 #:builder
409 (begin
410 (use-modules (guix build utils))
411 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
412 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
413 (mkdir-p bin)
414 (for-each
415 (lambda (old new)
416 (symlink (string-append python old)
417 (string-append bin "/" new)))
3969ca54
SB
418 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
419 `("python" ,"pydoc" ,"idle" ,"pip"))
420 ;; python-config outputs search paths based upon its location,
421 ;; use a bash wrapper to avoid changing its outputs.
422 (let ((bash (string-append (assoc-ref %build-inputs "bash")
423 "/bin/bash"))
424 (old (string-append python "python3-config"))
425 (new (string-append bin "/python-config")))
426 (with-output-to-file new
427 (lambda ()
428 (format #t "#!~a~%" bash)
429 (format #t "exec \"~a\" \"$@\"~%" old)
430 (chmod new #o755)
431 #t)))))))
0d56e3e1
LC
432 (synopsis "Wrapper for the Python 3 commands")
433 (description
434 "This package provides wrappers for the commands of Python@tie{}3.x such
435that they can be invoked under their usual name---e.g., @command{python}
436instead of @command{python3}.")))
437
95288fcc
LC
438(define-public python-wrapper (wrap-python3 python))
439(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 440
aaf625b8
RW
441(define-public python-psutil
442 (package
443 (name "python-psutil")
88535a44 444 (version "4.3.0")
aaf625b8
RW
445 (source
446 (origin
447 (method url-fetch)
f56777be 448 (uri (pypi-uri "psutil" version))
aaf625b8
RW
449 (sha256
450 (base32
88535a44 451 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 452 (build-system python-build-system)
fb08c4fe
MB
453 (arguments
454 ;; FIXME: some tests does not return and times out.
455 '(#:tests? #f))
88535a44 456 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
457 (synopsis "Library for retrieving information on running processes")
458 (description
459 "psutil (Python system and process utilities) is a library for retrieving
460information on running processes and system utilization (CPU, memory, disks,
461network) in Python. It is useful mainly for system monitoring, profiling and
462limiting process resources and management of running processes. It implements
463many functionalities offered by command line tools such as: ps, top, lsof,
464netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
465pidof, tty, taskset, pmap.")
3f641af0 466 (license license:bsd-3)))
aaf625b8
RW
467
468(define-public python2-psutil
469 (package-with-python2 python-psutil))
898238b9 470
f9da1d8a
ED
471(define-public python-passlib
472 (package
473 (name "python-passlib")
3b86a385 474 (version "1.7.1")
f9da1d8a
ED
475 (source
476 (origin
477 (method url-fetch)
690e8c66 478 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
479 (sha256
480 (base32
3b86a385 481 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
f9da1d8a
ED
482 (build-system python-build-system)
483 (native-inputs
f3b98f4f 484 `(("python-nose" ,python-nose)))
f22efa01 485 (propagated-inputs
f9da1d8a
ED
486 `(("python-py-bcrypt" ,python-py-bcrypt)))
487 (arguments
488 `(#:phases
dc1d3cde
KK
489 (modify-phases %standard-phases
490 (add-before 'check 'set-PYTHON_EGG_CACHE
491 ;; some tests require access to "$HOME/.cython"
492 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
f9da1d8a
ED
493 (home-page "https://bitbucket.org/ecollins/passlib")
494 (synopsis
495 "Comprehensive password hashing framework")
496 (description
497 "Passlib is a password hashing library for Python 2 & 3, which provides
498cross-platform implementations of over 30 password hashing algorithms, as well
499as a framework for managing existing password hashes. It's designed to be
500useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
501to providing full-strength password hashing for multi-user application.")
3f641af0 502 (license license:bsd-3)))
f9da1d8a
ED
503
504(define-public python2-passlib
505 (package-with-python2 python-passlib))
506
feb0d9c3
ED
507(define-public python-py-bcrypt
508 (package
509 (name "python-py-bcrypt")
510 (version "0.4")
511 (source
512 (origin
513 (method url-fetch)
514 (uri (string-append
515 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
516 version
517 ".tar.gz"))
518 (sha256
519 (base32
520 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
521 (build-system python-build-system)
feb0d9c3
ED
522 (home-page "https://code.google.com/p/py-bcrypt")
523 (synopsis
524 "Bcrypt password hashing and key derivation")
525 (description
526 "A python wrapper of OpenBSD's Blowfish password hashing code. This
527system hashes passwords using a version of Bruce Schneier's Blowfish block
528cipher with modifications designed to raise the cost of off-line password
529cracking and frustrate fast hardware implementation. The computation cost of
530the algorithm is parametised, so it can be increased as computers get faster.
531The intent is to make a compromise of a password database less likely to
532result in an attacker gaining knowledge of the plaintext passwords (e.g. using
533John the Ripper).")
534 ;; "sha2.c" is under BSD-3;
535 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
536 ;; the rest is under ISC.
3f641af0 537 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
538
539(define-public python2-py-bcrypt
540 (package-with-python2 python-py-bcrypt))
541
542
429fdea1
ED
543(define-public python-paramiko
544 (package
545 (name "python-paramiko")
b22cdf0c 546 (version "2.1.2")
429fdea1
ED
547 (source
548 (origin
549 (method url-fetch)
81b9bbbd 550 (uri (pypi-uri "paramiko" version))
429fdea1
ED
551 (sha256
552 (base32
b22cdf0c 553 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
429fdea1 554 (build-system python-build-system)
49910e6a 555 (arguments
b22cdf0c
SB
556 '(#:phases
557 (modify-phases %standard-phases
558 (replace 'check
559 (lambda _
560 (zero? (system* "python" "test.py")))))))
a3fc12da 561 (propagated-inputs
b22cdf0c
SB
562 `(("python-pyasn1" ,python-pyasn1)
563 ("python-cryptography" ,python-cryptography)))
429fdea1
ED
564 (home-page "http://www.paramiko.org/")
565 (synopsis "SSHv2 protocol library")
566 (description "Paramiko is a python implementation of the SSHv2 protocol,
567providing both client and server functionality. While it leverages a Python C
568extension for low level cryptography (PyCrypto), Paramiko itself is a pure
569Python interface around SSH networking concepts.")
3f641af0 570 (license license:lgpl2.1+)))
429fdea1
ED
571
572(define-public python2-paramiko
573 (package-with-python2 python-paramiko))
574
575
de73dbf6
ED
576(define-public python-httplib2
577 (package
578 (name "python-httplib2")
286f1bac 579 (version "0.9.2")
de73dbf6
ED
580 (source
581 (origin
582 (method url-fetch)
286f1bac 583 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
584 (sha256
585 (base32
286f1bac 586 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 587 (build-system python-build-system)
286f1bac 588 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
589 (synopsis "Comprehensive HTTP client library")
590 (description
591 "A comprehensive HTTP client library supporting many features left out of
592other HTTP libraries.")
593 (license license:expat)))
594
595(define-public python2-httplib2
596 (package-with-python2 python-httplib2))
597
67039875
ED
598(define-public python-ecdsa
599 (package
600 (name "python-ecdsa")
601 (version "0.13")
602 (source
603 (origin
604 (method url-fetch)
605 (uri (string-append
606 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
607 version
608 ".tar.gz"))
609 (sha256
610 (base32
611 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
612 (build-system python-build-system)
67039875
ED
613 (inputs
614 `(("openssl" ,openssl)))
615 (home-page
7bf837fd 616 "https://github.com/warner/python-ecdsa")
67039875
ED
617 (synopsis
618 "ECDSA cryptographic signature library (pure python)")
619 (description
620 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
621Curve Digital Signature Algorithm), implemented purely in Python. With this
622library, you can quickly create keypairs (signing key and verifying key), sign
623messages, and verify the signatures. The keys and signatures are very short,
624making them easy to handle and incorporate into other protocols.")
625 (license license:expat)))
626
627(define-public python2-ecdsa
628 (package-with-python2 python-ecdsa))
629
52323f32
ED
630(define-public python-ccm
631 (package
632 (name "python-ccm")
db5567f7 633 (version "2.1.6")
52323f32
ED
634 (source
635 (origin
636 (method url-fetch)
db5567f7 637 (uri (pypi-uri "ccm" version))
52323f32
ED
638 (sha256
639 (base32
db5567f7 640 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 641 (build-system python-build-system)
f22efa01 642 (propagated-inputs
52323f32 643 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
644 ;; Not listed in setup.py, but used in ccmlib/node.py for full
645 ;; functionality
646 ("python-psutil" ,python-psutil)
52323f32
ED
647 ("python-six" ,python-six)))
648 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
649 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
650localhost")
651 (description "Cassandra Cluster Manager is a development tool for testing
652local Cassandra clusters. It creates, launches and removes Cassandra clusters
653on localhost.")
3f641af0 654 (license license:asl2.0)))
52323f32
ED
655
656(define-public python2-ccm
657 (package-with-python2 python-ccm))
658
89114f39 659(define-public python-pytz
acc26ff1 660 (package
89114f39 661 (name "python-pytz")
3fee0039 662 (version "2017.2")
acc26ff1
CR
663 (source
664 (origin
665 (method url-fetch)
3fee0039 666 (uri (pypi-uri "pytz" version ".zip"))
acc26ff1
CR
667 (sha256
668 (base32
3fee0039 669 "12cmd3j46d2gcw08bspvp6s9icfcvx88zjz52n1bli9dyvl5dh7m"))))
acc26ff1 670 (build-system python-build-system)
3fee0039
MFM
671 (native-inputs
672 `(("unzip" ,unzip)))
b01bbbcf 673 (home-page "http://pythonhosted.org/pytz")
9e771e3b 674 (synopsis "Python timezone library")
3fee0039
MFM
675 (description "This library brings the Olson tz database into Python. It
676allows accurate and cross platform timezone calculations using Python 2.4 or
677higher. It also solves the issue of ambiguous times at the end of daylight
678saving time. Almost all of the Olson timezones are supported.")
b01bbbcf 679 (license license:expat)))
5ace6e2f 680
89114f39 681(define-public python2-pytz
11bb85a1 682 (package-with-python2 python-pytz))
89114f39 683
1f84ff51
MFM
684(define-public python-clyent
685 (package
686 (name "python-clyent")
687 (version "1.2.1")
688 (source
689 (origin
690 (method url-fetch)
691 (uri (pypi-uri "clyent" version))
692 (sha256
693 (base32
694 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
695 (build-system python-build-system)
696 (native-inputs
697 `(("python-mock" ,python-mock)))
698 (home-page "https://github.com/binstar/clyent")
699 (synopsis "Command line client library")
700 (description "Clyent is a Python command line utiliy library. It is used
701by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
702 (license license:bsd-3)))
703
704(define-public python2-clyent
705 (package-with-python2 python-clyent))
706
89114f39 707(define-public python-babel
5ace6e2f 708 (package
89114f39 709 (name "python-babel")
ffb1e98d 710 (version "2.3.4")
5ace6e2f
CR
711 (source
712 (origin
713 (method url-fetch)
b850a6d8 714 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
715 (sha256
716 (base32
ffb1e98d 717 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
5ace6e2f 718 (build-system python-build-system)
f22efa01 719 (propagated-inputs
f3b98f4f 720 `(("python-pytz" ,python-pytz)))
8498b8cf 721 (arguments `(#:tests? #f)) ; no test target
e1804763 722 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
723 (synopsis
724 "Tools for internationalizing Python applications")
725 (description
726 "Babel is composed of two major parts:
727- tools to build and work with gettext message catalogs
728- a Python interface to the CLDR (Common Locale Data Repository), providing
729access to various locale display names, localized number and date formatting,
730etc. ")
3f641af0 731 (license license:bsd-3)))
89114f39
AE
732
733(define-public python2-babel
11bb85a1 734 (package-with-python2 python-babel))
73adf220 735
ed377cc6
RW
736(define-public python2-backport-ssl-match-hostname
737 (package
738 (name "python2-backport-ssl-match-hostname")
f2d06d46 739 (version "3.5.0.1")
ed377cc6
RW
740 (source
741 (origin
742 (method url-fetch)
743 (uri (string-append
744 "https://pypi.python.org/packages/source/b/"
745 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
746 version ".tar.gz"))
747 (sha256
748 (base32
f2d06d46 749 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 750 (build-system python-build-system)
f2d06d46
EF
751 (arguments
752 `(#:python ,python-2
753 #:tests? #f)) ; no test target
f2d06d46
EF
754 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
755 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
756 (description
757 "This backport brings the ssl.match_hostname() function to users of
758earlier versions of Python. The function checks the hostname in the
759certificate returned by the server to which a connection has been established,
760and verifies that it matches the intended target hostname.")
3f641af0 761 (license license:psfl)))
ed377cc6 762
d205f895
TD
763(define-public python-hdf4
764 (package
765 (name "python-hdf4")
766 (version "0.9")
767 (source
768 (origin
769 (method url-fetch)
770 (uri (pypi-uri name version))
771 (sha256
772 (base32
773 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
774 (build-system python-build-system)
775 (native-inputs `(("nose" ,python-nose)))
776 (propagated-inputs `(("numpy" ,python-numpy)))
777 (inputs
778 `(("hdf4" ,hdf4)
779 ("libjpeg" ,libjpeg)
780 ("zlib" ,zlib)))
781 (arguments
782 `(#:phases
783 (modify-phases %standard-phases
784 (replace 'check
785 (lambda _
786 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
787 ;; on to import numpy. Somehow this works on their CI system.
788 ;; Let's just manage PYTHONPATH here instead.
789 (substitute* "runexamples.sh"
790 (("export PYTHONPATH=.*") ""))
791 (setenv "PYTHONPATH"
792 (string-append (getcwd) ":"
793 (getenv "PYTHONPATH")))
794 (and (zero? (system* "./runexamples.sh"))
795 (zero? (system* "nosetests" "-v"))))))))
796 (home-page "https://github.com/fhs/python-hdf4")
797 (synopsis "Python interface to the NCSA HDF4 library")
798 (description
799 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
800which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
801NetCDF files can also be read and modified. Python-HDF4 is a fork of
802@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
803 (license license:expat)))
804
805(define-public python2-hdf4
806 (package-with-python2 python-hdf4))
807
ef5cbf9b
RW
808(define-public python-h5py
809 (package
810 (name "python-h5py")
5c78db62 811 (version "2.7.0")
ef5cbf9b
RW
812 (source
813 (origin
814 (method url-fetch)
fe147c41 815 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
816 (sha256
817 (base32
5c78db62 818 "0433sdv6xc9p7v1xs1gvbxp7p152ywi3nplgjb258q9fvw9469br"))))
ef5cbf9b 819 (build-system python-build-system)
797e1401
RW
820 (arguments
821 `(#:tests? #f ; no test target
822 #:phases
823 (modify-phases %standard-phases
824 (add-after 'unpack 'fix-hdf5-paths
825 (lambda* (#:key inputs #:allow-other-keys)
826 (let ((prefix (assoc-ref inputs "hdf5")))
827 (substitute* "setup_build.py"
828 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
829 (string-append "['" prefix "/lib" "']"))
830 (("'/opt/local/include', '/usr/local/include'")
831 (string-append "'" prefix "/include" "'")))
832 (substitute* "setup_configure.py"
833 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
834 (string-append "['" prefix "/lib" "']")))
835 #t))))))
3c4010b1 836 (propagated-inputs
69866690
HG
837 `(("python-six" ,python-six)
838 ("python-numpy" ,python-numpy)))
ef5cbf9b 839 (inputs
69866690 840 `(("hdf5" ,hdf5)))
ef5cbf9b 841 (native-inputs
fe147c41
EF
842 `(("python-cython" ,python-cython)
843 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
844 (home-page "http://www.h5py.org/")
845 (synopsis "Read and write HDF5 files from Python")
846 (description
847 "The h5py package provides both a high- and low-level interface to the
848HDF5 library from Python. The low-level interface is intended to be a
849complete wrapping of the HDF5 API, while the high-level component supports
850access to HDF5 files, datasets and groups using established Python and NumPy
851concepts.")
9820a028 852 (license license:bsd-3)))
ef5cbf9b
RW
853
854(define-public python2-h5py
9820a028 855 (package-with-python2 python-h5py))
ef5cbf9b 856
ea8450c8
TD
857(define-public python-netcdf4
858 (package
859 (name "python-netcdf4")
1206c95a 860 (version "1.2.9")
ea8450c8
TD
861 (source
862 (origin
863 (method url-fetch)
864 (uri (pypi-uri "netCDF4" version))
865 (sha256
866 (base32
1206c95a 867 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
ea8450c8
TD
868 (build-system python-build-system)
869 (native-inputs
870 `(("python-cython" ,python-cython)))
871 (propagated-inputs
872 `(("python-numpy" ,python-numpy)))
873 (inputs
874 `(("netcdf" ,netcdf)
875 ("hdf4" ,hdf4)
876 ("hdf5" ,hdf5)))
877 (arguments
878 '(#:phases
879 (modify-phases %standard-phases
880 (replace 'check
881 (lambda _
882 (setenv "NO_NET" "1") ; disable opendap tests
883 (with-directory-excursion "test"
884 (setenv "PYTHONPATH" ; find and add the library we just built
885 (string-append
886 (car (find-files "../build" "lib.*"
887 #:directories? #:t
888 #:fail-on-error? #:t))
889 ":" (getenv "PYTHONPATH")))
890 (zero? (system* "python" "run_all.py"))))))))
891 (home-page
892 "https://github.com/Unidata/netcdf4-python")
893 (synopsis "Python/numpy interface to the netCDF library")
894 (description "Netcdf4-python is a Python interface to the netCDF C
895library. netCDF version 4 has many features not found in earlier
896versions of the library and is implemented on top of HDF5. This module
897can read and write files in both the new netCDF 4 and the old netCDF 3
898format, and can create files that are readable by HDF5 clients. The
899API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
900to users of that module.")
901 ;; The software is mainly ISC, but includes some files covered
902 ;; by the Expat license.
903 (license (list license:isc license:expat))))
904
905(define-public python2-netcdf4
906 (package-with-python2 python-netcdf4))
907
c1448c69
EB
908(define-public python-lockfile
909 (package
910 (name "python-lockfile")
692add53 911 (version "0.12.2")
c1448c69
EB
912 (source
913 (origin
914 (method url-fetch)
915 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
916 "lockfile-" version ".tar.gz"))
917 (sha256
918 (base32
692add53 919 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
920 (build-system python-build-system)
921 (arguments '(#:test-target "check"))
692add53
BW
922 (native-inputs
923 `(("python-pbr" ,python-pbr)))
6a8f26a4 924 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
925 (synopsis "Platform-independent file locking module")
926 (description
927 "The lockfile package exports a LockFile class which provides a simple
928API for locking files.")
f210e944 929 (license license:expat)))
c1448c69
EB
930
931(define-public python2-lockfile
f210e944 932 (package-with-python2 python-lockfile))
c1448c69 933
5a1a4bf6
EB
934(define-public python-mock
935 (package
936 (name "python-mock")
4ae65558 937 (version "2.0.0")
5a1a4bf6
EB
938 (source
939 (origin
940 (method url-fetch)
6b7877e1 941 (uri (pypi-uri "mock" version))
5a1a4bf6
EB
942 (sha256
943 (base32
4ae65558
MB
944 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
945 (propagated-inputs
946 `(("python-pbr" ,python-pbr-minimal)
947 ("python-six" ,python-six)))
5a1a4bf6 948 (build-system python-build-system)
4ae65558
MB
949 (native-inputs
950 `(("python-unittest2" ,python-unittest2)))
951 (arguments
952 `(#:phases
953 (modify-phases %standard-phases
954 (replace 'check
955 (lambda _
956 (zero? (system* "unit2")))))))
6b7877e1 957 (home-page "https://github.com/testing-cabal/mock")
9e771e3b 958 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
959 (description
960 "Mock is a library for testing in Python. It allows you to replace parts
961of your system under test with mock objects and make assertions about how they
962have been used.")
4ae65558 963 (properties `((python2-variant . ,(delay python2-mock))))
bd3fa666 964 (license license:expat)))
5a1a4bf6
EB
965
966(define-public python2-mock
4ae65558
MB
967 (let ((base (package-with-python2
968 (strip-python2-variant python-mock))))
969 (package (inherit base)
970 (propagated-inputs
971 `(("python2-functools32" ,python2-functools32)
972 ("python2-funcsigs" ,python2-funcsigs)
973 ,@(package-propagated-inputs base))))))
fc50e9c6 974
73adf220
AE
975(define-public python-setuptools
976 (package
977 (name "python-setuptools")
d660f7be 978 (version "31.0.0")
73adf220
AE
979 (source
980 (origin
981 (method url-fetch)
d660f7be 982 (uri (pypi-uri "setuptools" version))
73adf220
AE
983 (sha256
984 (base32
d660f7be 985 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
986 (modules '((guix build utils)))
987 (snippet
988 '(begin
989 ;; Remove included binaries which are used to build self-extracting
990 ;; installers for Windows.
991 ;; TODO: Find some way to build them ourself so we can include them.
992 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
993 #t))))
73adf220 994 (build-system python-build-system)
d3d656c5
AE
995 ;; FIXME: Tests require pytest, which itself relies on setuptools.
996 ;; One could bootstrap with an internal untested setuptools.
73adf220 997 (arguments
824af8ca 998 `(#:tests? #f))
73adf220
AE
999 (home-page "https://pypi.python.org/pypi/setuptools")
1000 (synopsis
1001 "Library designed to facilitate packaging Python projects")
1002 (description
1003 "Setuptools is a fully-featured, stable library designed to facilitate
1004packaging Python projects, where packaging includes:
1005Python package and module definitions,
1006distribution package metadata,
1007test hooks,
1008project installation,
1009platform-specific details,
1010Python 3 support.")
d660f7be
MB
1011 ;; TODO: setuptools now bundles the following libraries:
1012 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1013 (license (list license:psfl ; setuptools itself
1014 license:expat ; six, appdirs, pyparsing
1015 license:asl2.0 ; packaging is dual ASL2/BSD-2
1016 license:bsd-2))))
73adf220
AE
1017
1018(define-public python2-setuptools
1019 (package-with-python2 python-setuptools))
fc50e9c6 1020
fa56c773
KK
1021(define-public python-uniseg
1022 (package
1023 (name "python-uniseg")
1024 (version "0.7.1")
1025 (source
1026 (origin
1027 (method url-fetch)
1028 (uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
1029 "get/rel-" version ".tar.gz"))
1030 (file-name (string-append name "-" version ".tar.gz"))
1031 (sha256
1032 (base32
1033 "1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
1034 (build-system python-build-system)
1035 (arguments
1036 '(#:tests? #f)) ; The test suite requires network access.
1037 (home-page
1038 "https://bitbucket.org/emptypage/uniseg-python")
1039 (synopsis
1040 "Python library to determine Unicode text segmentations")
1041 (description
1042 "Uniseg is a Python package used to determine Unicode text segmentations.
1043Supported segmentations include:
1044@enumerate
1045@item @dfn{Code point} (any value in the Unicode codespace)
1046@item @dfn{Grapheme cluster} (user-perceived character made of a single or
1047multiple Unicode code points, e.g. \"G\" + acute-accent)
1048@item Word break
1049@item Sentence break
1050@item Line break
1051@end enumerate")
1052 (license license:expat)))
1053
1054(define-public python2-uniseg
1055 (package-with-python2 python-uniseg))
1056
aa21c764 1057;;; Pycrypto is abandoned upstream:
1194575b 1058;;;
aa21c764 1059;;; https://github.com/dlitz/pycrypto/issues/173
1194575b 1060;;;
aa21c764 1061;;; TODO Remove this package from GNU Guix.
cafc3f5a
EB
1062(define-public python-pycrypto
1063 (package
1064 (name "python-pycrypto")
1065 (version "2.6.1")
1066 (source
1067 (origin
1068 (method url-fetch)
aa21c764
LF
1069 (uri (pypi-uri "pycrypto" version))
1070 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
cafc3f5a
EB
1071 (sha256
1072 (base32
1073 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
1074 (build-system python-build-system)
cafc3f5a
EB
1075 (inputs
1076 `(("python" ,python)
1077 ("gmp" ,gmp)))
1078 (arguments
1079 `(#:phases
dc1d3cde
KK
1080 (modify-phases %standard-phases
1081 (add-before 'build 'set-build-env
1082 ;; pycrypto runs an autoconf configure script behind the scenes
1083 (lambda _ (setenv "CONFIG_SHELL" (which "bash")) #t)))))
cafc3f5a
EB
1084 (home-page "http://www.pycrypto.org/")
1085 (synopsis "Cryptographic modules for Python")
1086 (description
1087 "Pycrypto is a collection of both secure hash functions (such as SHA256
1088and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 1089etc.). The package is structured to make adding new modules easy.")
3f641af0 1090 (license license:public-domain)))
cafc3f5a 1091
345f0611 1092(define-public python2-pycrypto
1c0059da
EF
1093 (let ((pycrypto (package-with-python2 python-pycrypto)))
1094 (package (inherit pycrypto)
1095 (inputs
1096 `(("python" ,python-2)
1097 ,@(alist-delete
1098 "python"
1099 (package-inputs pycrypto)))))))
345f0611 1100
92eb9a35 1101(define-public python-humanfriendly
1102 (package
1103 (name "python-humanfriendly")
1104 (version "4.4.1")
1105 (source
1106 (origin
1107 (method url-fetch)
1108 (uri (pypi-uri "humanfriendly" version))
1109 (sha256
1110 (base32
1111 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1112 (build-system python-build-system)
1113 (arguments
1114 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1115 #:tests? #f))
1116 (propagated-inputs
1117 `(("python-monotonic" ,python-monotonic)))
1118 (home-page "https://humanfriendly.readthedocs.io")
1119 (synopsis "Human-friendly input and output in Python")
1120 (description
1121 "The functions and classes in @code{humanfriendly} can be used to make
1122text interfaces more user-friendly. It includes tools to parse and format
1123numbers, file sizes, and timespans, timers for long-running operations, menus
1124to allow the user to choose from a list of options, and terminal interaction
1125helpers.")
1126 (license license:expat)))
1127
1128(define-public python2-humanfriendly
1129 (package-with-python2 python-humanfriendly))
1130
2a81537f 1131(define-public python-capturer
1132 (package
1133 (name "python-capturer")
1134 (version "2.4")
1135 (source
1136 (origin
1137 (method url-fetch)
1138 (uri (pypi-uri "capturer" version))
1139 (sha256
1140 (base32
1141 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1142 (build-system python-build-system)
1143 (arguments
1144 `(#:tests? #f))
1145 (propagated-inputs
1146 `(("python-humanfriendly" ,python-humanfriendly)))
1147 (home-page "https://capturer.readthedocs.io")
1148 (synopsis "Capture stdout and stderr streams of the current process")
1149 (description
1150 "The capturer package makes it easy to capture the stdout and stderr
1151streams of the current process and subprocesses. Output can be relayed
1152to the terminal in real time but is also available to the Python program
1153for additional processing.")
1154 (license license:expat)))
1155
1156(define-public python2-capturer
1157 (package-with-python2 python-capturer))
1158
7d414763 1159(define-public python-verboselogs
1160 (package
1161 (name "python-verboselogs")
1162 (version "1.7")
1163 (source
1164 (origin
1165 (method url-fetch)
1166 (uri (pypi-uri "verboselogs" version))
1167 (sha256
1168 (base32
1169 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1170 (build-system python-build-system)
1171 (native-inputs
1172 `(("python-mock" ,python-mock)
1173 ("python-astroid" ,python-astroid)
1174 ("python-pylint" ,python-pylint)))
1175 (home-page "https://verboselogs.readthedocs.io")
1176 (synopsis "Verbose logging level for Python's logging module")
1177 (description
1178 "The @code{verboselogs} package extends Python's @code{logging} module to
1179add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1180 (license license:expat)))
1181
1182(define-public python2-verboselogs
1183 (package-with-python2 python-verboselogs))
1184
00463093 1185(define-public python-coloredlogs
1186 (package
1187 (name "python-coloredlogs")
1188 (version "7.3")
1189 (source
1190 (origin
1191 (method url-fetch)
1192 (uri (pypi-uri "coloredlogs" version))
1193 (sha256
1194 (base32
1195 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
1196 (build-system python-build-system)
1197 (arguments
1198 `(;Tests require some updated modules
1199 #:tests? #f))
1200 (propagated-inputs
1201 `(("python-capturer" ,python-capturer)))
1202 (home-page "https://coloredlogs.readthedocs.io")
1203 (synopsis "Colored stream handler for Python's logging module")
1204 (description
1205 "The @code{coloredlogs} package enables colored terminal output for
1206Python's logging module. The @code{ColoredFormatter} class inherits from
1207@code{logging.Formatter} and uses ANSI escape sequences to render your logging
1208messages in color.")
1209 (license license:expat)))
1210
1211(define-public python2-coloredlogs
1212 (package-with-python2 python-coloredlogs))
1213
de959250 1214(define-public python-eventlet
1215 (package
1216 (name "python-eventlet")
1217 (version "0.20.1")
1218 (source
1219 (origin
1220 (method url-fetch)
1221 (uri (pypi-uri "eventlet" version))
1222 (sha256
1223 (base32
1224 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1225 (build-system python-build-system)
1226 (propagated-inputs
1227 `(("python-greenlet" ,python-greenlet)))
5150d8b4
TGR
1228 (arguments
1229 ;; TODO: Requires unpackaged 'enum-compat'.
1230 '(#:tests? #f))
de959250 1231 (home-page "http://eventlet.net")
1232 (synopsis "Concurrent networking library for Python")
1233 (description
1234 "Eventlet is a concurrent networking library for Python that
1235allows you to change how you run your code, not how you write it.
1236It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1237Coroutines ensure that the developer uses a blocking style of programming
1238that is similar to threading, but provide the benefits of non-blocking I/O.
1239The event dispatch is implicit, which means you can easily use @code{Eventlet}
1240from the Python interpreter, or as a small part of a larger application.")
1241 (license license:expat)))
1242
1243(define-public python2-eventlet
1244 (let ((base (package-with-python2
1245 (strip-python2-variant python-eventlet))))
1246 (package (inherit base)
1247 (propagated-inputs
1248 `(("python2-enum34" ,python2-enum34)
1249 ,@(package-propagated-inputs base))))))
1250
cafc3f5a
EB
1251(define-public python-keyring
1252 (package
1253 (name "python-keyring")
13f3ff35 1254 (version "8.7")
cafc3f5a
EB
1255 (source
1256 (origin
1257 (method url-fetch)
664e6c3a 1258 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
1259 (sha256
1260 (base32
13f3ff35 1261 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
1262 (build-system python-build-system)
1263 (native-inputs
13f3ff35 1264 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1265 (propagated-inputs
cafc3f5a
EB
1266 `(("python-pycrypto" ,python-pycrypto)))
1267 (arguments
664e6c3a 1268 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 1269 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
1270 (synopsis "Store and access your passwords safely")
1271 (description
1272 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 1273service from python. It can be used in any application that needs safe
cafc3f5a
EB
1274password storage.")
1275 ;; "MIT" and PSF dual license
f210e944 1276 (license license:x11)))
cafc3f5a 1277
d7af1069 1278(define-public python2-keyring
f210e944 1279 (package-with-python2 python-keyring))
d7af1069 1280
a480bc41
EB
1281(define-public python-six
1282 (package
1283 (name "python-six")
8ed675a7 1284 (version "1.11.0")
a480bc41
EB
1285 (source
1286 (origin
1287 (method url-fetch)
b6ab89ef 1288 (uri (pypi-uri "six" version))
a480bc41
EB
1289 (sha256
1290 (base32
8ed675a7 1291 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
a480bc41 1292 (build-system python-build-system)
8dd339e5
MB
1293 (arguments
1294 `(#:phases
1295 (modify-phases %standard-phases
1296 (replace 'check
1297 (lambda _
1298 (zero? (system* "py.test" "-v")))))))
4fd129ee
MB
1299 (native-inputs
1300 `(("python-py" ,python-py)
92b2101a 1301 ("python-pytest" ,python-pytest-bootstrap)))
a480bc41
EB
1302 (home-page "http://pypi.python.org/pypi/six/")
1303 (synopsis "Python 2 and 3 compatibility utilities")
1304 (description
35b9e423 1305 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
1306functions for smoothing over the differences between the Python versions with
1307the goal of writing Python code that is compatible on both Python versions.
35b9e423 1308Six supports every Python version since 2.5. It is contained in only one
a480bc41 1309Python file, so it can be easily copied into your project.")
3f641af0 1310 (license license:x11)))
a480bc41 1311
0c20025c
AE
1312(define-public python2-six
1313 (package-with-python2 python-six))
1314
22d7360b 1315(define-public python-dateutil
cafc3f5a
EB
1316 (package
1317 (name "python-dateutil")
e139c7a7 1318 (version "2.6.0")
cafc3f5a
EB
1319 (source
1320 (origin
1321 (method url-fetch)
394b8060 1322 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
1323 (sha256
1324 (base32
e139c7a7 1325 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
cafc3f5a 1326 (build-system python-build-system)
f22efa01 1327 (propagated-inputs
394b8060 1328 `(("python-six" ,python-six)))
b5a5fb19 1329 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
1330 (synopsis "Extensions to the standard datetime module")
1331 (description
1332 "The dateutil module provides powerful extensions to the standard
1333datetime module, available in Python 2.3+.")
f210e944 1334 (license license:bsd-3)))
cafc3f5a 1335
fc50e9c6
AE
1336(define-public python2-dateutil
1337 (package-with-python2 python-dateutil))
1d08c01f 1338
cafc3f5a
EB
1339(define-public python-parsedatetime
1340 (package
1341 (name "python-parsedatetime")
642656a1 1342 (version "2.4")
cafc3f5a
EB
1343 (source
1344 (origin
1345 (method url-fetch)
eebf6f01 1346 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1347 (sha256
1348 (base32
642656a1 1349 "0jxqkjks7z9dn222cqgvskp4wr6d92aglinxq7pd2w4mzdc7r09x"))))
cafc3f5a
EB
1350 (build-system python-build-system)
1351 (native-inputs
eebf6f01 1352 `(("python-nose" ,python-nose)
28958b64
LC
1353 ("python-pyicu" ,python-pyicu)
1354 ("python-pytest" ,python-pytest)
1355 ("python-pytest-runner" ,python-pytest-runner)))
1356 (propagated-inputs
1357 `(("python-future" ,python-future)))
7bf837fd 1358 (home-page "https://github.com/bear/parsedatetime/")
cafc3f5a
EB
1359 (synopsis
1360 "Parse human-readable date/time text")
1361 (description
e881752c 1362 "Parse human-readable date/time text.")
f210e944 1363 (license license:asl2.0)))
cafc3f5a 1364
38b8f9b2 1365(define-public python2-parsedatetime
f210e944 1366 (package-with-python2 python-parsedatetime))
38b8f9b2 1367
24d15813
SR
1368(define-public python-schedule
1369 (package
1370 (name "python-schedule")
1371 (version "0.4.3")
1372 (source
1373 (origin
1374 (method url-fetch)
1375 (uri (pypi-uri "schedule" version))
1376 (sha256
1377 (base32
1378 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1379 (build-system python-build-system)
1380 (native-inputs
1381 `(("python-pytest" ,python-pytest)
1382 ("python-mock" ,python-mock)))
1383 (home-page "https://github.com/dbader/schedule")
1384 (synopsis "Schedule periodic function calls in Python")
1385 (description
1386 "Schedule is an in-process scheduler for periodic jobs that uses the
1387builder pattern for configuration. Schedule lets you run Python functions (or
1388any other callable) periodically at pre-determined intervals using a simple,
1389human-friendly syntax.")
1390 (license license:expat)))
1391
1392(define-public python2-schedule
1393 (package-with-python2 python-schedule))
1394
d072efcb
RW
1395(define-public python-pandas
1396 (package
1397 (name "python-pandas")
8e086048 1398 (version "0.19.2")
d072efcb
RW
1399 (source
1400 (origin
1b96f069 1401 (method url-fetch)
8e086048 1402 (uri (pypi-uri "pandas" version))
1b96f069 1403 (sha256
b03ee02f
MB
1404 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1405 (patches
1406 (search-patches "python-pandas-skip-failing-tests.patch"))))
d072efcb 1407 (build-system python-build-system)
d072efcb 1408 (propagated-inputs
f22efa01
HG
1409 `(("python-numpy" ,python-numpy)
1410 ("python-pytz" ,python-pytz)
22d7360b 1411 ("python-dateutil" ,python-dateutil)))
d072efcb 1412 (native-inputs
abcc7a0e
HG
1413 `(("python-nose" ,python-nose)
1414 ("python-cython" ,python-cython)))
d072efcb
RW
1415 (home-page "http://pandas.pydata.org")
1416 (synopsis "Data structures for data analysis, time series, and statistics")
1417 (description
1418 "Pandas is a Python package providing fast, flexible, and expressive data
1419structures designed to make working with structured (tabular,
1420multidimensional, potentially heterogeneous) and time series data both easy
1421and intuitive. It aims to be the fundamental high-level building block for
1422doing practical, real world data analysis in Python.")
f210e944 1423 (license license:bsd-3)))
d072efcb
RW
1424
1425(define-public python2-pandas
f210e944 1426 (package-with-python2 python-pandas))
d072efcb 1427
cafc3f5a
EB
1428(define-public python-tzlocal
1429 (package
1430 (name "python-tzlocal")
ed80839b 1431 (version "1.2.2")
cafc3f5a
EB
1432 (source
1433 (origin
1434 (method url-fetch)
226d3331 1435 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1436 (sha256
1437 (base32
ed80839b 1438 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1439 (build-system python-build-system)
f22efa01
HG
1440 (propagated-inputs
1441 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1442 (home-page "https://github.com/regebro/tzlocal")
1443 (synopsis
35b9e423 1444 "Local timezone information for Python")
cafc3f5a
EB
1445 (description
1446 "Tzlocal returns a tzinfo object with the local timezone information.
1447This module attempts to fix a glaring hole in pytz, that there is no way to
1448get the local timezone information, unless you know the zoneinfo name, and
1449under several distributions that's hard or impossible to figure out.")
3f641af0 1450 (license license:cc0)))
cafc3f5a 1451
1d08c01f
AE
1452(define-public python2-pysqlite
1453 (package
1454 (name "python2-pysqlite")
e80aaeb4 1455 (version "2.8.3")
1d08c01f
AE
1456 (source
1457 (origin
1458 (method url-fetch)
fe476868 1459 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1460 (sha256
1461 (base32
e80aaeb4 1462 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1d08c01f
AE
1463 (build-system python-build-system)
1464 (inputs
1465 `(("sqlite" ,sqlite)))
1466 (arguments
1467 `(#:python ,python-2 ; incompatible with Python 3
1468 #:tests? #f)) ; no test target
7bf837fd 1469 (home-page "https://github.com/ghaering/pysqlite")
7a03af70 1470 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1471 (description
1472 "Pysqlite provides SQLite bindings for Python that comply to the
1473Database API 2.0T.")
ed0cdf83 1474 (license license:zlib)))
1d08c01f 1475
2875caf5
AE
1476
1477(define-public python2-mechanize
1478 (package
1479 (name "python2-mechanize")
1480 (version "0.2.5")
1481 (source
1482 (origin
1483 (method url-fetch)
1484 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1485 version ".tar.gz"))
1486 (sha256
1487 (base32
1488 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1489 (build-system python-build-system)
2875caf5
AE
1490 (arguments
1491 `(#:python ,python-2 ; apparently incompatible with Python 3
1492 #:tests? #f))
1493 ;; test fails with message
1494 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1495 ;; (python-3.3.2) or
1496 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1497 ;; (python-2.7.5).
1498 ;; The source code is from March 2011 and probably not up-to-date
1499 ;; with respect to python unit tests.
1500 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1501 (synopsis
1502 "Stateful programmatic web browsing in Python")
1503 (description
1504 "Mechanize implements stateful programmatic web browsing in Python,
1505after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1506 (license (license:non-copyleft
1507 "file://COPYING"
1508 "See COPYING in the distribution."))))
2875caf5 1509
0352532e
AE
1510
1511(define-public python-simplejson
1512 (package
1513 (name "python-simplejson")
b2e6e150 1514 (version "3.10.0")
0352532e
AE
1515 (source
1516 (origin
1517 (method url-fetch)
988d1bad 1518 (uri (pypi-uri "simplejson" version))
0352532e
AE
1519 (sha256
1520 (base32
b2e6e150 1521 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1522 (build-system python-build-system)
1523 (home-page "http://simplejson.readthedocs.org/en/latest/")
1524 (synopsis
1525 "Json library for Python")
1526 (description
e881752c
AK
1527 "JSON (JavaScript Object Notation) is a subset of JavaScript
1528syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1529format.
0352532e
AE
1530
1531Simplejson exposes an API familiar to users of the standard library marshal
1532and pickle modules. It is the externally maintained version of the json
1533library contained in Python 2.6, but maintains compatibility with Python 2.5
1534and (currently) has significant performance advantages, even without using
1535the optional C extension for speedups. Simplejson is also supported on
1536Python 3.3+.")
3f641af0 1537 (license license:x11)))
0352532e
AE
1538
1539(define-public python2-simplejson
1540 (package-with-python2 python-simplejson))
421a80a2
AE
1541
1542
ed07b08d 1543(define-public python-pyicu
421a80a2 1544 (package
ed07b08d 1545 (name "python-pyicu")
2e161eaf 1546 (version "1.9.5")
421a80a2
AE
1547 (source
1548 (origin
1549 (method url-fetch)
2e161eaf 1550 (uri (pypi-uri "PyICU" version))
421a80a2
AE
1551 (sha256
1552 (base32
2e161eaf 1553 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
421a80a2 1554 (build-system python-build-system)
dc027d40
MB
1555 (arguments
1556 '(#:phases
1557 (modify-phases %standard-phases
1558 (add-before 'check 'delete-failing-test
1559 (lambda _
1560 ;; XXX: These tests require locales that are unavailable
1561 ;; in the build environment.
1562 (delete-file "test/test_DateTimeParserGenerator.py")
1563 #t)))))
421a80a2
AE
1564 (inputs
1565 `(("icu4c" ,icu4c)))
421a80a2 1566 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1567 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1568 (description
1569 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1570 (license license:x11)))
ed07b08d
LF
1571
1572(define-public python2-pyicu
f210e944 1573 (package-with-python2 python-pyicu))
cc20a22a
LC
1574
1575(define-public python2-dogtail
1576 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1577 ;; spaces in indentation" with Python 3.
1578 (package
1579 (name "python2-dogtail")
c5be3467 1580 (version "0.9.9")
cc20a22a
LC
1581 (source (origin
1582 (method url-fetch)
c5be3467 1583 (uri (pypi-uri "dogtail" version))
cc20a22a
LC
1584 (sha256
1585 (base32
c5be3467 1586 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
cc20a22a
LC
1587 (build-system python-build-system)
1588 (arguments `(#:python ,python-2
1589 #:tests? #f)) ; invalid command "test"
5ee684ff
EJ
1590 ;; Currently no offical homepage.
1591 (home-page "https://pypi.python.org/pypi/dogtail/")
1003fbcf 1592 (synopsis "GUI test tool and automation framework written in Python")
cc20a22a 1593 (description
35b9e423 1594 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1595It uses Accessibility (a11y) technologies to communicate with desktop
1596applications. dogtail scripts are written in Python and executed like any
1597other Python program.")
3f641af0 1598 (license license:gpl2+)))
515e6878 1599
011b18c3
LC
1600(define-public python2-empy
1601 (package
1602 (name "python2-empy")
1603 (version "3.3")
1604 (source (origin
1605 (method url-fetch)
1606 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1607 version ".tar.gz"))
1608 (sha256
1609 (base32
1610 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1611 (build-system python-build-system)
1612 (arguments
1613 `(#:python ,python-2
dc1d3cde
KK
1614 #:phases
1615 (modify-phases %standard-phases
1616 (replace 'check
1617 (lambda _
1618 (zero? (system* "./test.sh")))))))
011b18c3
LC
1619 (home-page "http://www.alcyone.com/software/empy/")
1620 (synopsis "Templating system for Python")
1621 (description
1622 "EmPy is a system for embedding Python expressions and statements in
1623template text; it takes an EmPy source file, processes it, and produces
1624output. This is accomplished via expansions, which are special signals to the
1cd4027c 1625EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1626EmPy can expand arbitrary Python expressions and statements in this way, as
1627well as a variety of special forms. Textual data not explicitly delimited in
1628this way is sent unaffected to the output, allowing Python to be used in
1629effect as a markup language. Also supported are callbacks via hooks,
1630recording and playback via diversions, and dynamic, chainable filters. The
1631system is highly configurable via command line options and embedded
1632commands.")
3f641af0 1633 (license license:lgpl2.1+)))
011b18c3 1634
8deeda0c
LC
1635(define-public python2-element-tree
1636 (package
1637 (name "python2-element-tree")
1638 (version "1.2.6")
1639 (source (origin
1640 (method url-fetch)
1641 (uri (string-append
1642 "http://effbot.org/media/downloads/elementtree-"
1643 version "-20050316.tar.gz"))
1644 (sha256
1645 (base32
1646 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1647 (build-system python-build-system)
1648 (arguments
1649 `(#:python ,python-2 ; seems to be part of Python 3
1650 #:tests? #f)) ; no 'test' sub-command
1651 (synopsis "Toolkit for XML processing in Python")
1652 (description
1653 "ElementTree is a Python library supporting lightweight XML processing.")
1654 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1655 (license (license:x11-style
1656 "http://docs.python.org/2/license.html"
1657 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1658
1659(define-public python2-pybugz
1660 (package
1661 (name "python2-pybugz")
1662 (version "0.6.11")
1663 (source (origin
1664 (method url-fetch)
1665 (uri (string-append
1666 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1667 version ".tar.gz"))
1668 (sha256
1669 (base32
6f194a1e 1670 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1671 (patches (search-patches "pybugz-stty.patch"
1672 "pybugz-encode-error.patch"))))
8deeda0c
LC
1673 (build-system python-build-system)
1674 (arguments
1675 `(#:python ,python-2 ; SyntaxError with Python 3
1676 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1677 (propagated-inputs
1678 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1679 (synopsis "Python and command-line interface to Bugzilla")
1680 (description
1681 "PyBugz is a Python library and command-line tool to query the Bugzilla
1682bug tracking system. It is meant as an aid to speed up interaction with the
1683bug tracker.")
1684 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1685 (license license:gpl2)))
8deeda0c 1686
a6c6a59f
MB
1687(define-public python2-enum
1688 (package
1689 (name "python2-enum")
1690 (version "0.4.6")
1691 (source (origin
1692 (method url-fetch)
1693 (uri (pypi-uri "enum" version))
1694 (sha256
1695 (base32
1696 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1697 (build-system python-build-system)
1698 (arguments
1699 `(#:python ,python-2))
1700 (home-page "http://pypi.python.org/pypi/enum/")
1701 (synopsis "Robust enumerated type support in Python")
1702 (description
1703 "This provides a module for robust enumerations in Python. It has
1704been superseded by the Python standard library and is provided only for
1705compatibility.")
1706 ;; Choice of either license.
1707 (license (list license:gpl3+ license:psfl))))
1708
a480bc41
EB
1709(define-public python-enum34
1710 (package
1711 (name "python-enum34")
5e923414 1712 (version "1.1.6")
a480bc41
EB
1713 (source
1714 (origin
1715 (method url-fetch)
d39ae1e5 1716 (uri (pypi-uri "enum34" version))
a480bc41
EB
1717 (sha256
1718 (base32
5e923414 1719 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
a480bc41 1720 (build-system python-build-system)
a480bc41
EB
1721 (home-page "https://pypi.python.org/pypi/enum34")
1722 (synopsis "Backported Python 3.4 Enum")
1723 (description
1724 "Enum34 is the new Python stdlib enum module available in Python 3.4
1725backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1726 (license license:bsd-3)))
a480bc41 1727
820acd1b
LF
1728(define-public python2-enum34
1729 (package-with-python2 python-enum34))
1730
a480bc41
EB
1731(define-public python-parse-type
1732 (package
1733 (name "python-parse-type")
1734 (version "0.3.4")
1735 (source
1736 (origin
1737 (method url-fetch)
1738 (uri (string-append "https://pypi.python.org/packages/source/p/"
1739 "parse_type/parse_type-" version ".tar.gz"))
1740 (sha256
1741 (base32
1742 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1743 (build-system python-build-system)
8ed12889
DM
1744 (arguments
1745 `(#:phases
1746 (modify-phases %standard-phases
1747 (add-after 'unpack 'patch-tests
1748 (lambda _
1749 (substitute* "tests/test_parse_type_parse.py"
1750 ;; Newer Python versions don't have the problem this test tests.
1751 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1752 ""))
1753 #t)))))
f22efa01 1754 (propagated-inputs
f3b98f4f 1755 `(("python-six" ,python-six)
68f1cdec 1756 ("python-parse" ,python-parse)))
8ed12889
DM
1757 (native-inputs
1758 `(("python-pytest" ,python-pytest)
1759 ("python-pytest-runner" ,python-pytest-runner)))
a480bc41
EB
1760 (home-page "https://github.com/jenisys/parse_type")
1761 (synopsis "Extended parse module")
1762 (description
1763 "Parse_type extends the python parse module.")
8ed12889
DM
1764 (properties
1765 `((python2-variant . ,(delay python2-parse-type))))
3f641af0 1766 (license license:bsd-3)))
a480bc41 1767
8ed12889
DM
1768(define-public python2-parse-type
1769 (let ((base (package-with-python2
1770 (strip-python2-variant python-parse-type))))
1771 (package (inherit base)
1772 (propagated-inputs
1773 `(("python2-enum34" ,python2-enum34)
1774 ,@(package-propagated-inputs base))))))
1775
a480bc41
EB
1776(define-public python-parse
1777 (package
1778 (name "python-parse")
eb3d3503 1779 (version "1.6.6")
a480bc41
EB
1780 (source
1781 (origin
1782 (method url-fetch)
eb3d3503 1783 (uri (pypi-uri "parse" version))
a480bc41
EB
1784 (sha256
1785 (base32
aa6c09ed
EF
1786 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1787 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1788 (build-system python-build-system)
1789 (arguments
1790 `(#:phases
f9a65318
EF
1791 (modify-phases %standard-phases
1792 (replace 'check
1793 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1794 (home-page "https://github.com/r1chardj0n3s/parse")
1795 (synopsis "Parse strings")
1796 (description
1797 "Parse strings using a specification based on the Python format()
1798syntax.")
3f641af0 1799 (license license:x11)))
a480bc41 1800
d3eff97a
JL
1801(define-public python-polib
1802 (package
1803 (name "python-polib")
1804 (version "1.0.8")
1805 (source (origin
1806 (method url-fetch)
1807 (uri (pypi-uri "polib" version))
1808 (sha256
1809 (base32
1810 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1811 (build-system python-build-system)
1812 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1813 (synopsis "Manipulate, create and modify gettext files")
1814 (description "Polib can manipulate any gettext format (po, pot and mo)
1815files. It can be used to create po files from scratch or to modify
1816existing ones.")
1817 (license license:expat)))
1818
1819(define-public python2-polib
1820 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1821 (package
1822 (inherit base)
1823 (arguments `(,@(package-arguments base)
1824 ;; Tests don't work with python2.
1825 #:tests? #f)))))
a480bc41 1826
515e6878
LC
1827(define-public scons
1828 (package
1829 (name "scons")
76ab3141 1830 (version "2.5.1")
515e6878
LC
1831 (source (origin
1832 (method url-fetch)
de67e922
LF
1833 (uri (string-append "mirror://sourceforge/scons/scons/" version
1834 "/scons-" version ".tar.gz"))
515e6878
LC
1835 (sha256
1836 (base32
76ab3141 1837 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
515e6878
LC
1838 (build-system python-build-system)
1839 (arguments
1840 ;; With Python 3.x, fails to build with a syntax error.
1841 `(#:python ,python-2
b3e8b4bd 1842 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1843 #:tests? #f)) ; no 'python setup.py test' command
1844 (home-page "http://scons.org/")
1845 (synopsis "Software construction tool written in Python")
1846 (description
1847 "SCons is a software construction tool. Think of SCons as an improved,
1848cross-platform substitute for the classic Make utility with integrated
1849functionality similar to autoconf/automake and compiler caches such as ccache.
1850In short, SCons is an easier, more reliable and faster way to build
1851software.")
3f641af0 1852 (license license:x11)))
011b18c3 1853
c15a5c0e
DT
1854(define-public python-extras
1855 (package
1856 (name "python-extras")
1857 (version "0.0.3")
1858 (source
1859 (origin
1860 (method url-fetch)
1861 (uri (string-append
1862 "https://pypi.python.org/packages/source/e/extras/extras-"
1863 version ".tar.gz"))
1864 (sha256
1865 (base32
1866 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1867 (build-system python-build-system)
c15a5c0e
DT
1868 (arguments
1869 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1870 '(#:tests? #f))
1871 (home-page "https://github.com/testing-cabal/extras")
1872 (synopsis "Useful extensions to the Python standard library")
1873 (description
1874 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1875 (license license:expat)))
c15a5c0e
DT
1876
1877(define-public python2-extras
1878 (package-with-python2 python-extras))
1879
56ea0efd
DT
1880(define-public python-mimeparse
1881 (package
1882 (name "python-mimeparse")
1883 (version "0.1.4")
1884 (source
1885 (origin
1886 (method url-fetch)
1887 (uri (string-append
1888 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1889 version ".tar.gz"))
1890 (sha256
1891 (base32
1892 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1893 (build-system python-build-system)
56ea0efd
DT
1894 (arguments
1895 '(#:tests? #f)) ; no setup.py test command
1896 (home-page
1897 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1898 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1899 (description
1900 "Mimeparse provides basic functions for parsing MIME type names and
1901matching them against a list of media-ranges.")
bd3fa666 1902 (license license:expat)))
56ea0efd
DT
1903
1904(define-public python2-mimeparse
1905 (package-with-python2 python-mimeparse))
1906
4435427e
DT
1907(define-public python-nose
1908 (package
1909 (name "python-nose")
f7cb9841 1910 (version "1.3.7")
4435427e
DT
1911 (source
1912 (origin
1913 (method url-fetch)
f7cb9841 1914 (uri (pypi-uri "nose" version))
4435427e
DT
1915 (sha256
1916 (base32
f7cb9841 1917 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1918 (build-system python-build-system)
4435427e
DT
1919 (arguments
1920 '(#:tests? #f)) ; FIXME: test suite fails
1921 (home-page "http://readthedocs.org/docs/nose/")
1922 (synopsis "Python testing library")
1923 (description
1924 "Nose extends the unittest library to make testing easier.")
3f641af0 1925 (license license:lgpl2.0+)))
4435427e
DT
1926
1927(define-public python2-nose
1928 (package-with-python2 python-nose))
1929
0aea283a
EF
1930(define-public python-nose2
1931 (package
1932 (name "python-nose2")
1933 (version "0.6.5")
1934 (source
1935 (origin
1936 (method url-fetch)
1937 (uri (pypi-uri "nose2" version))
1938 (sha256
1939 (base32
1940 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1941 (build-system python-build-system)
1942 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1943 (propagated-inputs
0aea283a
EF
1944 `(("python-cov-core" ,python-cov-core)
1945 ("python-pytest-cov" ,python-pytest-cov)
1946 ("python-six" ,python-six)))
1947 (home-page "https://github.com/nose-devs/nose2")
1948 (synopsis "Next generation of nicer testing for Python")
1949 (description
1950 "Nose2 is the next generation of nicer testing for Python, based on the
1951plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1952better plugin api, being easier for users to configure, and simplifying internal
1953interfaces and processes.")
1954 (license license:bsd-2)))
1955
1956(define-public python2-nose2
1957 (package-with-python2 python-nose2))
1958
6bb9645e
MB
1959(define-public python2-funcsigs
1960 (package
1961 (name "python2-funcsigs")
1962 (version "1.0.2")
1963 (source (origin
1964 (method url-fetch)
1965 (uri (pypi-uri "funcsigs" version))
1966 (sha256
1967 (base32
1968 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1969 (build-system python-build-system)
1970 (arguments
1971 `(#:python ,python-2))
1972 (native-inputs
1973 `(("python2-unittest2" ,python2-unittest2)))
1974 (home-page "http://funcsigs.readthedocs.org")
1975 (synopsis "Python function signatures from PEP362")
1976 (description
1977 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1978 (license license:asl2.0)))
1979
6cd9c356
DT
1980(define-public python-unittest2
1981 (package
1982 (name "python-unittest2")
7439173f 1983 (version "1.1.0")
6cd9c356
DT
1984 (source
1985 (origin
1986 (method url-fetch)
7439173f
MB
1987 (uri (pypi-uri "unittest2" version))
1988 (patches
1989 (search-patches "python-unittest2-python3-compat.patch"
1990 "python-unittest2-remove-argparse.patch"))
6cd9c356
DT
1991 (sha256
1992 (base32
7439173f 1993 "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"))))
6cd9c356 1994 (build-system python-build-system)
7439173f
MB
1995 (arguments
1996 '(#:phases
1997 (modify-phases %standard-phases
1998 (replace 'check
1999 (lambda _
2000 (zero? (system* "python" "-m" "unittest2" "discover" "--verbose")))))))
2001 (propagated-inputs
2002 `(("python-six" ,python-six)
2003 ("python-traceback2" ,python-traceback2)))
6cd9c356
DT
2004 (home-page "http://pypi.python.org/pypi/unittest2")
2005 (synopsis "Python unit testing library")
2006 (description
2007 "Unittest2 is a replacement for the unittest module in the Python
2008standard library.")
3f641af0 2009 (license license:psfl)))
6cd9c356
DT
2010
2011(define-public python2-unittest2
7439173f 2012 (package-with-python2 python-unittest2))
6cd9c356 2013
02f8f804 2014(define-public python-pafy
2015 (package
2016 (name "python-pafy")
745d85b7 2017 (version "0.5.3.1")
02f8f804 2018 (source
2019 (origin
2020 (method url-fetch)
2021 (uri (pypi-uri "pafy" version))
2022 (sha256
2023 (base32
745d85b7 2024 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
02f8f804 2025 (build-system python-build-system)
ed3fee5f 2026 (arguments
2027 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 2028 (propagated-inputs
2029 ;; Youtube-dl is a python package which is imported in the file
2030 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2031 `(("youtube-dl" ,youtube-dl)))
2032 (home-page "https://np1.github.io/pafy/")
2033 (synopsis "Retrieve YouTube content and metadata")
2034 (description
2035 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2036 (license license:lgpl3+)))
2037
542ad60f
DT
2038(define-public python-py
2039 (package
2040 (name "python-py")
220b0ac3 2041 (version "1.4.34")
542ad60f
DT
2042 (source
2043 (origin
2044 (method url-fetch)
71c8a804 2045 (uri (pypi-uri "py" version))
542ad60f
DT
2046 (sha256
2047 (base32
220b0ac3 2048 "1qyd5z0hv8ymxy84v5vig3vps2fvhcf4bdlksb3r03h549fmhb8g"))))
542ad60f 2049 (build-system python-build-system)
dcb0da7b
MB
2050 (arguments
2051 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2052 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2053 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2054 ;; Is this module globally installed?"
2055 '(#:tests? #f))
542ad60f
DT
2056 (home-page "http://pylib.readthedocs.org/")
2057 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2058 (description
2059 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2060code introspection, and logging.")
bd3fa666 2061 (license license:expat)))
542ad60f
DT
2062
2063(define-public python2-py
2064 (package-with-python2 python-py))
2065
855d4761
DT
2066(define-public python-pytest
2067 (package
2068 (name "python-pytest")
f2ef961e 2069 (version "3.2.3")
855d4761
DT
2070 (source
2071 (origin
2072 (method url-fetch)
928da609 2073 (uri (pypi-uri "pytest" version))
855d4761
DT
2074 (sha256
2075 (base32
f2ef961e 2076 "0g6w86ks73fnrnsyib9ii2rbyx830vn7aglsjqz9v1n2xwbndyi7"))))
855d4761 2077 (build-system python-build-system)
928da609
MB
2078 (arguments
2079 `(#:phases
2080 (modify-phases %standard-phases
2081 (add-before 'check 'disable-invalid-tests
2082 (lambda _
2083 ;; Some tests involves the /usr directory, and fails.
2084 (substitute* "testing/test_argcomplete.py"
2085 (("def test_remove_dir_prefix\\(self\\):")
2086 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):"))
2087 (substitute* "testing/test_argcomplete.py"
2088 (("def test_remove_dir_prefix" line)
2089 (string-append "@pytest.mark.skip"
2090 "(reason=\"Assumes that /usr exists.\")\n "
2091 line)))
2092 #t)))))
482d9591
HG
2093 (propagated-inputs
2094 `(("python-py" ,python-py)))
e7881f3d 2095 (native-inputs
60724d69
MB
2096 `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
2097 ("bash" ,bash)
928da609 2098 ("python-hypothesis" ,python-hypothesis)
60724d69 2099 ("python-nose" ,python-nose)
f2ef961e
MB
2100 ("python-mock" ,python-mock)
2101 ("python-setuptools-scm" ,python-setuptools-scm)))
855d4761
DT
2102 (home-page "http://pytest.org")
2103 (synopsis "Python testing library")
2104 (description
2105 "Pytest is a testing tool that provides auto-discovery of test modules
2106and functions, detailed info on failing assert statements, modular fixtures,
2107and many external plugins.")
bd3fa666 2108 (license license:expat)))
855d4761
DT
2109
2110(define-public python2-pytest
2111 (package-with-python2 python-pytest))
2112
92b2101a 2113(define-public python-pytest-bootstrap
fca4ff35
LF
2114 (package
2115 (inherit python-pytest)
92b2101a 2116 (name "python-pytest-bootstrap")
f2ef961e 2117 (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm)))
92b2101a 2118 (arguments `(#:tests? #f))))
23b9168d 2119
92b2101a
MB
2120(define-public python2-pytest-bootstrap
2121 (package-with-python2 python-pytest-bootstrap))
fca4ff35 2122
358c3d61
EF
2123(define-public python-pytest-cov
2124 (package
2125 (name "python-pytest-cov")
1aecfe17 2126 (version "2.4.0")
358c3d61
EF
2127 (source
2128 (origin
2129 (method url-fetch)
2130 (uri (pypi-uri "pytest-cov" version))
2131 (sha256
545f4a1c 2132 (base32
1aecfe17 2133 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
10468636 2134 (build-system python-build-system)
ce40b383
HG
2135 (arguments
2136 `(#:phases
2137 (modify-phases %standard-phases
2138 (replace 'check
2139 (lambda _
2140 ;; options taken from tox.ini
2141 ;; TODO: make "--restructuredtext" tests pass. They currently fail
2142 ;; with "Duplicate implicit target name"
2143 (zero? (system* "python" "./setup.py" "check"
2144 "--strict" "--metadata")))))))
f22efa01 2145 (propagated-inputs
10468636
EF
2146 `(("python-coverage" ,python-coverage)
2147 ("python-pytest" ,python-pytest)))
10468636
EF
2148 (home-page "https://github.com/pytest-dev/pytest-cov")
2149 (synopsis "Pytest plugin for measuring coverage")
2150 (description
2151 "Pytest-cov produces coverage reports. It supports centralised testing and
2152distributed testing in both @code{load} and @code{each} modes. It also
2153supports coverage of subprocesses.")
f210e944 2154 (license license:expat)))
358c3d61
EF
2155
2156(define-public python2-pytest-cov
f210e944 2157 (package-with-python2 python-pytest-cov))
358c3d61 2158
6784f2e3
RW
2159(define-public python-pytest-runner
2160 (package
2161 (name "python-pytest-runner")
047160f2 2162 (version "2.11.1")
6784f2e3
RW
2163 (source
2164 (origin
2165 (method url-fetch)
54cd239b 2166 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
2167 (sha256
2168 (base32
047160f2 2169 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
6784f2e3
RW
2170 (build-system python-build-system)
2171 (arguments
2172 `(#:phases
2173 (modify-phases %standard-phases
2174 ;; The fancy way of setting the version with setuptools_scm does not
2175 ;; seem to work here.
2176 (add-after 'unpack 'set-version
2177 (lambda _
2178 (substitute* "docs/conf.py"
2179 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
2180 (string-append "version = \"" ,version "\"")))
2181 #t)))))
2182 (native-inputs
92b2101a 2183 `(("python-pytest" ,python-pytest-bootstrap)
6784f2e3 2184 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 2185 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
2186 (synopsis "Invoke py.test as a distutils command")
2187 (description
2188 "This package provides a @command{pytest-runner} command that
2189@file{setup.py} files can use to run tests.")
f210e944 2190 (license license:expat)))
54cd239b
EF
2191
2192(define-public python2-pytest-runner
f210e944 2193 (package-with-python2 python-pytest-runner))
6784f2e3 2194
44547e51
EF
2195(define-public python-pytest-mock
2196 (package
2197 (name "python-pytest-mock")
2198 (version "1.2")
2199 (source
2200 (origin
2201 (method url-fetch)
2202 (uri (pypi-uri "pytest-mock" version ".zip"))
2203 (sha256
2204 (base32
2205 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
2206 (build-system python-build-system)
2207 (native-inputs
2208 `(("unzip" ,unzip)))
f22efa01 2209 (propagated-inputs
d5e41cf2 2210 `(("python-pytest" ,python-pytest)))
44547e51
EF
2211 (home-page "https://github.com/pytest-dev/pytest-mock/")
2212 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
2213 (description
2214 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
2215around the patching API provided by the @code{mock} package, but with the
2216benefit of not having to worry about undoing patches at the end of a test.
2217The mocker fixture has the same API as @code{mock.patch}, supporting the
2218same arguments.")
2219 (properties `((python2-variant . ,(delay python2-pytest-mock))))
2220 (license license:expat)))
2221
2222(define-public python2-pytest-mock
2223 (let ((base (package-with-python2
2224 (strip-python2-variant python-pytest-mock))))
2225 (package (inherit base)
f22efa01 2226 (propagated-inputs
44547e51 2227 `(("python2-mock" ,python2-mock)
f22efa01 2228 ,@(package-propagated-inputs base))))))
44547e51 2229
8fa58fc9
CAW
2230(define-public python-pytest-xdist
2231 (package
2232 (name "python-pytest-xdist")
2233 (version "1.14")
2234 (source
2235 (origin
2236 (method url-fetch)
2237 (uri (pypi-uri "pytest-xdist" version ".zip"))
2238 (sha256
2239 (base32
de585a7e
HG
2240 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
2241 (modules '((guix build utils)))
2242 (snippet
2243 '(begin
2244 ;; Remove pre-compiled .pyc files from source.
2245 (for-each delete-file-recursively
2246 (find-files "." "__pycache__" #:directories? #t))
2247 (for-each delete-file (find-files "." "\\.pyc$"))
2248 #t))))
8fa58fc9 2249 (build-system python-build-system)
4eb385fb
MB
2250 (arguments
2251 '(#:tests? #f)) ;FIXME: Some tests are failing.
2252 ;; #:phases
2253 ;; (modify-phases %standard-phases
2254 ;; (delete 'check)
2255 ;; (add-after 'install 'check
2256 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2257 ;; (add-installed-pythonpath inputs outputs)
2258 ;; (zero? (system* "py.test" "-v")))))
8fa58fc9
CAW
2259 (native-inputs
2260 `(("unzip" ,unzip)
8fa58fc9 2261 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 2262 (propagated-inputs
c4516ad2 2263 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
2264 ("python-pytest" ,python-pytest)
2265 ("python-py" ,python-py)))
2266 (home-page
2267 "https://github.com/pytest-dev/pytest-xdist")
2268 (synopsis
2269 "Plugin for py.test with distributed testing and loop-on-failing modes")
2270 (description
2271 "The pytest-xdist plugin extends py.test with some unique test execution
2272modes: parallelization, running tests in boxed subprocesses, the ability
2273to run tests repeatedly when failed, and the ability to run tests on multiple
2274Python interpreters or platforms. It uses rsync to copy the existing
2275program code to a remote location, executes there, and then syncs the
2276result back.")
f210e944 2277 (license license:expat)))
8fa58fc9
CAW
2278
2279(define-public python2-pytest-xdist
f210e944 2280 (package-with-python2 python-pytest-xdist))
8fa58fc9 2281
84d24017
DT
2282(define-public python-scripttest
2283 (package
2284 (name "python-scripttest")
2285 (version "1.3")
2286 (source
2287 (origin
2288 (method url-fetch)
2289 (uri (string-append
2290 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2291 version ".tar.gz"))
2292 (sha256
2293 (base32
2294 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2295 (build-system python-build-system)
521b7772 2296 (native-inputs
f3b98f4f 2297 `(("python-pytest" ,python-pytest)))
84d24017
DT
2298 (home-page "http://pythonpaste.org/scripttest/")
2299 (synopsis "Python library to test command-line scripts")
2300 (description "Scripttest is a Python helper library for testing
2301interactive command-line applications. With it you can run a script in a
2302subprocess and see the output as well as any file modifications.")
bd3fa666 2303 (license license:expat)))
84d24017
DT
2304
2305(define-public python2-scripttest
2306 (package-with-python2 python-scripttest))
2307
d8fa80e1
DT
2308(define-public python-testtools
2309 (package
2310 (name "python-testtools")
7adb9031 2311 (version "1.4.0")
d8fa80e1
DT
2312 (source
2313 (origin
2314 (method url-fetch)
7adb9031 2315 (uri (pypi-uri "testtools" version))
d8fa80e1
DT
2316 (sha256
2317 (base32
7adb9031 2318 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
d8fa80e1 2319 (build-system python-build-system)
7adb9031
DM
2320 (arguments
2321 `(#:phases
2322 (modify-phases %standard-phases
2323 (add-after 'unpack 'fix-module-imports
2324 (lambda _
2325 (substitute* "setup.py"
2326 (("'unittest2>=0.8.0',") ""))
2327 (substitute* '("testtools/testcase.py"
2328 "testtools/testsuite.py"
2329 "testtools/run.py"
2330 "testtools/tests/test_run.py"
2331 "testtools/tests/test_testsuite.py"
2332 "testtools/tests/test_deferredruntest.py")
2333 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2334 (("import unittest2 as unittest") "import unittest")
2335 (("import unittest2") "import unittest as unittest2")
2336 (("from unittest2 import") "from unittest import"))
2337 (substitute* "testtools/tests/test_testresult.py"
2338 ;; NUL in source code is not allowed (raises ValueError).
2339 (("\\x00\\x04") "\\x04"))
2340 #t)))))
0e88cbf8 2341 (propagated-inputs
f22efa01
HG
2342 `(("python-mimeparse" ,python-mimeparse)
2343 ("python-extras" ,python-extras)))
d8fa80e1
DT
2344 (home-page "https://github.com/testing-cabal/testtools")
2345 (synopsis
2346 "Extensions to the Python standard library unit testing framework")
2347 (description
2348 "Testtools extends the Python standard library unit testing framework to
2349provide matchers, more debugging information, and cross-Python
2350compatibility.")
3f641af0 2351 (license license:psfl)))
d8fa80e1
DT
2352
2353(define-public python2-testtools
2354 (package-with-python2 python-testtools))
2355
5bf3afea
DT
2356(define-public python-testscenarios
2357 (package
2358 (name "python-testscenarios")
2359 (version "0.4")
2360 (source
2361 (origin
2362 (method url-fetch)
2363 (uri (string-append
2364 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2365 version ".tar.gz"))
2366 (sha256
2367 (base32
2368 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2369 (build-system python-build-system)
f22efa01 2370 (propagated-inputs
8e73d3ba 2371 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
2372 (home-page "https://launchpad.net/testscenarios")
2373 (synopsis "Pyunit extension for dependency injection")
2374 (description
2375 "Testscenarios provides clean dependency injection for Python unittest
2376style tests.")
3f641af0 2377 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
2378
2379(define-public python2-testscenarios
2380 (package-with-python2 python-testscenarios))
2381
dac79ecc
DT
2382(define-public python-testresources
2383 (package
2384 (name "python-testresources")
2385 (version "0.2.7")
2386 (source
2387 (origin
2388 (method url-fetch)
2389 (uri (string-append
2390 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2391 version ".tar.gz"))
2392 (sha256
2393 (base32
2394 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2395 (build-system python-build-system)
dac79ecc
DT
2396 (home-page "https://launchpad.net/testresources")
2397 (synopsis
2398 "Pyunit extension for managing test resources")
2399 (description
2400 "Testresources is an extension to Python's unittest to allow declarative
2401use of resources by test cases.")
3f641af0 2402 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
2403
2404(define-public python2-testresources
2405 (package-with-python2 python-testresources))
2406
070ab058
DT
2407(define-public python-subunit
2408 (package
2409 (name "python-subunit")
2410 (version "0.0.21")
2411 (source
2412 (origin
2413 (method url-fetch)
2414 (uri (string-append
2415 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2416 version ".tar.gz"))
2417 (sha256
2418 (base32
2419 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2420 (build-system python-build-system)
f22efa01 2421 (propagated-inputs
b52ad371
HG
2422 `(("python-extras" ,python-extras)
2423 ("python-mimeparse" ,python-mimeparse)))
2424 (native-inputs
2425 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
2426 (home-page "http://launchpad.net/subunit")
2427 (synopsis "Python implementation of the subunit protocol")
2428 (description
2429 "Python-subunit is a Python implementation of the subunit test streaming
2430protocol.")
3f641af0 2431 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2432
2433(define-public python2-subunit
2434 (package-with-python2 python-subunit))
2435
d2a8db92
HG
2436;; Recent versions of python-fixtures and python-testrepository need
2437;; python-pbr for packaging, which itself needs these two packages for
2438;; testing.
2439;; To fix this circular dependency, we use a build of python-pbr, based on the
2440;; same source, just without any test dependencies and with tests disabled.
2441;; python-pbr-minmal is then used to package python-fixtures and
2442;; python-testrepository.
2443;; Strictly speaking we currently could remove the test-requirements from the
2444;; normal python-pbr package (and save this package) since test are disabled
2445;; there anyway. But this may change in future.
2446(define python-pbr-minimal
cd49454b 2447 (package
d2a8db92 2448 (name "python-pbr-minimal")
269504a7 2449 (version "3.0.1")
7787ef76
CR
2450 (source
2451 (origin
2452 (method url-fetch)
d2a8db92 2453 (uri (pypi-uri "pbr" version))
7787ef76
CR
2454 (sha256
2455 (base32
269504a7 2456 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
7787ef76
CR
2457 (build-system python-build-system)
2458 (arguments
d2a8db92
HG
2459 `(#:tests? #f))
2460 (home-page "http://docs.openstack.org/developer/pbr/")
2461 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2462 (description
d2a8db92 2463 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2464 (license license:asl2.0)))
7787ef76 2465
d2a8db92
HG
2466(define python2-pbr-minimal
2467 (package-with-python2 python-pbr-minimal))
7787ef76 2468
1ef09c0c 2469(define-public python-pbr
e25f0174 2470 (package
d2a8db92 2471 (inherit python-pbr-minimal)
e25f0174 2472 (name "python-pbr")
e25f0174
BW
2473 (arguments
2474 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2475 (propagated-inputs
d2a8db92
HG
2476 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2477 (native-inputs
e25f0174 2478 `(("python-fixtures" ,python-fixtures)
d2a8db92 2479 ;; discover, coverage, hacking, subunit
e25f0174 2480 ("python-mock" ,python-mock)
d2a8db92 2481 ("python-six" ,python-six)
e25f0174
BW
2482 ("python-sphinx" ,python-sphinx)
2483 ("python-testrepository" ,python-testrepository)
2484 ("python-testresources" ,python-testresources)
2485 ("python-testscenarios" ,python-testscenarios)
2486 ("python-testtools" ,python-testtools)
2487 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2488 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2489 (description
2490 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2491and sensible default behaviors into your setuptools run. It will set
2492versions, process requirements files and generate AUTHORS and ChangeLog file
2493from git information.
2494")))
1ef09c0c
BW
2495
2496(define-public python2-pbr
e25f0174 2497 (package-with-python2 python-pbr))
1ef09c0c 2498
7787ef76
CR
2499(define-public python-fixtures
2500 (package
2501 (name "python-fixtures")
13fcc6df 2502 (version "1.4.0")
7787ef76
CR
2503 (source
2504 (origin
2505 (method url-fetch)
13fcc6df 2506 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2507 (sha256
2508 (base32
13fcc6df 2509 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76 2510 (build-system python-build-system)
f6c1ef18
MB
2511 (arguments
2512 '(#:phases
2513 (modify-phases %standard-phases
2514 (replace 'check
2515 (lambda _
2516 (zero? (system* "python" "-m" "testtools.run"
2517 "fixtures.test_suite")))))))
7787ef76 2518 (propagated-inputs
ae92cadd 2519 `(("python-six" ,python-six)))
e7881f3d 2520 (native-inputs
f6c1ef18
MB
2521 `(("python-mock" ,python-mock)
2522 ("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2523 ("python-testtools" ,python-testtools)))
7787ef76
CR
2524 (home-page "https://launchpad.net/python-fixtures")
2525 (synopsis "Python test fixture library")
2526 (description
2527 "Fixtures provides a way to create reusable state, useful when writing
2528Python tests.")
3f641af0 2529 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2530
cd49454b
DT
2531(define-public python2-fixtures
2532 (package-with-python2 python-fixtures))
2533
b24a0c00
DT
2534(define-public python-testrepository
2535 (package
2536 (name "python-testrepository")
2537 (version "0.0.20")
2538 (source
2539 (origin
2540 (method url-fetch)
2541 (uri (string-append
2542 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2543 version ".tar.gz"))
2544 (sha256
2545 (base32
2546 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2547 (build-system python-build-system)
90110ef9
MB
2548 (arguments
2549 ;; FIXME: Many tests are failing.
2550 '(#:tests? #f))
05de40c5 2551 (propagated-inputs
b2e66edf
HG
2552 `(("python-fixtures" ,python-fixtures)
2553 ("python-subunit" ,python-subunit)
b52ad371
HG
2554 ("python-testtools" ,python-testtools)))
2555 (native-inputs
2556 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2557 ("python-mimeparse" ,python-mimeparse)))
2558 (home-page "https://launchpad.net/testrepository")
2559 (synopsis "Database for Python test results")
2560 (description "Testrepository provides a database of test results which can
2561be used as part of a developer's workflow to check things such as what tests
2562have failed since the last commit or what tests are currently failing.")
3f641af0 2563 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2564
2565(define-public python2-testrepository
2566 (package-with-python2 python-testrepository))
2567
243a009a
DT
2568(define-public python-coverage
2569 (package
2570 (name "python-coverage")
71d9f561 2571 (version "4.4.1")
243a009a
DT
2572 (source
2573 (origin
2574 (method url-fetch)
82a3c582 2575 (uri (pypi-uri "coverage" version))
243a009a
DT
2576 (sha256
2577 (base32
71d9f561 2578 "097l4s3ssxm1vncsn0nw3a1pbzah28773q36c1ab9wz01r04973s"))))
243a009a 2579 (build-system python-build-system)
bd10e677
MB
2580 (arguments
2581 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2582 '(#:tests? #f))
243a009a
DT
2583 (home-page "http://nedbatchelder.com/code/coverage")
2584 (synopsis "Code coverage measurement for Python")
2585 (description
2586 "Coverage measures code coverage, typically during test execution. It
2587uses the code analysis tools and tracing hooks provided in the Python standard
2588library to determine which lines are executable, and which have been
2589executed.")
3f641af0 2590 (license license:bsd-3)))
243a009a
DT
2591
2592(define-public python2-coverage
2593 (package-with-python2 python-coverage))
2594
12f839fd
EF
2595(define-public python-cov-core
2596 (package
2597 (name "python-cov-core")
2598 (version "1.15.0")
2599 (source
2600 (origin
2601 (method url-fetch)
2602 (uri (pypi-uri "cov-core" version))
2603 (sha256
2604 (base32
2605 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2606 (build-system python-build-system)
f78e1c27 2607 (propagated-inputs
12f839fd
EF
2608 `(("python-coverage" ,python-coverage)))
2609 (home-page "https://github.com/schlamar/cov-core")
49d5e338 2610 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
12f839fd 2611 (description
49d5e338
TGR
2612 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2613and @code{nose2-cov}. It is useful for developing coverage plugins for these
2614testing frameworks.")
f210e944 2615 (license license:expat)))
12f839fd
EF
2616
2617(define-public python2-cov-core
f210e944 2618 (package-with-python2 python-cov-core))
12f839fd 2619
041358fb
DT
2620(define-public python-discover
2621 (package
2622 (name "python-discover")
2623 (version "0.4.0")
2624 (source
2625 (origin
2626 (method url-fetch)
2627 (uri (string-append
2628 "https://pypi.python.org/packages/source/d/discover/discover-"
2629 version ".tar.gz"))
2630 (sha256
2631 (base32
2632 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2633 (build-system python-build-system)
041358fb
DT
2634 (home-page "http://pypi.python.org/pypi/discover/")
2635 (synopsis
2636 "Python test discovery for unittest")
2637 (description
2638 "Discover provides test discovery for unittest, a feature that has been
e881752c 2639backported from Python 2.7 for Python 2.4+.")
3f641af0 2640 (license license:bsd-3)))
041358fb
DT
2641
2642(define-public python2-discover
2643 (package-with-python2 python-discover))
2644
a480bc41
EB
2645(define-public behave
2646 (package
2647 (name "behave")
287cfd1a 2648 (version "1.2.5")
a480bc41
EB
2649 (source (origin
2650 (method url-fetch)
287cfd1a 2651 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2652 (sha256
2653 (base32
287cfd1a 2654 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2655 (build-system python-build-system)
f22efa01 2656 (propagated-inputs
f3b98f4f 2657 `(("python-six" ,python-six)
a480bc41
EB
2658 ("python-parse" ,python-parse)
2659 ("python-parse-type" ,python-parse-type)))
2660 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2661 ;PyHamcrest>=1.8
7bf837fd 2662 (home-page "https://github.com/behave/behave")
a480bc41
EB
2663 (synopsis "Python behavior-driven development")
2664 (description
2665 "Behave is a tool for behavior-driven development in python.
2666Behavior-driven development (or BDD) is an agile software development
2667technique that encourages collaboration between developers, QA and
2668non-technical or business participants in a software project. Behave uses
2669tests written in a natural language style, backed up by Python code.")
3f641af0 2670 (license license:x11)))
c7303d3c
DT
2671
2672(define-public python-exif-read
2673 (package
2674 (name "python-exif-read")
2a2d0981 2675 (version "2.1.2")
c7303d3c
DT
2676 (source (origin
2677 (method url-fetch)
2a2d0981 2678 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2679 (sha256
2680 (base32
2a2d0981 2681 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2682 (build-system python-build-system)
c7303d3c
DT
2683 (arguments `(#:tests? #f)) ; no tests
2684 (home-page "https://github.com/ianare/exif-py")
2685 (synopsis "Python library to extract EXIF data from image files")
2686 (description
2687 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2688files.")
3f641af0 2689 (license license:bsd-3)))
c7303d3c
DT
2690
2691(define-public python2-exif-read
2692 (package-with-python2 python-exif-read))
d5f89b22
DT
2693
2694(define-public python-pyld
2695 (package
2696 (name "python-pyld")
8957af32 2697 (version "0.7.1")
d5f89b22
DT
2698 (source (origin
2699 (method url-fetch)
af1ab773 2700 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2701 (sha256
2702 (base32
8957af32 2703 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2704 (build-system python-build-system)
d5f89b22 2705 (arguments `(#:tests? #f)) ; no tests
7bf837fd 2706 (home-page "https://github.com/digitalbazaar/pyld")
d5f89b22
DT
2707 (synopsis "Python implementation of the JSON-LD specification")
2708 (description
2709 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2710 (license license:bsd-3)))
d5f89b22
DT
2711
2712(define-public python2-pyld
2713 (package-with-python2 python-pyld))
3a1f9a68
DT
2714
2715(define-public python-certifi
2716 (package
2717 (name "python-certifi")
28576403 2718 (version "2017.1.23")
3a1f9a68
DT
2719 (source (origin
2720 (method url-fetch)
9a41f443 2721 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2722 (sha256
2723 (base32
28576403 2724 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
3a1f9a68 2725 (build-system python-build-system)
28576403 2726 (home-page "https://certifi.io/")
3a1f9a68
DT
2727 (synopsis "Python CA certificate bundle")
2728 (description
2729 "Certifi is a Python library that contains a CA certificate bundle, which
2730is used by the Requests library to verify HTTPS requests.")
3f641af0 2731 (license license:asl2.0)))
3a1f9a68
DT
2732
2733(define-public python2-certifi
2734 (package-with-python2 python-certifi))
e6cfbd36 2735
12c270dd
RW
2736(define-public python-click
2737 (package
2738 (name "python-click")
d4acb6db 2739 (version "6.7")
12c270dd
RW
2740 (source
2741 (origin
2742 (method url-fetch)
375f224b 2743 (uri (pypi-uri "click" version))
12c270dd 2744 (sha256
43accb58 2745 (base32
d4acb6db 2746 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
12c270dd 2747 (build-system python-build-system)
e2ab5a09
BW
2748 (arguments
2749 `(#:phases
2750 (modify-phases %standard-phases
2751 (add-after 'unpack 'fix-paths
2752 (lambda* (#:key inputs #:allow-other-keys)
2753 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2754 "cross-libc" "libc"))))
2755 (substitute* "click/_unicodefun.py"
2756 (("'locale'")
2757 (string-append "'" glibc "/bin/locale'"))))
97be1bc2
MB
2758 #t))
2759 (replace 'check
2760 (lambda _
2761 (zero? (system* "make" "test")))))))
2762 (native-inputs
2763 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2764 (home-page "http://click.pocoo.org")
2765 (synopsis "Command line library for Python")
2766 (description
2767 "Click is a Python package for creating command line interfaces in a
2768composable way with as little code as necessary. Its name stands for
2769\"Command Line Interface Creation Kit\". It's highly configurable but comes
2770with sensible defaults out of the box.")
3f641af0 2771 (license license:bsd-3)))
12c270dd
RW
2772
2773(define-public python2-click
2774 (package-with-python2 python-click))
2775
addc808d
EF
2776(define-public python-wheel
2777 (package
2778 (name "python-wheel")
0e6df70b 2779 (version "0.30.0a0")
e1ba0749
EF
2780 (source
2781 (origin
2782 (method url-fetch)
2783 (uri (pypi-uri "wheel" version))
2784 (sha256
2785 (base32
0e6df70b 2786 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
e1ba0749
EF
2787 (build-system python-build-system)
2788 (native-inputs
f3b98f4f 2789 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2790 ("python-pytest-cov" ,python-pytest-cov)))
2791 (home-page "https://bitbucket.org/pypa/wheel/")
2792 (synopsis "Format for built Python packages")
2793 (description
2794 "A wheel is a ZIP-format archive with a specially formatted filename and
2795the @code{.whl} extension. It is designed to contain all the files for a PEP
2796376 compatible install in a way that is very close to the on-disk format. Many
2797packages will be properly installed with only the @code{Unpack} step and the
2798unpacked archive preserves enough information to @code{Spread} (copy data and
2799scripts to their final locations) at any later time. Wheel files can be
2800installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2801 (license license:expat)
2802 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2803
2804(define-public python2-wheel
8ad4ae20
LF
2805 (let ((wheel (package-with-python2
2806 (strip-python2-variant python-wheel))))
264ae686 2807 (package (inherit wheel)
8ad4ae20
LF
2808 (native-inputs `(("python2-functools32" ,python2-functools32)
2809 ,@(package-native-inputs wheel))))))
2810
addc808d 2811
ae641128 2812(define-public python-requests
e6cfbd36 2813 (package
ae641128 2814 (name "python-requests")
da5db988 2815 (version "2.13.0")
e6cfbd36
DT
2816 (source (origin
2817 (method url-fetch)
5d691657 2818 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2819 (sha256
2820 (base32
da5db988 2821 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
cff0ccf9 2822 ;; TODO: unbundle urllib3 and chardet.
e6cfbd36 2823 (build-system python-build-system)
cff0ccf9
MB
2824 (arguments
2825 ;; FIXME: Some tests require network access.
2826 '(#:tests? #f))
e6cfbd36
DT
2827 (home-page "http://python-requests.org/")
2828 (synopsis "Python HTTP library")
2829 (description
2830 "Requests is a Python HTTP client library. It aims to be easier to use
2831than Python’s urllib2 library.")
3f641af0 2832 (license license:asl2.0)))
864b5211 2833
e9005180
DT
2834;; Some software requires an older version of Requests, notably Docker
2835;; Compose.
2836(define-public python-requests-2.7
2837 (package (inherit python-requests)
2838 (version "2.7.0")
2839 (source (origin
2840 (method url-fetch)
2841 (uri (pypi-uri "requests" version))
2842 (sha256
2843 (base32
2844 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2845
ae641128 2846(define-public python2-requests
8ad4ae20 2847 (package-with-python2 python-requests))
ae641128 2848
ea521b42
DT
2849(define-public python-vcversioner
2850 (package
2851 (name "python-vcversioner")
538fe019 2852 (version "2.16.0.0")
ea521b42
DT
2853 (source
2854 (origin
2855 (method url-fetch)
2856 (uri (pypi-uri "vcversioner" version))
2857 (sha256
2858 (base32
538fe019 2859 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2860 (build-system python-build-system)
ea521b42
DT
2861 (synopsis "Python library for version number discovery")
2862 (description "Vcversioner is a Python library that inspects tagging
2863information in a variety of version control systems in order to discover
2864version numbers.")
2865 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2866 (license license:isc)))
ea521b42
DT
2867
2868(define-public python2-vcversioner
f210e944 2869 (package-with-python2 python-vcversioner))
ae641128 2870
864b5211
DT
2871(define-public python-jsonschema
2872 (package
2873 (name "python-jsonschema")
b3667afb 2874 (version "2.5.1")
864b5211
DT
2875 (source (origin
2876 (method url-fetch)
2877 (uri
2878 (string-append
2879 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2880 version ".tar.gz"))
2881 (sha256
2882 (base32
b3667afb 2883 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2884 (build-system python-build-system)
8bcd6b91
EF
2885 (arguments
2886 '(#:phases
2887 (modify-phases %standard-phases
2888 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2889 (native-inputs
8bcd6b91
EF
2890 `(("python-nose" ,python-nose)
2891 ("python-vcversioner" ,python-vcversioner)))
2892 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2893 (synopsis "Implementation of JSON Schema for Python")
2894 (description
2895 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2896 (license license:expat)
2897 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2898
2899(define-public python2-jsonschema
a14600ec
LF
2900 (let ((jsonschema (package-with-python2
2901 (strip-python2-variant python-jsonschema))))
264ae686 2902 (package (inherit jsonschema)
eaba9d66 2903 (native-inputs
8bcd6b91 2904 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2905 ,@(package-native-inputs jsonschema)))
2906 (propagated-inputs
2907 `(("python2-functools32" ,python2-functools32))))))
850189b8 2908
7734ed7a
OP
2909(define-public python-schema
2910 (package
2911 (name "python-schema")
2912 (version "0.6.6")
2913 (source
2914 (origin
2915 (method url-fetch)
2916 (uri (pypi-uri "schema" version))
2917 (sha256
2918 (base32
2919 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2920 (build-system python-build-system)
2921 (native-inputs
2922 `(("python-pytest" ,python-pytest)))
2923 (home-page "https://github.com/keleshev/schema")
2924 (synopsis "Simple data validation library")
2925 (description
2926 "@code{python-schema} is a library for validating Python data
2927structures, such as those obtained from config-files, forms, external
2928services or command-line parsing, converted from JSON/YAML (or
2929something else) to Python data-types.")
2930 (license license:psfl)))
2931
2932(define-public python2-schema
2933 (package-with-python2 python-schema))
2934
2935(define-public python-schema-0.5
2936 (package (inherit python-schema)
2937 (version "0.5.0")
2938 (source
2939 (origin
2940 (method url-fetch)
2941 (uri (pypi-uri "schema" version))
2942 (sha256
2943 (base32
2944 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2945
2946(define-public python2-schema-0.5
2947 (package-with-python2 python-schema-0.5))
2948
9f21414d 2949(define-public python-kitchen
2950 (package
2951 (name "python-kitchen")
2952 (version "1.2.4")
2953 (source
2954 (origin
2955 (method url-fetch)
2956 (uri (pypi-uri "kitchen" version))
2957 (sha256
2958 (base32
2959 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2960 (build-system python-build-system)
2961 (propagated-inputs
2962 `(("python-chardet" ,python-chardet)))
cb542830 2963 (home-page "https://github.com/fedora-infra/kitchen")
9f21414d 2964 (synopsis "Python API for snippets")
2965 (description "@code{kitchen} module provides a python API for all sorts of
2966little useful snippets of code that everybody ends up writing for their projects
2967but never seem big enough to build an independent release. Use kitchen and stop
2968cutting and pasting that code over and over.")
2969 (license (list license:lgpl2.1+
2970 ;; subprocess.py, test_subprocess.py,
2971 ;; kitchen/pycompat25/defaultdict.py:
2972 license:psfl))))
2973
2974(define-public python2-kitchen
2975 (package-with-python2 python-kitchen))
2976
850189b8
DT
2977(define-public python-unidecode
2978 (package
2979 (name "python-unidecode")
c37f58b7 2980 (version "0.04.21")
850189b8
DT
2981 (source (origin
2982 (method url-fetch)
8925d4f3 2983 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2984 (sha256
2985 (base32
c37f58b7 2986 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
850189b8 2987 (build-system python-build-system)
850189b8
DT
2988 (home-page "https://pypi.python.org/pypi/Unidecode")
2989 (synopsis "ASCII transliterations of Unicode text")
2990 (description
2991 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2992useful when integrating with legacy code that doesn't support Unicode, or for
2993ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2994machine identifiers from human-readable Unicode strings that should still be
a0b80a57 2995somewhat intelligible.")
3f641af0 2996 (license license:gpl2+)))
850189b8
DT
2997
2998(define-public python2-unidecode
2999 (package-with-python2 python-unidecode))
6d45fef4
DT
3000
3001(define-public python-pyjwt
3002 (package
3003 (name "python-pyjwt")
ad0f92d0 3004 (version "1.5.3")
6d45fef4
DT
3005 (source
3006 (origin
3007 (method url-fetch)
eb31d4b4 3008 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
3009 (sha256
3010 (base32
ad0f92d0 3011 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
7e31427f
MB
3012 (modules '((guix build utils)))
3013 (snippet
3014 '(begin
3015 (for-each delete-file-recursively
3016 (find-files "." "\\.pyc$"))
3017 #t))))
6d45fef4 3018 (build-system python-build-system)
eb31d4b4 3019 (native-inputs
928da609 3020 `(("python-pytest" ,python-pytest)
130fe994
HG
3021 ("python-pytest-cov" ,python-pytest-cov)
3022 ("python-pytest-runner" ,python-pytest-runner)))
7bf837fd 3023 (home-page "https://github.com/progrium/pyjwt")
6d45fef4
DT
3024 (synopsis "JSON Web Token implementation in Python")
3025 (description
3026 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 3027 (license license:expat)))
6d45fef4
DT
3028
3029(define-public python2-pyjwt
3030 (package-with-python2 python-pyjwt))
3031
a80488c2 3032(define-public python-pykka
3033 (package
3034 (name "python-pykka")
3035 (version "1.2.1")
3036 (source
3037 (origin
3038 (method url-fetch)
3039 (uri (pypi-uri "Pykka" version))
3040 (sha256
3041 (base32
3042 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3043 (build-system python-build-system)
3044 (native-inputs
3045 `(("python-mock" ,python-mock)
3046 ("python-nose" ,python-nose)
3047 ("python-gevent" ,python-gevent)
3048 ("python-eventlet" ,python-eventlet)))
3049 (home-page "https://www.pykka.org/")
3050 (synopsis "Pykka is a Python implementation of the actor model")
3051 (description
3052 "Pykka is a Python implementation of the actor model.
3053The actor model introduces some simple rules to control the sharing
3054of state and cooperation between execution units, which makes it
3055easier to build concurrent applications.")
3056 (license license:asl2.0)))
3057
3058(define-public python2-pykka
3059 (package-with-python2 python-pykka))
3060
2cec1f6f
DT
3061(define-public python-oauthlib
3062 (package
3063 (name "python-oauthlib")
bde2171d 3064 (version "1.0.3")
2cec1f6f
DT
3065 (source (origin
3066 (method url-fetch)
bde2171d 3067 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
3068 (sha256
3069 (base32
bde2171d 3070 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 3071 (build-system python-build-system)
bde2171d 3072 (native-inputs
bb06aa34 3073 `(("python-nose" ,python-nose)
c616b5d3 3074 ("python-mock" ,python-mock)
bde2171d 3075 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
3076 ("python-pyjwt" ,python-pyjwt)
3077 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
3078 (home-page "https://github.com/idan/oauthlib")
3079 (synopsis "OAuth implementation for Python")
3080 (description
3081 "Oauthlib is a generic, spec-compliant, thorough implementation of the
3082OAuth request-signing logic.")
3f641af0 3083 (license license:bsd-3)
59f151ec 3084 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
3085
3086(define-public python2-oauthlib
59f151ec 3087 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
3088 (package
3089 (inherit base)
00e10c6e 3090 (native-inputs `(("python2-unittest2" ,python2-unittest2)
59f151ec 3091 ,@(package-native-inputs base))))))
ec5dbb5c
DT
3092
3093(define-public python-itsdangerous
3094 (package
3095 (name "python-itsdangerous")
3096 (version "0.24")
3097 (source
3098 (origin
3099 (method url-fetch)
3100 (uri (string-append
3101 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
3102 version ".tar.gz"))
3103 (sha256
3104 (base32
3105 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
3106 (build-system python-build-system)
7bf837fd 3107 (home-page "https://github.com/mitsuhiko/itsdangerous")
ec5dbb5c
DT
3108 (synopsis "Python library for passing data to/from untrusted environments")
3109 (description
3110 "Itsdangerous provides various helpers to pass trusted data to untrusted
3111environments and back.")
f210e944 3112 (license license:bsd-3)))
ec5dbb5c
DT
3113
3114(define-public python2-itsdangerous
f210e944 3115 (package-with-python2 python-itsdangerous))
5731cae3 3116
8d12be1e
RW
3117(define-public python-pyyaml
3118 (package
3119 (name "python-pyyaml")
bf5e4bc4 3120 (version "3.12")
8d12be1e
RW
3121 (source
3122 (origin
3123 (method url-fetch)
bf5e4bc4 3124 (uri (pypi-uri "PyYAML" version))
8d12be1e
RW
3125 (sha256
3126 (base32
bf5e4bc4 3127 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
8d12be1e
RW
3128 (build-system python-build-system)
3129 (inputs
3130 `(("libyaml" ,libyaml)))
8d12be1e
RW
3131 (home-page "http://pyyaml.org/wiki/PyYAML")
3132 (synopsis "YAML parser and emitter for Python")
3133 (description
3134 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3135complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3136API, and sensible error messages. PyYAML supports standard YAML tags and
3137provides Python-specific tags that allow to represent an arbitrary Python
3138object.")
3139 (license license:expat)))
3140
3141(define-public python2-pyyaml
3142 (package-with-python2 python-pyyaml))
3143
5731cae3
DT
3144(define-public python-virtualenv
3145 (package
3146 (name "python-virtualenv")
58d04dba 3147 (version "15.0.3")
5731cae3
DT
3148 (source
3149 (origin
3150 (method url-fetch)
17804240 3151 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
3152 (sha256
3153 (base32
58d04dba 3154 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 3155 (build-system python-build-system)
17804240
EF
3156 (arguments
3157 `(#:phases
3158 (modify-phases %standard-phases
58d04dba
RW
3159 (replace 'check
3160 (lambda _
3161 ;; Disable failing test. See upstream bug report
3162 ;; https://github.com/pypa/virtualenv/issues/957
3163 (substitute* "tests/test_virtualenv.py"
3164 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
3165 (zero? (system* "py.test")))))))
e7881f3d 3166 (native-inputs
f3b98f4f 3167 `(("python-mock" ,python-mock)
17804240 3168 ("python-pytest" ,python-pytest)))
5731cae3
DT
3169 (home-page "https://virtualenv.pypa.io/")
3170 (synopsis "Virtual Python environment builder")
3171 (description
3172 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 3173 (license license:expat)))
5731cae3
DT
3174
3175(define-public python2-virtualenv
3176 (package-with-python2 python-virtualenv))
8176d4d5
DT
3177
3178(define-public python-markupsafe
3179 (package
3180 (name "python-markupsafe")
3181 (version "0.23")
3182 (source
3183 (origin
3184 (method url-fetch)
3185 (uri (string-append
3186 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
3187 version ".tar.gz"))
3188 (sha256
3189 (base32
3190 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
3191 (build-system python-build-system)
7bf837fd 3192 (home-page "https://github.com/mitsuhiko/markupsafe")
8176d4d5
DT
3193 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3194 (description
3195 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3196for Python.")
3f641af0 3197 (license license:bsd-3)))
8176d4d5
DT
3198
3199(define-public python2-markupsafe
3200 (package-with-python2 python-markupsafe))
fe34f0d1
DT
3201
3202(define-public python-jinja2
3203 (package
3204 (name "python-jinja2")
bac5fd21 3205 (version "2.9.6")
fe34f0d1
DT
3206 (source
3207 (origin
3208 (method url-fetch)
e98149b3 3209 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
3210 (sha256
3211 (base32
bac5fd21 3212 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
fe34f0d1 3213 (build-system python-build-system)
f22efa01 3214 (propagated-inputs
f3b98f4f 3215 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
3216 (home-page "http://jinja.pocoo.org/")
3217 (synopsis "Python template engine")
3218 (description
3219 "Jinja2 is a small but fast and easy to use stand-alone template engine
3220written in pure Python.")
3f641af0 3221 (license license:bsd-3)))
fe34f0d1
DT
3222
3223(define-public python2-jinja2
3224 (package-with-python2 python-jinja2))
3580ab8b 3225
f7d17ac7
EE
3226(define-public python-pystache
3227 (package
3228 (name "python-pystache")
3229 (version "0.5.4")
3230 (source (origin
3231 (method url-fetch)
3232 (uri (pypi-uri "pystache" version))
3233 (sha256
3234 (base32
3235 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3236 (build-system python-build-system)
8bd5164b
MB
3237 (arguments
3238 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
f7d17ac7
EE
3239 (home-page "http://defunkt.io/pystache/")
3240 (synopsis "Python logic-less template engine")
3241 (description
3242 "Pystache is a Python implementation of the framework agnostic,
3243logic-free templating system Mustache.")
8bd5164b
MB
3244 (license license:expat)
3245 (properties `((python2-variant . ,(delay python2-pystache))))))
f7d17ac7
EE
3246
3247(define-public python2-pystache
8bd5164b
MB
3248 (package (inherit (package-with-python2
3249 (strip-python2-variant python-pystache)))
3250 (arguments
3251 `(#:python ,python-2
3252 #:phases
3253 (modify-phases %standard-phases
3254 (replace 'check
3255 (lambda _
3256 (zero? (system* "python" "test_pystache.py")))))))))
f7d17ac7 3257
1285119b
RW
3258(define-public python-joblib
3259 (package
3260 (name "python-joblib")
f34ef331 3261 (version "0.10.3")
1285119b
RW
3262 (source (origin
3263 (method url-fetch)
f34ef331 3264 (uri (pypi-uri "joblib" version))
1285119b
RW
3265 (sha256
3266 (base32
6aa5f1ca
HG
3267 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
3268 (modules '((guix build utils)))
3269 (snippet
3270 '(begin
3271 ;; Remove pre-compiled .pyc files from source.
3272 (for-each delete-file-recursively
3273 (find-files "." "__pycache__" #:directories? #t))
3274 (for-each delete-file (find-files "." "\\.pyc$"))
3275 #t))))
1285119b 3276 (build-system python-build-system)
a8dd960a
RW
3277 (arguments
3278 `(#:phases
3279 (modify-phases %standard-phases
3280 (add-before 'check 'disable-failing-tests
3281 (lambda _
3282 ;; This numpydoc tests fails for unknown reasons
3283 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
3284 ;; This numpydoc test depends on matplotlib, which is not a
3285 ;; required input.
3286 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
3287 ;; These tests fail to execute sys.executable
3288 (substitute* "joblib/test/test_parallel.py"
3289 (("import nose" line)
3290 (string-append "from nose.plugins.skip import SkipTest\n" line))
3291 (("def test_nested_parallel_warnings" line)
3292 (string-append "@SkipTest\n" line))
3293 (("def test_parallel_with_interactively_defined_functions" line)
3294 (string-append "@SkipTest\n" line)))
3295 #t)))))
f052ec9a 3296 ;; Provide nose to enable tests command
1285119b 3297 (native-inputs
f3b98f4f 3298 `(("python-nose" ,python-nose)
f34ef331
RW
3299 ("python-sphinx" ,python-sphinx)
3300 ("python-docutils" ,python-docutils)
3301 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
3302 (home-page "http://pythonhosted.org/joblib/")
3303 (synopsis "Using Python functions as pipeline jobs")
3304 (description
3305 "Joblib is a set of tools to provide lightweight pipelining in Python.
3306In particular, joblib offers: transparent disk-caching of the output values
3307and lazy re-evaluation (memoize pattern), easy simple parallel computing
3308logging and tracing of the execution.")
3f641af0 3309 (license license:bsd-3)))
1285119b
RW
3310
3311(define-public python2-joblib
3312 (package-with-python2 python-joblib))
3313
3580ab8b
DT
3314(define-public python-docutils
3315 (package
3316 (name "python-docutils")
db4411b4 3317 (version "0.14")
3580ab8b
DT
3318 (source
3319 (origin
3320 (method url-fetch)
00e0ca7c 3321 (uri (pypi-uri "docutils" version))
3580ab8b
DT
3322 (sha256
3323 (base32
db4411b4 3324 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
3580ab8b 3325 (build-system python-build-system)
3580ab8b
DT
3326 (arguments
3327 '(#:tests? #f)) ; no setup.py test command
3328 (home-page "http://docutils.sourceforge.net/")
3329 (synopsis "Python Documentation Utilities")
3330 (description
3331 "Docutils is a modular system for processing documentation into useful
3332formats, such as HTML, XML, and LaTeX. For input Docutils supports
3333reStructuredText.")
3334 ;; Most of the source code is public domain, but some source files are
3335 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 3336 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
3337
3338(define-public python2-docutils
3339 (package-with-python2 python-docutils))
fb35b7c0
DT
3340
3341(define-public python-pygments
3342 (package
3343 (name "python-pygments")
00c78882 3344 (version "2.2.0")
fb35b7c0
DT
3345 (source
3346 (origin
3347 (method url-fetch)
9f442285 3348 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
3349 (sha256
3350 (base32
00c78882 3351 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
fb35b7c0 3352 (build-system python-build-system)
995cb99e
MB
3353 (arguments
3354 ;; FIXME: Tests require sphinx, which depends on this.
3355 '(#:tests? #f))
fb35b7c0
DT
3356 (home-page "http://pygments.org/")
3357 (synopsis "Syntax highlighting")
3358 (description
3359 "Pygments is a syntax highlighting package written in Python.")
3f641af0 3360 (license license:bsd-2)))
fb35b7c0
DT
3361
3362(define-public python2-pygments
3363 (package-with-python2 python-pygments))
9dd6078d 3364
5f94ec91
RW
3365(define-public python-sphinxcontrib-websupport
3366 (package
3367 (name "python-sphinxcontrib-websupport")
3368 (version "1.0.1")
3369 (source (origin
3370 (method url-fetch)
3371 (uri (pypi-uri "sphinxcontrib-websupport" version))
3372 (sha256
3373 (base32
3374 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
3375 (build-system python-build-system)
3376 (propagated-inputs
3377 `(("python-mock" ,python-mock)
3378 ("python-pytest" ,python-pytest)
3379 ("python-xapian-bindings" ,python-xapian-bindings)))
3380 ;; Needed for running the test suite
3381 (native-inputs
3382 `(("python-six" ,python-six)
3383 ("python-jinja2" ,python-jinja2)
3384 ("python-docutils" ,python-docutils)
3385 ("python-sphinx" ,python-sphinx)
3386 ("python-sqlalchemy" ,python-sqlalchemy)
3387 ("python-whoosh" ,python-whoosh)))
3388 (home-page "http://sphinx-doc.org/")
3389 (synopsis "Sphinx API for web applications")
3390 (description "This package provides a Python API to easily integrate
3391Sphinx documentation into your web application. It provides tools to
3392integrate Sphinx documents in web templates and to handle searches.")
3393 (license license:bsd-3)))
3394
9dd6078d
DT
3395(define-public python-sphinx
3396 (package
3397 (name "python-sphinx")
c227458a 3398 (version "1.5.1")
9dd6078d
DT
3399 (source
3400 (origin
3401 (method url-fetch)
9a8acd00 3402 (uri (pypi-uri "Sphinx" version))
9dd6078d
DT
3403 (sha256
3404 (base32
c227458a 3405 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
9dd6078d 3406 (build-system python-build-system)
03cb5f9e 3407 (arguments
c227458a
DM
3408 `(#:phases
3409 (modify-phases %standard-phases
3410 (replace 'check
3411 (lambda _
3412 ;; Requires Internet access.
3413 (delete-file "tests/test_build_linkcheck.py")
3414 (zero? (system* "make" "test")))))))
f22efa01 3415 (propagated-inputs
9a8acd00
DM
3416 `(("python-imagesize" ,python-imagesize)
3417 ("python-sphinx-alabaster-theme"
3418 ,python-sphinx-alabaster-theme)
3419 ("python-babel" ,python-babel)
3420 ("python-snowballstemmer" ,python-snowballstemmer)
9dd6078d 3421 ("python-docutils" ,python-docutils)
9a8acd00
DM
3422 ("python-jinja2" ,python-jinja2)
3423 ("python-pygments" ,python-pygments)
a10b9810 3424 ("python-requests" ,python-requests)
9a8acd00 3425 ("python-six" ,python-six)))
c227458a
DM
3426 (native-inputs
3427 `(("graphviz" ,graphviz)
3428 ("python-html5lib" ,python-html5lib)
3429 ("python-mock" ,python-mock)
a10b9810 3430 ("python-nose" ,python-nose)))
9dd6078d
DT
3431 (home-page "http://sphinx-doc.org/")
3432 (synopsis "Python documentation generator")
3433 (description "Sphinx is a tool that makes it easy to create documentation
3434for Python projects or other documents consisting of multiple reStructuredText
3435sources.")
9a8acd00
DM
3436 (license license:bsd-3)
3437 (properties `((python2-variant . ,(delay python2-sphinx))))))
9dd6078d 3438
e7304ab1
RW
3439(define-public python-sphinx-1.6
3440 (package (inherit python-sphinx)
3441 (name "python-sphinx")
3442 (version "1.6.3")
3443 (source (origin
3444 (method url-fetch)
3445 (uri (pypi-uri "Sphinx" version))
3446 (sha256
3447 (base32
3448 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
3449 (arguments
3450 `(#:phases
3451 (modify-phases %standard-phases
3452 (replace 'check
3453 (lambda _
3454 ;; Requires Internet access.
3455 (delete-file "tests/test_build_linkcheck.py")
3456 (substitute* "tests/test_build_latex.py"
3457 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
3458 "@pytest.mark.skip()"))
3459 (zero? (system* "make" "test")))))))
3460 (propagated-inputs
3461 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
3462 ,@(package-propagated-inputs python-sphinx)))
3463 (native-inputs
928da609 3464 `(("python-pytest" ,python-pytest)
e7304ab1
RW
3465 ("imagemagick" ,imagemagick) ; for "convert"
3466 ,@(package-native-inputs python-sphinx)))
3467 (properties '())))
3468
3061b331
MFM
3469(define-public python-sphinx-1.5.3
3470 (package
3471 (inherit python-sphinx)
3472 (name "python-sphinx")
3473 (version "1.5.3")
3474 (source
3475 (origin
3476 (method url-fetch)
3477 (uri (pypi-uri "Sphinx" version))
3478 (sha256
3479 (base32
3480 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3481 (native-inputs
928da609 3482 `(("python-pytest" ,python-pytest)
3061b331
MFM
3483 ,@(package-native-inputs python-sphinx)))))
3484
9dd6078d 3485(define-public python2-sphinx
9a8acd00
DM
3486 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3487 (package
3488 (inherit base)
3489 (native-inputs `(("python2-mock" ,python2-mock)
c227458a 3490 ("python2-enum34" ,python2-enum34)
9a8acd00
DM
3491 ,@(package-native-inputs base)))
3492 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3493 ,@(package-propagated-inputs base))))))
6888830b 3494
ad320b20
RW
3495(define-public python-sphinx-rtd-theme
3496 (package
3497 (name "python-sphinx-rtd-theme")
af842d45 3498 (version "0.2.4")
ad320b20
RW
3499 (source
3500 (origin
3501 (method url-fetch)
af842d45 3502 (uri (pypi-uri "sphinx_rtd_theme" version))
ad320b20
RW
3503 (sha256
3504 (base32
af842d45 3505 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
ad320b20 3506 (build-system python-build-system)
9893cff3 3507 (arguments '(#:tests? #f)) ; No tests.
9d3a15b4
LF
3508 (propagated-inputs
3509 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
3510 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3511 (synopsis "ReadTheDocs.org theme for Sphinx")
3512 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 3513 (license license:expat)))
ad320b20
RW
3514
3515(define-public python2-sphinx-rtd-theme
3516 (package-with-python2 python-sphinx-rtd-theme))
3517
d7eb680d
LF
3518(define-public python-guzzle-sphinx-theme
3519 (package
3520 (name "python-guzzle-sphinx-theme")
3521 (version "0.7.11")
3522 (source
3523 (origin
3524 (method url-fetch)
3525 (uri (pypi-uri "guzzle_sphinx_theme" version))
3526 (sha256
3527 (base32
3528 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
3529 (build-system python-build-system)
3530 (propagated-inputs
3531 `(("python-sphinx" ,python-sphinx)))
3532 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
3533 (synopsis "Sphinx theme used by Guzzle")
3534 (description "This package provides guzzle_sphinx_theme, a theme for the
3535Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
3536and several other projects.")
3537 (license license:expat)))
3538
3539(define-public python2-guzzle-sphinx-theme
3540 (package-with-python2 python-guzzle-sphinx-theme))
3541
fe94cf0c
HG
3542(define-public python-rst.linker
3543 (package
3544 (name "python-rst.linker")
3545 (version "1.7")
3546 (source
3547 (origin
3548 (method url-fetch)
3549 (uri (pypi-uri "rst.linker" version))
3550 (sha256
3551 (base32
3552 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3553 (build-system python-build-system)
3554 (propagated-inputs
22d7360b 3555 `(("python-dateutil" ,python-dateutil)
fe94cf0c
HG
3556 ("python-six" ,python-six)))
3557 (native-inputs
3558 `(("python-setuptools-scm" ,python-setuptools-scm)))
3559 ;; Test would require path.py, which would introduce a cyclic dependence.
3560 (arguments `(#:tests? #f))
3561 ;; Note: As of version 1.7 the documentation is not worth building.
3562 (home-page "https://github.com/jaraco/rst.linker")
3563 (synopsis "Sphinx plugin to add links and timestamps")
3564 (description "rst.linker allows to automatically replace text by a
3565reStructuredText external reference or timestamps. It's primary purpose is to
3566augment the changelog, but it can be used for other documents, too.")
3567 (license license:expat)))
3568
3569(define-public python2-rst.linker
3570 (package-with-python2 python-rst.linker))
3571
f4de5b3b
CAW
3572(define-public python-feedgenerator
3573 (package
3574 (name "python-feedgenerator")
d5c183d1 3575 (version "1.9")
f4de5b3b 3576 (source
f4de5b3b 3577 (origin
f0412aa2
EF
3578 (method url-fetch)
3579 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
3580 (sha256
3581 (base32
d5c183d1 3582 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
7c88bcf4
HG
3583 (modules '((guix build utils)))
3584 (snippet
3585 '(begin
3586 ;; Remove pre-compiled .pyc files from source.
3587 (for-each delete-file-recursively
3588 (find-files "." "__pycache__" #:directories? #t))
3589 (for-each delete-file (find-files "." "\\.pyc$"))
3590 #t))))
f4de5b3b 3591 (build-system python-build-system)
dae73d9b 3592 (propagated-inputs
f3b98f4f 3593 `(("python-pytz" ,python-pytz)
f4de5b3b 3594 ("python-six" ,python-six)))
f0412aa2 3595 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
3596 (synopsis
3597 "Standalone version of Django's Atom/RSS feed generator")
3598 (description
3599 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3600which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 3601 (license license:bsd-3)))
f4de5b3b
CAW
3602
3603(define-public python2-feedgenerator
3604 (package-with-python2 python-feedgenerator))
3605
59ad30e3
CAW
3606(define-public python-blinker
3607 (package
3608 (name "python-blinker")
7fb9ff4d 3609 (version "1.4")
59ad30e3
CAW
3610 (source
3611 (origin
3612 (method url-fetch)
7fb9ff4d 3613 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
3614 (sha256
3615 (base32
7fb9ff4d 3616 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 3617 (build-system python-build-system)
59ad30e3
CAW
3618 (home-page "http://pythonhosted.org/blinker/")
3619 (synopsis "Fast, simple object-to-object and broadcast signaling")
3620 (description
3621 "Blinker provides a fast dispatching system that allows any number of
3622interested parties to subscribe to events, or \"signals\".")
3623 (license license:expat)))
3624
3625(define-public python2-blinker
3626 (package-with-python2 python-blinker))
3627
b8050e71
CAW
3628(define-public pelican
3629 (package
3630 (name "pelican")
11f97c27 3631 (version "3.6.3")
b8050e71
CAW
3632 (source
3633 (origin
3634 (method url-fetch)
11f97c27 3635 (uri (pypi-uri "pelican" version))
b8050e71
CAW
3636 (sha256
3637 (base32
11f97c27 3638 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 3639 (build-system python-build-system)
f22efa01 3640 (propagated-inputs
b8050e71
CAW
3641 `(("python-feedgenerator" ,python-feedgenerator)
3642 ("python-jinja2" ,python-jinja2)
3643 ("python-pygments" ,python-pygments)
3644 ("python-docutils" ,python-docutils)
3645 ("python-pytz" ,python-pytz)
3646 ("python-blinker" ,python-blinker)
3647 ("python-unidecode" ,python-unidecode)
3648 ("python-six" ,python-six)
22d7360b 3649 ("python-dateutil" ,python-dateutil)))
b8050e71
CAW
3650 (home-page "http://getpelican.com/")
3651 (arguments
3652 `(;; XXX Requires a lot more packages to do unit tests :P
3653 #:tests? #f
3654 #:phases (modify-phases %standard-phases
3655 (add-before
3656 'install 'adjust-requires
3657 ;; Since feedgenerator is installed from git, it doesn't
3658 ;; conform to the version requirements.
3659 ;;
3660 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3661 ;; version requirement so setuptools doesn't get confused.
3662 (lambda _
3663 (substitute* "setup.py"
3664 (("['\"]feedgenerator.*?['\"]")
3665 "'feedgenerator'")))))))
3666 (synopsis "Python-based static site publishing system")
3667 (description
3668 "Pelican is a tool to generate a static blog from reStructuredText,
3669Markdown input files, and more. Pelican uses Jinja2 for templating
3670and is very extensible.")
3f641af0 3671 (license license:agpl3+)))
b8050e71 3672
240ca4aa
RW
3673(define-public python-scikit-learn
3674 (package
3675 (name "python-scikit-learn")
d7eea7d7 3676 (version "0.19.0")
240ca4aa
RW
3677 (source
3678 (origin
3679 (method url-fetch)
3680 (uri (string-append
3681 "https://github.com/scikit-learn/scikit-learn/archive/"
3682 version ".tar.gz"))
7e21b9fb 3683 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3684 (sha256
3685 (base32
d7eea7d7 3686 "0g7q4ri75mj93wpa9bp83a3jmrf3dm5va9h7k4zkbcxr6bgqka15"))))
240ca4aa
RW
3687 (build-system python-build-system)
3688 (arguments
3689 `(#:phases
4d25c486
MB
3690 (modify-phases %standard-phases
3691 (delete 'check)
3692 (add-after 'install 'check
3693 ;; Running tests from the source directory requires
3694 ;; an "inplace" build with paths relative to CWD.
3695 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3696 ;; Use the installed version instead.
3697 (lambda* (#:key inputs outputs #:allow-other-keys)
3698 (add-installed-pythonpath inputs outputs)
3699 ;; some tests require access to "$HOME"
3700 (setenv "HOME" "/tmp")
3701 ;; Step out of the source directory just to be sure.
3702 (chdir "..")
3703 (zero? (system* "nosetests" "-v" "sklearn")))))))
240ca4aa 3704 (inputs
328bb95d
HG
3705 `(("openblas" ,openblas)))
3706 (native-inputs
8e401ab6
RW
3707 `(("python-nose" ,python-nose)
3708 ("python-cython" ,python-cython)))
240ca4aa
RW
3709 (propagated-inputs
3710 `(("python-numpy" ,python-numpy)
3711 ("python-scipy" ,python-scipy)))
3712 (home-page "http://scikit-learn.org/")
3713 (synopsis "Machine Learning in Python")
3714 (description
3715 "Scikit-learn provides simple and efficient tools for data
3716mining and data analysis.")
1b5241c5 3717 (license license:bsd-3)))
240ca4aa
RW
3718
3719(define-public python2-scikit-learn
1b5241c5 3720 (package-with-python2 python-scikit-learn))
240ca4aa 3721
12f8f9bb
RW
3722(define-public python-scikit-image
3723 (package
3724 (name "python-scikit-image")
3725 (version "0.11.3")
3726 (source
3727 (origin
3728 (method url-fetch)
3729 (uri (string-append
3730 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3731 version ".tar.gz"))
3732 (sha256
3733 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3734 (build-system python-build-system)
9026e689
MB
3735 (arguments
3736 ;; TODO: Some tests require running X11 server. Disable them?
3737 '(#:tests? #f))
b83e2333 3738 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3739 (propagated-inputs
3740 `(("python-matplotlib" ,python-matplotlib)
3741 ("python-networkx" ,python-networkx)
12f8f9bb 3742 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3743 ("python-pillow" ,python-pillow)))
3744 (native-inputs
b83e2333
HG
3745 `(("python-numpy" ,python-numpy)
3746 ("python-cython" ,python-cython)
3747 ("python-six" ,python-six)))
12f8f9bb
RW
3748 (home-page "http://scikit-image.org/")
3749 (synopsis "Image processing in Python")
3750 (description
e881752c 3751 "Scikit-image is a collection of algorithms for image processing.")
12733594 3752 (license license:bsd-3)))
12f8f9bb
RW
3753
3754(define-public python2-scikit-image
12733594 3755 (package-with-python2 python-scikit-image))
12f8f9bb 3756
5394a6a6
RW
3757(define-public python-redis
3758 (package
3759 (name "python-redis")
911a8faf 3760 (version "2.10.5")
5394a6a6
RW
3761 (source
3762 (origin
3763 (method url-fetch)
911a8faf 3764 (uri (pypi-uri "redis" version))
5394a6a6 3765 (sha256
911a8faf 3766 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
5394a6a6
RW
3767 (build-system python-build-system)
3768 ;; Tests require a running Redis server
3769 (arguments '(#:tests? #f))
cf8124b0
HG
3770 ;; As long as we are not running test, we do not need this input :-)
3771 ;;(native-inputs
3772 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3773 (home-page "https://github.com/andymccurdy/redis-py")
3774 (synopsis "Redis Python client")
3775 (description
3776 "This package provides a Python interface to the Redis key-value store.")
3777 (license license:expat)))
3778
3779(define-public python2-redis
3780 (package-with-python2 python-redis))
3781
748cef5b
RW
3782(define-public python-rq
3783 (package
3784 (name "python-rq")
eed206cb 3785 (version "0.7.1")
748cef5b
RW
3786 (source
3787 (origin
3788 (method url-fetch)
eed206cb 3789 (uri (pypi-uri "rq" version))
748cef5b 3790 (sha256
eed206cb 3791 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
748cef5b
RW
3792 (build-system python-build-system)
3793 (propagated-inputs
3794 `(("python-click" ,python-click)
3795 ("python-redis" ,python-redis)))
748cef5b
RW
3796 (home-page "http://python-rq.org/")
3797 (synopsis "Simple job queues for Python")
3798 (description
3799 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3800processing them in the background with workers. It is backed by Redis and it
3801is designed to have a low barrier to entry.")
3f641af0 3802 (license license:bsd-2)))
748cef5b
RW
3803
3804(define-public python2-rq
3805 (package-with-python2 python-rq))
3806
6888830b
FB
3807(define-public python-cython
3808 (package
3809 (name "python-cython")
58816c3d 3810 (version "0.27")
6888830b
FB
3811 (source
3812 (origin
3813 (method url-fetch)
56918e26 3814 (uri (pypi-uri "Cython" version))
6888830b
FB
3815 (sha256
3816 (base32
58816c3d 3817 "02y0pp1nx77b8s1mpxc6da2dccl6wd31pp4ksi9via479qcvacmr"))))
6888830b
FB
3818 (build-system python-build-system)
3819 ;; we need the full python package and not just the python-wrapper
3820 ;; because we need libpython3.3m.so
3821 (inputs
3822 `(("python" ,python)))
3823 (arguments
3824 `(#:phases
b92f651b
EF
3825 (modify-phases %standard-phases
3826 (add-before 'check 'set-HOME
3827 ;; some tests require access to "$HOME/.cython"
e3b861ce 3828 (lambda _ (setenv "HOME" "/tmp") #t))
b92f651b
EF
3829 (replace 'check
3830 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3831 (home-page "http://cython.org/")
3832 (synopsis "C extensions for Python")
3833 (description "Cython is an optimising static compiler for both the Python
3834programming language and the extended Cython programming language. It makes
3835writing C extensions for Python as easy as Python itself.")
3f641af0 3836 (license license:asl2.0)
48b311b1 3837 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3838
3839(define-public python2-cython
48b311b1
LC
3840 (package (inherit (package-with-python2
3841 (strip-python2-variant python-cython)))
6888830b
FB
3842 (name "python2-cython")
3843 (inputs
3844 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3845
ee5fb7ee
AV
3846;; The RPython toolchain currently does not support Python 3.
3847(define-public python2-rpython
3848 (package
3849 (name "python2-rpython")
3850 (version "0.1.4")
3851 (source
3852 (origin
3853 (method url-fetch)
3854 (uri (pypi-uri "rpython" version))
3855 (sha256
3856 (base32
3857 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3858 (build-system python-build-system)
3859 (arguments `(#:python ,python-2))
3860 (native-inputs
f3b98f4f 3861 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3862 (home-page "https://rpython.readthedocs.org")
3863 (synopsis "Framework for implementing interpreters and virtual machines")
3864 (description "RPython is a translation and support framework for
3865producing implementations of dynamic languages, emphasizing a clean separation
3866between language specification and implementation aspects.")
3867 (license license:expat)))
3868
67a08f18
RW
3869;; NOTE: when upgrading numpy please make sure that python-pandas and
3870;; python-scipy still build, as these three packages are often used together.
7ccb71e0 3871(define-public python-numpy
0da98533 3872 (package
7ccb71e0 3873 (name "python-numpy")
eaa1db1d 3874 (version "1.12.0")
0da98533
FB
3875 (source
3876 (origin
3877 (method url-fetch)
eaa1db1d
RW
3878 (uri (string-append
3879 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3880 (file-name (string-append name "-" version ".tar.gz"))
0da98533
FB
3881 (sha256
3882 (base32
eaa1db1d 3883 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
0da98533
FB
3884 (build-system python-build-system)
3885 (inputs
328bb95d 3886 `(("openblas" ,openblas)
cba256f8 3887 ("lapack" ,lapack)))
0da98533 3888 (native-inputs
eaa1db1d 3889 `(("python-cython" ,python-cython)
7ccb71e0 3890 ("python-nose" ,python-nose)
2efabc55 3891 ("gfortran" ,gfortran)))
0da98533
FB
3892 (arguments
3893 `(#:phases
2efabc55
HG
3894 (modify-phases %standard-phases
3895 (add-before 'build 'set-environment-variables
3896 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3897 (call-with-output-file "site.cfg"
3898 (lambda (port)
cba256f8
RW
3899 (format port
3900 "[openblas]
dbdfe515
RW
3901libraries = openblas
3902library_dirs = ~a/lib
3903include_dirs = ~a/include
cba256f8 3904
2efabc55
HG
3905# backslash-n to make emacs happy
3906\n[lapack]
cba256f8
RW
3907lapack_libs = lapack
3908library_dirs = ~a/lib
3909include_dirs = ~a/include
3910"
3911 (assoc-ref inputs "openblas")
3912 (assoc-ref inputs "openblas")
3913 (assoc-ref inputs "lapack")
3914 (assoc-ref inputs "lapack"))))
1033cdbb
TD
3915 ;; Make /gnu/store/...-bash-.../bin/sh the default shell, instead of
3916 ;; /bin/sh.
3917 (substitute* "numpy/distutils/exec_command.py"
3918 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3919 (string-append match-start (assoc-ref inputs "bash") match-end)))
dbdfe515
RW
3920 ;; Use "gcc" executable, not "cc".
3921 (substitute* "numpy/distutils/system_info.py"
3922 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3923 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3924 #t))
6a843168
FB
3925 ;; Tests can only be run after the library has been installed and not
3926 ;; within the source directory.
2efabc55
HG
3927 (delete 'check)
3928 (add-after 'install 'check
3929 (lambda* (#:key outputs inputs #:allow-other-keys)
3930 ;; Make installed package available for running the tests
3931 (add-installed-pythonpath inputs outputs)
6a843168 3932 (with-directory-excursion "/tmp"
89b5c60e 3933 (zero? (system* "python" "-c"
2efabc55 3934 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3935 (home-page "http://www.numpy.org/")
3936 (synopsis "Fundamental package for scientific computing with Python")
3937 (description "NumPy is the fundamental package for scientific computing
e881752c 3938with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3939object, sophisticated (broadcasting) functions, tools for integrating C/C++
3940and Fortran code, useful linear algebra, Fourier transform, and random number
3941capabilities.")
3f641af0 3942 (license license:bsd-3)))
0da98533 3943
7ccb71e0
TD
3944(define-public python2-numpy
3945 (package-with-python2 python-numpy))
15bfe6d6 3946
67a08f18
RW
3947(define-public python-numpy-next
3948 (package (inherit python-numpy)
3949 (name "python-numpy-next")
3950 (version "1.13.1")
3951 (source
3952 (origin
3953 (method url-fetch)
3954 (uri (pypi-uri "numpy" version ".zip"))
3955 (sha256
3956 (base32
3957 "1fsgkhh1vdkhmlz8vmdgxnj9n9yaanckxxzz9s0b4p08fqvjic69"))))
3958 (native-inputs
3959 `(("unzip" ,unzip)
3960 ("python-cython" ,python-cython)
3961 ("python-nose" ,python-nose)
3962 ("gfortran" ,gfortran)))))
3963
3964(define-public python2-numpy-next
3965 (package-with-python2 python-numpy-next))
3966
460fccd4 3967(define-public python-munch
3968 (package
3969 (name "python-munch")
3970 (version "2.0.4")
3971 (source
3972 (origin
3973 (method url-fetch)
3974 (uri (pypi-uri "munch" version))
3975 (sha256
3976 (base32
3977 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3978 (build-system python-build-system)
3979 (home-page "https://github.com/Infinidat/munch")
3980 (synopsis "Dot-accessible dictionary")
3981 (description "Munch is a dot-accessible dictionary similar to JavaScript
3982objects.")
3983 (license license:expat)))
3984
3985(define-public python2-munch
3986 (package-with-python2 python-munch))
3987
beed6abc
RW
3988(define-public python-colormath
3989 (package
3990 (name "python-colormath")
3991 (version "2.1.1")
3992 (source
3993 (origin
3994 (method url-fetch)
3995 (uri (pypi-uri "colormath" version))
3996 (sha256
3997 (base32
3998 "01wp5xwm0a89wdm1dc9rr1ij90idzdiiipxdj1yslhqzkhnjnfh0"))))
3999 (build-system python-build-system)
4000 (propagated-inputs
4001 `(("python-networkx" ,python-networkx)
4002 ("python-numpy" ,python-numpy)))
4003 (home-page "https://github.com/gtaylor/python-colormath")
4004 (synopsis "Color math and conversion library")
4005 (description
4006 "This is a Python library for color math and conversions.")
4007 (license license:bsd-3)))
4008
4009(define-public python2-colormath
4010 (package-with-python2 python-colormath))
4011
4a7d2009
RW
4012(define-public python-spectra
4013 (package
4014 (name "python-spectra")
4015 (version "0.0.8")
4016 (source
4017 (origin
4018 (method url-fetch)
4019 (uri (pypi-uri "spectra" version))
4020 (sha256
4021 (base32
4022 "0n87kzhpkml2s2q91rdkl8wz2kkv5b0bkrgww45lxa5vq34qh6w5"))))
4023 (build-system python-build-system)
4024 (arguments
4025 `(#:phases
4026 (modify-phases %standard-phases
4027 (replace 'check
4028 (lambda _
4029 (zero? (system* "nosetests" "-v")))))))
4030 (propagated-inputs
4031 `(("python-colormath" ,python-colormath)))
4032 (native-inputs
4033 `(("python-nose" ,python-nose)))
4034 (home-page "http://github.com/jsvine/spectra")
4035 (synopsis "Color scales and color conversion")
4036 (description
4037 "This package provides a Python library intended to make color math,
4038color scales, and color space conversion easy. It has support for:
4039
4040@enumerate
4041@item Color scales
4042@item Color ranges
4043@item Color blending
4044@item Brightening/darkening colors
4045@item Saturating/desaturating colors
4046@item Conversion to/from multiple color spaces.
4047@end enumerate\n")
4048 (license license:expat)))
4049
4050(define-public python2-spectra
4051 (package-with-python2 python-spectra))
4052
3a1bfe18
RW
4053(define-public python2-fastlmm
4054 (package
4055 (name "python2-fastlmm")
154d0016 4056 (version "0.2.21")
3a1bfe18
RW
4057 (source
4058 (origin
4059 (method url-fetch)
b074e7d4 4060 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
4061 (sha256
4062 (base32
154d0016 4063 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
4064 (build-system python-build-system)
4065 (arguments
4066 `(#:python ,python-2)) ; only Python 2.7 is supported
4067 (propagated-inputs
4068 `(("python2-numpy" ,python2-numpy)
4069 ("python2-scipy" ,python2-scipy)
4070 ("python2-matplotlib" ,python2-matplotlib)
4071 ("python2-pandas" ,python2-pandas)
4072 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
4073 ("python2-pysnptools" ,python2-pysnptools)))
4074 (native-inputs
4075 `(("unzip" ,unzip)
2efabc55 4076 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
4077 ("python2-mock" ,python2-mock)
4078 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
4079 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
4080 (synopsis "Perform genome-wide association studies on large data sets")
4081 (description
4082 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
4083Models, is a program for performing both single-SNP and SNP-set genome-wide
4084association studies (GWAS) on extremely large data sets.")
3f641af0 4085 (license license:asl2.0)))
3a1bfe18 4086
7ccb71e0
TD
4087(define-public python-numpy-documentation
4088 (package
4089 (name "python-numpy-documentation")
4090 (version (package-version python-numpy))
4091 (source (package-source python-numpy))
4092 (build-system python-build-system)
2ee8869a 4093 (native-inputs
7ccb71e0
TD
4094 `(("python-matplotlib" ,python-matplotlib)
4095 ("python-numpy" ,python-numpy)
4096 ("pkg-config" ,pkg-config)
2efabc55
HG
4097 ("python-sphinx" ,python-sphinx)
4098 ("python-numpydoc" ,python-numpydoc)
8b89c171
RW
4099 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4100 texlive-fonts-ec
4101 texlive-generic-ifxetex
4102 texlive-generic-pdftex
4103 texlive-latex-amsfonts
4104 texlive-latex-capt-of
4105 texlive-latex-cmap
4106 texlive-latex-environ
4107 texlive-latex-eqparbox
4108 texlive-latex-etoolbox
4109 texlive-latex-expdlist
4110 texlive-latex-fancyhdr
4111 texlive-latex-fancyvrb
4112 texlive-latex-fncychap
4113 texlive-latex-float
4114 texlive-latex-framed
4115 texlive-latex-geometry
4116 texlive-latex-graphics
4117 texlive-latex-hyperref
4118 texlive-latex-mdwtools
4119 texlive-latex-multirow
4120 texlive-latex-oberdiek
4121 texlive-latex-parskip
4122 texlive-latex-preview
4123 texlive-latex-tabulary
4124 texlive-latex-threeparttable
4125 texlive-latex-titlesec
4126 texlive-latex-trimspaces
4127 texlive-latex-ucs
4128 texlive-latex-upquote
4129 texlive-latex-url
4130 texlive-latex-varwidth
4131 texlive-latex-wrapfig)))
2ee8869a
FB
4132 ("texinfo" ,texinfo)
4133 ("perl" ,perl)
7ccb71e0
TD
4134 ("scipy-sphinx-theme"
4135 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4136 (method git-fetch)
4137 (uri (git-reference
4138 (url "https://github.com/scipy/scipy-sphinx-theme.git")
67416769 4139 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
7ccb71e0
TD
4140 (sha256
4141 (base32
67416769 4142 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
7ccb71e0 4143 ,@(package-native-inputs python-numpy)))
2ee8869a 4144 (arguments
7ccb71e0
TD
4145 `(#:tests? #f ; we're only generating the documentation
4146 #:phases
4147 (modify-phases %standard-phases
4148 (delete 'build)
4149 (replace 'install
4150 (lambda* (#:key inputs outputs #:allow-other-keys)
4151 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4152 (doc (string-append
4153 data "/doc/" ,name "-"
4154 ,(package-version python-numpy)))
4155 (info-reader (string-append data "/info"))
4156 (html (string-append doc "/html"))
4157 (scipy-sphinx-theme "scipy-sphinx-theme")
4158 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4159 (pyver ,(string-append "PYVER=")))
8b89c171
RW
4160
4161 ;; FIXME: this is needed to for texlive-union to generate
4162 ;; fonts, which are not found.
4163 (setenv "HOME" "/tmp")
4164
7ccb71e0
TD
4165 (with-directory-excursion "doc"
4166 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4167 (mkdir-p html)
4168 (system* "make" "html" pyver)
4169 (system* "make" "latex" "PAPER=a4" pyver)
4170 (system* "make" "-C" "build/latex"
4171 "all-pdf" "PAPER=a4" pyver)
4172 ;; FIXME: Generation of the info file fails.
4173 ;; (system* "make" "info" pyver)
4174 ;; (mkdir-p info)
4175 ;; (copy-file "build/texinfo/numpy.info"
4176 ;; (string-append info "/numpy.info"))
4177 (for-each (lambda (file)
4178 (copy-file (string-append "build/latex" file)
4179 (string-append doc file)))
4180 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4181 (with-directory-excursion "build/html"
4182 (for-each (lambda (file)
4183 (let* ((dir (dirname file))
4184 (tgt-dir (string-append html "/" dir)))
4185 (unless (equal? "." dir)
4186 (mkdir-p tgt-dir))
4187 (install-file file html)))
4188 (find-files "." ".*")))))
4189 #t)))))
4190 (home-page (package-home-page python-numpy))
4191 (synopsis "Documentation for the python-numpy package")
4192 (description (package-description python-numpy))
4193 (license (package-license python-numpy))))
2ee8869a 4194
7ccb71e0
TD
4195(define-public python2-numpy-documentation
4196 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4197 (package
4198 (inherit numpy-documentation)
4199 (native-inputs `(("python2-functools32" ,python2-functools32)
4200 ,@(package-native-inputs numpy-documentation))))))
2ee8869a 4201
0151a8df 4202(define-public python-pygit2
4203 (package
4204 (name "python-pygit2")
8c0c0c4d 4205 (version "0.26.0")
0151a8df 4206 (source
4207 (origin
4208 (method url-fetch)
4209 (uri (pypi-uri "pygit2" version))
4210 (sha256
4211 (base32
8c0c0c4d 4212 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
bb6043fe
MB
4213 (patches
4214 (search-patches "python-pygit2-disable-network-tests.patch"))))
0151a8df 4215 (build-system python-build-system)
4216 (propagated-inputs
4217 `(("python-six" ,python-six)
4218 ("python-cffi" ,python-cffi)
4219 ("libgit2" ,libgit2)
4220 ("python-tox" ,python-tox)))
4221 (home-page "https://github.com/libgit2/pygit2")
4222 (synopsis "Python bindings for libgit2")
4223 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4224library, libgit2 implements Git plumbing.")
4225 ;; GPL2.0 only, with linking exception.
4226 (license license:gpl2)))
4227
4228(define-public python2-pygit2
4229 (package-with-python2 python-pygit2))
4230
15bfe6d6
FB
4231(define-public python-pyparsing
4232 (package
4233 (name "python-pyparsing")
9e5ee6b6 4234 (version "2.2.0")
15bfe6d6
FB
4235 (source
4236 (origin
4237 (method url-fetch)
de67e922
LF
4238 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
4239 "/pyparsing-" version
15bfe6d6
FB
4240 "/pyparsing-" version ".tar.gz"))
4241 (sha256
4242 (base32
9e5ee6b6 4243 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
15bfe6d6
FB
4244 (build-system python-build-system)
4245 (outputs '("out" "doc"))
4246 (arguments
4247 `(#:tests? #f ; no test target
15bfe6d6 4248 #:phases
007176e7
MB
4249 (modify-phases %standard-phases
4250 (add-after 'install 'install-doc
4251 (lambda* (#:key outputs #:allow-other-keys)
4252 (let* ((doc (string-append (assoc-ref outputs "doc")
4253 "/share/doc/" ,name "-" ,version))
4254 (html-doc (string-append doc "/html"))
4255 (examples (string-append doc "/examples")))
4256 (mkdir-p html-doc)
4257 (mkdir-p examples)
4258 (for-each
4259 (lambda (dir tgt)
4260 (map (lambda (file)
4261 (install-file file tgt))
4262 (find-files dir ".*")))
4263 (list "docs" "htmldoc" "examples")
4264 (list doc html-doc examples))
4265 #t))))))
15bfe6d6
FB
4266 (home-page "http://pyparsing.wikispaces.com")
4267 (synopsis "Python parsing class library")
4268 (description
4269 "The pyparsing module is an alternative approach to creating and
4270executing simple grammars, vs. the traditional lex/yacc approach, or the use
4271of regular expressions. The pyparsing module provides a library of classes
4272that client code uses to construct the grammar directly in Python code.")
bd3fa666 4273 (license license:expat)))
15bfe6d6
FB
4274
4275(define-public python2-pyparsing
4276 (package-with-python2 python-pyparsing))
4277
ec00de35
FB
4278(define-public python-numpydoc
4279 (package
4280 (name "python-numpydoc")
4281 (version "0.5")
4282 (source
4283 (origin
4284 (method url-fetch)
89b5c60e 4285 (uri (string-append
ec00de35
FB
4286 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
4287 version ".tar.gz"))
4288 (sha256
4289 (base32
5e4d8f67
AE
4290 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
4291 (modules '((guix build utils)))
4292 (snippet
4293 '(begin
4294 ;; Drop a test requiring matplotlib, which we cannot add as an
4295 ;; input since it would create a circular dependency: Extend the
4296 ;; test for Python 3, where it is already dropped, to Python 2.
4297 (substitute* "numpydoc/tests/test_plot_directive.py"
4298 (("3") "2"))))))
ec00de35 4299 (build-system python-build-system)
fe4a8da4 4300 (propagated-inputs
213d1745
HG
4301 `(("python-sphinx" ,python-sphinx)))
4302 (native-inputs
4303 `(("python-nose" ,python-nose)))
ec00de35
FB
4304 (home-page "https://pypi.python.org/pypi/numpydoc")
4305 (synopsis
4306 "Numpy's Sphinx extensions")
4307 (description
4308 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 4309 (license license:bsd-2)))
ec00de35
FB
4310
4311(define-public python2-numpydoc
5e4d8f67 4312 (package-with-python2 python-numpydoc))
1c65314c 4313
1e656049
RW
4314(define-public python-numexpr
4315 (package
4316 (name "python-numexpr")
cb91edeb 4317 (version "2.6.4")
1e656049
RW
4318 (source
4319 (origin
4320 (method url-fetch)
26112c0a 4321 (uri (pypi-uri "numexpr" version))
1e656049
RW
4322 (sha256
4323 (base32
cb91edeb 4324 "1kpnbb5d5n927113zccfibn16z7gidjipyac6kbbhzs0lnizkgph"))))
1e656049
RW
4325 (build-system python-build-system)
4326 (arguments `(#:tests? #f)) ; no tests included
4327 (propagated-inputs
4328 `(("python-numpy" ,python-numpy)))
4329 (home-page "https://github.com/pydata/numexpr")
4330 (synopsis "Fast numerical expression evaluator for NumPy")
4331 (description
4332 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4333expressions that operate on arrays are accelerated and use less memory than
4334doing the same calculation in Python. In addition, its multi-threaded
4335capabilities can make use of all your cores, which may accelerate
4336computations, most specially if they are not memory-bounded (e.g. those using
4337transcendental functions).")
f210e944 4338 (license license:expat)))
1e656049
RW
4339
4340(define-public python2-numexpr
f210e944 4341 (package-with-python2 python-numexpr))
1e656049 4342
361d982c
MB
4343(define-public python-cycler
4344 (package
4345 (name "python-cycler")
4346 (version "0.10.0")
4347 (source (origin
4348 (method url-fetch)
4349 (uri (pypi-uri "cycler" version))
4350 (sha256
4351 (base32
4352 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4353 (build-system python-build-system)
4354 (arguments
4355 ;; XXX: The current version requires 'coveralls' which we don't have.
4356 ;; Enable this for the next release which uses 'python-pytest'.
4357 '(#:tests? #f))
4358 (propagated-inputs
4359 `(("python-six" ,python-six)))
4360 (home-page "http://matplotlib.org/cycler/")
4361 (synopsis "Composable keyword argument iterator")
4362 (description
4363 "When using @code{matplotlib} and plotting more than one line, it is
4364common to want to be able to want to be able to cycle over one or more artist
4365styles; but the plotting logic can quickly become involved.
4366To address this and enable easy cycling over arbitrary @code{kwargs}, the
4367@code{Cycler} class was developed.")
4368 (license license:bsd-3)))
4369
4370(define-public python2-cycler
4371 (package-with-python2 python-cycler))
4372
2aa6d3ae
TD
4373(define-public python-colorspacious
4374 (package
4375 (name "python-colorspacious")
4376 (version "1.1.0")
4377 (source
4378 (origin
4379 (method url-fetch)
4380 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
4381 version ".tar.gz"))
4382 (file-name (string-append name "-" version))
4383 (sha256
4384 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
4385 (build-system python-build-system)
4386 (propagated-inputs
4387 `(("python-numpy" ,python-numpy)))
ba062b3e
TD
4388 (native-inputs
4389 `(("python-nose" ,python-nose)))
4390 (arguments
4391 `(#:phases
4392 (modify-phases %standard-phases
4393 (replace 'check
4394 (lambda _
4395 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
2aa6d3ae
TD
4396 (home-page "https://github.com/njsmith/colorspacious")
4397 (synopsis "Python library for colorspace conversions")
4398 (description "@code{colorspacious} is a Python library that lets you
4399convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4400 (license license:expat)))
4401
4402(define-public python2-colorspacious
4403 (package-with-python2 python-colorspacious))
4404
1c65314c
FB
4405(define-public python-matplotlib
4406 (package
4407 (name "python-matplotlib")
71d20587 4408 (version "2.0.2")
1c65314c
FB
4409 (source
4410 (origin
4411 (method url-fetch)
71d20587 4412 (uri (pypi-uri "matplotlib" version))
1c65314c
FB
4413 (sha256
4414 (base32
71d20587 4415 "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg"))))
1c65314c 4416 (build-system python-build-system)
25f9a068 4417 (propagated-inputs ; the following packages are all needed at run time
4535a93a
TD
4418 `(("python-cycler" ,python-cycler)
4419 ("python-pyparsing" ,python-pyparsing)
25f9a068
FB
4420 ("python-pygobject" ,python-pygobject)
4421 ("gobject-introspection" ,gobject-introspection)
1bbc659f 4422 ("python-tkinter" ,python "tk")
22d7360b 4423 ("python-dateutil" ,python-dateutil)
7ccb71e0 4424 ("python-numpy" ,python-numpy)
ca33a3ad
HG
4425 ("python-pillow" ,python-pillow)
4426 ("python-pytz" ,python-pytz)
4427 ("python-six" ,python-six)
25f9a068
FB
4428 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
4429 ;; from 'gtk+') provides the required 'typelib' files used by
4430 ;; 'gobject-introspection'. The location of these files is set with the
4431 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
4432 ;; is done automatically by a 'native-search-path' procedure. However,
4433 ;; at run-time the user must set this variable as follows:
4434 ;;
4435 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
4436 ("gtk+" ,gtk+)
4437 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4438 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4439 ;; object. For this reason we need to import both libraries.
4440 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
4441 ("python-pycairo" ,python-pycairo)
4442 ("python-cairocffi" ,python-cairocffi)))
1c65314c 4443 (inputs
ca33a3ad 4444 `(("libpng" ,libpng)
1c65314c
FB
4445 ("imagemagick" ,imagemagick)
4446 ("freetype" ,freetype)
25f9a068
FB
4447 ("cairo" ,cairo)
4448 ("glib" ,glib)
1c65314c 4449 ;; FIXME: Add backends when available.
1c65314c 4450 ;("python-wxpython" ,python-wxpython)
4535a93a 4451 ("python-pyqt" ,python-pyqt)
1bbc659f
FB
4452 ("tcl" ,tcl)
4453 ("tk" ,tk)))
1c65314c
FB
4454 (native-inputs
4455 `(("pkg-config" ,pkg-config)
ca33a3ad 4456 ("python-nose" ,python-nose)
4535a93a 4457 ("python-mock" ,python-mock)))
1c65314c
FB
4458 (arguments
4459 `(#:phases
42b7009a
DM
4460 (modify-phases %standard-phases
4461 (add-before 'build 'configure-environment
4462 (lambda* (#:key outputs inputs #:allow-other-keys)
4463 (let ((cairo (assoc-ref inputs "cairo"))
4464 (gtk+ (assoc-ref inputs "gtk+")))
4465 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
4466 ;; has not effect.
4467 (setenv "LD_LIBRARY_PATH"
4468 (string-append cairo "/lib:" gtk+ "/lib"))
4469 (setenv "HOME" (getcwd))
4470 (call-with-output-file "setup.cfg"
4471 (lambda (port)
4472 (format port "[directories]~%
1bbc659f 4473basedirlist = ~a,~a~%
57b7b8cd 4474 [rc_options]~%
1bbc659f
FB
4475backend = TkAgg~%"
4476 (assoc-ref inputs "tcl")
4535a93a
TD
4477 (assoc-ref inputs "tk")))))
4478 #t)))))
1c65314c
FB
4479 (home-page "http://matplotlib.org")
4480 (synopsis "2D plotting library for Python")
4481 (description
4482 "Matplotlib is a Python 2D plotting library which produces publication
4483quality figures in a variety of hardcopy formats and interactive environments
4484across platforms. Matplotlib can be used in Python scripts, the python and
4485ipython shell, web application servers, and six graphical user interface
4486toolkits.")
3f641af0 4487 (license license:psfl)
57b7b8cd 4488 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 4489
764c077b 4490(define-public python2-matplotlib
57b7b8cd
LC
4491 (let ((matplotlib (package-with-python2
4492 (strip-python2-variant python-matplotlib))))
764c077b 4493 (package (inherit matplotlib)
88c26834
AE
4494 ;; Make sure to use special packages for Python 2 instead
4495 ;; of those automatically rewritten by package-with-python2.
89b5c60e 4496 (propagated-inputs
7ca0dbc3 4497 `(("python2-pycairo" ,python2-pycairo)
4535a93a 4498 ("python2-functools32" ,python2-functools32)
764c077b 4499 ("python2-pygobject-2" ,python2-pygobject-2)
4535a93a 4500 ("python2-subprocess32" ,python2-subprocess32)
1bbc659f
FB
4501 ("python2-tkinter" ,python-2 "tk")
4502 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4503 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 4504
4535a93a
TD
4505(define-public python-matplotlib-documentation
4506 (package
4507 (name "python-matplotlib-documentation")
4508 (version (package-version python-matplotlib))
4509 (source (package-source python-matplotlib))
4510 (build-system python-build-system)
4511 (native-inputs
4512 `(("python-matplotlib" ,python-matplotlib)
4513 ("python-colorspacious" ,python-colorspacious)
4514 ("python-sphinx" ,python-sphinx)
4515 ("python-numpydoc" ,python-numpydoc)
4516 ("python-ipython" ,python-ipython)
1eaaea41
TD
4517 ("python-mock" ,python-mock)
4518 ("graphviz" ,graphviz)
4535a93a
TD
4519 ("texlive" ,texlive)
4520 ("texinfo" ,texinfo)
4521 ,@(package-native-inputs python-matplotlib)))
4522 (arguments
4523 `(#:tests? #f ; we're only generating documentation
4524 #:phases
4525 (modify-phases %standard-phases
1eaaea41
TD
4526 (replace 'build
4527 (lambda _
4528 (chdir "doc")
4529 ;; Produce pdf in 'A4' format.
4530 (substitute* "conf.py"
4531 (("latex_paper_size = 'letter'") "")
4532 ;; latex_paper_size is deprecated -> set paper size using
4533 ;; latex_elements
4534 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4535 ;; insert at a point where latex_elements{} is defined:
4536 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4537 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4535a93a 4538 (replace 'install
42b7009a 4539 (lambda* (#:key inputs outputs #:allow-other-keys)
4535a93a 4540 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
1eaaea41 4541 (doc (string-append data "/doc/python-matplotlib-" ,version))
42b7009a
DM
4542 (info (string-append data "/info"))
4543 (html (string-append doc "/html")))
1eaaea41
TD
4544 (mkdir-p html)
4545 (mkdir-p info)
4546 (copy-recursively "build/html" html)
4547 (symlink (string-append html "/_images")
4548 (string-append info "/matplotlib-figures"))
4549 (with-directory-excursion "build/texinfo"
4550 (substitute* "matplotlib.texi"
4551 (("@image\\{([^,]*)" all file)
4552 (string-append "@image{matplotlib-figures/" file)))
18b31516 4553 (symlink (string-append html "/_images")
1eaaea41
TD
4554 "./matplotlib-figures")
4555 (system* "makeinfo" "--no-split"
4556 "-o" "matplotlib.info" "matplotlib.texi"))
4557 (copy-file "build/texinfo/matplotlib.info"
4558 (string-append info "/matplotlib.info"))
4559 (copy-file "build/latex/Matplotlib.pdf"
4560 (string-append doc "/Matplotlib.pdf")))
4535a93a
TD
4561 #t)))))
4562 (home-page (package-home-page python-matplotlib))
4563 (synopsis "Documentation for the python-matplotlib package")
4564 (description (package-description python-matplotlib))
4565 (license (package-license python-matplotlib))))
1c65314c 4566
4535a93a
TD
4567(define-public python2-matplotlib-documentation
4568 (package-with-python2 python-matplotlib-documentation))
94914805 4569
0dde6232
RW
4570(define-public python2-pysnptools
4571 (package
4572 (name "python2-pysnptools")
a800018e 4573 (version "0.3.9")
0dde6232
RW
4574 (source
4575 (origin
4576 (method url-fetch)
3f2e9675 4577 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
4578 (sha256
4579 (base32
a800018e 4580 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
4581 (build-system python-build-system)
4582 (arguments
4583 `(#:python ,python-2)) ; only Python 2.7 is supported
4584 (propagated-inputs
4585 `(("python2-numpy" ,python2-numpy)
4586 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
4587 ("python2-pandas" ,python2-pandas)))
4588 (native-inputs
4589 `(("python2-cython" ,python2-cython)))
0dde6232 4590 (native-inputs
f3b98f4f 4591 `(("unzip" ,unzip)))
0dde6232
RW
4592 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4593 (synopsis "Library for reading and manipulating genetic data")
4594 (description
4595 "PySnpTools is a library for reading and manipulating genetic data. It
4596can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4597those files. It can also efficiently manipulate ranges of integers using set
4598operators such as union, intersection, and difference.")
3f641af0 4599 (license license:asl2.0)))
0dde6232 4600
c9b1b4f9
RW
4601(define-public python-rpy2
4602 (package
4603 (name "python-rpy2")
deee5dda 4604 (version "2.9.0")
c9b1b4f9
RW
4605 (source
4606 (origin
4607 (method url-fetch)
ec3bcbc7 4608 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
4609 (sha256
4610 (base32
deee5dda 4611 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
c9b1b4f9 4612 (build-system python-build-system)
444464ec 4613 (arguments
deee5dda
RW
4614 '(#:modules ((ice-9 ftw)
4615 (srfi srfi-1)
4616 (srfi srfi-26)
4617 (guix build utils)
4618 (guix build python-build-system))
4619 #:phases
444464ec 4620 (modify-phases %standard-phases
deee5dda
RW
4621 ;; Without this phase the test loader cannot find the directories, in
4622 ;; which it is supposed to look for test files.
4623 (add-after 'unpack 'fix-tests
4624 (lambda* (#:key outputs #:allow-other-keys)
4625 (substitute* "rpy/tests.py"
4626 (("loader.discover\\(")
4627 "loader.discover(rpy_root + '/' +"))
4628 #t))
4629 (replace 'check
444464ec 4630 (lambda* (#:key outputs inputs #:allow-other-keys)
deee5dda
RW
4631 (let ((cwd (getcwd)))
4632 (setenv "PYTHONPATH"
4633 (string-append cwd "/build/"
4634 (find (cut string-prefix? "lib" <>)
4635 (scandir (string-append cwd "/build")))
4636 ":"
4637 (getenv "PYTHONPATH"))))
22d1060e
RW
4638 ;; FIXME: Even when all tests pass, the check phase will fail.
4639 (system* "python" "-m" "rpy2.tests" "-v"))))))
482d9591 4640 (propagated-inputs
deee5dda
RW
4641 `(("python-six" ,python-six)
4642 ("python-jinja2" ,python-jinja2)
4643 ("python-pytz" ,python-pytz)))
c9b1b4f9 4644 (inputs
482d9591 4645 `(("readline" ,readline)
c9b1b4f9
RW
4646 ("icu4c" ,icu4c)
4647 ("pcre" ,pcre)
2d7c4ae3 4648 ("r-minimal" ,r-minimal)
deee5dda
RW
4649 ("r-survival" ,r-survival)
4650 ("r-ggplot2" ,r-ggplot2)
4651 ("r-rsqlite" ,r-rsqlite)
4652 ("r-dplyr" ,r-dplyr)
4653 ("r-dbplyr" ,r-dbplyr)
4654 ("python-numpy" ,python-numpy)))
c9b1b4f9 4655 (native-inputs
f3b98f4f 4656 `(("zlib" ,zlib)))
c9b1b4f9
RW
4657 (home-page "http://rpy.sourceforge.net/")
4658 (synopsis "Python interface to the R language")
4659 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4660low-level interface to R from Python, a proposed high-level interface,
4661including wrappers to graphical libraries, as well as R-like structures and
4662functions.")
c92483bd
RW
4663 ;; Any of these licenses can be picked for the R interface. The whole
4664 ;; project is released under GPLv2+ according to the license declaration
4665 ;; in "setup.py".
4666 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
c9b1b4f9 4667
bb986599
FB
4668(define-public python-scipy
4669 (package
4670 (name "python-scipy")
09efef33 4671 (version "0.19.1")
bb986599
FB
4672 (source
4673 (origin
4674 (method url-fetch)
09efef33 4675 (uri (pypi-uri "scipy" version))
bb986599
FB
4676 (sha256
4677 (base32
09efef33 4678 "1rl411bvla6q7qfdb47fpdnyjhfgzl6smpha33n9ar1klykjr6m1"))))
bb986599 4679 (build-system python-build-system)
dd86c0d1 4680 (propagated-inputs
bb986599
FB
4681 `(("python-numpy" ,python-numpy)
4682 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
4683 ("python-pyparsing" ,python-pyparsing)))
4684 (inputs
4685 `(("lapack" ,lapack)
719b01c1 4686 ("openblas" ,openblas)))
bb986599 4687 (native-inputs
35093253
TD
4688 `(("python-cython" ,python-cython)
4689 ("python-nose" ,python-nose)
dd86c0d1 4690 ("python-sphinx" ,python-sphinx)
5248d49e 4691 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 4692 ("gfortran" ,gfortran)
bb986599
FB
4693 ("perl" ,perl)))
4694 (outputs '("out" "doc"))
4695 (arguments
4696 `(#:phases
16ca6aaa 4697 (modify-phases %standard-phases
16ca6aaa
MB
4698 (add-before 'build 'configure-openblas
4699 (lambda* (#:key inputs #:allow-other-keys)
4700 (call-with-output-file "site.cfg"
4701 (lambda (port)
4702 (format port
4703 "[blas]
719b01c1
RW
4704libraries = openblas
4705library_dirs = ~a/lib
4706include_dirs = ~a/include
d548e6aa
HG
4707
4708# backslash-n to make emacs happy
4709\n[atlas]
719b01c1
RW
4710library_dirs = ~a/lib
4711atlas_libs = openblas
4712"
16ca6aaa
MB
4713 (assoc-ref inputs "openblas")
4714 (assoc-ref inputs "openblas")
4715 (assoc-ref inputs "openblas"))))
db967b64 4716 #t))
35093253
TD
4717 (add-after 'install 'install-doc
4718 (lambda* (#:key inputs outputs #:allow-other-keys)
4719 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4720 (doc (string-append data "/doc/" ,name "-" ,version))
4721 (html (string-append doc "/html"))
4722 (pyver ,(string-append "PYVER=")))
4723 ;; Make installed package available for building the
4724 ;; documentation
4725 (add-installed-pythonpath inputs outputs)
4726 (with-directory-excursion "doc"
4727 ;; Fix generation of images for mathematical expressions.
4728 (substitute* (find-files "source" "conf\\.py")
4729 (("pngmath_use_preview = True")
4730 "pngmath_use_preview = False"))
4731 (mkdir-p html)
4732 (system* "make" "html" pyver)
4733 (with-directory-excursion "build/html"
4734 (for-each (lambda (file)
4735 (let* ((dir (dirname file))
4736 (tgt-dir (string-append html "/" dir)))
4737 (install-file file html)))
4738 (find-files "." ".*")))))
4739 #t))
4740 (add-after 'unpack 'fix-tests
4741 (lambda _
4742 (substitute* "scipy/integrate/tests/test_quadpack.py"
4743 (("libm.so") "libm.so.6"))
4744 #t))
4745 ;; Tests can only be run after the library has been installed and not
4746 ;; within the source directory.
4747 (delete 'check)
4748 (add-after 'install 'check
4749 (lambda* (#:key inputs outputs #:allow-other-keys)
d548e6aa 4750 (add-installed-pythonpath inputs outputs)
35093253
TD
4751 (with-directory-excursion "/tmp"
4752 (zero? (system* "python" "-c"
4753 "import scipy; scipy.test('full')")))
4754 #t)))))
bb986599
FB
4755 (home-page "http://www.scipy.org/")
4756 (synopsis "The Scipy library provides efficient numerical routines")
4757 (description "The SciPy library is one of the core packages that make up
4758the SciPy stack. It provides many user-friendly and efficient numerical
4759routines such as routines for numerical integration and optimization.")
9200fe14 4760 (properties `((python2-variant . ,(delay python2-scipy))))
3f641af0 4761 (license license:bsd-3)))
bb986599 4762
764c077b 4763(define-public python2-scipy
35093253
TD
4764 (package-with-python2
4765 (strip-python2-variant python-scipy)))
bb986599 4766
e537c917
CB
4767(define-public python-sockjs-tornado
4768 (package
4769 (name "python-sockjs-tornado")
4770 (version "1.0.3")
4771 (source
4772 (origin
4773 (method url-fetch)
4774 (uri (pypi-uri "sockjs-tornado" version))
4775 (sha256
4776 (base32
4777 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4778 (build-system python-build-system)
4779 (arguments
4780 `(;; There are no tests, and running the test phase requires missing
4781 ;; dependencies
4782 #:tests? #f))
4783 (propagated-inputs
4784 `(("python-tornado" ,python-tornado)))
4785 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4786 (synopsis
4787 "SockJS python server implementation on top of Tornado framework")
4788 (description
4789 "SockJS-tornado provides the server side counterpart to a SockJS client
4790library, through the Tornado framework.
4791
4792SockJS provides a low latency, full duplex, cross-domain communication channel
4793between a web browser and web server.")
4794 (license license:expat)))
4795
4796(define-public python2-sockjs-tornado
4797 (package-with-python2 python-sockjs-tornado))
4798
73acc193 4799(define-public python-socksipy-branch
4800 (package
4801 (name "python-socksipy-branch")
4802 (version "1.01")
4803 (source
4804 (origin
4805 (method url-fetch)
4806 (uri (pypi-uri "SocksiPy-branch" version))
4807 (sha256
4808 (base32
4809 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4810 (build-system python-build-system)
4811 (arguments
4812 `(#:tests? #f)) ; There are no tests
4813 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4814 (synopsis "Python SOCKS module")
4815 (description
4816 "SocksiPy - A Python SOCKS client module. It provides a
4817socket-like interface that supports connections to any TCP
4818service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4819The original version was developed by Dan Haim, this is a
4820branch created by Mario Vilas to address some open issues,
4821as the original project seems to have been abandoned circa 2007.")
4822 (license license:bsd-3)))
4823
4824(define-public python2-socksipy-branch
4825 (package-with-python2 python-socksipy-branch))
4826
94914805
EB
4827(define-public python-sqlalchemy
4828 (package
4829 (name "python-sqlalchemy")
a4ba286b 4830 (version "1.0.12")
94914805
EB
4831 (source
4832 (origin
4833 (method url-fetch)
4834 (uri (string-append "https://pypi.python.org/packages/source/S/"
4835 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4836 (sha256
4837 (base32
a4ba286b 4838 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
4839 (build-system python-build-system)
4840 (native-inputs
4841 `(("python-cython" ,python-cython) ;for c extensions
4842 ("python-pytest" ,python-pytest)
4843 ("python-mock" ,python-mock))) ;for tests
4844 (arguments
dc1d3cde
KK
4845 `(#:phases
4846 (modify-phases %standard-phases
4847 (replace 'check
4848 (lambda _ (zero? (system* "py.test")))))))
94914805
EB
4849 (home-page "http://www.sqlalchemy.org")
4850 (synopsis "Database abstraction library")
4851 (description
4852 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4853gives application developers the full power and flexibility of SQL. It
4854provides a full suite of well known enterprise-level persistence patterns,
4855designed for efficient and high-performing database access, adapted into a
4856simple and Pythonic domain language.")
3f641af0 4857 (license license:x11)))
94914805
EB
4858
4859(define-public python2-sqlalchemy
4860 (package-with-python2 python-sqlalchemy))
c937562e 4861
4a093330
DM
4862(define-public python-pycodestyle
4863 (package
4864 (name "python-pycodestyle")
9b801661 4865 (version "2.3.1")
4a093330
DM
4866 (source
4867 (origin
4868 (method url-fetch)
4869 (uri (pypi-uri "pycodestyle" version))
4870 (sha256
4871 (base32
9b801661 4872 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
4a093330
DM
4873 (build-system python-build-system)
4874 (home-page "https://pycodestyle.readthedocs.io/")
4875 (synopsis "Python style guide checker")
4876 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4877Python code against some of the style conventions in
4878@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 4879 (license license:expat)))
4a093330
DM
4880
4881(define-public python2-pycodestyle
f210e944 4882 (package-with-python2 python-pycodestyle))
b91912c4
DM
4883
4884(define-public python-orderedmultidict
4885 (package
4886 (name "python-orderedmultidict")
9e2802cb 4887 (version "0.7.11")
b91912c4
DM
4888 (source
4889 (origin
4890 (method url-fetch)
4891 (uri (pypi-uri "orderedmultidict" version))
4892 (sha256
4893 (base32
9e2802cb 4894 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
b91912c4
DM
4895 (build-system python-build-system)
4896 (arguments
4897 `(#:phases
4898 (modify-phases %standard-phases
4899 (add-after 'unpack 'fix-tests
4900 (lambda _
4901 ;; The package uses nosetest for running the tests.
4902 ;; Adding this initfile allows to run the test suite
4903 ;; without requiring nosetest.
4904 (zero? (system* "touch" "tests/__init__.py")))))))
4905 (propagated-inputs
4906 `(("python-six" ,python-six)))
4907 (native-inputs
4908 `(("python-pycodestyle" ,python-pycodestyle)))
4909 (home-page "https://github.com/gruns/orderedmultidict")
4910 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4911 (description "This package contains a library for ordered multivalue
4912dictionaries. A multivalue dictionary is a dictionary that can store
4913multiple values for the same key. An ordered multivalue dictionary is a
4914multivalue dictionary that retains the order of insertions and deletions.")
f210e944 4915 (license license:unlicense)))
b91912c4
DM
4916
4917(define-public python2-orderedmultidict
f210e944 4918 (package-with-python2 python-orderedmultidict))
9dede065
DM
4919
4920(define-public python-furl
4921 (package
4922 (name "python-furl")
4923 (version "0.5.6")
4924 (source
4925 (origin
4926 (method url-fetch)
4927 (uri (pypi-uri "furl" version))
4928 (sha256
4929 (base32
4930 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4931 (build-system python-build-system)
4932 (propagated-inputs
4933 `(("python-six" ,python-six)
4934 ("python-orderedmultidict" ,python-orderedmultidict)))
4935 (native-inputs
4936 `(("python-pycodestyle" ,python-pycodestyle)))
4937 (home-page "https://github.com/gruns/furl")
4938 (synopsis "URL manipulation in Python")
4939 (description "Furl provides an easy-to-use alternative to the
4940@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 4941 (license license:unlicense)))
9dede065
DM
4942
4943(define-public python2-furl
f210e944 4944 (package-with-python2 python-furl))
462bf271 4945
4e52739c
MB
4946(define-public python-flaky
4947 (package
4948 (name "python-flaky")
4949 (version "3.4.0")
4950 (source (origin
4951 (method url-fetch)
4952 (uri (pypi-uri "flaky" version))
4953 (sha256
4954 (base32
4955 "18pkmf79rfkfpy1d2rrx3v55nxj762ilyk9rvd6s6dccxw58imsa"))))
4956 (build-system python-build-system)
4957 (arguments
4958 ;; TODO: Tests require 'coveralls' and 'genty' which are not in Guix yet.
4959 '(#:tests? #f))
4960 (home-page "https://github.com/box/flaky")
4961 (synopsis "Automatically rerun flaky tests")
4962 (description
4963 "Flaky is a plugin for @code{nose} or @code{py.test} that automatically
4964reruns flaky tests.
4965
4966Ideally, tests reliably pass or fail, but sometimes test fixtures must rely
4967on components that aren't 100% reliable. With flaky, instead of removing
f1ddfe4f 4968those tests or marking them to @code{@@skip}, they can be automatically
4e52739c
MB
4969retried.")
4970 (license license:asl2.0)))
4971
4972(define-public python2-flaky
4973 (package-with-python2 python-flaky))
4974
462bf271
DM
4975(define-public python-flask-babel
4976 (package
4977 (name "python-flask-babel")
4978 (version "0.11.1")
4979 (source
4980 (origin
4981 (method url-fetch)
4982 (uri (pypi-uri "Flask-Babel" version))
4983 (sha256
4984 (base32
4985 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4986 (build-system python-build-system)
4987 (propagated-inputs
4988 `(("python-flask" ,python-flask)
4989 ("python-babel" ,python-babel)
4990 ("python-jinja2" ,python-jinja2)
4991 ("python-pytz" ,python-pytz)))
4992 (home-page "https://github.com/python-babel/flask-babel")
4993 (synopsis "Add i18n/l10n support to Flask applications")
4994 (description "This package implements internationalization and localization
4995support for Flask. This is based on the Python babel module as well as pytz -
4996both of which are installed automatically if you install this library.")
f210e944 4997 (license license:bsd-3)))
462bf271
DM
4998
4999(define-public python2-flask-babel
f210e944 5000 (package-with-python2 python-flask-babel))
4a093330 5001
de2966cf
EF
5002(define-public python-sqlalchemy-utils
5003 (package
5004 (name "python-sqlalchemy-utils")
fd2662e9 5005 (version "0.32.13")
de2966cf
EF
5006 (source
5007 (origin
5008 (method url-fetch)
5009 (uri (pypi-uri "SQLAlchemy-Utils" version))
5010 (sha256
5011 (base32
fd2662e9 5012 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
de2966cf 5013 (build-system python-build-system)
35d56b7b
MB
5014 (arguments
5015 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
5016 ;; #:phases
5017 ;; (modify-phases %standard-phases
5018 ;; (replace 'check
5019 ;; (lambda _
5020 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
c22b4f87 5021 (propagated-inputs
de2966cf
EF
5022 `(("python-six" ,python-six)
5023 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb 5024 (native-inputs
22d7360b 5025 `(("python-dateutil" ,python-dateutil)
35d56b7b
MB
5026 ("python-flexmock" ,python-flexmock)
5027 ("python-psycopg2" ,python-psycopg2)
5028 ("python-pytest" ,python-pytest)
5029 ("python-pytz" ,python-pytz)))
de2966cf
EF
5030 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
5031 (synopsis "Various utility functions for SQLAlchemy")
5032 (description
5033 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
5034for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
5035
5036You might also want to install the following optional dependencies:
5037@enumerate
5038@item @code{python-passlib}
5039@item @code{python-babel}
5040@item @code{python-cryptography}
5041@item @code{python-pytz}
5042@item @code{python-psycopg2}
5043@item @code{python-furl}
5044@item @code{python-flask-babel}
5045@end enumerate
5046")
de2966cf
EF
5047 (license license:bsd-3)))
5048
5049(define-public python2-sqlalchemy-utils
f210e944 5050 (package-with-python2 python-sqlalchemy-utils))
de2966cf 5051
af5a4602
CAW
5052(define-public python-alembic
5053 (package
5054 (name "python-alembic")
96d63eea 5055 (version "0.9.5")
af5a4602
CAW
5056 (source
5057 (origin
5058 (method url-fetch)
5059 (uri (pypi-uri "alembic" version))
5060 (sha256
5061 (base32
96d63eea 5062 "01gx2syqbaxh4hr9pf7pxhlb6p36qaf99140dy19lsx1paxb9p4b"))))
af5a4602
CAW
5063 (build-system python-build-system)
5064 (native-inputs
5065 `(("python-mock" ,python-mock)
5066 ("python-pytest-cov" ,python-pytest-cov)))
5067 (propagated-inputs
96d63eea
CR
5068 `(("python-dateutil" ,python-dateutil)
5069 ("python-sqlalchemy" ,python-sqlalchemy)
af5a4602
CAW
5070 ("python-mako" ,python-mako)
5071 ("python-editor" ,python-editor)))
5072 (home-page "http://bitbucket.org/zzzeek/alembic")
5073 (synopsis
5074 "Database migration tool for SQLAlchemy")
5075 (description
5076 "Alembic is a lightweight database migration tool for usage with the
5077SQLAlchemy Database Toolkit for Python.")
f210e944 5078 (license license:expat)))
af5a4602
CAW
5079
5080(define-public python2-alembic
f210e944 5081 (package-with-python2 python-alembic))
af5a4602 5082
138adbbe
TD
5083(define-public python-autopep8
5084 (package
5085 (name "python-autopep8")
8e483fb5 5086 (version "1.3.2")
138adbbe
TD
5087 (source
5088 (origin
5089 (method url-fetch)
5090 (uri (pypi-uri "autopep8" version))
5091 (sha256
5092 (base32
8e483fb5 5093 "1p9pa1ffg4iy96l918808jggg9a69iaka5awmj8xid36yc5mk0ky"))))
138adbbe
TD
5094 (build-system python-build-system)
5095 (propagated-inputs
8e483fb5 5096 `(("python-pycodestyle" ,python-pycodestyle)))
138adbbe
TD
5097 (home-page "https://github.com/hhatto/autopep8")
5098 (synopsis "Format Python code according to the PEP 8 style guide")
5099 (description
5100 "@code{autopep8} automatically formats Python code to conform to
5101the PEP 8 style guide. It uses the pycodestyle utility to determine
5102what parts of the code needs to be formatted. @code{autopep8} is
5103capable of fixing most of the formatting issues that can be reported
5104by pycodestyle.")
5105 (license (license:non-copyleft
5106 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5107
5108(define-public python2-autopep8
5109 (package-with-python2 python-autopep8))
5110
1671c07c
EB
5111(define-public python-distutils-extra
5112 (package
5113 (name "python-distutils-extra")
5114 (version "2.38")
5115 (source
5116 (origin
5117 (method url-fetch)
5118 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5119 version "/+download/python-distutils-extra-"
5120 version ".tar.gz"))
5121 (sha256
5122 (base32
5123 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5124 (build-system python-build-system)
1671c07c
EB
5125 (home-page "https://launchpad.net/python-distutils-extra/")
5126 (synopsis "Enhancements to Python's distutils")
5127 (description
5128 "The python-distutils-extra module enables you to easily integrate
5129gettext support, themed icons, and scrollkeeper-based documentation into
5130Python's distutils.")
3f641af0 5131 (license license:gpl2)))
1671c07c
EB
5132
5133(define-public python2-distutils-extra
5134 (package-with-python2 python-distutils-extra))
ea5456c8
EB
5135
5136(define-public python2-elib.intl
5137 (package
5138 (name "python2-elib.intl")
5139 (version "0.0.3")
5140 (source
5141 (origin
5142 ;; This project doesn't tag releases or publish tarballs, so we take
5143 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5144 (method git-fetch)
5145 (uri (git-reference
5146 (url "https://github.com/dieterv/elib.intl.git")
5147 (commit "d09997cfef")))
5148 (sha256
5149 (base32
5150 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5151 (build-system python-build-system)
ea5456c8
EB
5152 (arguments
5153 ;; incompatible with Python 3 (exception syntax)
5154 `(#:python ,python-2
b41a05ce 5155 #:tests? #f))
ea5456c8
EB
5156 (home-page "https://github.com/dieterv/elib.intl")
5157 (synopsis "Enhanced internationalization for Python")
5158 (description
5159 "The elib.intl module provides enhanced internationalization (I18N)
5160services for your Python modules and applications.")
3f641af0 5161 (license license:lgpl3+)))
ea5456c8 5162
c937562e
EB
5163(define-public python-pillow
5164 (package
5165 (name "python-pillow")
aba5182c 5166 (version "3.3.3")
c937562e
EB
5167 (source
5168 (origin
5169 (method url-fetch)
f1d9231d 5170 (uri (pypi-uri "Pillow" version))
a9681c74 5171 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
c937562e
EB
5172 (sha256
5173 (base32
aba5182c 5174 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
5175 (build-system python-build-system)
5176 (native-inputs
f3b98f4f 5177 `(("python-nose" ,python-nose)))
c937562e 5178 (inputs
5ff408d9
SB
5179 `(("freetype" ,freetype)
5180 ("lcms" ,lcms)
c937562e
EB
5181 ("zlib" ,zlib)
5182 ("libjpeg" ,libjpeg)
5183 ("openjpeg" ,openjpeg)
5ff408d9
SB
5184 ("libtiff" ,libtiff)
5185 ("libwebp" ,libwebp)))
c937562e 5186 (arguments
e5358a6b 5187 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
5188 (add-after
5189 'install 'check-installed
6151120a 5190 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
5191 (begin
5192 (setenv "HOME" (getcwd))
6151120a
HG
5193 ;; Make installed package available for running the
5194 ;; tests
5195 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
5196 (and (zero? (system* "python" "selftest.py"
5197 "--installed"))
5198 (zero? (system* "python" "test-installed.py"))))))
5199 (delete 'check))))
c937562e
EB
5200 (home-page "https://pypi.python.org/pypi/Pillow")
5201 (synopsis "Fork of the Python Imaging Library")
5202 (description
5203 "The Python Imaging Library adds image processing capabilities to your
5204Python interpreter. This library provides extensive file format support, an
5205efficient internal representation, and fairly powerful image processing
5206capabilities. The core image library is designed for fast access to data
5207stored in a few basic pixel formats. It should provide a solid foundation for
5208a general image processing tool.")
3f641af0 5209 (license (license:x11-style
c937562e
EB
5210 "http://www.pythonware.com/products/pil/license.htm"
5211 "The PIL Software License"))))
5212
5213(define-public python2-pillow
5214 (package-with-python2 python-pillow))
bb986599 5215
a415f036
FB
5216(define-public python-pycparser
5217 (package
5218 (name "python-pycparser")
5043b20d 5219 (version "2.17")
a415f036
FB
5220 (source
5221 (origin
5222 (method url-fetch)
38eb6919 5223 (uri (pypi-uri "pycparser" version))
a415f036
FB
5224 (sha256
5225 (base32
5043b20d 5226 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
a415f036
FB
5227 (outputs '("out" "doc"))
5228 (build-system python-build-system)
5229 (native-inputs
f3b98f4f 5230 `(("pkg-config" ,pkg-config)))
a415f036 5231 (arguments
89b5c60e 5232 `(#:phases
819939cb
TGR
5233 (modify-phases %standard-phases
5234 (replace 'check
5235 (lambda _
5236 (with-directory-excursion "tests"
5237 (zero? (system* "python" "all_tests.py")))))
5238 (add-after 'install 'install-doc
5239 (lambda* (#:key outputs #:allow-other-keys)
5240 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5241 (doc (string-append data "/doc/" ,name "-" ,version))
5242 (examples (string-append doc "/examples")))
5243 (mkdir-p examples)
5244 (for-each (lambda (file)
5245 (copy-file (string-append "." file)
5246 (string-append doc file)))
5247 '("/README.rst" "/CHANGES" "/LICENSE"))
5248 (copy-recursively "examples" examples)))))))
a415f036
FB
5249 (home-page "https://github.com/eliben/pycparser")
5250 (synopsis "C parser in Python")
5251 (description
5252 "Pycparser is a complete parser of the C language, written in pure Python
5253using the PLY parsing library. It parses C code into an AST and can serve as
5254a front-end for C compilers or analysis tools.")
3f641af0 5255 (license license:bsd-3)))
a415f036
FB
5256
5257(define-public python2-pycparser
5258 (package-with-python2 python-pycparser))
57c3f716 5259
6fa14469
FB
5260(define-public python-xcffib
5261 (package
5262 (name "python-xcffib")
8347c122 5263 (version "0.5.1")
6fa14469
FB
5264 (source
5265 (origin
5266 (method url-fetch)
8347c122 5267 (uri (pypi-uri "xcffib" version))
6fa14469
FB
5268 (sha256
5269 (base32
8347c122 5270 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
6fa14469
FB
5271 (build-system python-build-system)
5272 (inputs
482d9591 5273 `(("libxcb" ,libxcb)))
6fa14469 5274 (propagated-inputs
482d9591
HG
5275 `(("python-cffi" ,python-cffi) ; used at run time
5276 ("python-six" ,python-six)))
6fa14469 5277 (arguments
e46bf223 5278 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
e2816ac7
MB
5279 #:tests? #f
5280 #:phases
c8cd850c 5281 (modify-phases %standard-phases
e46bf223
JMSG
5282 (add-after 'unpack 'fix-libxcb-path
5283 (lambda* (#:key inputs #:allow-other-keys)
5284 (let ((libxcb (assoc-ref inputs "libxcb")))
5285 (substitute* '("xcffib/__init__.py")
5286 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5287 #t)))
c8cd850c
MB
5288 (add-after 'install 'install-doc
5289 (lambda* (#:key outputs #:allow-other-keys)
5290 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5291 "/doc/" ,name "-" ,version)))
5292 (mkdir-p doc)
5293 (copy-file "README.md"
5294 (string-append doc "/README.md"))
5295 #t))))))
6fa14469
FB
5296 (home-page "https://github.com/tych0/xcffib")
5297 (synopsis "XCB Python bindings")
5298 (description
5299 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5300support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 5301 (license license:expat)))
6fa14469
FB
5302
5303(define-public python2-xcffib
5304 (package-with-python2 python-xcffib))
5305
9e099723
FB
5306(define-public python-cairocffi
5307 (package
5308 (name "python-cairocffi")
80f78e8f 5309 (version "0.8.0")
9e099723
FB
5310 (source
5311 (origin
5312 (method url-fetch)
5313 ;; The archive on pypi is missing the 'utils' directory!
3015d455 5314 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
9e099723 5315 version ".tar.gz"))
f586c877 5316 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
5317 (sha256
5318 (base32
80f78e8f 5319 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
9e099723
FB
5320 (build-system python-build-system)
5321 (outputs '("out" "doc"))
5322 (inputs
5323 `(("gdk-pixbuf" ,gdk-pixbuf)
5324 ("cairo" ,cairo)))
5325 (native-inputs
5326 `(("pkg-config" ,pkg-config)
5327 ("python-sphinx" ,python-sphinx)
f3b98f4f 5328 ("python-docutils" ,python-docutils)))
9e099723
FB
5329 (propagated-inputs
5330 `(("python-xcffib" ,python-xcffib))) ; used at run time
5331 (arguments
a792e1aa
MB
5332 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
5333 #:tests? #f
5334 #:phases
6734c7ba
MB
5335 (modify-phases %standard-phases
5336 (add-after 'install 'install-doc
5337 (lambda* (#:key inputs outputs #:allow-other-keys)
5338 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5339 (doc (string-append data "/doc/" ,name "-" ,version))
5340 (html (string-append doc "/html")))
5341 (setenv "LD_LIBRARY_PATH"
5342 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5343 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5344 (setenv "LANG" "en_US.UTF-8")
5345 (mkdir-p html)
5346 (for-each (lambda (file)
5347 (copy-file (string-append "." file)
5348 (string-append doc file)))
5349 '("/README.rst" "/CHANGES" "/LICENSE"))
5350 (system* "python" "setup.py" "build_sphinx")
5351 (copy-recursively "docs/_build/html" html)
5352 #t))))))
3015d455 5353 (home-page "https://github.com/Kozea/cairocffi")
9e099723
FB
5354 (synopsis "Python bindings and object-oriented API for Cairo")
5355 (description
5356 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5357Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5358graphics library with support for multiple backends including image buffers,
5359PNG, PostScript, PDF, and SVG file output.")
3f641af0 5360 (license license:bsd-3)))
9e099723
FB
5361
5362(define-public python2-cairocffi
5363 (package-with-python2 python-cairocffi))
5364
3cff95cb
RW
5365(define-public python-decorator
5366 (package
5367 (name "python-decorator")
d79fa7da 5368 (version "4.0.10")
3cff95cb
RW
5369 (source
5370 (origin
5371 (method url-fetch)
e21338be 5372 (uri (pypi-uri "decorator" version))
3cff95cb 5373 (sha256
d79fa7da 5374 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
3cff95cb
RW
5375 (build-system python-build-system)
5376 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 5377 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
5378 (synopsis "Python module to simplify usage of decorators")
5379 (description
5380 "The aim of the decorator module is to simplify the usage of decorators
5381for the average programmer, and to popularize decorators usage giving examples
5382of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5383etc. The core of this module is a decorator factory.")
5384 (license license:expat)))
5385
5386(define-public python2-decorator
5387 (package-with-python2 python-decorator))
5388
2c0499ad
RW
5389(define-public python-drmaa
5390 (package
5391 (name "python-drmaa")
7c427932 5392 (version "0.7.7")
2c0499ad
RW
5393 (source
5394 (origin
5395 (method url-fetch)
d92621cf 5396 (uri (pypi-uri "drmaa" version))
2c0499ad 5397 (sha256
7c427932 5398 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
2c0499ad
RW
5399 (build-system python-build-system)
5400 ;; The test suite requires libdrmaa which is provided by the cluster
5401 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5402 ;; should be set to the path of the libdrmaa library.
5403 (arguments '(#:tests? #f))
5404 (native-inputs
f3b98f4f 5405 `(("python-nose" ,python-nose)))
2c0499ad
RW
5406 (home-page "https://pypi.python.org/pypi/drmaa")
5407 (synopsis "Python bindings for the DRMAA library")
5408 (description
5409 "A Python package for Distributed Resource Management (DRM) job
5410submission and control. This package is an implementation of the DRMAA 1.0
5411Python language binding specification.")
3f641af0 5412 (license license:bsd-3)))
2c0499ad
RW
5413
5414(define-public python2-drmaa
5415 (package-with-python2 python-drmaa))
5416
a70b03d4
TD
5417(define-public python-grako
5418 (package
5419 (name "python-grako")
5420 (version "3.99.9")
5421 (source
5422 (origin
5423 (method url-fetch)
5424 (uri
5425 (pypi-uri "grako" version ".zip"))
5426 (sha256
5427 (base32
5428 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5429 (build-system python-build-system)
5430 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5431 (native-inputs
5432 `(("unzip" ,unzip)
928da609 5433 ("python-pytest" ,python-pytest)
a70b03d4
TD
5434 ("python-pytest-runner" ,python-pytest-runner)))
5435 (home-page "https://bitbucket.org/neogeny/grako")
5436 (synopsis "EBNF parser generator")
5437 (description
5438 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5439memoizing PEG/Packrat parser in Python.")
5440 (license license:bsd-3)))
5441
5442(define-public python2-grako
5443 (package-with-python2 python-grako))
5444
d05c6da0
RW
5445(define-public python-gridmap
5446 (package
5447 (name "python-gridmap")
5448 (version "0.13.0")
5449 (source
5450 (origin
5451 (method url-fetch)
5452 (uri (string-append
5453 "https://github.com/pygridtools/gridmap/archive/v"
5454 version ".tar.gz"))
5455 (file-name (string-append name "-" version ".tar.gz"))
5456 (sha256
5457 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
5458 (build-system python-build-system)
ad348f9f
MB
5459 (arguments
5460 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
f22efa01 5461 (propagated-inputs
d05c6da0
RW
5462 `(("python-psutil" ,python-psutil)
5463 ("python-drmaa" ,python-drmaa)
5464 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
5465 (home-page "https://github.com/pygridtools/gridmap")
5466 (synopsis "Create jobs on a cluster directly from Python")
5467 (description
5468 "Gridmap is a Python package to allow you to easily create jobs on the
5469cluster directly from Python. You can directly map Python functions onto the
5470cluster without needing to write any wrapper code yourself.")
3f641af0 5471 (license license:gpl3+)))
d05c6da0
RW
5472
5473(define-public python2-gridmap
5474 (package-with-python2 python-gridmap))
5475
84342e2f
SR
5476(define-public python-honcho
5477 (package
5478 (name "python-honcho")
5479 (version "1.0.1")
5480 (source
5481 (origin
5482 (method url-fetch)
5483 (uri (string-append
5484 "https://github.com/nickstenning/honcho/archive/v"
5485 version ".tar.gz"))
5486 (file-name (string-append name "-" version ".tar.gz"))
5487 (sha256
5488 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
5489 (build-system python-build-system)
5490 (native-inputs
928da609 5491 `(("python-pytest" ,python-pytest)
84342e2f
SR
5492 ("python-mock" ,python-mock)
5493 ("python-tox" ,python-tox)
5494 ("which" ,which))) ;for tests
5495 (propagated-inputs
5496 `(("python-jinja2" ,python-jinja2)))
5497 (arguments
5498 `(#:phases
5499 (modify-phases %standard-phases
5500 (delete 'check)
5501 (add-after 'install 'check
5502 (lambda* (#:key outputs inputs #:allow-other-keys)
5503 ;; fix honcho path in testsuite
5504 (substitute* "tests/conftest.py"
5505 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5506 "/bin/honcho" "'")))
5507 ;; It's easier to run tests after install.
5508 ;; Make installed package available for running the tests
5509 (add-installed-pythonpath inputs outputs)
5510 (zero? (system* "py.test" "-v")))))))
5511 (home-page "https://github.com/nickstenning/honcho")
5512 (synopsis "Manage Procfile-based applications")
5513 (description
5514 "A Procfile is a file which describes how to run an application
5515consisting of serveral processes. honcho starts all listed processes.
5516The output of all running processes is collected by honcho and
5517displayed.")
5518 (license license:expat)))
5519
5520(define-public python2-honcho
5521 (package-with-python2 python-honcho))
5522
cb6d5c54
RW
5523(define-public python-pexpect
5524 (package
5525 (name "python-pexpect")
ed118043 5526 (version "4.2.1")
cb6d5c54
RW
5527 (source
5528 (origin
5529 (method url-fetch)
ed118043 5530 (uri (pypi-uri "pexpect" version))
cb6d5c54 5531 (sha256
ed118043 5532 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
cb6d5c54
RW
5533 (build-system python-build-system)
5534 (arguments
5535 `(#:phases
5536 (modify-phases %standard-phases
ed118043
MB
5537 (add-before 'check 'prepare-tests
5538 (lambda _
5539 (substitute* (find-files "tests")
5540 (("/bin/ls") (which "ls"))
5541 (("/bin/echo") (which "echo"))
5542 (("/bin/which") (which "which"))
5543 ;; Many tests try to use the /bin directory which
5544 ;; is not present in the build environment.
5545 ;; Use one that's non-empty and unlikely to change.
5546 (("/bin'") "/dev'"))
5547 ;; XXX: Socket connection test gets "Connection reset by peer".
5548 ;; Why does it not work? Delete for now.
5549 (delete-file "tests/test_socket.py")
5550 #t))
3ee9355e 5551 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
cb6d5c54 5552 (native-inputs
ed118043 5553 `(("python-nose" ,python-nose)
928da609 5554 ("python-pytest" ,python-pytest)
ed118043 5555 ("man-db" ,man-db)
dc4f697f
LC
5556 ("which" ,which)
5557 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
ed118043
MB
5558 (propagated-inputs
5559 `(("python-ptyprocess" ,python-ptyprocess)))
cb6d5c54
RW
5560 (home-page "http://pexpect.readthedocs.org/")
5561 (synopsis "Controlling interactive console applications")
5562 (description
5563 "Pexpect is a pure Python module for spawning child applications;
5564controlling them; and responding to expected patterns in their output.
5565Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5566child application and control it as if a human were typing commands.")
3f641af0 5567 (license license:isc)))
cb6d5c54
RW
5568
5569(define-public python2-pexpect
5570 (package-with-python2 python-pexpect))
5571
229ad120
RW
5572(define-public python-setuptools-scm
5573 (package
5574 (name "python-setuptools-scm")
cf659519 5575 (version "1.15.6")
229ad120
RW
5576 (source (origin
5577 (method url-fetch)
383af6b0 5578 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
5579 (sha256
5580 (base32
cf659519 5581 "0pzvfmx8s20yrgkgwfbxaspz2x1g38qv61jpm0ns91lrb22ldas9"))))
229ad120
RW
5582 (build-system python-build-system)
5583 (home-page "https://github.com/pypa/setuptools_scm/")
5584 (synopsis "Manage Python package versions in SCM metadata")
5585 (description
383af6b0 5586 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
5587@dfn{software configuration management} (SCM) metadata instead of declaring
5588them as the version argument or in a SCM managed file.")
5589 (license license:expat)))
5590
5591(define-public python2-setuptools-scm
5592 (package-with-python2 python-setuptools-scm))
5593
b74270ee
RW
5594(define-public python-pathpy
5595 (package
5596 (name "python-pathpy")
5597 (version "8.1.1")
5598 (source
5599 (origin
5600 (method url-fetch)
5601 (uri (string-append "https://pypi.python.org/packages/source/p/"
5602 "path.py/path.py-" version ".tar.gz"))
5603 (sha256
5604 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 5605 (outputs '("out" "doc"))
b74270ee
RW
5606 (build-system python-build-system)
5607 (propagated-inputs
5608 `(("python-appdirs" ,python-appdirs)))
5609 (native-inputs
f3b98f4f 5610 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
5611 ("python-sphinx" ,python-sphinx)
5612 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
5613 ("python-pytest" ,python-pytest)
5614 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
5615 (arguments
5616 `(#:phases
5617 (modify-phases %standard-phases
5618 (add-after 'build 'build-doc
5619 (lambda _
5620 (setenv "LANG" "en_US.UTF-8")
5621 (zero? (system* "python" "setup.py" "build_sphinx"))))
5622 (add-after 'install 'install-doc
5623 (lambda* (#:key outputs #:allow-other-keys)
5624 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5625 (doc (string-append data "/doc/" ,name "-" ,version))
5626 (html (string-append doc "/html")))
5627 (mkdir-p html)
5628 (for-each (lambda (file)
5629 (copy-file file (string-append doc "/" file)))
5630 '("README.rst" "CHANGES.rst"))
5631 (copy-recursively "build/sphinx/html" html)))))))
7bf837fd 5632 (home-page "https://github.com/jaraco/path.py")
b74270ee
RW
5633 (synopsis "Python module wrapper for built-in os.path")
5634 (description
5635 "@code{path.py} implements path objects as first-class entities, allowing
5636common operations on files to be invoked on those path objects directly.")
5637 (license license:expat)))
5638
5639(define-public python2-pathpy
5640 (package-with-python2 python-pathpy))
5641
0d34e01b
RW
5642(define-public python-pickleshare
5643 (package
5644 (name "python-pickleshare")
5645 (version "0.5")
5646 (source
5647 (origin
5648 (method url-fetch)
5649 (uri (string-append "https://pypi.python.org/packages/source/p/"
5650 "pickleshare/pickleshare-" version ".tar.gz"))
5651 (sha256
5652 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5653 (build-system python-build-system)
5654 (propagated-inputs
5655 `(("python-pathpy" ,python-pathpy)))
5656 (home-page "https://github.com/vivainio/pickleshare")
5657 (synopsis "Tiny key value database with concurrency support")
5658 (description
5659 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5660Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5661shelve, many processes can access the database simultaneously. Changing a
5662value in database is immediately visible to other processes accessing the same
5663database. Concurrency is possible because the values are stored in separate
5664files. Hence the “database” is a directory where all files are governed by
5665PickleShare.")
5666 (license license:expat)))
5667
5668(define-public python2-pickleshare
5669 (package-with-python2 python-pickleshare))
5670
cd6e5189
RW
5671(define-public python-simplegeneric
5672 (package
5673 (name "python-simplegeneric")
5674 (version "0.8.1")
5675 (source
5676 (origin
5677 (method url-fetch)
5678 (uri (string-append "https://pypi.python.org/packages/source/s/"
5679 "simplegeneric/simplegeneric-" version ".zip"))
5680 (sha256
5681 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5682 (build-system python-build-system)
5683 (native-inputs
f3b98f4f 5684 `(("unzip" ,unzip)))
cd6e5189
RW
5685 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5686 (synopsis "Python module for simple generic functions")
5687 (description
5688 "The simplegeneric module lets you define simple single-dispatch generic
5689functions, akin to Python’s built-in generic functions like @code{len()},
5690@code{iter()} and so on. However, instead of using specially-named methods,
5691these generic functions use simple lookup tables, akin to those used by
5692e.g. @code{pickle.dump()} and other generic functions found in the Python
5693standard library.")
3f641af0 5694 (license license:zpl2.1)))
cd6e5189
RW
5695
5696(define-public python2-simplegeneric
5697 (package-with-python2 python-simplegeneric))
5698
ddc7d8ed 5699(define-public python-ipython-genutils
c4abbac3 5700 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
5701 (package
5702 (name "python-ipython-genutils")
5703 (version "0.1.0")
5704 (source
5705 (origin
5706 (method url-fetch)
5707 (uri (string-append "https://pypi.python.org/packages/source/i/"
5708 "ipython_genutils/ipython_genutils-"
5709 version ".tar.gz"))
5710 (sha256
5711 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5712 (build-system python-build-system)
5713 (arguments `(#:tests? #f)) ; no tests
5714 (home-page "http://ipython.org")
5715 (synopsis "Vestigial utilities from IPython")
5716 (description
c4abbac3
HG
5717 "This package provides retired utilities from IPython. No packages
5718outside IPython/Jupyter should depend on it.
5719
5720This package shouldn't exist. It contains some common utilities shared by
5721Jupyter and IPython projects during The Big Split. As soon as possible, those
5722packages will remove their dependency on this, and this package will go
5723away.")
3f641af0 5724 (license license:bsd-3)))
ddc7d8ed
RW
5725
5726(define-public python2-ipython-genutils
5727 (package-with-python2 python-ipython-genutils))
5728
2b10eb48
RW
5729(define-public python-traitlets
5730 (package
5731 (name "python-traitlets")
a5ba1481 5732 (version "4.2.0")
2b10eb48
RW
5733 (source
5734 (origin
5735 (method url-fetch)
cc0c4fde 5736 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
5737 (sha256
5738 (base32
a5ba1481 5739 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
5740 (build-system python-build-system)
5741 (arguments
5742 `(#:phases
5743 (modify-phases %standard-phases
5744 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5745 (propagated-inputs
5746 `(("python-ipython-genutils" ,python-ipython-genutils)
5747 ("python-decorator" ,python-decorator)))
5748 (native-inputs
cc0c4fde
EF
5749 `(("python-mock" ,python-mock)
5750 ("python-nose" ,python-nose)))
2b10eb48
RW
5751 (home-page "http://ipython.org")
5752 (synopsis "Configuration system for Python applications")
5753 (description
5754 "Traitlets is a framework that lets Python classes have attributes with
5755type checking, dynamically calculated default values, and ‘on change’
5756callbacks. The package also includes a mechanism to use traitlets for
5757configuration, loading values from files or from command line arguments. This
5758is a distinct layer on top of traitlets, so you can use traitlets in your code
5759without using the configuration machinery.")
3f641af0 5760 (license license:bsd-3)))
2b10eb48
RW
5761
5762(define-public python2-traitlets
5763 (package-with-python2 python-traitlets))
5764
4263b06f
RW
5765(define-public python-jupyter-core
5766 (package
5767 (name "python-jupyter-core")
45cc957c 5768 (version "4.2.1")
4263b06f
RW
5769 (source
5770 (origin
5771 (method url-fetch)
5772 (uri (string-append (pypi-uri "jupyter_core" version)))
5773 (sha256
5774 (base32
45cc957c 5775 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4263b06f
RW
5776 (build-system python-build-system)
5777 ;; FIXME: not sure how to run the tests
5778 (arguments `(#:tests? #f))
5779 (propagated-inputs
5780 `(("python-traitlets" ,python-traitlets)))
5781 (home-page "http://jupyter.org/")
5782 (synopsis "Jupyter base package")
5783 (description
5784 "Jupyter core is the base package on which Jupyter projects rely.")
5785 (license license:bsd-3)))
5786
5787(define-public python2-jupyter-core
5788 (package-with-python2 python-jupyter-core))
5789
9ff01f2d
RW
5790(define-public python-jupyter-client
5791 (package
5792 (name "python-jupyter-client")
5793 (version "4.4.0")
5794 (source
5795 (origin
5796 (method url-fetch)
5797 (uri (pypi-uri "jupyter_client" version))
5798 (sha256
5799 (base32
5800 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5801 (build-system python-build-system)
5802 ;; Tests fail because of missing native python kernel which I assume is
5803 ;; provided by the ipython package, which we cannot use because it would
5804 ;; cause a dependency cycle.
5805 (arguments `(#:tests? #f))
5806 (propagated-inputs
5807 `(("python-pyzmq" ,python-pyzmq)
5808 ("python-traitlets" ,python-traitlets)
5809 ("python-jupyter-core" ,python-jupyter-core)))
5810 (home-page "http://jupyter.org/")
5811 (synopsis "Jupyter protocol implementation and client libraries")
5812 (description
5813 "The @code{jupyter_client} package contains the reference implementation
5814of the Jupyter protocol. It also provides client and kernel management APIs
5815for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5816installing @code{kernelspec}s for use with Jupyter frontends.")
5817 (license license:bsd-3)))
5818
5819(define-public python2-jupyter-client
5820 (package-with-python2 python-jupyter-client))
5821
ab526102
RW
5822(define-public python-ipykernel
5823 (package
5824 (name "python-ipykernel")
f165648e 5825 (version "4.5.2")
ab526102
RW
5826 (source
5827 (origin
5828 (method url-fetch)
5829 (uri (pypi-uri "ipykernel" version))
5830 (sha256
f165648e 5831 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
ab526102
RW
5832 (build-system python-build-system)
5833 ;; The tests load a submodule of IPython. However, IPython itself depends
5834 ;; on ipykernel.
5835 (arguments `(#:tests? #f))
5836 (propagated-inputs
5837 ;; imported at runtime during connect
5838 `(("python-jupyter-client" ,python-jupyter-client)))
5839 (home-page "http://ipython.org")
5840 (synopsis "IPython Kernel for Jupyter")
5841 (description
5842 "This package provides the IPython kernel for Jupyter.")
5843 (license license:bsd-3)))
5844
5845(define-public python2-ipykernel
5846 (package-with-python2 python-ipykernel))
5847
5ff6effc
RW
5848(define-public python-testpath
5849 (package
5850 (name "python-testpath")
5851 (version "0.2")
5852 (source
5853 (origin
5854 (method url-fetch)
5855 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5856 version ".tar.gz"))
5857 (file-name (string-append name "-" version ".tar.gz"))
5858 (sha256
5859 (base32
5860 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5861 (build-system python-build-system)
5862 (arguments
5863 `(#:tests? #f ; this package does not even have a setup.py
b320f7bf
TD
5864 #:modules ((guix build python-build-system)
5865 (guix build utils)
5866 (srfi srfi-1))
5867 #:imported-modules (,@%python-build-system-modules
5868 (srfi srfi-1))
5ff6effc
RW
5869 #:phases
5870 (modify-phases %standard-phases
5871 (delete 'install)
5872 (replace 'build
b320f7bf
TD
5873 (lambda* (#:key inputs outputs #:allow-other-keys)
5874 (let* ((version (last
5875 (string-split (assoc-ref inputs "python") #\-)))
5876 (x.y (string-join (take (string-split version #\.) 2)
5877 "."))
5878 (dir (string-append
5879 (assoc-ref outputs "out")
5880 "/lib/python" x.y "/site-packages/testpath")))
5881 (mkdir-p dir)
5882 (copy-recursively "testpath" dir))
5883 #t)))))
5ff6effc
RW
5884 (home-page "https://github.com/takluyver/testpath")
5885 (synopsis "Test utilities for code working with files and commands")
5886 (description
5887 "Testpath is a collection of utilities for Python code working with files
5888and commands. It contains functions to check things on the filesystem, and
5889tools for mocking system commands and recording calls to those.")
5890 (license license:expat)))
5891
5892(define-public python2-testpath
5893 (package-with-python2 python-testpath))
5894
ae1ab9fe
FB
5895(define-public python-ipython
5896 (package
5897 (name "python-ipython")
80c3f4d6 5898 (version "5.3.0")
ae1ab9fe
FB
5899 (source
5900 (origin
fceac880 5901 (method url-fetch)
accd5f99 5902 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 5903 (sha256
80c3f4d6 5904 (base32 "079wyjir4a9qx6kvx096b1asm63djbidk65z3ykcbnlngmg62pmz"))))
ae1ab9fe
FB
5905 (build-system python-build-system)
5906 (outputs '("out" "doc"))
3a0b1b9a
FB
5907 (propagated-inputs
5908 `(("python-pyzmq" ,python-pyzmq)
fb25d348 5909 ("python-prompt-toolkit" ,python-prompt-toolkit)
accd5f99 5910 ("python-terminado" ,python-terminado)
ae1ab9fe 5911 ("python-matplotlib" ,python-matplotlib)
5d26e542 5912 ("python-numpy" ,python-numpy)
ae1ab9fe 5913 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a 5914 ("python-jinja2" ,python-jinja2)
ee8aab1f
CB
5915 ("python-jupyter-console"
5916 ;; The python-ipython and python-jupyter-console require each
5917 ;; other. To get the functionality in both packages working, strip
5918 ;; down the python-jupyter-console package when using it as an input
5919 ;; to python-ipython.
5920 ,python-jupyter-console-minimal)
3a0b1b9a 5921 ("python-mistune" ,python-mistune)
accd5f99
RW
5922 ("python-pexpect" ,python-pexpect)
5923 ("python-pickleshare" ,python-pickleshare)
5924 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 5925 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
5926 ("python-traitlets" ,python-traitlets)
5927 ("python-ipykernel" ,python-ipykernel)
fb25d348 5928 ("python-nbformat" ,python-nbformat)
accd5f99
RW
5929 ("python-pygments" ,python-pygments)))
5930 (inputs
5931 `(("readline" ,readline)
5932 ("which" ,which)))
ae1ab9fe 5933 (native-inputs
fb25d348
TD
5934 `(("graphviz" ,graphviz)
5935 ("pkg-config" ,pkg-config)
accd5f99
RW
5936 ("python-requests" ,python-requests) ;; for tests
5937 ("python-testpath" ,python-testpath)
5938 ("python-nose" ,python-nose)
ae1ab9fe 5939 ("python-sphinx" ,python-sphinx)
fb25d348 5940 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
2584beae
RW
5941 ;; FIXME: It's possible that a smaller union would work just as well.
5942 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5943 texlive-fonts-ec
5944 texlive-generic-ifxetex
5945 texlive-generic-pdftex
5946 texlive-latex-amsfonts
5947 texlive-latex-capt-of
5948 texlive-latex-cmap
5949 texlive-latex-environ
5950 texlive-latex-eqparbox
5951 texlive-latex-etoolbox
5952 texlive-latex-expdlist
5953 texlive-latex-fancyhdr
5954 texlive-latex-fancyvrb
5955 texlive-latex-fncychap
5956 texlive-latex-float
5957 texlive-latex-framed
5958 texlive-latex-geometry
5959 texlive-latex-graphics
5960 texlive-latex-hyperref
5961 texlive-latex-mdwtools
5962 texlive-latex-multirow
5963 texlive-latex-oberdiek
5964 texlive-latex-parskip
5965 texlive-latex-preview
5966 texlive-latex-tabulary
5967 texlive-latex-threeparttable
5968 texlive-latex-titlesec
5969 texlive-latex-trimspaces
5970 texlive-latex-ucs
5971 texlive-latex-upquote
5972 texlive-latex-url
5973 texlive-latex-varwidth
5974 texlive-latex-wrapfig)))
f3b98f4f 5975 ("texinfo" ,texinfo)))
ae1ab9fe 5976 (arguments
89b5c60e 5977 `(#:phases
3a0b1b9a
FB
5978 (modify-phases %standard-phases
5979 (add-after
5980 'install 'install-doc
5981 (lambda* (#:key inputs outputs #:allow-other-keys)
5982 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5983 (doc (string-append data "/doc/" ,name "-" ,version))
5984 (html (string-append doc "/html"))
5985 (man1 (string-append data "/man/man1"))
5986 (info (string-append data "/info"))
fb25d348
TD
5987 (examples (string-append doc "/examples"))
5988 (python-arg (string-append "PYTHON=" (which "python"))))
afd3d931 5989 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
5990 ;; Make installed package available for running the tests
5991 (add-installed-pythonpath inputs outputs)
3a0b1b9a 5992 (with-directory-excursion "docs"
accd5f99
RW
5993 ;; FIXME: pdf fails to build
5994 ;;(system* "make" "pdf" "PAPER=a4")
fb25d348
TD
5995 (system* "make" python-arg "html")
5996 (system* "make" python-arg "info"))
3a0b1b9a
FB
5997 (copy-recursively "docs/man" man1)
5998 (copy-recursively "examples" examples)
accd5f99 5999 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
6000 ;; (copy-file "docs/build/latex/ipython.pdf"
6001 ;; (string-append doc "/ipython.pdf"))
6002 (mkdir-p info)
6003 (copy-file "docs/build/texinfo/ipython.info"
6004 (string-append info "/ipython.info"))
6005 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
6006 ;; Tests can only be run after the library has been installed and not
6007 ;; within the source directory.
6008 (delete 'check)
6009 (add-after
6010 'install 'check
eee5cd04 6011 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
6012 (if tests?
6013 (with-directory-excursion "/tmp"
eee5cd04
HG
6014 ;; Make installed package available for running the tests
6015 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
6016 (setenv "HOME" "/tmp/") ;; required by a test
6017 (zero? (system* (string-append (assoc-ref outputs "out")
6018 "/bin/iptest"))))
6019 #t)))
6020 (add-before
6021 'install 'fix-tests
6022 (lambda* (#:key inputs #:allow-other-keys)
6023 (substitute* "./IPython/utils/_process_posix.py"
6024 (("/usr/bin/env', 'which") (which "which")))
6025 (substitute* "./IPython/core/tests/test_inputtransformer.py"
6026 (("#!/usr/bin/env python")
6027 (string-append "#!" (which "python"))))
6028 ;; Disable 1 failing test
6029 (substitute* "./IPython/core/tests/test_magic.py"
6030 (("def test_dirops\\(\\):" all)
6031 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
6032 (home-page "http://ipython.org")
6033 (synopsis "IPython is a tool for interactive computing in Python")
6034 (description
6035 "IPython provides a rich architecture for interactive computing with:
6036Powerful interactive shells, a browser-based notebook, support for interactive
6037data visualization, embeddable interpreters and tools for parallel
6038computing.")
135ba811
EF
6039 (license license:bsd-3)
6040 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
6041
6042(define-public python2-ipython
135ba811 6043 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
6044 (package
6045 (inherit ipython)
3a0b1b9a 6046 ;; FIXME: add pyreadline once available.
fb25d348
TD
6047 (propagated-inputs
6048 `(("python2-backports-shutil-get-terminal-size"
6049 ,python2-backports-shutil-get-terminal-size)
6050 ("python2-pathlib2" ,python2-pathlib2)
6051 ,@(package-propagated-inputs ipython)))
e62600fe 6052 (native-inputs
135ba811 6053 `(("python2-mock" ,python2-mock)
77a6932a 6054 ,@(package-native-inputs ipython))))))
03411993
AE
6055
6056(define-public python-isodate
6057 (package
6058 (name "python-isodate")
b6785c2e 6059 (version "0.5.4")
03411993
AE
6060 (source
6061 (origin
6062 (method url-fetch)
b6785c2e 6063 (uri (pypi-uri "isodate" version))
03411993
AE
6064 (sha256
6065 (base32
b6785c2e 6066 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 6067 (build-system python-build-system)
03411993
AE
6068 (home-page
6069 "http://cheeseshop.python.org/pypi/isodate")
6070 (synopsis
6071 "Python date parser and formatter")
6072 (description
6073 "Python-isodate is a python module for parsing and formatting
6074ISO 8601 dates, time and duration.")
3f641af0 6075 (license license:bsd-3)))
03411993
AE
6076
6077(define-public python2-isodate
6078 (package-with-python2 python-isodate))
673ab897
AE
6079
6080(define-public python-html5lib
6081 (package
6082 (name "python-html5lib")
a14061aa 6083 (version "1.0b10")
673ab897
AE
6084 (source
6085 (origin
6086 (method url-fetch)
fee04c19 6087 (uri (pypi-uri "html5lib" version))
673ab897
AE
6088 (sha256
6089 (base32
a14061aa 6090 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 6091 (build-system python-build-system)
3dd75476 6092 (propagated-inputs
4eb6ed28
MB
6093 `(("python-six" ,python-six)
6094 ("python-webencodings" ,python-webencodings)))
673ab897
AE
6095 (arguments
6096 `(#:test-target "check"))
6097 (home-page
6098 "https://github.com/html5lib/html5lib-python")
6099 (synopsis
6100 "Python HTML parser based on the WHATWG HTML specifcation")
6101 (description
6102 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
6103and written in Python.")
bd3fa666 6104 (license license:expat)))
673ab897
AE
6105
6106(define-public python2-html5lib
6107 (package-with-python2 python-html5lib))
e99f4211 6108
8ee62c97
RW
6109;; Needed for python-bleach, a dependency of python-notebook
6110(define-public python-html5lib-0.9
6111 (package
6112 (inherit python-html5lib)
6113 (version "0.999")
6114 (source
6115 (origin
6116 (method url-fetch)
6117 (uri (pypi-uri "html5lib" version))
6118 (sha256
6119 (base32
6120 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
6121
6122(define-public python2-html5lib-0.9
6123 (package-with-python2 python-html5lib-0.9))
6124
13be557d
RJ
6125(define-public python-html5-parser
6126 (package
6127 (name "python-html5-parser")
6128 (version "0.4.4")
6129 (source (origin
6130 (method url-fetch)
6131 (uri (pypi-uri "html5-parser" version))
6132 (sha256
6133 (base32
6134 "1d8sxhl41ffh7qlk7wlsy17xw6slzx5v1yna9s72wx5qrpaa3wxr"))))
6135 (build-system python-build-system)
6136 (native-inputs
6137 `(("pkg-config" ,pkg-config)))
6138 (inputs
6139 `(("libxml2" ,libxml2)))
6140 (propagated-inputs
6141 `(("python-lxml" ,python-lxml)
6142 ("python-beautifulsoup4" ,python-beautifulsoup4)))
6143 (home-page "https://html5-parser.readthedocs.io")
6144 (synopsis "Fast C-based HTML5 parsing for Python")
6145 (description "This package provides a fast implementation of the HTML5
6146parsing spec for Python. Parsing is done in C using a variant of the gumbo
6147parser. The gumbo parse tree is then transformed into an lxml tree, also in
6148C, yielding parse times that can be a thirtieth of the html5lib parse times.")
6149 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
6150 ;; indicate ASL2.0, including the LICENSE file for the whole project.
6151 (license (list license:asl2.0 license:gpl3))))
6152
6153(define-public python2-html5-parser
6154 (package-with-python2 python-html5-parser))
6155
adbca19e
MB
6156(define-public python-webencodings
6157 (package
6158 (name "python-webencodings")
6159 (version "0.5")
6160 (source (origin
6161 (method url-fetch)
6162 (uri (pypi-uri "webencodings" version))
6163 (sha256
6164 (base32
6165 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
6166 (build-system python-build-system)
6167 (arguments
6168 '(#:phases
6169 (modify-phases %standard-phases
6170 (replace 'check
6171 (lambda _
6172 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
6173 (native-inputs
6174 `(("python-pytest" ,python-pytest)))
6175 (home-page "https://github.com/SimonSapin/python-webencodings")
6176 (synopsis "Character encoding aliases for legacy web content")
6177 (description
6178 "In order to be compatible with legacy web content when interpreting
6179something like @code{Content-Type: text/html; charset=latin1}, tools need
6180to use a particular set of aliases for encoding labels as well as some
6181overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
6182the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
6183or @code{UTF-16} BOM takes precedence over any other encoding declaration.
6184The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
6185defines all such details so that implementations do not have to
6186reverse-engineer each other.
6187
6188This module implements the Encoding standard and has encoding labels and
6189BOM detection, but the actual implementation for encoders and decoders
6190is Python’s.")
6191 (license license:bsd-3)))
6192
6193(define-public python2-webencodings
6194 (package-with-python2 python-webencodings))
6195
e99f4211
MW
6196(define-public python-urwid
6197 (package
6198 (name "python-urwid")
51ff41f6 6199 (version "1.3.1")
e99f4211
MW
6200 (source
6201 (origin
6202 (method url-fetch)
b97c1bfd 6203 (uri (pypi-uri "urwid" version))
e99f4211
MW
6204 (sha256
6205 (base32
51ff41f6 6206 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 6207 (build-system python-build-system)
b97c1bfd
LF
6208 (arguments
6209 `(#:phases
6210 (modify-phases %standard-phases
6211 ;; Disable failing test. Bug filed upstream:
6212 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 6213 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
6214 (add-after 'unpack 'disable-failing-test
6215 (lambda _
6216 (substitute* "urwid/tests/test_event_loops.py"
6217 (("test_remove_watch_file")
6218 "disable_remove_watch_file")))))))
e99f4211
MW
6219 (home-page "http://urwid.org")
6220 (synopsis "Console user interface library for Python")
6221 (description
6222 "Urwid is a curses-based UI/widget library for Python. It includes many
6223features useful for text console applications.")
3f641af0 6224 (license license:lgpl2.1+)))
e99f4211
MW
6225
6226(define-public python2-urwid
e9379305
MC
6227 (let ((python2-urwid (package-with-python2 python-urwid)))
6228 (package
6229 (inherit python2-urwid)
6230 (arguments
6231 (append
4fdab173
KK
6232 `(;; Explicitly using Python 2 is necessary due the argument list being
6233 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
6234 ;; package arguments, which by default assumes the use of Python 3.
6235 #:python ,python-2
6236 #:phases
e9379305
MC
6237 (modify-phases %standard-phases
6238 ;; Disable the vterm tests because of non-deterministic failures
6239 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
6240 (add-after 'unpack 'delete-test_vterm.py
6241 (delete-file "urwid/tests/test_vterm.py"))))
6242 (package-arguments python-urwid))))))
d95a56c6 6243
5220022a
JL
6244(define-public python-openid
6245 (package
6246 (name "python-openid")
6247 (version "3.0.10")
6248 (source
6249 (origin
6250 (method url-fetch)
6251 (uri (pypi-uri "python3-openid" version))
6252 (sha256
6253 (base32
6254 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
6255 (build-system python-build-system)
0660d327
DM
6256 (arguments
6257 `(#:phases
6258 (modify-phases %standard-phases
6259 (replace 'check
6260 (lambda _
6261 (zero? (system* "./admin/runtests")))))))
f048db5a 6262 (properties `((python2-variant . ,(delay python2-openid))))
0660d327
DM
6263 (propagated-inputs
6264 `(("python-defusedxml" ,python-defusedxml)))
6265 (native-inputs
6266 `(("python-psycopg2" ,python-psycopg2)
6267 ("python-django" ,python-django)))
5220022a
JL
6268 (home-page "https://github.com/necaris/python3-openid")
6269 (synopsis "OpenID support for servers and consumers")
6270 (description "This library provides OpenID authentication for Python, both
6271for clients and servers.")
6272 (license license:asl2.0)))
6273
3ef00f56 6274(define-public python2-openid
6275 (package
6276 (name "python2-openid")
6277 (version "2.2.5")
6278 (source
6279 (origin
6280 (method url-fetch)
6281 (uri (pypi-uri "python-openid" version))
6282 (sha256
6283 (base32
6284 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
6285 (build-system python-build-system)
6286 (arguments
6287 ;; Python 3 support is in `python3-openid`, a separate package.
6288 `(#:python ,python-2))
6289 (home-page "https://github.com/openid/python-openid")
6290 (synopsis "OpenID support for servers and consumers")
6291 (description "This library provides OpenID authentication for Python, both
6292for clients and servers.")
6293 (license license:asl2.0)))
6294
47d0b292
TS
6295(define-public python-urwidtrees
6296 (package
6297 (name "python-urwidtrees")
37ec4623 6298 (version "1.0.2")
47d0b292
TS
6299 (source
6300 (origin
6301 (method url-fetch)
37ec4623
TS
6302 ;; package author intends on distributing via github rather than pypi:
6303 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
6304 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
6305 version ".tar.gz"))
6306 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
6307 (sha256
6308 (base32
37ec4623 6309 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
6310 (build-system python-build-system)
6311 (arguments
6312 '(#:tests? #f)) ; no tests
f22efa01 6313 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
6314 (home-page "https://github.com/pazz/urwidtrees")
6315 (synopsis "Tree widgets for urwid")
6316 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6317toolkit. Use it to build trees of widgets.")
3f641af0 6318 (license license:gpl3+)))
47d0b292
TS
6319
6320(define-public python2-urwidtrees
6321 (package-with-python2 python-urwidtrees))
6322
d95a56c6
PAR
6323(define-public python-dbus
6324 (package
6325 (name "python-dbus")
6326 (version "1.2.0")
6327 (source
6328 (origin
6329 (method url-fetch)
6330 (uri (string-append
5cc3096c 6331 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
6332 version ".tar.gz"))
6333 (sha256
6334 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
6335 (build-system gnu-build-system)
6717c879
SB
6336 (arguments
6337 '(#:phases
6338 (modify-phases %standard-phases
6339 (add-before
6340 'check 'pre-check
6341 (lambda _
6342 ;; XXX: For the missing '/etc/machine-id'.
6343 (substitute* "test/run-test.sh"
6344 (("DBUS_FATAL_WARNINGS=1")
6345 "DBUS_FATAL_WARNINGS=0"))
6346 #t)))))
d95a56c6
PAR
6347 (native-inputs
6348 `(("pkg-config" ,pkg-config)))
6349 (inputs
6350 `(("python" ,python)
2e88d113 6351 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
6352 (synopsis "Python bindings for D-bus")
6353 (description "python-dbus provides bindings for libdbus, the reference
6354implementation of D-Bus.")
6355 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 6356 (license license:expat)))
b52af02b
MW
6357
6358(define-public python2-dbus
6359 (package (inherit python-dbus)
6360 (name "python2-dbus")
6361 (inputs `(("python" ,python-2)
6362 ,@(alist-delete "python"
6363 (package-inputs python-dbus)
6364 equal?)))
6365 ;; FIXME: on Python 2, the test_utf8 fails with:
6366 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
6367 (arguments `(#:tests? #f))))
a6ac8332
AE
6368
6369(define-public python-apsw
6370 (package
6371 (name "python-apsw")
b83ad3ac 6372 (version "3.20.1-r1")
a6ac8332
AE
6373 (source
6374 (origin
6375 (method url-fetch)
b83ad3ac
JL
6376 (uri (string-append "https://github.com/rogerbinns/apsw/archive/"
6377 version ".tar.gz"))
a6ac8332
AE
6378 (sha256
6379 (base32
b83ad3ac 6380 "00ai7m2pqi26qaflhz314d8k5i3syw7xzr145fhfl0crhyh6adz2"))))
a6ac8332
AE
6381 (build-system python-build-system)
6382 (inputs
f3b98f4f 6383 `(("sqlite" ,sqlite)))
a6ac8332
AE
6384 (arguments
6385 `(#:phases
154d207c 6386 (modify-phases %standard-phases
cfd34f43
JL
6387 (replace 'build
6388 (lambda _
6389 (zero?
6390 (system* "python" "setup.py" "build" "--enable-all-extensions"))))
6391 (add-after 'build 'build-test-helper
6392 (lambda _
6393 (zero?
6394 (system
6395 (string-append "gcc -fPIC -shared -o ./testextension.sqlext "
6396 "-I. -Isqlite3 src/testextension.c") ))))
154d207c
MB
6397 (delete 'check)
6398 (add-after 'install 'check
6399 (lambda* (#:key inputs outputs #:allow-other-keys)
6400 (add-installed-pythonpath inputs outputs)
6401 (zero? (system* "python" "setup.py" "test")))))))
a6ac8332
AE
6402 (home-page "https://github.com/rogerbinns/apsw/")
6403 (synopsis "Another Python SQLite Wrapper")
6404 (description "APSW is a Python wrapper for the SQLite
6405embedded relational database engine. In contrast to other wrappers such as
6406pysqlite it focuses on being a minimal layer over SQLite attempting just to
6407translate the complete SQLite API into Python.")
abde5f37 6408 (license license:zlib)))
a6ac8332
AE
6409
6410(define-public python2-apsw
6411 (package-with-python2 python-apsw))
26b307e2
AE
6412
6413(define-public python-lxml
6414 (package
6415 (name "python-lxml")
2054b522 6416 (version "3.8.0")
26b307e2
AE
6417 (source
6418 (origin
6419 (method url-fetch)
97bbc480 6420 (uri (pypi-uri "lxml" version))
26b307e2 6421 (sha256
d58a3203 6422 (base32
2054b522 6423 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
26b307e2
AE
6424 (build-system python-build-system)
6425 (inputs
6426 `(("libxml2" ,libxml2)
f3b98f4f 6427 ("libxslt" ,libxslt)))
26b307e2
AE
6428 (home-page "http://lxml.de/")
6429 (synopsis
6430 "Python XML processing library")
6431 (description
6432 "The lxml XML toolkit is a Pythonic binding for the C libraries
6433libxml2 and libxslt.")
3f641af0 6434 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
6435
6436(define-public python2-lxml
6437 (package-with-python2 python-lxml))
4ed20663 6438
b32a1e47
CAW
6439;; beautifulsoup4 has a totally different namespace than 3.x,
6440;; and pypi seems to put it under its own name, so I guess we should too
6441(define-public python-beautifulsoup4
6442 (package
6443 (name "python-beautifulsoup4")
80e8d851 6444 (version "4.5.3")
b32a1e47
CAW
6445 (source
6446 (origin
6447 (method url-fetch)
6448 (uri (pypi-uri "beautifulsoup4" version))
6449 (sha256
6450 (base32
80e8d851 6451 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
b32a1e47 6452 (build-system python-build-system)
5f37f0b6
LF
6453 (arguments
6454 `(#:phases
6455 (modify-phases %standard-phases
6456 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6457 ;; must use this conversion script when building with Python 3. The
6458 ;; conversion script also runs the tests.
6459 ;; For more information, see the file 'convert-py3k' in the source
6460 ;; distribution.
6461 (replace 'check
6462 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
6463 (home-page
6464 "http://www.crummy.com/software/BeautifulSoup/bs4/")
6465 (synopsis
6466 "Python screen-scraping library")
6467 (description
6468 "Beautiful Soup is a Python library designed for rapidly setting up
6469screen-scraping projects. It offers Pythonic idioms for navigating,
6470searching, and modifying a parse tree, providing a toolkit for
6471dissecting a document and extracting what you need. It automatically
6472converts incoming documents to Unicode and outgoing documents to UTF-8.")
ee94ca11
MB
6473 (license license:expat)
6474 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
b32a1e47
CAW
6475
6476(define-public python2-beautifulsoup4
6477 (package
6478 (inherit (package-with-python2
6479 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 6480 (arguments `(#:python ,python-2))))
b32a1e47 6481
4dcb135e 6482(define-public python-cssutils
092e86f5 6483 (package
4dcb135e 6484 (name "python-cssutils")
58d1d816 6485 (version "1.0.1")
092e86f5
AE
6486 (source
6487 (origin
6488 (method url-fetch)
58d1d816 6489 (uri (pypi-uri "cssutils" version))
092e86f5 6490 (sha256
58d1d816
EF
6491 (base32
6492 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
6493 (build-system python-build-system)
6494 (native-inputs
4dcb135e 6495 `(("unzip" ,unzip))) ; for unpacking the source
092e86f5 6496 (arguments
4dcb135e 6497 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
092e86f5
AE
6498 (home-page "http://cthedot.de/cssutils/")
6499 (synopsis
6500 "CSS Cascading Style Sheets library for Python")
6501 (description
6502 "Cssutils is a Python package for parsing and building CSS
6503Cascading Style Sheets. Currently it provides a DOM only and no rendering
6504options.")
3f641af0 6505 (license license:lgpl3+)))
880ff77c 6506
4dcb135e
EB
6507(define-public python2-cssutils
6508 (package-with-python2 python-cssutils))
6509
880ff77c
AE
6510(define-public python-cssselect
6511 (package
6512 (name "python-cssselect")
d5ccd9ab 6513 (version "0.9.2")
880ff77c
AE
6514 (source
6515 (origin
6516 (method url-fetch)
d5ccd9ab 6517 (uri (pypi-uri "cssselect" version))
880ff77c 6518 (sha256
d5ccd9ab
EF
6519 (base32
6520 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 6521 (build-system python-build-system)
880ff77c
AE
6522 (arguments
6523 ;; tests fail with message
6524 ;; AttributeError: 'module' object has no attribute 'tests'
6525 `(#:tests? #f))
6526 (home-page
6527 "https://pythonhosted.org/cssselect/")
6528 (synopsis
6529 "CSS3 selector parser and translator to XPath 1.0")
6530 (description
6531 "Cssselect ia a Python module that parses CSS3 Selectors and translates
6532them to XPath 1.0 expressions. Such expressions can be used in lxml or
6533another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 6534 (license license:bsd-3)))
880ff77c
AE
6535
6536(define-public python2-cssselect
6537 (package-with-python2 python-cssselect))
60357f99 6538
03702173 6539(define-public python-openid-cla
6540 (package
6541 (name "python-openid-cla")
6542 (version "1.2")
6543 (source
6544 (origin
6545 (method url-fetch)
6546 (uri (pypi-uri "python-openid-cla" version))
6547 (sha256
6548 (base32
6549 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
6550 (build-system python-build-system)
019ccdb6 6551 (arguments '(#:tests? #f)) ; No tests.
03702173 6552 (home-page "https://github.com/puiterwijk/python-openid-cla/")
6553 (synopsis "Implementation of the OpenID CLA extension for python-openid")
6554 (description "@code{openid-cla} is an implementation of the OpenID
6555contributor license agreement extension for python-openid.")
6556 (license license:bsd-3)))
6557
6558(define-public python2-openid-cla
6559 (package-with-python2 python-openid-cla))
6560
a0e41de4 6561(define-public python-openid-teams
6562 (package
6563 (name "python-openid-teams")
6564 (version "1.1")
6565 (source
6566 (origin
6567 (method url-fetch)
6568 (uri (pypi-uri "python-openid-teams" version))
6569 (sha256
6570 (base32
6571 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
6572 (build-system python-build-system)
ac72d3d2 6573 (arguments '(#:tests? #f)) ; No tests.
a0e41de4 6574 (home-page "https://github.com/puiterwijk/python-openid-teams/")
6575 (synopsis "Implementation of the OpenID teams extension for python-openid")
6576 (description
6577 "@code{openid-teams} is an implementation of the OpenID
6578teams extension for python-openid.")
6579 (license license:bsd-3)))
6580
6581(define-public python2-openid-teams
6582 (package-with-python2 python-openid-teams))
6583
60357f99
AE
6584(define-public python-netifaces
6585 (package
6586 (name "python-netifaces")
6587 (version "0.10.4")
6588 (source
6589 (origin
6590 (method url-fetch)
6591 (uri (string-append
6592 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
6593 version
6594 ".tar.gz"))
6595 (sha256
6596 (base32
6597 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
6598 (build-system python-build-system)
60357f99
AE
6599 (home-page
6600 "https://bitbucket.org/al45tair/netifaces")
6601 (synopsis
6602 "Python module for portable network interface information")
6603 (description
6604 "Netifaces is a Python module providing information on network
6605interfaces in an easy and portable manner.")
6606 (license license:expat)))
6607
6608(define-public python2-netifaces
6609 (package-with-python2 python-netifaces))
92cb152b 6610
32f77c04
RW
6611(define-public python-networkx
6612 (package
6613 (name "python-networkx")
a4d9609c 6614 (version "1.11")
32f77c04
RW
6615 (source
6616 (origin
6617 (method url-fetch)
a4d9609c 6618 (uri (pypi-uri "networkx" version))
32f77c04 6619 (sha256
a4d9609c 6620 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
6621 (build-system python-build-system)
6622 ;; python-decorator is needed at runtime
6623 (propagated-inputs
6624 `(("python-decorator" ,python-decorator)))
6625 (native-inputs
f3b98f4f 6626 `(("python-nose" ,python-nose)))
32f77c04
RW
6627 (home-page "http://networkx.github.io/")
6628 (synopsis "Python module for creating and manipulating graphs and networks")
6629 (description
6630 "NetworkX is a Python package for the creation, manipulation, and study
6631of the structure, dynamics, and functions of complex networks.")
3f641af0 6632 (license license:bsd-3)))
32f77c04
RW
6633
6634(define-public python2-networkx
6635 (package-with-python2 python-networkx))
6636
92cb152b
RW
6637(define-public snakemake
6638 (package
6639 (name "snakemake")
3414ce98 6640 (version "4.2.0")
92cb152b
RW
6641 (source
6642 (origin
6643 (method url-fetch)
7b93d866 6644 (uri (pypi-uri "snakemake" version))
92cb152b 6645 (sha256
3414ce98 6646 (base32 "0mgl44q152ws40zj2vicqark5szyd73vqy9pf26g6hk6dk0y0c79"))))
92cb152b 6647 (build-system python-build-system)
7b93d866
MB
6648 (arguments
6649 ;; TODO: Package missing test dependencies.
e61bc976
RW
6650 '(#:tests? #f
6651 #:phases
6652 (modify-phases %standard-phases
6653 ;; For cluster execution Snakemake will call Python. Since there is
6654 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6655 ;; this by calling the snakemake wrapper instead.
6656 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6657 (lambda* (#:key outputs #:allow-other-keys)
6658 (substitute* "snakemake/executors.py"
6659 (("\\{sys.executable\\} -m snakemake")
6660 (string-append (assoc-ref outputs "out")
6661 "/bin/snakemake")))
6662 #t)))))
4f9998c6
RW
6663 (propagated-inputs
6664 `(("python-wrapt" ,python-wrapt)
3414ce98
KM
6665 ("python-requests" ,python-requests)
6666 ("python-appdirs" ,python-appdirs)
6667 ("python-configargparse" ,python-configargparse)
6668 ("python-pyyaml" ,python-pyyaml)
6669 ("python-ratelimiter" ,python-ratelimiter)))
7b93d866 6670 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
6671 (synopsis "Python-based execution environment for make-like workflows")
6672 (description
6673 "Snakemake aims to reduce the complexity of creating workflows by
6674providing a clean and modern domain specific specification language (DSL) in
6675Python style, together with a fast and comfortable execution environment.")
6676 (license license:expat)))
a1920bc9 6677
b3593688 6678(define-public python-pyqrcode
6679 (package
6680 (name "python-pyqrcode")
6681 (version "1.2.1")
6682 (source
6683 (origin
6684 (method url-fetch)
6685 (uri (pypi-uri "PyQRCode" version))
6686 (sha256
6687 (base32
6688 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6689 (build-system python-build-system)
6690 (home-page
6691 "https://github.com/mnooner256/pyqrcode")
6692 (synopsis "QR code generator")
6693 (description
6694 "Pyqrcode is a QR code generator written purely in Python with
6695SVG, EPS, PNG and terminal output.")
6696 (license license:bsd-3)))
6697
35de1fbd
RW
6698(define-public python-seaborn
6699 (package
6700 (name "python-seaborn")
ccc18762 6701 (version "0.7.1")
35de1fbd
RW
6702 (source
6703 (origin
6704 (method url-fetch)
fc899d4f 6705 (uri (pypi-uri "seaborn" version))
35de1fbd 6706 (sha256
ccc18762 6707 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
35de1fbd 6708 (build-system python-build-system)
6f976df6
MB
6709 (arguments
6710 '(#:tests? #f)) ; Tests requires a running X11 server.
35de1fbd
RW
6711 (propagated-inputs
6712 `(("python-pandas" ,python-pandas)
6713 ("python-matplotlib" ,python-matplotlib)
6714 ("python-scipy" ,python-scipy)))
35de1fbd
RW
6715 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6716 (synopsis "Statistical data visualization")
6717 (description
6718 "Seaborn is a library for making attractive and informative statistical
6719graphics in Python. It is built on top of matplotlib and tightly integrated
6720with the PyData stack, including support for numpy and pandas data structures
6721and statistical routines from scipy and statsmodels.")
3f641af0 6722 (license license:bsd-3)
fc899d4f 6723 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
6724
6725(define-public python2-seaborn
fc899d4f
EF
6726 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6727 (package
6728 (inherit base)
6729 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 6730 ,@(package-propagated-inputs base))))))
35de1fbd 6731
58a35665
MB
6732(define-public python-mpmath
6733 (package
6734 (name "python-mpmath")
6735 (version "0.19")
6736 (source (origin
6737 (method url-fetch)
6738 (uri (string-append "http://mpmath.org/files/mpmath-"
6739 version ".tar.gz"))
6740 (sha256
6741 (base32
6742 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6743 (build-system python-build-system)
6744 (arguments
6745 '(#:phases
6746 (modify-phases %standard-phases
6747 (replace 'check
6748 (lambda _
6749 (zero?
6750 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6751 (home-page "http://mpmath.org")
6752 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6753 (description
6754 "@code{mpmath} can be used as an arbitrary-precision substitute for
6755Python's float/complex types and math/cmath modules, but also does much
6756more advanced mathematics.")
6757 (license license:bsd-3)))
6758
6759(define-public python2-mpmath
6760 (package-with-python2 python-mpmath))
35de1fbd 6761
90fc547f
RW
6762(define-public python-sympy
6763 (package
6764 (name "python-sympy")
52f622ef 6765 (version "1.0")
90fc547f
RW
6766 (source
6767 (origin
6768 (method url-fetch)
6769 (uri (string-append
6770 "https://github.com/sympy/sympy/releases/download/sympy-"
6771 version "/sympy-" version ".tar.gz"))
6772 (sha256
52f622ef 6773 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
90fc547f 6774 (build-system python-build-system)
52f622ef
MB
6775 (propagated-inputs
6776 `(("python-mpmath" ,python-mpmath)))
90fc547f
RW
6777 (home-page "http://www.sympy.org/")
6778 (synopsis "Python library for symbolic mathematics")
6779 (description
6780 "SymPy is a Python library for symbolic mathematics. It aims to become a
6781full-featured computer algebra system (CAS) while keeping the code as simple
6782as possible in order to be comprehensible and easily extensible.")
3f641af0 6783 (license license:bsd-3)))
90fc547f
RW
6784
6785(define-public python2-sympy
6786 (package-with-python2 python-sympy))
6787
e8c9b010
SR
6788(define-public python-q
6789 (package
6790 (name "python-q")
6791 (version "2.6")
6792 (source
6793 (origin
6794 (method url-fetch)
6795 (uri (pypi-uri "q" version))
6796 (sha256
6797 (base32
6798 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6799 (build-system python-build-system)
6800 (home-page "https://github.com/zestyping/q")
6801 (synopsis "Quick-and-dirty debugging output for tired programmers")
6802 (description
6803 "q is a Python module for \"print\" style of debugging Python code. It
6804provides convenient short API for print out of values, tracebacks, and
6805falling into the Python interpreter.")
f210e944 6806 (license license:asl2.0)))
e8c9b010
SR
6807
6808(define-public python2-q
f210e944 6809 (package-with-python2 python-q))
e8c9b010 6810
a1920bc9
FB
6811(define-public python-testlib
6812 (package
6813 (name "python-testlib")
6814 (version "0.6.5")
6815 (source
6816 (origin
6817 (method url-fetch)
6818 (uri (string-append
6819 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6820 version ".zip"))
6821 (sha256
6822 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6823 (build-system python-build-system)
a1920bc9 6824 (native-inputs
632735f2 6825 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
6826 (synopsis "Python micro test suite harness")
6827 (description "A micro unittest suite harness for Python.")
6828 (home-page "https://github.com/trentm/testlib")
1cb9c006 6829 (license license:expat)))
a1920bc9
FB
6830
6831(define-public python2-testlib
6832 (package-with-python2 python-testlib))
db62afa5
LC
6833
6834(define-public python2-xlib
6835 (package
6836 (name "python2-xlib")
6837 (version "0.14")
6838 (source (origin
6839 (method url-fetch)
de67e922
LF
6840 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6841 "/" version "/"
db62afa5
LC
6842 "python-xlib-" version ".tar.gz"))
6843 (sha256
6844 (base32
6845 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6846 (build-system python-build-system)
6847 (arguments
6848 `(#:python ,python-2 ;Python 2 only
6849 #:tests? #f)) ;no tests
db62afa5
LC
6850 (home-page "http://python-xlib.sourceforge.net/")
6851 (synopsis "Python X11 client library")
6852 (description
6853 "The Python X Library is intended to be a fully functional X client
6854library for Python programs. It is useful to implement low-level X clients.
6855It is written entirely in Python.")
3f641af0 6856 (license license:gpl2+)))
0234ca06
DT
6857
6858(define-public python-singledispatch
6859 (package
6860 (name "python-singledispatch")
6861 (version "3.4.0.3")
6862 (source
6863 (origin
6864 (method url-fetch)
bdb67d84 6865 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
6866 (sha256
6867 (base32
6868 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6869 (build-system python-build-system)
5e1c9d24
HG
6870 (native-inputs
6871 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
6872 (home-page
6873 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6874 (synopsis "Backport of singledispatch feature from Python 3.4")
6875 (description
6876 "This library brings functools.singledispatch from Python 3.4 to Python
68772.6-3.3.")
6878 (license license:expat)))
6879
6880(define-public python2-singledispatch
6881 (package-with-python2 python-singledispatch))
feaae484 6882
310d218f
RW
6883(define-public python-tornado
6884 (package
6885 (name "python-tornado")
6fdeb324 6886 (version "4.5.1")
310d218f
RW
6887 (source
6888 (origin
6889 (method url-fetch)
a724924b 6890 (uri (pypi-uri "tornado" version))
310d218f 6891 (sha256
6fdeb324 6892 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
310d218f 6893 (build-system python-build-system)
3fe2c209
MB
6894 (arguments
6895 '(;; FIXME: Two tests error out with:
6896 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6897 ;; #:phases
6898 ;; (modify-phases %standard-phases
6899 ;; (replace 'check
6900 ;; (lambda _
6901 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6902 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6903 ;; (zero? (system* "python" "-m" "tornado.test")))))
6904 #:tests? #f))
310d218f 6905 (native-inputs
b455439b 6906 `(("python-certifi" ,python-certifi)))
f22efa01 6907 (propagated-inputs
b455439b 6908 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 6909 (home-page "http://www.tornadoweb.org/")
310d218f
RW
6910 (synopsis "Python web framework and asynchronous networking library")
6911 (description
6912 "Tornado is a Python web framework and asynchronous networking library,
6913originally developed at FriendFeed. By using non-blocking network I/O,
6914Tornado can scale to tens of thousands of open connections, making it ideal
6915for long polling, WebSockets, and other applications that require a long-lived
6916connection to each user.")
3f641af0 6917 (license license:asl2.0)
b455439b 6918 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
6919
6920(define-public python2-tornado
b455439b 6921 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 6922 (package (inherit tornado)
f22efa01 6923 (propagated-inputs
310d218f
RW
6924 `(("python2-backport-ssl-match-hostname"
6925 ,python2-backport-ssl-match-hostname)
b455439b 6926 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 6927 ,@(package-propagated-inputs tornado))))))
310d218f 6928
c795bc79
CB
6929(define-public python-tornado-http-auth
6930 (package
6931 (name "python-tornado-http-auth")
6932 (version "1.1.0")
6933 (source
6934 (origin
6935 (method url-fetch)
6936 (uri (pypi-uri "tornado-http-auth" version))
6937 (sha256
6938 (base32
6939 "0znrgqd7k2s4ia474xizi6h3061zj4sn5n6cq76bkwl3wwshifn5"))))
6940 (build-system python-build-system)
6941 (propagated-inputs
6942 `(("python-tornado" ,python-tornado)))
6943 (home-page
6944 "https://github.com/gvalkov/tornado-http-auth")
6945 (synopsis
6946 "Digest and basic authentication module for Tornado")
6947 (description
6948 "Provides support for adding authentication to services using the Tornado
6949web framework, either via the basic or digest authentication schemes.")
6950 (license license:asl2.0)))
6951
6b59fc10
EF
6952;; the python- version can be removed with python-3.5
6953(define-public python-backports-abc
6954 (package
6955 (name "python-backports-abc")
27f9148e 6956 (version "0.5")
6b59fc10
EF
6957 (source
6958 (origin
6959 (method url-fetch)
6960 (uri (pypi-uri "backports_abc" version))
6961 (sha256
6962 (base32
27f9148e 6963 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6b59fc10 6964 (build-system python-build-system)
6b59fc10 6965 (home-page "https://github.com/cython/backports_abc")
66e07664 6966 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
6967 (description
6968 "Python-backports-abc provides a backport of additions to the
6969'collections.abc' module in Python-3.5.")
3f641af0 6970 (license license:psfl)))
6b59fc10
EF
6971
6972(define-public python2-backports-abc
6973 (package-with-python2 python-backports-abc))
6974
4ff9e868
OP
6975(define-public python-backports-csv
6976 (package
6977 (name "python-backports-csv")
6978 (version "1.0.5")
6979 (source
6980 (origin
6981 (method url-fetch)
6982 (uri (pypi-uri "backports.csv" version))
6983 (sha256
6984 (base32
6985 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6986 (build-system python-build-system)
6987 (home-page "https://github.com/ryanhiebert/backports.csv")
6988 (synopsis "Backport of Python 3's csv module for Python 2")
6989 (description
6990 "Provides a backport of Python 3's @code{csv} module for parsing
6991comma separated values. The API of the @code{csv} module in Python 2
6992is drastically different from the @code{csv} module in Python 3.
6993This is due, for the most part, to the difference between str in
6994Python 2 and Python 3.")
6995 (license license:psfl)))
6996
6997(define-public python2-backports-csv
6998 (package-with-python2 python-backports-csv))
6999
ec074213
TD
7000(define-public python2-backports-shutil-get-terminal-size
7001 (package
7002 (name "python2-backports-shutil-get-terminal-size")
7003 (version "1.0.0")
7004 (source
7005 (origin
7006 (method url-fetch)
7007 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
7008 (sha256
7009 (base32
7010 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
7011 (build-system python-build-system)
7012 (arguments
c0446791
MB
7013 `(#:python ,python-2
7014 #:phases
7015 (modify-phases %standard-phases
7016 (replace 'check
7017 (lambda _
7018 (zero? (system* "py.test" "-v")))))))
7019 (native-inputs
7020 `(("python2-pytest" ,python2-pytest)))
ec074213
TD
7021 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
7022 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
7023 (description
7024 "This package provides a backport of the @code{get_terminal_size
7025function} from Python 3.3's @code{shutil}.
7026Unlike the original version it is written in pure Python rather than C,
7027so it might be a tiny bit slower.")
7028 (license license:expat)))
7029
feaae484
SB
7030(define-public python-waf
7031 (package
7032 (name "python-waf")
27bf00e6 7033 (version "1.9.8")
feaae484
SB
7034 (source (origin
7035 (method url-fetch)
bae67829 7036 (uri (string-append "https://waf.io/"
feaae484
SB
7037 "waf-" version ".tar.bz2"))
7038 (sha256
7039 (base32
27bf00e6 7040 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
feaae484
SB
7041 (build-system python-build-system)
7042 (arguments
7043 '(#:phases
7044 (modify-phases %standard-phases
7045 (replace 'build
7dd55dfe
EF
7046 (lambda _
7047 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 7048 (replace 'check
7dd55dfe
EF
7049 (lambda _
7050 (zero? (system* "python" "waf" "--version"))))
feaae484 7051 (replace 'install
7dd55dfe
EF
7052 (lambda _
7053 (copy-file "waf" %output))))))
27bf00e6 7054 (home-page "https://waf.io/")
feaae484
SB
7055 (synopsis "Python-based build system")
7056 (description
7057 "Waf is a Python-based framework for configuring, compiling and installing
7058applications.")
3f641af0 7059 (license license:bsd-3)))
feaae484
SB
7060
7061(define-public python2-waf
7062 (package-with-python2 python-waf))
45203542
RW
7063
7064(define-public python-pyzmq
7065 (package
7066 (name "python-pyzmq")
3655ee76 7067 (version "15.1.0")
45203542
RW
7068 (source
7069 (origin
7070 (method url-fetch)
3655ee76 7071 (uri (pypi-uri "pyzmq" version))
45203542 7072 (sha256
3655ee76 7073 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
7074 (build-system python-build-system)
7075 (arguments
7076 `(#:configure-flags
7077 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
7078 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
7079 ;; --inplace' for 'python setup.py test' to work.
7080 #:tests? #f))
7081 (inputs
7082 `(("zeromq" ,zeromq)))
7083 (native-inputs
7084 `(("pkg-config" ,pkg-config)
f3b98f4f 7085 ("python-nose" ,python-nose)))
7bf837fd 7086 (home-page "https://github.com/zeromq/pyzmq")
45203542
RW
7087 (synopsis "Python bindings for 0MQ")
7088 (description
7089 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 7090 (license license:bsd-4)))
45203542
RW
7091
7092(define-public python2-pyzmq
7093 (package-with-python2 python-pyzmq))
d889e6c4
CR
7094
7095(define-public python-pep8
7096 (package
7097 (name "python-pep8")
db251311 7098 (version "1.7.0")
d889e6c4
CR
7099 (source
7100 (origin
7101 (method url-fetch)
db251311 7102 (uri (pypi-uri "pep8" version))
d889e6c4
CR
7103 (sha256
7104 (base32
db251311 7105 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 7106 (build-system python-build-system)
d889e6c4
CR
7107 (home-page "http://pep8.readthedocs.org/")
7108 (synopsis "Python style guide checker")
7109 (description
7110 "This tools checks Python code against some of the style conventions in
7111PEP 8.")
7112 (license license:expat)))
7113
7114(define-public python2-pep8
7115 (package-with-python2 python-pep8))
e31d7f44
CR
7116
7117(define-public python-pyflakes
7118 (package
7119 (name "python-pyflakes")
0098b950 7120 (version "1.5.0")
e31d7f44
CR
7121 (source
7122 (origin
7123 (method url-fetch)
2abc3972 7124 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
7125 (sha256
7126 (base32
0098b950 7127 "1x1pcca4a24k4pw8x1c77sgi58cg1wl2k38mp8a25k608pzls3da"))))
e31d7f44 7128 (build-system python-build-system)
e31d7f44
CR
7129 (home-page
7130 "https://github.com/pyflakes/pyflakes")
7131 (synopsis "Passive checker of Python programs")
7132 (description
7133 "Pyflakes statically checks Python source code for common errors.")
7134 (license license:expat)))
a59e017c 7135
7261d9eb
CR
7136(define-public python2-pyflakes
7137 (package-with-python2 python-pyflakes))
7138
a59e017c
CR
7139(define-public python-mccabe
7140 (package
7141 (name "python-mccabe")
31612e1c 7142 (version "0.6.1")
a59e017c
CR
7143 (source
7144 (origin
7145 (method url-fetch)
c6ebd40d 7146 (uri (pypi-uri "mccabe" version))
a59e017c
CR
7147 (sha256
7148 (base32
31612e1c 7149 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
a59e017c 7150 (build-system python-build-system)
328bb95d 7151 (native-inputs
92b2101a 7152 `(("python-pytest" ,python-pytest-bootstrap)
f3b98f4f 7153 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
7154 (home-page "https://github.com/flintwork/mccabe")
7155 (synopsis "McCabe checker, plugin for flake8")
7156 (description
7157 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
7158complexity of Python source code.")
7362371d 7159 (license license:expat)))
a59e017c
CR
7160
7161(define-public python2-mccabe
7162 (package-with-python2 python-mccabe))
e8df8f47 7163
7477fbb1
CR
7164(define-public python-mccabe-0.2.1
7165 (package (inherit python-mccabe)
7166 (version "0.2.1")
7167 (source
7168 (origin
7169 (method url-fetch)
7170 (uri (pypi-uri "mccabe" version))
7171 (sha256
7172 (base32
f3b98f4f 7173 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
7174
7175(define-public python2-mccabe-0.2.1
7176 (package-with-python2 python-mccabe-0.2.1))
7177
e8df8f47
CR
7178;; Flake8 2.4.1 requires an older version of pep8.
7179;; This should be removed ASAP.
7180(define-public python-pep8-1.5.7
7181 (package (inherit python-pep8)
7182 (version "1.5.7")
7183 (source
7184 (origin
7185 (method url-fetch)
7186 (uri (string-append
7187 "https://pypi.python.org/packages/source/p/pep8/pep8-"
7188 version
7189 ".tar.gz"))
7190 (sha256
7191 (base32
73e3060d
MB
7192 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
7193 (arguments
7194 ;; XXX Tests not compatible with Python 3.5.
7195 '(#:tests? #f))))
e8df8f47
CR
7196
7197(define-public python2-pep8-1.5.7
7198 (package-with-python2 python-pep8-1.5.7))
7199
7200;; Flake8 2.4.1 requires an older version of pyflakes.
7201;; This should be removed ASAP.
7202(define-public python-pyflakes-0.8.1
7203 (package (inherit python-pyflakes)
7204 (version "0.8.1")
7205 (source
7206 (origin
7207 (method url-fetch)
7208 (uri (string-append
7209 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
7210 version
7211 ".tar.gz"))
7212 (sha256
7213 (base32
0d84e1ef
MB
7214 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
7215 (arguments
7216 ;; XXX Tests not compatible with Python 3.5.
7217 '(#:tests? #f))))
e8df8f47
CR
7218
7219(define-public python2-pyflakes-0.8.1
7261d9eb 7220 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
7221
7222(define-public python-flake8
7223 (package
7224 (name "python-flake8")
a0fd9a3c 7225 (version "3.4.1")
e8df8f47
CR
7226 (source
7227 (origin
7228 (method url-fetch)
1b995533 7229 (uri (pypi-uri "flake8" version))
e8df8f47
CR
7230 (sha256
7231 (base32
a0fd9a3c 7232 "1n0i38592vy3q0x2a9bf8z6rhhn04i30wsn5i5zzcj7qkxvl8062"))))
e8df8f47 7233 (build-system python-build-system)
a0fd9a3c
MB
7234 (arguments
7235 `(#:phases
7236 (modify-phases %standard-phases
7237 (delete 'check)
7238 (add-after 'install 'check
7239 (lambda* (#:key inputs outputs #:allow-other-keys)
7240 (add-installed-pythonpath inputs outputs)
7241 (zero? (system* "pytest" "-v")))))))
482d9591 7242 (propagated-inputs
a0fd9a3c 7243 `(("python-pycodestyle" ,python-pycodestyle)
43789136 7244 ("python-pyflakes" ,python-pyflakes)
a0fd9a3c
MB
7245 ;; flake8 depends on a newer setuptools than provided by python.
7246 ("python-setuptools" ,python-setuptools)
482d9591 7247 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
7248 (native-inputs
7249 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
a0fd9a3c
MB
7250 ("python-pytest" ,python-pytest-bootstrap)
7251 ("python-pytest-runner" ,python-pytest-runner)))
e8df8f47
CR
7252 (home-page "https://gitlab.com/pycqa/flake8")
7253 (synopsis
7254 "The modular source code checker: pep8, pyflakes and co")
7255 (description
7256 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
a0fd9a3c 7257 (properties `((python2-variant . ,(delay python2-flake8))))
e8df8f47
CR
7258 (license license:expat)))
7259
7260(define-public python2-flake8
a0fd9a3c
MB
7261 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
7262 (package (inherit base)
7263 (propagated-inputs
7264 `(("python2-configparser" ,python2-configparser)
7265 ("python2-enum" ,python2-enum)
7266 ,@(package-propagated-inputs base))))))
61b9ac53 7267
1f42d824
MFM
7268(define-public python-flake8-polyfill
7269 (package
7270 (name "python-flake8-polyfill")
7271 (version "1.0.1")
7272 (source
7273 (origin
7274 (method url-fetch)
7275 (uri (pypi-uri "flake8-polyfill" version))
7276 (sha256
7277 (base32
7278 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
7279 (build-system python-build-system)
2c1cad7a
MB
7280 (arguments
7281 '(#:phases
7282 (modify-phases %standard-phases
7283 (replace 'check
7284 (lambda _
7285 (setenv "PYTHONPATH"
7286 (string-append (getcwd) "/build/lib:"
7287 (getenv "PYTHONPATH")))
7288 (zero? (system* "py.test" "-v")))))))
7289 (native-inputs
7290 `(("python-flake8" ,python-flake8)
7291 ("python-mock" ,python-mock)
7292 ("python-pycodestyle" ,python-pycodestyle)
7293 ("python-pytest" ,python-pytest)))
1f42d824
MFM
7294 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7295 (synopsis "Polyfill package for Flake8 plugins")
7296 (description
7297 "This package that provides some compatibility helpers for Flake8
7298plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7299 (license license:expat)))
7300
7301(define-public python2-flake8-polyfill
7302 (package-with-python2 python-flake8-polyfill))
7303
61b9ac53
FB
7304(define-public python-mistune
7305 (package
7306 (name "python-mistune")
08b81336 7307 (version "0.7.3")
61b9ac53
FB
7308 (source
7309 (origin
7310 (method url-fetch)
eff8d773 7311 (uri (pypi-uri "mistune" version))
61b9ac53
FB
7312 (sha256
7313 (base32
08b81336 7314 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
61b9ac53 7315 (build-system python-build-system)
328bb95d 7316 (native-inputs
f3b98f4f 7317 `(("python-nose" ,python-nose)
61b9ac53
FB
7318 ("python-cython" ,python-cython)))
7319 (home-page "https://github.com/lepture/mistune")
7320 (synopsis "Markdown parser in pure Python")
7321 (description "This package provides a fast markdown parser in pure
7322Python.")
3f641af0 7323 (license license:bsd-3)))
61b9ac53
FB
7324
7325(define-public python2-mistune
7326 (package-with-python2 python-mistune))
6d992d07 7327
b9893908
EE
7328(define-public python-markdown
7329 (package
7330 (name "python-markdown")
4ffbe8c6 7331 (version "2.6.8")
b9893908
EE
7332 (source
7333 (origin
7334 (method url-fetch)
7335 (uri (pypi-uri "Markdown" version))
7336 (sha256
7337 (base32
4ffbe8c6 7338 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
b9893908
EE
7339 (build-system python-build-system)
7340 (arguments
7341 `(#:phases
7342 (modify-phases %standard-phases
7343 (replace 'check
7344 (lambda _
7345 (zero? (system* "python" "run-tests.py")))))))
7346 (native-inputs
7347 `(("python-nose" ,python-nose)
7348 ("python-pyyaml" ,python-pyyaml)))
7349 (home-page "https://pythonhosted.org/Markdown/")
7350 (synopsis "Python implementation of Markdown")
7351 (description
7352 "This package provides a Python implementation of John Gruber's
7353Markdown. The library features international input, various Markdown
7354extensions, and several HTML output formats. A command line wrapper
7355markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 7356 (license license:bsd-3)))
b9893908
EE
7357
7358(define-public python2-markdown
7359 (package-with-python2 python-markdown))
7360
6d992d07
FB
7361(define-public python-ptyprocess
7362 (package
7363 (name "python-ptyprocess")
70fc93cb 7364 (version "0.5.1")
6d992d07
FB
7365 (source
7366 (origin
7367 (method url-fetch)
7368 (uri (string-append
7369 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
7370 version ".tar.gz"))
7371 (sha256
7372 (base32
70fc93cb 7373 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6d992d07 7374 (build-system python-build-system)
328bb95d 7375 (native-inputs
f3b98f4f 7376 `(("python-nose" ,python-nose)))
6d992d07
FB
7377 (arguments
7378 `(#:phases
7379 (modify-phases %standard-phases
7380 (replace 'check
7381 (lambda _
7382 (zero? (system* "nosetests")))))))
7383 (home-page "https://github.com/pexpect/ptyprocess")
7384 (synopsis "Run a subprocess in a pseudo terminal")
7385 (description
7386 "This package provides a Python library used to launch a subprocess in a
7387pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 7388 (license license:isc)))
6d992d07
FB
7389
7390(define-public python2-ptyprocess
7391 (package-with-python2 python-ptyprocess))
4aadb1df 7392
df893a38
MB
7393(define-public python-cram
7394 (package
7395 (name "python-cram")
7396 (version "0.7")
7397 (home-page "https://bitheap.org/cram/")
7398 (source (origin
7399 (method url-fetch)
7400 (uri (list (string-append home-page "cram-"
7401 version ".tar.gz")
7402 (pypi-uri "cram" version)))
7403 (sha256
7404 (base32
7405 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7406 (arguments
7407 '(#:phases
7408 (modify-phases %standard-phases
7409 (add-after 'unpack 'patch-source
7410 (lambda _
7411 (substitute* (find-files "cram" ".*\\.py$")
7412 ;; Replace default shell path.
7413 (("/bin/sh") (which "sh")))
7414 (substitute* (find-files "tests" ".*\\.t$")
7415 (("md5") "md5sum")
7416 (("/bin/bash") (which "bash"))
7417 (("/bin/sh") (which "sh")))
7418 (substitute* "cram/_test.py"
7419 ;; This hack works around a bug triggered by substituting
7420 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7421 ;; "cram -h", which breaks the output at 80 characters. This
7422 ;; causes the line showing the default shell to break into two
7423 ;; lines, but the test expects a single line...
7424 (("env\\['COLUMNS'\\] = '80'")
7425 "env['COLUMNS'] = '160'"))
7426 #t))
7427 (delete 'check)
7428 (add-after 'install 'check
7429 ;; The test phase uses the built library and executable.
7430 ;; It's easier to run it after install since the build
7431 ;; directory contains version-specific PATH.
7432 (lambda* (#:key inputs outputs #:allow-other-keys)
7433 (add-installed-pythonpath inputs outputs)
7434 (setenv "PATH" (string-append (getenv "PATH") ":"
7435 (assoc-ref outputs "out") "/bin"))
7436 (zero? (system* "make" "test")))))))
7437 (build-system python-build-system)
7438 (native-inputs
7439 `(("python-coverage" ,python-coverage)
7440 ("which" ,which)))
7441 (synopsis "Simple testing framework for command line applications")
7442 (description
7443 "Cram is a functional testing framework for command line applications.
7444Cram tests look like snippets of interactive shell sessions. Cram runs each
7445command and compares the command output in the test with the command’s actual
7446output.")
7447 (license license:gpl2+)))
7448
7449(define-public python2-cram
7450 (package-with-python2 python-cram))
7451
4aadb1df
FB
7452(define-public python-terminado
7453 (package
7454 (name "python-terminado")
783fb0a3 7455 (version "0.6")
4aadb1df
FB
7456 (source
7457 (origin
7458 (method url-fetch)
783fb0a3 7459 (uri (pypi-uri "terminado" version))
4aadb1df
FB
7460 (sha256
7461 (base32
783fb0a3 7462 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
7463 (build-system python-build-system)
7464 (propagated-inputs
7465 `(("python-tornado" ,python-tornado)
7466 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
7467 (native-inputs
7468 `(("python-nose" ,python-nose)))
4aadb1df
FB
7469 (arguments
7470 `(#:phases
7471 (modify-phases %standard-phases
7472 (replace 'check
7473 (lambda _
7474 (zero? (system* "nosetests")))))))
7475 (home-page "https://github.com/takluyver/terminado")
7476 (synopsis "Terminals served to term.js using Tornado websockets")
7477 (description "This package provides a Tornado websocket backend for the
7478term.js Javascript terminal emulator library.")
3f641af0 7479 (license license:bsd-2)
783fb0a3 7480 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
7481
7482(define-public python2-terminado
783fb0a3 7483 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 7484 (package (inherit terminado)
783fb0a3
EF
7485 (propagated-inputs
7486 `(("python2-backport-ssl-match-hostname"
7487 ,python2-backport-ssl-match-hostname)
00e10c6e 7488 ,@(package-propagated-inputs terminado))))))
5faa5ce4 7489
789de5e2 7490(define-public python-straight-plugin
7491 (package
7492 (name "python-straight-plugin")
7493 (version "1.4.1")
7494 (source
7495 (origin
7496 (method url-fetch)
7497 (uri (pypi-uri "straight.plugin" version))
7498 (sha256
7499 (base32
7500 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7501 (build-system python-build-system)
7502 (home-page "https://github.com/ironfroggy/straight.plugin")
7503 (synopsis "Simple namespaced plugin facility")
7504 (description "Straight Plugin provides a type of plugin you can create from
7505almost any existing Python modules, and an easy way for outside developers to
7506add functionality and customization to your projects with their own plugins.")
7507 (license license:expat)))
7508
7509(define-public python2-straight-plugin
7510 (package-with-python2 python-straight-plugin))
7511
d582eaac
SB
7512(define-public python-fonttools
7513 (package
7514 (name "python-fonttools")
a4593cc9 7515 (version "3.15.1")
d582eaac
SB
7516 (source (origin
7517 (method url-fetch)
a4593cc9 7518 (uri (pypi-uri "fonttools" version ".zip"))
d582eaac
SB
7519 (sha256
7520 (base32
a4593cc9 7521 "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d"))))
d582eaac 7522 (build-system python-build-system)
9e8c6a37
HG
7523 (arguments
7524 '(#:test-target "check"
7525 #:phases
7526 (modify-phases %standard-phases
7527 (add-after 'unpack 'patch-setuppy
7528 ;; Remove the undocumented "extra_path" argument, which adds an
7529 ;; intervening directories between site-packages and the package
7530 ;; directory.
7531 (lambda _
7532 (substitute* "setup.py"
7533 (("^[ \t]*extra_path *= *'FontTools',") ""))
7534 #t)))))
a4593cc9 7535 (native-inputs
7536 `(("unzip" ,unzip)))
7bf837fd 7537 (home-page "https://github.com/behdad/fonttools")
d582eaac
SB
7538 (synopsis "Tools to manipulate font files")
7539 (description
7540 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 7541supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
7542of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7543also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7544from an XML-based format.")
3f641af0
DC
7545 (license (license:non-copyleft
7546 "file://LICENSE.txt"
7547 "See LICENSE.txt in the distribution."))))
d582eaac
SB
7548
7549(define-public python2-fonttools
7550 (package-with-python2 python-fonttools))
75710da6 7551
5faa5ce4
RW
7552(define-public python-ly
7553 (package
7554 (name "python-ly")
5135354f 7555 (version "0.9.4")
5faa5ce4
RW
7556 (source
7557 (origin
7558 (method url-fetch)
5135354f
RW
7559 (uri (string-append "https://pypi.python.org/packages/57/4f/"
7560 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
7561 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
7562 (sha256
7563 (base32
5135354f 7564 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 7565 (build-system python-build-system)
972cf9be
MB
7566 (arguments
7567 ;; FIXME: Some tests need network access.
7568 '(#:tests? #f))
5faa5ce4
RW
7569 (synopsis "Tool and library for manipulating LilyPond files")
7570 (description "This package provides a Python library to parse, manipulate
7571or create documents in LilyPond format. A command line program ly is also
7572provided that can be used to do various manipulations with LilyPond files.")
7573 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 7574 (license license:gpl2+)))
7e7b27d9
CR
7575
7576(define-public python-appdirs
7577 (package
7578 (name "python-appdirs")
543782e1 7579 (version "1.4.3")
7e7b27d9
CR
7580 (source
7581 (origin
7582 (method url-fetch)
26b16fd9 7583 (uri (pypi-uri "appdirs" version))
7e7b27d9
CR
7584 (sha256
7585 (base32
543782e1 7586 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7e7b27d9 7587 (build-system python-build-system)
7bf837fd 7588 (home-page "https://github.com/ActiveState/appdirs")
7e7b27d9
CR
7589 (synopsis
7590 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7591 (description
7592 "This module provides a portable way of finding out where user data
7593should be stored on various operating systems.")
7594 (license license:expat)))
7595
7596(define-public python2-appdirs
7597 (package-with-python2 python-appdirs))
89b2e0b0
LF
7598
7599(define-public python-llfuse
7600 (package
7601 (name "python-llfuse")
4d31d143 7602 (version "1.2")
89b2e0b0
LF
7603 (source (origin
7604 (method url-fetch)
7605 (uri (string-append
7606 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7607 "llfuse-" version ".tar.bz2"))
7608 (sha256
7609 (base32
4d31d143 7610 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
89b2e0b0
LF
7611 (build-system python-build-system)
7612 (inputs
7613 `(("fuse" ,fuse)
7614 ("attr" ,attr)))
7615 (native-inputs
f3b98f4f 7616 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
7617 (synopsis "Python bindings for FUSE")
7618 (description
7619 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7620 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 7621 (license license:lgpl2.0+)
cd0569c4 7622 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
7623
7624(define-public python2-llfuse
cd0569c4
LF
7625 (package (inherit (package-with-python2
7626 (strip-python2-variant python-llfuse)))
7627 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7628
7629;; For attic-0.16
7630(define-public python-llfuse-0.41
7631 (package (inherit python-llfuse)
229b3661 7632 (version "0.41.1")
cd0569c4
LF
7633 (source (origin
7634 (method url-fetch)
7635 (uri (string-append
7636 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7637 "llfuse-" version ".tar.bz2"))
7638 (sha256
7639 (base32
229b3661 7640 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
7641 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7642 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 7643 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
7644
7645(define-public python-msgpack
7646 (package
7647 (name "python-msgpack")
aed625bd 7648 (version "0.4.8")
641c9871
LF
7649 (source (origin
7650 (method url-fetch)
ae831df4 7651 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
7652 (sha256
7653 (base32
aed625bd 7654 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 7655 (build-system python-build-system)
641c9871
LF
7656 (synopsis "MessagePack (de)serializer")
7657 (description "MessagePack is a fast, compact binary serialization format,
7658suitable for similar data to JSON. This package provides CPython bindings for
7659reading and writing MessagePack data.")
7660 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 7661 (license license:asl2.0)))
bd74be7b
LF
7662
7663(define-public python2-msgpack
f210e944 7664 (package-with-python2 python-msgpack))
641c9871 7665
6e5e39f4
CR
7666(define-public python-netaddr
7667 (package
7668 (name "python-netaddr")
e121be1e 7669 (version "0.7.19")
6e5e39f4
CR
7670 (source
7671 (origin
7672 (method url-fetch)
576c0e29 7673 (uri (pypi-uri "netaddr" version))
6e5e39f4
CR
7674 (sha256
7675 (base32
e121be1e 7676 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6e5e39f4
CR
7677 (build-system python-build-system)
7678 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
7679 (home-page "https://github.com/drkjam/netaddr/")
7680 (synopsis "Pythonic manipulation of network addresses")
7681 (description
7682 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7683and MAC network addresses.")
3f641af0 7684 (license license:bsd-3)))
6e5e39f4
CR
7685
7686(define-public python2-netaddr
7687 (package-with-python2 python-netaddr))
8c692a52 7688
4640a11b
RJ
7689(define-public python2-neo4j-driver
7690 (package
7691 (name "python2-neo4j-driver")
7692 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
7693 (version "1.4.0")
7694 (source (origin
7695 (method url-fetch)
7696 (uri (pypi-uri "neo4j-driver" version))
7697 (sha256
7698 (base32
7699 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
7700 (build-system python-build-system)
7701 (arguments
7702 `(#:python ,python-2))
7703 (home-page "https://neo4j.com/developer/python/")
7704 (synopsis "Neo4j driver code written in Python")
7705 (description "This package provides the Neo4j Python driver that connects
7706to the database using Neo4j's binary protocol. It aims to be minimal, while
7707being idiomatic to Python.")
7708 (license license:asl2.0)))
7709
357ab93a
RJ
7710(define-public python2-py2neo
7711 (package
7712 (name "python2-py2neo")
7713 (version "3.1.2")
7714 (source (origin
7715 (method url-fetch)
7716 (uri (pypi-uri "py2neo" version))
7717 (sha256
7718 (base32
7719 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
7720 (build-system python-build-system)
7721 (arguments
7722 `(#:python ,python-2))
7723 (home-page "http://py2neo.org")
7724 (synopsis "Library and toolkit for working with Neo4j in Python")
7725 (description "This package provides a client library and toolkit for
7726working with Neo4j from within Python applications and from the command
7727line. The core library has no external dependencies and has been carefully
7728designed to be easy and intuitive to use.")
7729 (license license:asl2.0)))
7730
8c692a52
CR
7731(define-public python-wrapt
7732 (package
7733 (name "python-wrapt")
d25bee26 7734 (version "1.10.8")
8c692a52
CR
7735 (source
7736 (origin
7737 (method url-fetch)
d25bee26 7738 (uri (pypi-uri "wrapt" version))
8c692a52
CR
7739 (sha256
7740 (base32
d25bee26 7741 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
8c692a52
CR
7742 (build-system python-build-system)
7743 (arguments
7744 ;; Tests are not included in the tarball, they are only available in the
7745 ;; git repository.
7746 `(#:tests? #f))
8c692a52
CR
7747 (home-page "https://github.com/GrahamDumpleton/wrapt")
7748 (synopsis "Module for decorators, wrappers and monkey patching")
7749 (description
7750 "The aim of the wrapt module is to provide a transparent object proxy for
7751 Python, which can be used as the basis for the construction of function
7752 wrappers and decorator functions.")
3f641af0 7753 (license license:bsd-2)))
8c692a52
CR
7754
7755(define-public python2-wrapt
7756 (package-with-python2 python-wrapt))
b85c85be
CR
7757
7758(define-public python-iso8601
7759 (package
7760 (name "python-iso8601")
fe84bc9a 7761 (version "0.1.11")
b85c85be
CR
7762 (source
7763 (origin
7764 (method url-fetch)
fe84bc9a 7765 (uri (pypi-uri "iso8601" version))
b85c85be 7766 (sha256
fe84bc9a
EF
7767 (base32
7768 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 7769 (build-system python-build-system)
63b02364
MB
7770 (native-inputs
7771 `(("python-pytest" ,python-pytest)))
b85c85be
CR
7772 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7773 (synopsis "Module to parse ISO 8601 dates")
7774 (description
7775 "This module parses the most common forms of ISO 8601 date strings (e.g.
7776@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7777 (license license:expat)))
7778
7779(define-public python2-iso8601
7780 (package-with-python2 python-iso8601))
5e412b63
CR
7781
7782(define-public python-monotonic
7783 (package
7784 (name "python-monotonic")
7785 (version "0.3")
7786 (source
7787 (origin
7788 (method url-fetch)
7789 (uri (string-append
7790 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7791 version
7792 ".tar.gz"))
7793 (sha256
7794 (base32
7795 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7796 (build-system python-build-system)
5e412b63
CR
7797 (home-page "https://github.com/atdt/monotonic")
7798 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7799 (description
7800 "This module provides a monotonic() function which returns the value (in
7801fractional seconds) of a clock which never goes backwards.")
3f641af0 7802 (license license:asl2.0)))
5e412b63
CR
7803
7804(define-public python2-monotonic
7805 (package-with-python2 python-monotonic))
de34afac
CR
7806
7807(define-public python-webob
7808 (package
7809 (name "python-webob")
b8834c21 7810 (version "1.5.1")
de34afac
CR
7811 (source
7812 (origin
7813 (method url-fetch)
b8834c21 7814 (uri (pypi-uri "WebOb" version))
de34afac
CR
7815 (sha256
7816 (base32
b8834c21 7817 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 7818 (build-system python-build-system)
328bb95d 7819 (native-inputs
f3b98f4f 7820 `(("python-nose" ,python-nose)))
de34afac
CR
7821 (home-page "http://webob.org/")
7822 (synopsis "WSGI request and response object")
7823 (description
7824 "WebOb provides wrappers around the WSGI request environment, and an
7825object to help create WSGI responses.")
7826 (license license:expat)))
7827
7828(define-public python2-webob
7829 (package-with-python2 python-webob))
350ba0a3 7830
02a8a187
BW
7831(define-public python-xlrd
7832 (package
7833 (name "python-xlrd")
c2ad4d70 7834 (version "1.0.0")
02a8a187
BW
7835 (source (origin
7836 (method url-fetch)
e775f48e 7837 (uri (pypi-uri "xlrd" version))
02a8a187
BW
7838 (sha256
7839 (base32
c2ad4d70 7840 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
7841 (build-system python-build-system)
7842 (arguments
7843 `(#:phases
7844 (modify-phases %standard-phases
c2ad4d70 7845 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
7846 ;; run tests instead for now.
7847 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 7848 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
7849 (home-page "http://www.python-excel.org/")
7850 (synopsis "Library for extracting data from Excel files")
7851 (description "This packages provides a library to extract data from
c598e35c 7852spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
7853@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7854Unicode-aware. It is not intended as an end-user tool.")
3f641af0 7855 (license license:bsd-3)))
02a8a187
BW
7856
7857(define-public python2-xlrd
7858 (package-with-python2 python-xlrd))
7859
350ba0a3
CR
7860(define-public python-prettytable
7861 (package
7862 (name "python-prettytable")
7863 (version "0.7.2")
7864 (source
7865 (origin
7866 (method url-fetch)
7867 (uri (string-append
7868 "https://pypi.python.org/packages/source/P/PrettyTable/"
7869 "prettytable-" version ".tar.bz2"))
7870 (sha256
7871 (base32
7872 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7873 (build-system python-build-system)
350ba0a3
CR
7874 (home-page "http://code.google.com/p/prettytable/")
7875 (synopsis "Display tabular data in an ASCII table format")
7876 (description
7877 "A library designed to represent tabular data in visually appealing ASCII
7878tables. PrettyTable allows for selection of which columns are to be printed,
7879independent alignment of columns (left or right justified or centred) and
7880printing of sub-tables by specifying a row range.")
3f641af0 7881 (license license:bsd-3)))
350ba0a3
CR
7882
7883(define-public python2-prettytable
7884 (package-with-python2 python-prettytable))
7a8ac75a 7885
9f8ee3fe
RW
7886(define-public python-tables
7887 (package
7888 (name "python-tables")
7889 (version "3.2.2")
7890 (source
7891 (origin
7892 (method url-fetch)
7893 (uri (pypi-uri "tables" version))
7894 (sha256
7895 (base32
bac23672
HG
7896 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7897 (modules '((guix build utils)))
7898 (snippet
7899 '(begin
7900 ;; Remove pre-compiled .pyc files from source.
7901 (for-each delete-file-recursively
7902 (find-files "." "__pycache__" #:directories? #t))
7903 (for-each delete-file (find-files "." "\\.pyc$"))
7904 #t))))
9f8ee3fe
RW
7905 (build-system python-build-system)
7906 (arguments
7907 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7908 ;; or "check", so we must override the build and check phases.
7909 #:phases
7910 (modify-phases %standard-phases
7911 (add-after 'unpack 'use-gcc
7912 (lambda _
7913 (substitute* "setup.py"
7914 (("compiler = new_compiler\\(\\)" line)
7915 (string-append line
7916 "\ncompiler.set_executables(compiler='gcc',"
7917 "compiler_so='gcc',"
7918 "linker_exe='gcc',"
7919 "linker_so='gcc -shared')")))
7920 #t))
7921 (replace 'build
7922 (lambda* (#:key inputs #:allow-other-keys)
7923 (zero? (system* "python" "setup.py" "build"
7924 (string-append "--hdf5="
7925 (assoc-ref inputs "hdf5"))))))
7926 (replace 'check
7927 (lambda* (#:key inputs #:allow-other-keys)
7928 (zero? (system* "python" "setup.py" "check"
7929 (string-append "--hdf5="
7930 (assoc-ref inputs "hdf5")))))))))
7931 (propagated-inputs
7932 `(("python-numexpr" ,python-numexpr)
7933 ("python-numpy" ,python-numpy)))
7934 (native-inputs
f3b98f4f 7935 `(("python-cython" ,python-cython)
9f8ee3fe
RW
7936 ("pkg-config" ,pkg-config)))
7937 (inputs
7938 `(("hdf5" ,hdf5)
7939 ("bzip2" ,bzip2)
7940 ("zlib" ,zlib)))
7941 (home-page "http://www.pytables.org/")
7942 (synopsis "Hierarchical datasets for Python")
7943 (description "PyTables is a package for managing hierarchical datasets and
d1e4ad1b 7944designed to efficiently cope with extremely large amounts of data.")
3f641af0 7945 (license license:bsd-3)))
9f8ee3fe
RW
7946
7947(define-public python2-tables
7948 (package-with-python2 python-tables))
7949
7a8ac75a
RW
7950(define-public python-pyasn1
7951 (package
7952 (name "python-pyasn1")
5e0ddfba 7953 (version "0.2.3")
7a8ac75a
RW
7954 (source
7955 (origin
7956 (method url-fetch)
caa0edb3 7957 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
7958 (sha256
7959 (base32
5e0ddfba 7960 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7a8ac75a
RW
7961 (build-system python-build-system)
7962 (home-page "http://pyasn1.sourceforge.net/")
7963 (synopsis "ASN.1 types and codecs")
7964 (description
7965 "This is an implementation of ASN.1 types and codecs in Python. It is
7966suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 7967 (license license:bsd-2)))
7a8ac75a
RW
7968
7969(define-public python2-pyasn1
7970 (package-with-python2 python-pyasn1))
9a49a535 7971
5988c299
EF
7972(define-public python-pyasn1-modules
7973 (package
7974 (name "python-pyasn1-modules")
7975 (version "0.0.8")
7976 (source
7977 (origin
7978 (method url-fetch)
7979 (uri (pypi-uri "pyasn1-modules" version))
7980 (sha256
7981 (base32
7982 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7983 (build-system python-build-system)
5988c299
EF
7984 (propagated-inputs
7985 `(("python-pyasn1" ,python-pyasn1)))
3b3b60d0 7986 (home-page "https://sourceforge.net/projects/pyasn1/")
5988c299
EF
7987 (synopsis "ASN.1 codec implementations")
7988 (description
7989 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7990implementations of ASN.1-based codecs and protocols.")
3f641af0 7991 (license license:bsd-3)))
5988c299
EF
7992
7993(define-public python2-pyasn1-modules
7994 (package-with-python2 python-pyasn1-modules))
7995
520af157 7996(define-public python-ipaddress
9a49a535 7997 (package
520af157 7998 (name "python-ipaddress")
36e0d9db 7999 (version "1.0.18")
520af157
DC
8000 (source (origin
8001 (method url-fetch)
8002 (uri (pypi-uri "ipaddress" version))
8003 (sha256
8004 (base32
36e0d9db 8005 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
9a49a535 8006 (build-system python-build-system)
9a49a535
RW
8007 (home-page "https://github.com/phihag/ipaddress")
8008 (synopsis "IP address manipulation library")
8009 (description
520af157
DC
8010 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
8011 in Python. This library is used to create, poke at, and manipulate IPv4 and
8012 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
8013 module to older versions of Python.")
f210e944 8014 (license license:psfl)))
520af157
DC
8015
8016(define-public python2-ipaddress
f210e944 8017 (package-with-python2 python-ipaddress))
3f00e078 8018
4a238186
HG
8019(define-public python2-ipaddr
8020 (package
8021 (name "python2-ipaddr")
8022 (version "2.1.11")
8023 (source
8024 (origin
8025 (method url-fetch)
8026 (uri (pypi-uri "ipaddr" version))
8027 (sha256
8028 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
8029 (build-system python-build-system)
8030 (arguments
8031 `(#:python ,python-2 ;version 2 only
8032 #:phases
8033 (modify-phases %standard-phases
8034 (replace 'check
8035 (lambda* _
8036 (zero? (system* "python" "ipaddr_test.py")))))))
8037 (home-page "https://github.com/google/ipaddr-py")
8038 (synopsis "IP address manipulation library")
8039 (description
8040 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
8041IPv6 addresses and networks.
8042
8043For new implementations you may prefer to use the standard module
8044@code{ipaddress}, which was introduced in Python 3.3 and backported to older
8045versions of Python.")
3f641af0 8046 (license license:asl2.0)))
4a238186 8047
3f00e078
RW
8048(define-public python-idna
8049 (package
8050 (name "python-idna")
37c04f91 8051 (version "2.5")
3f00e078
RW
8052 (source
8053 (origin
8054 (method url-fetch)
37c04f91 8055 (uri (pypi-uri "idna" version))
3f00e078
RW
8056 (sha256
8057 (base32
37c04f91 8058 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
3f00e078 8059 (build-system python-build-system)
3f00e078
RW
8060 (home-page "https://github.com/kjd/idna")
8061 (synopsis "Internationalized domain names in applications")
8062 (description
8063 "This is a library to support the Internationalised Domain Names in
8064Applications (IDNA) protocol as specified in RFC 5891. This version of the
8065protocol is often referred to as “IDNA2008” and can produce different results
8066from the earlier standard from 2003. The library is also intended to act as a
8067suitable drop-in replacement for the “encodings.idna” module that comes with
8068the Python standard library but currently only supports the older 2003
8069specification.")
3f641af0 8070 (license license:bsd-4)))
3f00e078
RW
8071
8072(define-public python2-idna
8073 (package-with-python2 python-idna))
36ebf972
RW
8074
8075(define-public python-pretend
8076 (package
8077 (name "python-pretend")
8078 (version "1.0.8")
8079 (source
8080 (origin
8081 (method url-fetch)
8082 (uri (string-append "https://pypi.python.org/packages/source/p/"
8083 "pretend/pretend-" version ".tar.gz"))
8084 (sha256
8085 (base32
8086 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
8087 (build-system python-build-system)
36ebf972
RW
8088 (home-page "https://github.com/alex/pretend")
8089 (synopsis "Library for stubbing in Python")
8090 (description
8091 "Pretend is a library to make stubbing with Python easier. Stubbing is a
8092technique for writing tests. You may hear the term mixed up with mocks,
8093fakes, or doubles. Basically, a stub is an object that returns pre-canned
8094responses, rather than doing any computation.")
3f641af0 8095 (license license:bsd-3)))
36ebf972
RW
8096
8097(define-public python2-pretend
8098 (package-with-python2 python-pretend))
aa759a51
RW
8099
8100(define-public python-cryptography-vectors
8101 (package
8102 (name "python-cryptography-vectors")
f73f1f07 8103 (version "2.0.3")
aa759a51
RW
8104 (source
8105 (origin
8106 (method url-fetch)
9c509ca9 8107 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
8108 (sha256
8109 (base32
f73f1f07 8110 "1qa117fs1yd50zn2cfxh7d9l999ds0z4h83m9m7j4fk6ffm33f5y"))))
aa759a51 8111 (build-system python-build-system)
aa759a51 8112 (home-page "https://github.com/pyca/cryptography")
66e07664 8113 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
8114 (description
8115 "This package contains test vectors for the cryptography package.")
8116 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 8117 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
8118
8119(define-public python2-cryptography-vectors
8120 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
8121
8122(define-public python-cryptography
8123 (package
8124 (name "python-cryptography")
f37995fa 8125 (version "2.0.3")
88b47cb0
RW
8126 (source
8127 (origin
8128 (method url-fetch)
9c509ca9 8129 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
8130 (sha256
8131 (base32
f37995fa 8132 "0fnck37zyvbzmccbp7w3jy27jgmij1992j5wyy3gxhw6a11b4jyh"))))
88b47cb0
RW
8133 (build-system python-build-system)
8134 (inputs
8135 `(("openssl" ,openssl)))
8136 (propagated-inputs
dc1bd2b5
LF
8137 `(("python-asn1crypto" ,python-asn1crypto)
8138 ("python-cffi" ,python-cffi)
88b47cb0 8139 ("python-six" ,python-six)
88b47cb0
RW
8140 ("python-idna" ,python-idna)
8141 ("python-iso8601" ,python-iso8601)))
8142 (native-inputs
8143 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 8144 ("python-hypothesis" ,python-hypothesis)
88b47cb0 8145 ("python-pretend" ,python-pretend)
912dcbad 8146 ("python-pytz" ,python-pytz)
928da609 8147 ("python-pytest" ,python-pytest)))
88b47cb0
RW
8148 (home-page "https://github.com/pyca/cryptography")
8149 (synopsis "Cryptographic recipes and primitives for Python")
8150 (description
8151 "cryptography is a package which provides cryptographic recipes and
8152primitives to Python developers. It aims to be the “cryptographic standard
8153library” for Python. The package includes both high level recipes, and low
8154level interfaces to common cryptographic algorithms such as symmetric ciphers,
8155message digests and key derivation functions.")
8156 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 8157 (license (list license:bsd-3 license:asl2.0))
519e2f4f 8158 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
8159
8160(define-public python2-cryptography
519e2f4f
LF
8161 (let ((crypto (package-with-python2
8162 (strip-python2-variant python-cryptography))))
88b47cb0
RW
8163 (package (inherit crypto)
8164 (propagated-inputs
8165 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
8166 ("python2-backport-ssl-match-hostname"
8167 ,python2-backport-ssl-match-hostname)
68f1cdec 8168 ("python2-enum34" ,python2-enum34)
88b47cb0 8169 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
8170
8171(define-public python-pyopenssl
8172 (package
8173 (name "python-pyopenssl")
0c19c0f2 8174 (version "17.3.0")
5af999b8
RW
8175 (source
8176 (origin
8177 (method url-fetch)
eb68d268 8178 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
8179 (sha256
8180 (base32
0c19c0f2 8181 "0xkc1wfnpg6abzllivg3ylhc63npjdy1v81f4kc08bm8cj80nqr9"))))
5af999b8 8182 (build-system python-build-system)
30e0229a 8183 (arguments
7c6bf660
MB
8184 '(#:phases
8185 (modify-phases %standard-phases
8186 (delete 'check)
8187 (add-after 'install 'check
8188 (lambda* (#:key inputs outputs #:allow-other-keys)
8189 (add-installed-pythonpath inputs outputs)
96bbc41f
MB
8190 (zero? (system* "py.test" "-v" "-k"
8191 (string-append
8192 ;; This test tries to look up certificates from
8193 ;; the compiled-in default path in OpenSSL, which
8194 ;; does not exist in the build environment.
8195 "not test_fallback_default_verify_paths "
8196 ;; This test attempts to make a connection to
8197 ;; an external web service.
8198 "and not test_set_default_verify_paths"))))))))
5af999b8
RW
8199 (propagated-inputs
8200 `(("python-cryptography" ,python-cryptography)
8201 ("python-six" ,python-six)))
8202 (inputs
8203 `(("openssl" ,openssl)))
30e0229a 8204 (native-inputs
2580c2f0
MB
8205 `(("python-flaky" ,python-flaky)
8206 ("python-pretend" ,python-pretend)
928da609 8207 ("python-pytest" ,python-pytest)))
5af999b8
RW
8208 (home-page "https://github.com/pyca/pyopenssl")
8209 (synopsis "Python wrapper module around the OpenSSL library")
8210 (description
8211 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
8212library.")
3f641af0 8213 (license license:asl2.0)))
5af999b8
RW
8214
8215(define-public python2-pyopenssl
519e2f4f 8216 (package-with-python2 python-pyopenssl))
643725a1
CR
8217
8218(define-public python-pip
8219 (package
8220 (name "python-pip")
392c26b0 8221 (version "9.0.1")
643725a1
CR
8222 (source
8223 (origin
8224 (method url-fetch)
6fb54e3b 8225 (uri (pypi-uri "pip" version))
643725a1
CR
8226 (sha256
8227 (base32
392c26b0 8228 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
643725a1 8229 (build-system python-build-system)
392c26b0
MC
8230 (arguments
8231 '(#:tests? #f)) ; there are no tests in the pypi archive.
643725a1 8232 (home-page "https://pip.pypa.io/")
392c26b0 8233 (synopsis "Package manager for Python software")
643725a1 8234 (description
392c26b0 8235 "Pip is a package manager for Python software, that finds packages on the
643725a1
CR
8236Python Package Index (PyPI).")
8237 (license license:expat)))
8238
8239(define-public python2-pip
8240 (package-with-python2 python-pip))
d8c4998f
LC
8241
8242(define-public python-tlsh
8243 (package
8244 (name "python-tlsh")
99b00dc7 8245 (version "3.4.4")
d8c4998f
LC
8246 (home-page "https://github.com/trendmicro/tlsh")
8247 (source (origin
99b00dc7
EF
8248 (method url-fetch)
8249 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
8250 version ".tar.gz"))
d8c4998f
LC
8251 (sha256
8252 (base32
99b00dc7
EF
8253 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
8254 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
8255 (build-system cmake-build-system)
8256 (arguments
8257 '(#:out-of-source? #f
8258 #:phases (modify-phases %standard-phases
8259 (replace
8260 'install
8261 (lambda* (#:key outputs #:allow-other-keys)
8262 ;; Build and install the Python bindings. The underlying
8263 ;; C++ library is apparently not meant to be installed.
8264 (let ((out (assoc-ref outputs "out")))
8265 (with-directory-excursion "py_ext"
8266 (and (system* "python" "setup.py" "build")
8267 (system* "python" "setup.py" "install"
8268 (string-append "--prefix=" out))))))))))
8269 (inputs `(("python" ,python-wrapper))) ;for the bindings
8270 (synopsis "Fuzzy matching library for Python")
8271 (description
8272 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8273Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8274value which can be used for similarity comparisons. Similar objects have
8275similar hash values, which allows for the detection of similar objects by
8276comparing their hash values. The byte stream should have a sufficient amount
8277of complexity; for example, a byte stream of identical bytes will not generate
8278a hash value.")
3f641af0 8279 (license license:asl2.0)))
d8c4998f
LC
8280
8281(define-public python2-tlsh
8282 (package
8283 (inherit python-tlsh)
8284 (name "python2-tlsh")
8285 (inputs `(("python" ,python-2)))))
d96034ed 8286
67f66812
BW
8287(define-public python-termcolor
8288 (package
8289 (name "python-termcolor")
8290 (version "1.1.0")
8291 (source
8292 (origin
8293 (method url-fetch)
a5e8f597 8294 (uri (pypi-uri "termcolor" version))
67f66812
BW
8295 (sha256
8296 (base32
8297 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8298 (build-system python-build-system)
8299 (arguments
8300 ;; There are no tests.
8301 `(#:tests? #f))
8302 (home-page "http://pypi.python.org/pypi/termcolor")
8303 (synopsis "ANSII Color formatting for terminal output")
8304 (description
8305 "This package provides ANSII Color formatting for output in terminals.")
8306 (license license:expat)))
8307
8308(define-public python2-termcolor
8309 (package-with-python2 python-termcolor))
8310
d96034ed
LC
8311(define-public python-libarchive-c
8312 (package
8313 (name "python-libarchive-c")
03fd001c 8314 (version "2.2")
d96034ed
LC
8315 (source (origin
8316 (method url-fetch)
03fd001c 8317 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
8318 (sha256
8319 (base32
03fd001c 8320 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
8321 (build-system python-build-system)
8322 (arguments
8323 '(#:phases (modify-phases %standard-phases
8324 (add-before
8325 'build 'reference-libarchive
8326 (lambda* (#:key inputs #:allow-other-keys)
8327 ;; Retain the absolute file name of libarchive.so.
8328 (let ((libarchive (assoc-ref inputs "libarchive")))
8329 (substitute* "libarchive/ffi.py"
8330 (("find_library\\('archive'\\)")
8331 (string-append "'" libarchive
b41a05ce 8332 "/lib/libarchive.so'")))))))))
d96034ed 8333 (inputs
f3b98f4f 8334 `(("libarchive" ,libarchive)))
d96034ed
LC
8335 (home-page "https://github.com/Changaco/python-libarchive-c")
8336 (synopsis "Python interface to libarchive")
8337 (description
8338 "This package provides Python bindings to libarchive, a C library to
8339access possibly compressed archives in many different formats. It uses
8340Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 8341 (license license:lgpl2.0+)))
d96034ed
LC
8342
8343(define-public python2-libarchive-c
8344 (package-with-python2 python-libarchive-c))
5e1c9367
LC
8345
8346(define-public python-file
8347 (package
8348 (inherit file)
8349 (name "python-file")
8350 (build-system python-build-system)
8351 (arguments
8352 '(#:tests? #f ;no tests
00bf74be 8353 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
8354 #:phases (modify-phases %standard-phases
8355 (add-before 'build 'change-directory
8356 (lambda _
8357 (chdir "python")
8358 #t))
8359 (add-before 'build 'set-library-file-name
8360 (lambda* (#:key inputs #:allow-other-keys)
8361 (let ((file (assoc-ref inputs "file")))
8362 (substitute* "magic.py"
8363 (("find_library\\('magic'\\)")
8364 (string-append "'" file "/lib/libmagic.so'")))
8365 #t))))))
8366 (inputs `(("file" ,file)))
8367 (self-native-input? #f)
daeeea71
CM
8368 (synopsis "Python bindings to the libmagic file type guesser. Note that
8369this module and the python-magic module both provide a \"magic.py\" file;
8370these two modules, which are different and were developed separately, both
f210e944 8371serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
8372
8373(define-public python2-file
f210e944 8374 (package-with-python2 python-file))
85d4aeac
LC
8375
8376(define-public python-debian
8377 (package
8378 (name "python-debian")
02d7f337 8379 (version "0.1.28")
85d4aeac
LC
8380 (source
8381 (origin
8382 (method url-fetch)
5e217a8b 8383 (uri (pypi-uri name version))
85d4aeac
LC
8384 (sha256
8385 (base32
02d7f337 8386 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
85d4aeac 8387 (build-system python-build-system)
f22efa01 8388 (propagated-inputs
85d4aeac 8389 `(("python-six" ,python-six)))
85d4aeac
LC
8390 (home-page "http://packages.debian.org/sid/python-debian")
8391 (synopsis "Debian package related modules")
8392 (description
5c7bdc9a
LC
8393 ;; XXX: Use @enumerate instead of @itemize to work around
8394 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
8395 "This package provides Python modules that abstract many formats of
8396Debian-related files, such as:
8397
5c7bdc9a 8398@enumerate
85d4aeac
LC
8399@item Debtags information;
8400@item @file{debian/changelog} files;
8401@item packages files, pdiffs;
8402@item control files of single or multiple RFC822-style paragraphs---e.g.
8403 @file{debian/control}, @file{.changes}, @file{.dsc};
8404@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8405 contained files and meta-information.
5c7bdc9a 8406@end enumerate\n")
85d4aeac
LC
8407
8408 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 8409 (license license:gpl3+)))
85d4aeac
LC
8410
8411(define-public python2-debian
8412 (package-with-python2 python-debian))
816a6538 8413
2d321bb2
RW
8414(define-public python-nbformat
8415 (package
8416 (name "python-nbformat")
ae7f246c 8417 (version "4.3.0")
2d321bb2
RW
8418 (source
8419 (origin
8420 (method url-fetch)
8421 (uri (pypi-uri "nbformat" version))
8422 (sha256
8423 (base32
ae7f246c 8424 "12s7j4qja8b5bs1kyw5dzmrqbjxxj8wk52cyasbiqbv7fblcrssz"))))
2d321bb2
RW
8425 (build-system python-build-system)
8426 (arguments `(#:tests? #f)) ; no test target
8427 (propagated-inputs
8428 `(("python-ipython-genutils" ,python-ipython-genutils)
8429 ("python-jsonschema" ,python-jsonschema)
8430 ("python-jupyter-core" ,python-jupyter-core)
8431 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
8432 (home-page "http://jupyter.org")
8433 (synopsis "Jupyter Notebook format")
8434 (description "This package provides the reference implementation of the
8435Jupyter Notebook format and Python APIs for working with notebooks.")
8436 (license license:bsd-3)))
8437
8438(define-public python2-nbformat
8439 (package-with-python2 python-nbformat))
8440
55436048
RW
8441(define-public python-bleach
8442 (package
8443 (name "python-bleach")
8444 (version "1.4.3")
8445 (source
8446 (origin
8447 (method url-fetch)
8448 (uri (pypi-uri "bleach" version))
8449 (sha256
8450 (base32
8451 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
8452 (build-system python-build-system)
8453 (propagated-inputs
8454 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
8455 ("python-six" ,python-six)))
8456 (native-inputs
8457 `(("python-nose" ,python-nose)))
7bf837fd 8458 (home-page "https://github.com/jsocol/bleach")
55436048
RW
8459 (synopsis "Whitelist-based HTML-sanitizing tool")
8460 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8461 (license license:asl2.0)))
8462
8463(define-public python2-bleach
8464 (package-with-python2 python-bleach))
8465
60590a3a
RW
8466(define-public python-entrypoints
8467 (package
8468 (name "python-entrypoints")
8469 (version "0.2.2")
8470 (source
8471 (origin
8472 (method url-fetch)
8473 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
8474 version ".tar.gz"))
8475 (file-name (string-append name "-" version ".tar.gz"))
8476 (sha256
8477 (base32
8478 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
8479 (build-system python-build-system)
8480 ;; The package does not come with a setup.py file, so we have to generate
8481 ;; one ourselves.
8482 (arguments
8483 `(#:tests? #f
8484 #:phases
8485 (modify-phases %standard-phases
8486 (add-after 'unpack 'create-setup.py
8487 (lambda _
8488 (call-with-output-file "setup.py"
8489 (lambda (port)
8490 (format port "\
8491from setuptools import setup
8492setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8493" ,version))))))))
8494 (home-page "https://github.com/takluyver/entrypoints")
8495 (synopsis "Discover and load entry points from installed Python packages")
8496 (description "Entry points are a way for Python packages to advertise
8497objects with some common interface. The most common examples are
8498@code{console_scripts} entry points, which define shell commands by
8499identifying a Python function to run. The @code{entrypoints} module contains
8500functions to find and load entry points.")
8501 (license license:expat)))
8502
8503(define-public python2-entrypoints
8504 (package-with-python2 python-entrypoints))
8505
c60898a8
RW
8506(define-public python-nbconvert
8507 (package
8508 (name "python-nbconvert")
8509 (version "5.0.0b1")
8510 (source
8511 (origin
8512 (method url-fetch)
8513 (uri (pypi-uri "nbconvert" version))
8514 (sha256
8515 (base32
8516 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8517 (build-system python-build-system)
497355dc
MB
8518 (arguments
8519 `(;; The "bdist_egg" target is disabled by default, causing the installation
8520 ;; to fail.
8521 #:configure-flags (list "bdist_egg")
8522 ;; FIXME: 5 failures, 40 errors.
8523 #:tests? #f))
8524 ;; #:phases
8525 ;; (modify-phases %standard-phases
8526 ;; (replace 'check
8527 ;; (lambda _
8528 ;; (zero? (system* "py.test" "-v")))))
8529 (native-inputs
8530 `(("python-pytest" ,python-pytest)))
c60898a8
RW
8531 (propagated-inputs
8532 `(("python-bleach" ,python-bleach)
8533 ("python-entrypoints" ,python-entrypoints)
8534 ("python-jinja2" ,python-jinja2)
8535 ("python-jupyter-core" ,python-jupyter-core)
8536 ("python-mistune" ,python-mistune)
8537 ("python-nbformat" ,python-nbformat)
8538 ("python-pygments" ,python-pygments)
c60898a8
RW
8539 ("python-traitlets" ,python-traitlets)))
8540 (home-page "http://jupyter.org")
8541 (synopsis "Converting Jupyter Notebooks")
8542 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8543notebooks to various other formats via Jinja templates. It allows you to
8544convert an @code{.ipynb} notebook file into various static formats including:
8545
8546@enumerate
8547@item HTML
8548@item LaTeX
8549@item PDF
8550@item Reveal JS
8551@item Markdown (md)
8552@item ReStructured Text (rst)
8553@item executable script
8554@end enumerate\n")
8555 (license license:bsd-3)))
8556
8557(define-public python2-nbconvert
8558 (package-with-python2 python-nbconvert))
8559
a0d62280
RW
8560(define-public python-notebook
8561 (package
8562 (name "python-notebook")
8563 (version "4.2.3")
8564 (source (origin
8565 (method url-fetch)
8566 (uri (pypi-uri "notebook" version))
8567 (sha256
8568 (base32
8569 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
8570 (build-system python-build-system)
8571 (arguments
8572 `(#:phases
8573 (modify-phases %standard-phases
8574 (replace 'check
8575 (lambda _
8576 ;; HOME must be set for tests
8577 (setenv "HOME" "/tmp")
8578 (zero? (system* "nosetests")))))))
8579 (propagated-inputs
8580 `(("python-jupyter-core" ,python-jupyter-core)
8581 ("python-nbformat" ,python-nbformat)
8582 ("python-nbconvert" ,python-nbconvert)
8583 ("python-ipython" ,python-ipython)))
8584 (native-inputs
8585 `(("python-nose" ,python-nose)
8586 ("python-sphinx" ,python-sphinx)
8587 ("python-requests" ,python-requests)))
8588 (home-page "http://jupyter.org/")
8589 (synopsis "Web-based notebook environment for interactive computing")
8590 (description
8591 "The Jupyter HTML notebook is a web-based notebook environment for
8592interactive computing.")
3a735ecf 8593 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
8594 (license license:bsd-3)))
8595
8596(define-public python2-notebook
3a735ecf
HG
8597 (let ((base (package-with-python2
8598 (strip-python2-variant python-notebook))))
8599 (package (inherit base)
8600 (native-inputs
8601 `(("python2-mock" ,python2-mock)
8602 ,@(package-native-inputs base)))
8603 (arguments
8604 (substitute-keyword-arguments (package-arguments base)
8605 ((#:phases phases)
8606 `(modify-phases ,phases
8607 (add-before 'check 'disable-test-case
8608 ;; The test requires network access to localhost. Curiously it
8609 ;; fails with Python 2 only. Simply make the test-case return
8610 ;; immediately.
8611 (lambda _
8612 (substitute*
8613 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8614 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 8615
d55724ed
RW
8616(define-public python-widgetsnbextension
8617 (package
8618 (name "python-widgetsnbextension")
8619 (version "1.2.6")
8620 (source
8621 (origin
8622 (method url-fetch)
8623 (uri (pypi-uri "widgetsnbextension" version))
8624 (sha256
8625 (base32
8626 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
8627 (build-system python-build-system)
8628 (propagated-inputs
8629 `(("python-notebook" ,python-notebook)))
8630 (native-inputs
58f5fae7
MB
8631 `(("python-certifi" ,python-certifi)
8632 ("python-nose" ,python-nose)))
d55724ed
RW
8633 (home-page "http://ipython.org")
8634 (synopsis "IPython HTML widgets for Jupyter")
8635 (description "This package provides interactive HTML widgets for Jupyter
8636notebooks.")
8637 (license license:bsd-3)))
8638
8639(define-public python2-widgetsnbextension
8640 (package-with-python2 python-widgetsnbextension))
8641
4fe2e344
RW
8642(define-public python-ipywidgets
8643 (package
8644 (name "python-ipywidgets")
8645 (version "5.2.2")
8646 (source
8647 (origin
8648 (method url-fetch)
8649 (uri (pypi-uri "ipywidgets" version))
8650 (sha256
8651 (base32
8652 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8653 (build-system python-build-system)
8654 ;; FIXME: it's not clear how to run the tests.
8655 (arguments `(#:tests? #f))
8656 (propagated-inputs
8657 `(("python-ipykernel" ,python-ipykernel)
8658 ("python-ipython" ,python-ipython)
4fe2e344
RW
8659 ("python-traitlets" ,python-traitlets)
8660 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8661 (home-page "http://ipython.org")
8662 (synopsis "IPython HTML widgets for Jupyter")
8663 (description "Ipywidgets are interactive HTML widgets for Jupyter
8664notebooks and the IPython kernel. Notebooks come alive when interactive
8665widgets are used. Users gain control of their data and can visualize changes
8666in the data.")
8667 (license license:bsd-3)))
8668
8669(define-public python2-ipywidgets
8670 (package-with-python2 python-ipywidgets))
8671
8ceebf8f
RW
8672(define-public python-jupyter-console
8673 (package
8674 (name "python-jupyter-console")
8675 (version "5.0.0")
8676 (source
8677 (origin
8678 (method url-fetch)
8679 (uri (pypi-uri "jupyter_console" version))
8680 (sha256
8681 (base32
8682 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
8683 (build-system python-build-system)
8684 ;; FIXME: it's not clear how to run the tests.
8685 (arguments `(#:tests? #f))
8686 (propagated-inputs
8687 `(("python-ipykernel" ,python-ipykernel)
8688 ("python-ipython" ,python-ipython)
8689 ("python-jupyter-client" ,python-jupyter-client)
8690 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 8691 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
8692 (home-page "https://jupyter.org")
8693 (synopsis "Jupyter terminal console")
8694 (description "This package provides a terminal-based console frontend for
8695Jupyter kernels. It also allows for console-based interaction with non-Python
8696Jupyter kernels such as IJulia and IRKernel.")
8697 (license license:bsd-3)))
8698
8699(define-public python2-jupyter-console
8700 (package-with-python2 python-jupyter-console))
8701
ee8aab1f
CB
8702;; The python-ipython and python-jupyter-console require each other. To get
8703;; the functionality in both packages working, strip down the
8704;; python-jupyter-console package when using it as an input to python-ipython.
8705(define python-jupyter-console-minimal
8706 (package
8707 (inherit python-jupyter-console)
8708 (arguments
8709 (substitute-keyword-arguments
8710 (package-arguments python-jupyter-console)
8711 ((#:phases phases)
8712 `(modify-phases ,phases
8713 (add-after 'install 'delete-bin
8714 (lambda* (#:key outputs #:allow-other-keys)
8715 ;; Delete the bin files, to avoid conflicts in profiles
8716 ;; where python-ipython and python-jupyter-console are
8717 ;; both present.
8718 (delete-file-recursively
8719 (string-append
8720 (assoc-ref outputs "out") "/bin"))))))))
8721 ;; Remove the python-ipython propagated input, to avoid the cycle
8722 (propagated-inputs
8723 (alist-delete
8724 "python-ipython"
8725 (package-propagated-inputs python-jupyter-console)))))
8726
c27ae827
RW
8727(define-public jupyter
8728 (package
8729 (name "jupyter")
8730 (version "1.0.0")
8731 (source
8732 (origin
8733 (method url-fetch)
8734 (uri (pypi-uri "jupyter" version))
8735 (sha256
8736 (base32
8737 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8738 (build-system python-build-system)
8739 ;; FIXME: it's not clear how to run the tests.
8740 (arguments `(#:tests? #f))
8741 (propagated-inputs
8742 `(("python-ipykernel" ,python-ipykernel)
8743 ("python-ipywidgets" ,python-ipywidgets)
8744 ("python-jupyter-console" ,python-jupyter-console)
8745 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 8746 ("python-notebook" ,python-notebook)))
c27ae827
RW
8747 (home-page "http://jupyter.org")
8748 (synopsis "Web application for interactive documents")
8749 (description
8750 "The Jupyter Notebook is a web application that allows you to create and
8751share documents that contain live code, equations, visualizations and
8752explanatory text. Uses include: data cleaning and transformation, numerical
8753simulation, statistical modeling, machine learning and much more.")
8754 (license license:bsd-3)))
8755
816a6538
LC
8756(define-public python-chardet
8757 (package
8758 (name "python-chardet")
a54cb3ce 8759 (version "3.0.4")
816a6538
LC
8760 (source
8761 (origin
8762 (method url-fetch)
ef7dd2e2 8763 (uri (pypi-uri "chardet" version))
816a6538
LC
8764 (sha256
8765 (base32
a54cb3ce
CR
8766 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8767 (native-inputs
8768 `(("python-hypothesis" ,python-hypothesis)
8769 ("python-pytest" ,python-pytest)
8770 ("python-pytest-runner" ,python-pytest-runner)))
816a6538 8771 (build-system python-build-system)
816a6538
LC
8772 (home-page "https://github.com/chardet/chardet")
8773 (synopsis "Universal encoding detector for Python 2 and 3")
8774 (description
8775 "This package provides @code{chardet}, a Python module that can
8776automatically detect a wide range of file encodings.")
3f641af0 8777 (license license:lgpl2.1+)))
816a6538
LC
8778
8779(define-public python2-chardet
8780 (package-with-python2 python-chardet))
2fc5f186 8781
1872f1bb
KM
8782(define-public python-docopt
8783 (package
8784 (name "python-docopt")
8785 (version "0.6.2")
8786 (source
8787 (origin
8788 (method url-fetch)
8789 ;; The release on PyPI does not include tests.
8790 (uri (string-append
8791 "https://github.com/docopt/docopt/archive/"
8792 version ".tar.gz"))
8793 (file-name (string-append name "-" version ".tar.gz"))
8794 (sha256
8795 (base32
8796 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8797 (build-system python-build-system)
8798 (native-inputs
f3b98f4f 8799 `(("python-pytest" ,python-pytest)))
1872f1bb 8800 (arguments
dc1d3cde
KK
8801 `(#:phases
8802 (modify-phases %standard-phases
8803 (replace 'check
8804 (lambda _ (zero? (system* "py.test")))))))
1872f1bb
KM
8805 (home-page "http://docopt.org")
8806 (synopsis "Command-line interface description language for Python")
8807 (description "This library allows the user to define a command-line
8808interface from a program's help message rather than specifying it
8809programatically with command-line parsers like @code{getopt} and
8810@code{argparse}.")
8811 (license license:expat)))
8812
8813(define-public python2-docopt
8814 (package-with-python2 python-docopt))
8815
2fc5f186
LF
8816(define-public python-zope-event
8817 (package
8818 (name "python-zope-event")
8819 (version "4.1.0")
8820 (source
8821 (origin
8822 (method url-fetch)
8823 (uri (string-append "https://pypi.python.org/packages/source/z"
8824 "/zope.event/zope.event-" version ".tar.gz"))
8825 (sha256
8826 (base32
8827 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8828 (build-system python-build-system)
2fc5f186
LF
8829 (home-page "http://pypi.python.org/pypi/zope.event")
8830 (synopsis "Event publishing system for Python")
8831 (description "Zope.event provides an event publishing API, intended for
8832use by applications which are unaware of any subscribers to their events. It
8833is a simple event-dispatching system on which more sophisticated event
8834dispatching systems can be built.")
3f641af0 8835 (license license:zpl2.1)))
2fc5f186
LF
8836
8837(define-public python2-zope-event
8838 (package-with-python2 python-zope-event))
97abe268
LF
8839
8840(define-public python-zope-interface
8841 (package
8842 (name "python-zope-interface")
8843 (version "4.1.3")
8844 (source
8845 (origin
8846 (method url-fetch)
8847 (uri (string-append "https://pypi.python.org/packages/source/z"
8848 "/zope.interface/zope.interface-" version ".tar.gz"))
8849 (sha256
8850 (base32
8851 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8852 (build-system python-build-system)
38d480a8 8853 (native-inputs
97abe268
LF
8854 `(("python-zope-event" ,python-zope-event)))
8855 (home-page "https://github.com/zopefoundation/zope.interface")
8856 (synopsis "Python implementation of the \"design by contract\"
8857methodology")
8858 (description "Zope.interface provides an implementation of \"object
8859interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8860conforming to a given API or contract.")
3f641af0 8861 (license license:zpl2.1)))
97abe268
LF
8862
8863(define-public python2-zope-interface
8864 (package-with-python2 python-zope-interface))
81f2373c
LF
8865
8866(define-public python-zope-exceptions
8867 (package
8868 (name "python-zope-exceptions")
8869 (version "4.0.8")
8870 (source
8871 (origin
8872 (method url-fetch)
8873 (uri (string-append "https://pypi.python.org/packages/source/z"
8874 "/zope.exceptions/zope.exceptions-"
8875 version ".tar.gz"))
8876 (sha256
8877 (base32
8878 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8879 (build-system python-build-system)
8880 (arguments
8881 '(#:tests? #f)) ; circular dependency with zope.testrunner
8882 (propagated-inputs
8883 `(("python-zope-interface" ,python-zope-interface)))
8884 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8885 (synopsis "Zope exceptions")
8886 (description "Zope.exceptions provides general-purpose exception types
8887that have uses outside of the Zope framework.")
3f641af0 8888 (license license:zpl2.1)))
81f2373c
LF
8889
8890(define-public python2-zope-exceptions
8891 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
8892
8893(define-public python-zope-testing
8894 (package
8895 (name "python-zope-testing")
8896 (version "4.5.0")
8897 (source
8898 (origin
8899 (method url-fetch)
8900 (uri (string-append "https://pypi.python.org/packages/source/z"
8901 "/zope.testing/zope.testing-" version ".tar.gz"))
8902 (sha256
8903 (base32
b02f7a21
HG
8904 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8905 (modules '((guix build utils)))
8906 (snippet
8907 '(begin
8908 ;; Remove pre-compiled .pyc files backup files from source.
8909 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8910 #t))))
900e3c0e
LF
8911 (build-system python-build-system)
8912 (native-inputs
8913 `(("python-zope-exceptions" ,python-zope-exceptions)))
8914 (propagated-inputs
8915 `(("python-zope-interface" ,python-zope-interface)))
8916 (home-page "http://pypi.python.org/pypi/zope.testing")
8917 (synopsis "Zope testing helpers")
8918 (description "Zope.testing provides a number of testing utilities for HTML
8919forms, HTTP servers, regular expressions, and more.")
3f641af0 8920 (license license:zpl2.1)))
900e3c0e
LF
8921
8922(define-public python2-zope-testing
8923 (package-with-python2 python-zope-testing))
01614c4f
LF
8924
8925(define-public python-zope-testrunner
8926 (package
8927 (name "python-zope-testrunner")
8928 (version "4.4.9")
8929 (source
8930 (origin
8931 (method url-fetch)
8932 (uri (string-append "https://pypi.python.org/packages/source/z"
8933 "/zope.testrunner/zope.testrunner-"
8934 version ".zip"))
8935 (sha256
8936 (base32
8937 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8938 (build-system python-build-system)
385871e5
MB
8939 (arguments
8940 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
8941 (native-inputs
8942 `(("python-six" ,python-six)
e408ffc3 8943 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
8944 ("python-zope-exceptions" ,python-zope-exceptions)
8945 ("python-zope-testing" ,python-zope-testing)
8946 ("unzip" ,unzip)))
8947 (propagated-inputs
8948 `(("python-zope-interface" ,python-zope-interface)))
8949 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8950 (synopsis "Zope testrunner script")
8951 (description "Zope.testrunner provides a script for running Python
8952tests.")
3f641af0 8953 (license license:zpl2.1)))
01614c4f
LF
8954
8955(define-public python2-zope-testrunner
8956 (let ((base (package-with-python2 python-zope-testrunner)))
8957 (package
8958 (inherit base)
8959 (native-inputs
8960 (append (package-native-inputs base)
8961 `(("python2-subunit" ,python2-subunit)
8962 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
8963
8964(define-public python-zope-i18nmessageid
8965 (package
8966 (name "python-zope-i18nmessageid")
8967 (version "4.0.3")
8968 (source
8969 (origin
8970 (method url-fetch)
8971 (uri (string-append
8972 "https://pypi.python.org/packages/source/z"
8973 "/zope.i18nmessageid/zope.i18nmessageid-"
8974 version ".tar.gz"))
8975 (sha256
8976 (base32
8977 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8978 (build-system python-build-system)
6a5c710c
LF
8979 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8980 (synopsis "Message identifiers for internationalization")
8981 (description "Zope.i18nmessageid provides facilities for declaring
8982internationalized messages within program source text.")
3f641af0 8983 (license license:zpl2.1)))
6a5c710c
LF
8984
8985(define-public python2-zope-i18nmessageid
8986 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
8987
8988(define-public python-zope-schema
8989 (package
8990 (name "python-zope-schema")
8991 (version "4.4.2")
8992 (source
8993 (origin
8994 (method url-fetch)
8995 (uri (string-append "https://pypi.python.org/packages/source/z"
8996 "/zope.schema/zope.schema-" version ".tar.gz"))
8997 (sha256
8998 (base32
8999 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
9000 (build-system python-build-system)
22dba2ef
MB
9001 (arguments
9002 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
9003 (propagated-inputs
9004 `(("python-zope-event" ,python-zope-event)
2b9e4bea 9005 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
9006 ("python-zope-interface" ,python-zope-interface)))
9007 (native-inputs
47f77210
HG
9008 `(("python-zope-testing" ,python-zope-testing)
9009 ("python-coverage" ,python-coverage)
9010 ("python-nose" ,python-nose)))
71fb09f3
LF
9011 (home-page "http://pypi.python.org/pypi/zope.schema")
9012 (synopsis "Zope data schemas")
9013 (description "Zope.scheme provides extensions to zope.interface for
9014defining data schemas.")
3f641af0 9015 (license license:zpl2.1)))
71fb09f3
LF
9016
9017(define-public python2-zope-schema
9018 (package-with-python2 python-zope-schema))
fbac9b17
LF
9019
9020(define-public python-zope-configuration
9021 (package
9022 (name "python-zope-configuration")
9023 (version "4.0.3")
9024 (source (origin
9025 (method url-fetch)
9026 (uri (string-append "https://pypi.python.org/packages/source/z"
9027 "/zope.configuration/zope.configuration-"
9028 version ".tar.gz"))
9029 (sha256
9030 (base32
9031 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
9032 (build-system python-build-system)
7e8b1bfa
MB
9033 (arguments
9034 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
9035 (propagated-inputs
9036 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
9037 ("python-zope-schema" ,python-zope-schema)))
9038 (home-page "http://pypi.python.org/pypi/zope.configuration")
9039 (synopsis "Zope Configuration Markup Language")
9040 (description "Zope.configuration implements ZCML, the Zope Configuration
9041Markup Language.")
3f641af0 9042 (license license:zpl2.1)))
fbac9b17
LF
9043
9044(define-public python2-zope-configuration
9045 (package-with-python2 python-zope-configuration))
2ad52086
LF
9046
9047(define-public python-zope-proxy
9048 (package
9049 (name "python-zope-proxy")
9050 (version "4.1.6")
9051 (source
9052 (origin
9053 (method url-fetch)
9054 (uri (string-append "https://pypi.python.org/packages/source/z"
9055 "/zope.proxy/zope.proxy-" version ".tar.gz"))
9056 (sha256
9057 (base32
9058 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
9059 (build-system python-build-system)
66b3aadb
MB
9060 (arguments
9061 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
9062 (propagated-inputs
9063 `(("python-zope-interface" ,python-zope-interface)))
9064 (home-page "http://pypi.python.org/pypi/zope.proxy")
9065 (synopsis "Generic, transparent proxies")
9066 (description "Zope.proxy provides generic, transparent proxies for Python.
9067Proxies are special objects which serve as mostly-transparent wrappers around
9068another object, intervening in the apparent behavior of the wrapped object
9069only when necessary to apply the policy (e.g., access checking, location
9070brokering, etc.) for which the proxy is responsible.")
3f641af0 9071 (license license:zpl2.1)))
2ad52086
LF
9072
9073(define-public python2-zope-proxy
9074 (package-with-python2 python-zope-proxy))
f404b5ea
LF
9075
9076(define-public python-zope-location
9077 (package
9078 (name "python-zope-location")
9079 (version "4.0.3")
9080 (source
9081 (origin
9082 (method url-fetch)
9083 (uri (string-append "https://pypi.python.org/packages/source/z"
9084 "/zope.location/zope.location-" version ".tar.gz"))
9085 (sha256
9086 (base32
9087 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
9088 (build-system python-build-system)
40bb8e07
MB
9089 (arguments
9090 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 9091 (propagated-inputs
f404b5ea
LF
9092 `(("python-zope-proxy" ,python-zope-proxy)
9093 ("python-zope-schema" ,python-zope-schema)))
9094 (home-page "http://pypi.python.org/pypi/zope.location/")
9095 (synopsis "Zope location library")
9096 (description "Zope.location implements the concept of \"locations\" in
9097Zope3, which are are special objects that have a structural location.")
3f641af0 9098 (license license:zpl2.1)))
f404b5ea
LF
9099
9100(define-public python2-zope-location
9101 (package-with-python2 python-zope-location))
d4b77f36
LF
9102
9103(define-public python-zope-security
9104 (package
9105 (name "python-zope-security")
9106 (version "4.0.3")
9107 (source
9108 (origin
9109 (method url-fetch)
9110 (uri (string-append "https://pypi.python.org/packages/source/z"
9111 "/zope.security/zope.security-" version ".tar.gz"))
9112 (sha256
9113 (base32
9114 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
9115 (build-system python-build-system)
a74f9b12
MB
9116 (arguments
9117 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
9118 (propagated-inputs
9119 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 9120 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 9121 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
9122 (native-inputs
9123 `(("python-six" ,python-six)
9124 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
9125 ("python-zope-configuration" ,python-zope-configuration)
9126 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
9127 ("python-zope-testrunner" ,python-zope-testrunner)
9128 ("python-zope-testing" ,python-zope-testing)))
9129 (home-page "http://pypi.python.org/pypi/zope.security")
9130 (synopsis "Zope security framework")
9131 (description "Zope.security provides a generic mechanism to implement
9132security policies on Python objects.")
3f641af0 9133 (license license:zpl2.1)))
d4b77f36
LF
9134
9135(define-public python2-zope-security
04417662
EF
9136 (let ((zope-security (package-with-python2 python-zope-security)))
9137 (package (inherit zope-security)
9138 (propagated-inputs
9139 `(("python2-zope-testrunner" ,python2-zope-testrunner)
9140 ,@(alist-delete
9141 "python-zope-testrunner"
9142 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
9143
9144(define-public python-zope-component
9145 (package
9146 (name "python-zope-component")
35e1a0f1 9147 (version "4.3.0")
a6b61b27
LF
9148 (source
9149 (origin
9150 (method url-fetch)
35e1a0f1 9151 (uri (pypi-uri "zope.component" version))
a6b61b27
LF
9152 (sha256
9153 (base32
35e1a0f1 9154 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
a6b61b27
LF
9155 (build-system python-build-system)
9156 (arguments
9157 ;; Skip tests due to circular dependency with python-zope-security.
9158 '(#:tests? #f))
9159 (native-inputs
9160 `(("python-zope-testing" ,python-zope-testing)))
9161 (propagated-inputs
9162 `(("python-zope-event" ,python-zope-event)
9163 ("python-zope-interface" ,python-zope-interface)
9164 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
9165 ("python-zope-configuration" ,python-zope-configuration)))
9166 (home-page "https://github.com/zopefoundation/zope.component")
9167 (synopsis "Zope Component Architecture")
9168 (description "Zope.component represents the core of the Zope Component
9169Architecture. Together with the zope.interface package, it provides
9170facilities for defining, registering and looking up components.")
3f641af0 9171 (license license:zpl2.1)))
a6b61b27
LF
9172
9173(define-public python2-zope-component
9174 (package-with-python2 python-zope-component))
3859ac12 9175
1ae44b80 9176(define-public python-pythondialog
b5f218be 9177 (package
1ae44b80 9178 (name "python-pythondialog")
42c4b246 9179 (version "3.4.0")
b5f218be
LF
9180 (source
9181 (origin
9182 (method url-fetch)
1ae44b80 9183 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
9184 (sha256
9185 (base32
1ae44b80 9186 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
9187 (build-system python-build-system)
9188 (arguments
9189 `(#:phases
9190 (modify-phases %standard-phases
9191 (add-after 'unpack 'patch-path
9192 (lambda* (#:key inputs #:allow-other-keys)
9193 (let* ((dialog (assoc-ref inputs "dialog")))
9194 ;; Since this library really wants to grovel the search path, we
9195 ;; must hardcode dialog's store path into it.
9196 (substitute* "dialog.py"
9197 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
9198 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
9199 #t))))
b5f218be
LF
9200 #:tests? #f)) ; no test suite
9201 (propagated-inputs
9202 `(("dialog" ,dialog)))
9203 (home-page "http://pythondialog.sourceforge.net/")
9204 (synopsis "Python interface to the UNIX dialog utility")
9205 (description "A Python wrapper for the dialog utility. Its purpose is to
9206provide an easy to use, pythonic and comprehensive Python interface to dialog.
9207This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 9208 (license license:lgpl2.1)
1ae44b80
LF
9209 (properties `((python2-variant . ,(delay python2-pythondialog))))))
9210
9211(define-public python2-pythondialog
9212 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
9213 (package
9214 (inherit base)
9215 (version (package-version python-pythondialog))
9216 (source (origin
9217 (method url-fetch)
9218 (uri (pypi-uri "python2-pythondialog" version))
9219 (sha256
9220 (base32
9221 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 9222
3859ac12
LF
9223(define-public python-pyrfc3339
9224 (package
9225 (name "python-pyrfc3339")
d9aa097b 9226 (version "1.0")
3859ac12
LF
9227 (source
9228 (origin
9229 (method url-fetch)
d9aa097b 9230 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
9231 (sha256
9232 (base32
d9aa097b 9233 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
9234 (build-system python-build-system)
9235 (propagated-inputs
9236 `(("python-pytz" ,python-pytz)))
9237 (native-inputs
f3b98f4f 9238 `(("python-nose" ,python-nose)))
3859ac12
LF
9239 (home-page "https://github.com/kurtraschke/pyRFC3339")
9240 (synopsis "Python timestamp library")
9241 (description "Python library for generating and parsing RFC 3339-compliant
9242timestamps.")
9243 (license license:expat)))
9244
9245(define-public python2-pyrfc3339
9246 (package-with-python2 python-pyrfc3339))
5eea2005
LF
9247
9248(define-public python-werkzeug
9249 (package
9250 (name "python-werkzeug")
bbb99d6b 9251 (version "0.11.15")
5eea2005
LF
9252 (source
9253 (origin
9254 (method url-fetch)
4b47cbfa 9255 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
9256 (sha256
9257 (base32
bbb99d6b 9258 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
5eea2005
LF
9259 (build-system python-build-system)
9260 (native-inputs
9261 `(("python-pytest" ,python-pytest)))
9262 (home-page "http://werkzeug.pocoo.org/")
9263 (synopsis "Utilities for WSGI applications")
9264 (description "One of the most advanced WSGI utility modules. It includes a
9265powerful debugger, full-featured request and response objects, HTTP utilities to
9266handle entity tags, cache control headers, HTTP dates, cookie handling, file
9267uploads, a powerful URL routing system and a bunch of community-contributed
9268addon modules.")
3f641af0 9269 (license license:x11)))
5eea2005
LF
9270
9271(define-public python2-werkzeug
9272 (package-with-python2 python-werkzeug))
99fffa8a
LF
9273
9274(define-public python-configobj
9275 (package
9276 (name "python-configobj")
9277 (version "5.0.6")
9278 (source (origin
9279 (method url-fetch)
9280 (uri (string-append
9281 "https://pypi.python.org/packages/source/c/configobj/"
9282 "configobj-" version ".tar.gz"))
9283 (sha256
9284 (base32
9285 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
9286 ;; Patch setup.py so it looks for python-setuptools, which is
9287 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 9288 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 9289 (build-system python-build-system)
861f70c9 9290 (propagated-inputs
f3b98f4f 9291 `(("python-six" ,python-six)))
99fffa8a
LF
9292 (synopsis "Config file reading, writing and validation")
9293 (description "ConfigObj is a simple but powerful config file reader and
9294writer: an ini file round tripper. Its main feature is that it is very easy to
9295use, with a straightforward programmer’s interface and a simple syntax for
9296config files.")
9297 (home-page "https://github.com/DiffSK/configobj")
3f641af0 9298 (license license:bsd-3)))
99fffa8a
LF
9299
9300(define-public python2-configobj
9301 (package-with-python2 python-configobj))
79e8a291
LF
9302
9303(define-public python-configargparse
9304 (package
9305 (name "python-configargparse")
b89e3c77 9306 (version "0.12.0")
79e8a291
LF
9307 (source (origin
9308 (method url-fetch)
9309 (uri (string-append
b89e3c77 9310 "https://pypi.io/packages/source/C/ConfigArgParse/"
79e8a291
LF
9311 "ConfigArgParse-" version ".tar.gz"))
9312 (sha256
9313 (base32
b89e3c77 9314 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
79e8a291 9315 (build-system python-build-system)
b89e3c77
KM
9316 (native-inputs
9317 `(("python-pyyaml" ,python-pyyaml)))
79e8a291 9318 (arguments
b89e3c77
KM
9319 `(#:phases
9320 (modify-phases %standard-phases
9321 (replace 'check
9322 (lambda _
9323 ;; Bypass setuptools-shim because one test relies on "setup.py"
9324 ;; being the first argument passed to the python call.
9325 ;;
9326 ;; NOTE: Many tests do not run because they rely on Python's
9327 ;; built-in test.test_argparse, but we remove the unit tests from
9328 ;; our Python installation.
9329 (zero? (system* "python" "setup.py" "test")))))))
79e8a291
LF
9330 (synopsis "Replacement for argparse")
9331 (description "A drop-in replacement for argparse that allows options to also
9332be set via config files and/or environment variables.")
9333 (home-page "https://github.com/bw2/ConfigArgParse")
9334 (license license:expat)))
9335
9336(define-public python2-configargparse
9337 (package-with-python2 python-configargparse))
ab41f979
LF
9338
9339(define-public python-ndg-httpsclient
9340 (package
9341 (name "python-ndg-httpsclient")
ae476d01 9342 (version "0.4.2")
ab41f979
LF
9343 (source (origin
9344 (method url-fetch)
7be13d00 9345 (uri (pypi-uri "ndg_httpsclient" version))
ab41f979
LF
9346 (sha256
9347 (base32
ae476d01 9348 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
ab41f979 9349 (build-system python-build-system)
a39cc016
LF
9350 (arguments
9351 '(;; The tests appear to require networking.
9352 #:tests? #f))
ab41f979
LF
9353 (propagated-inputs
9354 `(("python-pyopenssl" ,python-pyopenssl)))
9355 (synopsis "HTTPS support for Python's httplib and urllib2")
9356 (description "This is a HTTPS client implementation for httplib and urllib2
9357based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
9358over the default provided with Python and importantly enables full verification
9359of the SSL peer.")
9360 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 9361 (license license:bsd-3)))
ab41f979
LF
9362
9363;; python2-openssl requires special care, so package-with-python2 is
9364;; insufficient.
9365(define-public python2-ndg-httpsclient
9366 (package (inherit python-ndg-httpsclient)
9367 (name "python2-ndg-httpsclient")
9368 (arguments `(#:python ,python-2))
9369 (propagated-inputs
9370 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
9371
9372(define-public python-contextlib2
9373 (package
9374 (name "python-contextlib2")
9375 (version "0.4.0")
9376 (source
9377 (origin
9378 (method url-fetch)
9379 (uri (pypi-uri "contextlib2" version))
9380 (sha256
9381 (base32
9382 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
9383 (build-system python-build-system)
9384 (arguments
9385 `(#:phases
9386 (modify-phases %standard-phases
9387 (replace 'check
9388 (lambda _ (zero?
9389 (system*
b3546174 9390 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
9391 (home-page "http://contextlib2.readthedocs.org/")
9392 (synopsis "Tools for decorators and context managers")
9393 (description "This module is primarily a backport of the Python
93943.2 contextlib to earlier Python versions. Like contextlib, it
9395provides utilities for common tasks involving decorators and context
9396managers. It also contains additional features that are not part of
9397the standard library.")
3f641af0 9398 (license license:psfl)))
03f964a5
CM
9399
9400(define-public python2-contextlib2
9401 (package-with-python2 python-contextlib2))
210bf497
DT
9402
9403(define-public python-texttable
9404 (package
9405 (name "python-texttable")
4c4d4df3 9406 (version "0.8.7")
210bf497
DT
9407 (source
9408 (origin
9409 (method url-fetch)
9410 (uri (pypi-uri "texttable" version))
9411 (sha256
9412 (base32
4c4d4df3 9413 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
210bf497
DT
9414 (build-system python-build-system)
9415 (arguments '(#:tests? #f)) ; no tests
9416 (home-page "https://github.com/foutaise/texttable/")
9417 (synopsis "Python module for creating simple ASCII tables")
9418 (description "Texttable is a Python module for creating simple ASCII
9419tables.")
3f641af0 9420 (license license:lgpl2.1+)))
210bf497
DT
9421
9422(define-public python2-texttable
9423 (package-with-python2 python-texttable))
67c52bb3
DT
9424
9425(define-public python-websocket-client
9426 (package
9427 (name "python-websocket-client")
6b810897 9428 (version "0.37.0")
67c52bb3
DT
9429 (source
9430 (origin
9431 (method url-fetch)
6b810897 9432 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
9433 (sha256
9434 (base32
6b810897 9435 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 9436 (build-system python-build-system)
a5333f7c
HG
9437 (propagated-inputs
9438 `(("python-six" ,python-six)))
67c52bb3
DT
9439 (home-page "https://github.com/liris/websocket-client")
9440 (synopsis "WebSocket client for Python")
9441 (description "The Websocket-client module provides the low level APIs for
9442WebSocket usage in Python programs.")
3f641af0 9443 (license license:lgpl2.1+)))
67c52bb3
DT
9444
9445(define-public python2-websocket-client
9446 (package-with-python2 python-websocket-client))
5c6eea2a
LF
9447
9448(define-public python-atomicwrites
9449 (package
9450 (name "python-atomicwrites")
c56ad5e2 9451 (version "1.1.5")
5c6eea2a
LF
9452 (source (origin
9453 (method url-fetch)
9454 (uri (pypi-uri "atomicwrites" version))
9455 (sha256
9456 (base32
c56ad5e2 9457 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
5c6eea2a
LF
9458 (build-system python-build-system)
9459 (synopsis "Atomic file writes in Python")
9460 (description "Library for atomic file writes using platform dependent tools
8f65585b 9461for atomic file system operations.")
5c6eea2a 9462 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 9463 (license license:expat)))
9bb6d184
LF
9464
9465(define-public python2-atomicwrites
f210e944 9466 (package-with-python2 python-atomicwrites))
561bb3cb
LF
9467
9468(define-public python-requests-toolbelt
9469 (package
9470 (name "python-requests-toolbelt")
30d7207f 9471 (version "0.8.0")
561bb3cb
LF
9472 (source (origin
9473 (method url-fetch)
30d7207f 9474 (uri (pypi-uri "requests-toolbelt" version))
561bb3cb
LF
9475 (sha256
9476 (base32
30d7207f 9477 "1dc7l42i4080r8i4m9fj51jx367lqkai170vrv7wd93gdj9k39gn"))))
561bb3cb 9478 (build-system python-build-system)
759aadd4
LF
9479 (native-inputs
9480 `(("python-betamax" ,python-betamax)
9481 ("python-mock" ,python-mock)
9482 ("python-pytest" ,python-pytest)))
561bb3cb
LF
9483 (propagated-inputs
9484 `(("python-requests" ,python-requests)))
9485 (synopsis "Extensions to python-requests")
9486 (description "This is a toolbelt of useful classes and functions to be used
9487with python-requests.")
9488 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 9489 (license license:asl2.0)))
d1deb90b 9490
74e9895f
CR
9491(define-public python2-requests-toolbelt
9492 (package-with-python2 python-requests-toolbelt))
9493
d1deb90b
LF
9494(define-public python-click-threading
9495 (package
9496 (name "python-click-threading")
19ecdbed 9497 (version "0.4.3")
d1deb90b
LF
9498 (source (origin
9499 (method url-fetch)
19ecdbed 9500 (uri (pypi-uri "click-threading" version))
d1deb90b
LF
9501 (sha256
9502 (base32
19ecdbed 9503 "0xs4bg2ws0zgyiplk312l049hi23c2zqf1g771rjhh5vr2msk4cg"))))
d1deb90b
LF
9504 (build-system python-build-system)
9505 (propagated-inputs
9506 `(("python-click" ,python-click)))
9507 (synopsis "Utilities for multithreading in Click")
9508 (description "This package provides utilities for multithreading in Click
9509applications.")
9510 (home-page "https://github.com/click-contrib/click-threading")
9511 (license license:expat)))
7b17cab9
LF
9512
9513(define-public python-click-log
9514 (package
9515 (name "python-click-log")
3a91ac83 9516 (version "0.2.0")
7b17cab9
LF
9517 (source (origin
9518 (method url-fetch)
9519 (uri (pypi-uri "click-log" version))
9520 (sha256
9521 (base32
3a91ac83 9522 "1bjrfxji1yv4fj0g78ri2yfgn2wbivn8g69fxfinxvxpmighhshp"))))
7b17cab9
LF
9523 (build-system python-build-system)
9524 (propagated-inputs
9525 `(("python-click" ,python-click)))
9526 (synopsis "Logging for click applications")
9527 (description "This package provides a Python library for logging Click
9528applications.")
9529 (home-page "https://github.com/click-contrib/click-log")
9530 (license license:expat)))
7b3a4ee4
LF
9531
9532(define-public python-apipkg
9533 (package
9534 (name "python-apipkg")
9535 (version "1.4")
9536 (source (origin
9537 (method url-fetch)
9538 (uri (pypi-uri "apipkg" version))
9539 (sha256
9540 (base32
9541 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
9542 (build-system python-build-system)
328bb95d 9543 (native-inputs
7b3a4ee4
LF
9544 `(("python-pytest" ,python-pytest)))
9545 (synopsis "Namespace control and lazy-import mechanism")
9546 (description "With apipkg you can control the exported namespace of a Python
9547package and greatly reduce the number of imports for your users. It is a small
9548pure Python module that works on virtually all Python versions.")
9549 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 9550 (license license:expat)))
e08739c3
CAW
9551
9552(define-public python2-apipkg
f210e944 9553 (package-with-python2 python-apipkg))
848964fe
LF
9554
9555(define-public python-execnet
9556 (package
9557 (name "python-execnet")
9558 (version "1.4.1")
9559 (source (origin
9560 (method url-fetch)
9561 (uri (pypi-uri "execnet" version))
9562 (sha256
9563 (base32
9564 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9565 (build-system python-build-system)
ca0eee9d
LF
9566 (arguments
9567 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9568 ;; The two test failures are caused by the lack of an `ssh` executable.
9569 ;; The test suite can be run with pytest after the 'install' phase.
9570 #:tests? #f))
848964fe 9571 (native-inputs
ca0eee9d
LF
9572 `(("python-pytest" ,python-pytest)
9573 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 9574 (propagated-inputs
848964fe
LF
9575 `(("python-apipkg" ,python-apipkg)))
9576 (synopsis "Rapid multi-Python deployment")
9577 (description "Execnet provides a share-nothing model with
9578channel-send/receive communication for distributing execution across many
9579Python interpreters across version, platform and network barriers. It has a
d1e4ad1b 9580minimal and fast API targeting the following uses:
848964fe
LF
9581@enumerate
9582@item distribute tasks to (many) local or remote CPUs
9583@item write and deploy hybrid multi-process applications
9584@item write scripts to administer multiple environments
9585@end enumerate")
9586 (home-page "http://codespeak.net/execnet/")
f210e944 9587 (license license:expat)))
16c84f90
CAW
9588
9589(define-public python2-execnet
f210e944 9590 (package-with-python2 python-execnet))
6720dbb4 9591
d5bbf806 9592(define-public python-trollius-redis
9593 (package
9594 (name "python-trollius-redis")
9595 (version "0.1.4")
9596 (source
9597 (origin
9598 (method url-fetch)
9599 (uri (pypi-uri "trollius_redis" version))
9600 (sha256
9601 (base32
9602 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
9603 (build-system python-build-system)
97b62eb0
MB
9604 ;; TODO: Tests require packaging 'hiredis'.
9605 (arguments '(#:tests? #f))
d5bbf806 9606 (home-page "https://github.com/benjolitz/trollius-redis")
9607 (synopsis "Port of asyncio-redis to trollius")
9608 (description "@code{trollius-redis} is a Redis client for Python
9609 trollius. It is an asynchronious IO (PEP 3156) implementation of the
9610 Redis protocol.")
9611 (license license:bsd-2)))
9612
9613(define-public python2-trollius-redis
9614 (package-with-python2 python-trollius-redis))
9615
6720dbb4
LF
9616;;; The software provided by this package was integrated into pytest 2.8.
9617(define-public python-pytest-cache
9618 (package
9619 (name "python-pytest-cache")
9620 (version "1.0")
9621 (source (origin
9622 (method url-fetch)
9623 (uri (pypi-uri "pytest-cache" version))
9624 (sha256
9625 (base32
9626 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
9627 (build-system python-build-system)
f22efa01 9628 (propagated-inputs
630d938f
EF
9629 `(("python-apipkg" ,python-apipkg)
9630 ("python-execnet" ,python-execnet)
9631 ("python-py" ,python-py)
9632 ("python-pytest" ,python-pytest)))
6720dbb4
LF
9633 (synopsis "Py.test plugin with mechanisms for caching across test runs")
9634 (description "The pytest-cache plugin provides tools to rerun failures from
9635the last py.test invocation.")
9636 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 9637 (license license:expat)))
0adc21c2
EF
9638
9639(define-public python2-pytest-cache
f210e944 9640 (package-with-python2 python-pytest-cache))
d7e729fe
LF
9641
9642(define-public python-pytest-localserver
9643 (package
9644 (name "python-pytest-localserver")
29f20168 9645 (version "0.3.5")
d7e729fe
LF
9646 (source (origin
9647 (method url-fetch)
29f20168 9648 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
9649 (sha256
9650 (base32
29f20168 9651 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
9652 (build-system python-build-system)
9653 (arguments
9654 `(#:phases (modify-phases %standard-phases
9655 (replace 'check
9656 (lambda _
9657 (zero? (system* "py.test" "--genscript=runtests.py"))
9658 (zero? (system* "py.test")))))))
9659 (native-inputs
d7e729fe
LF
9660 `(("python-pytest" ,python-pytest)
9661 ("python-requests" ,python-requests)
9ba40f05 9662 ("python-six" ,python-six)))
f22efa01 9663 (propagated-inputs
9ba40f05 9664 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
9665 (synopsis "Py.test plugin to test server connections locally")
9666 (description "Pytest-localserver is a plugin for the pytest testing
9667framework which enables you to test server connections locally.")
9668 (home-page "https://pypi.python.org/pypi/pytest-localserver")
9669 (license license:expat)))
28cecbb7
LF
9670
9671(define-public python-wsgi-intercept
9672 (package
9673 (name "python-wsgi-intercept")
909fbd2b 9674 (version "1.2.2")
28cecbb7
LF
9675 (source (origin
9676 (method url-fetch)
909fbd2b
LF
9677 (uri (string-append
9678 "https://pypi.python.org/packages/"
9679 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
9680 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
9681 (sha256
9682 (base32
909fbd2b 9683 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 9684 (build-system python-build-system)
b9fc496f
HG
9685 (propagated-inputs
9686 `(("python-six" ,python-six)))
28cecbb7 9687 (native-inputs
9d813ec1 9688 `(("python-pytest" ,python-pytest)
b9fc496f
HG
9689 ("python-httplib2" ,python-httplib2)
9690 ("python-requests" ,python-requests)
8757f050 9691 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
9692 (synopsis "Puts a WSGI application in place of a real URI for testing")
9693 (description "Wsgi_intercept installs a WSGI application in place of a real
9694URI for testing. Testing a WSGI application normally involves starting a
9695server at a local host and port, then pointing your test code to that address.
9696Instead, this library lets you intercept calls to any specific host/port
9697combination and redirect them into a WSGI application importable by your test
9698program. Thus, you can avoid spawning multiple processes or threads to test
9699your Web app.")
9700 (home-page "https://github.com/cdent/wsgi-intercept")
9701 (license license:expat)))
89b8a551
LF
9702
9703(define-public python-pytest-xprocess
9704 (package
9705 (name "python-pytest-xprocess")
9706 (version "0.9.1")
9707 (source (origin
9708 (method url-fetch)
9709 (uri (pypi-uri "pytest-xprocess" version))
9710 (sha256
9711 (base32
9712 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
9713 (build-system python-build-system)
9714 (propagated-inputs
9715 `(("python-pytest" ,python-pytest)
9716 ("python-pytest-cache" ,python-pytest-cache)
9717 ("python-psutil" ,python-psutil)))
9718 (synopsis "Pytest plugin to manage external processes across test runs")
9719 (description "Pytest-xprocess is an experimental py.test plugin for managing
9720processes across test runs.")
9721 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
9722 (license license:expat)))
5c299bf0
LF
9723
9724(define-public python-icalendar
9725 (package
9726 (name "python-icalendar")
2da21e48 9727 (version "3.11.7")
5c299bf0
LF
9728 (source (origin
9729 (method url-fetch)
9730 (uri (pypi-uri "icalendar" version))
9731 (sha256
9732 (base32
2da21e48 9733 "0ahf1i98wjizhld2qd7v2vmvzsmdw08mmins82bf3fpbnp2sxbgc"))))
5c299bf0
LF
9734 (build-system python-build-system)
9735 (propagated-inputs
22d7360b 9736 `(("python-dateutil" ,python-dateutil)
5c299bf0
LF
9737 ("python-pytz" ,python-pytz)))
9738 (synopsis "Python library for parsing iCalendar files")
9739 (description "The icalendar package is a parser/generator of iCalendar
9740files for use with Python.")
9741 (home-page "https://github.com/collective/icalendar")
3f641af0 9742 (license license:bsd-2)))
6bbbb53e
LF
9743
9744(define-public python-sphinxcontrib-newsfeed
9745 (package
9746 (name "python-sphinxcontrib-newsfeed")
9747 (version "0.1.4")
9748 (source (origin
9749 (method url-fetch)
9750 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
9751 (sha256
9752 (base32
9753 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
3d2a544c 9754 (arguments '(#:tests? #f)) ; No tests.
6bbbb53e
LF
9755 (build-system python-build-system)
9756 (propagated-inputs
251ed7f2 9757 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
9758 (synopsis "News Feed extension for Sphinx")
9759 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
9760Blog, News or Announcements section to a Sphinx website.")
9761 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 9762 (license license:bsd-2)))
2216e15c
SB
9763
9764(define-public python-args
9765 (package
9766 (name "python-args")
9767 (version "0.1.0")
9768 (source (origin
9769 (method url-fetch)
9770 (uri (pypi-uri "args" version))
9771 (sha256
9772 (base32
9773 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9774 (build-system python-build-system)
2216e15c
SB
9775 (home-page "https://github.com/kennethreitz/args")
9776 (synopsis "Command-line argument parser")
9777 (description
9778 "This library provides a Python module to parse command-line arguments.")
3f641af0 9779 (license license:bsd-3)))
2216e15c
SB
9780
9781(define-public python2-args
9782 (package-with-python2 python-args))
c06a3de9
SB
9783
9784(define-public python-clint
9785 (package
9786 (name "python-clint")
9787 (version "0.5.1")
9788 (source (origin
9789 (method url-fetch)
9790 (uri (pypi-uri "clint" version))
9791 (sha256
9792 (base32
9793 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9794 (build-system python-build-system)
6145b604
MB
9795 (arguments
9796 '(#:phases
9797 (modify-phases %standard-phases
9798 (replace 'check
9799 (lambda _
9800 (zero? (system* "py.test" "-v")))))))
9801 (native-inputs
9802 `(("python-pytest" ,python-pytest)))
f22efa01 9803 (propagated-inputs
f3b98f4f 9804 `(("python-args" ,python-args)))
c06a3de9
SB
9805 (home-page "https://github.com/kennethreitz/clint")
9806 (synopsis "Command-line interface tools")
9807 (description
9808 "Clint is a Python module filled with a set of tools for developing
9809command-line applications, including tools for colored and indented
9810output, progress bar display, and pipes.")
3f641af0 9811 (license license:isc)))
c06a3de9
SB
9812
9813(define-public python2-clint
9814 (package-with-python2 python-clint))
4ecdeef8
SB
9815
9816(define-public python-astor
9817 (package
9818 (name "python-astor")
9819 (version "0.5")
9820 (source (origin
9821 (method url-fetch)
9822 (uri (pypi-uri "astor" version))
9823 (sha256
9824 (base32
9825 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9826 (build-system python-build-system)
4ecdeef8
SB
9827 (home-page "https://github.com/berkerpeksag/astor")
9828 (synopsis "Read and write Python ASTs")
9829 (description
9830 "Astor is designed to allow easy manipulation of Python source via the
9831Abstract Syntax Tree.")
3f641af0 9832 (license license:bsd-3)))
4ecdeef8
SB
9833
9834(define-public python2-astor
9835 (package-with-python2 python-astor))
e224b7d0
SB
9836
9837(define-public python-rply
9838 (package
9839 (name "python-rply")
9840 (version "0.7.4")
9841 (source (origin
9842 (method url-fetch)
9843 (uri (pypi-uri "rply" version))
9844 (sha256
9845 (base32
9846 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9847 (build-system python-build-system)
f22efa01 9848 (propagated-inputs
f3b98f4f 9849 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
9850 (home-page "https://github.com/alex/rply")
9851 (synopsis "Parser generator for Python")
9852 (description
9853 "This package provides a pure Python based parser generator, that also
9854works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9855with a new public API, and RPython support.")
3f641af0 9856 (license license:bsd-3)))
e224b7d0
SB
9857
9858(define-public python2-rply
9859 (package-with-python2 python-rply))
c3e919d7
SB
9860
9861(define-public python-hy
9862 (package
9863 (name "python-hy")
ad3c61fc 9864 (version "0.13.0")
c3e919d7
SB
9865 (source (origin
9866 (method url-fetch)
9867 (uri (pypi-uri "hy" version))
9868 (sha256
9869 (base32
ad3c61fc 9870 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
c3e919d7 9871 (build-system python-build-system)
15c37077
MB
9872 (arguments
9873 '(#:phases
9874 (modify-phases %standard-phases
9875 (replace 'check
9876 (lambda _
9877 ;; Tests require write access to HOME.
9878 (setenv "HOME" "/tmp")
9879 (zero? (system* "nosetests")))))))
9880 (native-inputs
9881 `(("python-coverage" ,python-coverage)
9882 ("python-nose" ,python-nose)))
f22efa01 9883 (propagated-inputs
c3e919d7
SB
9884 `(("python-astor" ,python-astor)
9885 ("python-clint" ,python-clint)
f3b98f4f 9886 ("python-rply" ,python-rply)))
c3e919d7
SB
9887 (home-page "http://hylang.org/")
9888 (synopsis "Lisp frontend to Python")
9889 (description
9890 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9891its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9892Python at your fingertips, in Lisp form.")
9893 (license license:expat)))
9894
9895(define-public python2-hy
9896 (package-with-python2 python-hy))
7a5b944e 9897
81f7f297
EF
9898(define-public python-rauth
9899 (package
9900 (name "python-rauth")
06fe79f2 9901 (version "0.7.3")
81f7f297
EF
9902 (source
9903 (origin
9904 (method url-fetch)
9905 (uri (pypi-uri "rauth" version))
9906 (sha256
9907 (base32
06fe79f2 9908 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
81f7f297
EF
9909 (build-system python-build-system)
9910 (arguments
9911 `(#:test-target "check"))
f22efa01 9912 (propagated-inputs
81f7f297
EF
9913 `(("python-requests" ,python-requests)))
9914 (home-page "https://github.com/litl/rauth")
9915 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9916 (description
9917 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9918provides service wrappers for convenient connection initialization and
9919authenticated session objects providing things like keep-alive.")
0848d8d3
EF
9920 (license license:expat)
9921 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
9922
9923(define-public python2-rauth
0848d8d3
EF
9924 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9925 (package
9926 (inherit base)
00e10c6e 9927 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 9928 ,@(package-native-inputs base))))))
81f7f297 9929
1abe448d
EF
9930(define-public python2-functools32
9931 (package
9932 (name "python2-functools32")
9933 (version "3.2.3-2")
9934 (source
9935 (origin
9936 (method url-fetch)
9937 (uri (pypi-uri "functools32" version))
9938 (sha256
9939 (base32
9940 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9941 (build-system python-build-system)
9942 (arguments
9943 `(#:python ,python-2
9944 #:tests? #f)) ; no test target
1abe448d
EF
9945 (home-page "https://github.com/MiCHiLU/python-functools32")
9946 (synopsis
9947 "Backport of the functools module from Python 3.2.3")
9948 (description
9949 "This package is a backport of the @code{functools} module from Python
99503.2.3 for use with older versions of Python and PyPy.")
9951 (license license:expat)))
9952
550bd98b
MB
9953(define-public python2-subprocess32
9954 (package
9955 (name "python2-subprocess32")
9956 (version "3.2.7")
9957 (source (origin
9958 (method url-fetch)
9959 (uri (pypi-uri "subprocess32" version))
9960 (sha256
9961 (base32
9962 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9963 (patches
9964 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9965 (build-system python-build-system)
9966 (arguments
9967 `(#:python ,python-2
9968 #:phases
9969 (modify-phases %standard-phases
9970 (add-after 'unpack 'patch-/bin/sh
9971 (lambda _
9972 (substitute* '("subprocess32.py"
9973 "test_subprocess32.py")
9974 (("/bin/sh") (which "sh")))
9975 #t))
9976 (delete 'check)
9977 (add-after 'install 'check
9978 (lambda* (#:key inputs outputs #:allow-other-keys)
9979 ;; For some reason this package fails to import
9980 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9981 ;; directory. Running tests after install is easier.
9982 (add-installed-pythonpath inputs outputs)
9983 (zero? (system* "python" "test_subprocess32.py")))))))
9984 (home-page "https://github.com/google/python-subprocess32")
9985 (synopsis "Backport of the subprocess module from Python 3.2")
9986 (description
9987 "This is a backport of the @code{subprocess} standard library module
9988from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9989new features. On POSIX systems it is guaranteed to be reliable when used
9990in threaded applications. It includes timeout support from Python 3.3 but
9991otherwise matches 3.2’s API.")
9992 (license license:psfl)))
9993
877889f3 9994(define-public python2-futures
7a5b944e 9995 (package
877889f3 9996 (name "python2-futures")
e17a1248 9997 (version "3.0.5")
7a5b944e
EF
9998 (source
9999 (origin
10000 (method url-fetch)
10001 (uri (pypi-uri "futures" version))
10002 (sha256
10003 (base32
e17a1248 10004 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7a5b944e 10005 (build-system python-build-system)
877889f3 10006 (arguments `(#:python ,python-2))
7a5b944e
EF
10007 (home-page "https://github.com/agronholm/pythonfutures")
10008 (synopsis
10009 "Backport of the concurrent.futures package from Python 3.2")
10010 (description
10011 "The concurrent.futures module provides a high-level interface for
10012asynchronously executing callables. This package backports the
10013concurrent.futures package from Python 3.2")
3f641af0 10014 (license license:bsd-3)))
7a5b944e 10015
5cb2fe44
EF
10016(define-public python-promise
10017 (package
10018 (name "python-promise")
10019 (version "0.4.2")
10020 (source
10021 (origin
10022 (method url-fetch)
10023 (uri (pypi-uri "promise" version))
10024 (sha256
10025 (base32
10026 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10027 (build-system python-build-system)
10028 ;; Tests wants python-futures, which is a python2 only program, and
10029 ;; can't be found by python-promise at test time.
10030 (arguments `(#:tests? #f))
10031 (home-page "https://github.com/syrusakbary/promise")
10032 (synopsis "Promises/A+ implementation for Python")
10033 (description
10034 "Promises/A+ implementation for Python")
10035 (properties `((python2-variant . ,(delay python2-promise))))
10036 (license license:expat)))
10037
10038(define-public python2-promise
10039 (let ((promise (package-with-python2
10040 (strip-python2-variant python-promise))))
10041 (package (inherit promise)
10042 (arguments (substitute-keyword-arguments (package-arguments promise)
10043 ((#:tests? _) #t)))
10044 (native-inputs
10045 `(("python2-futures" ,python2-futures)
10046 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
10047 ,@(package-native-inputs promise))))))
10048
c18f6368
EF
10049(define-public python-urllib3
10050 (package
10051 (name "python-urllib3")
6178274d 10052 (version "1.18.1")
c18f6368
EF
10053 (source
10054 (origin
10055 (method url-fetch)
10056 (uri (pypi-uri "urllib3" version))
10057 (sha256
10058 (base32
6178274d 10059 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
10060 (build-system python-build-system)
10061 (arguments `(#:tests? #f))
10062 (native-inputs
f3b98f4f 10063 `(;; some packages for tests
c18f6368
EF
10064 ("python-nose" ,python-nose)
10065 ("python-mock" ,python-mock)
10066 ("python-tornado" ,python-tornado)))
10067 (propagated-inputs
cf47e34e 10068 `(;; These 5 inputs are used to build urrlib3[secure]
c18f6368 10069 ("python-certifi" ,python-certifi)
cf47e34e
CR
10070 ("python-cryptography" ,python-cryptography) ;
10071 ("python-idna" ,python-idna)
10072 ("python-ipaddress" ,python-ipaddress)
c18f6368 10073 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 10074 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
10075 (synopsis "HTTP library with thread-safe connection pooling")
10076 (description
10077 "Urllib3 supports features left out of urllib and urllib2 libraries. It
10078can reuse the same socket connection for multiple requests, it can POST files,
10079supports url redirection and retries, and also gzip and deflate decoding.")
10080 (license license:expat)))
10081
10082(define-public python2-urllib3
10083 (package-with-python2 python-urllib3))
2b2f2fc1
DT
10084
10085(define-public python-colorama
10086 (package
10087 (name "python-colorama")
f92576f9 10088 (version "0.3.7")
2b2f2fc1
DT
10089 (source
10090 (origin
10091 (method url-fetch)
10092 (uri (pypi-uri "colorama" version))
10093 (sha256
10094 (base32
f92576f9 10095 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
2b2f2fc1 10096 (build-system python-build-system)
46e110cc 10097 (synopsis "Colored terminal text rendering for Python")
2b2f2fc1
DT
10098 (description "Colorama is a Python library for rendering colored terminal
10099text.")
10100 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 10101 (license license:bsd-3)))
2b2f2fc1
DT
10102
10103(define-public python2-colorama
10104 (package-with-python2 python-colorama))
f5bcec6e
DT
10105
10106(define-public python-rsa
10107 (package
10108 (name "python-rsa")
ecd68c53 10109 (version "3.4.2")
f5bcec6e
DT
10110 (source
10111 (origin
10112 (method url-fetch)
10113 (uri (pypi-uri "rsa" version))
10114 (sha256
10115 (base32
ecd68c53 10116 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 10117 (build-system python-build-system)
f22efa01 10118 (propagated-inputs
f3b98f4f 10119 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
10120 (synopsis "Pure-Python RSA implementation")
10121 (description "Python-RSA is a pure-Python RSA implementation. It supports
10122encryption and decryption, signing and verifying signatures, and key
10123generation according to PKCS#1 version 1.5. It can be used as a Python
10124library as well as on the command line.")
10125 (home-page "http://stuvel.eu/rsa")
3f641af0 10126 (license license:asl2.0)))
f5bcec6e
DT
10127
10128(define-public python2-rsa
10129 (package-with-python2 python-rsa))
c0aacfa5
DT
10130
10131(define-public python-pluggy
10132 (package
10133 (name "python-pluggy")
10134 (version "0.3.1")
10135 (source
10136 (origin
10137 (method url-fetch)
10138 (uri (pypi-uri "pluggy" version))
10139 (sha256
10140 (base32
10141 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
10142 (build-system python-build-system)
c0aacfa5
DT
10143 (synopsis "Plugin and hook calling mechanism for Python")
10144 (description "Pluggy is an extraction of the plugin manager as used by
10145Pytest but stripped of Pytest specific details.")
10146 (home-page "https://pypi.python.org/pypi/pluggy")
10147 (license license:expat)))
10148
10149(define-public python2-pluggy
10150 (package-with-python2 python-pluggy))
a4af21ca
DT
10151
10152(define-public python-tox
10153 (package
10154 (name "python-tox")
9bb7c05e 10155 (version "2.8.1")
a4af21ca
DT
10156 (source
10157 (origin
10158 (method url-fetch)
10159 (uri (pypi-uri "tox" version))
10160 (sha256
10161 (base32
9bb7c05e 10162 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
a4af21ca
DT
10163 (build-system python-build-system)
10164 (arguments
7ba07edf
HG
10165 ;; FIXME: Tests require pytest-timeout, which itself requires
10166 ;; pytest>=2.8.0 for installation.
a4af21ca 10167 '(#:tests? #f))
482d9591
HG
10168 (propagated-inputs
10169 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 10170 ("python-py" ,python-py)
482d9591 10171 ("python-virtualenv" ,python-virtualenv)))
328bb95d 10172 (native-inputs
7ba07edf 10173 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
c98f9c52
CR
10174 ("python-pytest" ,python-pytest) ; >= 2.3.5
10175 ("python-setuptools-scm" ,python-setuptools-scm)))
a4af21ca
DT
10176 (home-page "http://tox.testrun.org/")
10177 (synopsis "Virtualenv-based automation of test activities")
10178 (description "Tox is a generic virtualenv management and test command line
10179tool. It can be used to check that a package installs correctly with
10180different Python versions and interpreters, or run tests in each type of
10181supported environment, or act as a frontend to continuous integration
10182servers.")
10183 (license license:expat)))
10184
10185(define-public python2-tox
10186 (package-with-python2 python-tox))
ba9da248
DT
10187
10188(define-public python-jmespath
10189 (package
10190 (name "python-jmespath")
10191 (version "0.9.0")
10192 (source
10193 (origin
10194 (method url-fetch)
10195 (uri (pypi-uri "jmespath" version))
10196 (sha256
10197 (base32
10198 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
10199 (build-system python-build-system)
52a75a83
MB
10200 (native-inputs
10201 `(("python-nose" ,python-nose)))
ba9da248
DT
10202 (synopsis "JSON Matching Expressions")
10203 (description "JMESPath (pronounced “james path”) is a Python library that
10204allows one to declaratively specify how to extract elements from a JSON
10205document.")
10206 (home-page "https://github.com/jmespath/jmespath.py")
10207 (license license:expat)))
10208
10209(define-public python2-jmespath
10210 (package-with-python2 python-jmespath))
935fcd5c
DT
10211
10212(define-public python-botocore
10213 (package
10214 (name "python-botocore")
01fc102e 10215 (version "1.7.9")
935fcd5c
DT
10216 (source
10217 (origin
10218 (method url-fetch)
10219 (uri (pypi-uri "botocore" version))
10220 (sha256
10221 (base32
01fc102e 10222 "02b1bw25r1wdjs5yppb1h9igf11wj092biriv2yg8hzp5r0wrkmg"))))
935fcd5c 10223 (build-system python-build-system)
877fdac9
MB
10224 (arguments
10225 ;; FIXME: Many tests are failing.
10226 '(#:tests? #f))
482d9591 10227 (propagated-inputs
22d7360b 10228 `(("python-dateutil" ,python-dateutil)
935fcd5c 10229 ("python-docutils" ,python-docutils)
482d9591 10230 ("python-jmespath" ,python-jmespath)))
8fa6890b 10231 (native-inputs
482d9591 10232 `(("python-mock" ,python-mock)
935fcd5c 10233 ("python-nose" ,python-nose)
482d9591 10234 ("behave" ,behave)
935fcd5c 10235 ("python-tox" ,python-tox)
482d9591 10236 ("python-wheel" ,python-wheel)))
935fcd5c
DT
10237 (home-page "https://github.com/boto/botocore")
10238 (synopsis "Low-level interface to AWS")
10239 (description "Botocore is a Python library that provides a low-level
10240interface to the Amazon Web Services (AWS) API.")
3f641af0 10241 (license license:asl2.0)))
935fcd5c
DT
10242
10243(define-public python2-botocore
10244 (package-with-python2 python-botocore))
f861b8b8
DT
10245
10246(define-public awscli
10247 (package
10248 (name "awscli")
7e2c67ca 10249 (version "1.11.164")
f861b8b8
DT
10250 (source
10251 (origin
10252 (method url-fetch)
d5ccf71e 10253 (uri (pypi-uri name version))
f861b8b8
DT
10254 (sha256
10255 (base32
7e2c67ca 10256 "05r8cw7i7ff6barpmyxxk3i52gzb1xyxwj8isynmiyqlmk3c9r8w"))))
f861b8b8 10257 (build-system python-build-system)
482d9591 10258 (propagated-inputs
f861b8b8 10259 `(("python-colorama" ,python-colorama)
482d9591
HG
10260 ("python-botocore" ,python-botocore)
10261 ("python-s3transfer" ,python-s3transfer)
f861b8b8 10262 ("python-docutils" ,python-docutils)
0cb9fba3 10263 ("python-pyyaml" ,python-pyyaml)
482d9591 10264 ("python-rsa" ,python-rsa)))
619bfd81
MB
10265 (arguments
10266 ;; FIXME: The 'pypi' release does not contain tests.
10267 '(#:tests? #f))
60a8be3a 10268 (home-page "https://aws.amazon.com/cli/")
f861b8b8
DT
10269 (synopsis "Command line client for AWS")
10270 (description "AWS CLI provides a unified command line interface to the
10271Amazon Web Services (AWS) API.")
3f641af0 10272 (license license:asl2.0)))
6a44697d
LF
10273
10274(define-public python-hypothesis
10275 (package
10276 (name "python-hypothesis")
bea6d94d 10277 (version "3.1.0")
6a44697d
LF
10278 (source (origin
10279 (method url-fetch)
10280 (uri (pypi-uri "hypothesis" version))
10281 (sha256
10282 (base32
bea6d94d 10283 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 10284 (build-system python-build-system)
bd100c71 10285 (native-inputs
6a44697d 10286 `(("python-flake8" ,python-flake8)
92b2101a 10287 ("python-pytest" ,python-pytest-bootstrap)))
6a44697d
LF
10288 (synopsis "Library for property based testing")
10289 (description "Hypothesis is a library for testing your Python code against a
10290much larger range of examples than you would ever want to write by hand. It’s
10291based on the Haskell library, Quickcheck, and is designed to integrate
10292seamlessly into your existing Python unit testing work flow.")
10293 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 10294 (license license:mpl2.0)
6f068e08 10295 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
10296
10297(define-public python2-hypothesis
6f068e08
EF
10298 (let ((hypothesis (package-with-python2
10299 (strip-python2-variant python-hypothesis))))
10300 (package (inherit hypothesis)
69f7f045 10301 (propagated-inputs
bd100c71 10302 `(("python2-enum34" ,python2-enum34)
69f7f045 10303 ,@(package-propagated-inputs hypothesis))))))
7517e73c
LF
10304
10305(define-public python-pytest-subtesthack
10306 (package
10307 (name "python-pytest-subtesthack")
10308 (version "0.1.1")
10309 (source (origin
10310 (method url-fetch)
10311 (uri (pypi-uri "pytest-subtesthack" version))
10312 (sha256
10313 (base32
10314 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
10315 (build-system python-build-system)
7517e73c
LF
10316 (propagated-inputs
10317 `(("python-pytest" ,python-pytest)))
10318 (synopsis "Set-up and tear-down fixtures for unit tests")
10319 (description "This plugin allows you to set up and tear down fixtures within
10320unit test functions that use @code{py.test}. This is useful for using
10321@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
10322function multiple times, without setting up or tearing down fixture state as is
10323normally the case.")
10324 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 10325 (license license:unlicense)))
7517e73c
LF
10326
10327(define-public python2-pytest-subtesthack
10328 (package-with-python2 python-pytest-subtesthack))
0bdc1671 10329
7637de23 10330(define-public python-xdo
0bdc1671 10331 (package
7637de23 10332 (name "python-xdo")
e871c332 10333 (version "0.3")
0bdc1671
CAW
10334 (source (origin
10335 (method url-fetch)
10336 (uri (string-append
10337 "http://http.debian.net/debian/pool/main/p/python-xdo/"
10338 "python-xdo_" version ".orig.tar.gz"))
10339 (sha256
10340 (base32
e871c332 10341 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
0bdc1671
CAW
10342 (build-system python-build-system)
10343 (arguments
736cfc10
SB
10344 '(#:phases
10345 (modify-phases %standard-phases
10346 (add-before 'install 'patch-libxdo-path
10347 ;; Hardcode the path of dynamically loaded libxdo library.
10348 (lambda* (#:key inputs #:allow-other-keys)
10349 (let ((libxdo (string-append
10350 (assoc-ref inputs "xdotool")
10351 "/lib/libxdo.so")))
10352 (substitute* "xdo/_xdo.py"
10353 (("find_library\\(\"xdo\"\\)")
10354 (simple-format #f "\"~a\"" libxdo)))
10355 #t))))
10356 #:tests? #f)) ; no tests provided
0b5e0863
SB
10357 (propagated-inputs
10358 `(("python-six" ,python-six)))
0bdc1671
CAW
10359 (inputs
10360 `(("xdotool" ,xdotool)
10361 ("libX11" ,libx11)))
10362 (home-page "https://tracker.debian.org/pkg/python-xdo")
10363 (synopsis "Python library for simulating X11 keyboard/mouse input")
10364 (description "Provides bindings to libxdo for manipulating X11 via simulated
10365input. (Note that this is mostly a legacy library; you may wish to look at
10366python-xdo for newer bindings.)")
3f641af0 10367 (license license:bsd-3)))
0bdc1671 10368
7637de23
LF
10369(define-public python2-xdo
10370 (package-with-python2 python-xdo))
10371
cb34dc6c
CAW
10372(define-public python-wtforms
10373 (package
10374 (name "python-wtforms")
10375 (version "2.1")
10376 (source
10377 (origin
10378 (method url-fetch)
10379 (uri (pypi-uri "WTForms" version ".zip"))
10380 (sha256
10381 (base32
10382 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
10383 (build-system python-build-system)
13c4d874
EF
10384 (arguments
10385 '(#:phases
10386 (modify-phases %standard-phases
10387 (add-after 'unpack 'remove-django-test
10388 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
10389 (lambda _
10390 (substitute*
10391 "tests/runtests.py"
10392 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
10393 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
10394 #t)))))
cb34dc6c
CAW
10395 (native-inputs
10396 `(("unzip" ,unzip)))
10397 (home-page "http://wtforms.simplecodes.com/")
10398 (synopsis
10399 "Form validation and rendering library for Python web development")
10400 (description
10401 "WTForms is a flexible forms validation and rendering library
10402for Python web development. It is very similar to the web form API
10403available in Django, but is a standalone package.")
f210e944 10404 (license license:bsd-3)))
cb34dc6c
CAW
10405
10406(define-public python2-wtforms
f210e944 10407 (package-with-python2 python-wtforms))
50aaec25
DT
10408
10409(define-public python-mako
10410 (package
10411 (name "python-mako")
3753f2e6 10412 (version "1.0.6")
50aaec25
DT
10413 (source
10414 (origin
10415 (method url-fetch)
10416 (uri (pypi-uri "Mako" version))
10417 (sha256
10418 (base32
3753f2e6 10419 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
50aaec25 10420 (build-system python-build-system)
482d9591
HG
10421 (propagated-inputs
10422 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 10423 (native-inputs
482d9591 10424 `(("python-mock" ,python-mock)
e435af5c
MB
10425 ("python-nose" ,python-nose)
10426 ("python-pytest" ,python-pytest)))
50aaec25
DT
10427 (home-page "http://www.makotemplates.org/")
10428 (synopsis "Templating language for Python")
10429 (description "Mako is a templating language for Python that compiles
10430templates into Python modules.")
f210e944 10431 (license license:expat)))
50aaec25
DT
10432
10433(define-public python2-mako
f210e944 10434 (package-with-python2 python-mako))
ae00a41f
CAW
10435
10436(define-public python-waitress
10437 (package
10438 (name "python-waitress")
10439 (version "0.8.10")
10440 (source
10441 (origin
10442 (method url-fetch)
10443 (uri (pypi-uri "waitress" version))
10444 (sha256
10445 (base32
10446 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
10447 (build-system python-build-system)
10448 (home-page "https://github.com/Pylons/waitress")
10449 (synopsis "Waitress WSGI server")
10450 (description "Waitress is meant to be a production-quality pure-Python WSGI
10451server with very acceptable performance.")
f210e944 10452 (license license:zpl2.1)))
ae00a41f
CAW
10453
10454(define-public python2-waitress
f210e944 10455 (package-with-python2 python-waitress))
778a284b
CAW
10456
10457(define-public python-wsgiproxy2
10458 (package
10459 (name "python-wsgiproxy2")
10460 (version "0.4.2")
10461 (source
10462 (origin
10463 (method url-fetch)
10464 (uri (pypi-uri "WSGIProxy2" version ".zip"))
10465 (sha256
10466 (base32
10467 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
10468 (build-system python-build-system)
e359b31a
LF
10469 (arguments
10470 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
10471 ;; support Python 3:
10472 ;; https://github.com/benoitc/restkit/issues/140
10473 #:tests? #f))
778a284b
CAW
10474 (native-inputs
10475 `(("unzip" ,unzip)
10476 ("python-nose" ,python-nose)
10477 ("python-coverage" ,python-coverage)))
10478 (propagated-inputs
10479 `(("python-six" ,python-six)
10480 ("python-webob" ,python-webob)))
10481 (home-page
10482 "https://github.com/gawel/WSGIProxy2/")
10483 (synopsis "WSGI Proxy with various http client backends")
10484 (description "WSGI turns HTTP requests into WSGI function calls.
10485WSGIProxy turns WSGI function calls into HTTP requests.
10486It also includes code to sign requests and pass private data,
10487and to spawn subprocesses to handle requests.")
f210e944 10488 (license license:expat)))
778a284b
CAW
10489
10490(define-public python2-wsgiproxy2
f210e944 10491 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
10492
10493(define-public python-pastedeploy
10494 (package
10495 (name "python-pastedeploy")
10496 (version "1.5.2")
10497 (source
10498 (origin
10499 (method url-fetch)
10500 (uri (pypi-uri "PasteDeploy" version))
10501 (sha256
10502 (base32
10503 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
10504 (build-system python-build-system)
10505 (native-inputs
10506 `(("python-nose" ,python-nose)))
bb7518b1
CAW
10507 (home-page "http://pythonpaste.org/deploy/")
10508 (synopsis
10509 "Load, configure, and compose WSGI applications and servers")
10510 (description
10511 "This tool provides code to load WSGI applications and servers from URIs;
10512these URIs can refer to Python Eggs for INI-style configuration files. Paste
10513Script provides commands to serve applications based on this configuration
10514file.")
10515 (license license:expat)))
10516
10517(define-public python2-pastedeploy
10518 (package-with-python2 python-pastedeploy))
1cf53652 10519
c4a7904c
CAW
10520(define-public python-paste
10521 (package
10522 (name "python-paste")
ba1731da 10523 (version "2.0.3")
c4a7904c
CAW
10524 (source
10525 (origin
10526 (method url-fetch)
10527 (uri (pypi-uri "Paste" version))
10528 (sha256
10529 (base32
ba1731da 10530 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
fc1adab1
AK
10531 (patches (search-patches "python-paste-remove-website-test.patch"
10532 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
10533 (build-system python-build-system)
10534 (native-inputs
10535 `(("python-nose" ,python-nose)))
10536 (propagated-inputs
f3b98f4f 10537 `(("python-six" ,python-six)))
c4a7904c
CAW
10538 (home-page "http://pythonpaste.org")
10539 (synopsis
10540 "Python web development tools, focusing on WSGI")
10541 (description
10542 "Paste provides a variety of web development tools and middleware which
10543can be nested together to build web applications. Paste's design closely
10544follows ideas flowing from WSGI (Web Standard Gateway Interface).")
ba1731da 10545 (license license:expat)))
c4a7904c
CAW
10546
10547(define-public python2-paste
ba1731da 10548 (package-with-python2 python-paste))
c4a7904c 10549
a8f20f63
CAW
10550(define-public python-pastescript
10551 (package
10552 (name "python-pastescript")
10553 (version "2.0.2")
10554 (source
10555 (origin
10556 (method url-fetch)
10557 (uri (pypi-uri "PasteScript" version))
10558 (sha256
10559 (base32
10560 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
10561 (build-system python-build-system)
10562 (native-inputs
10563 `(("python-nose" ,python-nose)))
10564 (propagated-inputs
f3b98f4f 10565 `(("python-paste" ,python-paste)
a8f20f63
CAW
10566 ("python-pastedeploy" ,python-pastedeploy)))
10567 (home-page "http://pythonpaste.org/script/")
10568 (arguments
10569 '(;; Unfortunately, this requires the latest unittest2,
10570 ;; but that requires traceback2 which requires linecache2 which requires
10571 ;; unittest2. So we're skipping tests for now.
10572 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
10573 ;; so in theory we could get around this situation somehow.)
10574 #:tests? #f))
10575 (synopsis
10576 "Pluggable command line tool for serving web applications and more")
10577 (description
10578 "PasteScript is a plugin-friendly command line tool which provides a
10579variety of features, from launching web applications to bootstrapping project
10580layouts.")
10581 (license license:expat)))
10582
10583(define-public python2-pastescript
10584 (package-with-python2 python-pastescript))
10585
1cf53652
CAW
10586(define-public python-pyquery
10587 (package
10588 (name "python-pyquery")
ab0c3429 10589 (version "1.2.17")
1cf53652
CAW
10590 (source
10591 (origin
10592 (method url-fetch)
10593 (uri (pypi-uri "pyquery" version))
10594 (sha256
10595 (base32
ab0c3429 10596 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
1cf53652 10597 (build-system python-build-system)
2ddbfa8c
LF
10598 (native-inputs
10599 `(("python-webob" ,python-webob)
10600 ("python-webtest" ,python-webtest)))
1cf53652
CAW
10601 (propagated-inputs
10602 `(("python-lxml" ,python-lxml)
10603 ("python-cssselect" ,python-cssselect)))
10604 (home-page "https://github.com/gawel/pyquery")
10605 (synopsis "Make jQuery-like queries on xml documents")
10606 (description "pyquery allows you to make jQuery queries on xml documents.
10607The API is as much as possible the similar to jQuery. pyquery uses lxml for
10608fast xml and html manipulation.")
f210e944 10609 (license license:bsd-3)))
1cf53652
CAW
10610
10611(define-public python2-pyquery
f210e944 10612 (package-with-python2 python-pyquery))
aa6313d6
CAW
10613
10614(define-public python-webtest
10615 (package
10616 (name "python-webtest")
10617 (version "2.0.20")
10618 (source
10619 (origin
10620 (method url-fetch)
10621 (uri (pypi-uri "WebTest" version))
10622 (sha256
10623 (base32
10624 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
10625 (build-system python-build-system)
10626 (arguments
10627 `(;; Unfortunately we have to disable tests!
10628 ;; This release of WebTest is pinned to python-nose < 1.3,
10629 ;; but older versions of python-nose are plagued with the following
10630 ;; bug(s), which rears its ugly head during test execution:
10631 ;; https://github.com/nose-devs/nose/issues/759
10632 ;; https://github.com/nose-devs/nose/pull/811
10633 #:tests? #f))
10634 ;; Commented out code is no good, but in this case, once tests
10635 ;; are ready to be enabled again, we should put the following
10636 ;; in place:
10637 ;; (native-inputs
10638 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
10639 ;; ; but see above comment
10640 ;; ("python-coverage" ,python-coverage)
10641 ;; ("python-mock" ,python-mock)
10642 ;; ("python-pastedeploy" ,python-pastedeploy)
10643 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
10644 ;; ("python-pyquery" ,python-pyquery)))
10645 (propagated-inputs
10646 `(("python-waitress" ,python-waitress)
10647 ("python-webob" ,python-webob)
10648 ("python-six" ,python-six)
10649 ("python-beautifulsoup4" ,python-beautifulsoup4)))
10650 (home-page "http://webtest.pythonpaste.org/")
10651 (synopsis "Helper to test WSGI applications")
10652 (description "Webtest allows you to test your Python web applications
10653without starting an HTTP server. It supports anything that supports the
10654minimum of WSGI.")
f210e944 10655 (license license:expat)))
aa6313d6
CAW
10656
10657(define-public python2-webtest
f210e944 10658 (package-with-python2 python-webtest))
4cb122cd
CAW
10659
10660(define-public python-anyjson
10661 (package
10662 (name "python-anyjson")
10663 (version "0.3.3")
10664 (source
10665 (origin
10666 (method url-fetch)
10667 (uri (pypi-uri "anyjson" version))
10668 (sha256
10669 (base32
10670 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
10671 (build-system python-build-system)
10672 (arguments
10673 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
10674 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
10675 ;; whatever) so this transformation needs to be done before the tests
10676 ;; can be run. Maybe we could add a build step to transform beforehand
10677 ;; but it could be annoying/difficult.
10678 ;; We can enable tests for the Python 2 version, though, and do below.
10679 #:tests? #f))
10680 (home-page "http://bitbucket.org/runeh/anyjson/")
10681 (synopsis
10682 "Wraps best available JSON implementation in a common interface")
10683 (description
10684 "Anyjson loads whichever is the fastest JSON module installed
10685and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 10686 (license license:bsd-3)
4cb122cd
CAW
10687 (properties `((python2-variant . ,(delay python2-anyjson))))))
10688
10689(define-public python2-anyjson
10690 (let ((anyjson (package-with-python2
10691 (strip-python2-variant python-anyjson))))
10692 (package
10693 (inherit anyjson)
10694 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10695 #:tests? #t
10696 ,@(package-arguments anyjson)))
00e10c6e 10697 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
10698
10699(define-public python-amqp
10700 (package
10701 (name "python-amqp")
10702 (version "1.4.9")
10703 (source
10704 (origin
10705 (method url-fetch)
10706 (uri (pypi-uri "amqp" version))
10707 (sha256
10708 (base32
10709 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
10710 (build-system python-build-system)
10711 (native-inputs
10712 `(("python-nose" ,python-nose)
10713 ("python-mock" ,python-mock)))
7bf837fd 10714 (home-page "https://github.com/celery/py-amqp")
8dfceab7
CAW
10715 (synopsis
10716 "Low-level AMQP client for Python (fork of amqplib)")
10717 (description
10718 "This is a fork of amqplib which was originally written by Barry Pederson.
10719It is maintained by the Celery project, and used by kombu as a pure python
10720alternative when librabbitmq is not available.")
3f641af0 10721 (license license:lgpl2.1+)
8dfceab7
CAW
10722 (properties `((python2-variant . ,(delay python2-amqp))))))
10723
10724(define-public python2-amqp
10725 (let ((amqp (package-with-python2
10726 (strip-python2-variant python-amqp))))
10727 (package
10728 (inherit amqp)
10729 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10730 ;; unmaintained. Weirdly, does not do this on the python 3
10731 ;; version?
10732 #:tests? #f
00e10c6e 10733 ,@(package-arguments amqp))))))
7d387305
CAW
10734
10735(define-public python-kombu
10736 (package
10737 (name "python-kombu")
0cb59822 10738 (version "3.0.37")
7d387305
CAW
10739 (source
10740 (origin
10741 (method url-fetch)
10742 (uri (pypi-uri "kombu" version))
10743 (sha256
10744 (base32
0cb59822 10745 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
10746 (build-system python-build-system)
10747 (native-inputs
10748 `(("python-mock" ,python-mock)
10749 ("python-nose" ,python-nose)))
10750 (propagated-inputs
10751 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
10752 ("python-amqp" ,python-amqp)
10753 ("python-redis" ,python-redis)))
7d387305
CAW
10754 (home-page "http://kombu.readthedocs.org")
10755 (synopsis "Message passing library for Python")
10756 (description "The aim of Kombu is to make messaging in Python as easy as
10757possible by providing an idiomatic high-level interface for the AMQ protocol,
10758and also provide proven and tested solutions to common messaging problems.
10759AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10760message orientation, queuing, routing, reliability and security, for which the
10761RabbitMQ messaging server is the most popular implementation.")
3f641af0 10762 (license license:bsd-3)
7d387305
CAW
10763 (properties `((python2-variant . ,(delay python2-kombu))))))
10764
10765(define-public python2-kombu
10766 (let ((kombu (package-with-python2
10767 (strip-python2-variant python-kombu))))
10768 (package
10769 (inherit kombu)
752eb9e0
MB
10770 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10771 ;; It works fine on the python3 variant.
10772 #:tests? #f
10773 ,@(package-arguments kombu)))
328bb95d
HG
10774 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10775 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
10776
10777(define-public python-billiard
10778 (package
10779 (name "python-billiard")
a6bb9e44 10780 (version "3.3.0.23")
b6f0b9fb
CAW
10781 (source
10782 (origin
10783 (method url-fetch)
10784 (uri (pypi-uri "billiard" version))
10785 (sha256
10786 (base32
a6bb9e44 10787 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
10788 (build-system python-build-system)
10789 (native-inputs
10790 `(("python-nose" ,python-nose)))
7bf837fd 10791 (home-page "https://github.com/celery/billiard")
b6f0b9fb
CAW
10792 (synopsis
10793 "Python multiprocessing fork with improvements and bugfixes")
10794 (description
10795 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10796multiprocessing package itself is a renamed and updated version of R Oudkerk's
10797pyprocessing package. This standalone variant is intended to be compatible with
10798Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 10799 (license license:bsd-3)
b6f0b9fb
CAW
10800 (properties `((python2-variant . ,(delay python2-billiard))))))
10801
10802(define-public python2-billiard
10803 (let ((billiard (package-with-python2
10804 (strip-python2-variant python-billiard))))
10805 (package
10806 (inherit billiard)
00e10c6e 10807 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
10808 ("python2-mock" ,python2-mock)
10809 ,@(package-native-inputs billiard))))))
22df6419
CAW
10810
10811(define-public python-celery
10812 (package
10813 (name "python-celery")
9ebe87fe 10814 (version "3.1.24")
22df6419
CAW
10815 (source
10816 (origin
10817 (method url-fetch)
10818 (uri (pypi-uri "celery" version))
10819 (sha256
10820 (base32
9ebe87fe 10821 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 10822 (build-system python-build-system)
9ebe87fe
LF
10823 (arguments
10824 `(#:phases
10825 (modify-phases %standard-phases
10826 ;; These tests break with Python 3.5:
10827 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10828 (replace 'check
10829 (lambda _
10830 (zero?
10831 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
10832 (native-inputs
10833 `(("python-nose" ,python-nose)))
f22efa01 10834 (propagated-inputs
22df6419
CAW
10835 `(("python-pytz" ,python-pytz)
10836 ("python-billiard" ,python-billiard)
10837 ("python-kombu" ,python-kombu)))
10838 (home-page "http://celeryproject.org")
10839 (synopsis "Distributed Task Queue")
10840 (description "Celery is an asynchronous task queue/job queue based on
10841distributed message passing. It is focused on real-time operation, but
10842supports scheduling as well. The execution units, called tasks, are executed
10843concurrently on a single or more worker servers using multiprocessing,
10844Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10845synchronously (wait until ready).")
3f641af0 10846 (license license:bsd-3)
22df6419
CAW
10847 (properties `((python2-variant . ,(delay python2-celery))))))
10848
10849(define-public python2-celery
10850 (let ((celery (package-with-python2
10851 (strip-python2-variant python-celery))))
10852 (package
10853 (inherit celery)
00e10c6e 10854 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
10855 ("python2-mock" ,python2-mock)
10856 ,@(package-native-inputs celery))))))
97e32948
CAW
10857
10858(define-public python-translitcodec
10859 (package
10860 (name "python-translitcodec")
10861 (version "0.4.0")
10862 (source
10863 (origin
10864 (method url-fetch)
10865 (uri (pypi-uri "translitcodec" version))
10866 (sha256
10867 (base32
10868 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10869 (build-system python-build-system)
10870 (arguments
10871 `(#:tests? #f)) ; no tests provided
10872 (home-page
10873 "https://github.com/claudep/translitcodec")
10874 (synopsis
10875 "Unicode to 8-bit charset transliteration codec")
10876 (description
10877 "This package contains codecs for transliterating ISO 10646 texts into
10878best-effort representations using smaller coded character sets (ASCII,
10879ISO 8859, etc.).")
f210e944 10880 (license license:expat)))
97e32948
CAW
10881
10882(define-public python2-translitcodec
f210e944 10883 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
10884
10885(define-public python-editor
10886 (package
10887 (name "python-editor")
10888 (version "0.5")
10889 (source
10890 (origin
10891 (method url-fetch)
10892 (uri (pypi-uri "python-editor" version))
10893 (sha256
10894 (base32
10895 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10896 (build-system python-build-system)
10897 (home-page
10898 "https://github.com/fmoo/python-editor")
10899 (synopsis
10900 "Programmatically open an editor, capture the result")
10901 (description
10902 "python-editor is a library that provides the editor module for
10903programmatically interfacing with your system's $EDITOR.")
f210e944 10904 (license license:asl2.0)))
0c3b90d4
CAW
10905
10906(define-public python2-editor
f210e944 10907 (package-with-python2 python-editor))
3276517c
LF
10908
10909(define-public python-sphinxcontrib-programoutput
10910 (package
10911 (name "python-sphinxcontrib-programoutput")
b9ce9eca 10912 (version "0.10")
3276517c
LF
10913 (source (origin
10914 (method url-fetch)
10915 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10916 (sha256
10917 (base32
b9ce9eca 10918 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
3276517c 10919 (build-system python-build-system)
e2cb140e
MB
10920 (arguments
10921 ;; FIXME: Many tests are failing and the upstream is gone.
10922 '(#:tests? #f))
3276517c 10923 (propagated-inputs
a0a09859 10924 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
10925 (synopsis "Sphinx extension to include program output")
10926 (description "A Sphinx extension to literally insert the output of arbitrary
10927commands into documents, helping you to keep your command examples up to date.")
10928 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 10929 (license license:bsd-2)))
3276517c
LF
10930
10931(define-public python2-sphinxcontrib-programoutput
f210e944 10932 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
10933
10934(define-public python-sphinx-repoze-autointerface
10935 (package
10936 (name "python-sphinx-repoze-autointerface")
328ae341 10937 (version "0.8")
548d7165
LF
10938 (source (origin
10939 (method url-fetch)
10940 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10941 (sha256
10942 (base32
328ae341 10943 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165 10944 (build-system python-build-system)
5b3c3d4b 10945 (arguments '(#:tests? #f)) ; No tests.
548d7165 10946 (propagated-inputs
47c7dc4a 10947 `(("python-sphinx" ,python-sphinx)
548d7165
LF
10948 ("python-zope-interface" ,python-zope-interface)))
10949 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10950 (description "This package defines an extension for the Sphinx documentation
10951system. The extension allows generation of API documentation by
10952introspection of @code{zope.interface} instances in code.")
10953 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 10954 (license license:repoze)))
548d7165
LF
10955
10956(define-public python2-sphinx-repoze-autointerface
10957 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
10958
10959(define-public python-psycopg2
10960 (package
10961 (name "python-psycopg2")
e3741591 10962 (version "2.7.3.1")
b31fbea5
DM
10963 (source
10964 (origin
10965 (method url-fetch)
10966 (uri (pypi-uri "psycopg2" version))
10967 (sha256
10968 (base32
e3741591 10969 "0rda1j02ds6s28752fhmpwg761sh6jsxi1gpczqkrd28cki1cywv"))))
b31fbea5
DM
10970 (build-system python-build-system)
10971 (arguments
10972 ;; Tests would require a postgresql database "psycopg2_test"
10973 ;; and a running postgresql database management service.
10974 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10975 (inputs
10976 `(("postgresql" ,postgresql))) ; libpq
10977 (home-page "http://initd.org/psycopg/")
10978 (synopsis "Python PostgreSQL adapter")
10979 (description
10980 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 10981 (license license:lgpl3+)))
b31fbea5
DM
10982
10983(define-public python2-psycopg2
f210e944 10984 (package-with-python2 python-psycopg2))
eed1a61f
LF
10985
10986(define-public python-vobject
10987 (package
10988 (name "python-vobject")
e00a5909 10989 (version "0.9.5")
eed1a61f
LF
10990 (source (origin
10991 (method url-fetch)
10992 (uri (pypi-uri "vobject" version))
10993 (sha256
10994 (base32
e00a5909 10995 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
eed1a61f 10996 (build-system python-build-system)
a9871b7b
LF
10997 (arguments
10998 '(;; The test suite relies on some non-portable Windows interfaces.
10999 #:tests? #f))
f22efa01 11000 (propagated-inputs
22d7360b 11001 `(("python-dateutil" ,python-dateutil)
eed1a61f
LF
11002 ("python-pyicu" ,python-pyicu)))
11003 (synopsis "Parse and generate vCard and vCalendar files")
11004 (description "Vobject is intended to be a full featured Python package for
11005parsing and generating vCard and vCalendar files. Currently, iCalendar files
11006are supported and well tested. vCard 3.0 files are supported, and all data
11007should be imported, but only a few components are understood in a sophisticated
11008way.")
11009 (home-page "http://eventable.github.io/vobject/")
f210e944 11010 (license license:asl2.0)))
eed1a61f
LF
11011
11012(define-public python2-vobject
f210e944 11013 (package-with-python2 python-vobject))
cedac813
LF
11014
11015(define-public python-munkres
11016 (package
11017 (name "python-munkres")
38e81a2c 11018 (version "1.0.8")
cedac813
LF
11019 (source (origin
11020 (method url-fetch)
11021 (uri (pypi-uri "munkres" version))
11022 (sha256
11023 (base32
38e81a2c 11024 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
11025 (build-system python-build-system)
11026 (arguments
11027 '(#:tests? #f)) ; no test suite
11028 (home-page "http://software.clapper.org/munkres/")
11029 (synopsis "Implementation of the Munkres algorithm")
11030 (description "The Munkres module provides an implementation of the Munkres
11031algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11032useful for solving the Assignment Problem.")
3f641af0 11033 (license license:bsd-3)))
cedac813
LF
11034
11035(define-public python2-munkres
11036 (package-with-python2 python-munkres))
f3b3d78f
LF
11037
11038(define-public python-flask
11039 (package
11040 (name "python-flask")
c6c80104 11041 (version "0.11.1")
f3b3d78f
LF
11042 (source (origin
11043 (method url-fetch)
11044 (uri (pypi-uri "Flask" version))
11045 (sha256
11046 (base32
c6c80104 11047 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
11048 (build-system python-build-system)
11049 (propagated-inputs
11050 `(("python-itsdangerous" ,python-itsdangerous)
11051 ("python-jinja2" ,python-jinja2)
8f35c030 11052 ("python-click" ,python-click)
f3b3d78f
LF
11053 ("python-werkzeug" ,python-werkzeug)))
11054 (home-page "https://github.com/mitsuhiko/flask/")
11055 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
11056 (description "Flask is a micro web framework based on the Werkzeug toolkit
11057and Jinja2 template engine. It is called a micro framework because it does not
11058presume or force a developer to use a particular tool or library.")
f210e944 11059 (license license:bsd-3)))
f3b3d78f
LF
11060
11061(define-public python2-flask
f210e944 11062 (package-with-python2 python-flask))
603d665b 11063
a7ad802b 11064(define-public python-flask-wtf
11065 (package
11066 (name "python-flask-wtf")
11067 (version "0.13.1")
11068 (source
11069 (origin
11070 (method url-fetch)
11071 (uri (pypi-uri "Flask-WTF" version))
11072 (sha256
11073 (base32
11074 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
11075 (build-system python-build-system)
d296d300
MB
11076 (arguments
11077 '(#:phases
11078 (modify-phases %standard-phases
11079 (add-before 'check 'drop-failing-test
11080 (lambda _
11081 ;; FIXME: This file tries resolving an external server, which
11082 ;; fails. Try to patch out the offending section instead of
11083 ;; deleting the whole thing.
11084 (delete-file "tests/test_recaptcha.py")
11085 #t)))))
a7ad802b 11086 (propagated-inputs
11087 `(("python-flask-babel" ,python-flask-babel)
11088 ("python-babel" ,python-babel)
11089 ("python-wtforms" ,python-wtforms)))
11090 (native-inputs
11091 `(("python-nose" ,python-nose)))
11092 (home-page "https://github.com/lepture/flask-wtf")
11093 (synopsis "Simple integration of Flask and WTForms")
11094 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
11095upload, and reCAPTCHA.")
11096 (license license:bsd-3)))
11097
11098(define-public python2-flask-wtf
11099 (package-with-python2 python-flask-wtf))
11100
a2c7d88e 11101(define-public python-flask-multistatic
11102 (package
11103 (name "python-flask-multistatic")
11104 (version "1.0")
11105 (source
11106 (origin
11107 (method url-fetch)
11108 (uri (pypi-uri "flask-multistatic" version))
11109 (sha256
11110 (base32
11111 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
11112 (build-system python-build-system)
11113 (propagated-inputs
11114 `(("python-flask" ,python-flask)))
11115 (home-page "https://pagure.io/flask-multistatic")
11116 (synopsis "Flask plugin to allow overriding static files")
11117 (description "@code{flask-multistatic} is a flask plugin that adds support
11118for overriding static files.")
11119 (license license:gpl3+)))
11120
11121(define-public python2-flask-multistatic
11122 (package-with-python2 python-flask-multistatic))
11123
603d665b
LF
11124(define-public python-cookies
11125 (package
11126 (name "python-cookies")
11127 (version "2.2.1")
11128 (source (origin
11129 (method url-fetch)
11130 (uri (pypi-uri "cookies" version))
11131 (sha256
11132 (base32
11133 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
11134 (build-system python-build-system)
11135 (arguments
11136 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
11137 #:tests? #f))
11138 (native-inputs
11139 `(("python-pytest" ,python2-pytest)))
11140 (synopsis "HTTP cookie parser and renderer")
11141 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
11142Python.")
11143 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 11144 (license license:expat)))
603d665b
LF
11145
11146(define-public python2-cookies
f210e944 11147 (package-with-python2 python-cookies))
0efde7d6
LF
11148
11149(define-public python-responses
11150 (package
11151 (name "python-responses")
11152 (version "0.5.1")
11153 (source (origin
11154 (method url-fetch)
11155 (uri (pypi-uri "responses" version))
11156 (sha256
11157 (base32
11158 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
11159 (build-system python-build-system)
11160 (arguments
11161 `(;; Test suite is not distributed:
11162 ;; https://github.com/getsentry/responses/issues/38
11163 #:tests? #f))
11164 (native-inputs
d8ea5f2f 11165 `(("python-mock" ,python-mock)))
0efde7d6
LF
11166 (propagated-inputs
11167 `(("python-requests" ,python-requests)
d8ea5f2f 11168 ("python-cookies" ,python-cookies)
0efde7d6
LF
11169 ("python-six" ,python-six)))
11170 (home-page "https://github.com/getsentry/responses")
11171 (synopsis "Utility for mocking out the `requests` Python library")
11172 (description "A utility library for mocking out the `requests` Python
11173library.")
f210e944 11174 (license license:asl2.0)))
0efde7d6
LF
11175
11176(define-public python2-responses
f210e944 11177 (package-with-python2 python-responses))
76b94885 11178
b7afd018
RW
11179(define-public python-whoosh
11180 (package
11181 (name "python-whoosh")
11182 (version "2.7.4")
11183 (source
11184 (origin
11185 (method url-fetch)
11186 (uri (pypi-uri "Whoosh" version))
11187 (sha256
11188 (base32
11189 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11190 (build-system python-build-system)
11191 (native-inputs
f3b98f4f 11192 `(("python-pytest" ,python-pytest)))
b7afd018
RW
11193 (home-page "http://bitbucket.org/mchaput/whoosh")
11194 (synopsis "Full text indexing, search, and spell checking library")
11195 (description
11196 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11197checking library.")
11198 (license license:bsd-2)))
11199
11200(define-public python2-whoosh
11201 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11202 (package (inherit whoosh)
11203 (propagated-inputs
11204 `(("python2-backport-ssl-match-hostname"
11205 ,python2-backport-ssl-match-hostname)
11206 ,@(package-propagated-inputs whoosh))))))
11207
76b94885
LF
11208(define-public python-pathlib
11209 (package
11210 (name "python-pathlib")
11211 (version "1.0.1")
11212 (source (origin
11213 (method url-fetch)
11214 (uri (pypi-uri "pathlib" version))
11215 (sha256
11216 (base32
11217 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11218 (build-system python-build-system)
92a312dc
RW
11219 ;; The tests depend on the internal "test" module, which does not provide
11220 ;; a stable interface.
11221 (arguments `(#:tests? #f))
76b94885 11222 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
11223 (synopsis "Object-oriented file system paths")
11224 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
11225It offers the following advantages over using string objects:
11226
11227@enumerate
11228@item No more cumbersome use of os and os.path functions. Everything can
11229be done easily through operators, attribute accesses, and method calls.
11230@item Embodies the semantics of different path types. For example,
11231comparing Windows paths ignores casing.
11232@item Well-defined semantics, eliminating any inconsistencies or
11233ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
11234@end enumerate
11235
11236Note: In Python 3.4, pathlib is now part of the standard library. For other
11237Python versions please consider python-pathlib2 instead, which tracks the
11238standard library module. This module (python-pathlib) isn't maintained
11239anymore.")
76b94885
LF
11240 (license license:expat)))
11241
11242(define-public python2-pathlib
11243 (package-with-python2 python-pathlib))
25a7db0a 11244
b7703c81
HG
11245(define-public python2-pathlib2
11246 (package
11247 (name "python2-pathlib2")
11248 (version "2.1.0")
11249 (source (origin
11250 (method url-fetch)
11251 (uri (pypi-uri "pathlib2" version))
11252 (sha256
11253 (base32
11254 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
11255 (build-system python-build-system)
49a531f5
HG
11256 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11257 ;; version is 3.4 which already includes this package as part of the
11258 ;; standard library.
b7703c81
HG
11259 (arguments
11260 `(#:python ,python-2))
11261 (native-inputs
f3b98f4f 11262 `(("python2-six" ,python2-six)))
b7703c81
HG
11263 (home-page "http://pypi.python.org/pypi/pathlib2/")
11264 (synopsis "Object-oriented file system paths - backport of standard
11265pathlib module")
11266 (description "The goal of pathlib2 is to provide a backport of standard
11267pathlib module which tracks the standard library module, so all the newest
11268features of the standard pathlib can be used also on older Python versions.
11269
11270Pathlib offers a set of classes to handle file system paths. It offers the
11271following advantages over using string objects:
11272
11273@enumerate
11274@item No more cumbersome use of os and os.path functions. Everything can
11275be done easily through operators, attribute accesses, and method calls.
11276@item Embodies the semantics of different path types. For example,
11277comparing Windows paths ignores casing.
11278@item Well-defined semantics, eliminating any inconsistencies or
11279ambiguities (forward vs. backward slashes, etc.).
11280@end enumerate")
11281 (license license:expat)))
11282
25a7db0a
LF
11283(define-public python-jellyfish
11284 (package
11285 (name "python-jellyfish")
8c4964dd 11286 (version "0.5.6")
25a7db0a
LF
11287 (source (origin
11288 (method url-fetch)
11289 (uri (pypi-uri "jellyfish" version))
11290 (sha256
11291 (base32
8c4964dd 11292 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
11293 (build-system python-build-system)
11294 (native-inputs
11295 `(("python-pytest" ,python-pytest)))
11296 (home-page "https://github.com/jamesturk/jellyfish")
11297 (synopsis "Approximate and phonetic matching of strings")
11298 (description "Jellyfish uses a variety of string comparison and phonetic
11299encoding algorithms to do fuzzy string matching.")
3f641af0 11300 (license license:bsd-2)
25a7db0a
LF
11301 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11302
11303(define-public python2-jellyfish
11304 (let ((jellyfish (package-with-python2
11305 (strip-python2-variant python-jellyfish))))
11306 (package (inherit jellyfish)
00e10c6e 11307 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 11308 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
11309
11310(define-public python2-unicodecsv
11311 (package
11312 (name "python2-unicodecsv")
11313 (version "0.14.1")
11314 (source (origin
11315 (method url-fetch)
11316 ;; The test suite is not included in the PyPi release.
11317 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11318 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
11319 "archive/" version ".tar.gz"))
11320 (file-name (string-append name "-" version ".tar.gz"))
11321 (sha256
11322 (base32
11323 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
11324 (build-system python-build-system)
11325 (arguments
11326 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11327 #:python ,python-2))
11328 (native-inputs
f3b98f4f 11329 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
11330 (home-page "https://github.com/jdunck/python-unicodecsv")
11331 (synopsis "Unicode CSV module for Python 2")
11332 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11333module, adding support for Unicode strings.")
3f641af0 11334 (license license:bsd-2)))
064503aa
LF
11335
11336(define-public python-rarfile
11337 (package
11338 (name "python-rarfile")
67824447 11339 (version "2.8")
064503aa
LF
11340 (source (origin
11341 (method url-fetch)
11342 (uri (pypi-uri "rarfile" version))
11343 (sha256
11344 (base32
67824447 11345 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
11346 (build-system python-build-system)
11347 (arguments
11348 '(#:phases
11349 (modify-phases %standard-phases
11350 (replace 'check
11351 ;; Many tests fail, but the installation proceeds.
11352 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
11353 (native-inputs
11354 `(("which" ,which))) ; required for tests
11355 (propagated-inputs
11356 `(("libarchive" ,libarchive)))
11357 (home-page "https://github.com/markokr/rarfile")
11358 (synopsis "RAR archive reader for Python")
11359 (description "This is Python module for RAR archive reading. The interface
11360is made as zipfile like as possible.")
3f641af0 11361 (license license:isc)))
064503aa
LF
11362
11363(define-public python2-rarfile
11364 (package-with-python2 python-rarfile))
daeeea71
CM
11365
11366(define-public python-magic
11367 (package
11368 (name "python-magic")
11369 (version "0.4.3")
11370 (source
11371 (origin
11372 (method url-fetch)
11373 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
11374 version ".tar.gz"))
11375 (sha256
11376 (base32
11377 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
11378 (file-name (string-append name "-" version "-checkout"))))
11379 (build-system python-build-system)
11380 (arguments
11381 ;; The tests are unreliable, so don't run them. The tests fail
11382 ;; under Python3 because they were written for Python2 and
11383 ;; contain import statements that do not work in Python3. One of
11384 ;; the tests fails under Python2 because its assertions are
11385 ;; overly stringent; it relies on comparing output strings which
11386 ;; are brittle and can change depending on the version of
11387 ;; libmagic being used and the system on which the test is
11388 ;; running. In my case, under GuixSD 0.10.0, only one test
11389 ;; failed, and it seems to have failed only because the version
11390 ;; of libmagic that is packaged in Guix outputs a slightly
11391 ;; different (but not wrong) string than the one that the test
11392 ;; expected.
11393 '(#:tests? #f
11394 #:phases (modify-phases %standard-phases
11395 ;; Replace a specific method call with a hard-coded
11396 ;; path to the necessary libmagic.so file in the
11397 ;; store. If we don't do this, then the method call
11398 ;; will fail to find the libmagic.so file, which in
11399 ;; turn will cause any application using
11400 ;; python-magic to fail.
11401 (add-before 'build 'hard-code-path-to-libmagic
11402 (lambda* (#:key inputs #:allow-other-keys)
11403 (let ((file (assoc-ref inputs "file")))
11404 (substitute* "magic.py"
11405 (("ctypes.util.find_library\\('magic'\\)")
11406 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
11407 #t)))
11408 (add-before 'install 'disable-egg-compression
11409 (lambda _
11410 (let ((port (open-file "setup.cfg" "a")))
11411 (display "\n[easy_install]\nzip_ok = 0\n"
11412 port)
11413 (close-port port)
11414 #t))))))
daeeea71
CM
11415 (inputs
11416 ;; python-magic needs to be able to find libmagic.so.
11417 `(("file" ,file)))
11418 (home-page "https://github.com/ahupp/python-magic")
11419 (synopsis "File type identification using libmagic")
11420 (description
11421 "This module uses ctypes to access the libmagic file type
11422identification library. It makes use of the local magic database and
11423supports both textual and MIME-type output. Note that this module and
11424the python-file module both provide a \"magic.py\" file; these two
11425modules, which are different and were developed separately, both serve
11426the same purpose: to provide Python bindings for libmagic.")
11427 (license license:expat)))
11428
11429(define-public python2-magic
11430 (package-with-python2 python-magic))
12af303f
CM
11431
11432(define-public python2-s3cmd
11433 (package
11434 (name "python2-s3cmd")
11435 (version "1.6.1")
11436 (source
11437 (origin
11438 (method url-fetch)
de67e922 11439 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
11440 "s3cmd-" version ".tar.gz"))
11441 (sha256
11442 (base32
11443 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
11444 (build-system python-build-system)
11445 (arguments
11446 ;; s3cmd is written for python2 only and contains no tests.
11447 `(#:python ,python-2
11448 #:tests? #f))
f22efa01 11449 (propagated-inputs
12af303f
CM
11450 `(("python2-dateutil" ,python2-dateutil)
11451 ;; The python-file package also provides a magic.py module.
11452 ;; This is an unfortunate state of affairs; however, s3cmd
11453 ;; fails to install if it cannot find specifically the
11454 ;; python-magic package. Thus we include it, instead of using
11455 ;; python-file. Ironically, s3cmd sometimes works better
11456 ;; without libmagic bindings at all:
11457 ;; https://github.com/s3tools/s3cmd/issues/198
11458 ("python2-magic" ,python2-magic)))
11459 (home-page "http://s3tools.org/s3cmd")
11460 (synopsis "Command line tool for S3-compatible storage services")
11461 (description
11462 "S3cmd is a command line tool for uploading, retrieving and managing data
11463in storage services that are compatible with the Amazon Simple Storage
11464Service (S3) protocol, including S3 itself. It supports rsync-like backup,
11465GnuPG encryption, and more. It also supports management of Amazon's
11466CloudFront content delivery network.")
3f641af0 11467 (license license:gpl2+)))
4323a5f0
AE
11468
11469(define-public python-pkgconfig
11470 (package
11471 (name "python-pkgconfig")
11472 (version "1.1.0")
11473 (source
11474 (origin
11475 (method url-fetch)
11476 (uri (pypi-uri "pkgconfig" version))
11477 (sha256
11478 (base32
11479 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
11480 (build-system python-build-system)
11481 (native-inputs
f3b98f4f 11482 `(("python-nose" ,python-nose)))
4323a5f0
AE
11483 (inputs
11484 `(("pkg-config" ,pkg-config)))
11485 (arguments
11486 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
11487 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
11488 #:tests? #f
4323a5f0
AE
11489 ;; Hard-code the path to pkg-config.
11490 #:phases
11491 (modify-phases %standard-phases
11492 (add-before
11493 'build 'patch
11494 (lambda _
11495 (substitute* "pkgconfig/pkgconfig.py"
11496 (("cmd = 'pkg-config")
11497 (string-append "cmd = '" (which "pkg-config"))))
11498 #t)))))
7bf837fd 11499 (home-page "https://github.com/matze/pkgconfig")
4323a5f0
AE
11500 (synopsis "Python interface for pkg-config")
11501 (description "This module provides a Python interface to pkg-config. It
11502can be used to find all pkg-config packages, check if a package exists,
11503check if a package meets certain version requirements, query CFLAGS and
11504LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 11505 (license license:expat)))
4323a5f0
AE
11506
11507(define-public python2-pkgconfig
11508 (package-with-python2 python-pkgconfig))
11509
2e697322
BW
11510(define-public python-bz2file
11511 (package
11512 (name "python-bz2file")
11513 (version "0.98")
11514 (source
11515 (origin
11516 (method url-fetch)
11517 (uri (pypi-uri "bz2file" version))
11518 (sha256
11519 (base32
11520 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11521 (build-system python-build-system)
11522 (arguments
124df723 11523 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
11524 (home-page "https://github.com/nvawda/bz2file")
11525 (synopsis "Read and write bzip2-compressed files")
11526 (description
11527 "Bz2file is a Python library for reading and writing bzip2-compressed
11528files. It contains a drop-in replacement for the I/O interface in the
11529standard library's @code{bz2} module, including features from the latest
11530development version of CPython that are not available in older releases.")
3f641af0 11531 (license license:asl2.0)
2e697322
BW
11532 (properties `((python2-variant . ,(delay python2-bz2file))))))
11533
11534(define-public python2-bz2file
11535 (let ((base (package-with-python2
11536 (strip-python2-variant python-bz2file))))
11537 (package
11538 (inherit base)
124df723 11539 (arguments
752bb447
BW
11540 `(#:python ,python-2
11541 #:phases
124df723
BW
11542 (modify-phases %standard-phases
11543 ;; 'python setup.py test' does not work as of 0.98.
11544 ;; There is only the one test file, so we run it directly.
11545 (replace 'check
11546 (lambda _ (zero? (system* "python"
11547 "test_bz2file.py"))))))))))
2e697322 11548
da4ac1aa
BW
11549(define-public python-future
11550 (package
11551 (name "python-future")
c522f57e 11552 (version "0.16.0")
da4ac1aa
BW
11553 (source
11554 (origin
11555 (method url-fetch)
11556 (uri (pypi-uri "future" version))
11557 (sha256
11558 (base32
c522f57e 11559 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
da4ac1aa
BW
11560 (build-system python-build-system)
11561 ;; Many tests connect to the network or are otherwise flawed.
11562 ;; https://github.com/PythonCharmers/python-future/issues/210
11563 (arguments
11564 `(#:tests? #f))
11565 (home-page "http://python-future.org")
11566 (synopsis "Single-source support for Python 3 and 2")
11567 (description
11568 "@code{python-future} is the missing compatibility layer between Python 2 and
11569Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
11570to support both Python 2 and Python 3 with minimal overhead.")
f210e944 11571 (license license:expat)))
da4ac1aa
BW
11572
11573(define-public python2-future
f210e944 11574 (package-with-python2 python-future))
da4ac1aa 11575
8e451885
AE
11576(define-public python-cysignals
11577 (package
11578 (name "python-cysignals")
11579 (version "1.1.0")
11580 (source
11581 (origin
11582 (method url-fetch)
11583 (uri (pypi-uri "cysignals" version ".tar.bz2"))
11584 (sha256
11585 (base32
11586 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
11587 (build-system python-build-system)
11588 (native-inputs
11589 `(("python-cython" ,python-cython)
8e451885
AE
11590 ("python-sphinx" ,python-sphinx)))
11591 (inputs
11592 `(("pari-gp" ,pari-gp)))
11593 (arguments
11594 `(#:modules ((guix build python-build-system)
11595 ((guix build gnu-build-system) #:prefix gnu:)
11596 (guix build utils))
11597 ;; FIXME: Tests are executed after installation and currently fail
11598 ;; when not installing into standard locations; the author is working
11599 ;; on a fix.
11600 #:tests? #f
11601 #:phases
11602 (modify-phases %standard-phases
11603 (add-before
11604 'build 'configure
11605 (assoc-ref gnu:%standard-phases 'configure)))))
11606 (home-page
11607 "https://github.com/sagemath/cysignals")
11608 (synopsis
11609 "Handling of interrupts and signals for Cython")
11610 (description
11611 "The cysignals package provides mechanisms to handle interrupts (and
11612other signals and errors) in Cython code, using two related approaches,
11613for mixed Cython/Python code or external C libraries and pure Cython code,
11614respectively.")
3f641af0 11615 (license license:lgpl3+)))
8e451885
AE
11616
11617(define-public python2-cysignals
11618 (package-with-python2 python-cysignals))
11619
63bcec71
DM
11620(define-public python2-shedskin
11621 (package
11622 (name "python2-shedskin")
11623 (version "0.9.4")
11624 (source
11625 (origin
11626 (method url-fetch)
11627 (uri (string-append "https://github.com/shedskin/shedskin/"
11628 "releases/download/v" version
11629 "/shedskin-" version ".tgz"))
11630 (sha256
11631 (base32
11632 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
11633 (build-system python-build-system)
11634 (arguments
11635 `(#:python ,python-2
11636 #:phases (modify-phases %standard-phases
11637 (add-after 'unpack 'fix-resulting-include-libs
11638 (lambda* (#:key inputs #:allow-other-keys)
11639 (let ((libgc (assoc-ref inputs "libgc"))
11640 (pcre (assoc-ref inputs "pcre")))
11641 (substitute* "shedskin/makefile.py"
11642 (("variable == 'CCFLAGS':[ ]*")
11643 (string-append "variable == 'CCFLAGS':\n"
11644 " line += ' -I " pcre "/include"
11645 " -I " libgc "/include'"))
11646 (("variable == 'LFLAGS':[ ]*")
11647 (string-append "variable == 'LFLAGS':\n"
11648 " line += ' -L" pcre "/lib"
11649 " -L " libgc "/lib'")))
11650 #t))))))
63bcec71
DM
11651 (inputs `(("pcre" ,pcre)
11652 ("libgc" ,libgc)))
11653 (home-page "https://shedskin.github.io/")
11654 (synopsis "Experimental Python-2 to C++ Compiler")
11655 (description (string-append "This is an experimental compiler for a subset of
11656Python. It generates C++ code and a Makefile."))
3f641af0 11657 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
11658
11659(define-public python2-rope
11660 (package
11661 (name "python2-rope")
11662 (version "0.10.3")
11663 (source
11664 (origin
11665 (method url-fetch)
11666 (uri (pypi-uri "rope" version))
11667 (sha256
11668 (base32
11669 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
11670 (arguments
11671 ;; Rope is currently python-2 only.
11672 ;; https://github.com/python-rope/rope/issues/57
11673 `(#:python ,python-2))
11674 (build-system python-build-system)
11675 (native-inputs
f3b98f4f 11676 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
11677 (home-page "https://github.com/python-rope/rope")
11678 (synopsis "Refactoring library for Python")
11679 (description "Rope is a refactoring library for Python. It facilitates
11680the renaming, moving and extracting of attributes, functions, modules, fields
11681and parameters in Python 2 source code. These refactorings can also be applied
d1e4ad1b 11682to occurrences in strings and comments.")
3f641af0 11683 (license license:gpl2)))
6ba8ca17
11684
11685(define-public python-py3status
11686 (package
11687 (name "python-py3status")
d2262d70 11688 (version "3.1")
6ba8ca17
11689 (source
11690 (origin
11691 (method url-fetch)
11692 (uri (pypi-uri "py3status" version))
11693 (sha256
11694 (base32
d2262d70 11695 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 11696 (build-system python-build-system)
3eabcc78
11697 (inputs
11698 `(("file" ,file)))
8653c1d5 11699 (arguments
3eabcc78
11700 '(#:phases
11701 (modify-phases %standard-phases
11702 ;; 'file' is used for detection of configuration file encoding
11703 ;; let's make link the dependency to particular input
11704 (add-before 'build 'patch-file-path
11705 (lambda* (#:key inputs #:allow-other-keys)
11706 (let ((file-path (assoc-ref inputs "file")))
11707 (substitute* "py3status/parse_config.py"
11708 (("check_output\\(\\['file'")
11709 (string-append "check_output(['" file-path "/bin/file'")))
11710 #t))))
11711 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
6ba8ca17
11712 (home-page "https://github.com/ultrabug/py3status")
11713 (synopsis "Extensible i3status wrapper written in Python")
11714 (description "py3status is an i3status wrapper which extends i3status
11715functionality in a modular way, allowing you to extend your panel with your
11716own code, responding to click events and updating clock every second.")
3f641af0 11717 (license license:bsd-3)))
b8fdbca3
HG
11718
11719(define-public python-tblib
11720 (package
11721 (name "python-tblib")
11722 (version "1.3.0")
11723 (source (origin
11724 (method url-fetch)
11725 (uri (pypi-uri "tblib" version))
11726 (sha256 (base32
11727 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
11728 (build-system python-build-system)
11729 (arguments
11730 `(#:phases
11731 (modify-phases %standard-phases
11732 (replace 'check
11733 (lambda _
11734 ;; Upstream runs tests after installation and the package itself
11735 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11736 ;; found.
11737 (setenv "PYTHONPATH"
11738 (string-append (getcwd) "/build/lib:"
11739 (getenv "PYTHONPATH")))
11740 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
11741 (native-inputs
11742 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
11743 ("python-six" ,python-six)))
11744 (home-page "https://github.com/ionelmc/python-tblib")
11745 (synopsis "Traceback serialization library")
11746 (description
11747 "Traceback serialization allows you to:
11748
11749@enumerate
11750@item Pickle tracebacks and raise exceptions with pickled tracebacks in
11751different processes. This allows better error handling when running code over
11752multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11753
11754@item Parse traceback strings and raise with the parsed tracebacks.
9657aeb1 11755@end enumerate\n")
3f641af0 11756 (license license:bsd-3)))
b8fdbca3
HG
11757
11758(define-public python2-tblib
11759 (package-with-python2 python-tblib))
1a024de4
HG
11760
11761(define-public python-sqlparse
11762 (package
11763 (name "python-sqlparse")
11764 (version "0.1.19")
11765 (source (origin
11766 (method url-fetch)
11767 (uri (pypi-uri "sqlparse" version))
11768 (sha256
11769 (base32
11770 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
11771 (build-system python-build-system)
11772 (arguments
11773 `(#:phases
11774 (modify-phases %standard-phases
11775 (replace 'check
11776 (lambda* _
11777 ;; setup.py-integrated 2to3 only affects the build files, but
11778 ;; py.test is using the source files. So we need to convert them
11779 ;; manually.
11780 (when (zero? (system* "python3"))
11781 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
11782 (zero? (system* "py.test")))))))
11783 (native-inputs
f3b98f4f 11784 `(("python-pytest" ,python-pytest)))
1a024de4
HG
11785 (home-page "https://github.com/andialbrecht/sqlparse")
11786 (synopsis "Non-validating SQL parser")
11787 (description "Sqlparse is a non-validating SQL parser for Python. It
11788provides support for parsing, splitting and formatting SQL statements.")
3f641af0 11789 (license license:bsd-3)))
1a024de4
HG
11790
11791(define-public python2-sqlparse
11792 (package-with-python2 python-sqlparse))
68b9d242
SB
11793
11794(define-public python-greenlet
11795 (package
11796 (name "python-greenlet")
1f89fb16 11797 (version "0.4.11")
68b9d242
SB
11798 (source (origin
11799 (method url-fetch)
11800 (uri (pypi-uri "greenlet" version))
11801 (sha256
11802 (base32
1f89fb16 11803 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
68b9d242 11804 (build-system python-build-system)
68b9d242
SB
11805 (home-page "https://greenlet.readthedocs.io/")
11806 (synopsis "Lightweight in-process concurrent programming")
11807 (description
11808 "Greenlet package is a spin-off of Stackless, a version of CPython
11809that supports micro-threads called \"tasklets\". Tasklets run
11810pseudo-concurrently (typically in a single or a few OS-level threads) and
11811are synchronized with data exchanges on \"channels\".")
3f641af0 11812 (license (list license:psfl license:expat))))
68b9d242
SB
11813
11814(define-public python2-greenlet
11815 (package-with-python2 python-greenlet))
d79a343b
SB
11816
11817(define-public python-gevent
11818 (package
11819 (name "python-gevent")
11820 (version "1.1.1")
11821 (source (origin
11822 (method url-fetch)
11823 (uri (pypi-uri "gevent" version))
11824 (sha256
11825 (base32
11826 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11827 (modules '((guix build utils)))
11828 (snippet
11829 '(begin
11830 ;; unbunding libev and c-ares
11831 (for-each delete-file-recursively '("libev" "c-ares"))
11832 ;; fixing testsuite
11833 (call-with-output-file "greentest/__init__.py" noop)
11834 (substitute* "greentest/testrunner.py"
11835 (("import util") "from . import util")
11836 (("from util import log") "from .util import log"))))))
11837 (build-system python-build-system)
11838 (propagated-inputs
11839 `(("python-greenlet" ,python-greenlet)))
11840 (native-inputs
f3b98f4f 11841 `(("python-six" ,python-six)))
d79a343b
SB
11842 (inputs
11843 `(("c-ares" ,c-ares)
11844 ("libev" ,libev)))
11845 (home-page "http://www.gevent.org/")
11846 (synopsis "Coroutine-based network library")
11847 (description
11848 "gevent is a coroutine-based Python networking library that uses greenlet
11849to provide a high-level synchronous API on top of the libev event loop.")
11850 (license license:expat)))
11851
11852(define-public python2-gevent
11853 (package-with-python2 python-gevent))
da3aeeb6 11854
c9a18125
MB
11855(define-public python-geventhttpclient
11856 (package
11857 (name "python-geventhttpclient")
11858 (version "1.3.1")
11859 (source (origin
11860 (method url-fetch)
11861 (uri (pypi-uri "geventhttpclient" version))
11862 (sha256
11863 (base32
11864 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11865 (modules '((guix build utils)))
11866 (snippet
11867 '(begin
11868 ;; Delete pre-compiled files.
11869 (for-each delete-file (find-files "src/geventhttpclient"
11870 ".*\\.pyc"))
11871 #t))))
11872 (build-system python-build-system)
11873 (arguments
11874 '(#:phases
11875 (modify-phases %standard-phases
11876 (add-after 'unpack 'delete-network-tests
11877 (lambda _
11878 (delete-file "src/geventhttpclient/tests/test_client.py")
11879 #t))
11880 (delete 'check)
11881 (add-after 'install 'check
11882 (lambda* (#:key inputs outputs #:allow-other-keys)
11883 (add-installed-pythonpath inputs outputs)
11884 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11885 (native-inputs
11886 `(("python-pytest" ,python-pytest)))
11887 (propagated-inputs
11888 `(("python-certifi" ,python-certifi)
11889 ("python-gevent" ,python-gevent)
11890 ("python-six" ,python-six)))
11891 (home-page "https://github.com/gwik/geventhttpclient")
11892 (synopsis "HTTP client library for gevent")
11893 (description "@code{python-geventhttpclient} is a high performance,
11894concurrent HTTP client library for python using @code{gevent}.")
11895 (license license:expat)))
11896
11897(define-public python2-geventhttpclient
11898 (package-with-python2 python-geventhttpclient))
11899
b585e361
DM
11900(define-public python-fastimport
11901 (package
11902 (name "python-fastimport")
11903 (version "0.9.6")
11904 (source
11905 (origin
11906 (method url-fetch)
11907 (uri (pypi-uri "fastimport" version))
11908 (sha256
11909 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11910 (build-system python-build-system)
11911 (home-page "https://github.com/jelmer/python-fastimport")
11912 (synopsis "VCS fastimport parser and generator in Python")
11913 (description "This package provides a parser for and generator of the Git
11914@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11915format.")
11916 (license license:gpl2+)))
11917
11918(define-public python2-fastimport
11919 (package-with-python2 python-fastimport))
11920
da3aeeb6
SB
11921(define-public python-twisted
11922 (package
11923 (name "python-twisted")
c1578ad0 11924 (version "17.1.0")
da3aeeb6
SB
11925 (source (origin
11926 (method url-fetch)
8ea8e8d3 11927 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
11928 (sha256
11929 (base32
c1578ad0 11930 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
da3aeeb6 11931 (build-system python-build-system)
a960e73f
MB
11932 (arguments
11933 '(#:tests? #f)) ; FIXME: Some tests are failing.
11934 ;; #:phases
11935 ;; (modify-phases %standard-phases
11936 ;; (replace 'check
11937 ;; (lambda _
11938 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170 11939 (propagated-inputs
c1578ad0
TS
11940 `(("python-zope-interface" ,python-zope-interface)
11941 ("python-incremental" ,python-incremental)
11942 ("python-constantly" ,python-constantly)
11943 ("python-automat" ,python-automat)))
da3aeeb6
SB
11944 (home-page "https://twistedmatrix.com/")
11945 (synopsis "Asynchronous networking framework written in Python")
11946 (description
11947 "Twisted is an extensible framework for Python programming, with special
11948focus on event-based network programming and multiprotocol integration.")
11949 (license license:expat)))
11950
11951(define-public python2-twisted
11952 (package-with-python2 python-twisted))
d0b6fed6 11953
4d3fa5a4
EF
11954(define-public python-pika
11955 (package
11956 (name "python-pika")
11957 (version "0.10.0")
11958 (source
11959 (origin
11960 (method url-fetch)
11961 (uri (pypi-uri "pika" version))
11962 (sha256
11963 (base32
11964 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11965 (build-system python-build-system)
11966 (native-inputs
269d9172
LF
11967 `(("python-pyev" ,python-pyev)
11968 ("python-tornado" ,python-tornado)
11969 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
11970 (home-page "https://pika.readthedocs.org")
11971 (synopsis "Pure Python AMQP Client Library")
11972 (description
11973 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11974Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11975network support library.")
11976 (license license:bsd-3)))
11977
11978(define-public python2-pika
11979 (package-with-python2 python-pika))
11980
d0b6fed6
DM
11981(define-public python-ply
11982 (package
11983 (name "python-ply")
234ade2d 11984 (version "3.9")
d0b6fed6
DM
11985 (source
11986 (origin
11987 (method url-fetch)
234ade2d 11988 (uri (pypi-uri "ply" version))
d0b6fed6
DM
11989 (sha256
11990 (base32
234ade2d 11991 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
d0b6fed6
DM
11992 (build-system python-build-system)
11993 (home-page "http://www.dabeaz.com/ply/")
11994 (synopsis "Python Lex & Yacc")
11995 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11996It uses LR parsing and does extensive error checking.")
f210e944 11997 (license license:bsd-3)))
d0b6fed6
DM
11998
11999(define-public python2-ply
f210e944 12000 (package-with-python2 python-ply))
d951bd54
SB
12001
12002(define-public python-tabulate
12003 (package
12004 (name "python-tabulate")
e6ace98d 12005 (version "0.7.7")
d951bd54
SB
12006 (source (origin
12007 (method url-fetch)
12008 (uri (pypi-uri "tabulate" version))
12009 (sha256
12010 (base32
fe2ba3a8 12011 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
d951bd54 12012 (build-system python-build-system)
fe2ba3a8
MB
12013 (arguments
12014 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12015 ;; and the latest release is not tagged in the upstream repository.
12016 '(#:tests? #f))
d951bd54
SB
12017 (home-page "https://bitbucket.org/astanin/python-tabulate")
12018 (synopsis "Pretty-print tabular data")
12019 (description
12020 "Tabulate is a library and command-line utility to pretty-print tabular
12021data in Python.")
12022 (license license:expat)))
12023
12024(define-public python2-tabulate
12025 (package-with-python2 python-tabulate))
1c4c8a33
SB
12026
12027(define-public python-kazoo
12028 (package
12029 (name "python-kazoo")
12030 (version "2.2.1")
12031 (source
12032 (origin
12033 (method url-fetch)
12034 (uri (pypi-uri "kazoo" version))
12035 (sha256
12036 (base32
12037 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
12038 (build-system python-build-system)
12039 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
12040 (propagated-inputs
12041 `(("python-six" ,python-six)))
1c4c8a33
SB
12042 (home-page "https://kazoo.readthedocs.org")
12043 (synopsis "High-level Zookeeper client library")
12044 (description
12045 "Kazoo is a Python client library for the Apache Zookeeper distributed
12046application service. It is designed to be easy to use and to avoid common
12047programming errors.")
3f641af0 12048 (license license:asl2.0)))
1c4c8a33
SB
12049
12050(define-public python2-kazoo
12051 (package-with-python2 python-kazoo))
45dda35e
SB
12052
12053(define-public python-pykafka
12054 (package
12055 (name "python-pykafka")
12056 (version "2.4.0")
12057 (source (origin
12058 (method url-fetch)
c6bccf71
EF
12059 (uri (string-append
12060 "https://pypi.python.org/packages/8b/3e/"
12061 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
12062 "pykafka-" version ".tar.gz"))
45dda35e
SB
12063 (sha256
12064 (base32
12065 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12066 (build-system python-build-system)
12067 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 12068 (propagated-inputs
45dda35e
SB
12069 `(("python-gevent" ,python-gevent)
12070 ("python-kazoo" ,python-kazoo)
45dda35e
SB
12071 ("python-tabulate" ,python-tabulate)))
12072 (inputs
12073 `(("librdkafka" ,librdkafka)))
12074 (home-page "https://pykafka.readthedocs.io/")
12075 (synopsis "Apache Kafka client for Python")
12076 (description
12077 "PyKafka is a client for the Apache Kafka distributed messaging system.
12078It includes Python implementations of Kafka producers and consumers, which
12079are optionally backed by a C extension built on librdkafka.")
3f641af0 12080 (license license:asl2.0)))
45dda35e
SB
12081
12082(define-public python2-pykafka
12083 (package-with-python2 python-pykafka))
a44fd439
DM
12084
12085(define-public python-wcwidth
12086 (package
12087 (name "python-wcwidth")
9e59478f 12088 (version "0.1.7")
a44fd439
DM
12089 (source
12090 (origin
12091 (method url-fetch)
9e59478f 12092 (uri (pypi-uri "wcwidth" version))
a44fd439
DM
12093 (sha256
12094 (base32
9e59478f 12095 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
a44fd439
DM
12096 (build-system python-build-system)
12097 (home-page "https://github.com/jquast/wcwidth")
66e07664 12098 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
12099 (description "Wcwidth measures the number of terminal column cells of
12100wide-character codes. It is useful for those implementing a terminal emulator,
12101or programs that carefully produce output to be interpreted by one. It is a
12102Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12103specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 12104 (license license:expat)))
a44fd439
DM
12105
12106(define-public python2-wcwidth
f210e944 12107 (package-with-python2 python-wcwidth))
0de78c95
DP
12108
12109(define-public python2-jsonrpclib
12110 (package
12111 (name "python2-jsonrpclib")
12112 (version "0.1.7")
12113 (source (origin
12114 (method url-fetch)
12115 (uri (string-append
12116 "https://pypi.python.org/packages/source/j/jsonrpclib/"
12117 "jsonrpclib-" version ".tar.gz"))
12118 (sha256
12119 (base32
12120 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12121 (build-system python-build-system)
0de78c95
DP
12122 (arguments
12123 `(#:tests? #f
12124 #:python ,python-2))
12125 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12126 (synopsis "Implementation of JSON-RPC specification for Python")
12127 (description
12128 "This library is an implementation of the JSON-RPC specification.
12129It supports both the original 1.0 specification, as well as the
12130new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12131etc.")
3f641af0 12132 (license license:asl2.0)))
9250b0f3
SB
12133
12134(define-public python-chai
12135 (package
12136 (name "python-chai")
12137 (version "1.1.1")
12138 (source (origin
12139 (method url-fetch)
12140 (uri (pypi-uri "chai" version))
12141 (sha256
12142 (base32
12143 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
12144 (build-system python-build-system)
9250b0f3
SB
12145 (home-page "https://github.com/agoragames/chai")
12146 (synopsis "Mocking framework for Python")
12147 (description
12148 "Chai provides an api for mocking, stubbing and spying your python
12149objects, patterned after the Mocha library for Ruby.")
3f641af0 12150 (license license:bsd-3)))
9250b0f3
SB
12151
12152(define-public python2-chai
12153 (package-with-python2 python-chai))
12154
ae43baa8
SB
12155(define-public python-arrow
12156 (package
12157 (name "python-arrow")
79cb661f 12158 (version "0.10.0")
ae43baa8
SB
12159 (source (origin
12160 (method url-fetch)
12161 (uri (pypi-uri "arrow" version))
12162 (sha256
12163 (base32
79cb661f 12164 "08n7q2l69hlainds1byd4lxhwrq7zsw7s640zkqc3bs5jkq0cnc0"))))
ae43baa8
SB
12165 (build-system python-build-system)
12166 (native-inputs
f3b98f4f 12167 `(;; For testing
ae43baa8
SB
12168 ("python-chai" ,python-chai)
12169 ("python-simplejson" ,python-simplejson)))
36aed736 12170 (propagated-inputs
22d7360b 12171 `(("python-dateutil" ,python-dateutil)))
ae43baa8
SB
12172 (home-page "https://github.com/crsmithdev/arrow/")
12173 (synopsis "Dates and times for Python")
12174 (description
12175 "Arrow is a Python library to creating, manipulating, formatting and
12176converting dates, times, and timestamps. It implements and updates the
12177datetime type.")
3f641af0 12178 (license license:asl2.0)))
ae43baa8
SB
12179
12180(define-public python2-arrow
12181 (package-with-python2 python-arrow))
12182
1f2b62a4
SB
12183(define-public python-inflection
12184 (package
12185 (name "python-inflection")
12186 (version "0.3.1")
12187 (source
12188 (origin (method url-fetch)
12189 (uri (pypi-uri "inflection" version))
12190 (sha256
12191 (base32
12192 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12193 (build-system python-build-system)
e9127525
MB
12194 (native-inputs
12195 `(("python-pytest" ,python-pytest)))
7bf837fd 12196 (home-page "https://github.com/jpvanhal/inflection")
1f2b62a4
SB
12197 (synopsis "Python string transformation library")
12198 (description
12199 "Inflection is a string transformation library. It singularizes
12200and pluralizes English words, and transforms strings from CamelCase to
12201underscored string.")
12202 (license license:expat)))
12203
12204(define-public python2-inflection
12205 (package-with-python2 python-inflection))
12206
18995566
SB
12207(define-public python-pylev
12208 (package
12209 (name "python-pylev")
12210 (version "1.3.0")
12211 (source (origin
12212 (method url-fetch)
12213 (uri (pypi-uri "pylev" version))
12214 (sha256
12215 (base32
12216 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12217 (build-system python-build-system)
7bf837fd 12218 (home-page "https://github.com/toastdriven/pylev")
18995566
SB
12219 (synopsis "Levenshtein distance implementation in Python")
12220 (description "Pure Python Levenshtein implementation, based off the
12221Wikipedia code samples at
12222@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 12223 (license license:bsd-3)))
18995566
SB
12224
12225(define-public python2-pylev
12226 (package-with-python2 python-pylev))
12227
f5deff7a
SB
12228(define-public python-cleo
12229 (package
12230 (name "python-cleo")
5eebe8dc 12231 (version "0.6.1")
f5deff7a
SB
12232 (source (origin
12233 (method url-fetch)
12234 (uri (pypi-uri "cleo" version))
12235 (sha256
12236 (base32
5eebe8dc 12237 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
f5deff7a
SB
12238 (build-system python-build-system)
12239 (native-inputs
f3b98f4f 12240 `(;; For testing
f5deff7a 12241 ("python-mock" ,python-mock)
5eebe8dc 12242 ("python-pytest-mock" ,python-pytest-mock)
f5deff7a 12243 ("python-pytest" ,python-pytest)))
9403150a 12244 (propagated-inputs
5eebe8dc
BW
12245 `(("python-backpack" ,python-backpack)
12246 ("python-pastel" ,python-pastel)
9403150a 12247 ("python-pylev" ,python-pylev)))
f5deff7a
SB
12248 (home-page "https://github.com/sdispater/cleo")
12249 (synopsis "Command-line arguments library for Python")
12250 (description
12251 "Cleo allows you to create command-line commands with signature in
12252docstring and colored output.")
12253 (license license:expat)))
12254
12255(define-public python2-cleo
12256 (package-with-python2 python-cleo))
12257
77cadb43
SB
12258(define-public python-lazy-object-proxy
12259 (package
12260 (name "python-lazy-object-proxy")
12261 (version "1.2.2")
12262 (source (origin
12263 (method url-fetch)
12264 (uri (pypi-uri "lazy-object-proxy" version))
12265 (sha256
12266 (base32
12267 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
12268 (build-system python-build-system)
77cadb43
SB
12269 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
12270 (synopsis "Lazy object proxy for python")
12271 (description
12272 "Lazy object proxy is an object that wraps a callable but defers the call
12273until the object is actually required, and caches the result of said call.")
3f641af0 12274 (license license:bsd-2)))
77cadb43
SB
12275
12276(define-public python2-lazy-object-proxy
12277 (package-with-python2 python-lazy-object-proxy))
12278
5477e05f
SB
12279(define-public python-dnspython
12280 (package
12281 (name "python-dnspython")
6c514128 12282 (version "1.15.0")
5477e05f
SB
12283 (source (origin
12284 (method url-fetch)
12285 (uri (string-append "http://www.dnspython.org/kits/"
12286 version "/dnspython-" version ".tar.gz"))
12287 (sha256
12288 (base32
6c514128 12289 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
12290 (build-system python-build-system)
12291 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
12292 (home-page "http://www.dnspython.org")
12293 (synopsis "DNS toolkit for Python")
12294 (description
12295 "dnspython is a DNS toolkit for Python. It supports almost all record
12296types. It can be used for queries, zone transfers, and dynamic updates.
12297It supports TSIG authenticated messages and EDNS0.")
12298 (license license:expat)))
12299
12300(define-public python2-dnspython
12301 (package-with-python2 python-dnspython))
12302
22711e25
SB
12303(define-public python-email-validator
12304 (package
12305 (name "python-email-validator")
b165c215 12306 (version "1.0.2")
22711e25
SB
12307 (source
12308 (origin (method url-fetch)
12309 (uri (pypi-uri "email_validator" version))
12310 (sha256
12311 (base32
b165c215 12312 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
22711e25
SB
12313 (build-system python-build-system)
12314 (arguments
12315 '(#:phases
12316 (modify-phases %standard-phases
12317 (add-before 'build 'use-dnspython
12318 (lambda _
12319 (substitute* "setup.py"
12320 (("dnspython3") "dnspython"))
12321 #t)))))
d42560bd 12322 (propagated-inputs
22711e25 12323 `(("python-dnspython" ,python-dnspython)
d42560bd 12324 ("python-idna" ,python-idna)))
22711e25
SB
12325 (home-page "https://github.com/JoshData/python-email-validator")
12326 (synopsis "Email address validation library for Python")
12327 (description
12328 "This library validates email address syntax and deliverability.")
3f641af0 12329 (license license:cc0)))
22711e25
SB
12330
12331(define-public python2-email-validator
12332 (package-with-python2 python-email-validator))
12333
8987d91e
SB
12334(define-public python-ukpostcodeparser
12335 (package
12336 (name "python-ukpostcodeparser")
12337 (version "1.0.3")
12338 (source (origin
12339 (method url-fetch)
12340 (uri (pypi-uri "UkPostcodeParser" version))
12341 (sha256
12342 (base32
12343 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
12344 (build-system python-build-system)
8987d91e
SB
12345 (home-page "https://github.com/hamstah/ukpostcodeparser")
12346 (synopsis "UK Postcode parser for Python")
12347 (description
12348 "This library provides the @code{parse_uk_postcode} function for
12349parsing UK postcodes.")
12350 (license license:expat)))
12351
12352(define-public python2-ukpostcodeparser
12353 (package-with-python2 python-ukpostcodeparser))
ea92ae01 12354
ce7911dd
MB
12355(define-public python-faker
12356 (package
12357 (name "python-faker")
12358 (version "0.7.9")
12359 (source (origin
12360 (method url-fetch)
12361 (uri (pypi-uri "Faker" version))
12362 (sha256
12363 (base32
12364 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
12365 (patches
12366 (search-patches "python-faker-fix-build-32bit.patch"))
12367 (modules '((guix build utils)))
12368 (snippet
12369 '(begin
12370 (for-each delete-file (find-files "." "\\.pyc$"))
12371 #t))))
12372 (build-system python-build-system)
12373 (arguments
12374 '(#:phases
12375 (modify-phases %standard-phases
12376 (replace 'check
12377 (lambda _
12378 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
12379 (native-inputs
12380 `(;; For testing
12381 ("python-email-validator" ,python-email-validator)
12382 ("python-mock" ,python-mock)
12383 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
12384 (propagated-inputs
12385 `(("python-dateutil" ,python-dateutil)
12386 ("python-six" ,python-six)))
12387 (home-page "https://github.com/joke2k/faker")
12388 (synopsis "Python package that generates fake data")
12389 (description
12390 "Faker is a Python package that generates fake data such as names,
12391addresses, and phone numbers.")
12392 (license license:expat)
12393 (properties `((python2-variant . ,(delay python2-faker))))))
12394
12395(define-public python2-faker
12396 (let ((base (package-with-python2 (strip-python2-variant
12397 python-faker))))
12398 (package
12399 (inherit base)
12400 (propagated-inputs
12401 `(("python2-ipaddress" ,python2-ipaddress)
12402 ,@(package-propagated-inputs base))))))
12403
b49504fd
SB
12404(define-public python-pyaml
12405 (package
12406 (name "python-pyaml")
963926bc 12407 (version "17.7.2")
b49504fd
SB
12408 (source (origin
12409 (method url-fetch)
12410 (uri (pypi-uri "pyaml" version))
12411 (sha256
12412 (base32
963926bc 12413 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
b49504fd 12414 (build-system python-build-system)
f620311a
MB
12415 (native-inputs
12416 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
12417 (propagated-inputs
12418 `(("python-pyyaml" ,python-pyyaml)))
12419 (home-page "https://github.com/mk-fg/pretty-yaml")
12420 (synopsis "YAML pretty-print library for Python")
12421 (description
12422 "pyaml is a PyYAML based python module to produce pretty and readable
12423YAML-serialized data.")
3f641af0 12424 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
12425
12426(define-public python2-pyaml
12427 (package-with-python2 python-pyaml))
12428
04fb4516
BW
12429(define-public python-backpack
12430 (package
12431 (name "python-backpack")
12432 (version "0.1")
12433 (source
12434 (origin
12435 (method url-fetch)
12436 (uri (pypi-uri "backpack" version))
12437 (sha256
12438 (base32
12439 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
12440 (build-system python-build-system)
12441 (native-inputs
12442 `(("python-pytest" ,python-pytest)
12443 ("python-nose" ,python-nose)))
12444 (propagated-inputs
12445 `(("python-simplejson" ,python-simplejson)))
12446 (home-page "https://github.com/sdispater/backpack")
12447 (synopsis "Utilities for working with Python collections")
12448 (description "Backpack provides some useful utilities for working with
12449collections of data.")
12450 (license license:expat)))
12451
12452(define-public python2-backpack
12453 (package-with-python2 python-backpack))
12454
347175a2
SB
12455(define-public python-flexmock
12456 (package
12457 (name "python-flexmock")
12458 (version "0.10.2")
12459 (source (origin
12460 (method url-fetch)
12461 (uri (pypi-uri "flexmock" version))
12462 (sha256
12463 (base32
12464 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
12465 (build-system python-build-system)
347175a2
SB
12466 (home-page "https://flexmock.readthedocs.org")
12467 (synopsis "Testing library for Python")
12468 (description
12469 "flexmock is a testing library for Python that makes it easy to create
12470mocks, stubs and fakes.")
3f641af0 12471 (license license:bsd-3)))
347175a2
SB
12472
12473(define-public python2-flexmock
12474 (package-with-python2 python-flexmock))
12475
f4155188
DM
12476(define-public python-prompt-toolkit
12477 (package
12478 (name "python-prompt-toolkit")
6a34f4cc 12479 (version "1.0.9")
f4155188
DM
12480 (source
12481 (origin
12482 (method url-fetch)
d15e2ef0 12483 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
12484 (sha256
12485 (base32
6a34f4cc 12486 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
f4155188 12487 (build-system python-build-system)
bae18710
LF
12488 (arguments
12489 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
12490 (propagated-inputs
12491 `(("python-wcwidth" ,python-wcwidth)
2c199b55 12492 ("python-six" ,python-six)
f22efa01 12493 ("python-pygments" ,python-pygments)))
f4155188
DM
12494 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
12495 (synopsis "Library for building command line interfaces in Python")
12496 (description
12497 "Prompt-Toolkit is a library for building interactive command line
12498interfaces in Python. It's like GNU Readline but it also features syntax
12499highlighting while typing, out-of-the-box multi-line input editing, advanced
12500code completion, incremental search, support for Chinese double-width
12501characters, mouse support, and auto suggestions.")
f210e944 12502 (license license:bsd-3)))
f4155188
DM
12503
12504(define-public python2-prompt-toolkit
f210e944 12505 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
12506
12507(define-public python-jedi
12508 (package
12509 (name "python-jedi")
12510 (version "0.9.0")
12511 (source
12512 (origin
12513 (method url-fetch)
12514 (uri (pypi-uri "jedi" version))
12515 (sha256
12516 (base32
12517 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
12518 (build-system python-build-system)
bfce8a34
MB
12519 (arguments
12520 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
12521 '(#:tests? #f))
12522 (native-inputs
12523 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
12524 (home-page "https://github.com/davidhalter/jedi")
12525 (synopsis
12526 "Autocompletion for Python that can be used for text editors")
12527 (description
12528 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 12529 (license license:expat)))
a502dfbf
DM
12530
12531(define-public python2-jedi
f210e944 12532 (package-with-python2 python-jedi))
c2f0dc6e
DM
12533
12534(define-public ptpython
12535 (package
12536 (name "ptpython")
12537 (version "0.34")
12538 (source (origin
12539 (method url-fetch)
12540 (uri (pypi-uri "ptpython" version))
12541 (sha256
12542 (base32
12543 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
12544 (build-system python-build-system)
32955348
MB
12545 (arguments
12546 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
f22efa01 12547 (propagated-inputs
c2f0dc6e
DM
12548 `(("python-docopt" ,python-docopt)
12549 ("python-jedi" ,python-jedi)
12550 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 12551 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
12552 (home-page "https://github.com/jonathanslenders/ptpython")
12553 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
12554 (description
12555 "ptpython is a Python read-eval-print loop with IDE-like features.
12556It supports syntax highlighting, multiline editing, autocompletion, mouse,
12557color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
12558etc.")
3f641af0 12559 (license license:bsd-3)
c2f0dc6e
DM
12560 (properties `((python2-variant . ,(delay ptpython-2))))))
12561
12562(define-public ptpython-2
12563 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
12564 (package
12565 (inherit base)
12566 (name "ptpython2"))))
b227f0be 12567
b04a52a6
DJ
12568(define-public python-requests-oauthlib
12569 (package
12570 (name "python-requests-oauthlib")
12571 (version "0.6.2")
12572 (source
12573 (origin
12574 (method url-fetch)
12575 (uri (pypi-uri "requests-oauthlib" version))
12576 (sha256
12577 (base32
12578 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
12579 (build-system python-build-system)
12580 (arguments
12581 `(#:phases
12582 (modify-phases %standard-phases
12583 ;; removes tests that require network access
12584 (add-before 'check 'pre-check
12585 (lambda _
12586 (delete-file "tests/test_core.py")
12587 #t)))))
12588 (native-inputs
12589 `(("python-requests-mock" ,python-requests-mock)
12590 ("python-mock" ,python-mock)))
f22efa01 12591 (propagated-inputs
b04a52a6
DJ
12592 `(("python-oauthlib" ,python-oauthlib)
12593 ("python-requests" ,python-requests)))
12594 (home-page
12595 "https://github.com/requests/requests-oauthlib")
12596 (synopsis
12597 "OAuthlib authentication support for Requests")
12598 (description
12599 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
12600provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 12601 (license license:isc)))
b04a52a6
DJ
12602
12603(define-public python2-requests-oauthlib
f210e944 12604 (package-with-python2 python-requests-oauthlib))
b04a52a6 12605
b227f0be 12606(define-public python-stem
12607 (package
12608 (name "python-stem")
0bb1c35a 12609 (version "1.5.4")
b227f0be 12610 (source
12611 (origin
12612 (method url-fetch)
c976b319 12613 (uri (pypi-uri "stem" version))
b227f0be 12614 (sha256
12615 (base32
0bb1c35a 12616 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
b227f0be 12617 (build-system python-build-system)
12618 (arguments
12619 `(#:phases
12620 (modify-phases %standard-phases
12621 (replace 'check
12622 (lambda _
12623 (zero? (system* "./run_tests.py" "--unit")))))))
12624 (native-inputs
12625 `(("python-mock" ,python-mock)
12626 ("python-pep8" ,python-pep8)
12627 ("python-pyflakes" ,python-pyflakes)))
b227f0be 12628 (home-page "https://stem.torproject.org/")
12629 (synopsis
12630 "Python controller library that allows applications to interact with Tor")
12631 (description
12632 "Stem is a Python controller library for Tor. With it you can use Tor's
12633control protocol to script against the Tor process and read descriptor data
12634relays publish about themselves.")
3f641af0 12635 (license license:lgpl3)))
b227f0be 12636
12637(define-public python2-stem
12638 (package-with-python2 python-stem))
517a6c0c
DM
12639
12640(define-public python-pyserial
12641 (package
12642 (name "python-pyserial")
12643 (version "3.1.1")
12644 (source
12645 (origin
12646 (method url-fetch)
12647 (uri (pypi-uri "pyserial" version))
12648 (sha256
12649 (base32
12650 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
12651 (build-system python-build-system)
0a702009
MB
12652 (arguments
12653 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12654 ;; #:phases
12655 ;; (modify-phases %standard-phases
12656 ;; (replace 'check
12657 ;; (lambda _
12658 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
517a6c0c
DM
12659 (home-page
12660 "https://github.com/pyserial/pyserial")
12661 (synopsis "Python Serial Port Bindings")
12662 (description "@code{pyserial} provide serial port bindings for Python. It
12663supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12664and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 12665 (license license:bsd-3)))
517a6c0c
DM
12666
12667(define-public python2-pyserial
f210e944 12668 (package-with-python2 python-pyserial))
6eb7af2a
DJ
12669
12670(define-public python-kivy
12671 (package
12672 (name "python-kivy")
12673 (version "1.9.1")
12674 (source
12675 (origin
12676 (method url-fetch)
12677 (uri (pypi-uri "kivy" version))
12678 (file-name (string-append name "-" version ".tar.gz"))
12679 (sha256
12680 (base32
12681 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
12682 (build-system python-build-system)
12683 (arguments
12684 `(#:tests? #f ; Tests require many optional packages
12685 #:phases
12686 (modify-phases %standard-phases
12687 (replace 'build (lambda _ (zero? (system* "make" "force"))))
12688 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12689 (lambda* (#:key inputs #:allow-other-keys)
12690 (setenv "KIVY_SDL2_PATH"
12691 (string-append (assoc-ref inputs "sdl-union")
12692 "/include/SDL2"))
12693 #t)))))
12694 (native-inputs
f2516de2
HG
12695 `(("pkg-config" ,pkg-config)
12696 ("python-cython" ,python-cython)))
6eb7af2a 12697 (inputs
f2516de2 12698 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
12699 ("mesa" ,mesa)
12700 ("sdl-union"
12701 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12702 (home-page "http://kivy.org")
12703 (synopsis
12704 "Multitouch application framework")
12705 (description
12706 "A software library for rapid development of
12707hardware-accelerated multitouch applications.")
12708 (license license:expat)))
12709
12710(define-public python2-kivy
12711 (package-with-python2 python-kivy))
12712
12713(define-public python-kivy-next
12714 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
12715 (revision "1"))
12716 (package (inherit python-kivy)
12717 (name "python-kivy-next")
d80a71eb 12718 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
12719 (string-take commit 7)))
12720 (source
12721 (origin
12722 (method git-fetch)
12723 (uri (git-reference
12724 (url "https://github.com/kivy/kivy")
12725 (commit commit)))
12726 (file-name (string-append name "-" version "-checkout"))
12727 (sha256
12728 (base32
12729 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
12730
12731(define-public python2-kivy-next
12732 (package-with-python2 python-kivy-next))
8794bd8b
DC
12733
12734(define-public python-binaryornot
12735 (package
12736 (name "python-binaryornot")
12737 (version "0.4.0")
12738 (source (origin
12739 (method url-fetch)
12740 (uri (pypi-uri "binaryornot" version))
12741 (sha256
12742 (base32
12743 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
12744 (build-system python-build-system)
f22efa01 12745 (propagated-inputs
8794bd8b
DC
12746 `(("python-chardet" ,python-chardet)
12747 ("python-hypothesis" ,python-hypothesis)))
12748 (home-page "https://github.com/audreyr/binaryornot")
12749 (synopsis "Package to check if a file is binary or text")
12750 (description "Ultra-lightweight pure Python package to check if a file is
12751binary or text.")
12752 (license license:bsd-3)
12753 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12754
12755(define-public python2-binaryornot
12756 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12757 (package (inherit base)
f22efa01 12758 (propagated-inputs
8794bd8b 12759 `(("python2-enum34" ,python2-enum34)
f22efa01 12760 ,@(package-propagated-inputs base))))))
a9ac982a
DC
12761
12762(define-public python-nltk
12763 (package
12764 (name "python-nltk")
12765 (version "3.2.1")
12766 (source (origin
12767 (method url-fetch)
12768 (uri (pypi-uri "nltk" version))
12769 (sha256
12770 (base32
12771 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12772 (build-system python-build-system)
59f12985
LF
12773 (arguments
12774 '(;; The tests require some extra resources to be downloaded.
12775 ;; TODO Try packaging these resources.
12776 #:tests? #f))
a9ac982a
DC
12777 (home-page "http://nltk.org/")
12778 (synopsis "Natural Language Toolkit")
12779 (description "It provides interfaces to over 50 corpora and lexical
12780resources such as WordNet, along with a suite of text processing libraries
12781for classification, tokenization, stemming, tagging, parsing, and semantic
12782reasoning, wrappers for natural language processing libraries.")
f210e944 12783 (license license:asl2.0)))
a9ac982a
DC
12784
12785(define-public python2-nltk
f210e944 12786 (package-with-python2 python-nltk))
691cd90d
DC
12787
12788(define-public python-pymongo
12789 (package
12790 (name "python-pymongo")
12791 (version "3.3.0")
12792 (source (origin
12793 (method url-fetch)
12794 (uri (pypi-uri "pymongo" version))
12795 (sha256
12796 (base32
12797 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12798 (build-system python-build-system)
f22efa01 12799 (propagated-inputs
691cd90d 12800 `(("python-certifi" ,python-certifi)))
7bf837fd 12801 (home-page "https://github.com/mongodb/mongo-python-driver")
691cd90d
DC
12802 (synopsis "Python driver for MongoDB")
12803 (description "Python driver for MongoDB.")
f210e944 12804 (license license:asl2.0)))
691cd90d
DC
12805
12806(define-public python2-pymongo
f210e944 12807 (package-with-python2 python-pymongo))
6a6c9d43
DC
12808
12809(define-public python-sh
12810 (package
12811 (name "python-sh")
12812 (version "1.11")
12813 (source (origin
12814 (method url-fetch)
12815 (uri (pypi-uri "sh" version))
12816 (sha256
12817 (base32
12818 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12819 (build-system python-build-system)
12820 (arguments
12821 `(#:tests? #f)) ; no tests
12822 (home-page "https://github.com/amoffat/sh")
12823 (synopsis "Python subprocess interface")
12824 (description "Abstracts process invocation by providing a function
12825interface for programs.")
f210e944 12826 (license license:expat)))
6a6c9d43
DC
12827
12828(define-public python2-sh
f210e944 12829 (package-with-python2 python-sh))
05b59190 12830
25702397
EF
12831(define-public python-consul
12832 (package
12833 (name "python-consul")
12834 (version "0.6.1")
12835 (source
12836 (origin
12837 (method url-fetch)
12838 (uri (pypi-uri "python-consul" version))
12839 (sha256
12840 (base32
12841 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12842 (build-system python-build-system)
12843 (native-inputs
fd1d6de7
HG
12844 `(("python-pytest" ,python-pytest)))
12845 (propagated-inputs
12846 `(("python-requests" ,python-requests)
25702397
EF
12847 ("python-six" ,python-six)))
12848 (home-page "https://github.com/cablehead/python-consul")
12849 (synopsis "Python client for Consul")
12850 (description
12851 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12852discovery, monitoring and configuration.")
12853 (license license:expat)))
12854
12855(define-public python2-consul
f210e944 12856 (package-with-python2 python-consul))
25702397 12857
05b59190
DC
12858(define-public python-schematics
12859 (package
12860 (name "python-schematics")
12861 (version "1.1.1")
12862 (source
12863 (origin
12864 (method url-fetch)
12865 (uri (string-append
12866 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12867 (file-name (string-append name "-" version ".tar.gz"))
12868 (sha256
12869 (base32
12870 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12871 (build-system python-build-system)
f22efa01 12872 (propagated-inputs
05b59190
DC
12873 `(("python-six" ,python-six)))
12874 (arguments
12875 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12876 ; version requirements (eg python-coveralls)
12877 (home-page "https://github.com/schematics/schematics")
12878 (synopsis "Python Data Structures for Humans")
12879 (description "Python Data Structures for Humans.")
f210e944 12880 (license license:bsd-3)))
05b59190
DC
12881
12882(define-public python2-schematics
f210e944 12883 (package-with-python2 python-schematics))
d6907ff7
DC
12884
12885(define-public python-publicsuffix
12886 (package
12887 (name "python-publicsuffix")
12888 (version "1.1.0")
12889 (source (origin
12890 (method url-fetch)
12891 (uri (pypi-uri "publicsuffix" version))
12892 (sha256
12893 (base32
12894 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12895 (build-system python-build-system)
12896 (arguments
12897 `(#:tests? #f)) ; tests use the internet
12898 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12899 (synopsis "Get suffix for a domain name")
12900 (description "Get a public suffix for a domain name using the Public Suffix
12901List.")
f210e944 12902 (license license:expat)))
d6907ff7
DC
12903
12904(define-public python2-publicsuffix
f210e944 12905 (package-with-python2 python-publicsuffix))
b2319996
DC
12906
12907(define-public python-publicsuffix2
12908 (package
12909 (name "python-publicsuffix2")
91862162 12910 (version "2.20160818")
b2319996
DC
12911 (source
12912 (origin
12913 (method url-fetch)
12914 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12915 (sha256
12916 (base32
91862162 12917 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
b2319996 12918 (build-system python-build-system)
10797a0a
LF
12919 (arguments
12920 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
12921 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12922 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12923 (description "Get a public suffix for a domain name using the Public Suffix
12924List. Forked from and using the same API as the publicsuffix package.")
f210e944 12925 (license (list license:expat license:mpl2.0))))
b2319996
DC
12926
12927(define-public python2-publicsuffix2
f210e944 12928 (package-with-python2 python-publicsuffix2))
81f1515d
DC
12929
12930(define-public python-url
12931 (package
12932 (name "python-url")
12933 (version "0.2.0")
12934 (source (origin
12935 (method url-fetch)
12936 (uri (pypi-uri "url" version))
12937 (sha256
12938 (base32
12939 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12940 (build-system python-build-system)
f22efa01 12941 (propagated-inputs
81f1515d
DC
12942 `(("python-publicsuffix" ,python-publicsuffix)))
12943 (native-inputs
12944 `(("python-coverage" ,python-coverage)
12945 ("python-nose" ,python-nose)))
12946 (arguments
12947 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
7bf837fd 12948 (home-page "https://github.com/seomoz/url-py")
81f1515d
DC
12949 (synopsis "URL Parsing")
12950 (description "Library for parsing urls.")
12951 (license license:expat)
12952 (properties `((python2-variant . ,(delay python2-url))))))
12953
12954(define-public python2-url
12955 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12956 (package (inherit base)
f22efa01 12957 (propagated-inputs
f210e944 12958 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
12959
12960(define-public python-freezegun
12961 (package
12962 (name "python-freezegun")
0c315fb3 12963 (version "0.3.8")
974ee2c1
TS
12964 (source
12965 (origin
12966 (method url-fetch)
12967 (uri (pypi-uri "freezegun" version))
12968 (sha256
12969 (base32
0c315fb3 12970 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
974ee2c1
TS
12971 (build-system python-build-system)
12972 (native-inputs
12973 `(("python-mock" ,python-mock)
12974 ("python-nose" ,python-nose)
4e096968 12975 ("python-coverage" ,python-coverage)))
f22efa01 12976 (propagated-inputs
4e096968 12977 `(("python-six" ,python-six)
22d7360b 12978 ("python-dateutil" ,python-dateutil)))
974ee2c1
TS
12979 (arguments
12980 `(#:phases (modify-phases %standard-phases
12981 ;; The tests are normally executed via `make test`, but the PyPi
12982 ;; package does not include the Makefile.
12983 (replace 'check
12984 (lambda _
12985 (zero? (system* "nosetests" "./tests/")))))))
12986 (home-page "https://github.com/spulec/freezegun")
12987 (synopsis "Test utility for mocking the datetime module")
12988 (description
12989 "FreezeGun is a library that allows your python tests to travel through
12990time by mocking the datetime module.")
12991 (license license:asl2.0)))
12992
12993(define-public python2-freezegun
f210e944
HG
12994 (package-with-python2 python-freezegun))
12995
dddcb25c
MB
12996
12997(define-public python-odfpy
12998 (package
12999 (name "python-odfpy")
13000 (version "1.3.3")
13001 (source (origin
13002 (method url-fetch)
13003 (uri (pypi-uri "odfpy" version))
13004 (sha256
13005 (base32
13006 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
13007 (arguments
13008 `(#:modules ((srfi srfi-1)
13009 (guix build python-build-system)
13010 (guix build utils))
13011 #:phases
13012 (modify-phases %standard-phases
13013 (replace 'check
13014 ;; The test runner invokes python2 and python3 for test*.py.
13015 ;; To avoid having both in inputs, we replicate it here.
13016 (lambda _
13017 (every (lambda (test-file)
13018 (zero? (system* "python" test-file)))
13019 (find-files "tests" "^test.*\\.py$")))))))
13020 (build-system python-build-system)
13021 (home-page "https://github.com/eea/odfpy")
13022 (synopsis "Python API and tools to manipulate OpenDocument files")
13023 (description "Collection of libraries and utility programs written in
13024Python to manipulate OpenDocument 1.2 files.")
13025 (license
13026 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
13027 ;; number of files with other licenses.
13028 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
13029
13030(define-public python2-odfpy
13031 (package-with-python2 python-odfpy))
b30565bd
MB
13032
13033(define-public python-cachecontrol
13034 (package
13035 (name "python-cachecontrol")
13036 (version "0.11.6")
13037 (source
13038 (origin
13039 (method url-fetch)
13040 ;; Pypi does not have tests.
13041 (uri (string-append
13042 "https://github.com/ionrock/cachecontrol/archive/v"
13043 version ".tar.gz"))
13044 (file-name (string-append name "-" version ".tar.gz"))
13045 (sha256
13046 (base32
13047 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
13048 (build-system python-build-system)
13049 (arguments
13050 `(#:phases
13051 (modify-phases %standard-phases
13052 (replace 'check
13053 (lambda _
13054 ;; Drop test that requires internet access.
13055 (delete-file "tests/test_regressions.py")
13056 (setenv "PYTHONPATH"
13057 (string-append (getcwd) "/build/lib:"
13058 (getenv "PYTHONPATH")))
13059 (zero? (system* "py.test" "-vv")))))))
13060 (native-inputs
13061 `(("python-pytest" ,python-pytest)
13062 ("python-redis" ,python-redis)
13063 ("python-webtest" ,python-webtest)
13064 ("python-mock" ,python-mock)))
13065 (propagated-inputs
13066 `(("python-requests" ,python-requests)
13067 ("python-lockfile" ,python-lockfile)))
13068 (home-page "https://github.com/ionrock/cachecontrol")
13069 (synopsis "The httplib2 caching algorithms for use with requests")
13070 (description "CacheControl is a port of the caching algorithms in
13071@code{httplib2} for use with @code{requests} session objects.")
f210e944 13072 (license license:asl2.0)))
b30565bd
MB
13073
13074(define-public python2-cachecontrol
f210e944 13075 (package-with-python2 python-cachecontrol))
243db824
DM
13076
13077(define-public python-lit
13078 (package
13079 (name "python-lit")
13080 (version "0.5.0")
13081 (source
13082 (origin
13083 (method url-fetch)
13084 (uri (pypi-uri "lit" version))
13085 (sha256
13086 (base32
13087 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
13088 (build-system python-build-system)
13089 (home-page "http://llvm.org/")
13090 (synopsis "LLVM Software Testing Tool")
13091 (description "@code{lit} is a portable tool for executing LLVM and Clang
13092style test suites, summarizing their results, and providing indication of
13093failures.")
f210e944 13094 (license license:ncsa)))
243db824
DM
13095
13096(define-public python2-lit
f210e944 13097 (package-with-python2 python-lit))
66f95b20
MB
13098
13099(define-public python-pytest-pep8
13100 (package
13101 (name "python-pytest-pep8")
13102 (version "1.0.6")
13103 (source (origin
13104 (method url-fetch)
13105 (uri (pypi-uri "pytest-pep8" version))
13106 (sha256
13107 (base32
13108 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
13109 (build-system python-build-system)
13110 (arguments
b41a05ce 13111 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
13112 (native-inputs
13113 `(("python-pytest" ,python-pytest)))
13114 (propagated-inputs
13115 `(("python-pep8" ,python-pep8)))
13116 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
13117 (synopsis "Py.test plugin to check PEP8 requirements")
13118 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 13119 (license license:expat)))
66f95b20
MB
13120
13121(define-public python2-pytest-pep8
f210e944 13122 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
13123
13124(define-public python-pytest-flakes
13125 (package
13126 (name "python-pytest-flakes")
13127 (version "1.0.1")
13128 (source (origin
13129 (method url-fetch)
13130 (uri (pypi-uri "pytest-flakes" version))
13131 (sha256
13132 (base32
13133 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
13134 (build-system python-build-system)
13135 (arguments
b41a05ce 13136 `(#:phases
df94a6b5
MB
13137 (modify-phases %standard-phases
13138 (delete 'check)
13139 (add-after 'install 'check
05c2fd36
HG
13140 (lambda* (#:key outputs inputs #:allow-other-keys)
13141 ;; It's easier to run tests after install.
13142 ;; Make installed package available for running the tests
13143 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
13144 (zero? (system* "py.test" "-vv")))))))
13145 (native-inputs
13146 `(("python-coverage" ,python-coverage)
13147 ("python-pytest" ,python-pytest)
13148 ("python-pytest-cache" ,python-pytest-cache)
13149 ("python-pytest-pep8" ,python-pytest-pep8)))
13150 (propagated-inputs
13151 `(("python-pyflakes" ,python-pyflakes)))
13152 (home-page "https://github.com/fschulze/pytest-flakes")
13153 (synopsis "Py.test plugin to check source code with pyflakes")
13154 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 13155 (license license:expat)))
df94a6b5
MB
13156
13157(define-public python2-pytest-flakes
f210e944 13158 (package-with-python2 python-pytest-flakes))
5467ea62
MB
13159
13160(define-public python-natsort
13161 (package
13162 (name "python-natsort")
a06cd95a 13163 (version "5.0.2")
5467ea62
MB
13164 (source (origin
13165 (method url-fetch)
13166 (uri (pypi-uri "natsort" version))
13167 (sha256
13168 (base32
a06cd95a 13169 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
5467ea62
MB
13170 (build-system python-build-system)
13171 (arguments
13172 `(#:phases
13173 (modify-phases %standard-phases
13174 (add-before 'check 'set-cachedir
13175 ;; Tests require write access to $HOME by default
13176 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
13177 (native-inputs
13178 `(("python-hypothesis" ,python-hypothesis)
13179 ("python-pytest-cache" ,python-pytest-cache)
13180 ("python-pytest-cov" ,python-pytest-cov)
13181 ("python-pytest-flakes" ,python-pytest-flakes)
13182 ("python-pytest-pep8" ,python-pytest-pep8)))
13183 (propagated-inputs ; TODO: Add python-fastnumbers.
13184 `(("python-pyicu" ,python-pyicu)))
13185 (home-page "https://github.com/SethMMorton/natsort")
13186 (synopsis "Natural sorting for python and shell")
13187 (description
13188 "Natsort lets you apply natural sorting on lists instead of
13189lexicographical. If you use the built-in @code{sorted} method in python
13190on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
13191returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
13192function @code{natsorted} that identifies numbers and sorts them separately
13193from strings. It can also sort version numbers, real numbers, mixed types
13194and more, and comes with a shell command @command{natsort} that exposes this
13195functionality in the command line.")
13196 (license license:expat)
13197 (properties `((python2-variant . ,(delay python2-natsort))))))
13198
13199(define-public python2-natsort
13200 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
13201 (package (inherit base)
13202 (native-inputs
00e10c6e 13203 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
13204 ("python2-mock" ,python2-mock)
13205 ("python2-enum34" ,python2-enum34)
13206 ,@(package-native-inputs base))))))
4efb9c54
SR
13207
13208(define-public python-glances
13209 (package
13210 (name "python-glances")
13211 (version "2.7.1")
13212 (source
13213 (origin
13214 (method url-fetch)
13215 (uri (pypi-uri "Glances" version))
13216 (sha256
13217 (base32
13218 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
13219 (build-system python-build-system)
f22efa01 13220 (propagated-inputs
4efb9c54
SR
13221 `(("python-psutil" ,python-psutil)))
13222 (home-page
13223 "https://github.com/nicolargo/glances")
13224 (synopsis
13225 "A cross-platform curses-based monitoring tool")
13226 (description
13227 "Glances is a curses-based monitoring tool for a wide variety of platforms.
13228Glances uses the PsUtil library to get information from your system. It monitors
13229CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 13230 (license license:lgpl3+)))
4efb9c54
SR
13231
13232(define-public python2-glances
f210e944 13233 (package-with-python2 python-glances))
05b7a593
EF
13234
13235(define-public python-graphql-core
13236 (package
13237 (name "python-graphql-core")
13238 (version "0.5.3")
13239 (source
13240 (origin
13241 (method url-fetch)
13242 (uri (pypi-uri "graphql-core" version))
13243 (sha256
13244 (base32
13245 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
13246 (build-system python-build-system)
13247 (arguments
326f8285
LF
13248 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
13249 #:phases
05b7a593
EF
13250 (modify-phases %standard-phases
13251 (add-after 'unpack 'patch-hardcoded-version
13252 (lambda _ (substitute*
13253 "setup.py"
13254 (("'gevent==1.1rc1'") "'gevent'"))
13255 #t)))))
13256 (native-inputs
13257 `(("python-gevent" ,python-gevent)
13258 ("python-mock" ,python-mock)
13259 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 13260 (propagated-inputs
05b7a593
EF
13261 `(("python-promise" ,python-promise)
13262 ("python-six" ,python-six)))
13263 (home-page "https://github.com/graphql-python/graphql-core")
13264 (synopsis "GraphQL implementation for Python")
13265 (description
13266 "GraphQL implementation for Python. GraphQL is a data query language and
13267runtime designed and used to request and deliver data to mobile and web apps.
13268This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
13269to Python.")
05b7a593
EF
13270 (license license:expat)))
13271
13272(define-public python2-graphql-core
f210e944 13273 (package-with-python2 python-graphql-core))
7ee51575
EF
13274
13275(define-public python-graphql-relay
13276 (package
13277 (name "python-graphql-relay")
b13a5b4d 13278 (version "0.4.5")
7ee51575
EF
13279 (source
13280 (origin
13281 (method url-fetch)
13282 (uri (pypi-uri "graphql-relay" version))
13283 (sha256
13284 (base32
b13a5b4d 13285 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
7ee51575
EF
13286 (build-system python-build-system)
13287 (native-inputs
13288 `(("python-pytest" ,python-pytest)))
f22efa01 13289 (propagated-inputs
7ee51575
EF
13290 `(("python-graphql-core" ,python-graphql-core)
13291 ("python-promise" ,python-promise)
13292 ("python-six" ,python-six)))
13293 (home-page "https://github.com/graphql-python/graphql-relay-py")
13294 (synopsis "Relay implementation for Python")
13295 (description
13296 "This is a library to allow the easy creation of Relay-compliant servers
13297using the GraphQL Python reference implementation of a GraphQL server. It
13298should be noted that the code is a exact port of the original
13299@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
13300from Facebook.")
7ee51575
EF
13301 (license license:expat)))
13302
13303(define-public python2-graphql-relay
f210e944 13304 (package-with-python2 python-graphql-relay))
ddc63a56
EF
13305
13306(define-public python-graphene
13307 (package
13308 (name "python-graphene")
13309 (version "0.10.2")
13310 (source
13311 (origin
13312 (method url-fetch)
13313 (uri (pypi-uri "graphene" version))
13314 (sha256
13315 (base32
13316 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
13317 (build-system python-build-system)
f22efa01 13318 (propagated-inputs
ddc63a56
EF
13319 `(("python-graphql-core" ,python-graphql-core)
13320 ("python-graphql-relay" ,python-graphql-relay)
13321 ("python-iso8601" ,python-iso8601)
13322 ("python-promise" ,python-promise)
13323 ("python-six" ,python-six)))
2b1b2799
TGR
13324 (arguments
13325 `(#:tests? #f)) ; no tests/ in the PyPI tarball
ddc63a56
EF
13326 (home-page "http://graphene-python.org/")
13327 (synopsis "GraphQL Framework for Python")
13328 (description
13329 "Graphene is a Python library for building GraphQL schemas/types.
13330A GraphQL schema describes your data model, and provides a GraphQL server
13331with an associated set of resolve methods that know how to fetch data.")
13332 (properties `((python2-variant . ,(delay python2-graphene))))
13333 (license license:expat)))
13334
13335(define-public python2-graphene
13336 (let ((base (package-with-python2
13337 (strip-python2-variant python-graphene))))
13338 (package (inherit base)
13339 (native-inputs
00e10c6e 13340 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 13341 ,@(package-native-inputs base))))))
d488d5d6
EF
13342
13343(define-public python-nautilus
13344 (package
13345 (name "python-nautilus")
13346 (version "0.4.9")
13347 (source
13348 (origin
13349 (method url-fetch)
13350 (uri (pypi-uri "nautilus" version))
13351 (sha256
13352 (base32
13353 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
13354 (build-system python-build-system)
13355 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 13356 (propagated-inputs
d488d5d6
EF
13357 `(("python-bcrypt" ,python-bcrypt)
13358 ("python-click" ,python-click)
13359 ("python-consul" ,python-consul)
d488d5d6
EF
13360 ("python-graphene" ,python-graphene)
13361 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
13362 ("python-peewee" ,python-peewee)
13363 ("python-pika" ,python-pika)
d488d5d6
EF
13364 ("python-tornado" ,python-tornado)
13365 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
13366 (native-inputs
13367 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
13368 (home-page "https://github.com/AlecAivazis/nautilus")
13369 (synopsis "Library for creating microservice applications")
13370 (description
13371 "Nautilus is a framework for flux based microservices that looks to
13372provide extendible implementations of common aspects of a cloud so that you can
13373focus on building massively scalable web applications.")
13374 (license license:expat)))
94cffc63 13375
89cd988b
DM
13376(define-public python-snowballstemmer
13377 (package
13378 (name "python-snowballstemmer")
13379 (version "1.2.1")
13380 (source (origin
1bd858cc
MB
13381 (method url-fetch)
13382 (uri (pypi-uri "snowballstemmer" version))
13383 (sha256
13384 (base32
13385 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
89cd988b
DM
13386 (build-system python-build-system)
13387 (arguments
13388 `(;; No tests exist
13389 #:tests? #f))
13390 (home-page "https://github.com/shibukawa/snowball_py")
13391 (synopsis "Snowball stemming library collection for Python")
13392 (description "This package provides 16 word stemmer algorithms generated
13393from Snowball algorithms. It includes the 15 original ones plus the Poerter
13394English stemmer.")
13395 (license license:bsd-3)))
13396
13397(define-public python2-snowballstemmer
13398 (package-with-python2 python-snowballstemmer))
13399
754bfd70
DM
13400(define-public python-sphinx-cloud-sptheme
13401 (package
13402 (name "python-sphinx-cloud-sptheme")
5095bc7d 13403 (version "1.8.0")
754bfd70 13404 (source (origin
1bd858cc
MB
13405 (method url-fetch)
13406 (uri (pypi-uri "cloud_sptheme" version))
13407 (sha256
13408 (base32
5095bc7d 13409 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
1bd858cc 13410 (build-system python-build-system)
a31e2f1a
MB
13411 ;; FIXME: The 'pypi' release archive does not contain tests.
13412 (arguments '(#:tests? #f))
1bd858cc
MB
13413 (native-inputs
13414 `(("python-sphinx" ,python-sphinx)))
13415 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
13416 (synopsis "'Cloud' theme for Sphinx documenter")
13417 (description "This package contains the \"Cloud\" theme for Sphinx and some
754bfd70 13418related extensions.")
1bd858cc 13419 (license license:bsd-3)))
754bfd70
DM
13420
13421(define-public python2-sphinx-cloud-sptheme
13422 (package-with-python2 python-sphinx-cloud-sptheme))
13423
807a5b32
DM
13424(define-public python-sphinx-alabaster-theme
13425 (package
13426 (name "python-sphinx-alabaster-theme")
13427 (version "0.7.9")
1bd858cc
MB
13428 (source (origin
13429 (method url-fetch)
13430 (uri (pypi-uri "alabaster" version))
13431 (sha256
13432 (base32
13433 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
807a5b32
DM
13434 (build-system python-build-system)
13435 (propagated-inputs
13436 `(("python-pygments" ,python-pygments)))
13437 (home-page "https://alabaster.readthedocs.io/")
13438 (synopsis "Configurable sidebar-enabled Sphinx theme")
13439 (description "Alabaster is a visually (c)lean, responsive, configurable
13440theme for the Sphinx documentation system. It's the default theme of Sphinx.")
13441 (license license:bsd-3)))
13442
13443(define-public python2-sphinx-alabaster-theme
13444 (package-with-python2 python-sphinx-alabaster-theme))
13445
66d3f50a
LF
13446(define-public python-betamax
13447 (package
13448 (name "python-betamax")
13449 (version "0.8.0")
13450 (source
13451 (origin
13452 (method url-fetch)
13453 (uri (pypi-uri "betamax" version))
13454 (sha256
13455 (base32
13456 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
13457 (build-system python-build-system)
13458 (arguments
13459 '(;; Many tests fail because they require networking.
13460 #:tests? #f))
c415f763 13461 (propagated-inputs
66d3f50a
LF
13462 `(("python-requests" ,python-requests)))
13463 (home-page "https://github.com/sigmavirus24/betamax")
13464 (synopsis "Record HTTP interactions with python-requests")
13465 (description "Betamax will record your test suite's HTTP interactions and
13466replay them during future tests. It is designed to work with python-requests.")
f210e944 13467 (license license:expat)))
66d3f50a
LF
13468
13469(define-public python2-betamax
f210e944 13470 (package-with-python2 python-betamax))
ca0635b4 13471
1eb6b724
OP
13472(define-public python-betamax-matchers
13473 (package
13474 (name "python-betamax-matchers")
13475 (version "0.4.0")
13476 (source
13477 (origin
13478 (method url-fetch)
13479 (uri (pypi-uri "betamax-matchers" version))
13480 (sha256
13481 (base32
13482 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
13483 (build-system python-build-system)
13484 (propagated-inputs
13485 `(("python-betamax" ,python-betamax)
13486 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13487 (home-page "https://github.com/sigmavirus24/betamax_matchers")
13488 (synopsis "VCR imitation for python-requests")
13489 (description "@code{betamax-matchers} provides a set of Matchers for
13490Betamax.")
13491 (license license:asl2.0)))
13492
13493(define-public python2-betamax-matchers
13494 (package-with-python2 python-betamax-matchers))
13495
94cffc63
LF
13496(define-public python-s3transfer
13497 (package
13498 (name "python-s3transfer")
46841c07 13499 (version "0.1.11")
94cffc63
LF
13500 (source (origin
13501 (method url-fetch)
13502 (uri (pypi-uri "s3transfer" version))
13503 (sha256
13504 (base32
46841c07 13505 "0yfrfnf404cxzn3iswibqjxklsl0b1lwgqiml6pwiqj79a7zbwbn"))))
94cffc63 13506 (build-system python-build-system)
fad8bf97
LF
13507 (arguments
13508 `(#:phases
13509 (modify-phases %standard-phases
13510 (replace 'check
13511 (lambda _
13512 ;; 7 of the 'integration' tests require network access or login
13513 ;; credentials.
13514 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 13515 (native-inputs
fad8bf97
LF
13516 `(("python-docutils" ,python-docutils)
13517 ("python-mock" ,python-mock)
13518 ("python-nose" ,python-nose)))
f22efa01 13519 (propagated-inputs
94cffc63
LF
13520 `(("python-botocore" ,python-botocore)))
13521 (synopsis "Amazon S3 Transfer Manager")
13522 (description "S3transfer is a Python library for managing Amazon S3
13523transfers.")
13524 (home-page "https://github.com/boto/s3transfer")
13525 (license license:asl2.0)
13526 (properties `((python2-variant . ,(delay python2-s3transfer))))))
13527
13528(define-public python2-s3transfer
13529 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
13530 (package
13531 (inherit base)
13532 (native-inputs
13533 `(("python2-futures" ,python2-futures)
94cffc63 13534 ,@(package-native-inputs base))))))
8ab59181
HG
13535
13536(define-public python-setproctitle
13537(package
13538 (name "python-setproctitle")
13539 (version "1.1.10")
13540 (source
13541 (origin
13542 (method url-fetch)
13543 (uri (pypi-uri "setproctitle" version))
13544 (sha256
13545 (base32
13546 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
13547 (build-system python-build-system)
13548 (arguments
13549 '(#:phases
13550 (modify-phases %standard-phases
13551 (add-before 'check 'patch-Makefile
13552 ;; Stricly this is only required for the python2 variant.
13553 ;; But adding a phase in an inherited package seems to be
13554 ;; cumbersum. So we patch even for python3.
13555 (lambda _
13556 (let ((nose (assoc-ref %build-inputs "python2-nose")))
13557 (when nose
13558 (substitute* "Makefile"
13559 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
13560 (string-append nose "/bin/nosetests "))))
13561 #t)))
13562 (replace 'check
13563 (lambda _
13564 (setenv "PYTHON" (or (which "python3") (which "python")))
13565 (setenv "PYCONFIG" (or (which "python3-config")
13566 (which "python-config")))
13567 (setenv "CC" "gcc")
13568 ;; No need to extend PYTHONPATH to find the built package, since
13569 ;; the Makefile will build anyway
13570 (zero? (system* "make" "check")))))))
13571 (native-inputs
13572 `(("procps" ,procps))) ; required for tests
13573 (home-page
13574 "https://github.com/dvarrazzo/py-setproctitle")
13575 (synopsis
13576 "Setproctitle implementation for Python to customize the process title")
13577 (description "The library allows a process to change its title (as displayed
13578by system tools such as ps and top).
13579
13580Changing the title is mostly useful in multi-process systems, for
13581example when a master process is forked: changing the children's title
13582allows to identify the task each process is busy with. The technique
13583is used by PostgreSQL and the OpenSSH Server for example.")
13584 (license license:bsd-3)
13585 (properties `((python2-variant . ,(delay python2-setproctitle))))))
13586
13587(define-public python2-setproctitle
13588 (let ((base (package-with-python2
13589 (strip-python2-variant python-setproctitle))))
13590 (package
13591 (inherit base)
13592 (native-inputs `(("python2-nose" ,python2-nose)
13593 ,@(package-native-inputs base))))))
162e42d8
HG
13594
13595(define-public python-validictory
13596 (package
13597 (name "python-validictory")
13598 (version "1.0.1")
13599 (source
13600 (origin
13601 (method url-fetch)
13602 (uri (pypi-uri "validictory" version))
13603 (sha256
13604 (base32
13605 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
13606 (build-system python-build-system)
13607 (arguments
13608 '(#:phases
13609 (modify-phases %standard-phases
13610 (add-after 'unpack 'bootstrap
13611 ;; Move the tests out of the package directory to avoid
13612 ;; packaging them.
13613 (lambda* _
13614 (rename-file "validictory/tests" "tests")
13615 (delete-file "tests/__init__.py")))
13616 (replace 'check
13617 (lambda _
13618 ;; Extend PYTHONPATH so the built package will be found.
13619 (setenv "PYTHONPATH"
13620 (string-append (getcwd) "/build/lib:"
13621 (getenv "PYTHONPATH")))
13622 (zero? (system* "py.test" "-vv" )))))))
13623 (native-inputs
13624 `(("python-pytest" ,python-pytest)))
13625 (home-page
13626 "https://github.com/jamesturk/validictory")
13627 (synopsis "General purpose Python data validator")
13628 (description "It allows validation of arbitrary Python data structures.
13629
13630The schema format is based on the JSON Schema
13631proposal (http://json-schema.org), so combined with json the library is also
13632useful as a validator for JSON data.")
f210e944 13633 (license license:expat)))
162e42d8
HG
13634
13635(define-public python2-validictory
f210e944 13636 (package-with-python2 python-validictory))
0990edfe
DM
13637
13638(define-public python-aniso8601
13639 (package
13640 (name "python-aniso8601")
64791fae 13641 (version "1.3.0")
0990edfe
DM
13642 (source
13643 (origin
13644 (method url-fetch)
13645 (uri (pypi-uri "aniso8601" version))
13646 (sha256
13647 (base32
64791fae 13648 "1waj54iv3n3lw1fapbz8a93yjgrybgpc86wif5baxdh1arpj9df3"))))
0990edfe
DM
13649 (build-system python-build-system)
13650 (propagated-inputs
22d7360b 13651 `(("python-dateutil" ,python-dateutil)))
0990edfe
DM
13652 (home-page
13653 "https://bitbucket.org/nielsenb/aniso8601")
13654 (synopsis
13655 "Python library for parsing ISO 8601 strings")
13656 (description
13657 "This package contains a library for parsing ISO 8601 datetime strings.")
13658 (license license:bsd-3)))
999d964d 13659
cb95e5e5
CR
13660(define-public python2-aniso8601
13661 (package-with-python2 python-aniso8601))
13662
999d964d
DM
13663(define-public python-flask-restful
13664 (package
13665 (name "python-flask-restful")
13666 (version "0.3.5")
13667 (source
13668 (origin
13669 (method url-fetch)
13670 (uri (pypi-uri "Flask-RESTful" version))
13671 (sha256
13672 (base32
13673 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
13674 (build-system python-build-system)
13675 (propagated-inputs
13676 `(("python-aniso8601" ,python-aniso8601)
13677 ("python-flask" ,python-flask)
13678 ("python-pycrypto" ,python-pycrypto)
13679 ("python-pytz" ,python-pytz)))
13680 (native-inputs
13681 `(;; Optional dependency of Flask. Tests need it.
13682 ("python-blinker" ,python-blinker)
13683 ("python-mock" ,python-mock) ; For tests
13684 ("python-nose" ,python-nose) ; For tests
13685 ("python-sphinx" ,python-sphinx)))
13686 (home-page
13687 "https://www.github.com/flask-restful/flask-restful/")
13688 (synopsis
13689 "Flask module for creating REST APIs")
13690 (description
13691 "This package contains a Flask module for creating REST APIs.")
13692 (license license:bsd-3)))
31288222
DM
13693
13694(define-public python-flask-basicauth
13695 (package
13696 (name "python-flask-basicauth")
13697 (version "0.2.0")
13698 (source
13699 (origin
13700 (method url-fetch)
13701 (uri (pypi-uri "Flask-BasicAuth" version))
13702 (sha256
13703 (base32
13704 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
13705 (build-system python-build-system)
13706 (propagated-inputs
13707 `(("python-flask" ,python-flask)))
13708 (home-page
13709 "https://github.com/jpvanhal/flask-basicauth")
13710 (synopsis
13711 "HTTP basic access authentication for Flask")
13712 (description
13713 "This package provides HTTP basic access authentication for Flask.")
13714 (license license:bsd-3)))
903276d0
DM
13715
13716(define-public python-flask-sqlalchemy
13717 (package
13718 (name "python-flask-sqlalchemy")
13719 (version "2.1")
13720 (source
13721 (origin
13722 (method url-fetch)
13723 (uri (pypi-uri "Flask-SQLAlchemy" version))
13724 (sha256
13725 (base32
13726 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
13727 (build-system python-build-system)
13728 (propagated-inputs
13729 `(("python-flask" ,python-flask)
13730 ("python-sqlalchemy" ,python-sqlalchemy)))
13731 (home-page
7bf837fd 13732 "https://github.com/mitsuhiko/flask-sqlalchemy")
903276d0
DM
13733 (synopsis
13734 "Module adding SQLAlchemy support to your Flask application")
13735 (description
13736 "This package adds SQLAlchemy support to your Flask application.")
13737 (license license:bsd-3)))
329b4b3b
LF
13738
13739(define-public python-pyev
13740 (package
13741 (name "python-pyev")
13742 (version "0.9.0")
13743 (source
13744 (origin
13745 (method url-fetch)
13746 (uri (pypi-uri "pyev" version))
13747 (sha256
13748 (base32
13749 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13750 (build-system python-build-system)
13751 (arguments
13752 `(#:tests? #f ; no test suite
13753 #:phases
13754 (modify-phases %standard-phases
13755 (add-after 'unpack 'patch
13756 (lambda* (#:key inputs #:allow-other-keys)
13757 (let ((libev (string-append (assoc-ref inputs "libev")
13758 "/lib/libev.so.4")))
13759 (substitute* "setup.py"
13760 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13761 (string-append "libev_dll_name = \"" libev "\"")))))))))
13762 (inputs
13763 `(("libev" ,libev)))
13764 (home-page "http://pythonhosted.org/pyev/")
13765 (synopsis "Python libev interface")
13766 (description "Pyev provides a Python interface to libev.")
13767 (license license:gpl3)))
13768
13769(define-public python2-pyev
13770 (package-with-python2 python-pyev))
45b4f127
DM
13771
13772(define-public python-imagesize
13773 (package
13774 (name "python-imagesize")
13775 (version "0.7.1")
13776 (source
13777 (origin
13778 (method url-fetch)
13779 (uri (pypi-uri "imagesize" version))
13780 (sha256
13781 (base32
13782 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
13783 (build-system python-build-system)
9422c98a
LF
13784 (arguments
13785 '(;; Test files are not distributed on PyPi:
13786 ;; https://github.com/shibukawa/imagesize_py/issues/7
13787 #:tests? #f))
45b4f127
DM
13788 (home-page "https://github.com/shibukawa/imagesize_py")
13789 (synopsis "Gets image size of files in variaous formats in Python")
13790 (description
13791 "This package allows determination of image size from
13792PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 13793 (license license:expat)))
45b4f127
DM
13794
13795(define-public python2-imagesize
f210e944 13796 (package-with-python2 python-imagesize))
2f6dd9cd
AI
13797
13798(define-public python-axolotl-curve25519
13799 (package
13800 (name "python-axolotl-curve25519")
13801 (version "0.1")
13802 (source
13803 (origin
13804 (method git-fetch)
13805 (uri (git-reference
5f13bf09 13806 (url "https://github.com/tgalal/python-axolotl-curve25519")
2f6dd9cd
AI
13807 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13808 (file-name (string-append name "-" version "-checkout"))
13809 (sha256
13810 (base32
13811 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13812 (build-system python-build-system)
13813 (arguments
13814 `(;; Prevent creation of the egg. This works around
13815 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13816 #:configure-flags '("--root=/")))
2f6dd9cd
AI
13817 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13818 (synopsis "Python wrapper for curve25519 library")
13819 (description "This is a python wrapper for the curve25519 library
13820with ed25519 signatures. The C code was pulled from
13821libaxolotl-android. At the moment this wrapper is meant for use by
13822python-axolotl.")
13823 (license (list license:gpl3 ; Most files
683cdbf5 13824 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
13825
13826(define-public python2-axolotl-curve25519
13827 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
13828
13829(define-public python-axolotl
13830 (package
13831 (name "python-axolotl")
13832 (version "0.1.35")
13833 (source
13834 (origin
13835 (method url-fetch)
13836 (uri (string-append
13837 "https://github.com/tgalal/python-axolotl/archive/"
13838 version ".tar.gz"))
13839 (file-name (string-append name "-" version ".tar.gz"))
13840 (sha256
13841 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13842 (build-system python-build-system)
13843 (arguments
13844 `(#:phases
13845 (modify-phases %standard-phases
13846 ;; Don't install tests
13847 (add-before 'install 'remove-tests
13848 (lambda _
13849 (for-each delete-file-recursively
13850 '("axolotl/tests" "build/lib/axolotl/tests"))
01fb9f66 13851 #t)))))
06ff0837
AI
13852 (propagated-inputs
13853 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13854 ("python-dateutil" ,python-dateutil)
13855 ("python-protobuf" ,python-protobuf)
13856 ("python-pycrypto" ,python-pycrypto)))
13857 (home-page "https://github.com/tgalal/python-axolotl")
13858 (synopsis "Python port of libaxolotl-android")
13859 (description "This is a python port of libaxolotl-android. This
13860is a ratcheting forward secrecy protocol that works in synchronous and
13861asynchronous messaging environments.")
13862 (license license:gpl3)))
13863
13864(define-public python2-axolotl
13865 (package-with-python2 python-axolotl))
e2fca490
DM
13866
13867(define-public python-termstyle
13868 (package
13869 (name "python-termstyle")
13870 (version "0.1.11")
13871 (source
13872 (origin
13873 (method url-fetch)
13874 (uri (pypi-uri "termstyle" version))
13875 (sha256
13876 (base32
13877 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13878 (build-system python-build-system)
7917a135
MB
13879 (arguments
13880 '(#:phases
13881 (modify-phases %standard-phases
13882 (replace 'check
13883 (lambda _
13884 (zero? (system* "python" "test3.py")))))))
7bf837fd 13885 (home-page "https://github.com/gfxmonk/termstyle")
e2fca490
DM
13886 (synopsis "Console text coloring for Python")
13887 (description "This package provides console text coloring for Python.")
13888 (license license:bsd-3)))
1e6112d8
DM
13889
13890(define-public python-rednose
13891 (package
13892 (name "python-rednose")
13893 (version "1.2.1")
13894 (source
13895 (origin
13896 (method url-fetch)
13897 (uri (pypi-uri "rednose" version))
13898 (sha256
13899 (base32
13900 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13901 (build-system python-build-system)
13902 (arguments
13903 `(#:phases
13904 (modify-phases %standard-phases
13905 (add-after 'unpack 'fix-deps
13906 (lambda _
13907 ;; See <https://github.com/JBKahn/rednose/issues/12>
13908 (substitute* "setup.py"
13909 (("python-termstyle") "termstyle"))
13910 #t)))))
13911 (propagated-inputs
13912 `(("python-colorama" ,python-colorama)
13913 ("python-termstyle" ,python-termstyle)))
13914 (native-inputs
13915 `(("python-six" ,python-six)
13916 ("python-nose" ,python-nose)))
13917 (home-page "https://github.com/JBKahn/rednose")
13918 (synopsis "Colored output for Python nosetests")
13919 (description "This package provides colored output for the
13920@command{nosetests} command of the Python Nose unit test framework.")
13921 (license license:bsd-3)))
0a7f17f0 13922
ef74a425
MFM
13923(define-public python2-rednose
13924 (package-with-python2 python-rednose))
13925
0a7f17f0
DM
13926(define-public python-flask-restplus
13927 (package
13928 (name "python-flask-restplus")
13929 (version "0.9.2")
13930 (source
13931 (origin
13932 (method url-fetch)
13933 (uri (pypi-uri "flask-restplus" version))
13934 (sha256
13935 (base32
13936 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13937 (build-system python-build-system)
59f74825
MB
13938 (arguments
13939 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13940 ;; #:phases
13941 ;; (modify-phases %standard-phases
13942 ;; (replace 'check
13943 ;; (lambda _
13944 ;; (zero? (system* "nosetests")))))))
0a7f17f0
DM
13945 (propagated-inputs
13946 `(("python-aniso8601" ,python-aniso8601)
13947 ("python-flask" ,python-flask)
13948 ("python-jsonschema" ,python-jsonschema)
13949 ("python-pytz" ,python-pytz)
13950 ("python-six" ,python-six)))
13951 (native-inputs
13952 `(("python-tzlocal" ,python-tzlocal)
13953 ("python-blinker" ,python-blinker)
13954 ("python-nose" ,python-nose)
13955 ("python-rednose" ,python-rednose)))
13956 (home-page "https://github.com/noirbizarre/flask-restplus")
13957 (synopsis "Framework for documented API development with Flask")
13958 (description "This package provides a framework for API development with
13959the Flask web framework in Python. It is similar to package
13960@code{python-flask-restful} but supports the @code{python-swagger}
13961documentation builder.")
13962 (license license:expat)))
1ed21519
DM
13963
13964(define-public python-sadisplay
13965 (package
13966 (name "python-sadisplay")
13967 (version "0.4.6")
13968 (source
13969 (origin
13970 (method url-fetch)
13971 (uri (pypi-uri "sadisplay" version))
13972 (sha256
13973 (base32
13974 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13975 (build-system python-build-system)
13976 (propagated-inputs
13977 `(("python-sqlalchemy" ,python-sqlalchemy)))
13978 (native-inputs
13979 `(("python-nose" ,python-nose)))
13980 (home-page "https://bitbucket.org/estin/sadisplay")
13981 (synopsis "SQLAlchemy schema displayer")
13982 (description "This package provides a program to build Entity
13983Relationship diagrams from a SQLAlchemy model (or directly from the
13984database).")
13985 (license license:bsd-3)))
13986
13987(define-public python2-sadisplay
13988 (package-with-python2 python-sadisplay))
444a79b6
DM
13989
13990(define-public python-flask-restful-swagger
13991 (package
13992 (name "python-flask-restful-swagger")
13993 (version "0.19")
13994 (source
13995 (origin
13996 (method url-fetch)
13997 (uri (pypi-uri "flask-restful-swagger" version))
13998 (sha256
13999 (base32
14000 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
14001 (build-system python-build-system)
14002 (propagated-inputs
14003 `(("python-flask-restful" ,python-flask-restful)))
14004 (home-page "https://github.com/rantav/flask-restful-swagger")
14005 (synopsis "Extract Swagger specs from Flask-Restful projects")
14006 (description "This package lets you extract Swagger API documentation
14007specs from your Flask-Restful projects.")
14008 (license license:expat)))
14009
14010(define-public python2-flask-restful-swagger
14011 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
14012
14013(define-public python-argcomplete
14014 (package
14015 (name "python-argcomplete")
14016 (version "1.7.0")
14017 (source
14018 (origin
14019 (method url-fetch)
14020 (uri (pypi-uri "argcomplete" version))
14021 (sha256
14022 (base32
14023 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
14024 (build-system python-build-system)
80ce42bd
MB
14025 (native-inputs
14026 `(("python-pexpect" ,python-pexpect)
240d3cef
LC
14027 ("tcsh" ,tcsh)
14028 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
6c2e82bc
TGR
14029 (home-page "https://github.com/kislyuk/argcomplete")
14030 (synopsis "Shell tab completion for Python argparse")
14031 (description "argcomplete provides extensible command line tab completion
14032of arguments and options for Python scripts using @code{argparse}. It's
14033particularly useful for programs with many options or sub-parsers that can
14034dynamically suggest completions; for example, when browsing resources over the
14035network.")
14036 (license license:asl2.0)))
14037
14038(define-public python2-argcomplete
14039 (package-with-python2 python-argcomplete))
361a2fcf
TGR
14040
14041(define-public python-xopen
14042 (package
14043 (name "python-xopen")
14044 (version "0.1.1")
14045 (source
14046 (origin
14047 (method url-fetch)
14048 (uri (pypi-uri "xopen" version))
14049 (sha256
14050 (base32
14051 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
14052 (file-name (string-append name "-" version ".tar.gz"))))
14053 (build-system python-build-system)
14054 (home-page "https://github.com/marcelm/xopen/")
14055 (synopsis "Open compressed files transparently")
14056 (description "This module provides an @code{xopen} function that works like
14057Python's built-in @code{open} function, but can also deal with compressed files.
14058Supported compression formats are gzip, bzip2 and, xz, and are automatically
14059recognized by their file extensions. The focus is on being as efficient as
14060possible on all supported Python versions.")
14061 (license license:expat)))
14062
14063(define-public python2-xopen
14064 (package-with-python2 python-xopen))
8d67610b
DM
14065
14066(define-public python2-cheetah
14067 (package
14068 (name "python2-cheetah")
14069 (version "2.4.4")
14070 (source
14071 (origin
14072 (method url-fetch)
14073 (uri (pypi-uri "Cheetah" version))
14074 (sha256
14075 (base32
14076 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
14077 (build-system python-build-system)
14078 (arguments
14079 `(#:python ,python-2))
14080 (propagated-inputs
14081 `(("python2-markdown" ,python2-markdown)))
14082 (home-page "https://pythonhosted.org/Cheetah/")
14083 (synopsis "Template engine")
14084 (description "Cheetah is a text-based template engine and Python code
14085generator.
14086
14087Cheetah can be used as a standalone templating utility or referenced as
14088a library from other Python applications. It has many potential uses,
14089but web developers looking for a viable alternative to ASP, JSP, PHP and
14090PSP are expected to be its principle user group.
14091
14092Features:
14093@enumerate
14094@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14095 text-based format.
14096@item Cleanly separates content, graphic design, and program code.
14097@item Blends the power and flexibility of Python with a simple template language
14098 that non-programmers can understand.
14099@item Gives template writers full access to any Python data structure, module,
14100 function, object, or method in their templates.
14101@item Makes code reuse easy by providing an object-orientated interface to
14102 templates that is accessible from Python code or other Cheetah templates.
14103 One template can subclass another and selectively reimplement sections of it.
14104@item Provides a simple, yet powerful, caching mechanism that can dramatically
14105 improve the performance of a dynamic website.
14106@item Compiles templates into optimized, yet readable, Python code.
14107@end enumerate")
14108 (license (license:x11-style "file://LICENSE"))))
916aafa4 14109
d83d8722
DM
14110(define-public python-dulwich
14111 (package
14112 (name "python-dulwich")
14113 (version "0.16.3")
14114 (source
14115 (origin
14116 (method url-fetch)
14117 (uri (list (string-append "https://www.dulwich.io/releases/"
14118 "dulwich-" version ".tar.gz")
14119 (pypi-uri "dulwich" version)))
14120 (sha256
14121 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
14122 (build-system python-build-system)
14123 (arguments
14124 `(#:phases
14125 (modify-phases %standard-phases
14126 (add-before 'check 'fix-tests
14127 (lambda* (#:key inputs #:allow-other-keys)
14128 ;; The tests use Popen with a custom environment which doesn't
14129 ;; include PATH.
14130 (substitute* "dulwich/tests/compat/utils.py"
14131 (("'git'") (string-append "'"
14132 (which "git")
14133 "'")))
14134 (substitute* '("dulwich/tests/test_repository.py"
14135 "dulwich/tests/test_hooks.py")
14136 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14137 (setenv "TEST_RUNNER" "unittest")
14138 (setenv "PYTHONHASHSEED" "random")
14139 #t)))))
14140 (propagated-inputs
14141 `(("python-fastimport" ,python-fastimport)))
14142 (native-inputs
14143 `(("python-mock" ,python-mock)
14144 ("python-geventhttpclient" ,python-geventhttpclient)
14145 ("git" ,git)))
14146 (home-page "https://www.dulwich.io/")
14147 (synopsis "Git implementation in Python")
14148 (description "Dulwich is an implementation of the Git file formats and
14149protocols written in pure Python.")
14150 ;; Can be used with either license.
14151 (license (list license:asl2.0 license:gpl2+))))
14152
14153(define-public python2-dulwich
14154 (package-with-python2 python-dulwich))
424b1ae7 14155
916aafa4
CZ
14156(define-public python-pbkdf2
14157 (package
14158 (name "python-pbkdf2")
14159 (version "1.3")
14160 (source
14161 (origin
14162 (method url-fetch)
14163 (uri (pypi-uri "pbkdf2" version))
14164 (sha256
14165 (base32
14166 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14167 (build-system python-build-system)
fffcd8b8
MB
14168 (arguments
14169 '(#:phases
14170 (modify-phases %standard-phases
14171 (replace 'check
14172 (lambda _
14173 (setenv "PYTHONPATH"
14174 (string-append (getcwd) "/build/lib:"
14175 (getenv "PYTHONPATH")))
14176 (zero? (system* "python" "test/test_pbkdf2.py")))))))
916aafa4
CZ
14177 (propagated-inputs
14178 `(("python-pycrypto" ,python-pycrypto))) ; optional
14179 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
14180 (synopsis "Password-based key derivation")
14181 (description "This module implements the password-based key derivation
14182function, PBKDF2, specified in RSA PKCS#5 v2.0.
14183
14184PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14185is part of the RSA Public Key Cryptography Standards series. The provided
14186implementation takes a password or a passphrase and a salt value (and
14187optionally a iteration count, a digest module, and a MAC module) and provides
14188a file-like object from which an arbitrarly-sized key can be read.")
14189 (license license:expat)))
14190
14191(define-public python2-pbkdf2
14192 (package-with-python2 python-pbkdf2))
cba84a38
CZ
14193
14194(define-public python-qrcode
14195 (package
14196 (name "python-qrcode")
14197 (version "5.3")
14198 (source
14199 (origin
14200 (method url-fetch)
14201 (uri (pypi-uri "qrcode" version))
14202 (sha256
14203 (base32
14204 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
14205 (build-system python-build-system)
6925cd78
MB
14206 (arguments
14207 ;; FIXME: Tests require packaging 'pymaging'.
14208 '(#:tests? #f))
cba84a38
CZ
14209 (propagated-inputs
14210 `(("python-lxml" ,python-lxml) ; for SVG output
14211 ("python-pillow" ,python-pillow) ; for PNG output
14212 ("python-six" ,python-six)))
14213 (home-page "https://github.com/lincolnloop/python-qrcode")
14214 (synopsis "QR Code image generator")
14215 (description "This package provides a pure Python QR Code generator
14216module. It uses the Python Imaging Library (PIL) to allow for the generation
14217of QR Codes.
14218
14219In addition this package provides a command line tool to generate QR codes and
14220either write these QR codes to a file or do the output as ascii art at the
14221console.")
14222 (license license:bsd-3)))
14223
14224(define-public python2-qrcode
14225 (package-with-python2 python-qrcode))
af7caada
CZ
14226
14227;; SlowAES isn't compatible with Python 3.
14228(define-public python2-slowaes
14229 (package
14230 (name "python2-slowaes")
14231 (version "0.1a1")
14232 (source
14233 (origin
14234 (method url-fetch)
14235 (uri (pypi-uri "slowaes" version))
14236 (sha256
14237 (base32
14238 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
14239 (build-system python-build-system)
14240 (arguments `(#:python ,python-2))
14241 (home-page "http://code.google.com/p/slowaes/")
14242 (synopsis "Implementation of AES in Python")
14243 (description "This package contains an implementation of AES in Python.
14244This implementation is slow (hence the project name) but still useful when
14245faster ones are not available.")
14246 (license license:asl2.0)))
1a917fc9
MFM
14247
14248(define-public python-rst2ansi
14249 (package
14250 (name "python-rst2ansi")
14251 (version "0.1.5")
14252 (source
14253 (origin
14254 (method url-fetch)
14255 (uri (pypi-uri "rst2ansi" version))
14256 (sha256
14257 (base32
14258 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14259 (build-system python-build-system)
14260 (propagated-inputs
14261 `(("python-docutils" ,python-docutils)))
14262 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14263 (synopsis "Convert RST to ANSI-decorated console output")
14264 (description
14265 "Python module dedicated to rendering RST (reStructuredText) documents
14266to ansi-escaped strings suitable for display in a terminal.")
14267 (license license:expat)))
2f4623db 14268
ca0e62bf
SR
14269(define-public python-ansi2html
14270 (package
14271 (name "python-ansi2html")
14272 (version "1.2.0")
14273 (source
14274 (origin
14275 (method url-fetch)
14276 (uri (pypi-uri "ansi2html" version))
14277 (sha256
14278 (base32
14279 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14280 (build-system python-build-system)
14281 (native-inputs
14282 `(("python-mock" ,python-mock)
14283 ("python-nose" ,python-nose)))
14284 (propagated-inputs
14285 `(("python-six" ,python-six)))
14286 (home-page "http://github.com/ralphbean/ansi2html")
14287 (synopsis "Convert ANSI-decorated console output to HTML")
14288 (description
14289 "@command{ansi2html} is a Python library and command line utility for
14290convering text with ANSI color codes to HTML or LaTeX.")
14291 (license license:gpl3+)))
14292
14293(define-public python2-ansi2html
14294 (package-with-python2 python-ansi2html))
14295
2f4623db
MFM
14296(define-public python-ddt
14297 (package
14298 (name "python-ddt")
14299 (version "1.1.1")
14300 (source
14301 (origin
14302 (method url-fetch)
14303 (uri (pypi-uri "ddt" version))
14304 (sha256
14305 (base32
14306 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
14307 (build-system python-build-system)
14308 (native-inputs
14309 `(("python-mock" ,python-mock)
14310 ("python-nose" ,python-nose)))
14311 (propagated-inputs
14312 `(("python-six" ,python-six)
14313 ("python-pyyaml" ,python-pyyaml)))
14314 (home-page "https://github.com/txels/ddt")
14315 (synopsis "Data-Driven Tests")
14316 (description
14317 "DDT (Data-Driven Tests) allows you to multiply one test case by running
14318it with different test data, and make it appear as multiple test cases.")
14319 (license license:expat)))
14320
14321(define-public python2-ddt
14322 (package-with-python2 python-ddt))
2299b137
MFM
14323
14324(define-public python-pycosat
14325 (package
14326 (name "python-pycosat")
14327 (version "0.6.1")
14328 (source
14329 (origin
14330 (method url-fetch)
14331 (uri (pypi-uri "pycosat" version))
14332 (sha256
14333 (base32
14334 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
14335 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14336 (build-system python-build-system)
14337 (home-page "https://github.com/ContinuumIO/pycosat")
14338 (synopsis "Bindings to picosat (a SAT solver)")
14339 (description
14340 "This package provides efficient Python bindings to @code{picosat} on
14341the C level. When importing pycosat, the @code{picosat} solver becomes part
14342of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14343Problem} (SAT) solver.")
14344 (license license:expat)))
14345
14346(define-public python2-pycosat
14347 (package-with-python2 python-pycosat))
8fd68504
MFM
14348
14349(define-public python2-ruamel.ordereddict
14350 (package
14351 (name "python2-ruamel.ordereddict")
14352 (version "0.4.9")
14353 (source
14354 (origin
14355 (method url-fetch)
14356 (uri (pypi-uri "ruamel.ordereddict" version))
14357 (sha256
14358 (base32
14359 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14360 (build-system python-build-system)
14361 (arguments
14362 `(#:python ,python-2
14363 #:phases
14364 (modify-phases %standard-phases
14365 (delete 'check)
14366 (add-after 'install 'check
14367 (lambda* (#:key inputs outputs #:allow-other-keys)
14368 (add-installed-pythonpath inputs outputs)
14369 (zero? (system* "python" "test/testordereddict.py")))))))
14370 (home-page "https://bitbucket.org/ruamel/ordereddict")
14371 (synopsis "Version of dict that keeps keys in insertion order")
14372 (description
14373 "This is an implementation of an ordered dictionary with @dfn{Key
14374Insertion Order} (KIO: updates of values do not affect the position of the
14375key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14376removed and put at the back). The standard library module @code{OrderedDict},
14377implemented later, implements a subset of @code{ordereddict} functionality.
14378Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14379Order} (KSO, no sorting function can be specified, but a transform can be
14380specified to apply on the key before comparison (e.g. @code{string.lower})).")
14381 (license license:expat)))
d8768e31
EB
14382
14383(define-public python-pypeg2
14384 (package
14385 (name "python-pypeg2")
14386 (version "2.15.2")
14387 (source
14388 (origin
14389 (method url-fetch)
14390 (uri (pypi-uri "pyPEG2" version))
14391 (sha256
14392 (base32
14393 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14394 (build-system python-build-system)
14395 (propagated-inputs `(("python-lxml" ,python-lxml)))
14396 (arguments
14397 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14398 '(#:tests? #f))
14399 (home-page "https://fdik.org/pyPEG/")
14400 (synopsis "Parsering Expression Grammars in Python")
14401 (description "PyPEG is an intrinsic parser interpreter framework for
14402Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
14403parse many formal languages.")
14404 (license license:gpl2)))
33e9490c 14405
0cd83b4e
TS
14406(define-public python-incremental
14407 (package
14408 (name "python-incremental")
14409 (version "17.5.0")
14410 (source
14411 (origin
14412 (method url-fetch)
14413 (uri (pypi-uri "incremental" version))
14414 (sha256
14415 (base32
14416 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
14417 (build-system python-build-system)
14418 (home-page "https://github.com/hawkowl/incremental")
14419 (synopsis "Library for versioning Python projects")
14420 (description "Incremental is a small library that versions your Python
14421projects.")
14422 (license license:expat)))
14423
14424(define-public python2-incremental
14425 (package-with-python2 python-incremental))
14426
96cb5ca1
TS
14427(define-public python-automat
14428 (package
14429 (name "python-automat")
14430 (version "0.6.0")
14431 (source (origin
14432 (method url-fetch)
14433 (uri (pypi-uri "Automat" version))
14434 (sha256
14435 (base32
14436 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
14437 (build-system python-build-system)
14438 ;; We disable the tests because they require python-twisted, while
14439 ;; python-twisted depends on python-automat. Twisted is optional, but the
14440 ;; tests fail if it is not available. Also see
14441 ;; <https://github.com/glyph/automat/issues/71>.
14442 (arguments '(#:tests? #f))
14443 (native-inputs
14444 `(("python-m2r" ,python-m2r)
14445 ("python-setuptools-scm" ,python-setuptools-scm)
14446 ("python-graphviz" ,python-graphviz)))
14447 (propagated-inputs
14448 `(("python-six" ,python-six)
14449 ("python-attrs" ,python-attrs)))
14450 (home-page "https://github.com/glyph/Automat")
14451 (synopsis "Self-service finite-state machines")
14452 (description "Automat is a library for concise, idiomatic Python
14453expression of finite-state automata (particularly deterministic finite-state
14454transducers).")
14455 (license license:expat)))
14456
14457(define-public python2-automat
14458 (package-with-python2 python-automat))
14459
fd8ff99a
TS
14460(define-public python-m2r
14461 (package
14462 (name "python-m2r")
14463 (version "0.1.12")
14464 (source (origin
14465 (method url-fetch)
14466 (uri (pypi-uri "m2r" version))
14467 (sha256
14468 (base32
14469 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
14470 (build-system python-build-system)
14471 (propagated-inputs
14472 `(("python-docutils" ,python-docutils)
14473 ("python-mistune" ,python-mistune)))
14474 (native-inputs
14475 `(("python-pygments" ,python-pygments)
14476 ("python-mock" ,python-mock)))
14477 (home-page "https://github.com/miyakogi/m2r")
14478 (synopsis "Markdown to reStructuredText converter")
14479 (description "M2R converts a markdown file including reST markups to valid
14480reST format.")
14481 (license license:expat)))
14482
14483(define-public python2-m2r
14484 (package-with-python2 python-m2r))
14485
9074bac1
TS
14486(define-public python-constantly
14487 (package
14488 (name "python-constantly")
14489 (version "15.1.0")
14490 (source (origin
14491 (method url-fetch)
14492 (uri (pypi-uri "constantly" version))
14493 (sha256
14494 (base32
14495 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
14496 (build-system python-build-system)
14497 (home-page "https://github.com/twisted/constantly")
14498 (synopsis "Symbolic constants in Python")
14499 (description "Constantly is a Python library that provides symbolic
14500constant support. It includes collections and constants with text, numeric,
14501and bit flag values.")
14502 (license license:expat)))
14503
14504(define-public python2-constantly
14505 (package-with-python2 python-constantly))
14506
bb3b4b4e
TS
14507(define-public python-attrs
14508 (package
14509 (name "python-attrs")
14510 (version "17.2.0")
14511 (source (origin
14512 (method url-fetch)
14513 (uri (pypi-uri "attrs" version))
14514 (sha256
14515 (base32
14516 "04gx08ikpk26wnq22f7l42gapcvk8iz1512r927k6sadz6cinkax"))))
14517 (build-system python-build-system)
14518 (native-inputs
14519 `(("python-pytest" ,python-pytest)
14520 ("python-hypothesis" ,python-hypothesis)
14521 ("python-zope-interface" ,python-zope-interface)
14522 ("python-six" ,python-six)))
14523 (home-page "https://github.com/python-attrs/attrs/")
14524 (synopsis "Attributes without boilerplate")
14525 (description "@code{attrs} is a Python package with class decorators that
14526ease the chores of implementing the most common attribute-related object
14527protocols.")
14528 (license license:expat)))
14529
14530(define-public python2-attrs
14531 (package-with-python2 python-attrs))
14532
33e9490c
AI
14533(define-public python2-cliapp
14534 (package
14535 (name "python2-cliapp")
f6c58215 14536 (version "1.20170823")
33e9490c
AI
14537 (source
14538 (origin
14539 (method url-fetch)
14540 (uri (string-append
14541 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
14542 version ".tar.gz"))
14543 (sha256
14544 (base32
f6c58215 14545 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
33e9490c
AI
14546 (build-system python-build-system)
14547 (arguments
689042e5
AI
14548 `(#:python ,python-2
14549 #:phases
14550 (modify-phases %standard-phases
14551 ;; check phase needs to be run before the build phase. If not,
14552 ;; coverage-test-runner looks for tests for the built source files,
14553 ;; and fails.
14554 (delete 'check)
14555 (add-before 'build 'check
14556 (lambda _
14557 ;; Disable python3 tests
14558 (substitute* "check"
14559 (("python3") "# python3"))
14560 (zero? (system* "./check")))))))
14561 (native-inputs
14562 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14563 ("python2-pep8" ,python2-pep8)))
33e9490c
AI
14564 (propagated-inputs
14565 `(("python2-pyaml" ,python2-pyaml)))
14566 (home-page "https://liw.fi/cliapp/")
14567 (synopsis "Python framework for command line programs")
14568 (description "@code{python2-cliapp} is a python framework for
14569command line programs. It contains the typical stuff such programs
14570need to do, such as parsing the command line for options, and
14571iterating over input files.")
14572 (license license:gpl2+)))
14573
77e99411
AI
14574(define-public python2-ttystatus
14575 (package
14576 (name "python2-ttystatus")
2d6da794 14577 (version "0.35")
77e99411
AI
14578 (source
14579 (origin
14580 (method url-fetch)
14581 (uri (string-append
14582 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
14583 version ".tar.gz"))
14584 (sha256
14585 (base32
2d6da794 14586 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
77e99411 14587 (build-system python-build-system)
f6180862
AI
14588 (native-inputs
14589 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14590 ("python2-pep8" ,python2-pep8)))
77e99411 14591 (arguments
f6180862
AI
14592 `(#:python ,python-2
14593 #:phases
14594 (modify-phases %standard-phases
14595 ;; check phase needs to be run before the build phase. If not,
14596 ;; coverage-test-runner looks for tests for the built source files,
14597 ;; and fails.
14598 (delete 'check)
14599 (add-before 'build 'check
14600 (lambda _
14601 (zero? (system* "make" "check")))))))
77e99411
AI
14602 (home-page "https://liw.fi/ttystatus/")
14603 (synopsis "Python library for showing progress reporting and
14604status updates on terminals")
14605 (description "@code{python2-ttystatus} is a python library for
14606showing progress reporting and status updates on terminals, for
14607command line programs. Output is automatically adapted to the width
14608of the terminal: truncated if it does not fit, and resized if the
14609terminal size changes.")
14610 (license license:gpl3+)))
c220f0b4
AI
14611
14612(define-public python2-tracing
14613 (package
14614 (name "python2-tracing")
14615 (version "0.10")
14616 (source
14617 (origin
14618 (method url-fetch)
14619 (uri (string-append
14620 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
14621 version ".tar.gz"))
14622 (sha256
14623 (base32
14624 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
14625 (build-system python-build-system)
14626 (arguments
14627 `(#:python ,python-2))
14628 (home-page "https://liw.fi/tracing/")
14629 (synopsis "Python debug logging helper")
14630 (description "@code{python2-tracing} is a python library for
14631logging debug messages. It provides a way to turn debugging messages
14632on and off, based on the filename they occur in. It is much faster
14633than using @code{logging.Filter} to accomplish the same thing, which
14634matters when code is run in production mode. The actual logging still
14635happens using the @code{logging} library.")
14636 (license license:gpl3+)))
b6b2ca5d
AI
14637
14638(define-public python2-larch
14639 (package
14640 (name "python2-larch")
14641 (version "1.20151025")
14642 (source
14643 (origin
14644 (method url-fetch)
14645 (uri (string-append
14646 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
14647 version ".tar.gz"))
a0596a2f
AI
14648 (patches (search-patches
14649 "python2-larch-coverage-4.0a6-compatibility.patch"))
b6b2ca5d
AI
14650 (sha256
14651 (base32
14652 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
14653 (build-system python-build-system)
14654 (arguments
a0596a2f
AI
14655 `(#:python ,python-2
14656 #:phases
14657 (modify-phases %standard-phases
14658 ;; check phase needs to be run before the build phase. If not,
14659 ;; coverage-test-runner looks for tests for the built source files,
14660 ;; and fails.
14661 (delete 'check)
14662 (add-before 'build 'check
14663 (lambda _
14664 (zero? (system* "make" "check")))))))
14665 (native-inputs
14666 `(("cmdtest" ,cmdtest)
14667 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
b6b2ca5d
AI
14668 (propagated-inputs
14669 `(("python2-tracing" ,python2-tracing)))
14670 (home-page "https://liw.fi/larch/")
14671 (synopsis "Python copy-on-write B-tree library")
14672 (description "@code{python2-larch} is an implementation of
14673particular kind of B-tree, based on research by Ohad Rodeh. See
14674@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
14675on the data structure.
14676
14677The distinctive feature of this B-tree is that a node is never
14678(conceptually) modified. Instead, all updates are done by
14679copy-on-write. This makes it easy to clone a tree, and modify only the
14680clone, while other processes access the original tree.")
14681 (license license:gpl3+)))
35db2d3c
AP
14682
14683(define-public python-htmlmin
14684 (package
14685 (name "python-htmlmin")
14686 (version "0.1.10")
14687 (source
14688 (origin
14689 (method url-fetch)
14690 (uri (pypi-uri "htmlmin" version))
14691 (sha256
14692 (base32
14693 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
14694 (arguments
14695 `(#:tests? #f)) ;htmlmin has no tests
14696 (build-system python-build-system)
14697 (home-page "https://htmlmin.readthedocs.org/en/latest/")
14698 (synopsis "HTML minifier")
14699 (description "@code{htmlmin} is an HTML minifier that just works.
14700It comes with safe defaults and easily configurable options.")
14701 (license license:bsd-3)))
14702
14703(define-public python2-htmlmin
14704 (package-with-python2 python-htmlmin))
78c55663
AP
14705
14706(define-public python-flask-htmlmin
14707 (package
14708 (name "python-flask-htmlmin")
14709 (version "1.2")
14710 (source
14711 (origin
14712 (method url-fetch)
14713 (uri (pypi-uri "Flask-HTMLmin" version))
14714 (sha256
14715 (base32
14716 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
14717 (propagated-inputs
14718 `(("python-flask" ,python-flask)
14719 ("python-htmlmin" ,python-htmlmin)))
14720 (build-system python-build-system)
14721 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
14722 (synopsis "HTML response minifier for Flask")
14723 (description
14724 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
14725 (license license:bsd-3)))
14726
14727(define-public python2-flask-htmlmin
14728 (package-with-python2 python-flask-htmlmin))
a71c8638
AP
14729
14730(define-public python-flask-login
14731 (package
14732 (name "python-flask-login")
14733 (version "0.4.0")
14734 (source
14735 (origin
14736 (method url-fetch)
14737 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
14738 version ".tar.gz"))
14739 (file-name (string-append name "-" version ".tar.gz"))
14740 (sha256
14741 (base32
14742 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
14743 (arguments
14744 ;; Tests fail PEP8 compliance. See:
14745 ;; https://github.com/maxcountryman/flask-login/issues/340
14746 `(#:tests? #f))
14747 (build-system python-build-system)
14748 (home-page "https://github.com/maxcountryman/flask-login")
14749 (synopsis "User session management for Flask")
14750 (description
14751 "@code{Flask-Login} provides user session management for Flask. It
14752handles the common tasks of logging in, logging out, and remembering your
14753users' sessions over extended periods of time.")
14754 (license license:expat)))
14755
14756(define-public python2-flask-login
14757 (package-with-python2 python-flask-login))
d5ef113c
AI
14758
14759(define-public python-astroid
14760 (package
14761 (name "python-astroid")
de2f56cf 14762 (version "1.5.3")
d5ef113c
AI
14763 (source
14764 (origin
14765 (method url-fetch)
14766 (uri (string-append
14767 "https://github.com/PyCQA/astroid/archive/astroid-"
14768 version ".tar.gz"))
14769 (sha256
14770 (base32
de2f56cf 14771 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
d5ef113c
AI
14772 (build-system python-build-system)
14773 (propagated-inputs
14774 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
14775 ("python-six" ,python-six)
14776 ("python-wrapt" ,python-wrapt)))
14777 (arguments
14778 `(#:phases
14779 (modify-phases %standard-phases
14780 (replace 'check
14781 (lambda _
14782 (zero? (system* "python" "-m" "unittest" "discover"
14783 "-p" "unittest*.py")))))))
14784 (home-page "https://github.com/PyCQA/astroid")
14785 (synopsis "Common base representation of python source code for pylint and
14786other projects")
14787 (description "@code{python-astroid} provides a common base representation
14788of python source code for projects such as pychecker, pyreverse, pylint, etc.
14789
14790It provides a compatible representation which comes from the _ast module. It
14791rebuilds the tree generated by the builtin _ast module by recursively walking
14792down the AST and building an extended ast. The new node classes have
14793additional methods and attributes for different usages. They include some
14794support for static inference and local name scopes. Furthermore, astroid
14795builds partial trees by inspecting living objects.")
de2f56cf
MB
14796 (license license:lgpl2.1+)
14797 (properties `((python2-variant . ,(delay python2-astroid))))))
d5ef113c
AI
14798
14799(define-public python2-astroid
de2f56cf
MB
14800 (let ((base (package-with-python2
14801 (strip-python2-variant python-astroid))))
14802 (package (inherit base)
14803 (propagated-inputs
14804 `(("python2-backports-functools-lru-cache"
14805 ,python2-backports-functools-lru-cache)
14806 ("python2-enum34" ,python2-enum34)
14807 ("python2-singledispatch" ,python2-singledispatch)
14808 ,@(package-propagated-inputs base))))))
6ba0af79
AI
14809
14810(define-public python-isort
14811 (package
14812 (name "python-isort")
14813 (version "4.2.5")
14814 (source
14815 (origin
14816 (method url-fetch)
14817 (uri (string-append
14818 "https://github.com/timothycrosley/isort/archive/"
14819 version ".tar.gz"))
14820 (file-name (string-append name "-" version ".tar.gz"))
14821 (sha256
14822 (base32
14823 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
14824 (build-system python-build-system)
14825 (native-inputs
14826 `(("python-mock" ,python-mock)
14827 ("python-pytest" ,python-pytest)))
14828 (home-page "https://github.com/timothycrosley/isort")
14829 (synopsis "Python utility/library to sort python imports")
14830 (description "@code{python-isort} is a python utility/library to sort
14831imports alphabetically, and automatically separated into sections. It
14832provides a command line utility, a python library and plugins for various
14833editors.")
14834 (license license:expat)))
14835
14836(define-public python2-isort
14837 (package-with-python2 python-isort))
965a083e
AI
14838
14839(define-public python2-backports-functools-lru-cache
14840 (package
14841 (name "python2-backports-functools-lru-cache")
14842 (version "1.3")
14843 (source
14844 (origin
14845 (method url-fetch)
14846 ;; only the pypi tarballs contain the necessary metadata
14847 (uri (pypi-uri "backports.functools_lru_cache" version))
14848 (sha256
14849 (base32
14850 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
14851 (build-system python-build-system)
14852 (native-inputs
14853 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14854 (arguments
14855 `(#:python ,python-2))
14856 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14857 (synopsis "Backport of functools.lru_cache from Python 3.3")
14858 (description "@code{python2-backports-functools-lru-cache} is a backport
14859of @code{functools.lru_cache} from python 3.3.")
14860 (license license:expat)))
23db3fc6
AI
14861
14862(define-public python-configparser
14863 (package
14864 (name "python-configparser")
14865 (version "3.5.0")
14866 (source
14867 (origin
14868 (method url-fetch)
14869 (uri (string-append
14870 "https://bitbucket.org/ambv/configparser/get/"
14871 version ".tar.bz2"))
14872 (file-name (string-append name "-" version ".tar.gz"))
14873 (sha256
14874 (base32
14875 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
14876 (build-system python-build-system)
14877 (home-page "http://docs.python.org/py3k/library/configparser.html")
14878 (synopsis "Backport of configparser from python 3.5")
14879 (description "@code{python-configparser} is a backport of
14880@code{configparser} from Python 3.5 so that it can be used directly
14881in other versions.")
14882 (license license:expat)))
14883
14884(define-public python2-configparser
14885 (package-with-python2 python-configparser))
61550ded
AI
14886
14887(define-public python2-coverage-test-runner
14888 (package
14889 (name "python2-coverage-test-runner")
14890 (version "1.11")
14891 (source
14892 (origin
14893 (method url-fetch)
14894 (uri (string-append
14895 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
14896 "coverage-test-runner/snapshot/coverage-test-runner-"
14897 version ".tar.gz"))
14898 (sha256
14899 (base32
14900 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
14901 (build-system python-build-system)
14902 (arguments
14903 `(#:python ,python-2
14904 #:phases
14905 (modify-phases %standard-phases
14906 (replace 'check
14907 (lambda _
14908 (zero? (system* "./testrun")))))))
14909 (propagated-inputs
14910 `(("python2-coverage" ,python2-coverage)))
14911 (home-page "https://liw.fi/coverage-test-runner/")
14912 (synopsis "Python module for running unit tests")
14913 (description "@code{CoverageTestRunner} is a python module for running
d1e4ad1b 14914unit tests and failing them if the unit test module does not exercise all
61550ded
AI
14915statements in the module it tests.")
14916 (license license:gpl3+)))
315944a3
AI
14917
14918(define-public python-pylint
14919 (package
14920 (name "python-pylint")
a8a964db 14921 (version "1.7.2")
315944a3
AI
14922 (source
14923 (origin
14924 (method url-fetch)
14925 (uri (string-append
14926 "https://github.com/PyCQA/pylint/archive/pylint-"
14927 version ".tar.gz"))
14928 (sha256
14929 (base32
a8a964db 14930 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
315944a3
AI
14931 (build-system python-build-system)
14932 (native-inputs
a8a964db
MB
14933 `(("python-pytest" ,python-pytest)
14934 ("python-pytest-runner" ,python-pytest-runner)
14935 ("python-tox" ,python-tox)))
315944a3
AI
14936 (propagated-inputs
14937 `(("python-astroid" ,python-astroid)
14938 ("python-isort" ,python-isort)
14939 ("python-mccabe" ,python-mccabe)
14940 ("python-six" ,python-six)))
14941 (arguments
14942 `(#:phases
14943 (modify-phases %standard-phases
14944 (replace 'check
14945 (lambda _
14946 ;; Somehow, tests for python2-pylint
14947 ;; fail if run from the build directory
14948 (let ((work "/tmp/work"))
14949 (mkdir-p work)
14950 (setenv "PYTHONPATH"
14951 (string-append (getenv "PYTHONPATH") ":" work))
14952 (copy-recursively "." work)
14953 (with-directory-excursion "/tmp"
14954 (zero? (system* "python" "-m" "unittest" "discover"
14955 "-s" (string-append work "/pylint/test")
14956 "-p" "*test_*.py")))))))))
14957 (home-page "https://github.com/PyCQA/pylint")
14958 (synopsis "Python source code analyzer which looks for coding standard
14959errors")
14960 (description "Pylint is a Python source code analyzer which looks
14961for programming errors, helps enforcing a coding standard and sniffs
14962for some code smells (as defined in Martin Fowler's Refactoring book).
14963
14964Pylint has many rules enabled by default, way too much to silence them
14965all on a minimally sized program. It's highly configurable and handle
14966pragmas to control it from within your code. Additionally, it is
14967possible to write plugins to add your own checks.")
462ae6f6 14968 (properties `((python2-variant . ,(delay python2-pylint))))
315944a3
AI
14969 (license license:gpl2+)))
14970
14971(define-public python2-pylint
462ae6f6
DM
14972 (let ((pylint (package-with-python2
14973 (strip-python2-variant python-pylint))))
315944a3
AI
14974 (package (inherit pylint)
14975 (propagated-inputs
14976 `(("python2-backports-functools-lru-cache"
14977 ,python2-backports-functools-lru-cache)
14978 ("python2-configparser" ,python2-configparser)
14979 ,@(package-propagated-inputs pylint))))))
5d0c3ba8
MFM
14980
14981(define-public python-paramunittest
14982 (package
14983 (name "python-paramunittest")
14984 (version "0.2")
14985 (source
14986 (origin
14987 (method url-fetch)
14988 (uri (pypi-uri "ParamUnittest" version))
14989 (sha256
14990 (base32
14991 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14992 (build-system python-build-system)
14993 (home-page
14994 "https://github.com/rik0/ParamUnittest")
14995 (synopsis
14996 "Simple extension to have parametrized unit tests")
14997 (description
14998 "This package allows to create parametrized unit-tests that work with the standard
14999unittest package. A parametrized test case is automatically converted to multiple test
15000cases. Since they are TestCase subclasses, they work with other test suites that
15001recognize TestCases.")
15002 (license license:bsd-2)))
15003
15004(define-public python2-python-paramunittest
15005 (package-with-python2 python-paramunittest))
eec21d4b
MFM
15006
15007(define-public python-mando
15008 (package
15009 (name "python-mando")
15010 (version "0.5")
15011 (source
15012 (origin
15013 (method url-fetch)
15014 (uri (pypi-uri "mando" version))
15015 (sha256
15016 (base32
15017 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
15018 (build-system python-build-system)
15019 (propagated-inputs
15020 `(("python-rst2ansi" ,python-rst2ansi)))
15021 (native-inputs
15022 `(("python-sphinx" ,python-sphinx-1.5.3)
15023 ("python-paramunittest" ,python-paramunittest)))
15024 (home-page "https://mando.readthedocs.org/")
15025 (synopsis
15026 "Wrapper around argparse, allowing creation of complete CLI applications")
15027 (description
15028 "This package is a wrapper around argparse, allowing you to write complete CLI
15029 applications in seconds while maintaining all the flexibility.")
15030 (license license:expat)))
15031
15032(define-public python2-mando
15033 (package-with-python2 python-mando))
b98d4ec0
MFM
15034
15035(define-public python-mando-0.3.1
15036 ;; python-radon (version 1.5.0) has a requirement
15037 ;; for mando<0.4,>=0.3
15038 (package
15039 (inherit python-mando)
15040 (name "python-mando")
15041 (version "0.3.1")
15042 (source
15043 (origin
15044 (method url-fetch)
15045 (uri (string-append "https://github.com/rubik/mando/archive/v"
15046 version
15047 ".tar.gz"))
15048 (sha256
15049 (base32
15050 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
16fe516e
BS
15051
15052(define-public python-fudge
15053 (package
15054 (name "python-fudge")
15055 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15056 ;; package, which is currently the only use of this package.
15057 (version "0.9.6")
15058 (source
15059 (origin
15060 (method url-fetch)
15061 (uri (pypi-uri "fudge" version))
15062 (sha256
15063 (base32
15064 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15065 (build-system python-build-system)
15066 (arguments
15067 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15068 (home-page "https://github.com/fudge-py/fudge")
15069 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15070 (description
15071 "Fudge is a Python module for using fake objects (mocks and stubs) to
15072test real ones.
15073
15074In readable Python code, you declare the methods available on your fake object
15075and how they should be called. Then you inject that into your application and
15076start testing. This declarative approach means you don’t have to record and
15077playback actions and you don’t have to inspect your fakes after running code.
15078If the fake object was used incorrectly then you’ll see an informative
15079exception message with a traceback that points to the culprit.")
15080 (license license:expat)))
15081
15082(define-public python2-fudge
15083 (package-with-python2 python-fudge))
f3f8d159
DM
15084
15085(define-public python-oauth2client
15086 (package
15087 (name "python-oauth2client")
15088 (version "4.0.0")
15089 (source
15090 (origin
15091 (method url-fetch)
15092 (uri (pypi-uri "oauth2client" version))
15093 (sha256
15094 (base32
15095 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
15096 (build-system python-build-system)
15097 (arguments
15098 `(#:tests? #f))
15099 (propagated-inputs
15100 `(("python-httplib2" ,python-httplib2)
15101 ("python-pyasn1" ,python-pyasn1)
15102 ("python-pyasn1-modules" ,python-pyasn1-modules)
15103 ("python-rsa" ,python-rsa)
15104 ("python-six" ,python-six)))
15105 (home-page "http://github.com/google/oauth2client/")
15106 (synopsis "OAuth 2.0 client library")
15107 (description "@code{python-oauth2client} provides an OAuth 2.0 client
15108library for Python")
15109 (license license:asl2.0)))
6e7302e9
DM
15110
15111(define-public python-flask-oidc
15112 (package
15113 (name "python-flask-oidc")
15114 (version "1.1.1")
15115 (source
15116 (origin
15117 (method url-fetch)
15118 (uri (pypi-uri "flask-oidc" version))
15119 (sha256
15120 (base32
15121 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
15122 (build-system python-build-system)
15123 (propagated-inputs
15124 `(("python-flask" ,python-flask)
15125 ("python-itsdangerous" ,python-itsdangerous)
15126 ("python-oauth2client" ,python-oauth2client)
15127 ("python-six" ,python-six)))
15128 (native-inputs
15129 `(("python-nose" ,python-nose)
15130 ("python-mock" ,python-mock)))
15131 (home-page "https://github.com/puiterwijk/flask-oidc")
15132 (synopsis "OpenID Connect extension for Flask")
15133 (description "@code{python-flask-oidc} provides an OpenID Connect extension
15134for Flask.")
15135 (license license:bsd-2)))
7e16478f
DM
15136
15137(define-public python-mwclient
15138 (package
15139 (name "python-mwclient")
15140 (version "0.8.4")
15141 (source
15142 (origin
15143 (method url-fetch)
15144 ;; The PyPI version wouldn't contain tests.
15145 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
15146 "v" version ".tar.gz"))
15147 (sha256
15148 (base32
15149 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
15150 (build-system python-build-system)
15151 (propagated-inputs
15152 `(("python-requests" ,python-requests)
15153 ("python-requests-oauthlib"
15154 ,python-requests-oauthlib)
15155 ("python-six" ,python-six)))
15156 (native-inputs
15157 `(("python-mock" ,python-mock)
15158 ("python-pytest" ,python-pytest)
15159 ("python-pytest-pep8" ,python-pytest-pep8)
15160 ("python-pytest-cache" ,python-pytest-cache)
15161 ("python-pytest-cov" ,python-pytest-cov)
15162 ("python-responses" ,python-responses)))
15163 (home-page "https://github.com/btongminh/mwclient")
15164 (synopsis "MediaWiki API client")
15165 (description "This package provides a MediaWiki API client.")
15166 (license license:expat)))
15167
15168(define-public python2-mwclient
15169 (package-with-python2 python-mwclient))
59a97288
JL
15170
15171(define-public python-pytest-warnings
15172 (package
15173 (name "python-pytest-warnings")
15174 (version "0.2.0")
15175 (source
15176 (origin
15177 (method url-fetch)
15178 (uri (pypi-uri "pytest-warnings" version))
15179 (sha256
15180 (base32
15181 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
15182 (build-system python-build-system)
15183 (propagated-inputs
928da609 15184 `(("pytest" ,python-pytest)))
59a97288
JL
15185 (home-page "https://github.com/fschulze/pytest-warnings")
15186 (synopsis "Pytest plugin to list Python warnings in pytest report")
15187 (description
15188 "Python-pytest-warnings is a pytest plugin to list Python warnings in
15189pytest report.")
15190 (license license:expat)))
15191
15192(define-public python2-pytest-warnings
15193 (package-with-python2 python-pytest-warnings))
2d6e56ba 15194
a12b30a0
DM
15195(define-public python-pytest-capturelog
15196 (package
15197 (name "python-pytest-capturelog")
15198 (version "0.7")
15199 (source
15200 (origin
15201 (method url-fetch)
15202 (uri (pypi-uri "pytest-capturelog" version ".tar.gz"))
15203 (sha256
15204 (base32
15205 "038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
15206 (build-system python-build-system)
15207 (propagated-inputs
928da609 15208 `(("pytest" ,python-pytest)))
a12b30a0
DM
15209 (home-page "http://bitbucket.org/memedough/pytest-capturelog/overview")
15210 (synopsis "Pytest plugin to catch log messages")
15211 (description
15212 "Python-pytest-catchlog is a pytest plugin to catch log messages.")
15213 (license license:expat)))
15214
15215(define-public python2-pytest-capturelog
15216 (package-with-python2 python-pytest-capturelog))
15217
2d6e56ba
JL
15218(define-public python-pytest-catchlog
15219 (package
15220 (name "python-pytest-catchlog")
15221 (version "1.2.2")
15222 (source
15223 (origin
15224 (method url-fetch)
15225 (uri (pypi-uri "pytest-catchlog" version ".zip"))
15226 (sha256
15227 (base32
15228 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
15229 (build-system python-build-system)
15230 (native-inputs
15231 `(("unzip" ,unzip)))
15232 (propagated-inputs
928da609 15233 `(("pytest" ,python-pytest)))
2d6e56ba
JL
15234 (home-page "https://github.com/eisensheng/pytest-catchlog")
15235 (synopsis "Pytest plugin to catch log messages")
15236 (description
15237 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
15238a fork of pytest-capturelog.")
15239 (license license:expat)))
15240
15241(define-public python2-pytest-catchlog
15242 (package-with-python2 python-pytest-catchlog))
75805449
JL
15243
15244(define-public python-utils
15245 (package
15246 (name "python-utils")
15247 (version "2.1.0")
15248 (source (origin
15249 (method url-fetch)
15250 (uri (pypi-uri "python-utils" version))
15251 (sha256
15252 (base32
15253 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
15254 (build-system python-build-system)
15255 (native-inputs
15256 `(("pytest-runner" ,python-pytest-runner)
15257 ("pytest" ,python-pytest)
15258 ("six" ,python-six)))
15259 (home-page "https://github.com/WoLpH/python-utils")
15260 (synopsis "Convenient utilities not included with the standard Python install")
15261 (description
15262 "Python Utils is a collection of small Python functions and classes which
15263make common patterns shorter and easier.")
15264 (license license:bsd-2)))
15265
15266(define-public python2-utils
15267 (package-with-python2 python-utils))
709a5a93
JL
15268
15269(define-public python-webassets
15270 (package
15271 (name "python-webassets")
15272 (version "0.12.1")
15273 (source
15274 (origin
15275 (method url-fetch)
15276 (uri (pypi-uri "webassets" version))
15277 (sha256
15278 (base32
15279 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
15280 (build-system python-build-system)
15281 (native-inputs
15282 `(("python-jinja2" ,python-jinja2)
15283 ("python-mock" ,python-mock)
15284 ("python-nose" ,python-nose)
15285 ("python-pytest" ,python-pytest)))
15286 (home-page "https://github.com/miracle2k/webassets")
15287 (synopsis "Media asset management")
15288 (description "Merges, minifies and compresses Javascript and CSS files,
15289supporting a variety of different filters, including YUI, jsmin, jspacker or
15290CSS tidy. Also supports URL rewriting in CSS files.")
15291 (license license:bsd-2)))
4c066b72
JL
15292
15293(define-public python-sphinx-me
15294 (package
15295 (name "python-sphinx-me")
15296 (version "0.3")
15297 (source
15298 (origin
15299 (method url-fetch)
15300 (uri (pypi-uri "sphinx-me" version))
15301 (sha256
15302 (base32
15303 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
15304 (build-system python-build-system)
15305 (home-page "https://github.com/stephenmcd/sphinx-me")
15306 (synopsis "Create a Sphinx documentation shell")
15307 (description
15308 "Create a Sphinx documentation shell for your project and include the
15309README file as the documentation index. It handles extracting the required
15310meta data such as the project name, author and version from your project for
15311use in your Sphinx docs.")
15312 (license license:bsd-2)))
15313
15314(define-public python2-sphinx-me
15315 (package-with-python2 python-sphinx-me))
03ded2fd
JL
15316
15317(define-public python-cssmin
15318 (package
15319 (name "python-cssmin")
15320 (version "0.2.0")
15321 (source
15322 (origin
15323 (method url-fetch)
15324 (uri (pypi-uri "cssmin" version))
15325 (sha256
15326 (base32
15327 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
15328 (build-system python-build-system)
15329 (home-page "https://github.com/zacharyvoase/cssmin")
15330 (synopsis "Python port of the YUI CSS Compressor")
15331 (description "Python port of the YUI CSS Compressor.")
15332 (license (list license:expat license:bsd-3))))
15333
15334(define-public python2-cssmin
15335 (package-with-python2 python-cssmin))
186d4f8d
JL
15336
15337(define-public python-diff-match-patch
15338 (package
15339 (name "python-diff-match-patch")
15340 (version "20121119")
15341 (source
15342 (origin
15343 (method url-fetch)
15344 (uri (pypi-uri "diff-match-patch" version))
15345 (sha256
15346 (base32
15347 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15348 (build-system python-build-system)
15349 (home-page "https://code.google.com/p/google-diff-match-patch")
15350 (synopsis "Synchronize plain text")
15351 (description "Diff Match and Patch libraries offer robust algorithms to
15352perform the operations required for synchronizing plain text.")
15353 (license license:asl2.0)))
15354
15355(define-public python2-diff-match-patch
15356 (package-with-python2 python-diff-match-patch))
d15a4791
JL
15357
15358(define-public python-dirsync
15359 (package
15360 (name "python-dirsync")
15361 (version "2.2.2")
15362 (source
15363 (origin
15364 (method url-fetch)
15365 (uri (pypi-uri "dirsync" version ".zip"))
15366 (sha256
15367 (base32
15368 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
15369 (build-system python-build-system)
15370 (native-inputs
15371 `(("unzip" ,unzip)))
15372 (propagated-inputs
15373 `(("six" ,python-six)))
15374 (home-page "https://bitbucket.org/tkhyn/dirsync")
15375 (synopsis "Advanced directory tree synchronisation tool")
15376 (description "Advanced directory tree synchronisation tool.")
15377 (license license:expat)))
15378
15379(define-public python2-dirsync
15380 (package-with-python2 python-dirsync))
1b16f1ec
JL
15381
15382(define-public python-nosexcover
15383 (package
15384 (name "python-nosexcover")
15385 (version "1.0.11")
15386 (source (origin
15387 (method url-fetch)
15388 (uri (pypi-uri "nosexcover" version))
15389 (sha256
15390 (base32
15391 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
15392 (build-system python-build-system)
15393 (propagated-inputs
15394 `(("python-coverage" ,python-coverage)
15395 ("python-nose" ,python-nose)))
15396 (home-page "http://github.com/cmheisel/nose-xcover")
15397 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
15398 (description "Nose-xcover is a companion to the built-in
15399@code{nose.plugins.cover}. This plugin will write out an XML coverage report
15400to a file named coverage.xml.
15401
15402It will honor all the options you pass to the Nose coverage plugin,
15403especially -cover-package.")
15404 (license license:expat)))
15405
15406(define-public python2-nosexcover
15407 (package-with-python2 python-nosexcover))
afdfbb1d
JL
15408
15409(define-public python-elasticsearch
15410 (package
15411 (name "python-elasticsearch")
15412 (version "1.0.0")
15413 (source
15414 (origin
15415 (method url-fetch)
15416 (uri (pypi-uri "elasticsearch" version))
15417 (sha256
15418 (base32
15419 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
15420 (build-system python-build-system)
15421 (native-inputs
15422 `(("python-mock" ,python-mock)
15423 ("python-nosexcover" ,python-nosexcover)
15424 ("python-pyaml" ,python-pyaml)
15425 ("python-requests" ,python-requests)))
15426 (propagated-inputs
15427 `(("urllib3" ,python-urllib3)))
15428 (arguments
15429 ;; tests require the test_elasticsearch module but it is not distributed.
15430 `(#:tests? #f))
15431 (home-page "https://github.com/elastic/elasticsearch-py")
15432 (synopsis "Low-level client for Elasticsearch")
15433 (description "Official low-level client for Elasticsearch. Its goal is to
15434provide common ground for all Elasticsearch-related code in Python; because of
15435this it tries to be opinion-free and very extendable.")
15436 (license license:expat)))
15437
15438(define-public python2-elasticsearch
15439 (package-with-python2 python-elasticsearch))
a17ccbbb
JL
15440
15441(define-public python-levenshtein
15442 (package
15443 (name "python-levenshtein")
15444 (version "0.12.0")
15445 (source
15446 (origin
15447 (method url-fetch)
15448 (uri (pypi-uri "python-Levenshtein" version))
15449 (sha256
15450 (base32
15451 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15452 (build-system python-build-system)
15453 (home-page "https://github.com/ztane/python-Levenshtein")
15454 (synopsis "Fast computation of Levenshtein distance and string similarity")
15455 (description
15456 "The Levenshtein Python C extension module contains functions for fast computation of
15457@enumerate
15458@item Levenshtein (edit) distance, and edit operations
15459@item string similarity
15460@item approximate median strings, and generally string averaging
15461@item string sequence and set similarity
15462@end enumerate
15463It supports both normal and Unicode strings.")
15464 (license license:gpl2+)))
15465
15466(define-public python2-levenshtein
15467 (package-with-python2 python-levenshtein))
38a370d2
JL
15468
15469(define-public python-scandir
15470 (package
15471 (name "python-scandir")
15472 (version "1.4")
15473 (source
15474 (origin
15475 (method url-fetch)
15476 (uri (pypi-uri "scandir" version))
15477 (sha256
15478 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
15479 (build-system python-build-system)
15480 (home-page "https://github.com/benhoyt/scandir")
15481 (synopsis "Directory iteration function")
15482 (description
15483 "Directory iteration function like os.listdir(), except that instead of
15484returning a list of bare filenames, it yields DirEntry objects that include
15485file type and stat information along with the name. Using scandir() increases
15486the speed of os.walk() by 2-20 times (depending on the platform and file
15487system) by avoiding unnecessary calls to os.stat() in most cases.")
15488 (license license:bsd-3)))
15489
15490(define-public python2-scandir
15491 (package-with-python2 python-scandir))
18c25460
JL
15492
15493(define-public python2-stemming
15494 (package
15495 (name "python2-stemming")
15496 (version "1.0.1")
15497 (source
15498 (origin
15499 (method url-fetch)
15500 (uri (pypi-uri "stemming" version))
15501 (sha256
15502 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15503 (build-system python-build-system)
15504 (arguments
15505 `(#:python ,python-2))
15506 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15507 (synopsis "Python implementations of various stemming algorithms")
15508 (description
15509 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15510stemming algorithms for English. These implementations are straightforward and
15511efficient, unlike some Python versions of the same algorithms available on the
15512Web. This package is an extraction of the stemming code included in the Whoosh
15513search engine.")
15514 (license license:public-domain)))
54153b85
JL
15515
15516(define-public python-factory-boy
15517 (package
15518 (name "python-factory-boy")
15519 (version "2.8.1")
15520 (source
15521 (origin
15522 (method url-fetch)
15523 (uri (pypi-uri "factory_boy" version))
15524 (sha256
15525 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15526 (build-system python-build-system)
15527 (arguments
15528 ;; Tests are not included in the tarball.
15529 `(#:tests? #f))
15530 (propagated-inputs
15531 `(("faker" ,python-faker)))
15532 (home-page "https://github.com/benhoyt/scandir")
15533 (synopsis "Versatile test fixtures replacement")
15534 (description
15535 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15536
15537As a fixtures replacement tool, it aims to replace static, hard to maintain
15538fixtures with easy-to-use factories for complex object.
15539
15540Instead of building an exhaustive test setup with every possible combination
15541of corner cases, factory_boy allows you to use objects customized for the
15542current test, while only declaring the test-specific fields")
15543 (license license:expat)))
15544
15545(define-public python2-factory-boy
15546 (package-with-python2 python-factory-boy))
5f25fd69
JL
15547
15548(define-public python-translate-toolkit
15549 (package
15550 (name "python-translate-toolkit")
15551 (version "2.1.0")
15552 (source
15553 (origin
15554 (method url-fetch)
15555 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15556 (sha256
15557 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15558 (build-system python-build-system)
15559 (native-inputs
15560 `(("python-pytest" ,python-pytest)
15561 ("python-sphinx" ,python-sphinx)))
15562 (propagated-inputs
15563 `(("python-babel" ,python-babel)
15564 ("python-beautifulsoup4" ,python-beautifulsoup4)
15565 ("python-chardet" ,python-chardet)
15566 ("python-diff-match-patch" ,python-diff-match-patch)
15567 ("python-levenshtein" ,python-levenshtein)
15568 ("python-lxml" ,python-lxml)
15569 ("python-six" ,python-six)
15570 ("python-vobject" ,python-vobject)
15571 ("python-pyyaml" ,python-pyyaml)))
15572 (arguments
15573 ;; TODO: tests are not run, because they end with
15574 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15575 ;; 'parse_funcs'
15576 ;; during test setup.
15577 `(#:tests? #f))
15578 (home-page "http://toolkit.translatehouse.org")
15579 (synopsis "Tools and API for translation and localization engineering")
15580 (description
15581 "Tools and API for translation and localization engineering. It contains
15582several utilities, as well as an API for building localization tools.")
15583 (license license:gpl2+)))
15584
15585(define-public python2-translate-toolkit
15586 (package-with-python2 python-translate-toolkit))
3b08d1a6
JL
15587
15588(define-public python-mysqlclient
15589 (package
15590 (name "python-mysqlclient")
15591 (version "1.3.10")
15592 (source
15593 (origin
15594 (method url-fetch)
15595 (uri (pypi-uri "mysqlclient" version))
15596 (sha256
15597 (base32
15598 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
15599 (build-system python-build-system)
15600 (native-inputs
15601 `(("mariadb" ,mariadb)
15602 ("nose" ,python-nose)
15603 ("mock" ,python-mock)
15604 ("py.test" ,python-pytest)))
15605 (inputs
15606 `(("mysql" ,mysql)
15607 ("libz" ,zlib)
15608 ("openssl" ,openssl)))
15609 (home-page "https://github.com/PyMySQL/mysqlclient-python")
15610 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
15611 (description "MySQLdb is an interface to the popular MySQL database server
15612for Python. The design goals are:
15613@enumerate
15614@item Compliance with Python database API version 2.0 [PEP-0249],
15615@item Thread-safety,
15616@item Thread-friendliness (threads will not block each other).
15617@end enumerate")
15618 (license license:gpl2)))
15619
15620(define-public python2-mysqlclient
15621 (package-with-python2 python-mysqlclient))
c009e934
JL
15622
15623(define-public python-hiredis
15624 (package
15625 (name "python-hiredis")
15626 (version "0.2.0")
15627 (source
15628 (origin
15629 (method url-fetch)
15630 (uri (pypi-uri "hiredis" version))
15631 (sha256
15632 (base32
15633 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
15634 (build-system python-build-system)
15635 (arguments
15636 ;; no tests
15637 `(#:tests? #f))
15638 (home-page "https://github.com/redis/hiredis-py")
15639 (synopsis "Python extension that wraps protocol parsing code in hiredis")
15640 (description "Python-hiredis is a python extension that wraps protocol
15641parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
15642 (license license:bsd-3)))
15643
15644(define-public python2-hiredis
15645 (package-with-python2 python-hiredis))
91154d4a
JL
15646
15647(define-public python-fakeredis
15648 (package
15649 (name "python-fakeredis")
15650 (version "0.8.2")
15651 (source
15652 (origin
15653 (method url-fetch)
15654 (uri (pypi-uri "fakeredis" version))
15655 (sha256
15656 (base32
15657 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
15658 (build-system python-build-system)
15659 (arguments
15660 ;; no tests
15661 `(#:tests? #f))
15662 (home-page "https://github.com/jamesls/fakeredis")
15663 (synopsis "Fake implementation of redis API for testing purposes")
15664 (description "Fakeredis is a pure python implementation of the redis-py
15665python client that simulates talking to a redis server. This was created for a
15666single purpose: to write unittests. Setting up redis is not hard, but many time
15667 you want to write unittests that do not talk to an external server (such as
15668redis). This module now allows tests to simply use this module as a reasonable
15669substitute for redis.")
15670 (license license:bsd-3)))
15671
15672(define-public python2-fakeredis
15673 (package-with-python2 python-fakeredis))
d1693269
DM
15674
15675(define-public python-behave-web-api
15676 (package
15677 (name "python-behave-web-api")
15678 (version "1.0.6")
15679 (source
15680 (origin
15681 (method url-fetch)
15682 (uri (pypi-uri "behave-web-api" version))
15683 (sha256
15684 (base32
15685 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
15686 (build-system python-build-system)
15687 (arguments
15688 `(#:phases
15689 (modify-phases %standard-phases
15690 (add-after 'unpack 'fix-dependencies
15691 (lambda _
15692 (substitute* "setup.py"
15693 (("'wheel'") "") ; We don't use it.
15694 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
15695 (propagated-inputs
15696 `(("behave" ,behave)
15697 ("python-requests" ,python-requests)))
15698 (home-page "https://github.com/jefersondaniel/behave-web-api")
15699 (synopsis "Provides testing for JSON APIs with Behave for Python")
15700 (description "This package provides testing utility modules for testing
15701JSON APIs with Behave.")
15702 (license license:expat)))
15703
15704(define-public python2-behave-web-api
15705 (package-with-python2 python-behave-web-api))
75baf319
DM
15706
15707(define-public python-flask-script
15708 (package
15709 (name "python-flask-script")
15710 (version "2.0.5")
15711 (source
15712 (origin
15713 (method url-fetch)
15714 (uri (pypi-uri "Flask-Script" version))
15715 (sha256
15716 (base32
15717 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
15718 (build-system python-build-system)
15719 (propagated-inputs
15720 `(("python-flask" ,python-flask)
15721 ("python-argcomplete" ,python-argcomplete)
15722 ("python-werkzeug" ,python-werkzeug)))
15723 (native-inputs
15724 `(("python-pytest" ,python-pytest)))
15725 (home-page
15726 "http://github.com/smurfix/flask-script")
15727 (synopsis "Scripting support for Flask")
15728 (description "The Flask-Script extension provides support for writing
15729external scripts in Flask. This includes running a development server,
15730a customised Python shell, scripts to set up your database, cronjobs,
15731and other command-line tasks that belong outside the web application
15732itself.")
15733 (license license:bsd-3)))
15734
15735(define-public python2-flask-script
15736 (package-with-python2 python-flask-script))
013e1e85
DM
15737
15738(define-public python-flask-migrate
15739 (package
15740 (name "python-flask-migrate")
15741 (version "2.0.3")
15742 (source
15743 (origin
15744 (method url-fetch)
15745 (uri (pypi-uri "Flask-Migrate" version))
15746 (sha256
15747 (base32
15748 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
15749 (build-system python-build-system)
15750 (propagated-inputs
15751 `(("python-flask" ,python-flask)
15752 ("python-alembic" ,python-alembic)
15753 ("python-sqlalchemy" ,python-sqlalchemy)
15754 ("python-flask-script" ,python-flask-script)
15755 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
15756 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
15757 (synopsis "SQLAlchemy database migrations for Flask programs using
15758Alembic")
15759 (description "This package contains SQLAlchemy database migration tools
15760for Flask programs that are using @code{python-alembic}.")
15761 (license license:expat)))
15762
15763(define-public python2-flask-migrate
15764 (package-with-python2 python-flask-migrate))
c0f5b802
LF
15765
15766(define-public python-packaging
15767 (package
15768 (name "python-packaging")
15769 (version "16.8")
15770 (source
15771 (origin
15772 (method url-fetch)
15773 (uri (pypi-uri "packaging" version))
15774 (sha256
15775 (base32
15776 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
15777 (build-system python-build-system)
15778 (native-inputs
15779 `(("python-pretend" ,python-pretend)
15780 ("python-pytest" ,python-pytest)))
15781 (propagated-inputs
15782 `(("python-pyparsing" ,python-pyparsing)
15783 ("python-six" ,python-six)))
15784 (home-page "https://github.com/pypa/packaging")
15785 (synopsis "Core utilities for Python packages")
15786 (description "Packaging is a Python module for dealing with Python packages.
15787It offers an interface for working with package versions, names, and dependency
15788information.")
15789 ;; From 'LICENSE': This software is made available under the terms of
15790 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15791 ;; Contributions to this software is made under the terms of *both* these
15792 ;; licenses.
15793 (license (list license:asl2.0 license:bsd-2))))
15794
15795(define-public python2-packaging
15796 (package-with-python2 python-packaging))
ad2ef260
AP
15797
15798(define-public python-sql
15799 (package
15800 (name "python-sql")
15801 (version "0.9")
15802 (source
15803 (origin
15804 (method url-fetch)
15805 (uri (pypi-uri "python-sql" version))
15806 (sha256
15807 (base32
15808 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
15809 (build-system python-build-system)
15810 (home-page "https://python-sql.tryton.org/")
15811 (synopsis "Library to write SQL queries in a pythonic way")
15812 (description "@code{python-sql} is a library to write SQL queries, that
15813transforms idiomatic python function calls to well-formed SQL queries.")
15814 (license license:bsd-3)))
15815
15816(define-public python2-sql
15817 (package-with-python2 python-sql))
b208f71b
AP
15818
15819(define-public python-genshi
15820 (package
15821 (name "python-genshi")
15822 (version "0.7")
15823 (source
15824 (origin
15825 (method url-fetch)
15826 (uri (string-append
15827 "https://ftp.edgewall.org/pub/genshi/Genshi-"
15828 version ".tar.gz"))
15829 (patches
15830 (search-patches
15831 ;; The first 4 patches are in the master branch upstream.
15832 ;; See this as a reference https://genshi.edgewall.org/ticket/582
15833 ;; The last 2 are NOT in any branch.
15834 ;; They were sent as attachments to a ticket opened at
15835 ;; https://genshi.edgewall.org/ticket/602#no1
15836 "python-genshi-stripping-of-unsafe-script-tags.patch"
15837 "python-genshi-disable-speedups-on-python-3.3.patch"
15838 "python-genshi-isstring-helper.patch"
15839 "python-genshi-add-support-for-python-3.4-AST.patch"
15840 "python-genshi-fix-tests-on-python-3.5.patch"
15841 "python-genshi-buildable-on-python-2.7.patch"))
15842 (sha256
15843 (base32
15844 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
15845 (build-system python-build-system)
15846 (home-page "https://genshi.edgewall.org/")
15847 (synopsis "Toolkit for generation of output for the web")
15848 (description "Genshi is a Python library that provides an integrated set
15849of components for parsing, generating, and processing HTML, XML or other
15850textual content for output generation on the web.")
15851 (license license:bsd-3)))
15852
15853;; The linter here claims that patch file names should start with the package
15854;; name. But, in this case the patches are inherited from python-genshi with
15855;; the "python-genshi-" prefix instead of "python2-genshi-".
15856(define-public python2-genshi
15857 (package-with-python2 python-genshi))
ecca63b6
AP
15858
15859(define-public python-relatorio
15860 (package
15861 (name "python-relatorio")
15862 (version "0.6.4")
15863 (source
15864 (origin
15865 (method url-fetch)
15866 (uri (pypi-uri "relatorio" version))
15867 (sha256
15868 (base32
15869 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
15870 (build-system python-build-system)
15871 (propagated-inputs
15872 `(("python-lxml" ,python-lxml)
15873 ("python-genshi" ,python-genshi)))
15874 (home-page "https://relatorio.tryton.org/")
15875 (synopsis "Templating library able to output ODT and PDF files")
15876 (description "Relatorio is a templating library which provides a way to
15877easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15878for more filetypes can be easily added by creating plugins for them.")
15879 (license license:gpl3+)))
15880
15881(define-public python2-relatorio
15882 (package-with-python2 python-relatorio))
65e7d52a
MFM
15883
15884(define-public python-radon
15885 (package
15886 (name "python-radon")
15887 (version "1.5.0")
15888 (source
15889 (origin
15890 (method url-fetch)
15891 (uri (pypi-uri "radon" version))
15892 (sha256
15893 (base32
15894 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
15895 (build-system python-build-system)
15896 (propagated-inputs
15897 `(("python-colorama" ,python-colorama)
15898 ("python-flake8-polyfill" ,python-flake8-polyfill)
15899 ("python-mando" ,python-mando-0.3.1)))
15900 (native-inputs
15901 `(("python-flake8" ,python-flake8)
15902 ("python-tox" ,python-tox)
15903 ("python-pytest" ,python-pytest)
15904 ("python-paramunittest" ,python-paramunittest)))
15905 (home-page "https://radon.readthedocs.org/")
15906 (synopsis "Code Metrics in Python")
15907 (description "Radon is a Python tool which computes various code metrics.
15908Supported metrics are:
15909@itemize @bullet
15910@item raw metrics: SLOC, comment lines, blank lines, &c.
15911@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15912@item Halstead metrics (all of them)
15913@item the Maintainability Index (a Visual Studio metric)
15914@end itemize")
15915 (license license:expat)))
15916
15917(define-public python2-radon
15918 (package-with-python2 python-radon))
50d586f6
MFM
15919
15920(define-public python-sure
15921 (package
15922 (name "python-sure")
15923 (version "1.4.6")
15924 (source
15925 (origin
15926 (method url-fetch)
15927 (uri (pypi-uri "sure" version))
15928 (sha256
15929 (base32
15930 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
15931 (build-system python-build-system)
15932 (propagated-inputs
15933 `(("python-mock" ,python-mock)
15934 ("python-six" ,python-six)))
15935 (native-inputs
15936 `(("python-nose" ,python-nose)))
15937 (home-page "https://github.com/gabrielfalcao/sure")
15938 (synopsis "Automated testing library in python for python")
15939 (description
15940 "Sure is a python library that leverages a DSL for writing assertions.
15941Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15942 (license license:gpl3+)))
15943
15944(define-public python2-sure
15945 (package-with-python2 python-sure))
a0ffc701
MFM
15946
15947(define-public python2-couleur
15948 ;; This package does not seem to support python3 at all, hence,
15949 ;; only the python2 variant definition is provided.
15950 (package
15951 (name "python2-couleur")
15952 (version "0.6.2")
15953 (source
15954 (origin
15955 (method url-fetch)
15956 (uri (pypi-uri "couleur" version))
15957 (sha256
15958 (base32
15959 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15960 (build-system python-build-system)
15961 (arguments
15962 `(#:python ,python-2))
15963 (home-page "https://github.com/gabrielfalcao/couleur")
15964 (synopsis
15965 "ANSI terminal tool for python, colored shell and other handy fancy features")
15966 (description
15967 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15968terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15969 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15970 ;; https://github.com/gabrielfalcao/couleur/issues/11
15971 (license license:lgpl3+)))
511b47de
MFM
15972
15973(define-public python-misaka
15974 (package
15975 (name "python-misaka")
15976 (version "2.1.0")
15977 (source
15978 (origin
15979 (method url-fetch)
15980 (uri (pypi-uri "misaka" version))
15981 (sha256
15982 (base32
15983 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
15984 (build-system python-build-system)
15985 (arguments
15986 `(;; Line 37 of setup.py calls self.run_command('develop')
15987 ;; in the 'check' phase. This command seems to be trying
15988 ;; to write to
15989 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15990 ;; for which it does not have the permission to write.
15991 #:tests? #f))
15992 (propagated-inputs
15993 `(("python-cffi" ,python-cffi)))
15994 (home-page "https://github.com/FSX/misaka")
15995 (synopsis "Python binding for Hoedown")
15996 (description
15997 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15998library written in C. It features a fast HTML renderer and functionality to make custom
15999renderers (e.g. man pages or LaTeX).")
16000 (license license:expat)))
16001
16002(define-public python2-misaka
16003 (package-with-python2 python-misaka))
5786b47c
MFM
16004
16005(define-public python2-steadymark
16006 ;; This is forced into being a python2 only variant
16007 ;; due to its dependence on couleur that has no support
16008 ;; for python3
16009 (package
16010 (name "python2-steadymark")
16011 (version "0.7.3")
16012 (source
16013 (origin
16014 (method url-fetch)
16015 (uri (pypi-uri "steadymark" version))
16016 (sha256
16017 (base32
16018 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16019 (build-system python-build-system)
16020 (native-inputs
16021 `(("python-couleur" ,python2-couleur)
16022 ("python-sure" ,python2-sure)
16023 ("python-misaka" ,python2-misaka)))
16024 (arguments
16025 `(#:python ,python-2
16026 #:phases
16027 (modify-phases %standard-phases
16028 (add-before 'build 'patch-setup-py
16029 (lambda _
16030 ;; Update requirements from dependency==version
16031 ;; to dependency>=version
16032 (substitute* "setup.py"
16033 (("==") ">="))
16034 #t)))))
16035 (home-page "https://github.com/gabrielfalcao/steadymark")
16036 (synopsis "Markdown-based test runner for python")
16037 (description
16038 "@code{Steadymark} allows documentation to be written in github-flavoured
16039markdown. The documentation may contain snippets of code surrounded by python
16040code blocks and @code{Steadymark} will find these snippets and run them, making
16041sure that there are no old malfunctional examples in the documentation examples.")
16042 (license license:expat)))
7e488f99
MFM
16043
16044(define-public python-nose-randomly
16045 (package
16046 (name "python-nose-randomly")
16047 (version "1.2.5")
16048 (source
16049 (origin
16050 (method url-fetch)
16051 (uri (pypi-uri "nose-randomly" version))
16052 (sha256
16053 (base32
16054 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
16055 (build-system python-build-system)
16056 (native-inputs
16057 `(("python-nose" ,python-nose)
16058 ("python-numpy" ,python-numpy)))
16059 (home-page "https://github.com/adamchainz/nose-randomly")
16060 (synopsis
16061 "Nose plugin to randomly order tests and control random.seed")
16062 (description
16063 "This is a @code{Nose} plugin to randomly order tests which can be quite
16064powerful in discovering hidden flaws in the tests themselves, while helping to
16065reduce inter-test dependencies. It also helps in controlling @code{random.seed},
16066by resetting it to a repeatable number for each test, enabling the tests to
16067create data based on random numbers and yet remain repeatable.")
16068 (license license:bsd-3)))
16069
16070(define-public python2-nose-randomly
16071 (package-with-python2 python-nose-randomly))
1e92287d
DM
16072
16073(define-public python-jsonpointer
16074 (package
16075 (name "python-jsonpointer")
16076 (version "1.10")
16077 (source
16078 (origin
16079 (method url-fetch)
16080 (uri (pypi-uri "jsonpointer" version))
16081 (sha256
16082 (base32
16083 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16084 (build-system python-build-system)
16085 (home-page "https://github.com/stefankoegl/python-json-pointer")
16086 (synopsis "Identify specific nodes in a JSON document")
16087 (description "@code{jsonpointer} allows you to access specific nodes
16088by path in a JSON document (see RFC 6901).")
16089 (license license:bsd-3)))
16090
16091(define-public python2-jsonpointer
16092 (package-with-python2 python-jsonpointer))
7d88093f 16093
841e5908
OP
16094(define-public python-jsonpatch
16095 (package
16096 (name "python-jsonpatch")
16097 (version "1.16")
16098 (source
16099 (origin
16100 (method url-fetch)
16101 ;; pypi version lacks tests.js
16102 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
16103 "archive/v" version ".tar.gz"))
16104 (file-name (string-append name "-" version ".tar.gz"))
16105 (sha256
16106 (base32
16107 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
16108 (build-system python-build-system)
16109 (native-inputs
16110 `(("python-jsonpointer" ,python-jsonpointer)))
16111 (home-page "https://github.com/stefankoegl/python-json-patch")
16112 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16113 (description "@code{jsonpatch} is a library and program that allows
16114applying JSON Patches according to RFC 6902.")
16115 (license license:bsd-3)))
16116
16117(define-public python2-jsonpatch
16118 (package-with-python2 python-jsonpatch))
16119
16120(define-public python-jsonpatch-0.4
16121 (package (inherit python-jsonpatch)
16122 (name "python-jsonpatch")
16123 (version "0.4")
16124 (source
16125 (origin
16126 (method url-fetch)
16127 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
16128 "archive/v" version ".tar.gz"))
16129 (file-name (string-append name "-" version ".tar.gz"))
16130 (sha256
16131 (base32
16132 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
16133
16134(define-public python2-jsonpatch-0.4
16135 (package-with-python2 python-jsonpatch-0.4))
16136
7d88093f
DM
16137(define-public python-rfc3987
16138 (package
16139 (name "python-rfc3987")
16140 (version "1.3.7")
16141 (source
16142 (origin
16143 (method url-fetch)
16144 (uri (pypi-uri "rfc3987" version))
16145 (sha256
16146 (base32
16147 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16148 (build-system python-build-system)
16149 (home-page "http://pypi.python.org/pypi/rfc3987")
16150 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16151 (description "@code{rfc3987} provides routines for parsing and
16152validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16153 (license license:gpl3+)))
16154
16155(define-public python2-rfc3987
16156 (package-with-python2 python-rfc3987))
0960bf8b
DM
16157
16158(define-public python-validate-email
16159 (package
16160 (name "python-validate-email")
16161 (version "1.3")
16162 (source
16163 (origin
16164 (method url-fetch)
16165 (uri (pypi-uri "validate_email" version))
16166 (sha256
16167 (base32
16168 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16169 (build-system python-build-system)
16170 (home-page "http://github.com/syrusakbary/validate_email")
16171 (synopsis "Verifies if an email address is valid and really exists")
16172 (description "@code{validate_email} can be used to verify if an email
16173address is valid and really exists.")
16174 (license license:lgpl3+)))
16175
16176(define-public python2-validate-email
16177 (package-with-python2 python-validate-email))
620b59ea
DM
16178
16179(define-public python-flex
16180 (package
16181 (name "python-flex")
16182 (version "6.10.0")
16183 (source
16184 (origin
16185 (method url-fetch)
16186 (uri (pypi-uri "flex" version))
16187 (sha256
16188 (base32
16189 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16190 (build-system python-build-system)
16191 (propagated-inputs
16192 `(("python-click" ,python-click)
16193 ("python-iso8601" ,python-iso8601)
16194 ("python-jsonpointer" ,python-jsonpointer)
16195 ("python-pyyaml" ,python-pyyaml)
16196 ("python-requests" ,python-requests)
16197 ("python-rfc3987" ,python-rfc3987)
16198 ("python-six" ,python-six)
16199 ("python-validate-email" ,python-validate-email)))
16200 (home-page "https://github.com/pipermerriam/flex")
16201 (synopsis "Validates Swagger schemata")
16202 (description "@code{flex} can be used to validate Swagger schemata.")
16203 (license license:bsd-3)))
16204
16205(define-public python2-flex
16206 (package-with-python2 python-flex))
235bc01b
DM
16207
16208(define-public python-marshmallow
16209 (package
16210 (name "python-marshmallow")
58f3d459 16211 (version "3.0.0b3")
235bc01b
DM
16212 (source
16213 (origin
16214 (method url-fetch)
16215 (uri (pypi-uri "marshmallow" version))
16216 (sha256
16217 (base32
58f3d459 16218 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
235bc01b
DM
16219 (build-system python-build-system)
16220 (propagated-inputs
16221 `(("python-dateutil" ,python-dateutil)
16222 ("python-simplejson" ,python-simplejson)))
16223 (native-inputs
928da609 16224 `(("python-pytest" ,python-pytest)
235bc01b
DM
16225 ("python-pytz" ,python-pytz)))
16226 (home-page "https://github.com/marshmallow-code/marshmallow")
16227 (synopsis "Convert complex datatypes to and from native
16228Python datatypes.")
16229 (description "@code{marshmallow} provides a library for converting
16230complex datatypes to and from native Python datatypes.")
16231 (license license:expat)))
16232
16233(define-public python2-marshmallow
16234 (package-with-python2 python-marshmallow))
d270df8d
DM
16235
16236(define-public python-bottle
16237 (package
16238 (name "python-bottle")
16239 (version "0.12.13")
16240 (source
16241 (origin
16242 (method url-fetch)
16243 (uri (pypi-uri "bottle" version))
16244 (sha256
16245 (base32
16246 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
16247 (build-system python-build-system)
16248 (home-page "http://bottlepy.org/")
16249 (synopsis "WSGI framework for small web-applications.")
16250 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
16251 (license license:expat)))
16252
16253(define-public python2-bottle
16254 (package-with-python2 python-bottle))
635b3636
DM
16255
16256(define-public python-apispec
16257 (package
16258 (name "python-apispec")
a9769a29 16259 (version "0.25.3")
635b3636
DM
16260 (source
16261 (origin
16262 (method url-fetch)
16263 (uri (pypi-uri "apispec" version))
16264 (sha256
16265 (base32
a9769a29 16266 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
635b3636
DM
16267 (build-system python-build-system)
16268 (propagated-inputs
16269 `(("python-pyyaml" ,python-pyyaml)))
16270 (native-inputs
928da609 16271 `(("python-pytest" ,python-pytest)
635b3636
DM
16272 ("python-flask" ,python-flask)
16273 ("python-marshmallow" ,python-marshmallow)
16274 ("python-tornado" ,python-tornado)
16275 ("python-bottle" ,python-bottle)
16276 ("python-mock" ,python-mock)))
16277 (home-page "https://github.com/marshmallow-code/apispec")
16278 (synopsis "Swagger 2.0 API specification generator")
16279 (description "@code{python-apispec} is a pluggable API specification
16280generator. Currently supports the OpenAPI specification (f.k.a.
16281Swagger 2.0).")
16282 (license license:expat)))
16283
16284(define-public python2-apispec
16285 (package-with-python2 python-apispec))
543c5f3f
DM
16286
16287(define-public python-flasgger
16288 (package
16289 (name "python-flasgger")
16290 (version "0.6.3")
16291 (source
16292 (origin
16293 (method url-fetch)
16294 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
16295 version ".tar.gz"))
16296 (file-name (string-append name "-" version ".tar.gz"))
16297 (sha256
16298 (base32
16299 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
16300 (build-system python-build-system)
16301 (arguments
16302 `(#:phases
16303 (modify-phases %standard-phases
16304 (replace 'check
16305 (lambda* (#:key inputs outputs #:allow-other-keys)
16306 (substitute* "Makefile"
16307 (("flake8 flasgger --ignore=F403")
16308 "flake8 flasgger --ignore=E731,F403"))
16309 (setenv "PYTHONPATH" (string-append (getcwd)
16310 ":"
16311 (getenv "PYTHONPATH")))
16312 (zero? (system* "py.test")))))))
16313 (propagated-inputs
16314 `(("python-flask" ,python-flask)
16315 ("python-pyyaml" ,python-pyyaml)
16316 ("python-jsonschema" ,python-jsonschema)
16317 ("python-mistune" ,python-mistune)
16318 ("python-six" ,python-six)))
16319 (native-inputs
16320 `(("python-decorator" ,python-decorator)
16321 ("python-flake8" ,python-flake8)
16322 ("python-flask-restful" ,python-flask-restful)
16323 ("python-flex" ,python-flex)
928da609 16324 ("python-pytest" ,python-pytest)
543c5f3f
DM
16325 ("python-pytest-cov" ,python-pytest-cov)
16326 ("python-marshmallow" ,python-marshmallow)
16327 ("python-apispec" ,python-apispec)))
16328 (home-page "https://github.com/rochacbruno/flasgger/")
16329 (synopsis "Extract Swagger specs from your Flask project")
16330 (description "@code{python-flasgger} allows extracting Swagger specs
16331from your Flask project. It is a fork of Flask-Swagger.")
16332 (license license:expat)))
16333
16334(define-public python2-flasgger
16335 (package-with-python2 python-flasgger))
4eadc8b9
DM
16336
16337(define-public python-swagger-spec-validator
16338 (package
16339 (name "python-swagger-spec-validator")
16340 (version "2.1.0")
16341 (source
16342 (origin
16343 (method url-fetch)
16344 (uri (pypi-uri "swagger-spec-validator" version))
16345 (sha256
16346 (base32
16347 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
16348 (build-system python-build-system)
16349 (propagated-inputs
16350 `(("python-jsonschema" ,python-jsonschema)
16351 ("python-six" ,python-six)))
16352 (home-page
16353 "http://github.com/Yelp/swagger_spec_validator")
16354 (synopsis "Validation of Swagger specifications")
16355 (description "@code{swagger_spec_validator} provides a library for
16356validating Swagger API specifications.")
16357 (license license:asl2.0)))
16358
16359(define-public python2-swagger-spec-validator
16360 (package-with-python2 python-swagger-spec-validator))
7ea498e5
DM
16361
16362(define-public python-apache-libcloud
16363 (package
16364 (name "python-apache-libcloud")
16365 (version "2.0.0")
16366 (source
16367 (origin
16368 (method url-fetch)
16369 (uri (pypi-uri "apache-libcloud" version))
16370 (sha256
16371 (base32
16372 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
16373 (build-system python-build-system)
16374 (arguments
16375 `(#:phases
16376 (modify-phases %standard-phases
16377 (add-after 'unpack 'patch-ssh
16378 (lambda* (#:key inputs #:allow-other-keys)
16379 (substitute* "libcloud/compute/ssh.py"
16380 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16381 "/bin/ssh" "'")))
16382 #t))
16383 (add-after 'unpack 'patch-tests
16384 (lambda _
16385 (substitute* "./libcloud/test/test_file_fixtures.py"
16386 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
16387 (("def _ascii") "def _raw_data(self, method, url, body, headers):
16388 return (httplib.OK,
16389 \"1234abcd\",
16390 {\"test\": \"value\"},
16391 httplib.responses[httplib.OK])
16392 def _ascii"))
16393 (substitute* "libcloud/test/compute/test_ssh_client.py"
16394 (("class ShellOutSSHClientTests")
16395 "@unittest.skip(\"Guix container doesn't have ssh service\")
16396class ShellOutSSHClientTests")
16397 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
16398 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
16399 (("'.xF0', '.x90', '.x8D', '.x88'")
16400 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
16401 #t)))))
16402 (inputs
16403 `(("openssh" ,openssh)))
16404 (propagated-inputs
16405 `(("python-paramiko" ,python-paramiko)
16406 ("python-requests" ,python-requests)))
16407 (native-inputs
16408 `(("python-lockfile" ,python-lockfile)
16409 ("python-mock" ,python-mock)
16410 ("python-requests-mock" ,python-requests-mock)))
16411 (home-page "https://libcloud.apache.org/")
16412 (synopsis "Unified Cloud API")
16413 (description "@code{libcloud} is a Python library for interacting with
16414many of the popular cloud service providers using a unified API.")
16415 (license license:asl2.0)))
16416
16417(define-public python2-apache-libcloud
16418 (package-with-python2 python-apache-libcloud))
7fadeab4
DM
16419
16420(define-public python-smmap2
16421 (package
16422 (name "python-smmap2")
16423 (version "2.0.3")
16424 (source
16425 (origin
16426 (method url-fetch)
16427 (uri (pypi-uri "smmap2" version))
16428 (sha256
16429 (base32
16430 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
16431 (build-system python-build-system)
16432 (native-inputs
16433 `(("python-nosexcover" ,python-nosexcover)))
16434 (home-page "https://github.com/Byron/smmap")
16435 (synopsis "Python sliding window memory map manager")
16436 (description "@code{smmap2} is a pure Python implementation of a sliding
16437window memory map manager.")
16438 (license license:bsd-3)))
16439
16440(define-public python2-smmap2
16441 (package-with-python2 python-smmap2))
fa3f5f47
RJ
16442
16443(define-public python-regex
16444 (package
16445 (name "python-regex")
16446 (version "2017.06.07")
16447 (source (origin
16448 (method url-fetch)
16449 (uri (pypi-uri "regex" version))
16450 (sha256
16451 (base32
16452 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
16453 (build-system python-build-system)
16454 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16455 (synopsis "Alternative regular expression module")
16456 (description "This regular expression implementation is backwards-
16457compatible with the standard @code{re} module, but offers additional
16458functionality like full case-folding for case-insensitive matches in Unicode.")
16459 (license license:psfl)))
16460
16461(define-public python2-regex
16462 (package-with-python2 python-regex))
f817b4d9
RH
16463
16464(define-public python2-pyopengl
16465 (package
16466 (name "python2-pyopengl")
16467 (version "3.1.0")
16468 (source
16469 (origin
16470 (method url-fetch)
16471 (uri (pypi-uri "PyOpenGL" version))
16472 (sha256
16473 (base32
16474 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
16475 (arguments
16476 `(#:python ,python-2))
16477 (build-system python-build-system)
16478 (home-page "http://pyopengl.sourceforge.net")
16479 (synopsis "Standard OpenGL bindings for Python")
16480 (description
16481 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16482related APIs. The binding is created using the standard @code{ctypes}
16483library.")
16484 (license license:bsd-3)))
7efd98be
RH
16485
16486(define-public python-rencode
16487 (package
16488 (name "python-rencode")
16489 (version "1.0.3")
16490 (source
16491 (origin
16492 (method url-fetch)
16493 (uri (pypi-uri "rencode" version))
16494 (sha256
16495 (base32
16496 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
16497 (build-system python-build-system)
16498 (native-inputs `(("pkg-config" ,pkg-config)
16499 ("python-cython", python-cython)))
16500 (home-page "https://github.com/aresch/rencode")
16501 (synopsis "Serialization of heterogeneous data structures")
16502 (description
16503 "The @code{rencode} module is a data structure serialization library,
16504similar to @code{bencode} from the BitTorrent project. For complex,
16505heterogeneous data structures with many small elements, r-encoding stake up
16506significantly less space than b-encodings. This version of rencode is a
16507complete rewrite in Cython to attempt to increase the performance over the
16508pure Python module.")
16509 (license license:bsd-3)))
16510
16511(define-public python2-rencode
16512 (package-with-python2 python-rencode))
9ea61b1c 16513
2038a48f
MFM
16514(define-public python-xenon
16515 (package
16516 (name "python-xenon")
16517 (version "0.5.1")
16518 (source
16519 (origin
16520 (method url-fetch)
16521 (uri (pypi-uri "xenon" version))
16522 (sha256
16523 (base32
16524 "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
16525 (build-system python-build-system)
16526 (native-inputs
16527 `(("python-pyyaml" ,python-pyyaml)
16528 ("python-radon" ,python-radon)
16529 ("python-requests" ,python-requests)
16530 ("python-flake8" ,python-flake8)
16531 ("python-tox" ,python-tox)))
16532 (arguments
16533 `(#:phases
16534 (modify-phases %standard-phases
16535 (add-before 'build 'patch-test-requirements
16536 (lambda* (#:key inputs #:allow-other-keys)
16537 ;; Update requirements from dependency==version to
16538 ;; dependency>=version.
16539 (substitute* "requirements.txt"
16540 (("==") ">=")
16541 ((",<1.5.0") ""))
16542 ;; Remove httpretty dependency for tests.
16543 (substitute* "setup.py"
16544 (("httpretty") ""))
16545 #t)))))
16546 (home-page "https://xenon.readthedocs.org/")
16547 (synopsis "Monitor code metrics for Python on your CI server")
16548 (description
16549 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16550Ideally, @code{xenon} is run every time code is committed. Through command
16551line options, various thresholds can be set for the complexity of code. It
16552will fail (i.e. it will exit with a non-zero exit code) when any of these
16553requirements is not met.")
16554 (license license:expat)))
16555
16556(define-public python2-xenon
16557 (package-with-python2 python-xenon))
16558
9ea61b1c
DM
16559(define-public python-flask-principal
16560 (package
16561 (name "python-flask-principal")
16562 (version "0.4.0")
16563 (source
16564 (origin
16565 (method url-fetch)
16566 (uri (pypi-uri "Flask-Principal" version))
16567 (sha256
16568 (base32
16569 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
16570 (build-system python-build-system)
16571 (propagated-inputs
16572 `(("python-blinker" ,python-blinker)))
16573 (native-inputs
16574 `(("python-flask" ,python-flask)
16575 ("python-nose" ,python-nose)))
16576 (home-page "http://packages.python.org/Flask-Principal/")
16577 (synopsis "Identity management for Flask")
16578 (description "@code{flask_principal} is a identity management library for
16579Flask. It supports managing both authentication and authorization data in a
16580thread-local variable.")
16581 (license license:expat)))
16582
16583(define-public python2-flask-principal
16584 (package-with-python2 python-flask-principal))
18c6a7b4
DM
16585
16586(define-public python-flask-httpauth
16587 (package
16588 (name "python-flask-httpauth")
16589 (version "3.2.3")
16590 (source
16591 (origin
16592 (method url-fetch)
16593 (uri (pypi-uri "Flask-HTTPAuth" version))
16594 (sha256
16595 (base32
16596 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
16597 (build-system python-build-system)
16598 (native-inputs
16599 `(("python-flask" ,python-flask)))
16600 (home-page "http://github.com/miguelgrinberg/flask-httpauth/")
16601 (synopsis "Basic and Digest HTTP authentication for Flask routes")
16602 (description "@code{flask_httpauth} provides Basic and Digest HTTP
16603authentication for Flask routes.")
16604 (license license:expat)))
16605
16606(define-public python2-flask-httpauth
16607 (package-with-python2 python-flask-httpauth))
07e62ae1
CZ
16608
16609(define-public python-pysocks
16610 (package
16611 (name "python-pysocks")
16612 (version "1.6.7")
16613 (source
16614 (origin
16615 (method url-fetch)
16616 (uri (pypi-uri "PySocks" version))
16617 (sha256
16618 (base32
16619 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
16620 (build-system python-build-system)
16621 (arguments `(#:tests? #f))
16622 (home-page "https://github.com/Anorov/PySocks")
16623 (synopsis "SOCKS client module")
16624 (description "@code{pysocks} is an updated and semi-actively maintained
16625version of @code{SocksiPy} with bug fixes and extra features.")
16626 (license license:bsd-3)))
16627
16628(define-public python2-pysocks
16629 (package-with-python2 python-pysocks))
7a276cd9
CZ
16630
16631(define-public python-pyaes
16632 (package
16633 (name "python-pyaes")
16634 (version "1.6.0")
16635 (source
16636 (origin
16637 (method url-fetch)
16638 (uri (pypi-uri "pyaes" version))
16639 (sha256
16640 (base32
16641 "0bp9bjqy1n6ij1zb86wz9lqa1dhla8qr1d7w2kxyn7jbj56sbmcw"))))
16642 (build-system python-build-system)
16643 (home-page "https://github.com/ricmoo/pyaes")
16644 (synopsis "Implementation of AES in Python")
16645 (description "This package contains a pure-Python implementation of the
16646AES block cipher algorithm and the common modes of operation (CBC, CFB, CTR,
16647ECB and OFB).")
16648 (license license:expat)))
16649
16650(define-public python2-pyaes
16651 (package-with-python2 python-pyaes))
4967946b
OP
16652
16653(define-public python-uritemplate
16654 (package
16655 (name "python-uritemplate")
16656 (version "3.0.0")
16657 (source
16658 (origin
16659 (method url-fetch)
16660 (uri (pypi-uri "uritemplate" version))
16661 (sha256
16662 (base32
16663 "0781gm9g34wa0asc19dx81ng0nqq07igzv3bbvdqmz13pv7469n0"))))
16664 (build-system python-build-system)
16665 (home-page "https://uritemplate.readthedocs.org")
16666 (synopsis "Library to deal with URI Templates")
16667 (description "@code{uritemplate} provides Python library to deal with URI
16668Templates.")
16669 (license license:bsd-2)))
16670
16671(define-public python2-uritemplate
16672 (package-with-python2 python-uritemplate))
ab7f51fa
CR
16673
16674(define-public python-pydiff
16675 (package
16676 (name "python-pydiff")
16677 (version "0.2")
16678 (source
16679 (origin
16680 (method url-fetch)
16681 (uri (pypi-uri "pydiff" version))
16682 (sha256
16683 (base32
16684 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
16685 (build-system python-build-system)
16686 (home-page "https://github.com/myint/pydiff")
16687 (synopsis "Library to diff two Python files at the bytecode level")
16688 (description
16689 "@code{pydiff} makes it easy to look for actual code changes while
16690ignoring formatting changes.")
16691 (license license:expat)))
16692
16693(define-public python2-pydiff
16694 (package-with-python2 python-pydiff))
8e6ceb47
CR
16695
16696(define-public python-nose-timer
16697 (package
16698 (name "python-nose-timer")
16699 (version "0.7.0")
16700 (source
16701 (origin
16702 (method url-fetch)
16703 (uri (pypi-uri "nose-timer" version))
16704 (patches
16705 (search-patches
16706 ;; This patch will not be needed in the next version.
16707 ;; It is taken from the master branch.
16708 "python-nose-timer-drop-ordereddict.patch"))
16709 (sha256
16710 (base32
16711 "1s32ymsnby8lz2qk55ifj9zi50dqcg6swnj5cz2rmwxg2jsslsxp"))))
16712 (build-system python-build-system)
16713 (propagated-inputs
16714 `(("python-nose" ,python-nose)
16715 ("python-termcolor" ,python-termcolor)))
16716 (home-page "https://github.com/mahmoudimus/nose-timer")
16717 (synopsis "Timer plugin for nosetests")
16718 (description "Shows how much time was needed to run individual tests.")
16719 (license license:expat)))
16720
16721(define-public python2-nose-timer
16722 (package-with-python2 python-nose-timer))
b84ef9e2
CR
16723
16724(define-public python-tqdm
16725 (package
16726 (name "python-tqdm")
16727 (version "4.15.0")
16728 (source
16729 (origin
16730 (method url-fetch)
16731 (uri (pypi-uri "tqdm" version))
16732 (sha256
16733 (base32
16734 "0lwrmby8qz23gvqwkpivfrv4q8nfh90cz9ml6slwvwmcxxsdrhbf"))))
16735 (build-system python-build-system)
16736 (native-inputs
16737 `(("python-flake8" ,python-flake8)
16738 ("python-nose" ,python-nose)
16739 ("python-nose-timer" ,python-nose-timer)
16740 ("python-coverage" ,python-coverage)
16741 ("python-virtualenv" ,python-virtualenv)))
16742 (home-page "https://github.com/tqdm/tqdm")
16743 (synopsis "Fast, extensible progress meter")
16744 (description
16745 "Make loops show a progress bar on the console by just wrapping any
16746iterable with @code{|tqdm(iterable)|}. Offers many options to define
16747design and layout.")
16748 (license (list license:mpl2.0 license:expat))))
16749
16750(define-public python2-tqdm
16751 (package-with-python2 python-tqdm))
78f46e65
CR
16752
16753(define-public python-pkginfo
16754 (package
16755 (name "python-pkginfo")
16756 (version "1.4.1")
16757 (source
16758 (origin
16759 (method url-fetch)
16760 (uri (pypi-uri "pkginfo" version))
16761 (sha256
16762 (base32
16763 "17pqjfpq3c6xzdmk8pski6jcjgjv78q00zjf2bgzb668pzm6l6mv"))))
16764 (build-system python-build-system)
16765 (arguments
16766 ;; The tests are broken upstream.
16767 '(#:tests? #f))
16768 (home-page
16769 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
16770 (synopsis
16771 "Query metadatdata from sdists, bdists, and installed packages")
16772 (description
16773 "API to query the distutils metadata written in @file{PKG-INFO} inside a
16774source distriubtion (an sdist) or a binary distribution (e.g., created by
16775running bdist_egg). It can also query the EGG-INFO directory of an installed
16776distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
16777created by running @code{python setup.py develop}).")
16778 (license license:expat)))
16779
16780(define-public python2-pkginfo
16781 (package-with-python2 python-pkginfo))
3ef85c11
CR
16782
16783(define-public python-twine
16784 (package
16785 (name "python-twine")
16786 (version "1.9.1")
16787 (source
16788 (origin
16789 (method url-fetch)
16790 (uri (pypi-uri "twine" version))
16791 (sha256
16792 (base32
16793 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
16794 (build-system python-build-system)
16795 (propagated-inputs
16796 `(("python-tqdm" ,python-tqdm)
16797 ("python-pkginfo", python-pkginfo)
16798 ("python-requests" ,python-requests)
16799 ("python-requests-toolbelt" ,python-requests-toolbelt)))
16800 (home-page "https://github.com/pypa/twine")
16801 (synopsis "Collection of utilities for interacting with PyPI")
16802 (description
16803 "@code{twine} currently supports registering projects and uploading
16804distributions. It authenticates the user over HTTPS, allows them to pre-sign
16805their files and supports any packaging format (including wheels).")
16806 (license license:asl2.0)))
16807
16808(define-public python2-twine
16809 (package-with-python2 python-twine))
ab28aa22
CR
16810
16811(define-public python-linecache2
16812 (package
16813 (name "python-linecache2")
16814 (version "1.0.0")
16815 (source
16816 (origin
16817 (method url-fetch)
16818 (uri (pypi-uri "linecache2" version))
16819 (sha256
16820 (base32
16821 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
16822 (build-system python-build-system)
16823 (arguments
16824 `(;; The tests depend on unittest2, and our version is a bit too old.
16825 #:tests? #f))
16826 (native-inputs
3e6218b2 16827 `(("python-pbr" ,python-pbr-minimal)))
ab28aa22
CR
16828 (home-page
16829 "https://github.com/testing-cabal/linecache2")
16830 (synopsis "Backports of the linecache module")
16831 (description
16832 "The linecache module allows one to get any line from any file, while
16833attempting to optimize internally, using a cache, the common case where many
16834lines are read from a single file.")
16835 (license license:psfl)))
16836
16837(define-public python2-linecache2
16838 (package-with-python2 python-linecache2))
1898eaa3
CR
16839
16840(define-public python-traceback2
16841 (package
16842 (name "python-traceback2")
16843 (version "1.4.0")
16844 (source
16845 (origin
16846 (method url-fetch)
16847 (uri (pypi-uri "traceback2" version))
16848 (sha256
16849 (base32
16850 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
16851 (build-system python-build-system)
16852 (arguments
16853 `(;; python-traceback2 and python-unittest2 depend on one another.
16854 #:tests? #f))
16855 (native-inputs
3e6218b2 16856 `(("python-pbr" ,python-pbr-minimal)))
1898eaa3
CR
16857 (propagated-inputs
16858 `(("python-linecache2" ,python-linecache2)))
16859 (home-page
16860 "https://github.com/testing-cabal/traceback2")
16861 (synopsis "Backports of the traceback module")
16862 (description
16863 "This module provides a standard interface to extract, format and print
16864stack traces of Python programs. It exactly mimics the behavior of the Python
16865interpreter when it prints a stack trace.")
16866 (license license:psfl)))
16867
16868(define-public python2-traceback2
16869 (package-with-python2 python-traceback2))
9d0866ce
KM
16870
16871(define-public python-ratelimiter
16872 (package
16873 (name "python-ratelimiter")
16874 (version "1.2.0")
16875 (source
16876 (origin
16877 (method url-fetch)
16878 (uri (pypi-uri "ratelimiter" version))
16879 (sha256
16880 (base32
16881 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
16882 (build-system python-build-system)
16883 (arguments
16884 '(#:tests? #f)) ; There are no tests in the pypi archive.
16885 (home-page "https://github.com/RazerM/ratelimiter")
16886 (synopsis "Simple rate limiting object")
16887 (description
16888 "The @code{ratelimiter} module ensures that an operation will not be
16889executed more than a given number of times during a given period.")
16890 (license license:asl2.0)))
16891
16892(define-public python2-ratelimiter
16893 (package-with-python2 python-ratelimiter))