gnu: ptpython: Disable tests.
[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>
48b311b1 3;;; Copyright © 2013, 2014, 2015, 2016 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>
a480bc41 6;;; Copyright © 2014 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>
534db463 10;;; Copyright © 2015, 2016 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>
6a44697d 14;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
02a8a187 15;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
b9893908 16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
264ae686 17;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
1872f1bb 18;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
daeeea71 19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
b31fbea5 20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
88bb4197 21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
b8fdbca3 22;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
0de78c95 23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
9250b0f3 24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
47d0b292 25;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
42c4b246 26;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
6eb7af2a 27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
3f641af0 28;;; Copyright © 2016 David Craven <david@craven.ch>
dddcb25c 29;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
4efb9c54 30;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
b04a52a6 31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
ee5fb7ee 32;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
2f6dd9cd 33;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
d3eff97a 34;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
6c2e82bc 35;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
a01b6da7
NK
36;;;
37;;; This file is part of GNU Guix.
38;;;
39;;; GNU Guix is free software; you can redistribute it and/or modify it
40;;; under the terms of the GNU General Public License as published by
41;;; the Free Software Foundation; either version 3 of the License, or (at
42;;; your option) any later version.
43;;;
44;;; GNU Guix is distributed in the hope that it will be useful, but
45;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47;;; GNU General Public License for more details.
48;;;
49;;; You should have received a copy of the GNU General Public License
50;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51
1ffa7090 52(define-module (gnu packages python)
3f641af0 53 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 54 #:use-module (gnu packages)
8e451885 55 #:use-module (gnu packages algebra)
d79a343b 56 #:use-module (gnu packages adns)
89b2e0b0 57 #:use-module (gnu packages attr)
d96034ed 58 #:use-module (gnu packages backup)
3969ca54 59 #:use-module (gnu packages bash)
1ffa7090 60 #:use-module (gnu packages compression)
4ed20663 61 #:use-module (gnu packages databases)
ddc63a56 62 #:use-module (gnu packages django)
5e1c9367 63 #:use-module (gnu packages file)
4ed20663 64 #:use-module (gnu packages fontutils)
4ed20663
AE
65 #:use-module (gnu packages gcc)
66 #:use-module (gnu packages ghostscript)
6eb7af2a 67 #:use-module (gnu packages gl)
4ed20663 68 #:use-module (gnu packages glib)
6eb7af2a 69 #:use-module (gnu packages gstreamer)
4ed20663 70 #:use-module (gnu packages gtk)
421a80a2 71 #:use-module (gnu packages icu4c)
c937562e 72 #:use-module (gnu packages image)
4ed20663 73 #:use-module (gnu packages imagemagick)
d79a343b 74 #:use-module (gnu packages libevent)
b10ab723 75 #:use-module (gnu packages libffi)
89b2e0b0 76 #:use-module (gnu packages linux)
ed118043 77 #:use-module (gnu packages man)
0da98533 78 #:use-module (gnu packages maths)
4ed20663 79 #:use-module (gnu packages multiprecision)
45203542 80 #:use-module (gnu packages networking)
be7134bf 81 #:use-module (gnu packages ncurses)
b04a52a6 82 #:use-module (gnu packages openstack)
d488d5d6 83 #:use-module (gnu packages password-utils)
c9b1b4f9 84 #:use-module (gnu packages pcre)
4ed20663 85 #:use-module (gnu packages perl)
b10ab723 86 #:use-module (gnu packages pkg-config)
06ff0837 87 #:use-module (gnu packages protobuf)
4ed20663 88 #:use-module (gnu packages readline)
6eb7af2a 89 #:use-module (gnu packages sdl)
80ce42bd 90 #:use-module (gnu packages shells)
c9b1b4f9 91 #:use-module (gnu packages statistics)
8f9ac901 92 #:use-module (gnu packages tex)
1c65314c 93 #:use-module (gnu packages texinfo)
cc2b77df 94 #:use-module (gnu packages tls)
e25f0174 95 #:use-module (gnu packages version-control)
02f8f804 96 #:use-module (gnu packages video)
8d12be1e 97 #:use-module (gnu packages web)
ce0614dd 98 #:use-module (gnu packages base)
26b307e2 99 #:use-module (gnu packages xml)
6fa14469 100 #:use-module (gnu packages xorg)
0bdc1671 101 #:use-module (gnu packages xdisorg)
4ed20663 102 #:use-module (gnu packages zip)
afa181ff 103 #:use-module (gnu packages tcl)
63bcec71 104 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
105 #:use-module (guix packages)
106 #:use-module (guix download)
ea5456c8 107 #:use-module (guix git-download)
11bb85a1 108 #:use-module (guix utils)
acc26ff1 109 #:use-module (guix build-system gnu)
d8c4998f 110 #:use-module (guix build-system cmake)
898238b9 111 #:use-module (guix build-system python)
1c65314c
FB
112 #:use-module (guix build-system trivial)
113 #:use-module (srfi srfi-1))
a01b6da7 114
45848023 115(define-public python-2.7
a01b6da7
NK
116 (package
117 (name "python")
f0499100 118 (version "2.7.12")
a01b6da7
NK
119 (source
120 (origin
121 (method url-fetch)
9b43a0ff 122 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
123 version "/Python-" version ".tar.xz"))
124 (sha256
125 (base32
f0499100 126 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
127 (patches (search-patches "python-2.7-search-paths.patch"
128 "python-2-deterministic-build-info.patch"
15e57f57 129 "python-2.7-site-prefixes.patch"
c3052d6b 130 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
131 (modules '((guix build utils)))
132 ;; suboptimal to delete failing tests here, but if we delete them in the
133 ;; arguments then we need to make sure to strip out that phase when it
134 ;; gets inherited by python and python-minimal.
135 (snippet
136 '(begin
137 (for-each delete-file
138 '("Lib/test/test_compileall.py"
f0499100 139 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
140 "Lib/test/test_distutils.py"
141 "Lib/test/test_import.py"
142 "Lib/test/test_shutil.py"
143 "Lib/test/test_socket.py"
1bb163b0 144 "Lib/test/test_subprocess.py"))
10a42aa2 145 #t))))
02f0c3b2
LC
146 (outputs '("out"
147 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 148 (build-system gnu-build-system)
3fdc99da 149 (arguments
10a42aa2 150 `(;; 356 tests OK.
e7e7a1eb
EF
151 ;; 6 tests failed:
152 ;; test_compileall test_distutils test_import test_shutil test_socket
153 ;; test_subprocess
154 ;; 39 tests skipped:
ff6f33cf
ED
155 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
156 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
157 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
158 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
159 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
160 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
161 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
162 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
163 ;; test_winreg test_winsound test_zipfile64
164 ;; 4 skips unexpected on linux2:
165 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 166 #:test-target "test"
3fdc99da 167 #:configure-flags
6a20289d
LC
168 (list "--enable-shared" ;allow embedding
169 "--with-system-ffi" ;build ctypes
aaf75c89 170 "--with-ensurepip=install" ;install pip and setuptools
6a20289d
LC
171 (string-append "LDFLAGS=-Wl,-rpath="
172 (assoc-ref %outputs "out") "/lib"))
fd982732 173
d2cc9c7c
LC
174 #:modules ((ice-9 ftw) (ice-9 match)
175 (guix build utils) (guix build gnu-build-system))
fd982732 176 #:phases
46472ecd
MW
177 (modify-phases %standard-phases
178 (add-before
179 'configure 'patch-lib-shells
180 (lambda _
181 ;; Filter for existing files, since some may not exist in all
182 ;; versions of python that are built with this recipe.
183 (substitute* (filter file-exists?
184 '("Lib/subprocess.py"
185 "Lib/popen2.py"
186 "Lib/distutils/tests/test_spawn.py"
187 "Lib/test/test_subprocess.py"))
188 (("/bin/sh") (which "sh")))
dedc8320
LC
189
190 ;; Use zero as the timestamp in .pyc files so that builds are
191 ;; deterministic. TODO: Remove it when this variable is set in
192 ;; gnu-build-system.scm.
a665996f 193 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 194 #t))
5b4e2791
LC
195 (add-before 'configure 'do-not-record-configure-flags
196 (lambda* (#:key configure-flags #:allow-other-keys)
197 ;; Remove configure flags from the installed '_sysconfigdata.py'
198 ;; and 'Makefile' so we don't end up keeping references to the
199 ;; build tools.
200 ;;
201 ;; Preserve at least '--with-system-ffi' since otherwise the
202 ;; thing tries to build libffi, fails, and we end up with a
203 ;; Python that lacks ctypes.
204 (substitute* "configure"
205 (("^CONFIG_ARGS=.*$")
206 (format #f "CONFIG_ARGS='~a'\n"
207 (if (member "--with-system-ffi" configure-flags)
208 "--with-system-ffi"
209 ""))))
210 #t))
46472ecd
MW
211 (add-before
212 'check 'pre-check
213 (lambda _
214 ;; 'Lib/test/test_site.py' needs a valid $HOME
215 (setenv "HOME" (getcwd))
216 #t))
217 (add-after
218 'unpack 'set-source-file-times-to-1980
219 ;; XXX One of the tests uses a ZIP library to pack up some of the
220 ;; source tree, and fails with "ZIP does not support timestamps
221 ;; before 1980". Work around this by setting the file times in the
222 ;; source tree to sometime in early 1980.
223 (lambda _
224 (let ((circa-1980 (* 10 366 24 60 60)))
225 (ftw "." (lambda (file stat flag)
226 (utime file circa-1980 circa-1980)
227 #t))
02f0c3b2 228 #t)))
9ffe61b0
LC
229 (add-after 'install 'remove-tests
230 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
231 ;; because these files are used by some libraries out there.
232 (lambda* (#:key outputs #:allow-other-keys)
233 (let ((out (assoc-ref outputs "out")))
234 (match (scandir (string-append out "/lib")
235 (lambda (name)
236 (string-prefix? "python" name)))
237 ((pythonX.Y)
238 (let ((testdir (string-append out "/lib/" pythonX.Y
239 "/test")))
240 (with-directory-excursion testdir
241 (for-each delete-file-recursively
242 (scandir testdir
243 (match-lambda
244 ((or "." "..") #f)
245 (file
246 (not
247 (string-prefix? "test_support."
248 file))))))
249 (call-with-output-file "__init__.py" (const #t))
250 #t)))))))
216c283b
LC
251 (add-before 'strip 'make-libraries-writable
252 (lambda* (#:key outputs #:allow-other-keys)
253 ;; Make .so files writable so they can be stripped.
254 (let ((out (assoc-ref outputs "out")))
255 (for-each (lambda (file)
256 (chmod file #o755))
257 (find-files (string-append out "/lib")
258 "\\.so"))
259 #t)))
02f0c3b2
LC
260 (add-after 'install 'move-tk-inter
261 (lambda* (#:key outputs #:allow-other-keys)
262 ;; When Tkinter support is built move it to a separate output so
263 ;; that the main output doesn't contain a reference to Tcl/Tk.
264 (let ((out (assoc-ref outputs "out"))
265 (tk (assoc-ref outputs "tk")))
266 (when tk
267 (match (find-files out "tkinter.*\\.so")
268 ((tkinter.so)
269 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
270 ;; want it under TK/lib/pythonX.Y/site-packages.
271 (let* ((len (string-length out))
272 (target (string-append
273 tk "/"
274 (string-drop
275 (dirname (dirname tkinter.so))
276 len)
277 "/site-packages")))
278 (install-file tkinter.so target)
279 (delete-file tkinter.so)))))
280 #t))))))
a01b6da7 281 (inputs
3fdc99da
CR
282 `(("bzip2" ,bzip2)
283 ("gdbm" ,gdbm)
b10ab723 284 ("libffi" ,libffi) ; for ctypes
b88e1b0a 285 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 286 ("openssl" ,openssl)
3fdc99da 287 ("readline" ,readline)
afa181ff
LC
288 ("zlib" ,zlib)
289 ("tcl" ,tcl)
290 ("tk" ,tk))) ; for tkinter
b10ab723
CR
291 (native-inputs
292 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
293 (native-search-paths
294 (list (search-path-specification
295 (variable "PYTHONPATH")
af070955 296 (files '("lib/python2.7/site-packages")))))
f0499100 297 (home-page "https://www.python.org")
afa181ff 298 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
299 (description
300 "Python is a remarkably powerful dynamic programming language that
301is used in a wide variety of application domains. Some of its key
302distinguishing features include: clear, readable syntax; strong
303introspection capabilities; intuitive object orientation; natural
304expression of procedural code; full modularity, supporting hierarchical
305packages; exception-based error handling; and very high level dynamic
306data types.")
3f641af0 307 (license license:psfl)))
acc26ff1 308
45848023
HG
309;; Current 2.x version.
310(define-public python-2 python-2.7)
311
72df6680 312(define-public python-3.5
b24d1cfc 313 (package (inherit python-2)
72df6680 314 (version "3.5.2")
717003e3
LC
315 (source (origin
316 (method url-fetch)
317 (uri (string-append "https://www.python.org/ftp/python/"
318 version "/Python-" version ".tar.xz"))
fc1adab1
AK
319 (patches (search-patches
320 "python-fix-tests.patch"
72df6680 321 "python-3.5-fix-tests.patch"
fc1adab1
AK
322 "python-3-deterministic-build-info.patch"
323 "python-3-search-paths.patch"))
717003e3
LC
324 (patch-flags '("-p0"))
325 (sha256
326 (base32
72df6680 327 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
328 (arguments (substitute-keyword-arguments (package-arguments python-2)
329 ((#:tests? _) #t)))
1aebc0cb
AE
330 (native-search-paths
331 (list (search-path-specification
332 (variable "PYTHONPATH")
0e05d01e
SB
333 (files (list (string-append "lib/python"
334 (version-major+minor version)
335 "/site-packages"))))))))
f26a77ff 336
72df6680
LF
337(define-public python-3.4
338 (package (inherit python-3.5)
339 (version "3.4.5")
340 (source (origin
341 (method url-fetch)
342 (uri (string-append "https://www.python.org/ftp/python/"
343 version "/Python-" version ".tar.xz"))
344 (patches (search-patches
345 "python-fix-tests.patch"
346 "python-3.4-fix-tests.patch"
347 "python-3-deterministic-build-info.patch"
348 "python-3-search-paths.patch"))
349 (patch-flags '("-p0"))
350 (sha256
351 (base32
352 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
353
45848023 354;; Current 3.x version.
72df6680 355(define-public python-3 python-3.5)
45848023
HG
356
357;; Current major version.
358(define-public python python-3)
359
95288fcc
LC
360;; Minimal variants of Python, mostly used to break the cycle between Tk and
361;; Python (Tk -> libxcb -> Python.)
362
363(define-public python2-minimal
364 (package (inherit python-2)
365 (name "python-minimal")
02f0c3b2 366 (outputs '("out"))
95288fcc
LC
367 (arguments
368 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
369 ((#:configure-flags cf)
370 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
371 (inputs '()))) ;none of the optional dependencies
372
373(define-public python-minimal
898238b9 374 (package (inherit python)
95288fcc 375 (name "python-minimal")
02f0c3b2 376 (outputs '("out"))
95288fcc 377
d0b73960 378 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
379 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
380 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
381 (inputs `(("libffi" ,libffi)
382 ("openssl" ,openssl)
95288fcc
LC
383 ("zlib" ,zlib)))))
384
64cb064c
LC
385(define* (wrap-python3 python
386 #:optional
387 (name (string-append (package-name python) "-wrapper")))
898238b9 388 (package (inherit python)
95288fcc 389 (name name)
898238b9
AE
390 (source #f)
391 (build-system trivial-build-system)
02f0c3b2 392 (outputs '("out"))
3969ca54 393 (inputs `(("bash" ,bash)))
3c0f2329 394 (propagated-inputs `(("python" ,python)))
898238b9
AE
395 (arguments
396 `(#:modules ((guix build utils))
397 #:builder
398 (begin
399 (use-modules (guix build utils))
400 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
401 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
402 (mkdir-p bin)
403 (for-each
404 (lambda (old new)
405 (symlink (string-append python old)
406 (string-append bin "/" new)))
3969ca54
SB
407 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
408 `("python" ,"pydoc" ,"idle" ,"pip"))
409 ;; python-config outputs search paths based upon its location,
410 ;; use a bash wrapper to avoid changing its outputs.
411 (let ((bash (string-append (assoc-ref %build-inputs "bash")
412 "/bin/bash"))
413 (old (string-append python "python3-config"))
414 (new (string-append bin "/python-config")))
415 (with-output-to-file new
416 (lambda ()
417 (format #t "#!~a~%" bash)
418 (format #t "exec \"~a\" \"$@\"~%" old)
419 (chmod new #o755)
420 #t)))))))
0d56e3e1
LC
421 (synopsis "Wrapper for the Python 3 commands")
422 (description
423 "This package provides wrappers for the commands of Python@tie{}3.x such
424that they can be invoked under their usual name---e.g., @command{python}
425instead of @command{python3}.")))
426
95288fcc
LC
427(define-public python-wrapper (wrap-python3 python))
428(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 429
aaf625b8
RW
430(define-public python-psutil
431 (package
432 (name "python-psutil")
88535a44 433 (version "4.3.0")
aaf625b8
RW
434 (source
435 (origin
436 (method url-fetch)
f56777be 437 (uri (pypi-uri "psutil" version))
aaf625b8
RW
438 (sha256
439 (base32
88535a44 440 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 441 (build-system python-build-system)
fb08c4fe
MB
442 (arguments
443 ;; FIXME: some tests does not return and times out.
444 '(#:tests? #f))
88535a44 445 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
446 (synopsis "Library for retrieving information on running processes")
447 (description
448 "psutil (Python system and process utilities) is a library for retrieving
449information on running processes and system utilization (CPU, memory, disks,
450network) in Python. It is useful mainly for system monitoring, profiling and
451limiting process resources and management of running processes. It implements
452many functionalities offered by command line tools such as: ps, top, lsof,
453netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
454pidof, tty, taskset, pmap.")
3f641af0 455 (license license:bsd-3)))
aaf625b8
RW
456
457(define-public python2-psutil
458 (package-with-python2 python-psutil))
898238b9 459
f9da1d8a
ED
460(define-public python-passlib
461 (package
462 (name "python-passlib")
1c9f78ec 463 (version "1.7.0")
f9da1d8a
ED
464 (source
465 (origin
466 (method url-fetch)
690e8c66 467 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
468 (sha256
469 (base32
1c9f78ec 470 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
f9da1d8a
ED
471 (build-system python-build-system)
472 (native-inputs
f3b98f4f 473 `(("python-nose" ,python-nose)))
f22efa01 474 (propagated-inputs
f9da1d8a
ED
475 `(("python-py-bcrypt" ,python-py-bcrypt)))
476 (arguments
477 `(#:phases
478 (alist-cons-before
479 'check 'set-PYTHON_EGG_CACHE
480 ;; some tests require access to "$HOME/.cython"
481 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
482 %standard-phases)))
483 (home-page "https://bitbucket.org/ecollins/passlib")
484 (synopsis
485 "Comprehensive password hashing framework")
486 (description
487 "Passlib is a password hashing library for Python 2 & 3, which provides
488cross-platform implementations of over 30 password hashing algorithms, as well
489as a framework for managing existing password hashes. It's designed to be
490useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
491to providing full-strength password hashing for multi-user application.")
3f641af0 492 (license license:bsd-3)))
f9da1d8a
ED
493
494(define-public python2-passlib
495 (package-with-python2 python-passlib))
496
feb0d9c3
ED
497(define-public python-py-bcrypt
498 (package
499 (name "python-py-bcrypt")
500 (version "0.4")
501 (source
502 (origin
503 (method url-fetch)
504 (uri (string-append
505 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
506 version
507 ".tar.gz"))
508 (sha256
509 (base32
510 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
511 (build-system python-build-system)
feb0d9c3
ED
512 (home-page "https://code.google.com/p/py-bcrypt")
513 (synopsis
514 "Bcrypt password hashing and key derivation")
515 (description
516 "A python wrapper of OpenBSD's Blowfish password hashing code. This
517system hashes passwords using a version of Bruce Schneier's Blowfish block
518cipher with modifications designed to raise the cost of off-line password
519cracking and frustrate fast hardware implementation. The computation cost of
520the algorithm is parametised, so it can be increased as computers get faster.
521The intent is to make a compromise of a password database less likely to
522result in an attacker gaining knowledge of the plaintext passwords (e.g. using
523John the Ripper).")
524 ;; "sha2.c" is under BSD-3;
525 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
526 ;; the rest is under ISC.
3f641af0 527 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
528
529(define-public python2-py-bcrypt
530 (package-with-python2 python-py-bcrypt))
531
532
429fdea1
ED
533(define-public python-paramiko
534 (package
535 (name "python-paramiko")
81b9bbbd 536 (version "1.16.0")
429fdea1
ED
537 (source
538 (origin
539 (method url-fetch)
81b9bbbd 540 (uri (pypi-uri "paramiko" version))
429fdea1
ED
541 (sha256
542 (base32
81b9bbbd 543 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1 544 (build-system python-build-system)
49910e6a
MB
545 (arguments
546 '(;; FIXME: One test fails with "EOFError not raised by connect".
547 #:tests? #f))
548 ;; #:phases
549 ;; (modify-phases %standard-phases
550 ;; (replace 'check
551 ;; (lambda _
552 ;; (zero? (system* "python" "test.py")))))))
a3fc12da 553 (propagated-inputs
f22efa01
HG
554 `(("python-pycrypto" ,python-pycrypto)
555 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
556 (home-page "http://www.paramiko.org/")
557 (synopsis "SSHv2 protocol library")
558 (description "Paramiko is a python implementation of the SSHv2 protocol,
559providing both client and server functionality. While it leverages a Python C
560extension for low level cryptography (PyCrypto), Paramiko itself is a pure
561Python interface around SSH networking concepts.")
3f641af0 562 (license license:lgpl2.1+)))
429fdea1
ED
563
564(define-public python2-paramiko
565 (package-with-python2 python-paramiko))
566
567
de73dbf6
ED
568(define-public python-httplib2
569 (package
570 (name "python-httplib2")
286f1bac 571 (version "0.9.2")
de73dbf6
ED
572 (source
573 (origin
574 (method url-fetch)
286f1bac 575 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
576 (sha256
577 (base32
286f1bac 578 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 579 (build-system python-build-system)
286f1bac 580 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
581 (synopsis "Comprehensive HTTP client library")
582 (description
583 "A comprehensive HTTP client library supporting many features left out of
584other HTTP libraries.")
585 (license license:expat)))
586
587(define-public python2-httplib2
588 (package-with-python2 python-httplib2))
589
67039875
ED
590(define-public python-ecdsa
591 (package
592 (name "python-ecdsa")
593 (version "0.13")
594 (source
595 (origin
596 (method url-fetch)
597 (uri (string-append
598 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
599 version
600 ".tar.gz"))
601 (sha256
602 (base32
603 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
604 (build-system python-build-system)
67039875
ED
605 (inputs
606 `(("openssl" ,openssl)))
607 (home-page
608 "http://github.com/warner/python-ecdsa")
609 (synopsis
610 "ECDSA cryptographic signature library (pure python)")
611 (description
612 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
613Curve Digital Signature Algorithm), implemented purely in Python. With this
614library, you can quickly create keypairs (signing key and verifying key), sign
615messages, and verify the signatures. The keys and signatures are very short,
616making them easy to handle and incorporate into other protocols.")
617 (license license:expat)))
618
619(define-public python2-ecdsa
620 (package-with-python2 python-ecdsa))
621
52323f32
ED
622(define-public python-ccm
623 (package
624 (name "python-ccm")
db5567f7 625 (version "2.1.6")
52323f32
ED
626 (source
627 (origin
628 (method url-fetch)
db5567f7 629 (uri (pypi-uri "ccm" version))
52323f32
ED
630 (sha256
631 (base32
db5567f7 632 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 633 (build-system python-build-system)
f22efa01 634 (propagated-inputs
52323f32 635 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
636 ;; Not listed in setup.py, but used in ccmlib/node.py for full
637 ;; functionality
638 ("python-psutil" ,python-psutil)
52323f32
ED
639 ("python-six" ,python-six)))
640 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
641 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
642localhost")
643 (description "Cassandra Cluster Manager is a development tool for testing
644local Cassandra clusters. It creates, launches and removes Cassandra clusters
645on localhost.")
3f641af0 646 (license license:asl2.0)))
52323f32
ED
647
648(define-public python2-ccm
649 (package-with-python2 python-ccm))
650
89114f39 651(define-public python-pytz
acc26ff1 652 (package
89114f39 653 (name "python-pytz")
61c9babb 654 (version "2016.3")
acc26ff1
CR
655 (source
656 (origin
657 (method url-fetch)
61c9babb 658 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
659 (sha256
660 (base32
61c9babb 661 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 662 (build-system python-build-system)
8498b8cf 663 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 664 (home-page "http://pythonhosted.org/pytz")
9e771e3b 665 (synopsis "Python timezone library")
acc26ff1
CR
666 (description
667 "This library allows accurate and cross platform timezone calculations
668using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 669 (license license:expat)))
5ace6e2f 670
89114f39 671(define-public python2-pytz
11bb85a1 672 (package-with-python2 python-pytz))
89114f39 673
fc50e9c6 674
89114f39 675(define-public python-babel
5ace6e2f 676 (package
89114f39 677 (name "python-babel")
3f37db6b 678 (version "2.3.2")
5ace6e2f
CR
679 (source
680 (origin
681 (method url-fetch)
b850a6d8 682 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
683 (sha256
684 (base32
3f37db6b 685 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f 686 (build-system python-build-system)
f22efa01 687 (propagated-inputs
f3b98f4f 688 `(("python-pytz" ,python-pytz)))
8498b8cf 689 (arguments `(#:tests? #f)) ; no test target
e1804763 690 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
691 (synopsis
692 "Tools for internationalizing Python applications")
693 (description
694 "Babel is composed of two major parts:
695- tools to build and work with gettext message catalogs
696- a Python interface to the CLDR (Common Locale Data Repository), providing
697access to various locale display names, localized number and date formatting,
698etc. ")
3f641af0 699 (license license:bsd-3)))
89114f39
AE
700
701(define-public python2-babel
11bb85a1 702 (package-with-python2 python-babel))
73adf220 703
ed377cc6
RW
704(define-public python2-backport-ssl-match-hostname
705 (package
706 (name "python2-backport-ssl-match-hostname")
f2d06d46 707 (version "3.5.0.1")
ed377cc6
RW
708 (source
709 (origin
710 (method url-fetch)
711 (uri (string-append
712 "https://pypi.python.org/packages/source/b/"
713 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
714 version ".tar.gz"))
715 (sha256
716 (base32
f2d06d46 717 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 718 (build-system python-build-system)
f2d06d46
EF
719 (arguments
720 `(#:python ,python-2
721 #:tests? #f)) ; no test target
f2d06d46
EF
722 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
723 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
724 (description
725 "This backport brings the ssl.match_hostname() function to users of
726earlier versions of Python. The function checks the hostname in the
727certificate returned by the server to which a connection has been established,
728and verifies that it matches the intended target hostname.")
3f641af0 729 (license license:psfl)))
ed377cc6 730
ef5cbf9b
RW
731(define-public python-h5py
732 (package
733 (name "python-h5py")
fe147c41 734 (version "2.6.0")
ef5cbf9b
RW
735 (source
736 (origin
737 (method url-fetch)
fe147c41 738 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
739 (sha256
740 (base32
fe147c41 741 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 742 (build-system python-build-system)
797e1401
RW
743 (arguments
744 `(#:tests? #f ; no test target
745 #:phases
746 (modify-phases %standard-phases
747 (add-after 'unpack 'fix-hdf5-paths
748 (lambda* (#:key inputs #:allow-other-keys)
749 (let ((prefix (assoc-ref inputs "hdf5")))
750 (substitute* "setup_build.py"
751 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
752 (string-append "['" prefix "/lib" "']"))
753 (("'/opt/local/include', '/usr/local/include'")
754 (string-append "'" prefix "/include" "'")))
755 (substitute* "setup_configure.py"
756 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
757 (string-append "['" prefix "/lib" "']")))
758 #t))))))
3c4010b1 759 (propagated-inputs
69866690
HG
760 `(("python-six" ,python-six)
761 ("python-numpy" ,python-numpy)))
ef5cbf9b 762 (inputs
69866690 763 `(("hdf5" ,hdf5)))
ef5cbf9b 764 (native-inputs
fe147c41
EF
765 `(("python-cython" ,python-cython)
766 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
767 (home-page "http://www.h5py.org/")
768 (synopsis "Read and write HDF5 files from Python")
769 (description
770 "The h5py package provides both a high- and low-level interface to the
771HDF5 library from Python. The low-level interface is intended to be a
772complete wrapping of the HDF5 API, while the high-level component supports
773access to HDF5 files, datasets and groups using established Python and NumPy
774concepts.")
9820a028 775 (license license:bsd-3)))
ef5cbf9b
RW
776
777(define-public python2-h5py
9820a028 778 (package-with-python2 python-h5py))
ef5cbf9b 779
c1448c69
EB
780(define-public python-lockfile
781 (package
782 (name "python-lockfile")
692add53 783 (version "0.12.2")
c1448c69
EB
784 (source
785 (origin
786 (method url-fetch)
787 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
788 "lockfile-" version ".tar.gz"))
789 (sha256
790 (base32
692add53 791 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
792 (build-system python-build-system)
793 (arguments '(#:test-target "check"))
692add53
BW
794 (native-inputs
795 `(("python-pbr" ,python-pbr)))
6a8f26a4 796 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
797 (synopsis "Platform-independent file locking module")
798 (description
799 "The lockfile package exports a LockFile class which provides a simple
800API for locking files.")
f210e944 801 (license license:expat)))
c1448c69
EB
802
803(define-public python2-lockfile
f210e944 804 (package-with-python2 python-lockfile))
c1448c69 805
5a1a4bf6
EB
806(define-public python-mock
807 (package
808 (name "python-mock")
809 (version "1.0.1")
810 (source
811 (origin
812 (method url-fetch)
813 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
814 "mock-" version ".tar.gz"))
815 (sha256
816 (base32
817 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
818 (build-system python-build-system)
819 (arguments '(#:test-target "check"))
07af3e5e 820 (home-page "http://code.google.com/p/mock/")
9e771e3b 821 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
822 (description
823 "Mock is a library for testing in Python. It allows you to replace parts
824of your system under test with mock objects and make assertions about how they
825have been used.")
bd3fa666 826 (license license:expat)))
5a1a4bf6
EB
827
828(define-public python2-mock
829 (package-with-python2 python-mock))
830
fc50e9c6 831
73adf220
AE
832(define-public python-setuptools
833 (package
834 (name "python-setuptools")
d660f7be 835 (version "31.0.0")
73adf220
AE
836 (source
837 (origin
838 (method url-fetch)
d660f7be 839 (uri (pypi-uri "setuptools" version))
73adf220
AE
840 (sha256
841 (base32
d660f7be 842 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
843 (modules '((guix build utils)))
844 (snippet
845 '(begin
846 ;; Remove included binaries which are used to build self-extracting
847 ;; installers for Windows.
848 ;; TODO: Find some way to build them ourself so we can include them.
849 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
850 #t))))
73adf220 851 (build-system python-build-system)
d3d656c5
AE
852 ;; FIXME: Tests require pytest, which itself relies on setuptools.
853 ;; One could bootstrap with an internal untested setuptools.
73adf220 854 (arguments
824af8ca 855 `(#:tests? #f))
73adf220
AE
856 (home-page "https://pypi.python.org/pypi/setuptools")
857 (synopsis
858 "Library designed to facilitate packaging Python projects")
859 (description
860 "Setuptools is a fully-featured, stable library designed to facilitate
861packaging Python projects, where packaging includes:
862Python package and module definitions,
863distribution package metadata,
864test hooks,
865project installation,
866platform-specific details,
867Python 3 support.")
d660f7be
MB
868 ;; TODO: setuptools now bundles the following libraries:
869 ;; packaging, pyparsing, six and appdirs. How to unbundle?
870 (license (list license:psfl ; setuptools itself
871 license:expat ; six, appdirs, pyparsing
872 license:asl2.0 ; packaging is dual ASL2/BSD-2
873 license:bsd-2))))
73adf220
AE
874
875(define-public python2-setuptools
876 (package-with-python2 python-setuptools))
fc50e9c6
AE
877
878
cafc3f5a
EB
879(define-public python-pycrypto
880 (package
881 (name "python-pycrypto")
882 (version "2.6.1")
883 (source
884 (origin
885 (method url-fetch)
886 (uri (string-append "https://pypi.python.org/packages/source/p/"
887 "pycrypto/pycrypto-" version ".tar.gz"))
888 (sha256
889 (base32
890 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
891 (build-system python-build-system)
cafc3f5a
EB
892 (inputs
893 `(("python" ,python)
894 ("gmp" ,gmp)))
895 (arguments
896 `(#:phases
897 (alist-cons-before
898 'build 'set-build-env
899 ;; pycrypto runs an autoconf configure script behind the scenes
900 (lambda _
901 (setenv "CONFIG_SHELL" (which "bash")))
902 %standard-phases)))
903 (home-page "http://www.pycrypto.org/")
904 (synopsis "Cryptographic modules for Python")
905 (description
906 "Pycrypto is a collection of both secure hash functions (such as SHA256
907and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 908etc.). The package is structured to make adding new modules easy.")
3f641af0 909 (license license:public-domain)))
cafc3f5a 910
345f0611 911(define-public python2-pycrypto
1c0059da
EF
912 (let ((pycrypto (package-with-python2 python-pycrypto)))
913 (package (inherit pycrypto)
914 (inputs
915 `(("python" ,python-2)
916 ,@(alist-delete
917 "python"
918 (package-inputs pycrypto)))))))
345f0611 919
cafc3f5a
EB
920(define-public python-keyring
921 (package
922 (name "python-keyring")
13f3ff35 923 (version "8.7")
cafc3f5a
EB
924 (source
925 (origin
926 (method url-fetch)
664e6c3a 927 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
928 (sha256
929 (base32
13f3ff35 930 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
931 (build-system python-build-system)
932 (native-inputs
13f3ff35 933 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 934 (propagated-inputs
cafc3f5a
EB
935 `(("python-pycrypto" ,python-pycrypto)))
936 (arguments
664e6c3a 937 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 938 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
939 (synopsis "Store and access your passwords safely")
940 (description
941 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 942service from python. It can be used in any application that needs safe
cafc3f5a
EB
943password storage.")
944 ;; "MIT" and PSF dual license
f210e944 945 (license license:x11)))
cafc3f5a 946
d7af1069 947(define-public python2-keyring
f210e944 948 (package-with-python2 python-keyring))
d7af1069 949
a480bc41
EB
950(define-public python-six
951 (package
952 (name "python-six")
b6ab89ef 953 (version "1.10.0")
a480bc41
EB
954 (source
955 (origin
956 (method url-fetch)
b6ab89ef 957 (uri (pypi-uri "six" version))
a480bc41
EB
958 (sha256
959 (base32
b6ab89ef 960 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 961 (build-system python-build-system)
4fd129ee
MB
962 (native-inputs
963 `(("python-py" ,python-py)
964 ("python-pytest" ,python-pytest)))
a480bc41
EB
965 (home-page "http://pypi.python.org/pypi/six/")
966 (synopsis "Python 2 and 3 compatibility utilities")
967 (description
35b9e423 968 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
969functions for smoothing over the differences between the Python versions with
970the goal of writing Python code that is compatible on both Python versions.
35b9e423 971Six supports every Python version since 2.5. It is contained in only one
a480bc41 972Python file, so it can be easily copied into your project.")
3f641af0 973 (license license:x11)))
a480bc41 974
0c20025c
AE
975(define-public python2-six
976 (package-with-python2 python-six))
977
22d7360b 978(define-public python-dateutil
cafc3f5a
EB
979 (package
980 (name "python-dateutil")
394b8060 981 (version "2.5.2")
cafc3f5a
EB
982 (source
983 (origin
984 (method url-fetch)
394b8060 985 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
986 (sha256
987 (base32
394b8060 988 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a 989 (build-system python-build-system)
f22efa01 990 (propagated-inputs
394b8060 991 `(("python-six" ,python-six)))
b5a5fb19 992 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
993 (synopsis "Extensions to the standard datetime module")
994 (description
995 "The dateutil module provides powerful extensions to the standard
996datetime module, available in Python 2.3+.")
f210e944 997 (license license:bsd-3)))
cafc3f5a 998
fc50e9c6
AE
999(define-public python2-dateutil
1000 (package-with-python2 python-dateutil))
1d08c01f 1001
cafc3f5a
EB
1002(define-public python-parsedatetime
1003 (package
1004 (name "python-parsedatetime")
eebf6f01 1005 (version "2.1")
cafc3f5a
EB
1006 (source
1007 (origin
1008 (method url-fetch)
eebf6f01 1009 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1010 (sha256
1011 (base32
eebf6f01 1012 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1013 (build-system python-build-system)
1014 (native-inputs
eebf6f01
EF
1015 `(("python-nose" ,python-nose)
1016 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1017 (home-page "http://github.com/bear/parsedatetime/")
1018 (synopsis
1019 "Parse human-readable date/time text")
1020 (description
e881752c 1021 "Parse human-readable date/time text.")
f210e944 1022 (license license:asl2.0)))
cafc3f5a 1023
38b8f9b2 1024(define-public python2-parsedatetime
f210e944 1025 (package-with-python2 python-parsedatetime))
38b8f9b2 1026
d072efcb
RW
1027(define-public python-pandas
1028 (package
1029 (name "python-pandas")
7d0c3c8d 1030 (version "0.18.1")
d072efcb
RW
1031 (source
1032 (origin
1b96f069 1033 (method url-fetch)
7d0c3c8d
EF
1034 (uri (string-append
1035 "https://pypi.python.org/packages/11/09/"
1036 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1037 "pandas-" version ".tar.gz"))
1b96f069 1038 (sha256
7d0c3c8d 1039 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1040 (build-system python-build-system)
d072efcb 1041 (propagated-inputs
f22efa01
HG
1042 `(("python-numpy" ,python-numpy)
1043 ("python-pytz" ,python-pytz)
22d7360b 1044 ("python-dateutil" ,python-dateutil)))
d072efcb 1045 (native-inputs
abcc7a0e
HG
1046 `(("python-nose" ,python-nose)
1047 ("python-cython" ,python-cython)))
d072efcb
RW
1048 (home-page "http://pandas.pydata.org")
1049 (synopsis "Data structures for data analysis, time series, and statistics")
1050 (description
1051 "Pandas is a Python package providing fast, flexible, and expressive data
1052structures designed to make working with structured (tabular,
1053multidimensional, potentially heterogeneous) and time series data both easy
1054and intuitive. It aims to be the fundamental high-level building block for
1055doing practical, real world data analysis in Python.")
f210e944 1056 (license license:bsd-3)))
d072efcb
RW
1057
1058(define-public python2-pandas
f210e944 1059 (package-with-python2 python-pandas))
d072efcb 1060
cafc3f5a
EB
1061(define-public python-tzlocal
1062 (package
1063 (name "python-tzlocal")
ed80839b 1064 (version "1.2.2")
cafc3f5a
EB
1065 (source
1066 (origin
1067 (method url-fetch)
226d3331 1068 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1069 (sha256
1070 (base32
ed80839b 1071 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1072 (build-system python-build-system)
f22efa01
HG
1073 (propagated-inputs
1074 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1075 (home-page "https://github.com/regebro/tzlocal")
1076 (synopsis
35b9e423 1077 "Local timezone information for Python")
cafc3f5a
EB
1078 (description
1079 "Tzlocal returns a tzinfo object with the local timezone information.
1080This module attempts to fix a glaring hole in pytz, that there is no way to
1081get the local timezone information, unless you know the zoneinfo name, and
1082under several distributions that's hard or impossible to figure out.")
3f641af0 1083 (license license:cc0)))
cafc3f5a 1084
1d08c01f
AE
1085(define-public python2-pysqlite
1086 (package
1087 (name "python2-pysqlite")
fe476868 1088 (version "2.8.1")
1d08c01f
AE
1089 (source
1090 (origin
1091 (method url-fetch)
fe476868 1092 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1093 (sha256
1094 (base32
fe476868 1095 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1096 (build-system python-build-system)
1097 (inputs
1098 `(("sqlite" ,sqlite)))
1099 (arguments
1100 `(#:python ,python-2 ; incompatible with Python 3
1101 #:tests? #f)) ; no test target
fe476868 1102 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1103 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1104 (description
1105 "Pysqlite provides SQLite bindings for Python that comply to the
1106Database API 2.0T.")
ed0cdf83 1107 (license license:zlib)))
1d08c01f 1108
2875caf5
AE
1109
1110(define-public python2-mechanize
1111 (package
1112 (name "python2-mechanize")
1113 (version "0.2.5")
1114 (source
1115 (origin
1116 (method url-fetch)
1117 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1118 version ".tar.gz"))
1119 (sha256
1120 (base32
1121 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1122 (build-system python-build-system)
2875caf5
AE
1123 (arguments
1124 `(#:python ,python-2 ; apparently incompatible with Python 3
1125 #:tests? #f))
1126 ;; test fails with message
1127 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1128 ;; (python-3.3.2) or
1129 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1130 ;; (python-2.7.5).
1131 ;; The source code is from March 2011 and probably not up-to-date
1132 ;; with respect to python unit tests.
1133 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1134 (synopsis
1135 "Stateful programmatic web browsing in Python")
1136 (description
1137 "Mechanize implements stateful programmatic web browsing in Python,
1138after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1139 (license (license:non-copyleft
1140 "file://COPYING"
1141 "See COPYING in the distribution."))))
2875caf5 1142
0352532e
AE
1143
1144(define-public python-simplejson
1145 (package
1146 (name "python-simplejson")
b2e6e150 1147 (version "3.10.0")
0352532e
AE
1148 (source
1149 (origin
1150 (method url-fetch)
988d1bad 1151 (uri (pypi-uri "simplejson" version))
0352532e
AE
1152 (sha256
1153 (base32
b2e6e150 1154 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1155 (build-system python-build-system)
1156 (home-page "http://simplejson.readthedocs.org/en/latest/")
1157 (synopsis
1158 "Json library for Python")
1159 (description
e881752c
AK
1160 "JSON (JavaScript Object Notation) is a subset of JavaScript
1161syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1162format.
0352532e
AE
1163
1164Simplejson exposes an API familiar to users of the standard library marshal
1165and pickle modules. It is the externally maintained version of the json
1166library contained in Python 2.6, but maintains compatibility with Python 2.5
1167and (currently) has significant performance advantages, even without using
1168the optional C extension for speedups. Simplejson is also supported on
1169Python 3.3+.")
3f641af0 1170 (license license:x11)))
0352532e
AE
1171
1172(define-public python2-simplejson
1173 (package-with-python2 python-simplejson))
421a80a2
AE
1174
1175
ed07b08d 1176(define-public python-pyicu
421a80a2 1177 (package
ed07b08d 1178 (name "python-pyicu")
d3b29319 1179 (version "1.9.2")
421a80a2
AE
1180 (source
1181 (origin
1182 (method url-fetch)
1183 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1184 version ".tar.gz"))
1185 (sha256
1186 (base32
d3b29319 1187 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1188 (build-system python-build-system)
1189 (inputs
1190 `(("icu4c" ,icu4c)))
421a80a2 1191 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1192 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1193 (description
1194 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1195 (license license:x11)))
ed07b08d
LF
1196
1197(define-public python2-pyicu
f210e944 1198 (package-with-python2 python-pyicu))
cc20a22a
LC
1199
1200(define-public python2-dogtail
1201 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1202 ;; spaces in indentation" with Python 3.
1203 (package
1204 (name "python2-dogtail")
1205 (version "0.8.2")
1206 (source (origin
1207 (method url-fetch)
1208 (uri (string-append
1209 "https://fedorahosted.org/released/dogtail/dogtail-"
1210 version ".tar.gz"))
1211 (sha256
1212 (base32
1213 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1214 (build-system python-build-system)
1215 (arguments `(#:python ,python-2
1216 #:tests? #f)) ; invalid command "test"
1217 (home-page "https://fedorahosted.org/dogtail/")
1218 (synopsis "GUI test tool and automation framework written in ​Python")
1219 (description
35b9e423 1220 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1221It uses Accessibility (a11y) technologies to communicate with desktop
1222applications. dogtail scripts are written in Python and executed like any
1223other Python program.")
3f641af0 1224 (license license:gpl2+)))
515e6878 1225
011b18c3
LC
1226(define-public python2-empy
1227 (package
1228 (name "python2-empy")
1229 (version "3.3")
1230 (source (origin
1231 (method url-fetch)
1232 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1233 version ".tar.gz"))
1234 (sha256
1235 (base32
1236 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1237 (build-system python-build-system)
1238 (arguments
1239 `(#:python ,python-2
1240 #:phases (alist-replace
1241 'check
1242 (lambda _
1243 (zero? (system* "./test.sh")))
1244 %standard-phases)))
1245 (home-page "http://www.alcyone.com/software/empy/")
1246 (synopsis "Templating system for Python")
1247 (description
1248 "EmPy is a system for embedding Python expressions and statements in
1249template text; it takes an EmPy source file, processes it, and produces
1250output. This is accomplished via expansions, which are special signals to the
1cd4027c 1251EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1252EmPy can expand arbitrary Python expressions and statements in this way, as
1253well as a variety of special forms. Textual data not explicitly delimited in
1254this way is sent unaffected to the output, allowing Python to be used in
1255effect as a markup language. Also supported are callbacks via hooks,
1256recording and playback via diversions, and dynamic, chainable filters. The
1257system is highly configurable via command line options and embedded
1258commands.")
3f641af0 1259 (license license:lgpl2.1+)))
011b18c3 1260
8deeda0c
LC
1261(define-public python2-element-tree
1262 (package
1263 (name "python2-element-tree")
1264 (version "1.2.6")
1265 (source (origin
1266 (method url-fetch)
1267 (uri (string-append
1268 "http://effbot.org/media/downloads/elementtree-"
1269 version "-20050316.tar.gz"))
1270 (sha256
1271 (base32
1272 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1273 (build-system python-build-system)
1274 (arguments
1275 `(#:python ,python-2 ; seems to be part of Python 3
1276 #:tests? #f)) ; no 'test' sub-command
1277 (synopsis "Toolkit for XML processing in Python")
1278 (description
1279 "ElementTree is a Python library supporting lightweight XML processing.")
1280 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1281 (license (license:x11-style
1282 "http://docs.python.org/2/license.html"
1283 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1284
1285(define-public python2-pybugz
1286 (package
1287 (name "python2-pybugz")
1288 (version "0.6.11")
1289 (source (origin
1290 (method url-fetch)
1291 (uri (string-append
1292 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1293 version ".tar.gz"))
1294 (sha256
1295 (base32
6f194a1e 1296 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1297 (patches (search-patches "pybugz-stty.patch"
1298 "pybugz-encode-error.patch"))))
8deeda0c
LC
1299 (build-system python-build-system)
1300 (arguments
1301 `(#:python ,python-2 ; SyntaxError with Python 3
1302 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1303 (propagated-inputs
1304 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1305 (synopsis "Python and command-line interface to Bugzilla")
1306 (description
1307 "PyBugz is a Python library and command-line tool to query the Bugzilla
1308bug tracking system. It is meant as an aid to speed up interaction with the
1309bug tracker.")
1310 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1311 (license license:gpl2)))
8deeda0c 1312
a480bc41
EB
1313(define-public python-enum34
1314 (package
1315 (name "python-enum34")
d39ae1e5 1316 (version "1.1.0")
a480bc41
EB
1317 (source
1318 (origin
1319 (method url-fetch)
d39ae1e5 1320 (uri (pypi-uri "enum34" version))
a480bc41
EB
1321 (sha256
1322 (base32
d39ae1e5 1323 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1324 (build-system python-build-system)
a480bc41
EB
1325 (arguments
1326 `(#:phases
1327 (alist-replace
1328 'check
1329 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1330 %standard-phases)))
1331 (home-page "https://pypi.python.org/pypi/enum34")
1332 (synopsis "Backported Python 3.4 Enum")
1333 (description
1334 "Enum34 is the new Python stdlib enum module available in Python 3.4
1335backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1336 (license license:bsd-3)))
a480bc41 1337
820acd1b
LF
1338(define-public python2-enum34
1339 (package-with-python2 python-enum34))
1340
a480bc41
EB
1341(define-public python-parse-type
1342 (package
1343 (name "python-parse-type")
1344 (version "0.3.4")
1345 (source
1346 (origin
1347 (method url-fetch)
1348 (uri (string-append "https://pypi.python.org/packages/source/p/"
1349 "parse_type/parse_type-" version ".tar.gz"))
1350 (sha256
1351 (base32
1352 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1353 (build-system python-build-system)
f22efa01 1354 (propagated-inputs
f3b98f4f 1355 `(("python-six" ,python-six)
68f1cdec 1356 ("python-parse" ,python-parse)))
a480bc41
EB
1357 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1358 (home-page "https://github.com/jenisys/parse_type")
1359 (synopsis "Extended parse module")
1360 (description
1361 "Parse_type extends the python parse module.")
3f641af0 1362 (license license:bsd-3)))
a480bc41
EB
1363
1364(define-public python-parse
1365 (package
1366 (name "python-parse")
eb3d3503 1367 (version "1.6.6")
a480bc41
EB
1368 (source
1369 (origin
1370 (method url-fetch)
eb3d3503 1371 (uri (pypi-uri "parse" version))
a480bc41
EB
1372 (sha256
1373 (base32
aa6c09ed
EF
1374 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1375 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1376 (build-system python-build-system)
1377 (arguments
1378 `(#:phases
f9a65318
EF
1379 (modify-phases %standard-phases
1380 (replace 'check
1381 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1382 (home-page "https://github.com/r1chardj0n3s/parse")
1383 (synopsis "Parse strings")
1384 (description
1385 "Parse strings using a specification based on the Python format()
1386syntax.")
3f641af0 1387 (license license:x11)))
a480bc41 1388
d3eff97a
JL
1389(define-public python-polib
1390 (package
1391 (name "python-polib")
1392 (version "1.0.8")
1393 (source (origin
1394 (method url-fetch)
1395 (uri (pypi-uri "polib" version))
1396 (sha256
1397 (base32
1398 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1399 (build-system python-build-system)
1400 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1401 (synopsis "Manipulate, create and modify gettext files")
1402 (description "Polib can manipulate any gettext format (po, pot and mo)
1403files. It can be used to create po files from scratch or to modify
1404existing ones.")
1405 (license license:expat)))
1406
1407(define-public python2-polib
1408 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1409 (package
1410 (inherit base)
1411 (arguments `(,@(package-arguments base)
1412 ;; Tests don't work with python2.
1413 #:tests? #f)))))
a480bc41 1414
515e6878
LC
1415(define-public scons
1416 (package
1417 (name "scons")
a3f61425 1418 (version "2.3.4")
515e6878
LC
1419 (source (origin
1420 (method url-fetch)
de67e922
LF
1421 (uri (string-append "mirror://sourceforge/scons/scons/" version
1422 "/scons-" version ".tar.gz"))
515e6878
LC
1423 (sha256
1424 (base32
a3f61425 1425 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1426 (build-system python-build-system)
1427 (arguments
1428 ;; With Python 3.x, fails to build with a syntax error.
1429 `(#:python ,python-2
b3e8b4bd 1430 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1431 #:tests? #f)) ; no 'python setup.py test' command
1432 (home-page "http://scons.org/")
1433 (synopsis "Software construction tool written in Python")
1434 (description
1435 "SCons is a software construction tool. Think of SCons as an improved,
1436cross-platform substitute for the classic Make utility with integrated
1437functionality similar to autoconf/automake and compiler caches such as ccache.
1438In short, SCons is an easier, more reliable and faster way to build
1439software.")
3f641af0 1440 (license license:x11)))
011b18c3 1441
c15a5c0e
DT
1442(define-public python-extras
1443 (package
1444 (name "python-extras")
1445 (version "0.0.3")
1446 (source
1447 (origin
1448 (method url-fetch)
1449 (uri (string-append
1450 "https://pypi.python.org/packages/source/e/extras/extras-"
1451 version ".tar.gz"))
1452 (sha256
1453 (base32
1454 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1455 (build-system python-build-system)
c15a5c0e
DT
1456 (arguments
1457 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1458 '(#:tests? #f))
1459 (home-page "https://github.com/testing-cabal/extras")
1460 (synopsis "Useful extensions to the Python standard library")
1461 (description
1462 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1463 (license license:expat)))
c15a5c0e
DT
1464
1465(define-public python2-extras
1466 (package-with-python2 python-extras))
1467
56ea0efd
DT
1468(define-public python-mimeparse
1469 (package
1470 (name "python-mimeparse")
1471 (version "0.1.4")
1472 (source
1473 (origin
1474 (method url-fetch)
1475 (uri (string-append
1476 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1477 version ".tar.gz"))
1478 (sha256
1479 (base32
1480 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1481 (build-system python-build-system)
56ea0efd
DT
1482 (arguments
1483 '(#:tests? #f)) ; no setup.py test command
1484 (home-page
1485 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1486 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1487 (description
1488 "Mimeparse provides basic functions for parsing MIME type names and
1489matching them against a list of media-ranges.")
bd3fa666 1490 (license license:expat)))
56ea0efd
DT
1491
1492(define-public python2-mimeparse
1493 (package-with-python2 python-mimeparse))
1494
4435427e
DT
1495(define-public python-nose
1496 (package
1497 (name "python-nose")
f7cb9841 1498 (version "1.3.7")
4435427e
DT
1499 (source
1500 (origin
1501 (method url-fetch)
f7cb9841 1502 (uri (pypi-uri "nose" version))
4435427e
DT
1503 (sha256
1504 (base32
f7cb9841 1505 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1506 (build-system python-build-system)
4435427e
DT
1507 (arguments
1508 '(#:tests? #f)) ; FIXME: test suite fails
1509 (home-page "http://readthedocs.org/docs/nose/")
1510 (synopsis "Python testing library")
1511 (description
1512 "Nose extends the unittest library to make testing easier.")
3f641af0 1513 (license license:lgpl2.0+)))
4435427e
DT
1514
1515(define-public python2-nose
1516 (package-with-python2 python-nose))
1517
0aea283a
EF
1518(define-public python-nose2
1519 (package
1520 (name "python-nose2")
1521 (version "0.6.5")
1522 (source
1523 (origin
1524 (method url-fetch)
1525 (uri (pypi-uri "nose2" version))
1526 (sha256
1527 (base32
1528 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1529 (build-system python-build-system)
1530 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1531 (propagated-inputs
0aea283a
EF
1532 `(("python-cov-core" ,python-cov-core)
1533 ("python-pytest-cov" ,python-pytest-cov)
1534 ("python-six" ,python-six)))
1535 (home-page "https://github.com/nose-devs/nose2")
1536 (synopsis "Next generation of nicer testing for Python")
1537 (description
1538 "Nose2 is the next generation of nicer testing for Python, based on the
1539plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1540better plugin api, being easier for users to configure, and simplifying internal
1541interfaces and processes.")
1542 (license license:bsd-2)))
1543
1544(define-public python2-nose2
1545 (package-with-python2 python-nose2))
1546
6cd9c356
DT
1547(define-public python-unittest2
1548 (package
1549 (name "python-unittest2")
1550 (version "0.5.1")
1551 (source
1552 (origin
1553 (method url-fetch)
1554 (uri (string-append
1555 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1556 version ".tar.gz"))
1557 (sha256
1558 (base32
1559 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1560 (build-system python-build-system)
6cd9c356
DT
1561 (home-page "http://pypi.python.org/pypi/unittest2")
1562 (synopsis "Python unit testing library")
1563 (description
1564 "Unittest2 is a replacement for the unittest module in the Python
1565standard library.")
3f641af0 1566 (license license:psfl)))
6cd9c356
DT
1567
1568(define-public python2-unittest2
1569 (package (inherit python-unittest2)
1570 (name "python2-unittest2")
1571 (version "0.5.1")
1572 (source
1573 (origin
1574 (method url-fetch)
1575 (uri (string-append
1576 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1577 version ".tar.gz"))
1578 (sha256
1579 (base32
1580 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1581 (arguments
1582 `(#:python ,python-2
1583 #:tests? #f)))) ; no setup.py test command
1584
02f8f804 1585(define-public python-pafy
1586 (package
1587 (name "python-pafy")
1588 (version "0.5.2")
1589 (source
1590 (origin
1591 (method url-fetch)
1592 (uri (pypi-uri "pafy" version))
1593 (sha256
1594 (base32
1595 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1596 (build-system python-build-system)
ed3fee5f 1597 (arguments
1598 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1599 (propagated-inputs
1600 ;; Youtube-dl is a python package which is imported in the file
1601 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1602 `(("youtube-dl" ,youtube-dl)))
1603 (home-page "https://np1.github.io/pafy/")
1604 (synopsis "Retrieve YouTube content and metadata")
1605 (description
1606 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1607 (license license:lgpl3+)))
1608
542ad60f
DT
1609(define-public python-py
1610 (package
1611 (name "python-py")
71c8a804 1612 (version "1.4.31")
542ad60f
DT
1613 (source
1614 (origin
1615 (method url-fetch)
71c8a804 1616 (uri (pypi-uri "py" version))
542ad60f
DT
1617 (sha256
1618 (base32
71c8a804 1619 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f 1620 (build-system python-build-system)
dcb0da7b
MB
1621 (arguments
1622 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1623 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1624 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1625 ;; Is this module globally installed?"
1626 '(#:tests? #f))
542ad60f
DT
1627 (home-page "http://pylib.readthedocs.org/")
1628 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1629 (description
1630 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1631code introspection, and logging.")
bd3fa666 1632 (license license:expat)))
542ad60f
DT
1633
1634(define-public python2-py
1635 (package-with-python2 python-py))
1636
855d4761
DT
1637(define-public python-pytest
1638 (package
1639 (name "python-pytest")
61a4332d 1640 (version "2.7.3")
855d4761
DT
1641 (source
1642 (origin
1643 (method url-fetch)
1644 (uri (string-append
1645 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1646 version ".tar.gz"))
1647 (sha256
1648 (base32
61a4332d 1649 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1650 (modules '((guix build utils)))
1651 (snippet
1652 ;; One of the tests involves the /usr directory, so it fails.
1653 '(substitute* "testing/test_argcomplete.py"
1654 (("def test_remove_dir_prefix\\(self\\):")
1655 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1656 (build-system python-build-system)
482d9591
HG
1657 (propagated-inputs
1658 `(("python-py" ,python-py)))
e7881f3d 1659 (native-inputs
482d9591 1660 `(("python-nose" ,python-nose)
855d4761
DT
1661 ("python-mock" ,python-mock)))
1662 (home-page "http://pytest.org")
1663 (synopsis "Python testing library")
1664 (description
1665 "Pytest is a testing tool that provides auto-discovery of test modules
1666and functions, detailed info on failing assert statements, modular fixtures,
1667and many external plugins.")
bd3fa666 1668 (license license:expat)))
855d4761
DT
1669
1670(define-public python2-pytest
1671 (package-with-python2 python-pytest))
1672
fca4ff35
LF
1673;; This package is used by Borg until we can upgrade all our Python packages to
1674;; use a more recent pytest.
1675(define-public python-pytest-2.9.2
1676 (package
1677 (inherit python-pytest)
1678 (name "python-pytest")
1679 (version "2.9.2")
1680 (source (origin
1681 (method url-fetch)
1682 (uri (pypi-uri "pytest" version))
1683 (sha256
1684 (base32
1685 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1686 (arguments
1687 `(#:phases
1688 (modify-phases %standard-phases
1689 (add-before 'check 'disable-invalid-test
1690 (lambda _
1691 (substitute* "testing/test_argcomplete.py"
1692 (("def test_remove_dir_prefix" line)
1693 (string-append "@pytest.mark.skip"
1694 "(reason=\"Assumes that /usr exists.\")\n "
1695 line)))
1696 #t)))))))
1697
358c3d61
EF
1698(define-public python-pytest-cov
1699 (package
1700 (name "python-pytest-cov")
545f4a1c 1701 (version "2.2.1")
358c3d61
EF
1702 (source
1703 (origin
1704 (method url-fetch)
1705 (uri (pypi-uri "pytest-cov" version))
1706 (sha256
545f4a1c
EF
1707 (base32
1708 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1709 (build-system python-build-system)
ce40b383
HG
1710 (arguments
1711 `(#:phases
1712 (modify-phases %standard-phases
1713 (replace 'check
1714 (lambda _
1715 ;; options taken from tox.ini
1716 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1717 ;; with "Duplicate implicit target name"
1718 (zero? (system* "python" "./setup.py" "check"
1719 "--strict" "--metadata")))))))
f22efa01 1720 (propagated-inputs
10468636
EF
1721 `(("python-coverage" ,python-coverage)
1722 ("python-pytest" ,python-pytest)))
10468636
EF
1723 (home-page "https://github.com/pytest-dev/pytest-cov")
1724 (synopsis "Pytest plugin for measuring coverage")
1725 (description
1726 "Pytest-cov produces coverage reports. It supports centralised testing and
1727distributed testing in both @code{load} and @code{each} modes. It also
1728supports coverage of subprocesses.")
f210e944 1729 (license license:expat)))
358c3d61
EF
1730
1731(define-public python2-pytest-cov
f210e944 1732 (package-with-python2 python-pytest-cov))
358c3d61 1733
6784f2e3
RW
1734(define-public python-pytest-runner
1735 (package
1736 (name "python-pytest-runner")
1737 (version "2.6.2")
1738 (source
1739 (origin
1740 (method url-fetch)
54cd239b 1741 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1742 (sha256
1743 (base32
1744 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1745 (build-system python-build-system)
1746 (arguments
1747 `(#:phases
1748 (modify-phases %standard-phases
1749 ;; The fancy way of setting the version with setuptools_scm does not
1750 ;; seem to work here.
1751 (add-after 'unpack 'set-version
1752 (lambda _
1753 (substitute* "docs/conf.py"
1754 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1755 (string-append "version = \"" ,version "\"")))
1756 #t)))))
1757 (native-inputs
1758 `(("python-pytest" ,python-pytest)
1759 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1760 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1761 (synopsis "Invoke py.test as a distutils command")
1762 (description
1763 "This package provides a @command{pytest-runner} command that
1764@file{setup.py} files can use to run tests.")
f210e944 1765 (license license:expat)))
54cd239b
EF
1766
1767(define-public python2-pytest-runner
f210e944 1768 (package-with-python2 python-pytest-runner))
6784f2e3 1769
44547e51
EF
1770(define-public python-pytest-mock
1771 (package
1772 (name "python-pytest-mock")
1773 (version "1.2")
1774 (source
1775 (origin
1776 (method url-fetch)
1777 (uri (pypi-uri "pytest-mock" version ".zip"))
1778 (sha256
1779 (base32
1780 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1781 (build-system python-build-system)
1782 (native-inputs
1783 `(("unzip" ,unzip)))
f22efa01 1784 (propagated-inputs
d5e41cf2 1785 `(("python-pytest" ,python-pytest)))
44547e51
EF
1786 (home-page "https://github.com/pytest-dev/pytest-mock/")
1787 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1788 (description
1789 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1790around the patching API provided by the @code{mock} package, but with the
1791benefit of not having to worry about undoing patches at the end of a test.
1792The mocker fixture has the same API as @code{mock.patch}, supporting the
1793same arguments.")
1794 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1795 (license license:expat)))
1796
1797(define-public python2-pytest-mock
1798 (let ((base (package-with-python2
1799 (strip-python2-variant python-pytest-mock))))
1800 (package (inherit base)
f22efa01 1801 (propagated-inputs
44547e51 1802 `(("python2-mock" ,python2-mock)
f22efa01 1803 ,@(package-propagated-inputs base))))))
44547e51 1804
8fa58fc9
CAW
1805(define-public python-pytest-xdist
1806 (package
1807 (name "python-pytest-xdist")
1808 (version "1.14")
1809 (source
1810 (origin
1811 (method url-fetch)
1812 (uri (pypi-uri "pytest-xdist" version ".zip"))
1813 (sha256
1814 (base32
de585a7e
HG
1815 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1816 (modules '((guix build utils)))
1817 (snippet
1818 '(begin
1819 ;; Remove pre-compiled .pyc files from source.
1820 (for-each delete-file-recursively
1821 (find-files "." "__pycache__" #:directories? #t))
1822 (for-each delete-file (find-files "." "\\.pyc$"))
1823 #t))))
8fa58fc9 1824 (build-system python-build-system)
4eb385fb
MB
1825 (arguments
1826 '(#:tests? #f)) ;FIXME: Some tests are failing.
1827 ;; #:phases
1828 ;; (modify-phases %standard-phases
1829 ;; (delete 'check)
1830 ;; (add-after 'install 'check
1831 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
1832 ;; (add-installed-pythonpath inputs outputs)
1833 ;; (zero? (system* "py.test" "-v")))))
8fa58fc9
CAW
1834 (native-inputs
1835 `(("unzip" ,unzip)
8fa58fc9 1836 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1837 (propagated-inputs
c4516ad2 1838 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
1839 ("python-pytest" ,python-pytest)
1840 ("python-py" ,python-py)))
1841 (home-page
1842 "https://github.com/pytest-dev/pytest-xdist")
1843 (synopsis
1844 "Plugin for py.test with distributed testing and loop-on-failing modes")
1845 (description
1846 "The pytest-xdist plugin extends py.test with some unique test execution
1847modes: parallelization, running tests in boxed subprocesses, the ability
1848to run tests repeatedly when failed, and the ability to run tests on multiple
1849Python interpreters or platforms. It uses rsync to copy the existing
1850program code to a remote location, executes there, and then syncs the
1851result back.")
f210e944 1852 (license license:expat)))
8fa58fc9
CAW
1853
1854(define-public python2-pytest-xdist
f210e944 1855 (package-with-python2 python-pytest-xdist))
8fa58fc9 1856
84d24017
DT
1857(define-public python-scripttest
1858 (package
1859 (name "python-scripttest")
1860 (version "1.3")
1861 (source
1862 (origin
1863 (method url-fetch)
1864 (uri (string-append
1865 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1866 version ".tar.gz"))
1867 (sha256
1868 (base32
1869 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1870 (build-system python-build-system)
521b7772 1871 (native-inputs
f3b98f4f 1872 `(("python-pytest" ,python-pytest)))
84d24017
DT
1873 (home-page "http://pythonpaste.org/scripttest/")
1874 (synopsis "Python library to test command-line scripts")
1875 (description "Scripttest is a Python helper library for testing
1876interactive command-line applications. With it you can run a script in a
1877subprocess and see the output as well as any file modifications.")
bd3fa666 1878 (license license:expat)))
84d24017
DT
1879
1880(define-public python2-scripttest
1881 (package-with-python2 python-scripttest))
1882
d8fa80e1
DT
1883(define-public python-testtools
1884 (package
1885 (name "python-testtools")
1886 (version "1.0.0")
1887 (source
1888 (origin
1889 (method url-fetch)
1890 (uri (string-append
1891 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1892 version ".tar.gz"))
1893 (sha256
1894 (base32
1895 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1896 (build-system python-build-system)
0e88cbf8 1897 (propagated-inputs
f22efa01
HG
1898 `(("python-mimeparse" ,python-mimeparse)
1899 ("python-extras" ,python-extras)))
d8fa80e1
DT
1900 (home-page "https://github.com/testing-cabal/testtools")
1901 (synopsis
1902 "Extensions to the Python standard library unit testing framework")
1903 (description
1904 "Testtools extends the Python standard library unit testing framework to
1905provide matchers, more debugging information, and cross-Python
1906compatibility.")
3f641af0 1907 (license license:psfl)))
d8fa80e1
DT
1908
1909(define-public python2-testtools
1910 (package-with-python2 python-testtools))
1911
5bf3afea
DT
1912(define-public python-testscenarios
1913 (package
1914 (name "python-testscenarios")
1915 (version "0.4")
1916 (source
1917 (origin
1918 (method url-fetch)
1919 (uri (string-append
1920 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1921 version ".tar.gz"))
1922 (sha256
1923 (base32
1924 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1925 (build-system python-build-system)
f22efa01 1926 (propagated-inputs
8e73d3ba 1927 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
1928 (home-page "https://launchpad.net/testscenarios")
1929 (synopsis "Pyunit extension for dependency injection")
1930 (description
1931 "Testscenarios provides clean dependency injection for Python unittest
1932style tests.")
3f641af0 1933 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1934
1935(define-public python2-testscenarios
1936 (package-with-python2 python-testscenarios))
1937
dac79ecc
DT
1938(define-public python-testresources
1939 (package
1940 (name "python-testresources")
1941 (version "0.2.7")
1942 (source
1943 (origin
1944 (method url-fetch)
1945 (uri (string-append
1946 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1947 version ".tar.gz"))
1948 (sha256
1949 (base32
1950 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1951 (build-system python-build-system)
dac79ecc
DT
1952 (home-page "https://launchpad.net/testresources")
1953 (synopsis
1954 "Pyunit extension for managing test resources")
1955 (description
1956 "Testresources is an extension to Python's unittest to allow declarative
1957use of resources by test cases.")
3f641af0 1958 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
1959
1960(define-public python2-testresources
1961 (package-with-python2 python-testresources))
1962
070ab058
DT
1963(define-public python-subunit
1964 (package
1965 (name "python-subunit")
1966 (version "0.0.21")
1967 (source
1968 (origin
1969 (method url-fetch)
1970 (uri (string-append
1971 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1972 version ".tar.gz"))
1973 (sha256
1974 (base32
1975 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1976 (build-system python-build-system)
f22efa01 1977 (propagated-inputs
b52ad371
HG
1978 `(("python-extras" ,python-extras)
1979 ("python-mimeparse" ,python-mimeparse)))
1980 (native-inputs
1981 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
1982 (home-page "http://launchpad.net/subunit")
1983 (synopsis "Python implementation of the subunit protocol")
1984 (description
1985 "Python-subunit is a Python implementation of the subunit test streaming
1986protocol.")
3f641af0 1987 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
1988
1989(define-public python2-subunit
1990 (package-with-python2 python-subunit))
1991
d2a8db92
HG
1992;; Recent versions of python-fixtures and python-testrepository need
1993;; python-pbr for packaging, which itself needs these two packages for
1994;; testing.
1995;; To fix this circular dependency, we use a build of python-pbr, based on the
1996;; same source, just without any test dependencies and with tests disabled.
1997;; python-pbr-minmal is then used to package python-fixtures and
1998;; python-testrepository.
1999;; Strictly speaking we currently could remove the test-requirements from the
2000;; normal python-pbr package (and save this package) since test are disabled
2001;; there anyway. But this may change in future.
2002(define python-pbr-minimal
cd49454b 2003 (package
d2a8db92
HG
2004 (name "python-pbr-minimal")
2005 (version "1.8.1")
7787ef76
CR
2006 (source
2007 (origin
2008 (method url-fetch)
d2a8db92 2009 (uri (pypi-uri "pbr" version))
7787ef76
CR
2010 (sha256
2011 (base32
d2a8db92 2012 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
7787ef76
CR
2013 (build-system python-build-system)
2014 (arguments
d2a8db92
HG
2015 `(#:tests? #f))
2016 (home-page "http://docs.openstack.org/developer/pbr/")
2017 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2018 (description
d2a8db92 2019 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2020 (license license:asl2.0)))
7787ef76 2021
d2a8db92
HG
2022(define python2-pbr-minimal
2023 (package-with-python2 python-pbr-minimal))
7787ef76 2024
1ef09c0c 2025(define-public python-pbr
e25f0174 2026 (package
d2a8db92 2027 (inherit python-pbr-minimal)
e25f0174 2028 (name "python-pbr")
e25f0174
BW
2029 (arguments
2030 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2031 (propagated-inputs
d2a8db92
HG
2032 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2033 (native-inputs
e25f0174 2034 `(("python-fixtures" ,python-fixtures)
d2a8db92 2035 ;; discover, coverage, hacking, subunit
e25f0174 2036 ("python-mock" ,python-mock)
d2a8db92 2037 ("python-six" ,python-six)
e25f0174
BW
2038 ("python-sphinx" ,python-sphinx)
2039 ("python-testrepository" ,python-testrepository)
2040 ("python-testresources" ,python-testresources)
2041 ("python-testscenarios" ,python-testscenarios)
2042 ("python-testtools" ,python-testtools)
2043 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2044 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2045 (description
2046 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2047and sensible default behaviors into your setuptools run. It will set
2048versions, process requirements files and generate AUTHORS and ChangeLog file
2049from git information.
2050")))
1ef09c0c
BW
2051
2052(define-public python2-pbr
e25f0174 2053 (package-with-python2 python-pbr))
1ef09c0c 2054
7787ef76
CR
2055(define-public python-fixtures
2056 (package
2057 (name "python-fixtures")
13fcc6df 2058 (version "1.4.0")
7787ef76
CR
2059 (source
2060 (origin
2061 (method url-fetch)
13fcc6df 2062 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2063 (sha256
2064 (base32
13fcc6df 2065 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76 2066 (build-system python-build-system)
f6c1ef18
MB
2067 (arguments
2068 '(#:phases
2069 (modify-phases %standard-phases
2070 (replace 'check
2071 (lambda _
2072 (zero? (system* "python" "-m" "testtools.run"
2073 "fixtures.test_suite")))))))
7787ef76 2074 (propagated-inputs
ae92cadd 2075 `(("python-six" ,python-six)))
e7881f3d 2076 (native-inputs
f6c1ef18
MB
2077 `(("python-mock" ,python-mock)
2078 ("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2079 ("python-testtools" ,python-testtools)))
7787ef76
CR
2080 (home-page "https://launchpad.net/python-fixtures")
2081 (synopsis "Python test fixture library")
2082 (description
2083 "Fixtures provides a way to create reusable state, useful when writing
2084Python tests.")
3f641af0 2085 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2086
cd49454b
DT
2087(define-public python2-fixtures
2088 (package-with-python2 python-fixtures))
2089
b24a0c00
DT
2090(define-public python-testrepository
2091 (package
2092 (name "python-testrepository")
2093 (version "0.0.20")
2094 (source
2095 (origin
2096 (method url-fetch)
2097 (uri (string-append
2098 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2099 version ".tar.gz"))
2100 (sha256
2101 (base32
2102 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2103 (build-system python-build-system)
90110ef9
MB
2104 (arguments
2105 ;; FIXME: Many tests are failing.
2106 '(#:tests? #f))
05de40c5 2107 (propagated-inputs
b2e66edf
HG
2108 `(("python-fixtures" ,python-fixtures)
2109 ("python-subunit" ,python-subunit)
b52ad371
HG
2110 ("python-testtools" ,python-testtools)))
2111 (native-inputs
2112 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2113 ("python-mimeparse" ,python-mimeparse)))
2114 (home-page "https://launchpad.net/testrepository")
2115 (synopsis "Database for Python test results")
2116 (description "Testrepository provides a database of test results which can
2117be used as part of a developer's workflow to check things such as what tests
2118have failed since the last commit or what tests are currently failing.")
3f641af0 2119 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2120
2121(define-public python2-testrepository
2122 (package-with-python2 python-testrepository))
2123
243a009a
DT
2124(define-public python-coverage
2125 (package
2126 (name "python-coverage")
4d4cf3dd 2127 (version "4.1")
243a009a
DT
2128 (source
2129 (origin
2130 (method url-fetch)
82a3c582 2131 (uri (pypi-uri "coverage" version))
243a009a
DT
2132 (sha256
2133 (base32
4d4cf3dd 2134 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2135 (build-system python-build-system)
bd10e677
MB
2136 (arguments
2137 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2138 '(#:tests? #f))
243a009a
DT
2139 (home-page "http://nedbatchelder.com/code/coverage")
2140 (synopsis "Code coverage measurement for Python")
2141 (description
2142 "Coverage measures code coverage, typically during test execution. It
2143uses the code analysis tools and tracing hooks provided in the Python standard
2144library to determine which lines are executable, and which have been
2145executed.")
3f641af0 2146 (license license:bsd-3)))
243a009a
DT
2147
2148(define-public python2-coverage
2149 (package-with-python2 python-coverage))
2150
12f839fd
EF
2151(define-public python-cov-core
2152 (package
2153 (name "python-cov-core")
2154 (version "1.15.0")
2155 (source
2156 (origin
2157 (method url-fetch)
2158 (uri (pypi-uri "cov-core" version))
2159 (sha256
2160 (base32
2161 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2162 (build-system python-build-system)
f78e1c27 2163 (propagated-inputs
12f839fd
EF
2164 `(("python-coverage" ,python-coverage)))
2165 (home-page "https://github.com/schlamar/cov-core")
2166 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2167 (description
2168 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2169It is useful for developing coverage plugins for these testing frameworks.")
f210e944 2170 (license license:expat)))
12f839fd
EF
2171
2172(define-public python2-cov-core
f210e944 2173 (package-with-python2 python-cov-core))
12f839fd 2174
041358fb
DT
2175(define-public python-discover
2176 (package
2177 (name "python-discover")
2178 (version "0.4.0")
2179 (source
2180 (origin
2181 (method url-fetch)
2182 (uri (string-append
2183 "https://pypi.python.org/packages/source/d/discover/discover-"
2184 version ".tar.gz"))
2185 (sha256
2186 (base32
2187 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2188 (build-system python-build-system)
041358fb
DT
2189 (home-page "http://pypi.python.org/pypi/discover/")
2190 (synopsis
2191 "Python test discovery for unittest")
2192 (description
2193 "Discover provides test discovery for unittest, a feature that has been
e881752c 2194backported from Python 2.7 for Python 2.4+.")
3f641af0 2195 (license license:bsd-3)))
041358fb
DT
2196
2197(define-public python2-discover
2198 (package-with-python2 python-discover))
2199
a480bc41
EB
2200(define-public behave
2201 (package
2202 (name "behave")
287cfd1a 2203 (version "1.2.5")
a480bc41
EB
2204 (source (origin
2205 (method url-fetch)
287cfd1a 2206 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2207 (sha256
2208 (base32
287cfd1a 2209 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2210 (build-system python-build-system)
f22efa01 2211 (propagated-inputs
f3b98f4f 2212 `(("python-six" ,python-six)
a480bc41
EB
2213 ("python-parse" ,python-parse)
2214 ("python-parse-type" ,python-parse-type)))
2215 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2216 ;PyHamcrest>=1.8
2217 (home-page "http://github.com/behave/behave")
2218 (synopsis "Python behavior-driven development")
2219 (description
2220 "Behave is a tool for behavior-driven development in python.
2221Behavior-driven development (or BDD) is an agile software development
2222technique that encourages collaboration between developers, QA and
2223non-technical or business participants in a software project. Behave uses
2224tests written in a natural language style, backed up by Python code.")
3f641af0 2225 (license license:x11)))
c7303d3c
DT
2226
2227(define-public python-exif-read
2228 (package
2229 (name "python-exif-read")
2a2d0981 2230 (version "2.1.2")
c7303d3c
DT
2231 (source (origin
2232 (method url-fetch)
2a2d0981 2233 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2234 (sha256
2235 (base32
2a2d0981 2236 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2237 (build-system python-build-system)
c7303d3c
DT
2238 (arguments `(#:tests? #f)) ; no tests
2239 (home-page "https://github.com/ianare/exif-py")
2240 (synopsis "Python library to extract EXIF data from image files")
2241 (description
2242 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2243files.")
3f641af0 2244 (license license:bsd-3)))
c7303d3c
DT
2245
2246(define-public python2-exif-read
2247 (package-with-python2 python-exif-read))
d5f89b22
DT
2248
2249(define-public python-pyld
2250 (package
2251 (name "python-pyld")
8957af32 2252 (version "0.7.1")
d5f89b22
DT
2253 (source (origin
2254 (method url-fetch)
af1ab773 2255 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2256 (sha256
2257 (base32
8957af32 2258 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2259 (build-system python-build-system)
d5f89b22
DT
2260 (arguments `(#:tests? #f)) ; no tests
2261 (home-page "http://github.com/digitalbazaar/pyld")
2262 (synopsis "Python implementation of the JSON-LD specification")
2263 (description
2264 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2265 (license license:bsd-3)))
d5f89b22
DT
2266
2267(define-public python2-pyld
2268 (package-with-python2 python-pyld))
3a1f9a68
DT
2269
2270(define-public python-certifi
2271 (package
2272 (name "python-certifi")
b2a2232c 2273 (version "2016.8.31")
3a1f9a68
DT
2274 (source (origin
2275 (method url-fetch)
9a41f443 2276 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2277 (sha256
2278 (base32
b2a2232c 2279 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68 2280 (build-system python-build-system)
3a1f9a68
DT
2281 (arguments `(#:tests? #f)) ; no tests
2282 (home-page "http://python-requests.org/")
2283 (synopsis "Python CA certificate bundle")
2284 (description
2285 "Certifi is a Python library that contains a CA certificate bundle, which
2286is used by the Requests library to verify HTTPS requests.")
3f641af0 2287 (license license:asl2.0)))
3a1f9a68
DT
2288
2289(define-public python2-certifi
2290 (package-with-python2 python-certifi))
e6cfbd36 2291
12c270dd
RW
2292(define-public python-click
2293 (package
2294 (name "python-click")
43accb58 2295 (version "6.6")
12c270dd
RW
2296 (source
2297 (origin
2298 (method url-fetch)
375f224b 2299 (uri (pypi-uri "click" version))
12c270dd 2300 (sha256
43accb58
LF
2301 (base32
2302 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2303 (build-system python-build-system)
e2ab5a09
BW
2304 (arguments
2305 `(#:phases
2306 (modify-phases %standard-phases
2307 (add-after 'unpack 'fix-paths
2308 (lambda* (#:key inputs #:allow-other-keys)
2309 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2310 "cross-libc" "libc"))))
2311 (substitute* "click/_unicodefun.py"
2312 (("'locale'")
2313 (string-append "'" glibc "/bin/locale'"))))
97be1bc2
MB
2314 #t))
2315 (replace 'check
2316 (lambda _
2317 (zero? (system* "make" "test")))))))
2318 (native-inputs
2319 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2320 (home-page "http://click.pocoo.org")
2321 (synopsis "Command line library for Python")
2322 (description
2323 "Click is a Python package for creating command line interfaces in a
2324composable way with as little code as necessary. Its name stands for
2325\"Command Line Interface Creation Kit\". It's highly configurable but comes
2326with sensible defaults out of the box.")
3f641af0 2327 (license license:bsd-3)))
12c270dd
RW
2328
2329(define-public python2-click
2330 (package-with-python2 python-click))
2331
addc808d
EF
2332(define-public python-wheel
2333 (package
2334 (name "python-wheel")
40981b5c 2335 (version "0.29.0")
e1ba0749
EF
2336 (source
2337 (origin
2338 (method url-fetch)
2339 (uri (pypi-uri "wheel" version))
2340 (sha256
2341 (base32
40981b5c 2342 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2343 (build-system python-build-system)
2344 (native-inputs
f3b98f4f 2345 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2346 ("python-pytest-cov" ,python-pytest-cov)))
2347 (home-page "https://bitbucket.org/pypa/wheel/")
2348 (synopsis "Format for built Python packages")
2349 (description
2350 "A wheel is a ZIP-format archive with a specially formatted filename and
2351the @code{.whl} extension. It is designed to contain all the files for a PEP
2352376 compatible install in a way that is very close to the on-disk format. Many
2353packages will be properly installed with only the @code{Unpack} step and the
2354unpacked archive preserves enough information to @code{Spread} (copy data and
2355scripts to their final locations) at any later time. Wheel files can be
2356installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2357 (license license:expat)
2358 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2359
2360(define-public python2-wheel
8ad4ae20
LF
2361 (let ((wheel (package-with-python2
2362 (strip-python2-variant python-wheel))))
264ae686 2363 (package (inherit wheel)
8ad4ae20
LF
2364 (native-inputs `(("python2-functools32" ,python2-functools32)
2365 ,@(package-native-inputs wheel))))))
2366
addc808d 2367
ae641128 2368(define-public python-requests
e6cfbd36 2369 (package
ae641128 2370 (name "python-requests")
74a066f9 2371 (version "2.9.1")
e6cfbd36
DT
2372 (source (origin
2373 (method url-fetch)
5d691657 2374 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2375 (sha256
2376 (base32
74a066f9 2377 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
cff0ccf9 2378 ;; TODO: unbundle urllib3 and chardet.
e6cfbd36 2379 (build-system python-build-system)
cff0ccf9
MB
2380 (arguments
2381 ;; FIXME: Some tests require network access.
2382 '(#:tests? #f))
e6cfbd36
DT
2383 (home-page "http://python-requests.org/")
2384 (synopsis "Python HTTP library")
2385 (description
2386 "Requests is a Python HTTP client library. It aims to be easier to use
2387than Python’s urllib2 library.")
3f641af0 2388 (license license:asl2.0)))
864b5211 2389
e9005180
DT
2390;; Some software requires an older version of Requests, notably Docker
2391;; Compose.
2392(define-public python-requests-2.7
2393 (package (inherit python-requests)
2394 (version "2.7.0")
2395 (source (origin
2396 (method url-fetch)
2397 (uri (pypi-uri "requests" version))
2398 (sha256
2399 (base32
2400 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2401
ae641128 2402(define-public python2-requests
8ad4ae20 2403 (package-with-python2 python-requests))
ae641128 2404
ea521b42
DT
2405(define-public python-vcversioner
2406 (package
2407 (name "python-vcversioner")
538fe019 2408 (version "2.16.0.0")
ea521b42
DT
2409 (source
2410 (origin
2411 (method url-fetch)
2412 (uri (pypi-uri "vcversioner" version))
2413 (sha256
2414 (base32
538fe019 2415 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2416 (build-system python-build-system)
ea521b42
DT
2417 (synopsis "Python library for version number discovery")
2418 (description "Vcversioner is a Python library that inspects tagging
2419information in a variety of version control systems in order to discover
2420version numbers.")
2421 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2422 (license license:isc)))
ea521b42
DT
2423
2424(define-public python2-vcversioner
f210e944 2425 (package-with-python2 python-vcversioner))
ae641128 2426
864b5211
DT
2427(define-public python-jsonschema
2428 (package
2429 (name "python-jsonschema")
b3667afb 2430 (version "2.5.1")
864b5211
DT
2431 (source (origin
2432 (method url-fetch)
2433 (uri
2434 (string-append
2435 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2436 version ".tar.gz"))
2437 (sha256
2438 (base32
b3667afb 2439 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2440 (build-system python-build-system)
8bcd6b91
EF
2441 (arguments
2442 '(#:phases
2443 (modify-phases %standard-phases
2444 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2445 (native-inputs
8bcd6b91
EF
2446 `(("python-nose" ,python-nose)
2447 ("python-vcversioner" ,python-vcversioner)))
2448 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2449 (synopsis "Implementation of JSON Schema for Python")
2450 (description
2451 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2452 (license license:expat)
2453 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2454
2455(define-public python2-jsonschema
a14600ec
LF
2456 (let ((jsonschema (package-with-python2
2457 (strip-python2-variant python-jsonschema))))
264ae686 2458 (package (inherit jsonschema)
eaba9d66 2459 (native-inputs
8bcd6b91 2460 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2461 ,@(package-native-inputs jsonschema)))
2462 (propagated-inputs
2463 `(("python2-functools32" ,python2-functools32))))))
850189b8
DT
2464
2465(define-public python-unidecode
2466 (package
2467 (name "python-unidecode")
8925d4f3 2468 (version "0.04.18")
850189b8
DT
2469 (source (origin
2470 (method url-fetch)
8925d4f3 2471 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2472 (sha256
2473 (base32
8925d4f3 2474 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8 2475 (build-system python-build-system)
850189b8
DT
2476 (home-page "https://pypi.python.org/pypi/Unidecode")
2477 (synopsis "ASCII transliterations of Unicode text")
2478 (description
2479 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2480useful when integrating with legacy code that doesn't support Unicode, or for
2481ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2482machine identifiers from human-readable Unicode strings that should still be
2483somewhat intelligeble.")
3f641af0 2484 (license license:gpl2+)))
850189b8
DT
2485
2486(define-public python2-unidecode
2487 (package-with-python2 python-unidecode))
6d45fef4
DT
2488
2489(define-public python-pyjwt
2490 (package
2491 (name "python-pyjwt")
eb31d4b4 2492 (version "1.4.0")
6d45fef4
DT
2493 (source
2494 (origin
2495 (method url-fetch)
eb31d4b4 2496 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2497 (sha256
2498 (base32
eb31d4b4 2499 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2500 (build-system python-build-system)
eb31d4b4 2501 (native-inputs
130fe994
HG
2502 `(("python-pytest" ,python-pytest)
2503 ("python-pytest-cov" ,python-pytest-cov)
2504 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2505 (home-page "http://github.com/progrium/pyjwt")
2506 (synopsis "JSON Web Token implementation in Python")
2507 (description
2508 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2509 (license license:expat)))
6d45fef4
DT
2510
2511(define-public python2-pyjwt
2512 (package-with-python2 python-pyjwt))
2513
2cec1f6f
DT
2514(define-public python-oauthlib
2515 (package
2516 (name "python-oauthlib")
bde2171d 2517 (version "1.0.3")
2cec1f6f
DT
2518 (source (origin
2519 (method url-fetch)
bde2171d 2520 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2521 (sha256
2522 (base32
bde2171d 2523 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2524 (build-system python-build-system)
bde2171d 2525 (native-inputs
bb06aa34 2526 `(("python-nose" ,python-nose)
c616b5d3 2527 ("python-mock" ,python-mock)
bde2171d 2528 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2529 ("python-pyjwt" ,python-pyjwt)
2530 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2531 (home-page "https://github.com/idan/oauthlib")
2532 (synopsis "OAuth implementation for Python")
2533 (description
2534 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2535OAuth request-signing logic.")
3f641af0 2536 (license license:bsd-3)
59f151ec 2537 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2538
2539(define-public python2-oauthlib
59f151ec 2540 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2541 (package
2542 (inherit base)
00e10c6e 2543 (native-inputs `(("python2-unittest2" ,python2-unittest2)
59f151ec 2544 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2545
2546(define-public python-itsdangerous
2547 (package
2548 (name "python-itsdangerous")
2549 (version "0.24")
2550 (source
2551 (origin
2552 (method url-fetch)
2553 (uri (string-append
2554 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2555 version ".tar.gz"))
2556 (sha256
2557 (base32
2558 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2559 (build-system python-build-system)
ec5dbb5c
DT
2560 (home-page "http://github.com/mitsuhiko/itsdangerous")
2561 (synopsis "Python library for passing data to/from untrusted environments")
2562 (description
2563 "Itsdangerous provides various helpers to pass trusted data to untrusted
2564environments and back.")
f210e944 2565 (license license:bsd-3)))
ec5dbb5c
DT
2566
2567(define-public python2-itsdangerous
f210e944 2568 (package-with-python2 python-itsdangerous))
5731cae3 2569
8d12be1e
RW
2570(define-public python-pyyaml
2571 (package
2572 (name "python-pyyaml")
2573 (version "3.11")
2574 (source
2575 (origin
2576 (method url-fetch)
2577 (uri (string-append
2578 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2579 version ".tar.gz"))
2580 (sha256
2581 (base32
2582 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2583 (build-system python-build-system)
2584 (inputs
2585 `(("libyaml" ,libyaml)))
8d12be1e
RW
2586 (home-page "http://pyyaml.org/wiki/PyYAML")
2587 (synopsis "YAML parser and emitter for Python")
2588 (description
2589 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2590complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2591API, and sensible error messages. PyYAML supports standard YAML tags and
2592provides Python-specific tags that allow to represent an arbitrary Python
2593object.")
2594 (license license:expat)))
2595
2596(define-public python2-pyyaml
2597 (package-with-python2 python-pyyaml))
2598
5731cae3
DT
2599(define-public python-virtualenv
2600 (package
2601 (name "python-virtualenv")
58d04dba 2602 (version "15.0.3")
5731cae3
DT
2603 (source
2604 (origin
2605 (method url-fetch)
17804240 2606 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2607 (sha256
2608 (base32
58d04dba 2609 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2610 (build-system python-build-system)
17804240
EF
2611 (arguments
2612 `(#:phases
2613 (modify-phases %standard-phases
58d04dba
RW
2614 (replace 'check
2615 (lambda _
2616 ;; Disable failing test. See upstream bug report
2617 ;; https://github.com/pypa/virtualenv/issues/957
2618 (substitute* "tests/test_virtualenv.py"
2619 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2620 (zero? (system* "py.test")))))))
e7881f3d 2621 (native-inputs
f3b98f4f 2622 `(("python-mock" ,python-mock)
17804240 2623 ("python-pytest" ,python-pytest)))
5731cae3
DT
2624 (home-page "https://virtualenv.pypa.io/")
2625 (synopsis "Virtual Python environment builder")
2626 (description
2627 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2628 (license license:expat)))
5731cae3
DT
2629
2630(define-public python2-virtualenv
2631 (package-with-python2 python-virtualenv))
8176d4d5
DT
2632
2633(define-public python-markupsafe
2634 (package
2635 (name "python-markupsafe")
2636 (version "0.23")
2637 (source
2638 (origin
2639 (method url-fetch)
2640 (uri (string-append
2641 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2642 version ".tar.gz"))
2643 (sha256
2644 (base32
2645 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2646 (build-system python-build-system)
8176d4d5
DT
2647 (home-page "http://github.com/mitsuhiko/markupsafe")
2648 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2649 (description
2650 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2651for Python.")
3f641af0 2652 (license license:bsd-3)))
8176d4d5
DT
2653
2654(define-public python2-markupsafe
2655 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2656
2657(define-public python-jinja2
2658 (package
2659 (name "python-jinja2")
e98149b3 2660 (version "2.8")
fe34f0d1
DT
2661 (source
2662 (origin
2663 (method url-fetch)
e98149b3 2664 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2665 (sha256
2666 (base32
e98149b3 2667 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2668 (build-system python-build-system)
f22efa01 2669 (propagated-inputs
f3b98f4f 2670 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2671 (home-page "http://jinja.pocoo.org/")
2672 (synopsis "Python template engine")
2673 (description
2674 "Jinja2 is a small but fast and easy to use stand-alone template engine
2675written in pure Python.")
3f641af0 2676 (license license:bsd-3)))
fe34f0d1
DT
2677
2678(define-public python2-jinja2
2679 (package-with-python2 python-jinja2))
3580ab8b 2680
f7d17ac7
EE
2681(define-public python-pystache
2682 (package
2683 (name "python-pystache")
2684 (version "0.5.4")
2685 (source (origin
2686 (method url-fetch)
2687 (uri (pypi-uri "pystache" version))
2688 (sha256
2689 (base32
2690 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2691 (build-system python-build-system)
8bd5164b
MB
2692 (arguments
2693 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
f7d17ac7
EE
2694 (home-page "http://defunkt.io/pystache/")
2695 (synopsis "Python logic-less template engine")
2696 (description
2697 "Pystache is a Python implementation of the framework agnostic,
2698logic-free templating system Mustache.")
8bd5164b
MB
2699 (license license:expat)
2700 (properties `((python2-variant . ,(delay python2-pystache))))))
f7d17ac7
EE
2701
2702(define-public python2-pystache
8bd5164b
MB
2703 (package (inherit (package-with-python2
2704 (strip-python2-variant python-pystache)))
2705 (arguments
2706 `(#:python ,python-2
2707 #:phases
2708 (modify-phases %standard-phases
2709 (replace 'check
2710 (lambda _
2711 (zero? (system* "python" "test_pystache.py")))))))))
f7d17ac7 2712
1285119b
RW
2713(define-public python-joblib
2714 (package
2715 (name "python-joblib")
f34ef331 2716 (version "0.10.3")
1285119b
RW
2717 (source (origin
2718 (method url-fetch)
f34ef331 2719 (uri (pypi-uri "joblib" version))
1285119b
RW
2720 (sha256
2721 (base32
6aa5f1ca
HG
2722 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2723 (modules '((guix build utils)))
2724 (snippet
2725 '(begin
2726 ;; Remove pre-compiled .pyc files from source.
2727 (for-each delete-file-recursively
2728 (find-files "." "__pycache__" #:directories? #t))
2729 (for-each delete-file (find-files "." "\\.pyc$"))
2730 #t))))
1285119b 2731 (build-system python-build-system)
a8dd960a
RW
2732 (arguments
2733 `(#:phases
2734 (modify-phases %standard-phases
2735 (add-before 'check 'disable-failing-tests
2736 (lambda _
2737 ;; This numpydoc tests fails for unknown reasons
2738 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2739 ;; This numpydoc test depends on matplotlib, which is not a
2740 ;; required input.
2741 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2742 ;; These tests fail to execute sys.executable
2743 (substitute* "joblib/test/test_parallel.py"
2744 (("import nose" line)
2745 (string-append "from nose.plugins.skip import SkipTest\n" line))
2746 (("def test_nested_parallel_warnings" line)
2747 (string-append "@SkipTest\n" line))
2748 (("def test_parallel_with_interactively_defined_functions" line)
2749 (string-append "@SkipTest\n" line)))
2750 #t)))))
f052ec9a 2751 ;; Provide nose to enable tests command
1285119b 2752 (native-inputs
f3b98f4f 2753 `(("python-nose" ,python-nose)
f34ef331
RW
2754 ("python-sphinx" ,python-sphinx)
2755 ("python-docutils" ,python-docutils)
2756 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2757 (home-page "http://pythonhosted.org/joblib/")
2758 (synopsis "Using Python functions as pipeline jobs")
2759 (description
2760 "Joblib is a set of tools to provide lightweight pipelining in Python.
2761In particular, joblib offers: transparent disk-caching of the output values
2762and lazy re-evaluation (memoize pattern), easy simple parallel computing
2763logging and tracing of the execution.")
3f641af0 2764 (license license:bsd-3)))
1285119b
RW
2765
2766(define-public python2-joblib
2767 (package-with-python2 python-joblib))
2768
3580ab8b
DT
2769(define-public python-docutils
2770 (package
2771 (name "python-docutils")
2772 (version "0.12")
2773 (source
2774 (origin
2775 (method url-fetch)
2776 (uri (string-append
2777 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2778 version ".tar.gz"))
2779 (sha256
2780 (base32
2781 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2782 (build-system python-build-system)
3580ab8b
DT
2783 (arguments
2784 '(#:tests? #f)) ; no setup.py test command
2785 (home-page "http://docutils.sourceforge.net/")
2786 (synopsis "Python Documentation Utilities")
2787 (description
2788 "Docutils is a modular system for processing documentation into useful
2789formats, such as HTML, XML, and LaTeX. For input Docutils supports
2790reStructuredText.")
2791 ;; Most of the source code is public domain, but some source files are
2792 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2793 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2794
2795(define-public python2-docutils
2796 (package-with-python2 python-docutils))
fb35b7c0
DT
2797
2798(define-public python-pygments
2799 (package
2800 (name "python-pygments")
9f442285 2801 (version "2.0.2")
fb35b7c0
DT
2802 (source
2803 (origin
2804 (method url-fetch)
9f442285 2805 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2806 (sha256
2807 (base32
9f442285 2808 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0 2809 (build-system python-build-system)
995cb99e
MB
2810 (arguments
2811 ;; FIXME: Tests require sphinx, which depends on this.
2812 '(#:tests? #f))
fb35b7c0
DT
2813 (home-page "http://pygments.org/")
2814 (synopsis "Syntax highlighting")
2815 (description
2816 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2817 (license license:bsd-2)))
fb35b7c0
DT
2818
2819(define-public python2-pygments
2820 (package-with-python2 python-pygments))
9dd6078d
DT
2821
2822(define-public python-sphinx
2823 (package
2824 (name "python-sphinx")
2825 (version "1.2.3")
2826 (source
2827 (origin
2828 (method url-fetch)
2829 (uri (string-append
2830 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2831 version ".tar.gz"))
2832 (sha256
2833 (base32
2834 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2835 (build-system python-build-system)
03cb5f9e
MB
2836 (arguments
2837 ;; FIXME: Missing dependencies.
2838 '(#:tests? #f))
f22efa01 2839 (propagated-inputs
f3b98f4f 2840 `(("python-jinja2" ,python-jinja2)
9dd6078d
DT
2841 ("python-docutils" ,python-docutils)
2842 ("python-pygments" ,python-pygments)))
2843 (home-page "http://sphinx-doc.org/")
2844 (synopsis "Python documentation generator")
2845 (description "Sphinx is a tool that makes it easy to create documentation
2846for Python projects or other documents consisting of multiple reStructuredText
2847sources.")
3f641af0 2848 (license license:bsd-3)))
9dd6078d
DT
2849
2850(define-public python2-sphinx
2851 (package-with-python2 python-sphinx))
6888830b 2852
ad320b20
RW
2853(define-public python-sphinx-rtd-theme
2854 (package
2855 (name "python-sphinx-rtd-theme")
2856 (version "0.1.6")
2857 (source
2858 (origin
2859 (method url-fetch)
2860 (uri (string-append "https://pypi.python.org/packages/source/s/"
2861 "sphinx_rtd_theme/sphinx_rtd_theme-"
2862 version ".tar.gz"))
2863 (sha256
2864 (base32
2865 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2866 (build-system python-build-system)
9d3a15b4
LF
2867 (propagated-inputs
2868 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
2869 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2870 (synopsis "ReadTheDocs.org theme for Sphinx")
2871 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2872 (license license:expat)))
ad320b20
RW
2873
2874(define-public python2-sphinx-rtd-theme
2875 (package-with-python2 python-sphinx-rtd-theme))
2876
fe94cf0c
HG
2877(define-public python-rst.linker
2878 (package
2879 (name "python-rst.linker")
2880 (version "1.7")
2881 (source
2882 (origin
2883 (method url-fetch)
2884 (uri (pypi-uri "rst.linker" version))
2885 (sha256
2886 (base32
2887 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2888 (build-system python-build-system)
2889 (propagated-inputs
22d7360b 2890 `(("python-dateutil" ,python-dateutil)
fe94cf0c
HG
2891 ("python-six" ,python-six)))
2892 (native-inputs
2893 `(("python-setuptools-scm" ,python-setuptools-scm)))
2894 ;; Test would require path.py, which would introduce a cyclic dependence.
2895 (arguments `(#:tests? #f))
2896 ;; Note: As of version 1.7 the documentation is not worth building.
2897 (home-page "https://github.com/jaraco/rst.linker")
2898 (synopsis "Sphinx plugin to add links and timestamps")
2899 (description "rst.linker allows to automatically replace text by a
2900reStructuredText external reference or timestamps. It's primary purpose is to
2901augment the changelog, but it can be used for other documents, too.")
2902 (license license:expat)))
2903
2904(define-public python2-rst.linker
2905 (package-with-python2 python-rst.linker))
2906
f4de5b3b
CAW
2907(define-public python-feedgenerator
2908 (package
2909 (name "python-feedgenerator")
f0412aa2 2910 (version "1.8")
f4de5b3b 2911 (source
f4de5b3b 2912 (origin
f0412aa2
EF
2913 (method url-fetch)
2914 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2915 (sha256
2916 (base32
7c88bcf4
HG
2917 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
2918 (modules '((guix build utils)))
2919 (snippet
2920 '(begin
2921 ;; Remove pre-compiled .pyc files from source.
2922 (for-each delete-file-recursively
2923 (find-files "." "__pycache__" #:directories? #t))
2924 (for-each delete-file (find-files "." "\\.pyc$"))
2925 #t))))
f4de5b3b 2926 (build-system python-build-system)
dae73d9b 2927 (propagated-inputs
f3b98f4f 2928 `(("python-pytz" ,python-pytz)
f4de5b3b 2929 ("python-six" ,python-six)))
f0412aa2 2930 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2931 (synopsis
2932 "Standalone version of Django's Atom/RSS feed generator")
2933 (description
2934 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2935which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2936 (license license:bsd-3)))
f4de5b3b
CAW
2937
2938(define-public python2-feedgenerator
2939 (package-with-python2 python-feedgenerator))
2940
59ad30e3
CAW
2941(define-public python-blinker
2942 (package
2943 (name "python-blinker")
7fb9ff4d 2944 (version "1.4")
59ad30e3
CAW
2945 (source
2946 (origin
2947 (method url-fetch)
7fb9ff4d 2948 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2949 (sha256
2950 (base32
7fb9ff4d 2951 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 2952 (build-system python-build-system)
59ad30e3
CAW
2953 (home-page "http://pythonhosted.org/blinker/")
2954 (synopsis "Fast, simple object-to-object and broadcast signaling")
2955 (description
2956 "Blinker provides a fast dispatching system that allows any number of
2957interested parties to subscribe to events, or \"signals\".")
2958 (license license:expat)))
2959
2960(define-public python2-blinker
2961 (package-with-python2 python-blinker))
2962
b8050e71
CAW
2963(define-public pelican
2964 (package
2965 (name "pelican")
11f97c27 2966 (version "3.6.3")
b8050e71
CAW
2967 (source
2968 (origin
2969 (method url-fetch)
11f97c27 2970 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2971 (sha256
2972 (base32
11f97c27 2973 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2974 (build-system python-build-system)
f22efa01 2975 (propagated-inputs
b8050e71
CAW
2976 `(("python-feedgenerator" ,python-feedgenerator)
2977 ("python-jinja2" ,python-jinja2)
2978 ("python-pygments" ,python-pygments)
2979 ("python-docutils" ,python-docutils)
2980 ("python-pytz" ,python-pytz)
2981 ("python-blinker" ,python-blinker)
2982 ("python-unidecode" ,python-unidecode)
2983 ("python-six" ,python-six)
22d7360b 2984 ("python-dateutil" ,python-dateutil)))
b8050e71
CAW
2985 (home-page "http://getpelican.com/")
2986 (arguments
2987 `(;; XXX Requires a lot more packages to do unit tests :P
2988 #:tests? #f
2989 #:phases (modify-phases %standard-phases
2990 (add-before
2991 'install 'adjust-requires
2992 ;; Since feedgenerator is installed from git, it doesn't
2993 ;; conform to the version requirements.
2994 ;;
2995 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2996 ;; version requirement so setuptools doesn't get confused.
2997 (lambda _
2998 (substitute* "setup.py"
2999 (("['\"]feedgenerator.*?['\"]")
3000 "'feedgenerator'")))))))
3001 (synopsis "Python-based static site publishing system")
3002 (description
3003 "Pelican is a tool to generate a static blog from reStructuredText,
3004Markdown input files, and more. Pelican uses Jinja2 for templating
3005and is very extensible.")
3f641af0 3006 (license license:agpl3+)))
b8050e71 3007
240ca4aa
RW
3008(define-public python-scikit-learn
3009 (package
3010 (name "python-scikit-learn")
be0a4c26 3011 (version "0.16.1")
240ca4aa
RW
3012 (source
3013 (origin
3014 (method url-fetch)
3015 (uri (string-append
3016 "https://github.com/scikit-learn/scikit-learn/archive/"
3017 version ".tar.gz"))
7e21b9fb 3018 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3019 (sha256
3020 (base32
be0a4c26 3021 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
3022 (build-system python-build-system)
3023 (arguments
3024 `(#:phases
3025 (alist-cons-before
2f6b3d2e
RW
3026 'check 'set-HOME
3027 ;; some tests require access to "$HOME"
3028 (lambda _ (setenv "HOME" "/tmp"))
3029 ;; Tests can only be run after the library has been installed and not
3030 ;; within the source directory.
3031 (alist-cons-after
3032 'install 'check
3033 (lambda _
3034 (with-directory-excursion "/tmp"
3035 ;; With Python 3 one test of 3334 fails
3036 ;; (sklearn.tests.test_common.test_transformers); see
3037 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
3038 (system* "nosetests" "-v" "sklearn")))
3039 (alist-delete 'check %standard-phases)))))
240ca4aa 3040 (inputs
328bb95d
HG
3041 `(("openblas" ,openblas)))
3042 (native-inputs
3043 `(("python-nose" ,python-nose)))
240ca4aa
RW
3044 (propagated-inputs
3045 `(("python-numpy" ,python-numpy)
3046 ("python-scipy" ,python-scipy)))
3047 (home-page "http://scikit-learn.org/")
3048 (synopsis "Machine Learning in Python")
3049 (description
3050 "Scikit-learn provides simple and efficient tools for data
3051mining and data analysis.")
1b5241c5 3052 (license license:bsd-3)))
240ca4aa
RW
3053
3054(define-public python2-scikit-learn
1b5241c5 3055 (package-with-python2 python-scikit-learn))
240ca4aa 3056
12f8f9bb
RW
3057(define-public python-scikit-image
3058 (package
3059 (name "python-scikit-image")
3060 (version "0.11.3")
3061 (source
3062 (origin
3063 (method url-fetch)
3064 (uri (string-append
3065 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3066 version ".tar.gz"))
3067 (sha256
3068 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3069 (build-system python-build-system)
9026e689
MB
3070 (arguments
3071 ;; TODO: Some tests require running X11 server. Disable them?
3072 '(#:tests? #f))
b83e2333 3073 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3074 (propagated-inputs
3075 `(("python-matplotlib" ,python-matplotlib)
3076 ("python-networkx" ,python-networkx)
12f8f9bb 3077 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3078 ("python-pillow" ,python-pillow)))
3079 (native-inputs
b83e2333
HG
3080 `(("python-numpy" ,python-numpy)
3081 ("python-cython" ,python-cython)
3082 ("python-six" ,python-six)))
12f8f9bb
RW
3083 (home-page "http://scikit-image.org/")
3084 (synopsis "Image processing in Python")
3085 (description
e881752c 3086 "Scikit-image is a collection of algorithms for image processing.")
12733594 3087 (license license:bsd-3)))
12f8f9bb
RW
3088
3089(define-public python2-scikit-image
12733594 3090 (package-with-python2 python-scikit-image))
12f8f9bb 3091
5394a6a6
RW
3092(define-public python-redis
3093 (package
3094 (name "python-redis")
3095 (version "2.10.3")
3096 (source
3097 (origin
3098 (method url-fetch)
3099 (uri (string-append
3100 "https://pypi.python.org/packages/source/r/redis/redis-"
3101 version ".tar.gz"))
3102 (sha256
3103 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3104 (build-system python-build-system)
3105 ;; Tests require a running Redis server
3106 (arguments '(#:tests? #f))
cf8124b0
HG
3107 ;; As long as we are not running test, we do not need this input :-)
3108 ;;(native-inputs
3109 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3110 (home-page "https://github.com/andymccurdy/redis-py")
3111 (synopsis "Redis Python client")
3112 (description
3113 "This package provides a Python interface to the Redis key-value store.")
3114 (license license:expat)))
3115
3116(define-public python2-redis
3117 (package-with-python2 python-redis))
3118
748cef5b
RW
3119(define-public python-rq
3120 (package
3121 (name "python-rq")
3122 (version "0.5.2")
3123 (source
3124 (origin
3125 (method url-fetch)
3126 (uri (string-append
3127 "https://pypi.python.org/packages/source/r/rq/rq-"
3128 version ".tar.gz"))
3129 (sha256
3130 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3131 (build-system python-build-system)
3132 (propagated-inputs
3133 `(("python-click" ,python-click)
3134 ("python-redis" ,python-redis)))
748cef5b
RW
3135 (home-page "http://python-rq.org/")
3136 (synopsis "Simple job queues for Python")
3137 (description
3138 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3139processing them in the background with workers. It is backed by Redis and it
3140is designed to have a low barrier to entry.")
3f641af0 3141 (license license:bsd-2)))
748cef5b
RW
3142
3143(define-public python2-rq
3144 (package-with-python2 python-rq))
3145
6888830b
FB
3146(define-public python-cython
3147 (package
3148 (name "python-cython")
dd22efef 3149 (version "0.24.1")
6888830b
FB
3150 (source
3151 (origin
3152 (method url-fetch)
56918e26 3153 (uri (pypi-uri "Cython" version))
6888830b
FB
3154 (sha256
3155 (base32
dd22efef 3156 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3157 (build-system python-build-system)
3158 ;; we need the full python package and not just the python-wrapper
3159 ;; because we need libpython3.3m.so
3160 (inputs
3161 `(("python" ,python)))
3162 (arguments
3163 `(#:phases
b92f651b
EF
3164 (modify-phases %standard-phases
3165 (add-before 'check 'set-HOME
3166 ;; some tests require access to "$HOME/.cython"
3167 (lambda _ (setenv "HOME" "/tmp")))
3168 (replace 'check
3169 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3170 (home-page "http://cython.org/")
3171 (synopsis "C extensions for Python")
3172 (description "Cython is an optimising static compiler for both the Python
3173programming language and the extended Cython programming language. It makes
3174writing C extensions for Python as easy as Python itself.")
3f641af0 3175 (license license:asl2.0)
48b311b1 3176 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3177
3178(define-public python2-cython
48b311b1
LC
3179 (package (inherit (package-with-python2
3180 (strip-python2-variant python-cython)))
6888830b
FB
3181 (name "python2-cython")
3182 (inputs
3183 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3184
ee5fb7ee
AV
3185;; The RPython toolchain currently does not support Python 3.
3186(define-public python2-rpython
3187 (package
3188 (name "python2-rpython")
3189 (version "0.1.4")
3190 (source
3191 (origin
3192 (method url-fetch)
3193 (uri (pypi-uri "rpython" version))
3194 (sha256
3195 (base32
3196 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3197 (build-system python-build-system)
3198 (arguments `(#:python ,python-2))
3199 (native-inputs
f3b98f4f 3200 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3201 (home-page "https://rpython.readthedocs.org")
3202 (synopsis "Framework for implementing interpreters and virtual machines")
3203 (description "RPython is a translation and support framework for
3204producing implementations of dynamic languages, emphasizing a clean separation
3205between language specification and implementation aspects.")
3206 (license license:expat)))
3207
0da98533
FB
3208;; This version of numpy is missing the documentation and is only used to
3209;; build matplotlib which is required to build numpy's documentation.
3210(define python-numpy-bootstrap
3211 (package
3212 (name "python-numpy-bootstrap")
ef9b4c04 3213 (version "1.10.4")
0da98533
FB
3214 (source
3215 (origin
3216 (method url-fetch)
de67e922 3217 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3218 "/numpy-" version ".tar.gz"))
3219 (sha256
3220 (base32
ef9b4c04 3221 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3222 (build-system python-build-system)
3223 (inputs
328bb95d 3224 `(("openblas" ,openblas)
cba256f8 3225 ("lapack" ,lapack)))
0da98533 3226 (native-inputs
2efabc55
HG
3227 `(("python-nose" ,python-nose)
3228 ("gfortran" ,gfortran)))
0da98533
FB
3229 (arguments
3230 `(#:phases
2efabc55
HG
3231 (modify-phases %standard-phases
3232 (add-before 'build 'set-environment-variables
3233 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3234 (call-with-output-file "site.cfg"
3235 (lambda (port)
cba256f8
RW
3236 (format port
3237 "[openblas]
dbdfe515
RW
3238libraries = openblas
3239library_dirs = ~a/lib
3240include_dirs = ~a/include
cba256f8 3241
2efabc55
HG
3242# backslash-n to make emacs happy
3243\n[lapack]
cba256f8
RW
3244lapack_libs = lapack
3245library_dirs = ~a/lib
3246include_dirs = ~a/include
3247"
3248 (assoc-ref inputs "openblas")
3249 (assoc-ref inputs "openblas")
3250 (assoc-ref inputs "lapack")
3251 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3252 ;; Use "gcc" executable, not "cc".
3253 (substitute* "numpy/distutils/system_info.py"
3254 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3255 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3256 #t))
6a843168
FB
3257 ;; Tests can only be run after the library has been installed and not
3258 ;; within the source directory.
2efabc55
HG
3259 (delete 'check)
3260 (add-after 'install 'check
3261 (lambda* (#:key outputs inputs #:allow-other-keys)
3262 ;; Make installed package available for running the tests
3263 (add-installed-pythonpath inputs outputs)
6a843168 3264 (with-directory-excursion "/tmp"
89b5c60e 3265 (zero? (system* "python" "-c"
2efabc55 3266 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3267 (home-page "http://www.numpy.org/")
3268 (synopsis "Fundamental package for scientific computing with Python")
3269 (description "NumPy is the fundamental package for scientific computing
e881752c 3270with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3271object, sophisticated (broadcasting) functions, tools for integrating C/C++
3272and Fortran code, useful linear algebra, Fourier transform, and random number
3273capabilities.")
3f641af0 3274 (license license:bsd-3)))
0da98533
FB
3275
3276(define python2-numpy-bootstrap
3277 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3278
3a1bfe18
RW
3279(define-public python2-fastlmm
3280 (package
3281 (name "python2-fastlmm")
b074e7d4 3282 (version "0.2.21")
3a1bfe18
RW
3283 (source
3284 (origin
3285 (method url-fetch)
b074e7d4 3286 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3287 (sha256
3288 (base32
b074e7d4 3289 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3290 (build-system python-build-system)
3291 (arguments
3292 `(#:python ,python-2)) ; only Python 2.7 is supported
3293 (propagated-inputs
3294 `(("python2-numpy" ,python2-numpy)
3295 ("python2-scipy" ,python2-scipy)
3296 ("python2-matplotlib" ,python2-matplotlib)
3297 ("python2-pandas" ,python2-pandas)
3298 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3299 ("python2-pysnptools" ,python2-pysnptools)))
3300 (native-inputs
3301 `(("unzip" ,unzip)
2efabc55 3302 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3303 ("python2-mock" ,python2-mock)
3304 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3305 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3306 (synopsis "Perform genome-wide association studies on large data sets")
3307 (description
3308 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3309Models, is a program for performing both single-SNP and SNP-set genome-wide
3310association studies (GWAS) on extremely large data sets.")
3f641af0 3311 (license license:asl2.0)))
3a1bfe18 3312
2ee8869a
FB
3313(define-public python-numpy
3314 (package (inherit python-numpy-bootstrap)
3315 (name "python-numpy")
3316 (outputs '("out" "doc"))
89b5c60e 3317 (inputs
b0aa6ede
HG
3318 `(("which" ,which)
3319 ,@(package-inputs python-numpy-bootstrap)))
2efabc55
HG
3320 (propagated-inputs
3321 `(("python-matplotlib" ,python-matplotlib)
2ee8869a 3322 ("python-pyparsing" ,python-pyparsing)
b0aa6ede 3323 ,@(package-propagated-inputs python-numpy-bootstrap)))
2ee8869a
FB
3324 (native-inputs
3325 `(("pkg-config" ,pkg-config)
2efabc55
HG
3326 ("python-sphinx" ,python-sphinx)
3327 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3328 ("texlive" ,texlive)
3329 ("texinfo" ,texinfo)
3330 ("perl" ,perl)
3331 ,@(package-native-inputs python-numpy-bootstrap)))
3332 (arguments
89b5c60e 3333 `(,@(substitute-keyword-arguments
2ee8869a
FB
3334 (package-arguments python-numpy-bootstrap)
3335 ((#:phases phases)
3336 `(alist-cons-after
3337 'install 'install-doc
2efabc55
HG
3338 (lambda* (#:key inputs outputs #:allow-other-keys)
3339 ;; Make installed package available for building the
3340 ;; documentation
3341 (add-installed-pythonpath inputs outputs)
2ee8869a 3342 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3343 (doc (string-append
3344 data "/doc/" ,name "-"
2ee8869a
FB
3345 ,(package-version python-numpy-bootstrap)))
3346 (info (string-append data "/info"))
3347 (html (string-append doc "/html"))
3348 (pyver ,(string-append "PYVER=")))
3349 (with-directory-excursion "doc"
3350 (mkdir-p html)
3351 (system* "make" "html" pyver)
3352 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3353 (system* "make" "-C" "build/latex"
2ee8869a
FB
3354 "all-pdf" "PAPER=a4" pyver)
3355 ;; FIXME: Generation of the info file fails.
3356 ;; (system* "make" "info" pyver)
3357 ;; (mkdir-p info)
3358 ;; (copy-file "build/texinfo/numpy.info"
3359 ;; (string-append info "/numpy.info"))
3360 (for-each (lambda (file)
3361 (copy-file (string-append "build/latex" file)
3362 (string-append doc file)))
3363 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3364 (with-directory-excursion "build/html"
3365 (for-each (lambda (file)
3366 (let* ((dir (dirname file))
3367 (tgt-dir (string-append html "/" dir)))
3368 (unless (equal? "." dir)
3369 (mkdir-p tgt-dir))
96c46210 3370 (install-file file html)))
2ee8869a
FB
3371 (find-files "." ".*"))))))
3372 ,phases)))))))
3373
764c077b 3374(define-public python2-numpy
57b7b8cd 3375 (package-with-python2 python-numpy))
2ee8869a 3376
15bfe6d6
FB
3377(define-public python-pyparsing
3378 (package
3379 (name "python-pyparsing")
e0669289 3380 (version "2.0.3")
15bfe6d6
FB
3381 (source
3382 (origin
3383 (method url-fetch)
de67e922
LF
3384 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3385 "/pyparsing-" version
15bfe6d6
FB
3386 "/pyparsing-" version ".tar.gz"))
3387 (sha256
3388 (base32
e0669289 3389 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3390 (build-system python-build-system)
3391 (outputs '("out" "doc"))
3392 (arguments
3393 `(#:tests? #f ; no test target
3394 #:modules ((guix build python-build-system)
3395 (guix build utils))
3396 #:phases
3397 (alist-cons-after
3398 'install 'install-doc
3399 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3400 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3401 "/share/doc/" ,name "-" ,version))
3402 (html-doc (string-append doc "/html"))
3403 (examples (string-append doc "/examples")))
3404 (mkdir-p html-doc)
3405 (mkdir-p examples)
89b5c60e 3406 (for-each
15bfe6d6 3407 (lambda (dir tgt)
89b5c60e 3408 (map (lambda (file)
96c46210 3409 (install-file file tgt))
15bfe6d6
FB
3410 (find-files dir ".*")))
3411 (list "docs" "htmldoc" "examples")
3412 (list doc html-doc examples))))
3413 %standard-phases)))
3414 (home-page "http://pyparsing.wikispaces.com")
3415 (synopsis "Python parsing class library")
3416 (description
3417 "The pyparsing module is an alternative approach to creating and
3418executing simple grammars, vs. the traditional lex/yacc approach, or the use
3419of regular expressions. The pyparsing module provides a library of classes
3420that client code uses to construct the grammar directly in Python code.")
bd3fa666 3421 (license license:expat)))
15bfe6d6
FB
3422
3423(define-public python2-pyparsing
3424 (package-with-python2 python-pyparsing))
3425
ec00de35
FB
3426(define-public python-numpydoc
3427 (package
3428 (name "python-numpydoc")
3429 (version "0.5")
3430 (source
3431 (origin
3432 (method url-fetch)
89b5c60e 3433 (uri (string-append
ec00de35
FB
3434 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3435 version ".tar.gz"))
3436 (sha256
3437 (base32
5e4d8f67
AE
3438 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3439 (modules '((guix build utils)))
3440 (snippet
3441 '(begin
3442 ;; Drop a test requiring matplotlib, which we cannot add as an
3443 ;; input since it would create a circular dependency: Extend the
3444 ;; test for Python 3, where it is already dropped, to Python 2.
3445 (substitute* "numpydoc/tests/test_plot_directive.py"
3446 (("3") "2"))))))
ec00de35 3447 (build-system python-build-system)
fe4a8da4 3448 (propagated-inputs
213d1745
HG
3449 `(("python-sphinx" ,python-sphinx)))
3450 (native-inputs
3451 `(("python-nose" ,python-nose)))
ec00de35
FB
3452 (home-page "https://pypi.python.org/pypi/numpydoc")
3453 (synopsis
3454 "Numpy's Sphinx extensions")
3455 (description
3456 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3457 (license license:bsd-2)))
ec00de35
FB
3458
3459(define-public python2-numpydoc
5e4d8f67 3460 (package-with-python2 python-numpydoc))
1c65314c 3461
1e656049
RW
3462(define-public python-numexpr
3463 (package
3464 (name "python-numexpr")
26112c0a 3465 (version "2.6.0")
1e656049
RW
3466 (source
3467 (origin
3468 (method url-fetch)
26112c0a 3469 (uri (pypi-uri "numexpr" version))
1e656049
RW
3470 (sha256
3471 (base32
26112c0a 3472 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3473 (build-system python-build-system)
3474 (arguments `(#:tests? #f)) ; no tests included
3475 (propagated-inputs
3476 `(("python-numpy" ,python-numpy)))
3477 (home-page "https://github.com/pydata/numexpr")
3478 (synopsis "Fast numerical expression evaluator for NumPy")
3479 (description
3480 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3481expressions that operate on arrays are accelerated and use less memory than
3482doing the same calculation in Python. In addition, its multi-threaded
3483capabilities can make use of all your cores, which may accelerate
3484computations, most specially if they are not memory-bounded (e.g. those using
3485transcendental functions).")
f210e944 3486 (license license:expat)))
1e656049
RW
3487
3488(define-public python2-numexpr
f210e944 3489 (package-with-python2 python-numexpr))
1e656049 3490
1c65314c
FB
3491(define-public python-matplotlib
3492 (package
3493 (name "python-matplotlib")
1bbc659f 3494 (version "1.4.3")
1c65314c
FB
3495 (source
3496 (origin
3497 (method url-fetch)
de67e922
LF
3498 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3499 "/matplotlib-" version
1c65314c
FB
3500 "/matplotlib-" version ".tar.gz"))
3501 (sha256
3502 (base32
1bbc659f 3503 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3504 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3505 (build-system python-build-system)
3506 (outputs '("out" "doc"))
25f9a068
FB
3507 (propagated-inputs ; the following packages are all needed at run time
3508 `(("python-pyparsing" ,python-pyparsing)
3509 ("python-pygobject" ,python-pygobject)
3510 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3511 ("python-tkinter" ,python "tk")
22d7360b 3512 ("python-dateutil" ,python-dateutil)
ca33a3ad
HG
3513 ("python-numpy" ,python-numpy-bootstrap)
3514 ("python-pillow" ,python-pillow)
3515 ("python-pytz" ,python-pytz)
3516 ("python-six" ,python-six)
25f9a068
FB
3517 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3518 ;; from 'gtk+') provides the required 'typelib' files used by
3519 ;; 'gobject-introspection'. The location of these files is set with the
3520 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3521 ;; is done automatically by a 'native-search-path' procedure. However,
3522 ;; at run-time the user must set this variable as follows:
3523 ;;
3524 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3525 ("gtk+" ,gtk+)
3526 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3527 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3528 ;; object. For this reason we need to import both libraries.
3529 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3530 ("python-pycairo" ,python-pycairo)
3531 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3532 (inputs
ca33a3ad 3533 `(("libpng" ,libpng)
1c65314c
FB
3534 ("imagemagick" ,imagemagick)
3535 ("freetype" ,freetype)
25f9a068
FB
3536 ("cairo" ,cairo)
3537 ("glib" ,glib)
1c65314c 3538 ;; FIXME: Add backends when available.
1c65314c
FB
3539 ;("python-wxpython" ,python-wxpython)
3540 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3541 ("tcl" ,tcl)
3542 ("tk" ,tk)))
1c65314c
FB
3543 (native-inputs
3544 `(("pkg-config" ,pkg-config)
ca33a3ad
HG
3545 ("python-sphinx" ,python-sphinx)
3546 ("python-numpydoc" ,python-numpydoc)
3547 ("python-nose" ,python-nose)
3548 ("python-mock" ,python-mock)
1c65314c
FB
3549 ("texlive" ,texlive)
3550 ("texinfo" ,texinfo)))
3551 (arguments
3552 `(#:phases
25f9a068
FB
3553 (alist-cons-before
3554 'build 'configure-environment
3555 (lambda* (#:key outputs inputs #:allow-other-keys)
3556 (let ((cairo (assoc-ref inputs "cairo"))
3557 (gtk+ (assoc-ref inputs "gtk+")))
3558 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3559 ;; has not effect.
25f9a068
FB
3560 (setenv "LD_LIBRARY_PATH"
3561 (string-append cairo "/lib:" gtk+ "/lib"))
3562 (setenv "HOME" (getcwd))
3563 (call-with-output-file "setup.cfg"
3564 (lambda (port)
1bbc659f
FB
3565 (format port "[directories]~%
3566basedirlist = ~a,~a~%
57b7b8cd 3567 [rc_options]~%
1bbc659f
FB
3568backend = TkAgg~%"
3569 (assoc-ref inputs "tcl")
3570 (assoc-ref inputs "tk"))))))
25f9a068
FB
3571 (alist-cons-after
3572 'install 'install-doc
ca33a3ad 3573 (lambda* (#:key inputs outputs #:allow-other-keys)
25f9a068
FB
3574 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3575 (doc (string-append data "/doc/" ,name "-" ,version))
3576 (info (string-append data "/info"))
3577 (html (string-append doc "/html")))
ca33a3ad
HG
3578 ;; Make installed package available for building the
3579 ;; documentation
3580 (add-installed-pythonpath inputs outputs)
25f9a068 3581 (with-directory-excursion "doc"
25f9a068
FB
3582 ;; Produce pdf in 'A4' format.
3583 (substitute* (find-files "." "conf\\.py")
3584 (("latex_paper_size = 'letter'")
3585 "latex_paper_size = 'a4'"))
3586 (mkdir-p html)
3587 (mkdir-p info)
3588 ;; The doc recommends to run the 'html' target twice.
3589 (system* "python" "make.py" "html")
3590 (system* "python" "make.py" "html")
18b31516 3591 (copy-recursively "build/html" html)
25f9a068
FB
3592 (system* "python" "make.py" "latex")
3593 (system* "python" "make.py" "texinfo")
18b31516
FB
3594 (symlink (string-append html "/_images")
3595 (string-append info "/matplotlib-figures"))
3596 (with-directory-excursion "build/texinfo"
3597 (substitute* "matplotlib.texi"
3598 (("@image\\{([^,]*)" all file)
3599 (string-append "@image{matplotlib-figures/" file)))
3600 (symlink (string-append html "/_images")
3601 "./matplotlib-figures")
3602 (system* "makeinfo" "--no-split"
3603 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3604 (copy-file "build/texinfo/matplotlib.info"
3605 (string-append info "/matplotlib.info"))
3606 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3607 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3608 %standard-phases))))
1c65314c
FB
3609 (home-page "http://matplotlib.org")
3610 (synopsis "2D plotting library for Python")
3611 (description
3612 "Matplotlib is a Python 2D plotting library which produces publication
3613quality figures in a variety of hardcopy formats and interactive environments
3614across platforms. Matplotlib can be used in Python scripts, the python and
3615ipython shell, web application servers, and six graphical user interface
3616toolkits.")
3f641af0 3617 (license license:psfl)
57b7b8cd 3618 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3619
764c077b 3620(define-public python2-matplotlib
57b7b8cd
LC
3621 (let ((matplotlib (package-with-python2
3622 (strip-python2-variant python-matplotlib))))
764c077b 3623 (package (inherit matplotlib)
88c26834
AE
3624 ;; Make sure to use special packages for Python 2 instead
3625 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3626 (propagated-inputs
7ca0dbc3 3627 `(("python2-pycairo" ,python2-pycairo)
764c077b 3628 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3629 ("python2-tkinter" ,python-2 "tk")
3630 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3631 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3632
0dde6232
RW
3633(define-public python2-pysnptools
3634 (package
3635 (name "python2-pysnptools")
a800018e 3636 (version "0.3.9")
0dde6232
RW
3637 (source
3638 (origin
3639 (method url-fetch)
3f2e9675 3640 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3641 (sha256
3642 (base32
a800018e 3643 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3644 (build-system python-build-system)
3645 (arguments
3646 `(#:python ,python-2)) ; only Python 2.7 is supported
3647 (propagated-inputs
3648 `(("python2-numpy" ,python2-numpy)
3649 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
3650 ("python2-pandas" ,python2-pandas)))
3651 (native-inputs
3652 `(("python2-cython" ,python2-cython)))
0dde6232 3653 (native-inputs
f3b98f4f 3654 `(("unzip" ,unzip)))
0dde6232
RW
3655 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3656 (synopsis "Library for reading and manipulating genetic data")
3657 (description
3658 "PySnpTools is a library for reading and manipulating genetic data. It
3659can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3660those files. It can also efficiently manipulate ranges of integers using set
3661operators such as union, intersection, and difference.")
3f641af0 3662 (license license:asl2.0)))
0dde6232 3663
c9b1b4f9
RW
3664(define-public python-rpy2
3665 (package
3666 (name "python-rpy2")
ec3bcbc7 3667 (version "2.7.6")
c9b1b4f9
RW
3668 (source
3669 (origin
3670 (method url-fetch)
ec3bcbc7 3671 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3672 (sha256
3673 (base32
ec3bcbc7 3674 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 3675 (build-system python-build-system)
444464ec
MB
3676 (arguments
3677 '(#:phases
3678 (modify-phases %standard-phases
3679 (delete 'check)
3680 (add-after 'install 'check
3681 (lambda* (#:key outputs inputs #:allow-other-keys)
3682 ;; It's easier to run tests after install.
3683 ;; Make installed package available for running the tests
3684 (add-installed-pythonpath inputs outputs)
3685 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
482d9591
HG
3686 (propagated-inputs
3687 `(("python-six" ,python-six)))
c9b1b4f9 3688 (inputs
482d9591 3689 `(("readline" ,readline)
c9b1b4f9
RW
3690 ("icu4c" ,icu4c)
3691 ("pcre" ,pcre)
3692 ("r" ,r)))
3693 (native-inputs
f3b98f4f 3694 `(("zlib" ,zlib)))
c9b1b4f9
RW
3695 (home-page "http://rpy.sourceforge.net/")
3696 (synopsis "Python interface to the R language")
3697 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3698low-level interface to R from Python, a proposed high-level interface,
3699including wrappers to graphical libraries, as well as R-like structures and
3700functions.")
3f641af0 3701 (license license:gpl3+)))
c9b1b4f9
RW
3702
3703(define-public python2-rpy2
3704 (let ((rpy2 (package-with-python2 python-rpy2)))
3705 (package (inherit rpy2)
3706 (native-inputs
3707 `(("python2-singledispatch" ,python2-singledispatch)
3708 ,@(package-native-inputs rpy2))))))
3709
bb986599
FB
3710(define-public python-scipy
3711 (package
3712 (name "python-scipy")
ba8a0824 3713 (version "0.16.0")
bb986599
FB
3714 (source
3715 (origin
3716 (method url-fetch)
de67e922
LF
3717; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3718 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3719 "/scipy-" version ".tar.xz"))
bb986599
FB
3720 (sha256
3721 (base32
ba8a0824 3722 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3723 (build-system python-build-system)
dd86c0d1 3724 (propagated-inputs
bb986599
FB
3725 `(("python-numpy" ,python-numpy)
3726 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3727 ("python-pyparsing" ,python-pyparsing)))
3728 (inputs
3729 `(("lapack" ,lapack)
719b01c1 3730 ("openblas" ,openblas)))
bb986599 3731 (native-inputs
dd86c0d1
RW
3732 `(("python-nose" ,python-nose)
3733 ("python-sphinx" ,python-sphinx)
5248d49e 3734 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3735 ("gfortran" ,gfortran)
bb986599
FB
3736 ("texlive" ,texlive)
3737 ("perl" ,perl)))
3738 (outputs '("out" "doc"))
3739 (arguments
3740 `(#:phases
3741 (alist-cons-before
719b01c1 3742 'build 'configure-openblas
bb986599 3743 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3744 (call-with-output-file "site.cfg"
3745 (lambda (port)
3746 (format port
3747 "[blas]
3748libraries = openblas
3749library_dirs = ~a/lib
3750include_dirs = ~a/include
d548e6aa
HG
3751
3752# backslash-n to make emacs happy
3753\n[atlas]
719b01c1
RW
3754library_dirs = ~a/lib
3755atlas_libs = openblas
3756"
3757 (assoc-ref inputs "openblas")
3758 (assoc-ref inputs "openblas")
3759 (assoc-ref inputs "openblas"))))
3760 #t)
bb986599
FB
3761 (alist-cons-after
3762 'install 'install-doc
d548e6aa 3763 (lambda* (#:key inputs outputs #:allow-other-keys)
bb986599
FB
3764 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3765 (doc (string-append data "/doc/" ,name "-" ,version))
3766 (html (string-append doc "/html"))
3767 (pyver ,(string-append "PYVER=")))
d548e6aa
HG
3768 ;; Make installed package available for building the
3769 ;; documentation
3770 (add-installed-pythonpath inputs outputs)
bb986599 3771 (with-directory-excursion "doc"
bb986599
FB
3772 ;; Fix generation of images for mathematical expressions.
3773 (substitute* (find-files "source" "conf\\.py")
3774 (("pngmath_use_preview = True")
3775 "pngmath_use_preview = False"))
3776 (mkdir-p html)
3777 (system* "make" "html" pyver)
3778 (system* "make" "latex" "PAPER=a4" pyver)
3779 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3780 (copy-file "build/latex/scipy-ref.pdf"
3781 (string-append doc "/scipy-ref.pdf"))
3782 (with-directory-excursion "build/html"
3783 (for-each (lambda (file)
3784 (let* ((dir (dirname file))
3785 (tgt-dir (string-append html "/" dir)))
96c46210 3786 (install-file file html)))
bb986599
FB
3787 (find-files "." ".*"))))))
3788 ;; Tests can only be run after the library has been installed and not
3789 ;; within the source directory.
3790 (alist-cons-after
3791 'install 'check
89b5c60e 3792 (lambda _
bb986599
FB
3793 (with-directory-excursion "/tmp"
3794 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3795 (alist-delete
3796 'check
4f9ff21e
RW
3797 (alist-cons-after
3798 'unpack 'fix-tests
3799 (lambda _
3800 (substitute* "scipy/integrate/tests/test_quadpack.py"
3801 (("libm.so") "libm.so.6"))
3802 #t)
3803 %standard-phases)))))))
bb986599
FB
3804 (home-page "http://www.scipy.org/")
3805 (synopsis "The Scipy library provides efficient numerical routines")
3806 (description "The SciPy library is one of the core packages that make up
3807the SciPy stack. It provides many user-friendly and efficient numerical
3808routines such as routines for numerical integration and optimization.")
3f641af0 3809 (license license:bsd-3)))
bb986599 3810
764c077b 3811(define-public python2-scipy
57b7b8cd 3812 (package-with-python2 python-scipy))
bb986599 3813
73acc193 3814(define-public python-socksipy-branch
3815 (package
3816 (name "python-socksipy-branch")
3817 (version "1.01")
3818 (source
3819 (origin
3820 (method url-fetch)
3821 (uri (pypi-uri "SocksiPy-branch" version))
3822 (sha256
3823 (base32
3824 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3825 (build-system python-build-system)
3826 (arguments
3827 `(#:tests? #f)) ; There are no tests
3828 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3829 (synopsis "Python SOCKS module")
3830 (description
3831 "SocksiPy - A Python SOCKS client module. It provides a
3832socket-like interface that supports connections to any TCP
3833service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3834The original version was developed by Dan Haim, this is a
3835branch created by Mario Vilas to address some open issues,
3836as the original project seems to have been abandoned circa 2007.")
3837 (license license:bsd-3)))
3838
3839(define-public python2-socksipy-branch
3840 (package-with-python2 python-socksipy-branch))
3841
94914805
EB
3842(define-public python-sqlalchemy
3843 (package
3844 (name "python-sqlalchemy")
a4ba286b 3845 (version "1.0.12")
94914805
EB
3846 (source
3847 (origin
3848 (method url-fetch)
3849 (uri (string-append "https://pypi.python.org/packages/source/S/"
3850 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3851 (sha256
3852 (base32
a4ba286b 3853 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3854 (build-system python-build-system)
3855 (native-inputs
3856 `(("python-cython" ,python-cython) ;for c extensions
3857 ("python-pytest" ,python-pytest)
3858 ("python-mock" ,python-mock))) ;for tests
3859 (arguments
3860 `(#:phases (alist-replace
3861 'check
3862 (lambda _ (zero? (system* "py.test")))
3863 %standard-phases)))
3864 (home-page "http://www.sqlalchemy.org")
3865 (synopsis "Database abstraction library")
3866 (description
3867 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3868gives application developers the full power and flexibility of SQL. It
3869provides a full suite of well known enterprise-level persistence patterns,
3870designed for efficient and high-performing database access, adapted into a
3871simple and Pythonic domain language.")
3f641af0 3872 (license license:x11)))
94914805
EB
3873
3874(define-public python2-sqlalchemy
3875 (package-with-python2 python-sqlalchemy))
c937562e 3876
4a093330
DM
3877(define-public python-pycodestyle
3878 (package
3879 (name "python-pycodestyle")
3880 (version "2.0.0")
3881 (source
3882 (origin
3883 (method url-fetch)
3884 (uri (pypi-uri "pycodestyle" version))
3885 (sha256
3886 (base32
3887 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3888 (build-system python-build-system)
3889 (home-page "https://pycodestyle.readthedocs.io/")
3890 (synopsis "Python style guide checker")
3891 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3892Python code against some of the style conventions in
3893@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 3894 (license license:expat)))
4a093330
DM
3895
3896(define-public python2-pycodestyle
f210e944 3897 (package-with-python2 python-pycodestyle))
b91912c4
DM
3898
3899(define-public python-orderedmultidict
3900 (package
3901 (name "python-orderedmultidict")
3902 (version "0.7.10")
3903 (source
3904 (origin
3905 (method url-fetch)
3906 (uri (pypi-uri "orderedmultidict" version))
3907 (sha256
3908 (base32
3909 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3910 (build-system python-build-system)
3911 (arguments
3912 `(#:phases
3913 (modify-phases %standard-phases
3914 (add-after 'unpack 'fix-tests
3915 (lambda _
3916 ;; The package uses nosetest for running the tests.
3917 ;; Adding this initfile allows to run the test suite
3918 ;; without requiring nosetest.
3919 (zero? (system* "touch" "tests/__init__.py")))))))
3920 (propagated-inputs
3921 `(("python-six" ,python-six)))
3922 (native-inputs
3923 `(("python-pycodestyle" ,python-pycodestyle)))
3924 (home-page "https://github.com/gruns/orderedmultidict")
3925 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3926 (description "This package contains a library for ordered multivalue
3927dictionaries. A multivalue dictionary is a dictionary that can store
3928multiple values for the same key. An ordered multivalue dictionary is a
3929multivalue dictionary that retains the order of insertions and deletions.")
f210e944 3930 (license license:unlicense)))
b91912c4
DM
3931
3932(define-public python2-orderedmultidict
f210e944 3933 (package-with-python2 python-orderedmultidict))
9dede065
DM
3934
3935(define-public python-furl
3936 (package
3937 (name "python-furl")
3938 (version "0.5.6")
3939 (source
3940 (origin
3941 (method url-fetch)
3942 (uri (pypi-uri "furl" version))
3943 (sha256
3944 (base32
3945 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3946 (build-system python-build-system)
3947 (propagated-inputs
3948 `(("python-six" ,python-six)
3949 ("python-orderedmultidict" ,python-orderedmultidict)))
3950 (native-inputs
3951 `(("python-pycodestyle" ,python-pycodestyle)))
3952 (home-page "https://github.com/gruns/furl")
3953 (synopsis "URL manipulation in Python")
3954 (description "Furl provides an easy-to-use alternative to the
3955@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 3956 (license license:unlicense)))
9dede065
DM
3957
3958(define-public python2-furl
f210e944 3959 (package-with-python2 python-furl))
462bf271
DM
3960
3961(define-public python-flask-babel
3962 (package
3963 (name "python-flask-babel")
3964 (version "0.11.1")
3965 (source
3966 (origin
3967 (method url-fetch)
3968 (uri (pypi-uri "Flask-Babel" version))
3969 (sha256
3970 (base32
3971 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3972 (build-system python-build-system)
3973 (propagated-inputs
3974 `(("python-flask" ,python-flask)
3975 ("python-babel" ,python-babel)
3976 ("python-jinja2" ,python-jinja2)
3977 ("python-pytz" ,python-pytz)))
3978 (home-page "https://github.com/python-babel/flask-babel")
3979 (synopsis "Add i18n/l10n support to Flask applications")
3980 (description "This package implements internationalization and localization
3981support for Flask. This is based on the Python babel module as well as pytz -
3982both of which are installed automatically if you install this library.")
f210e944 3983 (license license:bsd-3)))
462bf271
DM
3984
3985(define-public python2-flask-babel
f210e944 3986 (package-with-python2 python-flask-babel))
4a093330 3987
de2966cf
EF
3988(define-public python-sqlalchemy-utils
3989 (package
3990 (name "python-sqlalchemy-utils")
bb4b1706 3991 (version "0.32.11")
de2966cf
EF
3992 (source
3993 (origin
3994 (method url-fetch)
3995 (uri (pypi-uri "SQLAlchemy-Utils" version))
3996 (sha256
3997 (base32
bb4b1706 3998 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
de2966cf 3999 (build-system python-build-system)
35d56b7b
MB
4000 (arguments
4001 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4002 ;; #:phases
4003 ;; (modify-phases %standard-phases
4004 ;; (replace 'check
4005 ;; (lambda _
4006 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
c22b4f87 4007 (propagated-inputs
de2966cf
EF
4008 `(("python-six" ,python-six)
4009 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb 4010 (native-inputs
22d7360b 4011 `(("python-dateutil" ,python-dateutil)
35d56b7b
MB
4012 ("python-flexmock" ,python-flexmock)
4013 ("python-psycopg2" ,python-psycopg2)
4014 ("python-pytest" ,python-pytest)
4015 ("python-pytz" ,python-pytz)))
de2966cf
EF
4016 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4017 (synopsis "Various utility functions for SQLAlchemy")
4018 (description
4019 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4020for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4021
4022You might also want to install the following optional dependencies:
4023@enumerate
4024@item @code{python-passlib}
4025@item @code{python-babel}
4026@item @code{python-cryptography}
4027@item @code{python-pytz}
4028@item @code{python-psycopg2}
4029@item @code{python-furl}
4030@item @code{python-flask-babel}
4031@end enumerate
4032")
de2966cf
EF
4033 (license license:bsd-3)))
4034
4035(define-public python2-sqlalchemy-utils
f210e944 4036 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4037
af5a4602
CAW
4038(define-public python-alembic
4039 (package
4040 (name "python-alembic")
bb484529 4041 (version "0.8.7")
af5a4602
CAW
4042 (source
4043 (origin
4044 (method url-fetch)
4045 (uri (pypi-uri "alembic" version))
4046 (sha256
4047 (base32
bb484529 4048 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
4049 (build-system python-build-system)
4050 (native-inputs
4051 `(("python-mock" ,python-mock)
4052 ("python-pytest-cov" ,python-pytest-cov)))
4053 (propagated-inputs
4054 `(("python-sqlalchemy" ,python-sqlalchemy)
4055 ("python-mako" ,python-mako)
4056 ("python-editor" ,python-editor)))
4057 (home-page "http://bitbucket.org/zzzeek/alembic")
4058 (synopsis
4059 "Database migration tool for SQLAlchemy")
4060 (description
4061 "Alembic is a lightweight database migration tool for usage with the
4062SQLAlchemy Database Toolkit for Python.")
f210e944 4063 (license license:expat)))
af5a4602
CAW
4064
4065(define-public python2-alembic
f210e944 4066 (package-with-python2 python-alembic))
af5a4602 4067
1671c07c
EB
4068(define-public python-distutils-extra
4069 (package
4070 (name "python-distutils-extra")
4071 (version "2.38")
4072 (source
4073 (origin
4074 (method url-fetch)
4075 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4076 version "/+download/python-distutils-extra-"
4077 version ".tar.gz"))
4078 (sha256
4079 (base32
4080 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4081 (build-system python-build-system)
1671c07c
EB
4082 (home-page "https://launchpad.net/python-distutils-extra/")
4083 (synopsis "Enhancements to Python's distutils")
4084 (description
4085 "The python-distutils-extra module enables you to easily integrate
4086gettext support, themed icons, and scrollkeeper-based documentation into
4087Python's distutils.")
3f641af0 4088 (license license:gpl2)))
1671c07c
EB
4089
4090(define-public python2-distutils-extra
4091 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4092
4093(define-public python2-elib.intl
4094 (package
4095 (name "python2-elib.intl")
4096 (version "0.0.3")
4097 (source
4098 (origin
4099 ;; This project doesn't tag releases or publish tarballs, so we take
4100 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4101 (method git-fetch)
4102 (uri (git-reference
4103 (url "https://github.com/dieterv/elib.intl.git")
4104 (commit "d09997cfef")))
4105 (sha256
4106 (base32
4107 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4108 (build-system python-build-system)
ea5456c8
EB
4109 (arguments
4110 ;; incompatible with Python 3 (exception syntax)
4111 `(#:python ,python-2
b41a05ce 4112 #:tests? #f))
ea5456c8
EB
4113 (home-page "https://github.com/dieterv/elib.intl")
4114 (synopsis "Enhanced internationalization for Python")
4115 (description
4116 "The elib.intl module provides enhanced internationalization (I18N)
4117services for your Python modules and applications.")
3f641af0 4118 (license license:lgpl3+)))
ea5456c8 4119
c937562e
EB
4120(define-public python-pillow
4121 (package
4122 (name "python-pillow")
aba5182c 4123 (version "3.3.3")
c937562e
EB
4124 (source
4125 (origin
4126 (method url-fetch)
f1d9231d 4127 (uri (pypi-uri "Pillow" version))
c937562e
EB
4128 (sha256
4129 (base32
aba5182c 4130 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4131 (build-system python-build-system)
4132 (native-inputs
f3b98f4f 4133 `(("python-nose" ,python-nose)))
c937562e 4134 (inputs
5ff408d9
SB
4135 `(("freetype" ,freetype)
4136 ("lcms" ,lcms)
c937562e
EB
4137 ("zlib" ,zlib)
4138 ("libjpeg" ,libjpeg)
4139 ("openjpeg" ,openjpeg)
5ff408d9
SB
4140 ("libtiff" ,libtiff)
4141 ("libwebp" ,libwebp)))
c937562e 4142 (arguments
e5358a6b 4143 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4144 (add-after
4145 'install 'check-installed
6151120a 4146 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4147 (begin
4148 (setenv "HOME" (getcwd))
6151120a
HG
4149 ;; Make installed package available for running the
4150 ;; tests
4151 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4152 (and (zero? (system* "python" "selftest.py"
4153 "--installed"))
4154 (zero? (system* "python" "test-installed.py"))))))
4155 (delete 'check))))
c937562e
EB
4156 (home-page "https://pypi.python.org/pypi/Pillow")
4157 (synopsis "Fork of the Python Imaging Library")
4158 (description
4159 "The Python Imaging Library adds image processing capabilities to your
4160Python interpreter. This library provides extensive file format support, an
4161efficient internal representation, and fairly powerful image processing
4162capabilities. The core image library is designed for fast access to data
4163stored in a few basic pixel formats. It should provide a solid foundation for
4164a general image processing tool.")
3f641af0 4165 (license (license:x11-style
c937562e
EB
4166 "http://www.pythonware.com/products/pil/license.htm"
4167 "The PIL Software License"))))
4168
4169(define-public python2-pillow
4170 (package-with-python2 python-pillow))
bb986599 4171
a415f036
FB
4172(define-public python-pycparser
4173 (package
4174 (name "python-pycparser")
38eb6919 4175 (version "2.14")
a415f036
FB
4176 (source
4177 (origin
4178 (method url-fetch)
38eb6919 4179 (uri (pypi-uri "pycparser" version))
a415f036
FB
4180 (sha256
4181 (base32
38eb6919 4182 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4183 (outputs '("out" "doc"))
4184 (build-system python-build-system)
4185 (native-inputs
f3b98f4f 4186 `(("pkg-config" ,pkg-config)))
a415f036 4187 (arguments
89b5c60e 4188 `(#:phases
a415f036
FB
4189 (alist-replace
4190 'check
4191 (lambda _
4192 (with-directory-excursion "tests"
4193 (zero? (system* "python" "all_tests.py"))))
4194 (alist-cons-after
4195 'install 'install-doc
4196 (lambda* (#:key outputs #:allow-other-keys)
4197 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4198 (doc (string-append data "/doc/" ,name "-" ,version))
4199 (examples (string-append doc "/examples")))
4200 (mkdir-p examples)
4201 (for-each (lambda (file)
4202 (copy-file (string-append "." file)
4203 (string-append doc file)))
4204 '("/README.rst" "/CHANGES" "/LICENSE"))
4205 (copy-recursively "examples" examples)))
4206 %standard-phases))))
4207 (home-page "https://github.com/eliben/pycparser")
4208 (synopsis "C parser in Python")
4209 (description
4210 "Pycparser is a complete parser of the C language, written in pure Python
4211using the PLY parsing library. It parses C code into an AST and can serve as
4212a front-end for C compilers or analysis tools.")
3f641af0 4213 (license license:bsd-3)))
a415f036
FB
4214
4215(define-public python2-pycparser
4216 (package-with-python2 python-pycparser))
57c3f716
FB
4217
4218(define-public python-cffi
4219 (package
4220 (name "python-cffi")
2d3a437c 4221 (version "1.4.2")
57c3f716
FB
4222 (source
4223 (origin
4224 (method url-fetch)
2d3a437c 4225 (uri (pypi-uri "cffi" version))
89b5c60e 4226 (sha256
2d3a437c 4227 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4228 (build-system python-build-system)
4229 (outputs '("out" "doc"))
4230 (inputs
4231 `(("libffi" ,libffi)))
4232 (propagated-inputs ; required at run-time
4233 `(("python-pycparser" ,python-pycparser)))
4234 (native-inputs
4235 `(("pkg-config" ,pkg-config)
4236 ("python-sphinx" ,python-sphinx)
f3b98f4f 4237 ("python-pytest" ,python-pytest)))
57c3f716 4238 (arguments
4179f952 4239 `(#:phases
57c3f716
FB
4240 (alist-cons-after
4241 'install 'install-doc
4242 (lambda* (#:key outputs #:allow-other-keys)
4243 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4244 (doc (string-append data "/doc/" ,name "-" ,version))
4245 (html (string-append doc "/html")))
4246 (with-directory-excursion "doc"
4247 (system* "make" "html")
4248 (mkdir-p html)
4249 (copy-recursively "build/html" html))
4250 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4251 %standard-phases)))
4252 (home-page "http://cffi.readthedocs.org")
4253 (synopsis "Foreign function interface for Python")
4254 (description
4255 "Foreign Function Interface for Python calling C code.")
bd3fa666 4256 (license license:expat)))
57c3f716
FB
4257
4258(define-public python2-cffi
4259 (package-with-python2 python-cffi))
6fa14469
FB
4260
4261(define-public python-xcffib
4262 (package
4263 (name "python-xcffib")
4264 (version "0.1.9")
4265 (source
4266 (origin
4267 (method url-fetch)
4268 (uri (string-append "https://pypi.python.org/packages/source/x/"
4269 "xcffib/xcffib-" version ".tar.gz"))
4270 (sha256
4271 (base32
4272 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4273 (build-system python-build-system)
4274 (inputs
482d9591 4275 `(("libxcb" ,libxcb)))
6fa14469 4276 (propagated-inputs
482d9591
HG
4277 `(("python-cffi" ,python-cffi) ; used at run time
4278 ("python-six" ,python-six)))
6fa14469 4279 (arguments
e2816ac7
MB
4280 `(;; FIXME: Tests cannot load libxcb.so.1
4281 #:tests? #f
4282 #:phases
c8cd850c
MB
4283 (modify-phases %standard-phases
4284 (add-after 'install 'install-doc
4285 (lambda* (#:key outputs #:allow-other-keys)
4286 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4287 "/doc/" ,name "-" ,version)))
4288 (mkdir-p doc)
4289 (copy-file "README.md"
4290 (string-append doc "/README.md"))
4291 #t))))))
6fa14469
FB
4292 (home-page "https://github.com/tych0/xcffib")
4293 (synopsis "XCB Python bindings")
4294 (description
4295 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4296support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4297 (license license:expat)))
6fa14469
FB
4298
4299(define-public python2-xcffib
4300 (package-with-python2 python-xcffib))
4301
9e099723
FB
4302(define-public python-cairocffi
4303 (package
4304 (name "python-cairocffi")
4305 (version "0.6")
4306 (source
4307 (origin
4308 (method url-fetch)
4309 ;; The archive on pypi is missing the 'utils' directory!
4310 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4311 version ".tar.gz"))
f586c877 4312 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4313 (sha256
4314 (base32
4315 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4316 (build-system python-build-system)
4317 (outputs '("out" "doc"))
4318 (inputs
4319 `(("gdk-pixbuf" ,gdk-pixbuf)
4320 ("cairo" ,cairo)))
4321 (native-inputs
4322 `(("pkg-config" ,pkg-config)
4323 ("python-sphinx" ,python-sphinx)
f3b98f4f 4324 ("python-docutils" ,python-docutils)))
9e099723
FB
4325 (propagated-inputs
4326 `(("python-xcffib" ,python-xcffib))) ; used at run time
4327 (arguments
a792e1aa
MB
4328 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4329 #:tests? #f
4330 #:phases
6734c7ba
MB
4331 (modify-phases %standard-phases
4332 (add-after 'install 'install-doc
4333 (lambda* (#:key inputs outputs #:allow-other-keys)
4334 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4335 (doc (string-append data "/doc/" ,name "-" ,version))
4336 (html (string-append doc "/html")))
4337 (setenv "LD_LIBRARY_PATH"
4338 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4339 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4340 (setenv "LANG" "en_US.UTF-8")
4341 (mkdir-p html)
4342 (for-each (lambda (file)
4343 (copy-file (string-append "." file)
4344 (string-append doc file)))
4345 '("/README.rst" "/CHANGES" "/LICENSE"))
4346 (system* "python" "setup.py" "build_sphinx")
4347 (copy-recursively "docs/_build/html" html)
4348 #t))))))
9e099723
FB
4349 (home-page "https://github.com/SimonSapin/cairocffi")
4350 (synopsis "Python bindings and object-oriented API for Cairo")
4351 (description
4352 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4353Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4354graphics library with support for multiple backends including image buffers,
4355PNG, PostScript, PDF, and SVG file output.")
3f641af0 4356 (license license:bsd-3)))
9e099723
FB
4357
4358(define-public python2-cairocffi
4359 (package-with-python2 python-cairocffi))
4360
3cff95cb
RW
4361(define-public python-decorator
4362 (package
4363 (name "python-decorator")
eb6e2e81 4364 (version "4.0.9")
3cff95cb
RW
4365 (source
4366 (origin
4367 (method url-fetch)
e21338be 4368 (uri (pypi-uri "decorator" version))
3cff95cb 4369 (sha256
eb6e2e81 4370 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4371 (build-system python-build-system)
4372 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4373 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4374 (synopsis "Python module to simplify usage of decorators")
4375 (description
4376 "The aim of the decorator module is to simplify the usage of decorators
4377for the average programmer, and to popularize decorators usage giving examples
4378of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4379etc. The core of this module is a decorator factory.")
4380 (license license:expat)))
4381
4382(define-public python2-decorator
4383 (package-with-python2 python-decorator))
4384
2c0499ad
RW
4385(define-public python-drmaa
4386 (package
4387 (name "python-drmaa")
4388 (version "0.7.6")
4389 (source
4390 (origin
4391 (method url-fetch)
4392 (uri (string-append
4393 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4394 version ".tar.gz"))
4395 (sha256
4396 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4397 (build-system python-build-system)
4398 ;; The test suite requires libdrmaa which is provided by the cluster
4399 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4400 ;; should be set to the path of the libdrmaa library.
4401 (arguments '(#:tests? #f))
4402 (native-inputs
f3b98f4f 4403 `(("python-nose" ,python-nose)))
2c0499ad
RW
4404 (home-page "https://pypi.python.org/pypi/drmaa")
4405 (synopsis "Python bindings for the DRMAA library")
4406 (description
4407 "A Python package for Distributed Resource Management (DRM) job
4408submission and control. This package is an implementation of the DRMAA 1.0
4409Python language binding specification.")
3f641af0 4410 (license license:bsd-3)))
2c0499ad
RW
4411
4412(define-public python2-drmaa
4413 (package-with-python2 python-drmaa))
4414
d05c6da0
RW
4415(define-public python-gridmap
4416 (package
4417 (name "python-gridmap")
4418 (version "0.13.0")
4419 (source
4420 (origin
4421 (method url-fetch)
4422 (uri (string-append
4423 "https://github.com/pygridtools/gridmap/archive/v"
4424 version ".tar.gz"))
4425 (file-name (string-append name "-" version ".tar.gz"))
4426 (sha256
4427 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4428 (build-system python-build-system)
ad348f9f
MB
4429 (arguments
4430 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
f22efa01 4431 (propagated-inputs
d05c6da0
RW
4432 `(("python-psutil" ,python-psutil)
4433 ("python-drmaa" ,python-drmaa)
4434 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4435 (home-page "https://github.com/pygridtools/gridmap")
4436 (synopsis "Create jobs on a cluster directly from Python")
4437 (description
4438 "Gridmap is a Python package to allow you to easily create jobs on the
4439cluster directly from Python. You can directly map Python functions onto the
4440cluster without needing to write any wrapper code yourself.")
3f641af0 4441 (license license:gpl3+)))
d05c6da0
RW
4442
4443(define-public python2-gridmap
4444 (package-with-python2 python-gridmap))
4445
cb6d5c54
RW
4446(define-public python-pexpect
4447 (package
4448 (name "python-pexpect")
ed118043 4449 (version "4.2.1")
cb6d5c54
RW
4450 (source
4451 (origin
4452 (method url-fetch)
ed118043 4453 (uri (pypi-uri "pexpect" version))
cb6d5c54 4454 (sha256
ed118043 4455 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
cb6d5c54
RW
4456 (build-system python-build-system)
4457 (arguments
4458 `(#:phases
4459 (modify-phases %standard-phases
ed118043
MB
4460 (add-before 'check 'prepare-tests
4461 (lambda _
4462 (substitute* (find-files "tests")
4463 (("/bin/ls") (which "ls"))
4464 (("/bin/echo") (which "echo"))
4465 (("/bin/which") (which "which"))
4466 ;; Many tests try to use the /bin directory which
4467 ;; is not present in the build environment.
4468 ;; Use one that's non-empty and unlikely to change.
4469 (("/bin'") "/dev'"))
4470 ;; XXX: Socket connection test gets "Connection reset by peer".
4471 ;; Why does it not work? Delete for now.
4472 (delete-file "tests/test_socket.py")
4473 #t))
cb6d5c54
RW
4474 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4475 (native-inputs
ed118043
MB
4476 `(("python-nose" ,python-nose)
4477 ("python-pytest" ,python-pytest)
4478 ("man-db" ,man-db)
4479 ("which" ,which)))
4480 (propagated-inputs
4481 `(("python-ptyprocess" ,python-ptyprocess)))
cb6d5c54
RW
4482 (home-page "http://pexpect.readthedocs.org/")
4483 (synopsis "Controlling interactive console applications")
4484 (description
4485 "Pexpect is a pure Python module for spawning child applications;
4486controlling them; and responding to expected patterns in their output.
4487Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4488child application and control it as if a human were typing commands.")
3f641af0 4489 (license license:isc)))
cb6d5c54
RW
4490
4491(define-public python2-pexpect
4492 (package-with-python2 python-pexpect))
4493
229ad120
RW
4494(define-public python-setuptools-scm
4495 (package
4496 (name "python-setuptools-scm")
42d6d0d0 4497 (version "1.11.1")
229ad120
RW
4498 (source (origin
4499 (method url-fetch)
383af6b0 4500 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4501 (sha256
4502 (base32
42d6d0d0 4503 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120
RW
4504 (build-system python-build-system)
4505 (home-page "https://github.com/pypa/setuptools_scm/")
4506 (synopsis "Manage Python package versions in SCM metadata")
4507 (description
383af6b0 4508 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4509@dfn{software configuration management} (SCM) metadata instead of declaring
4510them as the version argument or in a SCM managed file.")
4511 (license license:expat)))
4512
4513(define-public python2-setuptools-scm
4514 (package-with-python2 python-setuptools-scm))
4515
b74270ee
RW
4516(define-public python-pathpy
4517 (package
4518 (name "python-pathpy")
4519 (version "8.1.1")
4520 (source
4521 (origin
4522 (method url-fetch)
4523 (uri (string-append "https://pypi.python.org/packages/source/p/"
4524 "path.py/path.py-" version ".tar.gz"))
4525 (sha256
4526 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4527 (outputs '("out" "doc"))
b74270ee
RW
4528 (build-system python-build-system)
4529 (propagated-inputs
4530 `(("python-appdirs" ,python-appdirs)))
4531 (native-inputs
f3b98f4f 4532 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4533 ("python-sphinx" ,python-sphinx)
4534 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4535 ("python-pytest" ,python-pytest)
4536 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4537 (arguments
4538 `(#:phases
4539 (modify-phases %standard-phases
4540 (add-after 'build 'build-doc
4541 (lambda _
4542 (setenv "LANG" "en_US.UTF-8")
4543 (zero? (system* "python" "setup.py" "build_sphinx"))))
4544 (add-after 'install 'install-doc
4545 (lambda* (#:key outputs #:allow-other-keys)
4546 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4547 (doc (string-append data "/doc/" ,name "-" ,version))
4548 (html (string-append doc "/html")))
4549 (mkdir-p html)
4550 (for-each (lambda (file)
4551 (copy-file file (string-append doc "/" file)))
4552 '("README.rst" "CHANGES.rst"))
4553 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4554 (home-page "http://github.com/jaraco/path.py")
4555 (synopsis "Python module wrapper for built-in os.path")
4556 (description
4557 "@code{path.py} implements path objects as first-class entities, allowing
4558common operations on files to be invoked on those path objects directly.")
4559 (license license:expat)))
4560
4561(define-public python2-pathpy
4562 (package-with-python2 python-pathpy))
4563
0d34e01b
RW
4564(define-public python-pickleshare
4565 (package
4566 (name "python-pickleshare")
4567 (version "0.5")
4568 (source
4569 (origin
4570 (method url-fetch)
4571 (uri (string-append "https://pypi.python.org/packages/source/p/"
4572 "pickleshare/pickleshare-" version ".tar.gz"))
4573 (sha256
4574 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4575 (build-system python-build-system)
4576 (propagated-inputs
4577 `(("python-pathpy" ,python-pathpy)))
4578 (home-page "https://github.com/vivainio/pickleshare")
4579 (synopsis "Tiny key value database with concurrency support")
4580 (description
4581 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4582Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4583shelve, many processes can access the database simultaneously. Changing a
4584value in database is immediately visible to other processes accessing the same
4585database. Concurrency is possible because the values are stored in separate
4586files. Hence the “database” is a directory where all files are governed by
4587PickleShare.")
4588 (license license:expat)))
4589
4590(define-public python2-pickleshare
4591 (package-with-python2 python-pickleshare))
4592
cd6e5189
RW
4593(define-public python-simplegeneric
4594 (package
4595 (name "python-simplegeneric")
4596 (version "0.8.1")
4597 (source
4598 (origin
4599 (method url-fetch)
4600 (uri (string-append "https://pypi.python.org/packages/source/s/"
4601 "simplegeneric/simplegeneric-" version ".zip"))
4602 (sha256
4603 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4604 (build-system python-build-system)
4605 (native-inputs
f3b98f4f 4606 `(("unzip" ,unzip)))
cd6e5189
RW
4607 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4608 (synopsis "Python module for simple generic functions")
4609 (description
4610 "The simplegeneric module lets you define simple single-dispatch generic
4611functions, akin to Python’s built-in generic functions like @code{len()},
4612@code{iter()} and so on. However, instead of using specially-named methods,
4613these generic functions use simple lookup tables, akin to those used by
4614e.g. @code{pickle.dump()} and other generic functions found in the Python
4615standard library.")
3f641af0 4616 (license license:zpl2.1)))
cd6e5189
RW
4617
4618(define-public python2-simplegeneric
4619 (package-with-python2 python-simplegeneric))
4620
ddc7d8ed 4621(define-public python-ipython-genutils
c4abbac3 4622 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
4623 (package
4624 (name "python-ipython-genutils")
4625 (version "0.1.0")
4626 (source
4627 (origin
4628 (method url-fetch)
4629 (uri (string-append "https://pypi.python.org/packages/source/i/"
4630 "ipython_genutils/ipython_genutils-"
4631 version ".tar.gz"))
4632 (sha256
4633 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4634 (build-system python-build-system)
4635 (arguments `(#:tests? #f)) ; no tests
4636 (home-page "http://ipython.org")
4637 (synopsis "Vestigial utilities from IPython")
4638 (description
c4abbac3
HG
4639 "This package provides retired utilities from IPython. No packages
4640outside IPython/Jupyter should depend on it.
4641
4642This package shouldn't exist. It contains some common utilities shared by
4643Jupyter and IPython projects during The Big Split. As soon as possible, those
4644packages will remove their dependency on this, and this package will go
4645away.")
3f641af0 4646 (license license:bsd-3)))
ddc7d8ed
RW
4647
4648(define-public python2-ipython-genutils
4649 (package-with-python2 python-ipython-genutils))
4650
2b10eb48
RW
4651(define-public python-traitlets
4652 (package
4653 (name "python-traitlets")
a5ba1481 4654 (version "4.2.0")
2b10eb48
RW
4655 (source
4656 (origin
4657 (method url-fetch)
cc0c4fde 4658 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4659 (sha256
4660 (base32
a5ba1481 4661 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4662 (build-system python-build-system)
4663 (arguments
4664 `(#:phases
4665 (modify-phases %standard-phases
4666 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4667 (propagated-inputs
4668 `(("python-ipython-genutils" ,python-ipython-genutils)
4669 ("python-decorator" ,python-decorator)))
4670 (native-inputs
cc0c4fde
EF
4671 `(("python-mock" ,python-mock)
4672 ("python-nose" ,python-nose)))
2b10eb48
RW
4673 (home-page "http://ipython.org")
4674 (synopsis "Configuration system for Python applications")
4675 (description
4676 "Traitlets is a framework that lets Python classes have attributes with
4677type checking, dynamically calculated default values, and ‘on change’
4678callbacks. The package also includes a mechanism to use traitlets for
4679configuration, loading values from files or from command line arguments. This
4680is a distinct layer on top of traitlets, so you can use traitlets in your code
4681without using the configuration machinery.")
3f641af0 4682 (license license:bsd-3)))
2b10eb48
RW
4683
4684(define-public python2-traitlets
4685 (package-with-python2 python-traitlets))
4686
4263b06f
RW
4687(define-public python-jupyter-core
4688 (package
4689 (name "python-jupyter-core")
4690 (version "4.2.0")
4691 (source
4692 (origin
4693 (method url-fetch)
4694 (uri (string-append (pypi-uri "jupyter_core" version)))
4695 (sha256
4696 (base32
4697 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4698 (build-system python-build-system)
4699 ;; FIXME: not sure how to run the tests
4700 (arguments `(#:tests? #f))
4701 (propagated-inputs
4702 `(("python-traitlets" ,python-traitlets)))
4703 (home-page "http://jupyter.org/")
4704 (synopsis "Jupyter base package")
4705 (description
4706 "Jupyter core is the base package on which Jupyter projects rely.")
4707 (license license:bsd-3)))
4708
4709(define-public python2-jupyter-core
4710 (package-with-python2 python-jupyter-core))
4711
9ff01f2d
RW
4712(define-public python-jupyter-client
4713 (package
4714 (name "python-jupyter-client")
4715 (version "4.4.0")
4716 (source
4717 (origin
4718 (method url-fetch)
4719 (uri (pypi-uri "jupyter_client" version))
4720 (sha256
4721 (base32
4722 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4723 (build-system python-build-system)
4724 ;; Tests fail because of missing native python kernel which I assume is
4725 ;; provided by the ipython package, which we cannot use because it would
4726 ;; cause a dependency cycle.
4727 (arguments `(#:tests? #f))
4728 (propagated-inputs
4729 `(("python-pyzmq" ,python-pyzmq)
4730 ("python-traitlets" ,python-traitlets)
4731 ("python-jupyter-core" ,python-jupyter-core)))
4732 (home-page "http://jupyter.org/")
4733 (synopsis "Jupyter protocol implementation and client libraries")
4734 (description
4735 "The @code{jupyter_client} package contains the reference implementation
4736of the Jupyter protocol. It also provides client and kernel management APIs
4737for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4738installing @code{kernelspec}s for use with Jupyter frontends.")
4739 (license license:bsd-3)))
4740
4741(define-public python2-jupyter-client
4742 (package-with-python2 python-jupyter-client))
4743
ab526102
RW
4744(define-public python-ipykernel
4745 (package
4746 (name "python-ipykernel")
4747 (version "4.5.0")
4748 (source
4749 (origin
4750 (method url-fetch)
4751 (uri (pypi-uri "ipykernel" version))
4752 (sha256
4753 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4754 (build-system python-build-system)
4755 ;; The tests load a submodule of IPython. However, IPython itself depends
4756 ;; on ipykernel.
4757 (arguments `(#:tests? #f))
4758 (propagated-inputs
4759 ;; imported at runtime during connect
4760 `(("python-jupyter-client" ,python-jupyter-client)))
4761 (home-page "http://ipython.org")
4762 (synopsis "IPython Kernel for Jupyter")
4763 (description
4764 "This package provides the IPython kernel for Jupyter.")
4765 (license license:bsd-3)))
4766
4767(define-public python2-ipykernel
4768 (package-with-python2 python-ipykernel))
4769
5ff6effc
RW
4770(define-public python-testpath
4771 (package
4772 (name "python-testpath")
4773 (version "0.2")
4774 (source
4775 (origin
4776 (method url-fetch)
4777 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4778 version ".tar.gz"))
4779 (file-name (string-append name "-" version ".tar.gz"))
4780 (sha256
4781 (base32
4782 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4783 (build-system python-build-system)
4784 (arguments
4785 `(#:tests? #f ; this package does not even have a setup.py
4786 #:phases
4787 (modify-phases %standard-phases
4788 (delete 'install)
4789 (replace 'build
4790 (lambda* (#:key inputs outputs #:allow-other-keys)
4791 (let ((dir (string-append
4792 (assoc-ref outputs "out")
4793 "/lib/python"
4794 (string-take (string-take-right
4795 (assoc-ref inputs "python") 5) 3)
4796 "/site-packages/testpath")))
4797 (mkdir-p dir)
4798 (copy-recursively "testpath" dir))
4799 #t)))))
4800 (home-page "https://github.com/takluyver/testpath")
4801 (synopsis "Test utilities for code working with files and commands")
4802 (description
4803 "Testpath is a collection of utilities for Python code working with files
4804and commands. It contains functions to check things on the filesystem, and
4805tools for mocking system commands and recording calls to those.")
4806 (license license:expat)))
4807
4808(define-public python2-testpath
4809 (package-with-python2 python-testpath))
4810
ae1ab9fe
FB
4811(define-public python-ipython
4812 (package
4813 (name "python-ipython")
4dbc8ec4 4814 (version "4.0.3")
ae1ab9fe
FB
4815 (source
4816 (origin
fceac880 4817 (method url-fetch)
accd5f99 4818 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 4819 (sha256
4dbc8ec4 4820 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
ae1ab9fe
FB
4821 (build-system python-build-system)
4822 (outputs '("out" "doc"))
3a0b1b9a
FB
4823 (propagated-inputs
4824 `(("python-pyzmq" ,python-pyzmq)
accd5f99 4825 ("python-terminado" ,python-terminado)
ae1ab9fe 4826 ("python-matplotlib" ,python-matplotlib)
5d26e542 4827 ("python-numpy" ,python-numpy)
ae1ab9fe 4828 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4829 ("python-jinja2" ,python-jinja2)
4830 ("python-mistune" ,python-mistune)
accd5f99
RW
4831 ("python-pexpect" ,python-pexpect)
4832 ("python-pickleshare" ,python-pickleshare)
4833 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 4834 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
4835 ("python-traitlets" ,python-traitlets)
4836 ("python-ipykernel" ,python-ipykernel)
4837 ("python-pygments" ,python-pygments)))
4838 (inputs
4839 `(("readline" ,readline)
4840 ("which" ,which)))
ae1ab9fe
FB
4841 (native-inputs
4842 `(("pkg-config" ,pkg-config)
accd5f99
RW
4843 ("python-requests" ,python-requests) ;; for tests
4844 ("python-testpath" ,python-testpath)
4845 ("python-nose" ,python-nose)
ae1ab9fe
FB
4846 ("python-sphinx" ,python-sphinx)
4847 ("texlive" ,texlive)
f3b98f4f 4848 ("texinfo" ,texinfo)))
ae1ab9fe 4849 (arguments
89b5c60e 4850 `(#:phases
3a0b1b9a
FB
4851 (modify-phases %standard-phases
4852 (add-after
4853 'install 'install-doc
4854 (lambda* (#:key inputs outputs #:allow-other-keys)
4855 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4856 (doc (string-append data "/doc/" ,name "-" ,version))
4857 (html (string-append doc "/html"))
4858 (man1 (string-append data "/man/man1"))
4859 (info (string-append data "/info"))
4860 (examples (string-append doc "/examples")))
afd3d931 4861 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
4862 ;; Make installed package available for running the tests
4863 (add-installed-pythonpath inputs outputs)
3a0b1b9a 4864 (with-directory-excursion "docs"
accd5f99
RW
4865 ;; FIXME: pdf fails to build
4866 ;;(system* "make" "pdf" "PAPER=a4")
4867 (system* "make" "html")
3a0b1b9a
FB
4868 (system* "make" "info"))
4869 (copy-recursively "docs/man" man1)
4870 (copy-recursively "examples" examples)
accd5f99 4871 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
4872 ;; (copy-file "docs/build/latex/ipython.pdf"
4873 ;; (string-append doc "/ipython.pdf"))
4874 (mkdir-p info)
4875 (copy-file "docs/build/texinfo/ipython.info"
4876 (string-append info "/ipython.info"))
4877 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4878 ;; Tests can only be run after the library has been installed and not
4879 ;; within the source directory.
4880 (delete 'check)
4881 (add-after
4882 'install 'check
eee5cd04 4883 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
4884 (if tests?
4885 (with-directory-excursion "/tmp"
eee5cd04
HG
4886 ;; Make installed package available for running the tests
4887 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
4888 (setenv "HOME" "/tmp/") ;; required by a test
4889 (zero? (system* (string-append (assoc-ref outputs "out")
4890 "/bin/iptest"))))
4891 #t)))
4892 (add-before
4893 'install 'fix-tests
4894 (lambda* (#:key inputs #:allow-other-keys)
4895 (substitute* "./IPython/utils/_process_posix.py"
4896 (("/usr/bin/env', 'which") (which "which")))
4897 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4898 (("#!/usr/bin/env python")
4899 (string-append "#!" (which "python"))))
4900 ;; Disable 1 failing test
4901 (substitute* "./IPython/core/tests/test_magic.py"
4902 (("def test_dirops\\(\\):" all)
4903 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4904 (home-page "http://ipython.org")
4905 (synopsis "IPython is a tool for interactive computing in Python")
4906 (description
4907 "IPython provides a rich architecture for interactive computing with:
4908Powerful interactive shells, a browser-based notebook, support for interactive
4909data visualization, embeddable interpreters and tools for parallel
4910computing.")
135ba811
EF
4911 (license license:bsd-3)
4912 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4913
4914(define-public python2-ipython
135ba811 4915 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4916 (package
4917 (inherit ipython)
4918 ;; FIXME: some tests are failing
4919 (arguments
4920 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4921 ;; FIXME: add pyreadline once available.
e62600fe 4922 (native-inputs
135ba811 4923 `(("python2-mock" ,python2-mock)
77a6932a 4924 ,@(package-native-inputs ipython))))))
03411993
AE
4925
4926(define-public python-isodate
4927 (package
4928 (name "python-isodate")
b6785c2e 4929 (version "0.5.4")
03411993
AE
4930 (source
4931 (origin
4932 (method url-fetch)
b6785c2e 4933 (uri (pypi-uri "isodate" version))
03411993
AE
4934 (sha256
4935 (base32
b6785c2e 4936 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 4937 (build-system python-build-system)
03411993
AE
4938 (home-page
4939 "http://cheeseshop.python.org/pypi/isodate")
4940 (synopsis
4941 "Python date parser and formatter")
4942 (description
4943 "Python-isodate is a python module for parsing and formatting
4944ISO 8601 dates, time and duration.")
3f641af0 4945 (license license:bsd-3)))
03411993
AE
4946
4947(define-public python2-isodate
4948 (package-with-python2 python-isodate))
673ab897
AE
4949
4950(define-public python-html5lib
4951 (package
4952 (name "python-html5lib")
a14061aa 4953 (version "1.0b10")
673ab897
AE
4954 (source
4955 (origin
4956 (method url-fetch)
fee04c19 4957 (uri (pypi-uri "html5lib" version))
673ab897
AE
4958 (sha256
4959 (base32
a14061aa 4960 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 4961 (build-system python-build-system)
3dd75476 4962 (propagated-inputs
4eb6ed28
MB
4963 `(("python-six" ,python-six)
4964 ("python-webencodings" ,python-webencodings)))
673ab897
AE
4965 (arguments
4966 `(#:test-target "check"))
4967 (home-page
4968 "https://github.com/html5lib/html5lib-python")
4969 (synopsis
4970 "Python HTML parser based on the WHATWG HTML specifcation")
4971 (description
4972 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4973and written in Python.")
bd3fa666 4974 (license license:expat)))
673ab897
AE
4975
4976(define-public python2-html5lib
4977 (package-with-python2 python-html5lib))
e99f4211 4978
8ee62c97
RW
4979;; Needed for python-bleach, a dependency of python-notebook
4980(define-public python-html5lib-0.9
4981 (package
4982 (inherit python-html5lib)
4983 (version "0.999")
4984 (source
4985 (origin
4986 (method url-fetch)
4987 (uri (pypi-uri "html5lib" version))
4988 (sha256
4989 (base32
4990 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4991
4992(define-public python2-html5lib-0.9
4993 (package-with-python2 python-html5lib-0.9))
4994
adbca19e
MB
4995(define-public python-webencodings
4996 (package
4997 (name "python-webencodings")
4998 (version "0.5")
4999 (source (origin
5000 (method url-fetch)
5001 (uri (pypi-uri "webencodings" version))
5002 (sha256
5003 (base32
5004 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5005 (build-system python-build-system)
5006 (arguments
5007 '(#:phases
5008 (modify-phases %standard-phases
5009 (replace 'check
5010 (lambda _
5011 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5012 (native-inputs
5013 `(("python-pytest" ,python-pytest)))
5014 (home-page "https://github.com/SimonSapin/python-webencodings")
5015 (synopsis "Character encoding aliases for legacy web content")
5016 (description
5017 "In order to be compatible with legacy web content when interpreting
5018something like @code{Content-Type: text/html; charset=latin1}, tools need
5019to use a particular set of aliases for encoding labels as well as some
5020overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5021the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5022or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5023The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5024defines all such details so that implementations do not have to
5025reverse-engineer each other.
5026
5027This module implements the Encoding standard and has encoding labels and
5028BOM detection, but the actual implementation for encoders and decoders
5029is Python’s.")
5030 (license license:bsd-3)))
5031
5032(define-public python2-webencodings
5033 (package-with-python2 python-webencodings))
5034
e99f4211
MW
5035(define-public python-urwid
5036 (package
5037 (name "python-urwid")
51ff41f6 5038 (version "1.3.1")
e99f4211
MW
5039 (source
5040 (origin
5041 (method url-fetch)
b97c1bfd 5042 (uri (pypi-uri "urwid" version))
e99f4211
MW
5043 (sha256
5044 (base32
51ff41f6 5045 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5046 (build-system python-build-system)
b97c1bfd
LF
5047 (arguments
5048 `(#:phases
5049 (modify-phases %standard-phases
5050 ;; Disable failing test. Bug filed upstream:
5051 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5052 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5053 (add-after 'unpack 'disable-failing-test
5054 (lambda _
5055 (substitute* "urwid/tests/test_event_loops.py"
5056 (("test_remove_watch_file")
5057 "disable_remove_watch_file")))))))
e99f4211
MW
5058 (home-page "http://urwid.org")
5059 (synopsis "Console user interface library for Python")
5060 (description
5061 "Urwid is a curses-based UI/widget library for Python. It includes many
5062features useful for text console applications.")
3f641af0 5063 (license license:lgpl2.1+)))
e99f4211
MW
5064
5065(define-public python2-urwid
5066 (package-with-python2 python-urwid))
d95a56c6 5067
47d0b292
TS
5068(define-public python-urwidtrees
5069 (package
5070 (name "python-urwidtrees")
37ec4623 5071 (version "1.0.2")
47d0b292
TS
5072 (source
5073 (origin
5074 (method url-fetch)
37ec4623
TS
5075 ;; package author intends on distributing via github rather than pypi:
5076 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5077 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5078 version ".tar.gz"))
5079 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5080 (sha256
5081 (base32
37ec4623 5082 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5083 (build-system python-build-system)
5084 (arguments
5085 '(#:tests? #f)) ; no tests
f22efa01 5086 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5087 (home-page "https://github.com/pazz/urwidtrees")
5088 (synopsis "Tree widgets for urwid")
5089 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5090toolkit. Use it to build trees of widgets.")
3f641af0 5091 (license license:gpl3+)))
47d0b292
TS
5092
5093(define-public python2-urwidtrees
5094 (package-with-python2 python-urwidtrees))
5095
d95a56c6
PAR
5096(define-public python-dbus
5097 (package
5098 (name "python-dbus")
5099 (version "1.2.0")
5100 (source
5101 (origin
5102 (method url-fetch)
5103 (uri (string-append
5cc3096c 5104 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5105 version ".tar.gz"))
5106 (sha256
5107 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5108 (build-system gnu-build-system)
6717c879
SB
5109 (arguments
5110 '(#:phases
5111 (modify-phases %standard-phases
5112 (add-before
5113 'check 'pre-check
5114 (lambda _
5115 ;; XXX: For the missing '/etc/machine-id'.
5116 (substitute* "test/run-test.sh"
5117 (("DBUS_FATAL_WARNINGS=1")
5118 "DBUS_FATAL_WARNINGS=0"))
5119 #t)))))
d95a56c6
PAR
5120 (native-inputs
5121 `(("pkg-config" ,pkg-config)))
5122 (inputs
5123 `(("python" ,python)
2e88d113 5124 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5125 (synopsis "Python bindings for D-bus")
5126 (description "python-dbus provides bindings for libdbus, the reference
5127implementation of D-Bus.")
5128 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5129 (license license:expat)))
b52af02b
MW
5130
5131(define-public python2-dbus
5132 (package (inherit python-dbus)
5133 (name "python2-dbus")
5134 (inputs `(("python" ,python-2)
5135 ,@(alist-delete "python"
5136 (package-inputs python-dbus)
5137 equal?)))
5138 ;; FIXME: on Python 2, the test_utf8 fails with:
5139 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5140 (arguments `(#:tests? #f))))
a6ac8332
AE
5141
5142(define-public python-apsw
5143 (package
5144 (name "python-apsw")
917708c2 5145 (version "3.9.2-r1")
a6ac8332
AE
5146 (source
5147 (origin
5148 (method url-fetch)
917708c2 5149 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5150 (sha256
5151 (base32
917708c2 5152 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5153 (build-system python-build-system)
5154 (inputs
f3b98f4f 5155 `(("sqlite" ,sqlite)))
a6ac8332
AE
5156 (arguments
5157 `(#:phases
154d207c
MB
5158 (modify-phases %standard-phases
5159 (delete 'check)
5160 (add-after 'install 'check
5161 (lambda* (#:key inputs outputs #:allow-other-keys)
5162 (add-installed-pythonpath inputs outputs)
5163 (zero? (system* "python" "setup.py" "test")))))))
a6ac8332
AE
5164 (home-page "https://github.com/rogerbinns/apsw/")
5165 (synopsis "Another Python SQLite Wrapper")
5166 (description "APSW is a Python wrapper for the SQLite
5167embedded relational database engine. In contrast to other wrappers such as
5168pysqlite it focuses on being a minimal layer over SQLite attempting just to
5169translate the complete SQLite API into Python.")
abde5f37 5170 (license license:zlib)))
a6ac8332
AE
5171
5172(define-public python2-apsw
5173 (package-with-python2 python-apsw))
26b307e2
AE
5174
5175(define-public python-lxml
5176 (package
5177 (name "python-lxml")
d58a3203 5178 (version "3.6.0")
26b307e2
AE
5179 (source
5180 (origin
5181 (method url-fetch)
97bbc480 5182 (uri (pypi-uri "lxml" version))
26b307e2 5183 (sha256
d58a3203
EF
5184 (base32
5185 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5186 (build-system python-build-system)
5187 (inputs
5188 `(("libxml2" ,libxml2)
f3b98f4f 5189 ("libxslt" ,libxslt)))
26b307e2
AE
5190 (home-page "http://lxml.de/")
5191 (synopsis
5192 "Python XML processing library")
5193 (description
5194 "The lxml XML toolkit is a Pythonic binding for the C libraries
5195libxml2 and libxslt.")
3f641af0 5196 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5197
5198(define-public python2-lxml
5199 (package-with-python2 python-lxml))
4ed20663 5200
b32a1e47
CAW
5201;; beautifulsoup4 has a totally different namespace than 3.x,
5202;; and pypi seems to put it under its own name, so I guess we should too
5203(define-public python-beautifulsoup4
5204 (package
5205 (name "python-beautifulsoup4")
67fd4a12 5206 (version "4.5.1")
b32a1e47
CAW
5207 (source
5208 (origin
5209 (method url-fetch)
5210 (uri (pypi-uri "beautifulsoup4" version))
5211 (sha256
5212 (base32
67fd4a12 5213 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5214 (build-system python-build-system)
5f37f0b6
LF
5215 (arguments
5216 `(#:phases
5217 (modify-phases %standard-phases
5218 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5219 ;; must use this conversion script when building with Python 3. The
5220 ;; conversion script also runs the tests.
5221 ;; For more information, see the file 'convert-py3k' in the source
5222 ;; distribution.
5223 (replace 'check
5224 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5225 (home-page
5226 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5227 (synopsis
5228 "Python screen-scraping library")
5229 (description
5230 "Beautiful Soup is a Python library designed for rapidly setting up
5231screen-scraping projects. It offers Pythonic idioms for navigating,
5232searching, and modifying a parse tree, providing a toolkit for
5233dissecting a document and extracting what you need. It automatically
5234converts incoming documents to Unicode and outgoing documents to UTF-8.")
f210e944 5235 (license license:expat)))
b32a1e47
CAW
5236
5237(define-public python2-beautifulsoup4
5238 (package
5239 (inherit (package-with-python2
5240 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5241 (arguments `(#:python ,python-2))))
b32a1e47 5242
092e86f5
AE
5243(define-public python2-cssutils
5244 (package
5245 (name "python2-cssutils")
58d1d816 5246 (version "1.0.1")
092e86f5
AE
5247 (source
5248 (origin
5249 (method url-fetch)
58d1d816 5250 (uri (pypi-uri "cssutils" version))
092e86f5 5251 (sha256
58d1d816
EF
5252 (base32
5253 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5254 (build-system python-build-system)
5255 (native-inputs
5256 `(("python2-mock" ,python2-mock) ; for the tests
5257 ("unzip" ,unzip))) ; for unpacking the source
092e86f5
AE
5258 (arguments
5259 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5260 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5261 ))
092e86f5
AE
5262 (home-page "http://cthedot.de/cssutils/")
5263 (synopsis
5264 "CSS Cascading Style Sheets library for Python")
5265 (description
5266 "Cssutils is a Python package for parsing and building CSS
5267Cascading Style Sheets. Currently it provides a DOM only and no rendering
5268options.")
3f641af0 5269 (license license:lgpl3+)))
880ff77c
AE
5270
5271(define-public python-cssselect
5272 (package
5273 (name "python-cssselect")
d5ccd9ab 5274 (version "0.9.2")
880ff77c
AE
5275 (source
5276 (origin
5277 (method url-fetch)
d5ccd9ab 5278 (uri (pypi-uri "cssselect" version))
880ff77c 5279 (sha256
d5ccd9ab
EF
5280 (base32
5281 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5282 (build-system python-build-system)
880ff77c
AE
5283 (arguments
5284 ;; tests fail with message
5285 ;; AttributeError: 'module' object has no attribute 'tests'
5286 `(#:tests? #f))
5287 (home-page
5288 "https://pythonhosted.org/cssselect/")
5289 (synopsis
5290 "CSS3 selector parser and translator to XPath 1.0")
5291 (description
5292 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5293them to XPath 1.0 expressions. Such expressions can be used in lxml or
5294another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5295 (license license:bsd-3)))
880ff77c
AE
5296
5297(define-public python2-cssselect
5298 (package-with-python2 python-cssselect))
60357f99
AE
5299
5300(define-public python-netifaces
5301 (package
5302 (name "python-netifaces")
5303 (version "0.10.4")
5304 (source
5305 (origin
5306 (method url-fetch)
5307 (uri (string-append
5308 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5309 version
5310 ".tar.gz"))
5311 (sha256
5312 (base32
5313 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5314 (build-system python-build-system)
60357f99
AE
5315 (home-page
5316 "https://bitbucket.org/al45tair/netifaces")
5317 (synopsis
5318 "Python module for portable network interface information")
5319 (description
5320 "Netifaces is a Python module providing information on network
5321interfaces in an easy and portable manner.")
5322 (license license:expat)))
5323
5324(define-public python2-netifaces
5325 (package-with-python2 python-netifaces))
92cb152b 5326
32f77c04
RW
5327(define-public python-networkx
5328 (package
5329 (name "python-networkx")
a4d9609c 5330 (version "1.11")
32f77c04
RW
5331 (source
5332 (origin
5333 (method url-fetch)
a4d9609c 5334 (uri (pypi-uri "networkx" version))
32f77c04 5335 (sha256
a4d9609c 5336 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5337 (build-system python-build-system)
5338 ;; python-decorator is needed at runtime
5339 (propagated-inputs
5340 `(("python-decorator" ,python-decorator)))
5341 (native-inputs
f3b98f4f 5342 `(("python-nose" ,python-nose)))
32f77c04
RW
5343 (home-page "http://networkx.github.io/")
5344 (synopsis "Python module for creating and manipulating graphs and networks")
5345 (description
5346 "NetworkX is a Python package for the creation, manipulation, and study
5347of the structure, dynamics, and functions of complex networks.")
3f641af0 5348 (license license:bsd-3)))
32f77c04
RW
5349
5350(define-public python2-networkx
5351 (package-with-python2 python-networkx))
5352
92cb152b
RW
5353(define-public snakemake
5354 (package
5355 (name "snakemake")
7b93d866 5356 (version "3.9.0")
92cb152b
RW
5357 (source
5358 (origin
5359 (method url-fetch)
7b93d866 5360 (uri (pypi-uri "snakemake" version))
92cb152b 5361 (sha256
7b93d866 5362 (base32 "1d48ql0010v9ls6mac7fz6j391gm4h74a64hqgw89s0vfqgdyzdl"))))
92cb152b 5363 (build-system python-build-system)
7b93d866
MB
5364 (arguments
5365 ;; TODO: Package missing test dependencies.
5366 '(#:tests? #f))
5367 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
5368 (synopsis "Python-based execution environment for make-like workflows")
5369 (description
5370 "Snakemake aims to reduce the complexity of creating workflows by
5371providing a clean and modern domain specific specification language (DSL) in
5372Python style, together with a fast and comfortable execution environment.")
5373 (license license:expat)))
a1920bc9 5374
35de1fbd
RW
5375(define-public python-seaborn
5376 (package
5377 (name "python-seaborn")
fc899d4f 5378 (version "0.7.0")
35de1fbd
RW
5379 (source
5380 (origin
5381 (method url-fetch)
fc899d4f 5382 (uri (pypi-uri "seaborn" version))
35de1fbd 5383 (sha256
fc899d4f 5384 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd 5385 (build-system python-build-system)
6f976df6
MB
5386 (arguments
5387 '(#:tests? #f)) ; Tests requires a running X11 server.
35de1fbd
RW
5388 (propagated-inputs
5389 `(("python-pandas" ,python-pandas)
5390 ("python-matplotlib" ,python-matplotlib)
5391 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5392 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5393 (synopsis "Statistical data visualization")
5394 (description
5395 "Seaborn is a library for making attractive and informative statistical
5396graphics in Python. It is built on top of matplotlib and tightly integrated
5397with the PyData stack, including support for numpy and pandas data structures
5398and statistical routines from scipy and statsmodels.")
3f641af0 5399 (license license:bsd-3)
fc899d4f 5400 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5401
5402(define-public python2-seaborn
fc899d4f
EF
5403 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5404 (package
5405 (inherit base)
5406 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5407 ,@(package-propagated-inputs base))))))
35de1fbd 5408
58a35665
MB
5409(define-public python-mpmath
5410 (package
5411 (name "python-mpmath")
5412 (version "0.19")
5413 (source (origin
5414 (method url-fetch)
5415 (uri (string-append "http://mpmath.org/files/mpmath-"
5416 version ".tar.gz"))
5417 (sha256
5418 (base32
5419 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5420 (build-system python-build-system)
5421 (arguments
5422 '(#:phases
5423 (modify-phases %standard-phases
5424 (replace 'check
5425 (lambda _
5426 (zero?
5427 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5428 (home-page "http://mpmath.org")
5429 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5430 (description
5431 "@code{mpmath} can be used as an arbitrary-precision substitute for
5432Python's float/complex types and math/cmath modules, but also does much
5433more advanced mathematics.")
5434 (license license:bsd-3)))
5435
5436(define-public python2-mpmath
5437 (package-with-python2 python-mpmath))
5438
90fc547f
RW
5439(define-public python-sympy
5440 (package
5441 (name "python-sympy")
52f622ef 5442 (version "1.0")
90fc547f
RW
5443 (source
5444 (origin
5445 (method url-fetch)
5446 (uri (string-append
5447 "https://github.com/sympy/sympy/releases/download/sympy-"
5448 version "/sympy-" version ".tar.gz"))
5449 (sha256
52f622ef 5450 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
90fc547f 5451 (build-system python-build-system)
52f622ef
MB
5452 (propagated-inputs
5453 `(("python-mpmath" ,python-mpmath)))
90fc547f
RW
5454 (home-page "http://www.sympy.org/")
5455 (synopsis "Python library for symbolic mathematics")
5456 (description
5457 "SymPy is a Python library for symbolic mathematics. It aims to become a
5458full-featured computer algebra system (CAS) while keeping the code as simple
5459as possible in order to be comprehensible and easily extensible.")
3f641af0 5460 (license license:bsd-3)))
90fc547f
RW
5461
5462(define-public python2-sympy
5463 (package-with-python2 python-sympy))
5464
e8c9b010
SR
5465(define-public python-q
5466 (package
5467 (name "python-q")
5468 (version "2.6")
5469 (source
5470 (origin
5471 (method url-fetch)
5472 (uri (pypi-uri "q" version))
5473 (sha256
5474 (base32
5475 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5476 (build-system python-build-system)
5477 (home-page "https://github.com/zestyping/q")
5478 (synopsis "Quick-and-dirty debugging output for tired programmers")
5479 (description
5480 "q is a Python module for \"print\" style of debugging Python code. It
5481provides convenient short API for print out of values, tracebacks, and
5482falling into the Python interpreter.")
f210e944 5483 (license license:asl2.0)))
e8c9b010
SR
5484
5485(define-public python2-q
f210e944 5486 (package-with-python2 python-q))
e8c9b010 5487
a1920bc9
FB
5488(define-public python-testlib
5489 (package
5490 (name "python-testlib")
5491 (version "0.6.5")
5492 (source
5493 (origin
5494 (method url-fetch)
5495 (uri (string-append
5496 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5497 version ".zip"))
5498 (sha256
5499 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5500 (build-system python-build-system)
a1920bc9 5501 (native-inputs
632735f2 5502 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
5503 (synopsis "Python micro test suite harness")
5504 (description "A micro unittest suite harness for Python.")
5505 (home-page "https://github.com/trentm/testlib")
1cb9c006 5506 (license license:expat)))
a1920bc9
FB
5507
5508(define-public python2-testlib
5509 (package-with-python2 python-testlib))
db62afa5
LC
5510
5511(define-public python2-xlib
5512 (package
5513 (name "python2-xlib")
5514 (version "0.14")
5515 (source (origin
5516 (method url-fetch)
de67e922
LF
5517 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5518 "/" version "/"
db62afa5
LC
5519 "python-xlib-" version ".tar.gz"))
5520 (sha256
5521 (base32
5522 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5523 (build-system python-build-system)
5524 (arguments
5525 `(#:python ,python-2 ;Python 2 only
5526 #:tests? #f)) ;no tests
db62afa5
LC
5527 (home-page "http://python-xlib.sourceforge.net/")
5528 (synopsis "Python X11 client library")
5529 (description
5530 "The Python X Library is intended to be a fully functional X client
5531library for Python programs. It is useful to implement low-level X clients.
5532It is written entirely in Python.")
3f641af0 5533 (license license:gpl2+)))
0234ca06
DT
5534
5535(define-public python-singledispatch
5536 (package
5537 (name "python-singledispatch")
5538 (version "3.4.0.3")
5539 (source
5540 (origin
5541 (method url-fetch)
bdb67d84 5542 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5543 (sha256
5544 (base32
5545 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5546 (build-system python-build-system)
5e1c9d24
HG
5547 (native-inputs
5548 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
5549 (home-page
5550 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5551 (synopsis "Backport of singledispatch feature from Python 3.4")
5552 (description
5553 "This library brings functools.singledispatch from Python 3.4 to Python
55542.6-3.3.")
5555 (license license:expat)))
5556
5557(define-public python2-singledispatch
5558 (package-with-python2 python-singledispatch))
feaae484 5559
310d218f
RW
5560(define-public python-tornado
5561 (package
5562 (name "python-tornado")
a724924b 5563 (version "4.3")
310d218f
RW
5564 (source
5565 (origin
5566 (method url-fetch)
a724924b 5567 (uri (pypi-uri "tornado" version))
310d218f 5568 (sha256
a724924b 5569 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5570 (build-system python-build-system)
3fe2c209
MB
5571 (arguments
5572 '(;; FIXME: Two tests error out with:
5573 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
5574 ;; #:phases
5575 ;; (modify-phases %standard-phases
5576 ;; (replace 'check
5577 ;; (lambda _
5578 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
5579 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
5580 ;; (zero? (system* "python" "-m" "tornado.test")))))
5581 #:tests? #f))
310d218f 5582 (native-inputs
b455439b 5583 `(("python-certifi" ,python-certifi)))
f22efa01 5584 (propagated-inputs
b455439b 5585 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5586 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5587 (synopsis "Python web framework and asynchronous networking library")
5588 (description
5589 "Tornado is a Python web framework and asynchronous networking library,
5590originally developed at FriendFeed. By using non-blocking network I/O,
5591Tornado can scale to tens of thousands of open connections, making it ideal
5592for long polling, WebSockets, and other applications that require a long-lived
5593connection to each user.")
3f641af0 5594 (license license:asl2.0)
b455439b 5595 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5596
5597(define-public python2-tornado
b455439b 5598 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 5599 (package (inherit tornado)
f22efa01 5600 (propagated-inputs
310d218f
RW
5601 `(("python2-backport-ssl-match-hostname"
5602 ,python2-backport-ssl-match-hostname)
b455439b 5603 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 5604 ,@(package-propagated-inputs tornado))))))
310d218f 5605
6b59fc10
EF
5606;; the python- version can be removed with python-3.5
5607(define-public python-backports-abc
5608 (package
5609 (name "python-backports-abc")
5610 (version "0.4")
5611 (source
5612 (origin
5613 (method url-fetch)
5614 (uri (pypi-uri "backports_abc" version))
5615 (sha256
5616 (base32
5617 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5618 (build-system python-build-system)
6b59fc10 5619 (home-page "https://github.com/cython/backports_abc")
66e07664 5620 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5621 (description
5622 "Python-backports-abc provides a backport of additions to the
5623'collections.abc' module in Python-3.5.")
3f641af0 5624 (license license:psfl)))
6b59fc10
EF
5625
5626(define-public python2-backports-abc
5627 (package-with-python2 python-backports-abc))
5628
feaae484
SB
5629(define-public python-waf
5630 (package
5631 (name "python-waf")
7dd55dfe 5632 (version "1.9.5")
feaae484
SB
5633 (source (origin
5634 (method url-fetch)
bae67829 5635 (uri (string-append "https://waf.io/"
feaae484
SB
5636 "waf-" version ".tar.bz2"))
5637 (sha256
5638 (base32
7dd55dfe 5639 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5640 (build-system python-build-system)
5641 (arguments
5642 '(#:phases
5643 (modify-phases %standard-phases
5644 (replace 'build
7dd55dfe
EF
5645 (lambda _
5646 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5647 (replace 'check
7dd55dfe
EF
5648 (lambda _
5649 (zero? (system* "python" "waf" "--version"))))
feaae484 5650 (replace 'install
7dd55dfe
EF
5651 (lambda _
5652 (copy-file "waf" %output))))))
5653 (home-page "http://waf.io/")
feaae484
SB
5654 (synopsis "Python-based build system")
5655 (description
5656 "Waf is a Python-based framework for configuring, compiling and installing
5657applications.")
3f641af0 5658 (license license:bsd-3)))
feaae484
SB
5659
5660(define-public python2-waf
5661 (package-with-python2 python-waf))
45203542
RW
5662
5663(define-public python-pyzmq
5664 (package
5665 (name "python-pyzmq")
3655ee76 5666 (version "15.1.0")
45203542
RW
5667 (source
5668 (origin
5669 (method url-fetch)
3655ee76 5670 (uri (pypi-uri "pyzmq" version))
45203542 5671 (sha256
3655ee76 5672 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5673 (build-system python-build-system)
5674 (arguments
5675 `(#:configure-flags
5676 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5677 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5678 ;; --inplace' for 'python setup.py test' to work.
5679 #:tests? #f))
5680 (inputs
5681 `(("zeromq" ,zeromq)))
5682 (native-inputs
5683 `(("pkg-config" ,pkg-config)
f3b98f4f 5684 ("python-nose" ,python-nose)))
45203542
RW
5685 (home-page "http://github.com/zeromq/pyzmq")
5686 (synopsis "Python bindings for 0MQ")
5687 (description
5688 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5689 (license license:bsd-4)))
45203542
RW
5690
5691(define-public python2-pyzmq
5692 (package-with-python2 python-pyzmq))
d889e6c4
CR
5693
5694(define-public python-pep8
5695 (package
5696 (name "python-pep8")
db251311 5697 (version "1.7.0")
d889e6c4
CR
5698 (source
5699 (origin
5700 (method url-fetch)
db251311 5701 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5702 (sha256
5703 (base32
db251311 5704 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 5705 (build-system python-build-system)
d889e6c4
CR
5706 (home-page "http://pep8.readthedocs.org/")
5707 (synopsis "Python style guide checker")
5708 (description
5709 "This tools checks Python code against some of the style conventions in
5710PEP 8.")
5711 (license license:expat)))
5712
5713(define-public python2-pep8
5714 (package-with-python2 python-pep8))
e31d7f44
CR
5715
5716(define-public python-pyflakes
5717 (package
5718 (name "python-pyflakes")
2abc3972 5719 (version "1.0.0")
e31d7f44
CR
5720 (source
5721 (origin
5722 (method url-fetch)
2abc3972 5723 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5724 (sha256
5725 (base32
2abc3972 5726 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 5727 (build-system python-build-system)
e31d7f44
CR
5728 (home-page
5729 "https://github.com/pyflakes/pyflakes")
5730 (synopsis "Passive checker of Python programs")
5731 (description
5732 "Pyflakes statically checks Python source code for common errors.")
5733 (license license:expat)))
a59e017c 5734
7261d9eb
CR
5735(define-public python2-pyflakes
5736 (package-with-python2 python-pyflakes))
5737
a59e017c
CR
5738(define-public python-mccabe
5739 (package
5740 (name "python-mccabe")
c6ebd40d 5741 (version "0.4.0")
a59e017c
CR
5742 (source
5743 (origin
5744 (method url-fetch)
c6ebd40d 5745 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5746 (sha256
5747 (base32
c6ebd40d 5748 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 5749 (build-system python-build-system)
328bb95d 5750 (native-inputs
c6ebd40d 5751 `(("python-pytest" ,python-pytest)
f3b98f4f 5752 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
5753 (home-page "https://github.com/flintwork/mccabe")
5754 (synopsis "McCabe checker, plugin for flake8")
5755 (description
5756 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5757complexity of Python source code.")
7362371d 5758 (license license:expat)))
a59e017c
CR
5759
5760(define-public python2-mccabe
5761 (package-with-python2 python-mccabe))
e8df8f47 5762
7477fbb1
CR
5763(define-public python-mccabe-0.2.1
5764 (package (inherit python-mccabe)
5765 (version "0.2.1")
5766 (source
5767 (origin
5768 (method url-fetch)
5769 (uri (pypi-uri "mccabe" version))
5770 (sha256
5771 (base32
f3b98f4f 5772 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
5773
5774(define-public python2-mccabe-0.2.1
5775 (package-with-python2 python-mccabe-0.2.1))
5776
e8df8f47
CR
5777;; Flake8 2.4.1 requires an older version of pep8.
5778;; This should be removed ASAP.
5779(define-public python-pep8-1.5.7
5780 (package (inherit python-pep8)
5781 (version "1.5.7")
5782 (source
5783 (origin
5784 (method url-fetch)
5785 (uri (string-append
5786 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5787 version
5788 ".tar.gz"))
5789 (sha256
5790 (base32
73e3060d
MB
5791 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5792 (arguments
5793 ;; XXX Tests not compatible with Python 3.5.
5794 '(#:tests? #f))))
e8df8f47
CR
5795
5796(define-public python2-pep8-1.5.7
5797 (package-with-python2 python-pep8-1.5.7))
5798
5799;; Flake8 2.4.1 requires an older version of pyflakes.
5800;; This should be removed ASAP.
5801(define-public python-pyflakes-0.8.1
5802 (package (inherit python-pyflakes)
5803 (version "0.8.1")
5804 (source
5805 (origin
5806 (method url-fetch)
5807 (uri (string-append
5808 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5809 version
5810 ".tar.gz"))
5811 (sha256
5812 (base32
0d84e1ef
MB
5813 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5814 (arguments
5815 ;; XXX Tests not compatible with Python 3.5.
5816 '(#:tests? #f))))
e8df8f47
CR
5817
5818(define-public python2-pyflakes-0.8.1
7261d9eb 5819 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5820
5821(define-public python-flake8
5822 (package
5823 (name "python-flake8")
43789136 5824 (version "2.5.4")
e8df8f47
CR
5825 (source
5826 (origin
5827 (method url-fetch)
1b995533 5828 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5829 (sha256
5830 (base32
011271c7
HG
5831 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5832 (modules '((guix build utils)))
5833 (snippet
5834 '(begin
5835 ;; Remove pre-compiled .pyc files from source.
5836 (for-each delete-file-recursively
5837 (find-files "." "__pycache__" #:directories? #t))
5838 (for-each delete-file (find-files "." "\\.pyc$"))
5839 #t))))
e8df8f47 5840 (build-system python-build-system)
482d9591 5841 (propagated-inputs
f3b98f4f 5842 `(("python-pep8" ,python-pep8)
43789136 5843 ("python-pyflakes" ,python-pyflakes)
482d9591 5844 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
5845 (native-inputs
5846 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
5847 ("python-nose" ,python-nose)))
5848 (home-page "https://gitlab.com/pycqa/flake8")
5849 (synopsis
5850 "The modular source code checker: pep8, pyflakes and co")
5851 (description
5852 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5853 (license license:expat)))
5854
5855(define-public python2-flake8
5856 (package-with-python2 python-flake8))
61b9ac53 5857
abf21efc
CR
5858;; This will only be needed by the python-hacking package and will not be
5859;; necessary once python-hacking > 0.10.2 is released.
5860(define-public python-flake8-2.2.4
5861 (package (inherit python-flake8)
482d9591 5862 (propagated-inputs
f3b98f4f 5863 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 5864 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 5865 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 5866 (native-inputs
482d9591 5867 `(("python-mock" ,python-mock)
abf21efc
CR
5868 ("python-nose" ,python-nose)))
5869 (version "2.2.4")
5870 (source
5871 (origin
5872 (method url-fetch)
5873 (uri (pypi-uri "flake8" version))
5874 (sha256
5875 (base32
b9c8ccce
HG
5876 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
5877 (modules '((guix build utils)))
5878 (snippet
5879 '(begin
5880 ;; Remove pre-compiled .pyc files from source.
5881 (for-each delete-file-recursively
5882 (find-files "." "__pycache__" #:directories? #t))
5883 (for-each delete-file (find-files "." "\\.pyc$"))
a717e8a6
MB
5884 #t))))
5885 (arguments
5886 ;; XXX Fails with Python 3.5.
5887 '(#:tests? #f))))
abf21efc
CR
5888
5889(define-public python2-flake8-2.2.4
5890 (package-with-python2 python-flake8-2.2.4))
5891
61b9ac53
FB
5892(define-public python-mistune
5893 (package
5894 (name "python-mistune")
5895 (version "0.7")
5896 (source
5897 (origin
5898 (method url-fetch)
5899 (uri (string-append
5900 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5901 version
5902 ".tar.gz"))
5903 (sha256
5904 (base32
5905 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5906 (build-system python-build-system)
328bb95d 5907 (native-inputs
f3b98f4f 5908 `(("python-nose" ,python-nose)
61b9ac53
FB
5909 ("python-cython" ,python-cython)))
5910 (home-page "https://github.com/lepture/mistune")
5911 (synopsis "Markdown parser in pure Python")
5912 (description "This package provides a fast markdown parser in pure
5913Python.")
3f641af0 5914 (license license:bsd-3)))
61b9ac53
FB
5915
5916(define-public python2-mistune
5917 (package-with-python2 python-mistune))
6d992d07 5918
b9893908
EE
5919(define-public python-markdown
5920 (package
5921 (name "python-markdown")
5922 (version "2.6.5")
5923 (source
5924 (origin
5925 (method url-fetch)
5926 (uri (pypi-uri "Markdown" version))
5927 (sha256
5928 (base32
5929 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5930 (build-system python-build-system)
5931 (arguments
5932 `(#:phases
5933 (modify-phases %standard-phases
5934 (replace 'check
5935 (lambda _
5936 (zero? (system* "python" "run-tests.py")))))))
5937 (native-inputs
5938 `(("python-nose" ,python-nose)
5939 ("python-pyyaml" ,python-pyyaml)))
5940 (home-page "https://pythonhosted.org/Markdown/")
5941 (synopsis "Python implementation of Markdown")
5942 (description
5943 "This package provides a Python implementation of John Gruber's
5944Markdown. The library features international input, various Markdown
5945extensions, and several HTML output formats. A command line wrapper
5946markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5947 (license license:bsd-3)))
b9893908
EE
5948
5949(define-public python2-markdown
5950 (package-with-python2 python-markdown))
5951
6d992d07
FB
5952(define-public python-ptyprocess
5953 (package
5954 (name "python-ptyprocess")
5955 (version "0.5")
5956 (source
5957 (origin
5958 (method url-fetch)
5959 (uri (string-append
5960 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5961 version ".tar.gz"))
5962 (sha256
5963 (base32
5964 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5965 (build-system python-build-system)
328bb95d 5966 (native-inputs
f3b98f4f 5967 `(("python-nose" ,python-nose)))
6d992d07
FB
5968 (arguments
5969 `(#:phases
5970 (modify-phases %standard-phases
5971 (replace 'check
5972 (lambda _
5973 (zero? (system* "nosetests")))))))
5974 (home-page "https://github.com/pexpect/ptyprocess")
5975 (synopsis "Run a subprocess in a pseudo terminal")
5976 (description
5977 "This package provides a Python library used to launch a subprocess in a
5978pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5979 (license license:isc)))
6d992d07
FB
5980
5981(define-public python2-ptyprocess
5982 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5983
5984(define-public python-terminado
5985 (package
5986 (name "python-terminado")
783fb0a3 5987 (version "0.6")
4aadb1df
FB
5988 (source
5989 (origin
5990 (method url-fetch)
783fb0a3 5991 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5992 (sha256
5993 (base32
783fb0a3 5994 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5995 (build-system python-build-system)
5996 (propagated-inputs
5997 `(("python-tornado" ,python-tornado)
5998 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5999 (native-inputs
6000 `(("python-nose" ,python-nose)))
4aadb1df
FB
6001 (arguments
6002 `(#:phases
6003 (modify-phases %standard-phases
6004 (replace 'check
6005 (lambda _
6006 (zero? (system* "nosetests")))))))
6007 (home-page "https://github.com/takluyver/terminado")
6008 (synopsis "Terminals served to term.js using Tornado websockets")
6009 (description "This package provides a Tornado websocket backend for the
6010term.js Javascript terminal emulator library.")
3f641af0 6011 (license license:bsd-2)
783fb0a3 6012 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
6013
6014(define-public python2-terminado
783fb0a3 6015 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 6016 (package (inherit terminado)
783fb0a3
EF
6017 (propagated-inputs
6018 `(("python2-backport-ssl-match-hostname"
6019 ,python2-backport-ssl-match-hostname)
00e10c6e 6020 ,@(package-propagated-inputs terminado))))))
5faa5ce4 6021
d582eaac
SB
6022(define-public python-fonttools
6023 (package
6024 (name "python-fonttools")
6025 (version "2.5")
6026 (source (origin
6027 (method url-fetch)
6028 (uri (string-append
6029 "https://pypi.python.org/packages/source/F/FontTools/"
6030 "fonttools-" version ".tar.gz"))
6031 (sha256
6032 (base32
6033 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6034 (build-system python-build-system)
9e8c6a37
HG
6035 (arguments
6036 '(#:test-target "check"
6037 #:phases
6038 (modify-phases %standard-phases
6039 (add-after 'unpack 'patch-setuppy
6040 ;; Remove the undocumented "extra_path" argument, which adds an
6041 ;; intervening directories between site-packages and the package
6042 ;; directory.
6043 (lambda _
6044 (substitute* "setup.py"
6045 (("^[ \t]*extra_path *= *'FontTools',") ""))
6046 #t)))))
d582eaac
SB
6047 (home-page "http://github.com/behdad/fonttools")
6048 (synopsis "Tools to manipulate font files")
6049 (description
6050 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 6051supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
6052of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6053also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6054from an XML-based format.")
3f641af0
DC
6055 (license (license:non-copyleft
6056 "file://LICENSE.txt"
6057 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6058
6059(define-public python2-fonttools
6060 (package-with-python2 python-fonttools))
75710da6 6061
5faa5ce4
RW
6062(define-public python-ly
6063 (package
6064 (name "python-ly")
5135354f 6065 (version "0.9.4")
5faa5ce4
RW
6066 (source
6067 (origin
6068 (method url-fetch)
5135354f
RW
6069 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6070 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6071 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6072 (sha256
6073 (base32
5135354f 6074 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6075 (build-system python-build-system)
972cf9be
MB
6076 (arguments
6077 ;; FIXME: Some tests need network access.
6078 '(#:tests? #f))
5faa5ce4
RW
6079 (synopsis "Tool and library for manipulating LilyPond files")
6080 (description "This package provides a Python library to parse, manipulate
6081or create documents in LilyPond format. A command line program ly is also
6082provided that can be used to do various manipulations with LilyPond files.")
6083 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6084 (license license:gpl2+)))
7e7b27d9
CR
6085
6086(define-public python-appdirs
6087 (package
6088 (name "python-appdirs")
6089 (version "1.4.0")
6090 (source
6091 (origin
6092 (method url-fetch)
6093 (uri (string-append
6094 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6095 version
6096 ".tar.gz"))
6097 (sha256
6098 (base32
6099 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6100 (build-system python-build-system)
7e7b27d9
CR
6101 (home-page "http://github.com/ActiveState/appdirs")
6102 (synopsis
6103 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6104 (description
6105 "This module provides a portable way of finding out where user data
6106should be stored on various operating systems.")
6107 (license license:expat)))
6108
6109(define-public python2-appdirs
6110 (package-with-python2 python-appdirs))
89b2e0b0
LF
6111
6112(define-public python-llfuse
6113 (package
6114 (name "python-llfuse")
e36ace36 6115 (version "1.1.1")
89b2e0b0
LF
6116 (source (origin
6117 (method url-fetch)
6118 (uri (string-append
6119 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6120 "llfuse-" version ".tar.bz2"))
6121 (sha256
6122 (base32
e36ace36 6123 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6124 (build-system python-build-system)
6125 (inputs
6126 `(("fuse" ,fuse)
6127 ("attr" ,attr)))
6128 (native-inputs
f3b98f4f 6129 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6130 (synopsis "Python bindings for FUSE")
6131 (description
6132 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6133 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6134 (license license:lgpl2.0+)
cd0569c4 6135 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6136
6137(define-public python2-llfuse
cd0569c4
LF
6138 (package (inherit (package-with-python2
6139 (strip-python2-variant python-llfuse)))
6140 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6141
6142;; For attic-0.16
6143(define-public python-llfuse-0.41
6144 (package (inherit python-llfuse)
229b3661 6145 (version "0.41.1")
cd0569c4
LF
6146 (source (origin
6147 (method url-fetch)
6148 (uri (string-append
6149 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6150 "llfuse-" version ".tar.bz2"))
6151 (sha256
6152 (base32
229b3661 6153 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6154 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6155 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6156 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6157
6158(define-public python-msgpack
6159 (package
6160 (name "python-msgpack")
aed625bd 6161 (version "0.4.8")
641c9871
LF
6162 (source (origin
6163 (method url-fetch)
ae831df4 6164 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6165 (sha256
6166 (base32
aed625bd 6167 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6168 (build-system python-build-system)
641c9871
LF
6169 (synopsis "MessagePack (de)serializer")
6170 (description "MessagePack is a fast, compact binary serialization format,
6171suitable for similar data to JSON. This package provides CPython bindings for
6172reading and writing MessagePack data.")
6173 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6174 (license license:asl2.0)))
bd74be7b
LF
6175
6176(define-public python2-msgpack
f210e944 6177 (package-with-python2 python-msgpack))
641c9871 6178
6e5e39f4
CR
6179(define-public python-netaddr
6180 (package
6181 (name "python-netaddr")
6182 (version "0.7.18")
6183 (source
6184 (origin
6185 (method url-fetch)
6186 (uri (string-append
6187 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6188 version
6189 ".tar.gz"))
6190 (sha256
6191 (base32
6192 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6193 (build-system python-build-system)
6194 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6195 (home-page "https://github.com/drkjam/netaddr/")
6196 (synopsis "Pythonic manipulation of network addresses")
6197 (description
6198 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6199and MAC network addresses.")
3f641af0 6200 (license license:bsd-3)))
6e5e39f4
CR
6201
6202(define-public python2-netaddr
6203 (package-with-python2 python-netaddr))
8c692a52
CR
6204
6205(define-public python-wrapt
6206 (package
6207 (name "python-wrapt")
6208 (version "1.10.5")
6209 (source
6210 (origin
6211 (method url-fetch)
6212 (uri (string-append
6213 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6214 version
6215 ".tar.gz"))
6216 (sha256
6217 (base32
6218 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6219 (build-system python-build-system)
6220 (arguments
6221 ;; Tests are not included in the tarball, they are only available in the
6222 ;; git repository.
6223 `(#:tests? #f))
8c692a52
CR
6224 (home-page "https://github.com/GrahamDumpleton/wrapt")
6225 (synopsis "Module for decorators, wrappers and monkey patching")
6226 (description
6227 "The aim of the wrapt module is to provide a transparent object proxy for
6228 Python, which can be used as the basis for the construction of function
6229 wrappers and decorator functions.")
3f641af0 6230 (license license:bsd-2)))
8c692a52
CR
6231
6232(define-public python2-wrapt
6233 (package-with-python2 python-wrapt))
b85c85be
CR
6234
6235(define-public python-iso8601
6236 (package
6237 (name "python-iso8601")
fe84bc9a 6238 (version "0.1.11")
b85c85be
CR
6239 (source
6240 (origin
6241 (method url-fetch)
fe84bc9a 6242 (uri (pypi-uri "iso8601" version))
b85c85be 6243 (sha256
fe84bc9a
EF
6244 (base32
6245 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6246 (build-system python-build-system)
63b02364
MB
6247 (native-inputs
6248 `(("python-pytest" ,python-pytest)))
b85c85be
CR
6249 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6250 (synopsis "Module to parse ISO 8601 dates")
6251 (description
6252 "This module parses the most common forms of ISO 8601 date strings (e.g.
6253@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6254 (license license:expat)))
6255
6256(define-public python2-iso8601
6257 (package-with-python2 python-iso8601))
5e412b63
CR
6258
6259(define-public python-monotonic
6260 (package
6261 (name "python-monotonic")
6262 (version "0.3")
6263 (source
6264 (origin
6265 (method url-fetch)
6266 (uri (string-append
6267 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6268 version
6269 ".tar.gz"))
6270 (sha256
6271 (base32
6272 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6273 (build-system python-build-system)
5e412b63
CR
6274 (home-page "https://github.com/atdt/monotonic")
6275 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6276 (description
6277 "This module provides a monotonic() function which returns the value (in
6278fractional seconds) of a clock which never goes backwards.")
3f641af0 6279 (license license:asl2.0)))
5e412b63
CR
6280
6281(define-public python2-monotonic
6282 (package-with-python2 python-monotonic))
de34afac
CR
6283
6284(define-public python-webob
6285 (package
6286 (name "python-webob")
b8834c21 6287 (version "1.5.1")
de34afac
CR
6288 (source
6289 (origin
6290 (method url-fetch)
b8834c21 6291 (uri (pypi-uri "WebOb" version))
de34afac
CR
6292 (sha256
6293 (base32
b8834c21 6294 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6295 (build-system python-build-system)
328bb95d 6296 (native-inputs
f3b98f4f 6297 `(("python-nose" ,python-nose)))
de34afac
CR
6298 (home-page "http://webob.org/")
6299 (synopsis "WSGI request and response object")
6300 (description
6301 "WebOb provides wrappers around the WSGI request environment, and an
6302object to help create WSGI responses.")
6303 (license license:expat)))
6304
6305(define-public python2-webob
6306 (package-with-python2 python-webob))
350ba0a3 6307
02a8a187
BW
6308(define-public python-xlrd
6309 (package
6310 (name "python-xlrd")
c2ad4d70 6311 (version "1.0.0")
02a8a187
BW
6312 (source (origin
6313 (method url-fetch)
e775f48e 6314 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6315 (sha256
6316 (base32
c2ad4d70 6317 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6318 (build-system python-build-system)
6319 (arguments
6320 `(#:phases
6321 (modify-phases %standard-phases
c2ad4d70 6322 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6323 ;; run tests instead for now.
6324 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6325 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6326 (home-page "http://www.python-excel.org/")
6327 (synopsis "Library for extracting data from Excel files")
6328 (description "This packages provides a library to extract data from
c598e35c 6329spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6330@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6331Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6332 (license license:bsd-3)))
02a8a187
BW
6333
6334(define-public python2-xlrd
6335 (package-with-python2 python-xlrd))
6336
350ba0a3
CR
6337(define-public python-prettytable
6338 (package
6339 (name "python-prettytable")
6340 (version "0.7.2")
6341 (source
6342 (origin
6343 (method url-fetch)
6344 (uri (string-append
6345 "https://pypi.python.org/packages/source/P/PrettyTable/"
6346 "prettytable-" version ".tar.bz2"))
6347 (sha256
6348 (base32
6349 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6350 (build-system python-build-system)
350ba0a3
CR
6351 (home-page "http://code.google.com/p/prettytable/")
6352 (synopsis "Display tabular data in an ASCII table format")
6353 (description
6354 "A library designed to represent tabular data in visually appealing ASCII
6355tables. PrettyTable allows for selection of which columns are to be printed,
6356independent alignment of columns (left or right justified or centred) and
6357printing of sub-tables by specifying a row range.")
3f641af0 6358 (license license:bsd-3)))
350ba0a3
CR
6359
6360(define-public python2-prettytable
6361 (package-with-python2 python-prettytable))
7a8ac75a 6362
9f8ee3fe
RW
6363(define-public python-tables
6364 (package
6365 (name "python-tables")
6366 (version "3.2.2")
6367 (source
6368 (origin
6369 (method url-fetch)
6370 (uri (pypi-uri "tables" version))
6371 (sha256
6372 (base32
bac23672
HG
6373 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6374 (modules '((guix build utils)))
6375 (snippet
6376 '(begin
6377 ;; Remove pre-compiled .pyc files from source.
6378 (for-each delete-file-recursively
6379 (find-files "." "__pycache__" #:directories? #t))
6380 (for-each delete-file (find-files "." "\\.pyc$"))
6381 #t))))
9f8ee3fe
RW
6382 (build-system python-build-system)
6383 (arguments
6384 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6385 ;; or "check", so we must override the build and check phases.
6386 #:phases
6387 (modify-phases %standard-phases
6388 (add-after 'unpack 'use-gcc
6389 (lambda _
6390 (substitute* "setup.py"
6391 (("compiler = new_compiler\\(\\)" line)
6392 (string-append line
6393 "\ncompiler.set_executables(compiler='gcc',"
6394 "compiler_so='gcc',"
6395 "linker_exe='gcc',"
6396 "linker_so='gcc -shared')")))
6397 #t))
6398 (replace 'build
6399 (lambda* (#:key inputs #:allow-other-keys)
6400 (zero? (system* "python" "setup.py" "build"
6401 (string-append "--hdf5="
6402 (assoc-ref inputs "hdf5"))))))
6403 (replace 'check
6404 (lambda* (#:key inputs #:allow-other-keys)
6405 (zero? (system* "python" "setup.py" "check"
6406 (string-append "--hdf5="
6407 (assoc-ref inputs "hdf5")))))))))
6408 (propagated-inputs
6409 `(("python-numexpr" ,python-numexpr)
6410 ("python-numpy" ,python-numpy)))
6411 (native-inputs
f3b98f4f 6412 `(("python-cython" ,python-cython)
9f8ee3fe
RW
6413 ("pkg-config" ,pkg-config)))
6414 (inputs
6415 `(("hdf5" ,hdf5)
6416 ("bzip2" ,bzip2)
6417 ("zlib" ,zlib)))
6418 (home-page "http://www.pytables.org/")
6419 (synopsis "Hierarchical datasets for Python")
6420 (description "PyTables is a package for managing hierarchical datasets and
6421designed to efficently cope with extremely large amounts of data.")
3f641af0 6422 (license license:bsd-3)))
9f8ee3fe
RW
6423
6424(define-public python2-tables
6425 (package-with-python2 python-tables))
6426
7a8ac75a
RW
6427(define-public python-pyasn1
6428 (package
6429 (name "python-pyasn1")
caa0edb3 6430 (version "0.1.9")
7a8ac75a
RW
6431 (source
6432 (origin
6433 (method url-fetch)
caa0edb3 6434 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6435 (sha256
6436 (base32
caa0edb3 6437 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6438 (build-system python-build-system)
6439 (home-page "http://pyasn1.sourceforge.net/")
6440 (synopsis "ASN.1 types and codecs")
6441 (description
6442 "This is an implementation of ASN.1 types and codecs in Python. It is
6443suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6444 (license license:bsd-2)))
7a8ac75a
RW
6445
6446(define-public python2-pyasn1
6447 (package-with-python2 python-pyasn1))
9a49a535 6448
5988c299
EF
6449(define-public python-pyasn1-modules
6450 (package
6451 (name "python-pyasn1-modules")
6452 (version "0.0.8")
6453 (source
6454 (origin
6455 (method url-fetch)
6456 (uri (pypi-uri "pyasn1-modules" version))
6457 (sha256
6458 (base32
6459 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6460 (build-system python-build-system)
5988c299
EF
6461 (propagated-inputs
6462 `(("python-pyasn1" ,python-pyasn1)))
6463 (home-page "http://sourceforge.net/projects/pyasn1/")
6464 (synopsis "ASN.1 codec implementations")
6465 (description
6466 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6467implementations of ASN.1-based codecs and protocols.")
3f641af0 6468 (license license:bsd-3)))
5988c299
EF
6469
6470(define-public python2-pyasn1-modules
6471 (package-with-python2 python-pyasn1-modules))
6472
520af157 6473(define-public python-ipaddress
9a49a535 6474 (package
520af157
DC
6475 (name "python-ipaddress")
6476 (version "1.0.16")
6477 (source (origin
6478 (method url-fetch)
6479 (uri (pypi-uri "ipaddress" version))
6480 (sha256
6481 (base32
6482 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6483 (build-system python-build-system)
9a49a535
RW
6484 (home-page "https://github.com/phihag/ipaddress")
6485 (synopsis "IP address manipulation library")
6486 (description
520af157
DC
6487 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6488 in Python. This library is used to create, poke at, and manipulate IPv4 and
6489 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6490 module to older versions of Python.")
f210e944 6491 (license license:psfl)))
520af157
DC
6492
6493(define-public python2-ipaddress
f210e944 6494 (package-with-python2 python-ipaddress))
3f00e078 6495
4a238186
HG
6496(define-public python2-ipaddr
6497 (package
6498 (name "python2-ipaddr")
6499 (version "2.1.11")
6500 (source
6501 (origin
6502 (method url-fetch)
6503 (uri (pypi-uri "ipaddr" version))
6504 (sha256
6505 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6506 (build-system python-build-system)
6507 (arguments
6508 `(#:python ,python-2 ;version 2 only
6509 #:phases
6510 (modify-phases %standard-phases
6511 (replace 'check
6512 (lambda* _
6513 (zero? (system* "python" "ipaddr_test.py")))))))
6514 (home-page "https://github.com/google/ipaddr-py")
6515 (synopsis "IP address manipulation library")
6516 (description
6517 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6518IPv6 addresses and networks.
6519
6520For new implementations you may prefer to use the standard module
6521@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6522versions of Python.")
3f641af0 6523 (license license:asl2.0)))
4a238186 6524
3f00e078
RW
6525(define-public python-idna
6526 (package
6527 (name "python-idna")
6528 (version "2.0")
6529 (source
6530 (origin
6531 (method url-fetch)
6532 (uri (string-append "https://pypi.python.org/packages/source/i/"
6533 "idna/idna-" version ".tar.gz"))
6534 (sha256
6535 (base32
6536 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6537 (build-system python-build-system)
3f00e078
RW
6538 (home-page "https://github.com/kjd/idna")
6539 (synopsis "Internationalized domain names in applications")
6540 (description
6541 "This is a library to support the Internationalised Domain Names in
6542Applications (IDNA) protocol as specified in RFC 5891. This version of the
6543protocol is often referred to as “IDNA2008” and can produce different results
6544from the earlier standard from 2003. The library is also intended to act as a
6545suitable drop-in replacement for the “encodings.idna” module that comes with
6546the Python standard library but currently only supports the older 2003
6547specification.")
3f641af0 6548 (license license:bsd-4)))
3f00e078
RW
6549
6550(define-public python2-idna
6551 (package-with-python2 python-idna))
36ebf972
RW
6552
6553(define-public python-pretend
6554 (package
6555 (name "python-pretend")
6556 (version "1.0.8")
6557 (source
6558 (origin
6559 (method url-fetch)
6560 (uri (string-append "https://pypi.python.org/packages/source/p/"
6561 "pretend/pretend-" version ".tar.gz"))
6562 (sha256
6563 (base32
6564 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6565 (build-system python-build-system)
36ebf972
RW
6566 (home-page "https://github.com/alex/pretend")
6567 (synopsis "Library for stubbing in Python")
6568 (description
6569 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6570technique for writing tests. You may hear the term mixed up with mocks,
6571fakes, or doubles. Basically, a stub is an object that returns pre-canned
6572responses, rather than doing any computation.")
3f641af0 6573 (license license:bsd-3)))
36ebf972
RW
6574
6575(define-public python2-pretend
6576 (package-with-python2 python-pretend))
aa759a51
RW
6577
6578(define-public python-cryptography-vectors
6579 (package
6580 (name "python-cryptography-vectors")
a6c47905 6581 (version "1.6")
aa759a51
RW
6582 (source
6583 (origin
6584 (method url-fetch)
9c509ca9 6585 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6586 (sha256
6587 (base32
a6c47905 6588 "0xgn3yvlmv5rs92wgjj39qscr6s7mwbbsx7j683sfa6ijmyb1k01"))))
aa759a51 6589 (build-system python-build-system)
aa759a51 6590 (home-page "https://github.com/pyca/cryptography")
66e07664 6591 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6592 (description
6593 "This package contains test vectors for the cryptography package.")
6594 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6595 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6596
6597(define-public python2-cryptography-vectors
6598 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6599
6600(define-public python-cryptography
6601 (package
6602 (name "python-cryptography")
a6c47905 6603 (version "1.6")
88b47cb0
RW
6604 (source
6605 (origin
6606 (method url-fetch)
9c509ca9 6607 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6608 (sha256
6609 (base32
a6c47905 6610 "0gwvmz6w5ml0bjbgmdiscsv5i948lrjd381z7h9qkz6kr398c3ad"))))
88b47cb0 6611 (build-system python-build-system)
470613f9
LF
6612 (arguments
6613 `(#:phases
6614 (modify-phases %standard-phases
6615 (add-before 'check 'disable-failing-test
6616 (lambda _
6617 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6618 ;; versions of python-cryptography:
6619 ;; https://github.com/pyca/cryptography/issues/3196
6620 ;; TODO: Try re-enabling the test when upgrading
6621 ;; python-cryptography.
6622 (substitute* "tests/hazmat/backends/test_openssl.py"
6623 (("def test_numeric_string_x509_name_entry")
6624 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6625 #t)))))
88b47cb0
RW
6626 (inputs
6627 `(("openssl" ,openssl)))
6628 (propagated-inputs
6629 `(("python-cffi" ,python-cffi)
6630 ("python-six" ,python-six)
6631 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6632 ("python-idna" ,python-idna)
6633 ("python-iso8601" ,python-iso8601)))
6634 (native-inputs
6635 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6636 ("python-hypothesis" ,python-hypothesis)
88b47cb0 6637 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6638 ("python-pyasn1" ,python-pyasn1)
6639 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
6640 ("python-pytz" ,python-pytz)
6641 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
6642 (home-page "https://github.com/pyca/cryptography")
6643 (synopsis "Cryptographic recipes and primitives for Python")
6644 (description
6645 "cryptography is a package which provides cryptographic recipes and
6646primitives to Python developers. It aims to be the “cryptographic standard
6647library” for Python. The package includes both high level recipes, and low
6648level interfaces to common cryptographic algorithms such as symmetric ciphers,
6649message digests and key derivation functions.")
6650 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6651 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6652 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6653
6654(define-public python2-cryptography
519e2f4f
LF
6655 (let ((crypto (package-with-python2
6656 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6657 (package (inherit crypto)
6658 (propagated-inputs
6659 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6660 ("python2-backport-ssl-match-hostname"
6661 ,python2-backport-ssl-match-hostname)
68f1cdec 6662 ("python2-enum34" ,python2-enum34)
88b47cb0 6663 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6664
6665(define-public python-pyopenssl
6666 (package
6667 (name "python-pyopenssl")
61684de2 6668 (version "16.2.0")
5af999b8
RW
6669 (source
6670 (origin
6671 (method url-fetch)
eb68d268 6672 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6673 (sha256
6674 (base32
61684de2 6675 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))))
5af999b8 6676 (build-system python-build-system)
30e0229a
MB
6677 (arguments
6678 ;; FIXME: Some tests fail with "NameError: name 'long' is not defined".
6679 '(#:tests? #f))
5af999b8
RW
6680 (propagated-inputs
6681 `(("python-cryptography" ,python-cryptography)
6682 ("python-six" ,python-six)))
6683 (inputs
6684 `(("openssl" ,openssl)))
30e0229a
MB
6685 (native-inputs
6686 `(("python-pytest" ,python-pytest)))
5af999b8
RW
6687 (home-page "https://github.com/pyca/pyopenssl")
6688 (synopsis "Python wrapper module around the OpenSSL library")
6689 (description
6690 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6691library.")
3f641af0 6692 (license license:asl2.0)))
5af999b8
RW
6693
6694(define-public python2-pyopenssl
519e2f4f 6695 (package-with-python2 python-pyopenssl))
643725a1
CR
6696
6697(define-public python-pip
6698 (package
6699 (name "python-pip")
6fb54e3b 6700 (version "8.0.2")
643725a1
CR
6701 (source
6702 (origin
6703 (method url-fetch)
6fb54e3b 6704 (uri (pypi-uri "pip" version))
643725a1
CR
6705 (sha256
6706 (base32
6fb54e3b 6707 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1 6708 (build-system python-build-system)
05e2e4cf
HG
6709 (native-inputs
6710 `(;; Tests
6711 ("python-virtualenv" ,python-virtualenv)
643725a1
CR
6712 ("python-mock" ,python-mock)
6713 ("python-pytest" ,python-pytest)
6714 ("python-scripttest" ,python-scripttest)))
6715 (home-page "https://pip.pypa.io/")
6716 (synopsis
6717 "Package manager for Python software")
6718 (description
6719 "Pip is a package manager for Python software, that finds packages on the
6720Python Package Index (PyPI).")
6721 (license license:expat)))
6722
6723(define-public python2-pip
6724 (package-with-python2 python-pip))
d8c4998f
LC
6725
6726(define-public python-tlsh
6727 (package
6728 (name "python-tlsh")
99b00dc7 6729 (version "3.4.4")
d8c4998f
LC
6730 (home-page "https://github.com/trendmicro/tlsh")
6731 (source (origin
99b00dc7
EF
6732 (method url-fetch)
6733 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6734 version ".tar.gz"))
d8c4998f
LC
6735 (sha256
6736 (base32
99b00dc7
EF
6737 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6738 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6739 (build-system cmake-build-system)
6740 (arguments
6741 '(#:out-of-source? #f
6742 #:phases (modify-phases %standard-phases
6743 (replace
6744 'install
6745 (lambda* (#:key outputs #:allow-other-keys)
6746 ;; Build and install the Python bindings. The underlying
6747 ;; C++ library is apparently not meant to be installed.
6748 (let ((out (assoc-ref outputs "out")))
6749 (with-directory-excursion "py_ext"
6750 (and (system* "python" "setup.py" "build")
6751 (system* "python" "setup.py" "install"
6752 (string-append "--prefix=" out))))))))))
6753 (inputs `(("python" ,python-wrapper))) ;for the bindings
6754 (synopsis "Fuzzy matching library for Python")
6755 (description
6756 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6757Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6758value which can be used for similarity comparisons. Similar objects have
6759similar hash values, which allows for the detection of similar objects by
6760comparing their hash values. The byte stream should have a sufficient amount
6761of complexity; for example, a byte stream of identical bytes will not generate
6762a hash value.")
3f641af0 6763 (license license:asl2.0)))
d8c4998f
LC
6764
6765(define-public python2-tlsh
6766 (package
6767 (inherit python-tlsh)
6768 (name "python2-tlsh")
6769 (inputs `(("python" ,python-2)))))
d96034ed 6770
67f66812
BW
6771(define-public python-termcolor
6772 (package
6773 (name "python-termcolor")
6774 (version "1.1.0")
6775 (source
6776 (origin
6777 (method url-fetch)
6778 (uri (pypi-uri "python-termcolor" version))
6779 (sha256
6780 (base32
6781 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6782 (build-system python-build-system)
6783 (arguments
6784 ;; There are no tests.
6785 `(#:tests? #f))
6786 (home-page "http://pypi.python.org/pypi/termcolor")
6787 (synopsis "ANSII Color formatting for terminal output")
6788 (description
6789 "This package provides ANSII Color formatting for output in terminals.")
6790 (license license:expat)))
6791
6792(define-public python2-termcolor
6793 (package-with-python2 python-termcolor))
6794
d96034ed
LC
6795(define-public python-libarchive-c
6796 (package
6797 (name "python-libarchive-c")
03fd001c 6798 (version "2.2")
d96034ed
LC
6799 (source (origin
6800 (method url-fetch)
03fd001c 6801 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6802 (sha256
6803 (base32
03fd001c 6804 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6805 (build-system python-build-system)
6806 (arguments
6807 '(#:phases (modify-phases %standard-phases
6808 (add-before
6809 'build 'reference-libarchive
6810 (lambda* (#:key inputs #:allow-other-keys)
6811 ;; Retain the absolute file name of libarchive.so.
6812 (let ((libarchive (assoc-ref inputs "libarchive")))
6813 (substitute* "libarchive/ffi.py"
6814 (("find_library\\('archive'\\)")
6815 (string-append "'" libarchive
b41a05ce 6816 "/lib/libarchive.so'")))))))))
d96034ed 6817 (inputs
f3b98f4f 6818 `(("libarchive" ,libarchive)))
d96034ed
LC
6819 (home-page "https://github.com/Changaco/python-libarchive-c")
6820 (synopsis "Python interface to libarchive")
6821 (description
6822 "This package provides Python bindings to libarchive, a C library to
6823access possibly compressed archives in many different formats. It uses
6824Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6825 (license license:lgpl2.0+)))
d96034ed
LC
6826
6827(define-public python2-libarchive-c
6828 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6829
6830(define-public python-file
6831 (package
6832 (inherit file)
6833 (name "python-file")
7ffa5d4a
LF
6834 (source (origin
6835 (inherit (package-source file))
6836 ;; This patch should not be applied to python2-file.
6837 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
6838 (build-system python-build-system)
6839 (arguments
6840 '(#:tests? #f ;no tests
00bf74be 6841 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
6842 #:phases (modify-phases %standard-phases
6843 (add-before 'build 'change-directory
6844 (lambda _
6845 (chdir "python")
6846 #t))
6847 (add-before 'build 'set-library-file-name
6848 (lambda* (#:key inputs #:allow-other-keys)
6849 (let ((file (assoc-ref inputs "file")))
6850 (substitute* "magic.py"
6851 (("find_library\\('magic'\\)")
6852 (string-append "'" file "/lib/libmagic.so'")))
6853 #t))))))
6854 (inputs `(("file" ,file)))
6855 (self-native-input? #f)
daeeea71
CM
6856 (synopsis "Python bindings to the libmagic file type guesser. Note that
6857this module and the python-magic module both provide a \"magic.py\" file;
6858these two modules, which are different and were developed separately, both
f210e944 6859serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6860
6861(define-public python2-file
f210e944 6862 (package-with-python2 python-file))
85d4aeac
LC
6863
6864(define-public python-debian
6865 (package
6866 (name "python-debian")
6867 (version "0.1.23")
6868 (source
6869 (origin
6870 (method url-fetch)
6871 (uri (string-append
6872 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6873 version ".tar.gz"))
6874 (sha256
6875 (base32
6876 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6877 (build-system python-build-system)
f22efa01 6878 (propagated-inputs
85d4aeac 6879 `(("python-six" ,python-six)))
85d4aeac
LC
6880 (home-page "http://packages.debian.org/sid/python-debian")
6881 (synopsis "Debian package related modules")
6882 (description
5c7bdc9a
LC
6883 ;; XXX: Use @enumerate instead of @itemize to work around
6884 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6885 "This package provides Python modules that abstract many formats of
6886Debian-related files, such as:
6887
5c7bdc9a 6888@enumerate
85d4aeac
LC
6889@item Debtags information;
6890@item @file{debian/changelog} files;
6891@item packages files, pdiffs;
6892@item control files of single or multiple RFC822-style paragraphs---e.g.
6893 @file{debian/control}, @file{.changes}, @file{.dsc};
6894@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6895 contained files and meta-information.
5c7bdc9a 6896@end enumerate\n")
85d4aeac
LC
6897
6898 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6899 (license license:gpl3+)))
85d4aeac
LC
6900
6901(define-public python2-debian
6902 (package-with-python2 python-debian))
816a6538 6903
2d321bb2
RW
6904(define-public python-nbformat
6905 (package
6906 (name "python-nbformat")
6907 (version "4.1.0")
6908 (source
6909 (origin
6910 (method url-fetch)
6911 (uri (pypi-uri "nbformat" version))
6912 (sha256
6913 (base32
6914 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6915 (build-system python-build-system)
6916 (arguments `(#:tests? #f)) ; no test target
6917 (propagated-inputs
6918 `(("python-ipython-genutils" ,python-ipython-genutils)
6919 ("python-jsonschema" ,python-jsonschema)
6920 ("python-jupyter-core" ,python-jupyter-core)
6921 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
6922 (home-page "http://jupyter.org")
6923 (synopsis "Jupyter Notebook format")
6924 (description "This package provides the reference implementation of the
6925Jupyter Notebook format and Python APIs for working with notebooks.")
6926 (license license:bsd-3)))
6927
6928(define-public python2-nbformat
6929 (package-with-python2 python-nbformat))
6930
55436048
RW
6931(define-public python-bleach
6932 (package
6933 (name "python-bleach")
6934 (version "1.4.3")
6935 (source
6936 (origin
6937 (method url-fetch)
6938 (uri (pypi-uri "bleach" version))
6939 (sha256
6940 (base32
6941 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6942 (build-system python-build-system)
6943 (propagated-inputs
6944 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
6945 ("python-six" ,python-six)))
6946 (native-inputs
6947 `(("python-nose" ,python-nose)))
6948 (home-page "http://github.com/jsocol/bleach")
6949 (synopsis "Whitelist-based HTML-sanitizing tool")
6950 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6951 (license license:asl2.0)))
6952
6953(define-public python2-bleach
6954 (package-with-python2 python-bleach))
6955
60590a3a
RW
6956(define-public python-entrypoints
6957 (package
6958 (name "python-entrypoints")
6959 (version "0.2.2")
6960 (source
6961 (origin
6962 (method url-fetch)
6963 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6964 version ".tar.gz"))
6965 (file-name (string-append name "-" version ".tar.gz"))
6966 (sha256
6967 (base32
6968 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6969 (build-system python-build-system)
6970 ;; The package does not come with a setup.py file, so we have to generate
6971 ;; one ourselves.
6972 (arguments
6973 `(#:tests? #f
6974 #:phases
6975 (modify-phases %standard-phases
6976 (add-after 'unpack 'create-setup.py
6977 (lambda _
6978 (call-with-output-file "setup.py"
6979 (lambda (port)
6980 (format port "\
6981from setuptools import setup
6982setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6983" ,version))))))))
6984 (home-page "https://github.com/takluyver/entrypoints")
6985 (synopsis "Discover and load entry points from installed Python packages")
6986 (description "Entry points are a way for Python packages to advertise
6987objects with some common interface. The most common examples are
6988@code{console_scripts} entry points, which define shell commands by
6989identifying a Python function to run. The @code{entrypoints} module contains
6990functions to find and load entry points.")
6991 (license license:expat)))
6992
6993(define-public python2-entrypoints
6994 (package-with-python2 python-entrypoints))
6995
c60898a8
RW
6996(define-public python-nbconvert
6997 (package
6998 (name "python-nbconvert")
6999 (version "5.0.0b1")
7000 (source
7001 (origin
7002 (method url-fetch)
7003 (uri (pypi-uri "nbconvert" version))
7004 (sha256
7005 (base32
7006 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7007 (build-system python-build-system)
497355dc
MB
7008 (arguments
7009 `(;; The "bdist_egg" target is disabled by default, causing the installation
7010 ;; to fail.
7011 #:configure-flags (list "bdist_egg")
7012 ;; FIXME: 5 failures, 40 errors.
7013 #:tests? #f))
7014 ;; #:phases
7015 ;; (modify-phases %standard-phases
7016 ;; (replace 'check
7017 ;; (lambda _
7018 ;; (zero? (system* "py.test" "-v")))))
7019 (native-inputs
7020 `(("python-pytest" ,python-pytest)))
c60898a8
RW
7021 (propagated-inputs
7022 `(("python-bleach" ,python-bleach)
7023 ("python-entrypoints" ,python-entrypoints)
7024 ("python-jinja2" ,python-jinja2)
7025 ("python-jupyter-core" ,python-jupyter-core)
7026 ("python-mistune" ,python-mistune)
7027 ("python-nbformat" ,python-nbformat)
7028 ("python-pygments" ,python-pygments)
c60898a8
RW
7029 ("python-traitlets" ,python-traitlets)))
7030 (home-page "http://jupyter.org")
7031 (synopsis "Converting Jupyter Notebooks")
7032 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7033notebooks to various other formats via Jinja templates. It allows you to
7034convert an @code{.ipynb} notebook file into various static formats including:
7035
7036@enumerate
7037@item HTML
7038@item LaTeX
7039@item PDF
7040@item Reveal JS
7041@item Markdown (md)
7042@item ReStructured Text (rst)
7043@item executable script
7044@end enumerate\n")
7045 (license license:bsd-3)))
7046
7047(define-public python2-nbconvert
7048 (package-with-python2 python-nbconvert))
7049
a0d62280
RW
7050(define-public python-notebook
7051 (package
7052 (name "python-notebook")
7053 (version "4.2.3")
7054 (source (origin
7055 (method url-fetch)
7056 (uri (pypi-uri "notebook" version))
7057 (sha256
7058 (base32
7059 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7060 (build-system python-build-system)
7061 (arguments
7062 `(#:phases
7063 (modify-phases %standard-phases
7064 (replace 'check
7065 (lambda _
7066 ;; HOME must be set for tests
7067 (setenv "HOME" "/tmp")
7068 (zero? (system* "nosetests")))))))
7069 (propagated-inputs
7070 `(("python-jupyter-core" ,python-jupyter-core)
7071 ("python-nbformat" ,python-nbformat)
7072 ("python-nbconvert" ,python-nbconvert)
7073 ("python-ipython" ,python-ipython)))
7074 (native-inputs
7075 `(("python-nose" ,python-nose)
7076 ("python-sphinx" ,python-sphinx)
7077 ("python-requests" ,python-requests)))
7078 (home-page "http://jupyter.org/")
7079 (synopsis "Web-based notebook environment for interactive computing")
7080 (description
7081 "The Jupyter HTML notebook is a web-based notebook environment for
7082interactive computing.")
3a735ecf 7083 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
7084 (license license:bsd-3)))
7085
7086(define-public python2-notebook
3a735ecf
HG
7087 (let ((base (package-with-python2
7088 (strip-python2-variant python-notebook))))
7089 (package (inherit base)
7090 (native-inputs
7091 `(("python2-mock" ,python2-mock)
7092 ,@(package-native-inputs base)))
7093 (arguments
7094 (substitute-keyword-arguments (package-arguments base)
7095 ((#:phases phases)
7096 `(modify-phases ,phases
7097 (add-before 'check 'disable-test-case
7098 ;; The test requires network access to localhost. Curiously it
7099 ;; fails with Python 2 only. Simply make the test-case return
7100 ;; immediately.
7101 (lambda _
7102 (substitute*
7103 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7104 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7105
d55724ed
RW
7106(define-public python-widgetsnbextension
7107 (package
7108 (name "python-widgetsnbextension")
7109 (version "1.2.6")
7110 (source
7111 (origin
7112 (method url-fetch)
7113 (uri (pypi-uri "widgetsnbextension" version))
7114 (sha256
7115 (base32
7116 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7117 (build-system python-build-system)
7118 (propagated-inputs
7119 `(("python-notebook" ,python-notebook)))
7120 (native-inputs
58f5fae7
MB
7121 `(("python-certifi" ,python-certifi)
7122 ("python-nose" ,python-nose)))
d55724ed
RW
7123 (home-page "http://ipython.org")
7124 (synopsis "IPython HTML widgets for Jupyter")
7125 (description "This package provides interactive HTML widgets for Jupyter
7126notebooks.")
7127 (license license:bsd-3)))
7128
7129(define-public python2-widgetsnbextension
7130 (package-with-python2 python-widgetsnbextension))
7131
4fe2e344
RW
7132(define-public python-ipywidgets
7133 (package
7134 (name "python-ipywidgets")
7135 (version "5.2.2")
7136 (source
7137 (origin
7138 (method url-fetch)
7139 (uri (pypi-uri "ipywidgets" version))
7140 (sha256
7141 (base32
7142 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7143 (build-system python-build-system)
7144 ;; FIXME: it's not clear how to run the tests.
7145 (arguments `(#:tests? #f))
7146 (propagated-inputs
7147 `(("python-ipykernel" ,python-ipykernel)
7148 ("python-ipython" ,python-ipython)
4fe2e344
RW
7149 ("python-traitlets" ,python-traitlets)
7150 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7151 (home-page "http://ipython.org")
7152 (synopsis "IPython HTML widgets for Jupyter")
7153 (description "Ipywidgets are interactive HTML widgets for Jupyter
7154notebooks and the IPython kernel. Notebooks come alive when interactive
7155widgets are used. Users gain control of their data and can visualize changes
7156in the data.")
7157 (license license:bsd-3)))
7158
7159(define-public python2-ipywidgets
7160 (package-with-python2 python-ipywidgets))
7161
8ceebf8f
RW
7162(define-public python-jupyter-console
7163 (package
7164 (name "python-jupyter-console")
7165 (version "5.0.0")
7166 (source
7167 (origin
7168 (method url-fetch)
7169 (uri (pypi-uri "jupyter_console" version))
7170 (sha256
7171 (base32
7172 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7173 (build-system python-build-system)
7174 ;; FIXME: it's not clear how to run the tests.
7175 (arguments `(#:tests? #f))
7176 (propagated-inputs
7177 `(("python-ipykernel" ,python-ipykernel)
7178 ("python-ipython" ,python-ipython)
7179 ("python-jupyter-client" ,python-jupyter-client)
7180 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7181 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7182 (home-page "https://jupyter.org")
7183 (synopsis "Jupyter terminal console")
7184 (description "This package provides a terminal-based console frontend for
7185Jupyter kernels. It also allows for console-based interaction with non-Python
7186Jupyter kernels such as IJulia and IRKernel.")
7187 (license license:bsd-3)))
7188
7189(define-public python2-jupyter-console
7190 (package-with-python2 python-jupyter-console))
7191
c27ae827
RW
7192(define-public jupyter
7193 (package
7194 (name "jupyter")
7195 (version "1.0.0")
7196 (source
7197 (origin
7198 (method url-fetch)
7199 (uri (pypi-uri "jupyter" version))
7200 (sha256
7201 (base32
7202 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7203 (build-system python-build-system)
7204 ;; FIXME: it's not clear how to run the tests.
7205 (arguments `(#:tests? #f))
7206 (propagated-inputs
7207 `(("python-ipykernel" ,python-ipykernel)
7208 ("python-ipywidgets" ,python-ipywidgets)
7209 ("python-jupyter-console" ,python-jupyter-console)
7210 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7211 ("python-notebook" ,python-notebook)))
c27ae827
RW
7212 (home-page "http://jupyter.org")
7213 (synopsis "Web application for interactive documents")
7214 (description
7215 "The Jupyter Notebook is a web application that allows you to create and
7216share documents that contain live code, equations, visualizations and
7217explanatory text. Uses include: data cleaning and transformation, numerical
7218simulation, statistical modeling, machine learning and much more.")
7219 (license license:bsd-3)))
7220
816a6538
LC
7221(define-public python-chardet
7222 (package
7223 (name "python-chardet")
7224 (version "2.3.0")
7225 (source
7226 (origin
7227 (method url-fetch)
7228 (uri (string-append
7229 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7230 version
7231 ".tar.gz"))
7232 (sha256
7233 (base32
7234 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7235 (build-system python-build-system)
816a6538
LC
7236 (home-page "https://github.com/chardet/chardet")
7237 (synopsis "Universal encoding detector for Python 2 and 3")
7238 (description
7239 "This package provides @code{chardet}, a Python module that can
7240automatically detect a wide range of file encodings.")
3f641af0 7241 (license license:lgpl2.1+)))
816a6538
LC
7242
7243(define-public python2-chardet
7244 (package-with-python2 python-chardet))
2fc5f186 7245
1872f1bb
KM
7246(define-public python-docopt
7247 (package
7248 (name "python-docopt")
7249 (version "0.6.2")
7250 (source
7251 (origin
7252 (method url-fetch)
7253 ;; The release on PyPI does not include tests.
7254 (uri (string-append
7255 "https://github.com/docopt/docopt/archive/"
7256 version ".tar.gz"))
7257 (file-name (string-append name "-" version ".tar.gz"))
7258 (sha256
7259 (base32
7260 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7261 (build-system python-build-system)
7262 (native-inputs
f3b98f4f 7263 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7264 (arguments
7265 `(#:phases (alist-replace
7266 'check
7267 (lambda _ (zero? (system* "py.test")))
7268 %standard-phases)))
7269 (home-page "http://docopt.org")
7270 (synopsis "Command-line interface description language for Python")
7271 (description "This library allows the user to define a command-line
7272interface from a program's help message rather than specifying it
7273programatically with command-line parsers like @code{getopt} and
7274@code{argparse}.")
7275 (license license:expat)))
7276
7277(define-public python2-docopt
7278 (package-with-python2 python-docopt))
7279
2fc5f186
LF
7280(define-public python-zope-event
7281 (package
7282 (name "python-zope-event")
7283 (version "4.1.0")
7284 (source
7285 (origin
7286 (method url-fetch)
7287 (uri (string-append "https://pypi.python.org/packages/source/z"
7288 "/zope.event/zope.event-" version ".tar.gz"))
7289 (sha256
7290 (base32
7291 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7292 (build-system python-build-system)
2fc5f186
LF
7293 (home-page "http://pypi.python.org/pypi/zope.event")
7294 (synopsis "Event publishing system for Python")
7295 (description "Zope.event provides an event publishing API, intended for
7296use by applications which are unaware of any subscribers to their events. It
7297is a simple event-dispatching system on which more sophisticated event
7298dispatching systems can be built.")
3f641af0 7299 (license license:zpl2.1)))
2fc5f186
LF
7300
7301(define-public python2-zope-event
7302 (package-with-python2 python-zope-event))
97abe268
LF
7303
7304(define-public python-zope-interface
7305 (package
7306 (name "python-zope-interface")
7307 (version "4.1.3")
7308 (source
7309 (origin
7310 (method url-fetch)
7311 (uri (string-append "https://pypi.python.org/packages/source/z"
7312 "/zope.interface/zope.interface-" version ".tar.gz"))
7313 (sha256
7314 (base32
7315 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7316 (build-system python-build-system)
38d480a8 7317 (native-inputs
97abe268
LF
7318 `(("python-zope-event" ,python-zope-event)))
7319 (home-page "https://github.com/zopefoundation/zope.interface")
7320 (synopsis "Python implementation of the \"design by contract\"
7321methodology")
7322 (description "Zope.interface provides an implementation of \"object
7323interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7324conforming to a given API or contract.")
3f641af0 7325 (license license:zpl2.1)))
97abe268
LF
7326
7327(define-public python2-zope-interface
7328 (package-with-python2 python-zope-interface))
81f2373c
LF
7329
7330(define-public python-zope-exceptions
7331 (package
7332 (name "python-zope-exceptions")
7333 (version "4.0.8")
7334 (source
7335 (origin
7336 (method url-fetch)
7337 (uri (string-append "https://pypi.python.org/packages/source/z"
7338 "/zope.exceptions/zope.exceptions-"
7339 version ".tar.gz"))
7340 (sha256
7341 (base32
7342 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7343 (build-system python-build-system)
7344 (arguments
7345 '(#:tests? #f)) ; circular dependency with zope.testrunner
7346 (propagated-inputs
7347 `(("python-zope-interface" ,python-zope-interface)))
7348 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7349 (synopsis "Zope exceptions")
7350 (description "Zope.exceptions provides general-purpose exception types
7351that have uses outside of the Zope framework.")
3f641af0 7352 (license license:zpl2.1)))
81f2373c
LF
7353
7354(define-public python2-zope-exceptions
7355 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7356
7357(define-public python-zope-testing
7358 (package
7359 (name "python-zope-testing")
7360 (version "4.5.0")
7361 (source
7362 (origin
7363 (method url-fetch)
7364 (uri (string-append "https://pypi.python.org/packages/source/z"
7365 "/zope.testing/zope.testing-" version ".tar.gz"))
7366 (sha256
7367 (base32
b02f7a21
HG
7368 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7369 (modules '((guix build utils)))
7370 (snippet
7371 '(begin
7372 ;; Remove pre-compiled .pyc files backup files from source.
7373 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7374 #t))))
900e3c0e
LF
7375 (build-system python-build-system)
7376 (native-inputs
7377 `(("python-zope-exceptions" ,python-zope-exceptions)))
7378 (propagated-inputs
7379 `(("python-zope-interface" ,python-zope-interface)))
7380 (home-page "http://pypi.python.org/pypi/zope.testing")
7381 (synopsis "Zope testing helpers")
7382 (description "Zope.testing provides a number of testing utilities for HTML
7383forms, HTTP servers, regular expressions, and more.")
3f641af0 7384 (license license:zpl2.1)))
900e3c0e
LF
7385
7386(define-public python2-zope-testing
7387 (package-with-python2 python-zope-testing))
01614c4f
LF
7388
7389(define-public python-zope-testrunner
7390 (package
7391 (name "python-zope-testrunner")
7392 (version "4.4.9")
7393 (source
7394 (origin
7395 (method url-fetch)
7396 (uri (string-append "https://pypi.python.org/packages/source/z"
7397 "/zope.testrunner/zope.testrunner-"
7398 version ".zip"))
7399 (sha256
7400 (base32
7401 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7402 (build-system python-build-system)
385871e5
MB
7403 (arguments
7404 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
7405 (native-inputs
7406 `(("python-six" ,python-six)
e408ffc3 7407 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
7408 ("python-zope-exceptions" ,python-zope-exceptions)
7409 ("python-zope-testing" ,python-zope-testing)
7410 ("unzip" ,unzip)))
7411 (propagated-inputs
7412 `(("python-zope-interface" ,python-zope-interface)))
7413 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7414 (synopsis "Zope testrunner script")
7415 (description "Zope.testrunner provides a script for running Python
7416tests.")
3f641af0 7417 (license license:zpl2.1)))
01614c4f
LF
7418
7419(define-public python2-zope-testrunner
7420 (let ((base (package-with-python2 python-zope-testrunner)))
7421 (package
7422 (inherit base)
7423 (native-inputs
7424 (append (package-native-inputs base)
7425 `(("python2-subunit" ,python2-subunit)
7426 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7427
7428(define-public python-zope-i18nmessageid
7429 (package
7430 (name "python-zope-i18nmessageid")
7431 (version "4.0.3")
7432 (source
7433 (origin
7434 (method url-fetch)
7435 (uri (string-append
7436 "https://pypi.python.org/packages/source/z"
7437 "/zope.i18nmessageid/zope.i18nmessageid-"
7438 version ".tar.gz"))
7439 (sha256
7440 (base32
7441 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7442 (build-system python-build-system)
6a5c710c
LF
7443 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7444 (synopsis "Message identifiers for internationalization")
7445 (description "Zope.i18nmessageid provides facilities for declaring
7446internationalized messages within program source text.")
3f641af0 7447 (license license:zpl2.1)))
6a5c710c
LF
7448
7449(define-public python2-zope-i18nmessageid
7450 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7451
7452(define-public python-zope-schema
7453 (package
7454 (name "python-zope-schema")
7455 (version "4.4.2")
7456 (source
7457 (origin
7458 (method url-fetch)
7459 (uri (string-append "https://pypi.python.org/packages/source/z"
7460 "/zope.schema/zope.schema-" version ".tar.gz"))
7461 (sha256
7462 (base32
7463 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7464 (build-system python-build-system)
22dba2ef
MB
7465 (arguments
7466 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
7467 (propagated-inputs
7468 `(("python-zope-event" ,python-zope-event)
2b9e4bea 7469 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
7470 ("python-zope-interface" ,python-zope-interface)))
7471 (native-inputs
47f77210
HG
7472 `(("python-zope-testing" ,python-zope-testing)
7473 ("python-coverage" ,python-coverage)
7474 ("python-nose" ,python-nose)))
71fb09f3
LF
7475 (home-page "http://pypi.python.org/pypi/zope.schema")
7476 (synopsis "Zope data schemas")
7477 (description "Zope.scheme provides extensions to zope.interface for
7478defining data schemas.")
3f641af0 7479 (license license:zpl2.1)))
71fb09f3
LF
7480
7481(define-public python2-zope-schema
7482 (package-with-python2 python-zope-schema))
fbac9b17
LF
7483
7484(define-public python-zope-configuration
7485 (package
7486 (name "python-zope-configuration")
7487 (version "4.0.3")
7488 (source (origin
7489 (method url-fetch)
7490 (uri (string-append "https://pypi.python.org/packages/source/z"
7491 "/zope.configuration/zope.configuration-"
7492 version ".tar.gz"))
7493 (sha256
7494 (base32
7495 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7496 (build-system python-build-system)
7e8b1bfa
MB
7497 (arguments
7498 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
7499 (propagated-inputs
7500 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7501 ("python-zope-schema" ,python-zope-schema)))
7502 (home-page "http://pypi.python.org/pypi/zope.configuration")
7503 (synopsis "Zope Configuration Markup Language")
7504 (description "Zope.configuration implements ZCML, the Zope Configuration
7505Markup Language.")
3f641af0 7506 (license license:zpl2.1)))
fbac9b17
LF
7507
7508(define-public python2-zope-configuration
7509 (package-with-python2 python-zope-configuration))
2ad52086
LF
7510
7511(define-public python-zope-proxy
7512 (package
7513 (name "python-zope-proxy")
7514 (version "4.1.6")
7515 (source
7516 (origin
7517 (method url-fetch)
7518 (uri (string-append "https://pypi.python.org/packages/source/z"
7519 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7520 (sha256
7521 (base32
7522 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7523 (build-system python-build-system)
66b3aadb
MB
7524 (arguments
7525 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
7526 (propagated-inputs
7527 `(("python-zope-interface" ,python-zope-interface)))
7528 (home-page "http://pypi.python.org/pypi/zope.proxy")
7529 (synopsis "Generic, transparent proxies")
7530 (description "Zope.proxy provides generic, transparent proxies for Python.
7531Proxies are special objects which serve as mostly-transparent wrappers around
7532another object, intervening in the apparent behavior of the wrapped object
7533only when necessary to apply the policy (e.g., access checking, location
7534brokering, etc.) for which the proxy is responsible.")
3f641af0 7535 (license license:zpl2.1)))
2ad52086
LF
7536
7537(define-public python2-zope-proxy
7538 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7539
7540(define-public python-zope-location
7541 (package
7542 (name "python-zope-location")
7543 (version "4.0.3")
7544 (source
7545 (origin
7546 (method url-fetch)
7547 (uri (string-append "https://pypi.python.org/packages/source/z"
7548 "/zope.location/zope.location-" version ".tar.gz"))
7549 (sha256
7550 (base32
7551 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7552 (build-system python-build-system)
40bb8e07
MB
7553 (arguments
7554 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 7555 (propagated-inputs
f404b5ea
LF
7556 `(("python-zope-proxy" ,python-zope-proxy)
7557 ("python-zope-schema" ,python-zope-schema)))
7558 (home-page "http://pypi.python.org/pypi/zope.location/")
7559 (synopsis "Zope location library")
7560 (description "Zope.location implements the concept of \"locations\" in
7561Zope3, which are are special objects that have a structural location.")
3f641af0 7562 (license license:zpl2.1)))
f404b5ea
LF
7563
7564(define-public python2-zope-location
7565 (package-with-python2 python-zope-location))
d4b77f36
LF
7566
7567(define-public python-zope-security
7568 (package
7569 (name "python-zope-security")
7570 (version "4.0.3")
7571 (source
7572 (origin
7573 (method url-fetch)
7574 (uri (string-append "https://pypi.python.org/packages/source/z"
7575 "/zope.security/zope.security-" version ".tar.gz"))
7576 (sha256
7577 (base32
7578 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7579 (build-system python-build-system)
a74f9b12
MB
7580 (arguments
7581 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
7582 (propagated-inputs
7583 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 7584 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 7585 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
7586 (native-inputs
7587 `(("python-six" ,python-six)
7588 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
7589 ("python-zope-configuration" ,python-zope-configuration)
7590 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
7591 ("python-zope-testrunner" ,python-zope-testrunner)
7592 ("python-zope-testing" ,python-zope-testing)))
7593 (home-page "http://pypi.python.org/pypi/zope.security")
7594 (synopsis "Zope security framework")
7595 (description "Zope.security provides a generic mechanism to implement
7596security policies on Python objects.")
3f641af0 7597 (license license:zpl2.1)))
d4b77f36
LF
7598
7599(define-public python2-zope-security
04417662
EF
7600 (let ((zope-security (package-with-python2 python-zope-security)))
7601 (package (inherit zope-security)
7602 (propagated-inputs
7603 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7604 ,@(alist-delete
7605 "python-zope-testrunner"
7606 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7607
7608(define-public python-zope-component
7609 (package
7610 (name "python-zope-component")
7611 (version "4.2.2")
7612 (source
7613 (origin
7614 (method url-fetch)
7615 (uri (string-append "https://pypi.python.org/packages/source/z"
7616 "/zope.component/zope.component-" version ".tar.gz"))
7617 (sha256
7618 (base32
7619 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7620 (build-system python-build-system)
7621 (arguments
7622 ;; Skip tests due to circular dependency with python-zope-security.
7623 '(#:tests? #f))
7624 (native-inputs
7625 `(("python-zope-testing" ,python-zope-testing)))
7626 (propagated-inputs
7627 `(("python-zope-event" ,python-zope-event)
7628 ("python-zope-interface" ,python-zope-interface)
7629 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7630 ("python-zope-configuration" ,python-zope-configuration)))
7631 (home-page "https://github.com/zopefoundation/zope.component")
7632 (synopsis "Zope Component Architecture")
7633 (description "Zope.component represents the core of the Zope Component
7634Architecture. Together with the zope.interface package, it provides
7635facilities for defining, registering and looking up components.")
3f641af0 7636 (license license:zpl2.1)))
a6b61b27
LF
7637
7638(define-public python2-zope-component
7639 (package-with-python2 python-zope-component))
3859ac12 7640
1ae44b80 7641(define-public python-pythondialog
b5f218be 7642 (package
1ae44b80 7643 (name "python-pythondialog")
42c4b246 7644 (version "3.4.0")
b5f218be
LF
7645 (source
7646 (origin
7647 (method url-fetch)
1ae44b80 7648 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7649 (sha256
7650 (base32
1ae44b80 7651 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7652 (build-system python-build-system)
7653 (arguments
7654 `(#:phases
7655 (modify-phases %standard-phases
7656 (add-after 'unpack 'patch-path
7657 (lambda* (#:key inputs #:allow-other-keys)
7658 (let* ((dialog (assoc-ref inputs "dialog")))
7659 ;; Since this library really wants to grovel the search path, we
7660 ;; must hardcode dialog's store path into it.
7661 (substitute* "dialog.py"
7662 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7663 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7664 #t))))
b5f218be
LF
7665 #:tests? #f)) ; no test suite
7666 (propagated-inputs
7667 `(("dialog" ,dialog)))
7668 (home-page "http://pythondialog.sourceforge.net/")
7669 (synopsis "Python interface to the UNIX dialog utility")
7670 (description "A Python wrapper for the dialog utility. Its purpose is to
7671provide an easy to use, pythonic and comprehensive Python interface to dialog.
7672This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7673 (license license:lgpl2.1)
1ae44b80
LF
7674 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7675
7676(define-public python2-pythondialog
7677 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7678 (package
7679 (inherit base)
7680 (version (package-version python-pythondialog))
7681 (source (origin
7682 (method url-fetch)
7683 (uri (pypi-uri "python2-pythondialog" version))
7684 (sha256
7685 (base32
7686 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7687
3859ac12
LF
7688(define-public python-pyrfc3339
7689 (package
7690 (name "python-pyrfc3339")
d9aa097b 7691 (version "1.0")
3859ac12
LF
7692 (source
7693 (origin
7694 (method url-fetch)
d9aa097b 7695 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7696 (sha256
7697 (base32
d9aa097b 7698 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7699 (build-system python-build-system)
7700 (propagated-inputs
7701 `(("python-pytz" ,python-pytz)))
7702 (native-inputs
f3b98f4f 7703 `(("python-nose" ,python-nose)))
3859ac12
LF
7704 (home-page "https://github.com/kurtraschke/pyRFC3339")
7705 (synopsis "Python timestamp library")
7706 (description "Python library for generating and parsing RFC 3339-compliant
7707timestamps.")
7708 (license license:expat)))
7709
7710(define-public python2-pyrfc3339
7711 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7712
7713(define-public python-werkzeug
7714 (package
7715 (name "python-werkzeug")
0580e383 7716 (version "0.11.11")
5eea2005
LF
7717 (source
7718 (origin
7719 (method url-fetch)
4b47cbfa 7720 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7721 (sha256
7722 (base32
0580e383 7723 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7724 (build-system python-build-system)
7725 (native-inputs
7726 `(("python-pytest" ,python-pytest)))
7727 (home-page "http://werkzeug.pocoo.org/")
7728 (synopsis "Utilities for WSGI applications")
7729 (description "One of the most advanced WSGI utility modules. It includes a
7730powerful debugger, full-featured request and response objects, HTTP utilities to
7731handle entity tags, cache control headers, HTTP dates, cookie handling, file
7732uploads, a powerful URL routing system and a bunch of community-contributed
7733addon modules.")
3f641af0 7734 (license license:x11)))
5eea2005
LF
7735
7736(define-public python2-werkzeug
7737 (package-with-python2 python-werkzeug))
99fffa8a
LF
7738
7739(define-public python-configobj
7740 (package
7741 (name "python-configobj")
7742 (version "5.0.6")
7743 (source (origin
7744 (method url-fetch)
7745 (uri (string-append
7746 "https://pypi.python.org/packages/source/c/configobj/"
7747 "configobj-" version ".tar.gz"))
7748 (sha256
7749 (base32
7750 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7751 ;; Patch setup.py so it looks for python-setuptools, which is
7752 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7753 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 7754 (build-system python-build-system)
861f70c9 7755 (propagated-inputs
f3b98f4f 7756 `(("python-six" ,python-six)))
99fffa8a
LF
7757 (synopsis "Config file reading, writing and validation")
7758 (description "ConfigObj is a simple but powerful config file reader and
7759writer: an ini file round tripper. Its main feature is that it is very easy to
7760use, with a straightforward programmer’s interface and a simple syntax for
7761config files.")
7762 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7763 (license license:bsd-3)))
99fffa8a
LF
7764
7765(define-public python2-configobj
7766 (package-with-python2 python-configobj))
79e8a291
LF
7767
7768(define-public python-configargparse
7769 (package
7770 (name "python-configargparse")
7771 (version "0.10.0")
7772 (source (origin
7773 (method url-fetch)
7774 (uri (string-append
7775 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7776 "ConfigArgParse-" version ".tar.gz"))
7777 (sha256
7778 (base32
7779 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7780 (build-system python-build-system)
7781 (arguments
7782 ;; FIXME: Bug in test suite filed upstream:
7783 ;; https://github.com/bw2/ConfigArgParse/issues/32
7784 '(#:tests? #f))
7785 (synopsis "Replacement for argparse")
7786 (description "A drop-in replacement for argparse that allows options to also
7787be set via config files and/or environment variables.")
7788 (home-page "https://github.com/bw2/ConfigArgParse")
7789 (license license:expat)))
7790
7791(define-public python2-configargparse
7792 (package-with-python2 python-configargparse))
ab41f979
LF
7793
7794(define-public python-ndg-httpsclient
7795 (package
7796 (name "python-ndg-httpsclient")
7797 (version "0.4.0")
7798 (source (origin
7799 (method url-fetch)
7800 (uri (string-append
7801 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7802 "ndg_httpsclient-" version ".tar.gz"))
7803 (sha256
7804 (base32
7805 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7806 (build-system python-build-system)
a39cc016
LF
7807 (arguments
7808 '(;; The tests appear to require networking.
7809 #:tests? #f))
ab41f979
LF
7810 (propagated-inputs
7811 `(("python-pyopenssl" ,python-pyopenssl)))
7812 (synopsis "HTTPS support for Python's httplib and urllib2")
7813 (description "This is a HTTPS client implementation for httplib and urllib2
7814based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7815over the default provided with Python and importantly enables full verification
7816of the SSL peer.")
7817 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7818 (license license:bsd-3)))
ab41f979
LF
7819
7820;; python2-openssl requires special care, so package-with-python2 is
7821;; insufficient.
7822(define-public python2-ndg-httpsclient
7823 (package (inherit python-ndg-httpsclient)
7824 (name "python2-ndg-httpsclient")
7825 (arguments `(#:python ,python-2))
7826 (propagated-inputs
7827 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7828
7829(define-public python-contextlib2
7830 (package
7831 (name "python-contextlib2")
7832 (version "0.4.0")
7833 (source
7834 (origin
7835 (method url-fetch)
7836 (uri (pypi-uri "contextlib2" version))
7837 (sha256
7838 (base32
7839 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7840 (build-system python-build-system)
7841 (arguments
7842 `(#:phases
7843 (modify-phases %standard-phases
7844 (replace 'check
7845 (lambda _ (zero?
7846 (system*
b3546174 7847 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7848 (home-page "http://contextlib2.readthedocs.org/")
7849 (synopsis "Tools for decorators and context managers")
7850 (description "This module is primarily a backport of the Python
78513.2 contextlib to earlier Python versions. Like contextlib, it
7852provides utilities for common tasks involving decorators and context
7853managers. It also contains additional features that are not part of
7854the standard library.")
3f641af0 7855 (license license:psfl)))
03f964a5
CM
7856
7857(define-public python2-contextlib2
7858 (package-with-python2 python-contextlib2))
210bf497
DT
7859
7860(define-public python-texttable
7861 (package
7862 (name "python-texttable")
7863 (version "0.8.4")
7864 (source
7865 (origin
7866 (method url-fetch)
7867 (uri (pypi-uri "texttable" version))
7868 (sha256
7869 (base32
7870 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7871 (build-system python-build-system)
7872 (arguments '(#:tests? #f)) ; no tests
7873 (home-page "https://github.com/foutaise/texttable/")
7874 (synopsis "Python module for creating simple ASCII tables")
7875 (description "Texttable is a Python module for creating simple ASCII
7876tables.")
3f641af0 7877 (license license:lgpl2.1+)))
210bf497
DT
7878
7879(define-public python2-texttable
7880 (package-with-python2 python-texttable))
67c52bb3
DT
7881
7882(define-public python-websocket-client
7883 (package
7884 (name "python-websocket-client")
6b810897 7885 (version "0.37.0")
67c52bb3
DT
7886 (source
7887 (origin
7888 (method url-fetch)
6b810897 7889 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7890 (sha256
7891 (base32
6b810897 7892 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 7893 (build-system python-build-system)
a5333f7c
HG
7894 (propagated-inputs
7895 `(("python-six" ,python-six)))
67c52bb3
DT
7896 (home-page "https://github.com/liris/websocket-client")
7897 (synopsis "WebSocket client for Python")
7898 (description "The Websocket-client module provides the low level APIs for
7899WebSocket usage in Python programs.")
3f641af0 7900 (license license:lgpl2.1+)))
67c52bb3
DT
7901
7902(define-public python2-websocket-client
7903 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7904
7905(define-public python-atomicwrites
7906 (package
7907 (name "python-atomicwrites")
4e92d76a 7908 (version "1.1.0")
5c6eea2a
LF
7909 (source (origin
7910 (method url-fetch)
7911 (uri (pypi-uri "atomicwrites" version))
7912 (sha256
7913 (base32
4e92d76a 7914 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7915 (build-system python-build-system)
7916 (synopsis "Atomic file writes in Python")
7917 (description "Library for atomic file writes using platform dependent tools
8f65585b 7918for atomic file system operations.")
5c6eea2a 7919 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 7920 (license license:expat)))
9bb6d184
LF
7921
7922(define-public python2-atomicwrites
f210e944 7923 (package-with-python2 python-atomicwrites))
561bb3cb
LF
7924
7925(define-public python-requests-toolbelt
7926 (package
7927 (name "python-requests-toolbelt")
c02af1c8 7928 (version "0.6.2")
561bb3cb
LF
7929 (source (origin
7930 (method url-fetch)
c02af1c8
LF
7931 (uri (string-append
7932 "https://pypi.python.org/packages/"
7933 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7934 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7935 (sha256
7936 (base32
c02af1c8 7937 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 7938 (build-system python-build-system)
759aadd4
LF
7939 (native-inputs
7940 `(("python-betamax" ,python-betamax)
7941 ("python-mock" ,python-mock)
7942 ("python-pytest" ,python-pytest)))
561bb3cb
LF
7943 (propagated-inputs
7944 `(("python-requests" ,python-requests)))
7945 (synopsis "Extensions to python-requests")
7946 (description "This is a toolbelt of useful classes and functions to be used
7947with python-requests.")
7948 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7949 (license license:asl2.0)))
d1deb90b
LF
7950
7951(define-public python-click-threading
7952 (package
7953 (name "python-click-threading")
3d2e0dbc 7954 (version "0.2.0")
d1deb90b
LF
7955 (source (origin
7956 (method url-fetch)
3d2e0dbc
LF
7957 (uri (string-append
7958 "https://pypi.python.org/packages/"
7959 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7960 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7961 (sha256
7962 (base32
3d2e0dbc 7963 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7964 (build-system python-build-system)
7965 (propagated-inputs
7966 `(("python-click" ,python-click)))
7967 (synopsis "Utilities for multithreading in Click")
7968 (description "This package provides utilities for multithreading in Click
7969applications.")
7970 (home-page "https://github.com/click-contrib/click-threading")
7971 (license license:expat)))
7b17cab9
LF
7972
7973(define-public python-click-log
7974 (package
7975 (name "python-click-log")
a9da8fec 7976 (version "0.1.3")
7b17cab9
LF
7977 (source (origin
7978 (method url-fetch)
7979 (uri (pypi-uri "click-log" version))
7980 (sha256
7981 (base32
a9da8fec 7982 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7983 (build-system python-build-system)
7984 (propagated-inputs
7985 `(("python-click" ,python-click)))
7986 (synopsis "Logging for click applications")
7987 (description "This package provides a Python library for logging Click
7988applications.")
7989 (home-page "https://github.com/click-contrib/click-log")
7990 (license license:expat)))
7b3a4ee4
LF
7991
7992(define-public python-apipkg
7993 (package
7994 (name "python-apipkg")
7995 (version "1.4")
7996 (source (origin
7997 (method url-fetch)
7998 (uri (pypi-uri "apipkg" version))
7999 (sha256
8000 (base32
8001 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8002 (build-system python-build-system)
328bb95d 8003 (native-inputs
7b3a4ee4
LF
8004 `(("python-pytest" ,python-pytest)))
8005 (synopsis "Namespace control and lazy-import mechanism")
8006 (description "With apipkg you can control the exported namespace of a Python
8007package and greatly reduce the number of imports for your users. It is a small
8008pure Python module that works on virtually all Python versions.")
8009 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 8010 (license license:expat)))
e08739c3
CAW
8011
8012(define-public python2-apipkg
f210e944 8013 (package-with-python2 python-apipkg))
848964fe
LF
8014
8015(define-public python-execnet
8016 (package
8017 (name "python-execnet")
8018 (version "1.4.1")
8019 (source (origin
8020 (method url-fetch)
8021 (uri (pypi-uri "execnet" version))
8022 (sha256
8023 (base32
8024 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8025 (build-system python-build-system)
ca0eee9d
LF
8026 (arguments
8027 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8028 ;; The two test failures are caused by the lack of an `ssh` executable.
8029 ;; The test suite can be run with pytest after the 'install' phase.
8030 #:tests? #f))
848964fe 8031 (native-inputs
ca0eee9d
LF
8032 `(("python-pytest" ,python-pytest)
8033 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 8034 (propagated-inputs
848964fe
LF
8035 `(("python-apipkg" ,python-apipkg)))
8036 (synopsis "Rapid multi-Python deployment")
8037 (description "Execnet provides a share-nothing model with
8038channel-send/receive communication for distributing execution across many
8039Python interpreters across version, platform and network barriers. It has a
8040minimal and fast API targetting the following uses:
8041@enumerate
8042@item distribute tasks to (many) local or remote CPUs
8043@item write and deploy hybrid multi-process applications
8044@item write scripts to administer multiple environments
8045@end enumerate")
8046 (home-page "http://codespeak.net/execnet/")
f210e944 8047 (license license:expat)))
16c84f90
CAW
8048
8049(define-public python2-execnet
f210e944 8050 (package-with-python2 python-execnet))
6720dbb4
LF
8051
8052;;; The software provided by this package was integrated into pytest 2.8.
8053(define-public python-pytest-cache
8054 (package
8055 (name "python-pytest-cache")
8056 (version "1.0")
8057 (source (origin
8058 (method url-fetch)
8059 (uri (pypi-uri "pytest-cache" version))
8060 (sha256
8061 (base32
8062 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8063 (build-system python-build-system)
f22efa01 8064 (propagated-inputs
630d938f
EF
8065 `(("python-apipkg" ,python-apipkg)
8066 ("python-execnet" ,python-execnet)
8067 ("python-py" ,python-py)
8068 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8069 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8070 (description "The pytest-cache plugin provides tools to rerun failures from
8071the last py.test invocation.")
8072 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 8073 (license license:expat)))
0adc21c2
EF
8074
8075(define-public python2-pytest-cache
f210e944 8076 (package-with-python2 python-pytest-cache))
d7e729fe
LF
8077
8078(define-public python-pytest-localserver
8079 (package
8080 (name "python-pytest-localserver")
29f20168 8081 (version "0.3.5")
d7e729fe
LF
8082 (source (origin
8083 (method url-fetch)
29f20168 8084 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8085 (sha256
8086 (base32
29f20168 8087 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8088 (build-system python-build-system)
8089 (arguments
8090 `(#:phases (modify-phases %standard-phases
8091 (replace 'check
8092 (lambda _
8093 (zero? (system* "py.test" "--genscript=runtests.py"))
8094 (zero? (system* "py.test")))))))
8095 (native-inputs
d7e729fe
LF
8096 `(("python-pytest" ,python-pytest)
8097 ("python-requests" ,python-requests)
9ba40f05 8098 ("python-six" ,python-six)))
f22efa01 8099 (propagated-inputs
9ba40f05 8100 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8101 (synopsis "Py.test plugin to test server connections locally")
8102 (description "Pytest-localserver is a plugin for the pytest testing
8103framework which enables you to test server connections locally.")
8104 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8105 (license license:expat)))
28cecbb7
LF
8106
8107(define-public python-wsgi-intercept
8108 (package
8109 (name "python-wsgi-intercept")
909fbd2b 8110 (version "1.2.2")
28cecbb7
LF
8111 (source (origin
8112 (method url-fetch)
909fbd2b
LF
8113 (uri (string-append
8114 "https://pypi.python.org/packages/"
8115 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8116 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8117 (sha256
8118 (base32
909fbd2b 8119 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8120 (build-system python-build-system)
b9fc496f
HG
8121 (propagated-inputs
8122 `(("python-six" ,python-six)))
28cecbb7 8123 (native-inputs
9d813ec1 8124 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8125 ("python-httplib2" ,python-httplib2)
8126 ("python-requests" ,python-requests)
8757f050 8127 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8128 (synopsis "Puts a WSGI application in place of a real URI for testing")
8129 (description "Wsgi_intercept installs a WSGI application in place of a real
8130URI for testing. Testing a WSGI application normally involves starting a
8131server at a local host and port, then pointing your test code to that address.
8132Instead, this library lets you intercept calls to any specific host/port
8133combination and redirect them into a WSGI application importable by your test
8134program. Thus, you can avoid spawning multiple processes or threads to test
8135your Web app.")
8136 (home-page "https://github.com/cdent/wsgi-intercept")
8137 (license license:expat)))
89b8a551
LF
8138
8139(define-public python-pytest-xprocess
8140 (package
8141 (name "python-pytest-xprocess")
8142 (version "0.9.1")
8143 (source (origin
8144 (method url-fetch)
8145 (uri (pypi-uri "pytest-xprocess" version))
8146 (sha256
8147 (base32
8148 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8149 (build-system python-build-system)
8150 (propagated-inputs
8151 `(("python-pytest" ,python-pytest)
8152 ("python-pytest-cache" ,python-pytest-cache)
8153 ("python-psutil" ,python-psutil)))
8154 (synopsis "Pytest plugin to manage external processes across test runs")
8155 (description "Pytest-xprocess is an experimental py.test plugin for managing
8156processes across test runs.")
8157 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8158 (license license:expat)))
5c299bf0
LF
8159
8160(define-public python-icalendar
8161 (package
8162 (name "python-icalendar")
25291aca 8163 (version "3.11")
5c299bf0
LF
8164 (source (origin
8165 (method url-fetch)
8166 (uri (pypi-uri "icalendar" version))
8167 (sha256
8168 (base32
25291aca 8169 "01v2f3swd5s72x65cdihw83dx1z799b4i49a6ncg7vqmcm20wapd"))))
5c299bf0
LF
8170 (build-system python-build-system)
8171 (propagated-inputs
22d7360b 8172 `(("python-dateutil" ,python-dateutil)
5c299bf0
LF
8173 ("python-pytz" ,python-pytz)))
8174 (synopsis "Python library for parsing iCalendar files")
8175 (description "The icalendar package is a parser/generator of iCalendar
8176files for use with Python.")
8177 (home-page "https://github.com/collective/icalendar")
3f641af0 8178 (license license:bsd-2)))
6bbbb53e
LF
8179
8180(define-public python-sphinxcontrib-newsfeed
8181 (package
8182 (name "python-sphinxcontrib-newsfeed")
8183 (version "0.1.4")
8184 (source (origin
8185 (method url-fetch)
8186 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8187 (sha256
8188 (base32
8189 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8190 (build-system python-build-system)
8191 (propagated-inputs
251ed7f2 8192 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8193 (synopsis "News Feed extension for Sphinx")
8194 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8195Blog, News or Announcements section to a Sphinx website.")
8196 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8197 (license license:bsd-2)))
2216e15c
SB
8198
8199(define-public python-args
8200 (package
8201 (name "python-args")
8202 (version "0.1.0")
8203 (source (origin
8204 (method url-fetch)
8205 (uri (pypi-uri "args" version))
8206 (sha256
8207 (base32
8208 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8209 (build-system python-build-system)
2216e15c
SB
8210 (home-page "https://github.com/kennethreitz/args")
8211 (synopsis "Command-line argument parser")
8212 (description
8213 "This library provides a Python module to parse command-line arguments.")
3f641af0 8214 (license license:bsd-3)))
2216e15c
SB
8215
8216(define-public python2-args
8217 (package-with-python2 python-args))
c06a3de9
SB
8218
8219(define-public python-clint
8220 (package
8221 (name "python-clint")
8222 (version "0.5.1")
8223 (source (origin
8224 (method url-fetch)
8225 (uri (pypi-uri "clint" version))
8226 (sha256
8227 (base32
8228 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8229 (build-system python-build-system)
6145b604
MB
8230 (arguments
8231 '(#:phases
8232 (modify-phases %standard-phases
8233 (replace 'check
8234 (lambda _
8235 (zero? (system* "py.test" "-v")))))))
8236 (native-inputs
8237 `(("python-pytest" ,python-pytest)))
f22efa01 8238 (propagated-inputs
f3b98f4f 8239 `(("python-args" ,python-args)))
c06a3de9
SB
8240 (home-page "https://github.com/kennethreitz/clint")
8241 (synopsis "Command-line interface tools")
8242 (description
8243 "Clint is a Python module filled with a set of tools for developing
8244command-line applications, including tools for colored and indented
8245output, progress bar display, and pipes.")
3f641af0 8246 (license license:isc)))
c06a3de9
SB
8247
8248(define-public python2-clint
8249 (package-with-python2 python-clint))
4ecdeef8
SB
8250
8251(define-public python-astor
8252 (package
8253 (name "python-astor")
8254 (version "0.5")
8255 (source (origin
8256 (method url-fetch)
8257 (uri (pypi-uri "astor" version))
8258 (sha256
8259 (base32
8260 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8261 (build-system python-build-system)
4ecdeef8
SB
8262 (home-page "https://github.com/berkerpeksag/astor")
8263 (synopsis "Read and write Python ASTs")
8264 (description
8265 "Astor is designed to allow easy manipulation of Python source via the
8266Abstract Syntax Tree.")
3f641af0 8267 (license license:bsd-3)))
4ecdeef8
SB
8268
8269(define-public python2-astor
8270 (package-with-python2 python-astor))
e224b7d0
SB
8271
8272(define-public python-rply
8273 (package
8274 (name "python-rply")
8275 (version "0.7.4")
8276 (source (origin
8277 (method url-fetch)
8278 (uri (pypi-uri "rply" version))
8279 (sha256
8280 (base32
8281 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8282 (build-system python-build-system)
f22efa01 8283 (propagated-inputs
f3b98f4f 8284 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
8285 (home-page "https://github.com/alex/rply")
8286 (synopsis "Parser generator for Python")
8287 (description
8288 "This package provides a pure Python based parser generator, that also
8289works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8290with a new public API, and RPython support.")
3f641af0 8291 (license license:bsd-3)))
e224b7d0
SB
8292
8293(define-public python2-rply
8294 (package-with-python2 python-rply))
c3e919d7
SB
8295
8296(define-public python-hy
8297 (package
8298 (name "python-hy")
8299 (version "0.11.1")
8300 (source (origin
8301 (method url-fetch)
8302 (uri (pypi-uri "hy" version))
8303 (sha256
8304 (base32
8305 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8306 (build-system python-build-system)
15c37077
MB
8307 (arguments
8308 '(#:phases
8309 (modify-phases %standard-phases
8310 (replace 'check
8311 (lambda _
8312 ;; Tests require write access to HOME.
8313 (setenv "HOME" "/tmp")
8314 (zero? (system* "nosetests")))))))
8315 (native-inputs
8316 `(("python-coverage" ,python-coverage)
8317 ("python-nose" ,python-nose)))
f22efa01 8318 (propagated-inputs
c3e919d7
SB
8319 `(("python-astor" ,python-astor)
8320 ("python-clint" ,python-clint)
f3b98f4f 8321 ("python-rply" ,python-rply)))
c3e919d7
SB
8322 (home-page "http://hylang.org/")
8323 (synopsis "Lisp frontend to Python")
8324 (description
8325 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8326its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8327Python at your fingertips, in Lisp form.")
8328 (license license:expat)))
8329
8330(define-public python2-hy
8331 (package-with-python2 python-hy))
7a5b944e 8332
81f7f297
EF
8333(define-public python-rauth
8334 (package
8335 (name "python-rauth")
8336 (version "0.7.2")
8337 (source
8338 (origin
8339 (method url-fetch)
8340 (uri (pypi-uri "rauth" version))
8341 (sha256
8342 (base32
8343 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8344 (build-system python-build-system)
8345 (arguments
8346 `(#:test-target "check"))
f22efa01 8347 (propagated-inputs
81f7f297
EF
8348 `(("python-requests" ,python-requests)))
8349 (home-page "https://github.com/litl/rauth")
8350 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8351 (description
8352 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8353provides service wrappers for convenient connection initialization and
8354authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8355 (license license:expat)
8356 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8357
8358(define-public python2-rauth
0848d8d3
EF
8359 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8360 (package
8361 (inherit base)
00e10c6e 8362 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 8363 ,@(package-native-inputs base))))))
81f7f297 8364
1abe448d
EF
8365(define-public python2-functools32
8366 (package
8367 (name "python2-functools32")
8368 (version "3.2.3-2")
8369 (source
8370 (origin
8371 (method url-fetch)
8372 (uri (pypi-uri "functools32" version))
8373 (sha256
8374 (base32
8375 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8376 (build-system python-build-system)
8377 (arguments
8378 `(#:python ,python-2
8379 #:tests? #f)) ; no test target
1abe448d
EF
8380 (home-page "https://github.com/MiCHiLU/python-functools32")
8381 (synopsis
8382 "Backport of the functools module from Python 3.2.3")
8383 (description
8384 "This package is a backport of the @code{functools} module from Python
83853.2.3 for use with older versions of Python and PyPy.")
8386 (license license:expat)))
8387
877889f3 8388(define-public python2-futures
7a5b944e 8389 (package
877889f3 8390 (name "python2-futures")
7a5b944e
EF
8391 (version "3.0.3")
8392 (source
8393 (origin
8394 (method url-fetch)
8395 (uri (pypi-uri "futures" version))
8396 (sha256
8397 (base32
8398 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8399 (build-system python-build-system)
877889f3 8400 (arguments `(#:python ,python-2))
7a5b944e
EF
8401 (home-page "https://github.com/agronholm/pythonfutures")
8402 (synopsis
8403 "Backport of the concurrent.futures package from Python 3.2")
8404 (description
8405 "The concurrent.futures module provides a high-level interface for
8406asynchronously executing callables. This package backports the
8407concurrent.futures package from Python 3.2")
3f641af0 8408 (license license:bsd-3)))
7a5b944e 8409
5cb2fe44
EF
8410(define-public python-promise
8411 (package
8412 (name "python-promise")
8413 (version "0.4.2")
8414 (source
8415 (origin
8416 (method url-fetch)
8417 (uri (pypi-uri "promise" version))
8418 (sha256
8419 (base32
8420 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8421 (build-system python-build-system)
8422 ;; Tests wants python-futures, which is a python2 only program, and
8423 ;; can't be found by python-promise at test time.
8424 (arguments `(#:tests? #f))
8425 (home-page "https://github.com/syrusakbary/promise")
8426 (synopsis "Promises/A+ implementation for Python")
8427 (description
8428 "Promises/A+ implementation for Python")
8429 (properties `((python2-variant . ,(delay python2-promise))))
8430 (license license:expat)))
8431
8432(define-public python2-promise
8433 (let ((promise (package-with-python2
8434 (strip-python2-variant python-promise))))
8435 (package (inherit promise)
8436 (arguments (substitute-keyword-arguments (package-arguments promise)
8437 ((#:tests? _) #t)))
8438 (native-inputs
8439 `(("python2-futures" ,python2-futures)
8440 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
8441 ,@(package-native-inputs promise))))))
8442
c18f6368
EF
8443(define-public python-urllib3
8444 (package
8445 (name "python-urllib3")
6178274d 8446 (version "1.18.1")
c18f6368
EF
8447 (source
8448 (origin
8449 (method url-fetch)
8450 (uri (pypi-uri "urllib3" version))
8451 (sha256
8452 (base32
6178274d 8453 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8454 (build-system python-build-system)
8455 (arguments `(#:tests? #f))
8456 (native-inputs
f3b98f4f 8457 `(;; some packages for tests
c18f6368
EF
8458 ("python-nose" ,python-nose)
8459 ("python-mock" ,python-mock)
8460 ("python-tornado" ,python-tornado)))
8461 (propagated-inputs
8322749a 8462 `(;; extra packages for https security
c18f6368
EF
8463 ("python-certifi" ,python-certifi)
8464 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8465 ("python-pyasn1" ,python-pyasn1)
8466 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8467 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8468 (synopsis "HTTP library with thread-safe connection pooling")
8469 (description
8470 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8471can reuse the same socket connection for multiple requests, it can POST files,
8472supports url redirection and retries, and also gzip and deflate decoding.")
8473 (license license:expat)))
8474
8475(define-public python2-urllib3
8476 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8477
8478(define-public python-colorama
8479 (package
8480 (name "python-colorama")
8481 (version "0.3.3")
8482 (source
8483 (origin
8484 (method url-fetch)
8485 (uri (pypi-uri "colorama" version))
8486 (sha256
8487 (base32
8488 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8489 (build-system python-build-system)
2b2f2fc1
DT
8490 (synopsis "colored terminal text rendering for Python")
8491 (description "Colorama is a Python library for rendering colored terminal
8492text.")
8493 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8494 (license license:bsd-3)))
2b2f2fc1
DT
8495
8496(define-public python2-colorama
8497 (package-with-python2 python-colorama))
f5bcec6e
DT
8498
8499(define-public python-rsa
8500 (package
8501 (name "python-rsa")
ecd68c53 8502 (version "3.4.2")
f5bcec6e
DT
8503 (source
8504 (origin
8505 (method url-fetch)
8506 (uri (pypi-uri "rsa" version))
8507 (sha256
8508 (base32
ecd68c53 8509 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 8510 (build-system python-build-system)
f22efa01 8511 (propagated-inputs
f3b98f4f 8512 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
8513 (synopsis "Pure-Python RSA implementation")
8514 (description "Python-RSA is a pure-Python RSA implementation. It supports
8515encryption and decryption, signing and verifying signatures, and key
8516generation according to PKCS#1 version 1.5. It can be used as a Python
8517library as well as on the command line.")
8518 (home-page "http://stuvel.eu/rsa")
3f641af0 8519 (license license:asl2.0)))
f5bcec6e
DT
8520
8521(define-public python2-rsa
8522 (package-with-python2 python-rsa))
c0aacfa5
DT
8523
8524(define-public python-pluggy
8525 (package
8526 (name "python-pluggy")
8527 (version "0.3.1")
8528 (source
8529 (origin
8530 (method url-fetch)
8531 (uri (pypi-uri "pluggy" version))
8532 (sha256
8533 (base32
8534 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8535 (build-system python-build-system)
c0aacfa5
DT
8536 (synopsis "Plugin and hook calling mechanism for Python")
8537 (description "Pluggy is an extraction of the plugin manager as used by
8538Pytest but stripped of Pytest specific details.")
8539 (home-page "https://pypi.python.org/pypi/pluggy")
8540 (license license:expat)))
8541
8542(define-public python2-pluggy
8543 (package-with-python2 python-pluggy))
a4af21ca
DT
8544
8545(define-public python-tox
8546 (package
8547 (name "python-tox")
8548 (version "2.3.1")
8549 (source
8550 (origin
8551 (method url-fetch)
8552 (uri (pypi-uri "tox" version))
8553 (sha256
8554 (base32
8555 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8556 (build-system python-build-system)
8557 (arguments
7ba07edf
HG
8558 ;; FIXME: Tests require pytest-timeout, which itself requires
8559 ;; pytest>=2.8.0 for installation.
a4af21ca 8560 '(#:tests? #f))
482d9591
HG
8561 (propagated-inputs
8562 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 8563 ("python-py" ,python-py)
482d9591 8564 ("python-virtualenv" ,python-virtualenv)))
328bb95d 8565 (native-inputs
7ba07edf
HG
8566 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8567 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
8568 (home-page "http://tox.testrun.org/")
8569 (synopsis "Virtualenv-based automation of test activities")
8570 (description "Tox is a generic virtualenv management and test command line
8571tool. It can be used to check that a package installs correctly with
8572different Python versions and interpreters, or run tests in each type of
8573supported environment, or act as a frontend to continuous integration
8574servers.")
8575 (license license:expat)))
8576
8577(define-public python2-tox
8578 (package-with-python2 python-tox))
ba9da248
DT
8579
8580(define-public python-jmespath
8581 (package
8582 (name "python-jmespath")
8583 (version "0.9.0")
8584 (source
8585 (origin
8586 (method url-fetch)
8587 (uri (pypi-uri "jmespath" version))
8588 (sha256
8589 (base32
8590 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8591 (build-system python-build-system)
52a75a83
MB
8592 (native-inputs
8593 `(("python-nose" ,python-nose)))
ba9da248
DT
8594 (synopsis "JSON Matching Expressions")
8595 (description "JMESPath (pronounced “james path”) is a Python library that
8596allows one to declaratively specify how to extract elements from a JSON
8597document.")
8598 (home-page "https://github.com/jmespath/jmespath.py")
8599 (license license:expat)))
8600
8601(define-public python2-jmespath
8602 (package-with-python2 python-jmespath))
935fcd5c
DT
8603
8604(define-public python-botocore
8605 (package
8606 (name "python-botocore")
e09f952d 8607 (version "1.4.62")
935fcd5c
DT
8608 (source
8609 (origin
8610 (method url-fetch)
8611 (uri (pypi-uri "botocore" version))
8612 (sha256
8613 (base32
e09f952d 8614 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c 8615 (build-system python-build-system)
877fdac9
MB
8616 (arguments
8617 ;; FIXME: Many tests are failing.
8618 '(#:tests? #f))
482d9591 8619 (propagated-inputs
22d7360b 8620 `(("python-dateutil" ,python-dateutil)
935fcd5c 8621 ("python-docutils" ,python-docutils)
482d9591 8622 ("python-jmespath" ,python-jmespath)))
8fa6890b 8623 (native-inputs
482d9591 8624 `(("python-mock" ,python-mock)
935fcd5c 8625 ("python-nose" ,python-nose)
482d9591 8626 ("behave" ,behave)
935fcd5c 8627 ("python-tox" ,python-tox)
482d9591 8628 ("python-wheel" ,python-wheel)))
935fcd5c
DT
8629 (home-page "https://github.com/boto/botocore")
8630 (synopsis "Low-level interface to AWS")
8631 (description "Botocore is a Python library that provides a low-level
8632interface to the Amazon Web Services (AWS) API.")
3f641af0 8633 (license license:asl2.0)))
935fcd5c
DT
8634
8635(define-public python2-botocore
8636 (package-with-python2 python-botocore))
f861b8b8
DT
8637
8638(define-public awscli
8639 (package
8640 (name "awscli")
d5ccf71e 8641 (version "1.11.5")
f861b8b8
DT
8642 (source
8643 (origin
8644 (method url-fetch)
d5ccf71e 8645 (uri (pypi-uri name version))
f861b8b8
DT
8646 (sha256
8647 (base32
d5ccf71e 8648 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8 8649 (build-system python-build-system)
482d9591 8650 (propagated-inputs
f861b8b8 8651 `(("python-colorama" ,python-colorama)
482d9591
HG
8652 ("python-botocore" ,python-botocore)
8653 ("python-s3transfer" ,python-s3transfer)
f861b8b8 8654 ("python-docutils" ,python-docutils)
482d9591 8655 ("python-rsa" ,python-rsa)))
d4649177 8656 (native-inputs
482d9591 8657 `(("python-mock" ,python-mock)
f861b8b8 8658 ("python-nose" ,python-nose)
f861b8b8
DT
8659 ("python-sphinx" ,python-sphinx)
8660 ("python-tox" ,python-tox)
482d9591 8661 ("python-wheel" ,python-wheel)))
f861b8b8
DT
8662 (home-page "http://aws.amazon.com/cli/")
8663 (synopsis "Command line client for AWS")
8664 (description "AWS CLI provides a unified command line interface to the
8665Amazon Web Services (AWS) API.")
3f641af0 8666 (license license:asl2.0)))
6a44697d
LF
8667
8668(define-public python-hypothesis
8669 (package
8670 (name "python-hypothesis")
bea6d94d 8671 (version "3.1.0")
6a44697d
LF
8672 (source (origin
8673 (method url-fetch)
8674 (uri (pypi-uri "hypothesis" version))
8675 (sha256
8676 (base32
bea6d94d 8677 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8678 (build-system python-build-system)
bd100c71 8679 (native-inputs
6a44697d
LF
8680 `(("python-flake8" ,python-flake8)
8681 ("python-pytest" ,python-pytest)))
8682 (synopsis "Library for property based testing")
8683 (description "Hypothesis is a library for testing your Python code against a
8684much larger range of examples than you would ever want to write by hand. It’s
8685based on the Haskell library, Quickcheck, and is designed to integrate
8686seamlessly into your existing Python unit testing work flow.")
8687 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8688 (license license:mpl2.0)
6f068e08 8689 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8690
8691(define-public python2-hypothesis
6f068e08
EF
8692 (let ((hypothesis (package-with-python2
8693 (strip-python2-variant python-hypothesis))))
8694 (package (inherit hypothesis)
8695 (native-inputs
bd100c71
MB
8696 `(("python2-enum34" ,python2-enum34)
8697 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
8698
8699(define-public python-pytest-subtesthack
8700 (package
8701 (name "python-pytest-subtesthack")
8702 (version "0.1.1")
8703 (source (origin
8704 (method url-fetch)
8705 (uri (pypi-uri "pytest-subtesthack" version))
8706 (sha256
8707 (base32
8708 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8709 (build-system python-build-system)
7517e73c
LF
8710 (propagated-inputs
8711 `(("python-pytest" ,python-pytest)))
8712 (synopsis "Set-up and tear-down fixtures for unit tests")
8713 (description "This plugin allows you to set up and tear down fixtures within
8714unit test functions that use @code{py.test}. This is useful for using
8715@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8716function multiple times, without setting up or tearing down fixture state as is
8717normally the case.")
8718 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8719 (license license:unlicense)))
7517e73c
LF
8720
8721(define-public python2-pytest-subtesthack
8722 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8723
8724(define-public python2-xdo
8725 (package
8726 (name "python2-xdo")
8727 (version "0.2")
8728 (source (origin
8729 (method url-fetch)
8730 (uri (string-append
8731 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8732 "python-xdo_" version ".orig.tar.gz"))
8733 (sha256
8734 (base32
8735 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8736 (build-system python-build-system)
8737 (arguments
8738 `(#:python ,python-2
8739 #:tests? #f)) ; no tests provided
8740 (inputs
8741 `(("xdotool" ,xdotool)
8742 ("libX11" ,libx11)))
8743 (home-page "https://tracker.debian.org/pkg/python-xdo")
8744 (synopsis "Python library for simulating X11 keyboard/mouse input")
8745 (description "Provides bindings to libxdo for manipulating X11 via simulated
8746input. (Note that this is mostly a legacy library; you may wish to look at
8747python-xdo for newer bindings.)")
3f641af0 8748 (license license:bsd-3)))
0bdc1671 8749
cb34dc6c
CAW
8750(define-public python-wtforms
8751 (package
8752 (name "python-wtforms")
8753 (version "2.1")
8754 (source
8755 (origin
8756 (method url-fetch)
8757 (uri (pypi-uri "WTForms" version ".zip"))
8758 (sha256
8759 (base32
8760 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8761 (build-system python-build-system)
13c4d874
EF
8762 (arguments
8763 '(#:phases
8764 (modify-phases %standard-phases
8765 (add-after 'unpack 'remove-django-test
8766 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8767 (lambda _
8768 (substitute*
8769 "tests/runtests.py"
8770 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8771 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8772 #t)))))
cb34dc6c
CAW
8773 (native-inputs
8774 `(("unzip" ,unzip)))
8775 (home-page "http://wtforms.simplecodes.com/")
8776 (synopsis
8777 "Form validation and rendering library for Python web development")
8778 (description
8779 "WTForms is a flexible forms validation and rendering library
8780for Python web development. It is very similar to the web form API
8781available in Django, but is a standalone package.")
f210e944 8782 (license license:bsd-3)))
cb34dc6c
CAW
8783
8784(define-public python2-wtforms
f210e944 8785 (package-with-python2 python-wtforms))
50aaec25
DT
8786
8787(define-public python-mako
8788 (package
8789 (name "python-mako")
8790 (version "1.0.3")
8791 (source
8792 (origin
8793 (method url-fetch)
8794 (uri (pypi-uri "Mako" version))
8795 (sha256
8796 (base32
8797 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8798 (build-system python-build-system)
482d9591
HG
8799 (propagated-inputs
8800 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 8801 (native-inputs
482d9591 8802 `(("python-mock" ,python-mock)
50aaec25
DT
8803 ("python-nose" ,python-nose)))
8804 (home-page "http://www.makotemplates.org/")
8805 (synopsis "Templating language for Python")
8806 (description "Mako is a templating language for Python that compiles
8807templates into Python modules.")
f210e944 8808 (license license:expat)))
50aaec25
DT
8809
8810(define-public python2-mako
f210e944 8811 (package-with-python2 python-mako))
ae00a41f
CAW
8812
8813(define-public python-waitress
8814 (package
8815 (name "python-waitress")
8816 (version "0.8.10")
8817 (source
8818 (origin
8819 (method url-fetch)
8820 (uri (pypi-uri "waitress" version))
8821 (sha256
8822 (base32
8823 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8824 (build-system python-build-system)
8825 (home-page "https://github.com/Pylons/waitress")
8826 (synopsis "Waitress WSGI server")
8827 (description "Waitress is meant to be a production-quality pure-Python WSGI
8828server with very acceptable performance.")
f210e944 8829 (license license:zpl2.1)))
ae00a41f
CAW
8830
8831(define-public python2-waitress
f210e944 8832 (package-with-python2 python-waitress))
778a284b
CAW
8833
8834(define-public python-wsgiproxy2
8835 (package
8836 (name "python-wsgiproxy2")
8837 (version "0.4.2")
8838 (source
8839 (origin
8840 (method url-fetch)
8841 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8842 (sha256
8843 (base32
8844 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8845 (build-system python-build-system)
e359b31a
LF
8846 (arguments
8847 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8848 ;; support Python 3:
8849 ;; https://github.com/benoitc/restkit/issues/140
8850 #:tests? #f))
778a284b
CAW
8851 (native-inputs
8852 `(("unzip" ,unzip)
8853 ("python-nose" ,python-nose)
8854 ("python-coverage" ,python-coverage)))
8855 (propagated-inputs
8856 `(("python-six" ,python-six)
8857 ("python-webob" ,python-webob)))
8858 (home-page
8859 "https://github.com/gawel/WSGIProxy2/")
8860 (synopsis "WSGI Proxy with various http client backends")
8861 (description "WSGI turns HTTP requests into WSGI function calls.
8862WSGIProxy turns WSGI function calls into HTTP requests.
8863It also includes code to sign requests and pass private data,
8864and to spawn subprocesses to handle requests.")
f210e944 8865 (license license:expat)))
778a284b
CAW
8866
8867(define-public python2-wsgiproxy2
f210e944 8868 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
8869
8870(define-public python-pastedeploy
8871 (package
8872 (name "python-pastedeploy")
8873 (version "1.5.2")
8874 (source
8875 (origin
8876 (method url-fetch)
8877 (uri (pypi-uri "PasteDeploy" version))
8878 (sha256
8879 (base32
8880 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8881 (build-system python-build-system)
8882 (native-inputs
8883 `(("python-nose" ,python-nose)))
bb7518b1
CAW
8884 (home-page "http://pythonpaste.org/deploy/")
8885 (synopsis
8886 "Load, configure, and compose WSGI applications and servers")
8887 (description
8888 "This tool provides code to load WSGI applications and servers from URIs;
8889these URIs can refer to Python Eggs for INI-style configuration files. Paste
8890Script provides commands to serve applications based on this configuration
8891file.")
8892 (license license:expat)))
8893
8894(define-public python2-pastedeploy
8895 (package-with-python2 python-pastedeploy))
1cf53652 8896
c4a7904c
CAW
8897(define-public python-paste
8898 (package
8899 (name "python-paste")
8900 (version "2.0.2")
8901 (source
8902 (origin
8903 (method url-fetch)
8904 (uri (pypi-uri "Paste" version))
8905 (sha256
8906 (base32
8907 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8908 (patches (search-patches "python-paste-remove-website-test.patch"
8909 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8910 (build-system python-build-system)
8911 (native-inputs
8912 `(("python-nose" ,python-nose)))
8913 (propagated-inputs
f3b98f4f 8914 `(("python-six" ,python-six)))
c4a7904c
CAW
8915 (arguments
8916 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8917 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8918 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8919 ;; still... things should be better by the next Paste release.)
8920 #:tests? #f))
8921 (home-page "http://pythonpaste.org")
8922 (synopsis
8923 "Python web development tools, focusing on WSGI")
8924 (description
8925 "Paste provides a variety of web development tools and middleware which
8926can be nested together to build web applications. Paste's design closely
8927follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8928 (license license:expat)
8929 (properties `((python2-variant . ,(delay python2-paste))))))
8930
8931(define-public python2-paste
8932 (let ((paste (package-with-python2
8933 (strip-python2-variant python-paste))))
8934 (package
8935 (inherit paste)
8936 (arguments
8937 ;; Tests are back for Python 2!
8938 `(#:tests? #t
8939 ,@(package-arguments paste))))))
8940
a8f20f63
CAW
8941(define-public python-pastescript
8942 (package
8943 (name "python-pastescript")
8944 (version "2.0.2")
8945 (source
8946 (origin
8947 (method url-fetch)
8948 (uri (pypi-uri "PasteScript" version))
8949 (sha256
8950 (base32
8951 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8952 (build-system python-build-system)
8953 (native-inputs
8954 `(("python-nose" ,python-nose)))
8955 (propagated-inputs
f3b98f4f 8956 `(("python-paste" ,python-paste)
a8f20f63
CAW
8957 ("python-pastedeploy" ,python-pastedeploy)))
8958 (home-page "http://pythonpaste.org/script/")
8959 (arguments
8960 '(;; Unfortunately, this requires the latest unittest2,
8961 ;; but that requires traceback2 which requires linecache2 which requires
8962 ;; unittest2. So we're skipping tests for now.
8963 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8964 ;; so in theory we could get around this situation somehow.)
8965 #:tests? #f))
8966 (synopsis
8967 "Pluggable command line tool for serving web applications and more")
8968 (description
8969 "PasteScript is a plugin-friendly command line tool which provides a
8970variety of features, from launching web applications to bootstrapping project
8971layouts.")
8972 (license license:expat)))
8973
8974(define-public python2-pastescript
8975 (package-with-python2 python-pastescript))
8976
1cf53652
CAW
8977(define-public python-pyquery
8978 (package
8979 (name "python-pyquery")
aab76e80 8980 (version "1.2.13")
1cf53652
CAW
8981 (source
8982 (origin
8983 (method url-fetch)
8984 (uri (pypi-uri "pyquery" version))
8985 (sha256
8986 (base32
aab76e80 8987 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652 8988 (build-system python-build-system)
2ddbfa8c
LF
8989 (native-inputs
8990 `(("python-webob" ,python-webob)
8991 ("python-webtest" ,python-webtest)))
1cf53652
CAW
8992 (propagated-inputs
8993 `(("python-lxml" ,python-lxml)
8994 ("python-cssselect" ,python-cssselect)))
8995 (home-page "https://github.com/gawel/pyquery")
8996 (synopsis "Make jQuery-like queries on xml documents")
8997 (description "pyquery allows you to make jQuery queries on xml documents.
8998The API is as much as possible the similar to jQuery. pyquery uses lxml for
8999fast xml and html manipulation.")
f210e944 9000 (license license:bsd-3)))
1cf53652
CAW
9001
9002(define-public python2-pyquery
f210e944 9003 (package-with-python2 python-pyquery))
aa6313d6
CAW
9004
9005(define-public python-webtest
9006 (package
9007 (name "python-webtest")
9008 (version "2.0.20")
9009 (source
9010 (origin
9011 (method url-fetch)
9012 (uri (pypi-uri "WebTest" version))
9013 (sha256
9014 (base32
9015 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9016 (build-system python-build-system)
9017 (arguments
9018 `(;; Unfortunately we have to disable tests!
9019 ;; This release of WebTest is pinned to python-nose < 1.3,
9020 ;; but older versions of python-nose are plagued with the following
9021 ;; bug(s), which rears its ugly head during test execution:
9022 ;; https://github.com/nose-devs/nose/issues/759
9023 ;; https://github.com/nose-devs/nose/pull/811
9024 #:tests? #f))
9025 ;; Commented out code is no good, but in this case, once tests
9026 ;; are ready to be enabled again, we should put the following
9027 ;; in place:
9028 ;; (native-inputs
9029 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9030 ;; ; but see above comment
9031 ;; ("python-coverage" ,python-coverage)
9032 ;; ("python-mock" ,python-mock)
9033 ;; ("python-pastedeploy" ,python-pastedeploy)
9034 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9035 ;; ("python-pyquery" ,python-pyquery)))
9036 (propagated-inputs
9037 `(("python-waitress" ,python-waitress)
9038 ("python-webob" ,python-webob)
9039 ("python-six" ,python-six)
9040 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9041 (home-page "http://webtest.pythonpaste.org/")
9042 (synopsis "Helper to test WSGI applications")
9043 (description "Webtest allows you to test your Python web applications
9044without starting an HTTP server. It supports anything that supports the
9045minimum of WSGI.")
f210e944 9046 (license license:expat)))
aa6313d6
CAW
9047
9048(define-public python2-webtest
f210e944 9049 (package-with-python2 python-webtest))
4cb122cd
CAW
9050
9051(define-public python-anyjson
9052 (package
9053 (name "python-anyjson")
9054 (version "0.3.3")
9055 (source
9056 (origin
9057 (method url-fetch)
9058 (uri (pypi-uri "anyjson" version))
9059 (sha256
9060 (base32
9061 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9062 (build-system python-build-system)
9063 (arguments
9064 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9065 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9066 ;; whatever) so this transformation needs to be done before the tests
9067 ;; can be run. Maybe we could add a build step to transform beforehand
9068 ;; but it could be annoying/difficult.
9069 ;; We can enable tests for the Python 2 version, though, and do below.
9070 #:tests? #f))
9071 (home-page "http://bitbucket.org/runeh/anyjson/")
9072 (synopsis
9073 "Wraps best available JSON implementation in a common interface")
9074 (description
9075 "Anyjson loads whichever is the fastest JSON module installed
9076and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 9077 (license license:bsd-3)
4cb122cd
CAW
9078 (properties `((python2-variant . ,(delay python2-anyjson))))))
9079
9080(define-public python2-anyjson
9081 (let ((anyjson (package-with-python2
9082 (strip-python2-variant python-anyjson))))
9083 (package
9084 (inherit anyjson)
9085 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9086 #:tests? #t
9087 ,@(package-arguments anyjson)))
00e10c6e 9088 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
9089
9090(define-public python-amqp
9091 (package
9092 (name "python-amqp")
9093 (version "1.4.9")
9094 (source
9095 (origin
9096 (method url-fetch)
9097 (uri (pypi-uri "amqp" version))
9098 (sha256
9099 (base32
9100 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9101 (build-system python-build-system)
9102 (native-inputs
9103 `(("python-nose" ,python-nose)
9104 ("python-mock" ,python-mock)))
9105 (home-page "http://github.com/celery/py-amqp")
9106 (synopsis
9107 "Low-level AMQP client for Python (fork of amqplib)")
9108 (description
9109 "This is a fork of amqplib which was originally written by Barry Pederson.
9110It is maintained by the Celery project, and used by kombu as a pure python
9111alternative when librabbitmq is not available.")
3f641af0 9112 (license license:lgpl2.1+)
8dfceab7
CAW
9113 (properties `((python2-variant . ,(delay python2-amqp))))))
9114
9115(define-public python2-amqp
9116 (let ((amqp (package-with-python2
9117 (strip-python2-variant python-amqp))))
9118 (package
9119 (inherit amqp)
9120 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9121 ;; unmaintained. Weirdly, does not do this on the python 3
9122 ;; version?
9123 #:tests? #f
00e10c6e 9124 ,@(package-arguments amqp))))))
7d387305
CAW
9125
9126(define-public python-kombu
9127 (package
9128 (name "python-kombu")
0cb59822 9129 (version "3.0.37")
7d387305
CAW
9130 (source
9131 (origin
9132 (method url-fetch)
9133 (uri (pypi-uri "kombu" version))
9134 (sha256
9135 (base32
0cb59822 9136 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9137 (build-system python-build-system)
9138 (native-inputs
9139 `(("python-mock" ,python-mock)
9140 ("python-nose" ,python-nose)))
9141 (propagated-inputs
9142 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9143 ("python-amqp" ,python-amqp)
9144 ("python-redis" ,python-redis)))
7d387305
CAW
9145 (home-page "http://kombu.readthedocs.org")
9146 (synopsis "Message passing library for Python")
9147 (description "The aim of Kombu is to make messaging in Python as easy as
9148possible by providing an idiomatic high-level interface for the AMQ protocol,
9149and also provide proven and tested solutions to common messaging problems.
9150AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9151message orientation, queuing, routing, reliability and security, for which the
9152RabbitMQ messaging server is the most popular implementation.")
3f641af0 9153 (license license:bsd-3)
7d387305
CAW
9154 (properties `((python2-variant . ,(delay python2-kombu))))))
9155
9156(define-public python2-kombu
9157 (let ((kombu (package-with-python2
9158 (strip-python2-variant python-kombu))))
9159 (package
9160 (inherit kombu)
328bb95d
HG
9161 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9162 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
9163
9164(define-public python-billiard
9165 (package
9166 (name "python-billiard")
a6bb9e44 9167 (version "3.3.0.23")
b6f0b9fb
CAW
9168 (source
9169 (origin
9170 (method url-fetch)
9171 (uri (pypi-uri "billiard" version))
9172 (sha256
9173 (base32
a6bb9e44 9174 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9175 (build-system python-build-system)
9176 (native-inputs
9177 `(("python-nose" ,python-nose)))
9178 (home-page "http://github.com/celery/billiard")
9179 (synopsis
9180 "Python multiprocessing fork with improvements and bugfixes")
9181 (description
9182 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9183multiprocessing package itself is a renamed and updated version of R Oudkerk's
9184pyprocessing package. This standalone variant is intended to be compatible with
9185Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9186 (license license:bsd-3)
b6f0b9fb
CAW
9187 (properties `((python2-variant . ,(delay python2-billiard))))))
9188
9189(define-public python2-billiard
9190 (let ((billiard (package-with-python2
9191 (strip-python2-variant python-billiard))))
9192 (package
9193 (inherit billiard)
00e10c6e 9194 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9195 ("python2-mock" ,python2-mock)
9196 ,@(package-native-inputs billiard))))))
22df6419
CAW
9197
9198(define-public python-celery
9199 (package
9200 (name "python-celery")
9ebe87fe 9201 (version "3.1.24")
22df6419
CAW
9202 (source
9203 (origin
9204 (method url-fetch)
9205 (uri (pypi-uri "celery" version))
9206 (sha256
9207 (base32
9ebe87fe 9208 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9209 (build-system python-build-system)
9ebe87fe
LF
9210 (arguments
9211 `(#:phases
9212 (modify-phases %standard-phases
9213 ;; These tests break with Python 3.5:
9214 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9215 (replace 'check
9216 (lambda _
9217 (zero?
9218 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9219 (native-inputs
9220 `(("python-nose" ,python-nose)))
f22efa01 9221 (propagated-inputs
22df6419
CAW
9222 `(("python-pytz" ,python-pytz)
9223 ("python-billiard" ,python-billiard)
9224 ("python-kombu" ,python-kombu)))
9225 (home-page "http://celeryproject.org")
9226 (synopsis "Distributed Task Queue")
9227 (description "Celery is an asynchronous task queue/job queue based on
9228distributed message passing. It is focused on real-time operation, but
9229supports scheduling as well. The execution units, called tasks, are executed
9230concurrently on a single or more worker servers using multiprocessing,
9231Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9232synchronously (wait until ready).")
3f641af0 9233 (license license:bsd-3)
22df6419
CAW
9234 (properties `((python2-variant . ,(delay python2-celery))))))
9235
9236(define-public python2-celery
9237 (let ((celery (package-with-python2
9238 (strip-python2-variant python-celery))))
9239 (package
9240 (inherit celery)
00e10c6e 9241 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
9242 ("python2-mock" ,python2-mock)
9243 ,@(package-native-inputs celery))))))
97e32948
CAW
9244
9245(define-public python-translitcodec
9246 (package
9247 (name "python-translitcodec")
9248 (version "0.4.0")
9249 (source
9250 (origin
9251 (method url-fetch)
9252 (uri (pypi-uri "translitcodec" version))
9253 (sha256
9254 (base32
9255 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9256 (build-system python-build-system)
9257 (arguments
9258 `(#:tests? #f)) ; no tests provided
9259 (home-page
9260 "https://github.com/claudep/translitcodec")
9261 (synopsis
9262 "Unicode to 8-bit charset transliteration codec")
9263 (description
9264 "This package contains codecs for transliterating ISO 10646 texts into
9265best-effort representations using smaller coded character sets (ASCII,
9266ISO 8859, etc.).")
f210e944 9267 (license license:expat)))
97e32948
CAW
9268
9269(define-public python2-translitcodec
f210e944 9270 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
9271
9272(define-public python-editor
9273 (package
9274 (name "python-editor")
9275 (version "0.5")
9276 (source
9277 (origin
9278 (method url-fetch)
9279 (uri (pypi-uri "python-editor" version))
9280 (sha256
9281 (base32
9282 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9283 (build-system python-build-system)
9284 (home-page
9285 "https://github.com/fmoo/python-editor")
9286 (synopsis
9287 "Programmatically open an editor, capture the result")
9288 (description
9289 "python-editor is a library that provides the editor module for
9290programmatically interfacing with your system's $EDITOR.")
f210e944 9291 (license license:asl2.0)))
0c3b90d4
CAW
9292
9293(define-public python2-editor
f210e944 9294 (package-with-python2 python-editor))
3276517c
LF
9295
9296(define-public python-sphinxcontrib-programoutput
9297 (package
9298 (name "python-sphinxcontrib-programoutput")
9299 (version "0.8")
9300 (source (origin
9301 (method url-fetch)
9302 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9303 (sha256
9304 (base32
9305 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9306 (build-system python-build-system)
9307 (propagated-inputs
a0a09859 9308 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
9309 (synopsis "Sphinx extension to include program output")
9310 (description "A Sphinx extension to literally insert the output of arbitrary
9311commands into documents, helping you to keep your command examples up to date.")
9312 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 9313 (license license:bsd-2)))
3276517c
LF
9314
9315(define-public python2-sphinxcontrib-programoutput
f210e944 9316 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
9317
9318(define-public python-sphinx-repoze-autointerface
9319 (package
9320 (name "python-sphinx-repoze-autointerface")
328ae341 9321 (version "0.8")
548d7165
LF
9322 (source (origin
9323 (method url-fetch)
9324 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9325 (sha256
9326 (base32
328ae341 9327 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9328 (build-system python-build-system)
9329 (propagated-inputs
47c7dc4a 9330 `(("python-sphinx" ,python-sphinx)
548d7165
LF
9331 ("python-zope-interface" ,python-zope-interface)))
9332 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9333 (description "This package defines an extension for the Sphinx documentation
9334system. The extension allows generation of API documentation by
9335introspection of @code{zope.interface} instances in code.")
9336 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9337 (license license:repoze)))
548d7165
LF
9338
9339(define-public python2-sphinx-repoze-autointerface
9340 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9341
9342(define-public python-psycopg2
9343 (package
9344 (name "python-psycopg2")
9345 (version "2.6.1")
9346 (source
9347 (origin
9348 (method url-fetch)
9349 (uri (pypi-uri "psycopg2" version))
9350 (sha256
9351 (base32
9352 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9353 (build-system python-build-system)
9354 (arguments
9355 ;; Tests would require a postgresql database "psycopg2_test"
9356 ;; and a running postgresql database management service.
9357 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9358 (inputs
9359 `(("postgresql" ,postgresql))) ; libpq
9360 (home-page "http://initd.org/psycopg/")
9361 (synopsis "Python PostgreSQL adapter")
9362 (description
9363 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 9364 (license license:lgpl3+)))
b31fbea5
DM
9365
9366(define-public python2-psycopg2
f210e944 9367 (package-with-python2 python-psycopg2))
eed1a61f
LF
9368
9369(define-public python-vobject
9370 (package
9371 (name "python-vobject")
9bed9b15 9372 (version "0.9.2")
eed1a61f
LF
9373 (source (origin
9374 (method url-fetch)
9375 (uri (pypi-uri "vobject" version))
9376 (sha256
9377 (base32
9bed9b15 9378 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 9379 (build-system python-build-system)
a9871b7b
LF
9380 (arguments
9381 '(;; The test suite relies on some non-portable Windows interfaces.
9382 #:tests? #f))
f22efa01 9383 (propagated-inputs
22d7360b 9384 `(("python-dateutil" ,python-dateutil)
eed1a61f
LF
9385 ("python-pyicu" ,python-pyicu)))
9386 (synopsis "Parse and generate vCard and vCalendar files")
9387 (description "Vobject is intended to be a full featured Python package for
9388parsing and generating vCard and vCalendar files. Currently, iCalendar files
9389are supported and well tested. vCard 3.0 files are supported, and all data
9390should be imported, but only a few components are understood in a sophisticated
9391way.")
9392 (home-page "http://eventable.github.io/vobject/")
f210e944 9393 (license license:asl2.0)))
eed1a61f
LF
9394
9395(define-public python2-vobject
f210e944 9396 (package-with-python2 python-vobject))
cedac813
LF
9397
9398(define-public python-munkres
9399 (package
9400 (name "python-munkres")
38e81a2c 9401 (version "1.0.8")
cedac813
LF
9402 (source (origin
9403 (method url-fetch)
9404 (uri (pypi-uri "munkres" version))
9405 (sha256
9406 (base32
38e81a2c 9407 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
9408 (build-system python-build-system)
9409 (arguments
9410 '(#:tests? #f)) ; no test suite
9411 (home-page "http://software.clapper.org/munkres/")
9412 (synopsis "Implementation of the Munkres algorithm")
9413 (description "The Munkres module provides an implementation of the Munkres
9414algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9415useful for solving the Assignment Problem.")
3f641af0 9416 (license license:bsd-3)))
cedac813
LF
9417
9418(define-public python2-munkres
9419 (package-with-python2 python-munkres))
f3b3d78f
LF
9420
9421(define-public python-flask
9422 (package
9423 (name "python-flask")
c6c80104 9424 (version "0.11.1")
f3b3d78f
LF
9425 (source (origin
9426 (method url-fetch)
9427 (uri (pypi-uri "Flask" version))
9428 (sha256
9429 (base32
c6c80104 9430 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
9431 (build-system python-build-system)
9432 (propagated-inputs
9433 `(("python-itsdangerous" ,python-itsdangerous)
9434 ("python-jinja2" ,python-jinja2)
8f35c030 9435 ("python-click" ,python-click)
f3b3d78f
LF
9436 ("python-werkzeug" ,python-werkzeug)))
9437 (home-page "https://github.com/mitsuhiko/flask/")
9438 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9439 (description "Flask is a micro web framework based on the Werkzeug toolkit
9440and Jinja2 template engine. It is called a micro framework because it does not
9441presume or force a developer to use a particular tool or library.")
f210e944 9442 (license license:bsd-3)))
f3b3d78f
LF
9443
9444(define-public python2-flask
f210e944 9445 (package-with-python2 python-flask))
603d665b
LF
9446
9447(define-public python-cookies
9448 (package
9449 (name "python-cookies")
9450 (version "2.2.1")
9451 (source (origin
9452 (method url-fetch)
9453 (uri (pypi-uri "cookies" version))
9454 (sha256
9455 (base32
9456 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9457 (build-system python-build-system)
9458 (arguments
9459 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9460 #:tests? #f))
9461 (native-inputs
9462 `(("python-pytest" ,python2-pytest)))
9463 (synopsis "HTTP cookie parser and renderer")
9464 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9465Python.")
9466 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 9467 (license license:expat)))
603d665b
LF
9468
9469(define-public python2-cookies
f210e944 9470 (package-with-python2 python-cookies))
0efde7d6
LF
9471
9472(define-public python-responses
9473 (package
9474 (name "python-responses")
9475 (version "0.5.1")
9476 (source (origin
9477 (method url-fetch)
9478 (uri (pypi-uri "responses" version))
9479 (sha256
9480 (base32
9481 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9482 (build-system python-build-system)
9483 (arguments
9484 `(;; Test suite is not distributed:
9485 ;; https://github.com/getsentry/responses/issues/38
9486 #:tests? #f))
9487 (native-inputs
d8ea5f2f 9488 `(("python-mock" ,python-mock)))
0efde7d6
LF
9489 (propagated-inputs
9490 `(("python-requests" ,python-requests)
d8ea5f2f 9491 ("python-cookies" ,python-cookies)
0efde7d6
LF
9492 ("python-six" ,python-six)))
9493 (home-page "https://github.com/getsentry/responses")
9494 (synopsis "Utility for mocking out the `requests` Python library")
9495 (description "A utility library for mocking out the `requests` Python
9496library.")
f210e944 9497 (license license:asl2.0)))
0efde7d6
LF
9498
9499(define-public python2-responses
f210e944 9500 (package-with-python2 python-responses))
76b94885 9501
b7afd018
RW
9502(define-public python-whoosh
9503 (package
9504 (name "python-whoosh")
9505 (version "2.7.4")
9506 (source
9507 (origin
9508 (method url-fetch)
9509 (uri (pypi-uri "Whoosh" version))
9510 (sha256
9511 (base32
9512 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9513 (build-system python-build-system)
9514 (native-inputs
f3b98f4f 9515 `(("python-pytest" ,python-pytest)))
b7afd018
RW
9516 (home-page "http://bitbucket.org/mchaput/whoosh")
9517 (synopsis "Full text indexing, search, and spell checking library")
9518 (description
9519 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9520checking library.")
9521 (license license:bsd-2)))
9522
9523(define-public python2-whoosh
9524 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9525 (package (inherit whoosh)
9526 (propagated-inputs
9527 `(("python2-backport-ssl-match-hostname"
9528 ,python2-backport-ssl-match-hostname)
9529 ,@(package-propagated-inputs whoosh))))))
9530
76b94885
LF
9531(define-public python-pathlib
9532 (package
9533 (name "python-pathlib")
9534 (version "1.0.1")
9535 (source (origin
9536 (method url-fetch)
9537 (uri (pypi-uri "pathlib" version))
9538 (sha256
9539 (base32
9540 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9541 (build-system python-build-system)
92a312dc
RW
9542 ;; The tests depend on the internal "test" module, which does not provide
9543 ;; a stable interface.
9544 (arguments `(#:tests? #f))
76b94885 9545 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9546 (synopsis "Object-oriented file system paths")
9547 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9548It offers the following advantages over using string objects:
9549
9550@enumerate
9551@item No more cumbersome use of os and os.path functions. Everything can
9552be done easily through operators, attribute accesses, and method calls.
9553@item Embodies the semantics of different path types. For example,
9554comparing Windows paths ignores casing.
9555@item Well-defined semantics, eliminating any inconsistencies or
9556ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9557@end enumerate
9558
9559Note: In Python 3.4, pathlib is now part of the standard library. For other
9560Python versions please consider python-pathlib2 instead, which tracks the
9561standard library module. This module (python-pathlib) isn't maintained
9562anymore.")
76b94885
LF
9563 (license license:expat)))
9564
9565(define-public python2-pathlib
9566 (package-with-python2 python-pathlib))
25a7db0a 9567
b7703c81
HG
9568(define-public python2-pathlib2
9569 (package
9570 (name "python2-pathlib2")
9571 (version "2.1.0")
9572 (source (origin
9573 (method url-fetch)
9574 (uri (pypi-uri "pathlib2" version))
9575 (sha256
9576 (base32
9577 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9578 (build-system python-build-system)
49a531f5
HG
9579 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9580 ;; version is 3.4 which already includes this package as part of the
9581 ;; standard library.
b7703c81
HG
9582 (arguments
9583 `(#:python ,python-2))
9584 (native-inputs
f3b98f4f 9585 `(("python2-six" ,python2-six)))
b7703c81
HG
9586 (home-page "http://pypi.python.org/pypi/pathlib2/")
9587 (synopsis "Object-oriented file system paths - backport of standard
9588pathlib module")
9589 (description "The goal of pathlib2 is to provide a backport of standard
9590pathlib module which tracks the standard library module, so all the newest
9591features of the standard pathlib can be used also on older Python versions.
9592
9593Pathlib offers a set of classes to handle file system paths. It offers the
9594following advantages over using string objects:
9595
9596@enumerate
9597@item No more cumbersome use of os and os.path functions. Everything can
9598be done easily through operators, attribute accesses, and method calls.
9599@item Embodies the semantics of different path types. For example,
9600comparing Windows paths ignores casing.
9601@item Well-defined semantics, eliminating any inconsistencies or
9602ambiguities (forward vs. backward slashes, etc.).
9603@end enumerate")
9604 (license license:expat)))
9605
25a7db0a
LF
9606(define-public python-jellyfish
9607 (package
9608 (name "python-jellyfish")
8c4964dd 9609 (version "0.5.6")
25a7db0a
LF
9610 (source (origin
9611 (method url-fetch)
9612 (uri (pypi-uri "jellyfish" version))
9613 (sha256
9614 (base32
8c4964dd 9615 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
9616 (build-system python-build-system)
9617 (native-inputs
9618 `(("python-pytest" ,python-pytest)))
9619 (home-page "https://github.com/jamesturk/jellyfish")
9620 (synopsis "Approximate and phonetic matching of strings")
9621 (description "Jellyfish uses a variety of string comparison and phonetic
9622encoding algorithms to do fuzzy string matching.")
3f641af0 9623 (license license:bsd-2)
25a7db0a
LF
9624 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9625
9626(define-public python2-jellyfish
9627 (let ((jellyfish (package-with-python2
9628 (strip-python2-variant python-jellyfish))))
9629 (package (inherit jellyfish)
00e10c6e 9630 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 9631 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9632
9633(define-public python2-unicodecsv
9634 (package
9635 (name "python2-unicodecsv")
9636 (version "0.14.1")
9637 (source (origin
9638 (method url-fetch)
9639 ;; The test suite is not included in the PyPi release.
9640 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9641 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9642 "archive/" version ".tar.gz"))
9643 (file-name (string-append name "-" version ".tar.gz"))
9644 (sha256
9645 (base32
9646 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9647 (build-system python-build-system)
9648 (arguments
9649 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9650 #:python ,python-2))
9651 (native-inputs
f3b98f4f 9652 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
9653 (home-page "https://github.com/jdunck/python-unicodecsv")
9654 (synopsis "Unicode CSV module for Python 2")
9655 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9656module, adding support for Unicode strings.")
3f641af0 9657 (license license:bsd-2)))
064503aa
LF
9658
9659(define-public python-rarfile
9660 (package
9661 (name "python-rarfile")
67824447 9662 (version "2.8")
064503aa
LF
9663 (source (origin
9664 (method url-fetch)
9665 (uri (pypi-uri "rarfile" version))
9666 (sha256
9667 (base32
67824447 9668 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
9669 (build-system python-build-system)
9670 (arguments
9671 '(#:phases
9672 (modify-phases %standard-phases
9673 (replace 'check
9674 ;; Many tests fail, but the installation proceeds.
9675 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9676 (native-inputs
9677 `(("which" ,which))) ; required for tests
9678 (propagated-inputs
9679 `(("libarchive" ,libarchive)))
9680 (home-page "https://github.com/markokr/rarfile")
9681 (synopsis "RAR archive reader for Python")
9682 (description "This is Python module for RAR archive reading. The interface
9683is made as zipfile like as possible.")
3f641af0 9684 (license license:isc)))
064503aa
LF
9685
9686(define-public python2-rarfile
9687 (package-with-python2 python-rarfile))
daeeea71
CM
9688
9689(define-public python-magic
9690 (package
9691 (name "python-magic")
9692 (version "0.4.3")
9693 (source
9694 (origin
9695 (method url-fetch)
9696 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9697 version ".tar.gz"))
9698 (sha256
9699 (base32
9700 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9701 (file-name (string-append name "-" version "-checkout"))))
9702 (build-system python-build-system)
9703 (arguments
9704 ;; The tests are unreliable, so don't run them. The tests fail
9705 ;; under Python3 because they were written for Python2 and
9706 ;; contain import statements that do not work in Python3. One of
9707 ;; the tests fails under Python2 because its assertions are
9708 ;; overly stringent; it relies on comparing output strings which
9709 ;; are brittle and can change depending on the version of
9710 ;; libmagic being used and the system on which the test is
9711 ;; running. In my case, under GuixSD 0.10.0, only one test
9712 ;; failed, and it seems to have failed only because the version
9713 ;; of libmagic that is packaged in Guix outputs a slightly
9714 ;; different (but not wrong) string than the one that the test
9715 ;; expected.
9716 '(#:tests? #f
9717 #:phases (modify-phases %standard-phases
9718 ;; Replace a specific method call with a hard-coded
9719 ;; path to the necessary libmagic.so file in the
9720 ;; store. If we don't do this, then the method call
9721 ;; will fail to find the libmagic.so file, which in
9722 ;; turn will cause any application using
9723 ;; python-magic to fail.
9724 (add-before 'build 'hard-code-path-to-libmagic
9725 (lambda* (#:key inputs #:allow-other-keys)
9726 (let ((file (assoc-ref inputs "file")))
9727 (substitute* "magic.py"
9728 (("ctypes.util.find_library\\('magic'\\)")
9729 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9730 #t)))
9731 (add-before 'install 'disable-egg-compression
9732 (lambda _
9733 (let ((port (open-file "setup.cfg" "a")))
9734 (display "\n[easy_install]\nzip_ok = 0\n"
9735 port)
9736 (close-port port)
9737 #t))))))
daeeea71
CM
9738 (inputs
9739 ;; python-magic needs to be able to find libmagic.so.
9740 `(("file" ,file)))
9741 (home-page "https://github.com/ahupp/python-magic")
9742 (synopsis "File type identification using libmagic")
9743 (description
9744 "This module uses ctypes to access the libmagic file type
9745identification library. It makes use of the local magic database and
9746supports both textual and MIME-type output. Note that this module and
9747the python-file module both provide a \"magic.py\" file; these two
9748modules, which are different and were developed separately, both serve
9749the same purpose: to provide Python bindings for libmagic.")
9750 (license license:expat)))
9751
9752(define-public python2-magic
9753 (package-with-python2 python-magic))
12af303f
CM
9754
9755(define-public python2-s3cmd
9756 (package
9757 (name "python2-s3cmd")
9758 (version "1.6.1")
9759 (source
9760 (origin
9761 (method url-fetch)
de67e922 9762 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9763 "s3cmd-" version ".tar.gz"))
9764 (sha256
9765 (base32
9766 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9767 (build-system python-build-system)
9768 (arguments
9769 ;; s3cmd is written for python2 only and contains no tests.
9770 `(#:python ,python-2
9771 #:tests? #f))
f22efa01 9772 (propagated-inputs
12af303f
CM
9773 `(("python2-dateutil" ,python2-dateutil)
9774 ;; The python-file package also provides a magic.py module.
9775 ;; This is an unfortunate state of affairs; however, s3cmd
9776 ;; fails to install if it cannot find specifically the
9777 ;; python-magic package. Thus we include it, instead of using
9778 ;; python-file. Ironically, s3cmd sometimes works better
9779 ;; without libmagic bindings at all:
9780 ;; https://github.com/s3tools/s3cmd/issues/198
9781 ("python2-magic" ,python2-magic)))
9782 (home-page "http://s3tools.org/s3cmd")
9783 (synopsis "Command line tool for S3-compatible storage services")
9784 (description
9785 "S3cmd is a command line tool for uploading, retrieving and managing data
9786in storage services that are compatible with the Amazon Simple Storage
9787Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9788GnuPG encryption, and more. It also supports management of Amazon's
9789CloudFront content delivery network.")
3f641af0 9790 (license license:gpl2+)))
4323a5f0
AE
9791
9792(define-public python-pkgconfig
9793 (package
9794 (name "python-pkgconfig")
9795 (version "1.1.0")
9796 (source
9797 (origin
9798 (method url-fetch)
9799 (uri (pypi-uri "pkgconfig" version))
9800 (sha256
9801 (base32
9802 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9803 (build-system python-build-system)
9804 (native-inputs
f3b98f4f 9805 `(("python-nose" ,python-nose)))
4323a5f0
AE
9806 (inputs
9807 `(("pkg-config" ,pkg-config)))
9808 (arguments
9809 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9810 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9811 #:tests? #f
4323a5f0
AE
9812 ;; Hard-code the path to pkg-config.
9813 #:phases
9814 (modify-phases %standard-phases
9815 (add-before
9816 'build 'patch
9817 (lambda _
9818 (substitute* "pkgconfig/pkgconfig.py"
9819 (("cmd = 'pkg-config")
9820 (string-append "cmd = '" (which "pkg-config"))))
9821 #t)))))
9822 (home-page "http://github.com/matze/pkgconfig")
9823 (synopsis "Python interface for pkg-config")
9824 (description "This module provides a Python interface to pkg-config. It
9825can be used to find all pkg-config packages, check if a package exists,
9826check if a package meets certain version requirements, query CFLAGS and
9827LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9828 (license license:expat)))
4323a5f0
AE
9829
9830(define-public python2-pkgconfig
9831 (package-with-python2 python-pkgconfig))
9832
2e697322
BW
9833(define-public python-bz2file
9834 (package
9835 (name "python-bz2file")
9836 (version "0.98")
9837 (source
9838 (origin
9839 (method url-fetch)
9840 (uri (pypi-uri "bz2file" version))
9841 (sha256
9842 (base32
9843 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9844 (build-system python-build-system)
9845 (arguments
124df723 9846 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9847 (home-page "https://github.com/nvawda/bz2file")
9848 (synopsis "Read and write bzip2-compressed files")
9849 (description
9850 "Bz2file is a Python library for reading and writing bzip2-compressed
9851files. It contains a drop-in replacement for the I/O interface in the
9852standard library's @code{bz2} module, including features from the latest
9853development version of CPython that are not available in older releases.")
3f641af0 9854 (license license:asl2.0)
2e697322
BW
9855 (properties `((python2-variant . ,(delay python2-bz2file))))))
9856
9857(define-public python2-bz2file
9858 (let ((base (package-with-python2
9859 (strip-python2-variant python-bz2file))))
9860 (package
9861 (inherit base)
124df723 9862 (arguments
752bb447
BW
9863 `(#:python ,python-2
9864 #:phases
124df723
BW
9865 (modify-phases %standard-phases
9866 ;; 'python setup.py test' does not work as of 0.98.
9867 ;; There is only the one test file, so we run it directly.
9868 (replace 'check
9869 (lambda _ (zero? (system* "python"
9870 "test_bz2file.py"))))))))))
2e697322 9871
da4ac1aa
BW
9872(define-public python-future
9873 (package
9874 (name "python-future")
9875 (version "0.15.2")
9876 (source
9877 (origin
9878 (method url-fetch)
9879 (uri (pypi-uri "future" version))
9880 (sha256
9881 (base32
9882 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9883 (build-system python-build-system)
9884 ;; Many tests connect to the network or are otherwise flawed.
9885 ;; https://github.com/PythonCharmers/python-future/issues/210
9886 (arguments
9887 `(#:tests? #f))
9888 (home-page "http://python-future.org")
9889 (synopsis "Single-source support for Python 3 and 2")
9890 (description
9891 "@code{python-future} is the missing compatibility layer between Python 2 and
9892Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9893to support both Python 2 and Python 3 with minimal overhead.")
f210e944 9894 (license license:expat)))
da4ac1aa
BW
9895
9896(define-public python2-future
f210e944 9897 (package-with-python2 python-future))
da4ac1aa 9898
8e451885
AE
9899(define-public python-cysignals
9900 (package
9901 (name "python-cysignals")
9902 (version "1.1.0")
9903 (source
9904 (origin
9905 (method url-fetch)
9906 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9907 (sha256
9908 (base32
9909 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9910 (build-system python-build-system)
9911 (native-inputs
9912 `(("python-cython" ,python-cython)
8e451885
AE
9913 ("python-sphinx" ,python-sphinx)))
9914 (inputs
9915 `(("pari-gp" ,pari-gp)))
9916 (arguments
9917 `(#:modules ((guix build python-build-system)
9918 ((guix build gnu-build-system) #:prefix gnu:)
9919 (guix build utils))
9920 ;; FIXME: Tests are executed after installation and currently fail
9921 ;; when not installing into standard locations; the author is working
9922 ;; on a fix.
9923 #:tests? #f
9924 #:phases
9925 (modify-phases %standard-phases
9926 (add-before
9927 'build 'configure
9928 (assoc-ref gnu:%standard-phases 'configure)))))
9929 (home-page
9930 "https://github.com/sagemath/cysignals")
9931 (synopsis
9932 "Handling of interrupts and signals for Cython")
9933 (description
9934 "The cysignals package provides mechanisms to handle interrupts (and
9935other signals and errors) in Cython code, using two related approaches,
9936for mixed Cython/Python code or external C libraries and pure Cython code,
9937respectively.")
3f641af0 9938 (license license:lgpl3+)))
8e451885
AE
9939
9940(define-public python2-cysignals
9941 (package-with-python2 python-cysignals))
9942
63bcec71
DM
9943(define-public python2-shedskin
9944 (package
9945 (name "python2-shedskin")
9946 (version "0.9.4")
9947 (source
9948 (origin
9949 (method url-fetch)
9950 (uri (string-append "https://github.com/shedskin/shedskin/"
9951 "releases/download/v" version
9952 "/shedskin-" version ".tgz"))
9953 (sha256
9954 (base32
9955 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9956 (build-system python-build-system)
9957 (arguments
9958 `(#:python ,python-2
9959 #:phases (modify-phases %standard-phases
9960 (add-after 'unpack 'fix-resulting-include-libs
9961 (lambda* (#:key inputs #:allow-other-keys)
9962 (let ((libgc (assoc-ref inputs "libgc"))
9963 (pcre (assoc-ref inputs "pcre")))
9964 (substitute* "shedskin/makefile.py"
9965 (("variable == 'CCFLAGS':[ ]*")
9966 (string-append "variable == 'CCFLAGS':\n"
9967 " line += ' -I " pcre "/include"
9968 " -I " libgc "/include'"))
9969 (("variable == 'LFLAGS':[ ]*")
9970 (string-append "variable == 'LFLAGS':\n"
9971 " line += ' -L" pcre "/lib"
9972 " -L " libgc "/lib'")))
9973 #t))))))
63bcec71
DM
9974 (inputs `(("pcre" ,pcre)
9975 ("libgc" ,libgc)))
9976 (home-page "https://shedskin.github.io/")
9977 (synopsis "Experimental Python-2 to C++ Compiler")
9978 (description (string-append "This is an experimental compiler for a subset of
9979Python. It generates C++ code and a Makefile."))
3f641af0 9980 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
9981
9982(define-public python2-rope
9983 (package
9984 (name "python2-rope")
9985 (version "0.10.3")
9986 (source
9987 (origin
9988 (method url-fetch)
9989 (uri (pypi-uri "rope" version))
9990 (sha256
9991 (base32
9992 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9993 (arguments
9994 ;; Rope is currently python-2 only.
9995 ;; https://github.com/python-rope/rope/issues/57
9996 `(#:python ,python-2))
9997 (build-system python-build-system)
9998 (native-inputs
f3b98f4f 9999 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
10000 (home-page "https://github.com/python-rope/rope")
10001 (synopsis "Refactoring library for Python")
10002 (description "Rope is a refactoring library for Python. It facilitates
10003the renaming, moving and extracting of attributes, functions, modules, fields
10004and parameters in Python 2 source code. These refactorings can also be applied
10005to occurences in strings and comments.")
3f641af0 10006 (license license:gpl2)))
6ba8ca17
10007
10008(define-public python-py3status
10009 (package
10010 (name "python-py3status")
d2262d70 10011 (version "3.1")
6ba8ca17
10012 (source
10013 (origin
10014 (method url-fetch)
10015 (uri (pypi-uri "py3status" version))
10016 (sha256
10017 (base32
d2262d70 10018 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 10019 (build-system python-build-system)
8653c1d5
MB
10020 (arguments
10021 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
6ba8ca17
10022 (home-page "https://github.com/ultrabug/py3status")
10023 (synopsis "Extensible i3status wrapper written in Python")
10024 (description "py3status is an i3status wrapper which extends i3status
10025functionality in a modular way, allowing you to extend your panel with your
10026own code, responding to click events and updating clock every second.")
3f641af0 10027 (license license:bsd-3)))
b8fdbca3
HG
10028
10029(define-public python-tblib
10030 (package
10031 (name "python-tblib")
10032 (version "1.3.0")
10033 (source (origin
10034 (method url-fetch)
10035 (uri (pypi-uri "tblib" version))
10036 (sha256 (base32
10037 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10038 (build-system python-build-system)
10039 (arguments
10040 `(#:phases
10041 (modify-phases %standard-phases
10042 (replace 'check
10043 (lambda _
10044 ;; Upstream runs tests after installation and the package itself
10045 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10046 ;; found.
10047 (setenv "PYTHONPATH"
10048 (string-append (getcwd) "/build/lib:"
10049 (getenv "PYTHONPATH")))
10050 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10051 (native-inputs
10052 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
10053 ("python-six" ,python-six)))
10054 (home-page "https://github.com/ionelmc/python-tblib")
10055 (synopsis "Traceback serialization library")
10056 (description
10057 "Traceback serialization allows you to:
10058
10059@enumerate
10060@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10061different processes. This allows better error handling when running code over
10062multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10063
10064@item Parse traceback strings and raise with the parsed tracebacks.
10065@end itemize")
3f641af0 10066 (license license:bsd-3)))
b8fdbca3
HG
10067
10068(define-public python2-tblib
10069 (package-with-python2 python-tblib))
1a024de4
HG
10070
10071(define-public python-sqlparse
10072 (package
10073 (name "python-sqlparse")
10074 (version "0.1.19")
10075 (source (origin
10076 (method url-fetch)
10077 (uri (pypi-uri "sqlparse" version))
10078 (sha256
10079 (base32
10080 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10081 (build-system python-build-system)
10082 (arguments
10083 `(#:phases
10084 (modify-phases %standard-phases
10085 (replace 'check
10086 (lambda* _
10087 ;; setup.py-integrated 2to3 only affects the build files, but
10088 ;; py.test is using the source files. So we need to convert them
10089 ;; manually.
10090 (when (zero? (system* "python3"))
10091 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10092 (zero? (system* "py.test")))))))
10093 (native-inputs
f3b98f4f 10094 `(("python-pytest" ,python-pytest)))
1a024de4
HG
10095 (home-page "https://github.com/andialbrecht/sqlparse")
10096 (synopsis "Non-validating SQL parser")
10097 (description "Sqlparse is a non-validating SQL parser for Python. It
10098provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10099 (license license:bsd-3)))
1a024de4
HG
10100
10101(define-public python2-sqlparse
10102 (package-with-python2 python-sqlparse))
68b9d242
SB
10103
10104(define-public python-greenlet
10105 (package
10106 (name "python-greenlet")
10107 (version "0.4.9")
10108 (source (origin
10109 (method url-fetch)
10110 (uri (pypi-uri "greenlet" version))
10111 (sha256
10112 (base32
10113 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
10114 (build-system python-build-system)
68b9d242
SB
10115 (home-page "https://greenlet.readthedocs.io/")
10116 (synopsis "Lightweight in-process concurrent programming")
10117 (description
10118 "Greenlet package is a spin-off of Stackless, a version of CPython
10119that supports micro-threads called \"tasklets\". Tasklets run
10120pseudo-concurrently (typically in a single or a few OS-level threads) and
10121are synchronized with data exchanges on \"channels\".")
3f641af0 10122 (license (list license:psfl license:expat))))
68b9d242
SB
10123
10124(define-public python2-greenlet
10125 (package-with-python2 python-greenlet))
d79a343b
SB
10126
10127(define-public python-gevent
10128 (package
10129 (name "python-gevent")
10130 (version "1.1.1")
10131 (source (origin
10132 (method url-fetch)
10133 (uri (pypi-uri "gevent" version))
10134 (sha256
10135 (base32
10136 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10137 (modules '((guix build utils)))
10138 (snippet
10139 '(begin
10140 ;; unbunding libev and c-ares
10141 (for-each delete-file-recursively '("libev" "c-ares"))
10142 ;; fixing testsuite
10143 (call-with-output-file "greentest/__init__.py" noop)
10144 (substitute* "greentest/testrunner.py"
10145 (("import util") "from . import util")
10146 (("from util import log") "from .util import log"))))))
10147 (build-system python-build-system)
10148 (propagated-inputs
10149 `(("python-greenlet" ,python-greenlet)))
10150 (native-inputs
f3b98f4f 10151 `(("python-six" ,python-six)))
d79a343b
SB
10152 (inputs
10153 `(("c-ares" ,c-ares)
10154 ("libev" ,libev)))
10155 (home-page "http://www.gevent.org/")
10156 (synopsis "Coroutine-based network library")
10157 (description
10158 "gevent is a coroutine-based Python networking library that uses greenlet
10159to provide a high-level synchronous API on top of the libev event loop.")
10160 (license license:expat)))
10161
10162(define-public python2-gevent
10163 (package-with-python2 python-gevent))
da3aeeb6
SB
10164
10165(define-public python-twisted
10166 (package
10167 (name "python-twisted")
10168 (version "16.2.0")
10169 (source (origin
10170 (method url-fetch)
8ea8e8d3 10171 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
10172 (sha256
10173 (base32
10174 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10175 (build-system python-build-system)
a960e73f
MB
10176 (arguments
10177 '(#:tests? #f)) ; FIXME: Some tests are failing.
10178 ;; #:phases
10179 ;; (modify-phases %standard-phases
10180 ;; (replace 'check
10181 ;; (lambda _
10182 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170
SB
10183 (propagated-inputs
10184 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
10185 (home-page "https://twistedmatrix.com/")
10186 (synopsis "Asynchronous networking framework written in Python")
10187 (description
10188 "Twisted is an extensible framework for Python programming, with special
10189focus on event-based network programming and multiprotocol integration.")
10190 (license license:expat)))
10191
10192(define-public python2-twisted
10193 (package-with-python2 python-twisted))
d0b6fed6 10194
4d3fa5a4
EF
10195(define-public python-pika
10196 (package
10197 (name "python-pika")
10198 (version "0.10.0")
10199 (source
10200 (origin
10201 (method url-fetch)
10202 (uri (pypi-uri "pika" version))
10203 (sha256
10204 (base32
10205 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10206 (build-system python-build-system)
10207 (native-inputs
269d9172
LF
10208 `(("python-pyev" ,python-pyev)
10209 ("python-tornado" ,python-tornado)
10210 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
10211 (home-page "https://pika.readthedocs.org")
10212 (synopsis "Pure Python AMQP Client Library")
10213 (description
10214 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10215Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10216network support library.")
10217 (license license:bsd-3)))
10218
10219(define-public python2-pika
10220 (package-with-python2 python-pika))
10221
d0b6fed6
DM
10222(define-public python-ply
10223 (package
10224 (name "python-ply")
10225 (version "3.8")
10226 (source
10227 (origin
10228 (method url-fetch)
10229 (uri (string-append
10230 "https://pypi.python.org/packages/"
10231 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
10232 "/ply-" version ".tar.gz"))
10233 (sha256
10234 (base32
10235 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
10236 (build-system python-build-system)
10237 (home-page "http://www.dabeaz.com/ply/")
10238 (synopsis "Python Lex & Yacc")
10239 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10240It uses LR parsing and does extensive error checking.")
f210e944 10241 (license license:bsd-3)))
d0b6fed6
DM
10242
10243(define-public python2-ply
f210e944 10244 (package-with-python2 python-ply))
d951bd54
SB
10245
10246(define-public python-tabulate
10247 (package
10248 (name "python-tabulate")
10249 (version "0.7.5")
10250 (source (origin
10251 (method url-fetch)
10252 (uri (pypi-uri "tabulate" version))
10253 (sha256
10254 (base32
10255 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10256 ;; Fix tests
10257 (modules '((guix build utils)))
10258 (snippet '(substitute* '("test/test_cli.py"
10259 "test/test_input.py"
10260 "test/test_output.py"
10261 "test/test_regression.py")
10262 (("from common") "from nose.tools")))))
10263 (build-system python-build-system)
10264 (native-inputs
f3b98f4f 10265 `(;; For testing
d951bd54
SB
10266 ("python-nose" ,python-nose)))
10267 (home-page "https://bitbucket.org/astanin/python-tabulate")
10268 (synopsis "Pretty-print tabular data")
10269 (description
10270 "Tabulate is a library and command-line utility to pretty-print tabular
10271data in Python.")
10272 (license license:expat)))
10273
10274(define-public python2-tabulate
10275 (package-with-python2 python-tabulate))
1c4c8a33
SB
10276
10277(define-public python-kazoo
10278 (package
10279 (name "python-kazoo")
10280 (version "2.2.1")
10281 (source
10282 (origin
10283 (method url-fetch)
10284 (uri (pypi-uri "kazoo" version))
10285 (sha256
10286 (base32
10287 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10288 (build-system python-build-system)
10289 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
10290 (propagated-inputs
10291 `(("python-six" ,python-six)))
1c4c8a33
SB
10292 (home-page "https://kazoo.readthedocs.org")
10293 (synopsis "High-level Zookeeper client library")
10294 (description
10295 "Kazoo is a Python client library for the Apache Zookeeper distributed
10296application service. It is designed to be easy to use and to avoid common
10297programming errors.")
3f641af0 10298 (license license:asl2.0)))
1c4c8a33
SB
10299
10300(define-public python2-kazoo
10301 (package-with-python2 python-kazoo))
45dda35e
SB
10302
10303(define-public python-pykafka
10304 (package
10305 (name "python-pykafka")
10306 (version "2.4.0")
10307 (source (origin
10308 (method url-fetch)
c6bccf71
EF
10309 (uri (string-append
10310 "https://pypi.python.org/packages/8b/3e/"
10311 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10312 "pykafka-" version ".tar.gz"))
45dda35e
SB
10313 (sha256
10314 (base32
10315 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10316 (build-system python-build-system)
10317 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 10318 (propagated-inputs
45dda35e
SB
10319 `(("python-gevent" ,python-gevent)
10320 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10321 ("python-tabulate" ,python-tabulate)))
10322 (inputs
10323 `(("librdkafka" ,librdkafka)))
10324 (home-page "https://pykafka.readthedocs.io/")
10325 (synopsis "Apache Kafka client for Python")
10326 (description
10327 "PyKafka is a client for the Apache Kafka distributed messaging system.
10328It includes Python implementations of Kafka producers and consumers, which
10329are optionally backed by a C extension built on librdkafka.")
3f641af0 10330 (license license:asl2.0)))
45dda35e
SB
10331
10332(define-public python2-pykafka
10333 (package-with-python2 python-pykafka))
a44fd439
DM
10334
10335(define-public python-wcwidth
10336 (package
10337 (name "python-wcwidth")
10338 (version "0.1.6")
10339 (source
10340 (origin
10341 (method url-fetch)
10342 (uri (string-append
10343 "https://pypi.python.org/packages/"
10344 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10345 "wcwidth-" version ".tar.gz"))
10346 (sha256
10347 (base32
10348 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10349 (build-system python-build-system)
10350 (home-page "https://github.com/jquast/wcwidth")
66e07664 10351 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10352 (description "Wcwidth measures the number of terminal column cells of
10353wide-character codes. It is useful for those implementing a terminal emulator,
10354or programs that carefully produce output to be interpreted by one. It is a
10355Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10356specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 10357 (license license:expat)))
a44fd439
DM
10358
10359(define-public python2-wcwidth
f210e944 10360 (package-with-python2 python-wcwidth))
0de78c95
DP
10361
10362(define-public python2-jsonrpclib
10363 (package
10364 (name "python2-jsonrpclib")
10365 (version "0.1.7")
10366 (source (origin
10367 (method url-fetch)
10368 (uri (string-append
10369 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10370 "jsonrpclib-" version ".tar.gz"))
10371 (sha256
10372 (base32
10373 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10374 (build-system python-build-system)
0de78c95
DP
10375 (arguments
10376 `(#:tests? #f
10377 #:python ,python-2))
10378 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10379 (synopsis "Implementation of JSON-RPC specification for Python")
10380 (description
10381 "This library is an implementation of the JSON-RPC specification.
10382It supports both the original 1.0 specification, as well as the
10383new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10384etc.")
3f641af0 10385 (license license:asl2.0)))
9250b0f3
SB
10386
10387(define-public python-chai
10388 (package
10389 (name "python-chai")
10390 (version "1.1.1")
10391 (source (origin
10392 (method url-fetch)
10393 (uri (pypi-uri "chai" version))
10394 (sha256
10395 (base32
10396 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10397 (build-system python-build-system)
9250b0f3
SB
10398 (home-page "https://github.com/agoragames/chai")
10399 (synopsis "Mocking framework for Python")
10400 (description
10401 "Chai provides an api for mocking, stubbing and spying your python
10402objects, patterned after the Mocha library for Ruby.")
3f641af0 10403 (license license:bsd-3)))
9250b0f3
SB
10404
10405(define-public python2-chai
10406 (package-with-python2 python-chai))
10407
ae43baa8
SB
10408(define-public python-arrow
10409 (package
10410 (name "python-arrow")
10411 (version "0.8.0")
10412 (source (origin
10413 (method url-fetch)
10414 (uri (pypi-uri "arrow" version))
10415 (sha256
10416 (base32
10417 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10418 (build-system python-build-system)
10419 (native-inputs
f3b98f4f 10420 `(;; For testing
ae43baa8
SB
10421 ("python-chai" ,python-chai)
10422 ("python-simplejson" ,python-simplejson)))
36aed736 10423 (propagated-inputs
22d7360b 10424 `(("python-dateutil" ,python-dateutil)))
ae43baa8
SB
10425 (home-page "https://github.com/crsmithdev/arrow/")
10426 (synopsis "Dates and times for Python")
10427 (description
10428 "Arrow is a Python library to creating, manipulating, formatting and
10429converting dates, times, and timestamps. It implements and updates the
10430datetime type.")
3f641af0 10431 (license license:asl2.0)))
ae43baa8
SB
10432
10433(define-public python2-arrow
10434 (package-with-python2 python-arrow))
10435
1f2b62a4
SB
10436(define-public python-inflection
10437 (package
10438 (name "python-inflection")
10439 (version "0.3.1")
10440 (source
10441 (origin (method url-fetch)
10442 (uri (pypi-uri "inflection" version))
10443 (sha256
10444 (base32
10445 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10446 (build-system python-build-system)
e9127525
MB
10447 (native-inputs
10448 `(("python-pytest" ,python-pytest)))
1f2b62a4
SB
10449 (home-page "http://github.com/jpvanhal/inflection")
10450 (synopsis "Python string transformation library")
10451 (description
10452 "Inflection is a string transformation library. It singularizes
10453and pluralizes English words, and transforms strings from CamelCase to
10454underscored string.")
10455 (license license:expat)))
10456
10457(define-public python2-inflection
10458 (package-with-python2 python-inflection))
10459
18995566
SB
10460(define-public python-pylev
10461 (package
10462 (name "python-pylev")
10463 (version "1.3.0")
10464 (source (origin
10465 (method url-fetch)
10466 (uri (pypi-uri "pylev" version))
10467 (sha256
10468 (base32
10469 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10470 (build-system python-build-system)
18995566
SB
10471 (home-page "http://github.com/toastdriven/pylev")
10472 (synopsis "Levenshtein distance implementation in Python")
10473 (description "Pure Python Levenshtein implementation, based off the
10474Wikipedia code samples at
10475@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10476 (license license:bsd-3)))
18995566
SB
10477
10478(define-public python2-pylev
10479 (package-with-python2 python-pylev))
10480
f5deff7a
SB
10481(define-public python-cleo
10482 (package
10483 (name "python-cleo")
10484 (version "0.4.1")
10485 (source (origin
10486 (method url-fetch)
10487 (uri (pypi-uri "cleo" version))
10488 (sha256
10489 (base32
10490 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10491 (build-system python-build-system)
10492 (native-inputs
f3b98f4f 10493 `(;; For testing
f5deff7a
SB
10494 ("python-mock" ,python-mock)
10495 ("python-pytest" ,python-pytest)))
9403150a
SB
10496 (propagated-inputs
10497 `(("python-psutil" ,python-psutil)
10498 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10499 (home-page "https://github.com/sdispater/cleo")
10500 (synopsis "Command-line arguments library for Python")
10501 (description
10502 "Cleo allows you to create command-line commands with signature in
10503docstring and colored output.")
10504 (license license:expat)))
10505
10506(define-public python2-cleo
10507 (package-with-python2 python-cleo))
10508
77cadb43
SB
10509(define-public python-lazy-object-proxy
10510 (package
10511 (name "python-lazy-object-proxy")
10512 (version "1.2.2")
10513 (source (origin
10514 (method url-fetch)
10515 (uri (pypi-uri "lazy-object-proxy" version))
10516 (sha256
10517 (base32
10518 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10519 (build-system python-build-system)
77cadb43
SB
10520 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10521 (synopsis "Lazy object proxy for python")
10522 (description
10523 "Lazy object proxy is an object that wraps a callable but defers the call
10524until the object is actually required, and caches the result of said call.")
3f641af0 10525 (license license:bsd-2)))
77cadb43
SB
10526
10527(define-public python2-lazy-object-proxy
10528 (package-with-python2 python-lazy-object-proxy))
10529
5477e05f
SB
10530(define-public python-dnspython
10531 (package
10532 (name "python-dnspython")
6c514128 10533 (version "1.15.0")
5477e05f
SB
10534 (source (origin
10535 (method url-fetch)
10536 (uri (string-append "http://www.dnspython.org/kits/"
10537 version "/dnspython-" version ".tar.gz"))
10538 (sha256
10539 (base32
6c514128 10540 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10541 (build-system python-build-system)
10542 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
10543 (home-page "http://www.dnspython.org")
10544 (synopsis "DNS toolkit for Python")
10545 (description
10546 "dnspython is a DNS toolkit for Python. It supports almost all record
10547types. It can be used for queries, zone transfers, and dynamic updates.
10548It supports TSIG authenticated messages and EDNS0.")
10549 (license license:expat)))
10550
10551(define-public python2-dnspython
10552 (package-with-python2 python-dnspython))
10553
22711e25
SB
10554(define-public python-email-validator
10555 (package
10556 (name "python-email-validator")
10557 (version "1.0.1")
10558 (source
10559 (origin (method url-fetch)
10560 (uri (pypi-uri "email_validator" version))
10561 (sha256
10562 (base32
10563 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10564 (build-system python-build-system)
10565 (arguments
10566 '(#:phases
10567 (modify-phases %standard-phases
10568 (add-before 'build 'use-dnspython
10569 (lambda _
10570 (substitute* "setup.py"
10571 (("dnspython3") "dnspython"))
10572 #t)))))
d42560bd 10573 (propagated-inputs
22711e25 10574 `(("python-dnspython" ,python-dnspython)
d42560bd 10575 ("python-idna" ,python-idna)))
22711e25
SB
10576 (home-page "https://github.com/JoshData/python-email-validator")
10577 (synopsis "Email address validation library for Python")
10578 (description
10579 "This library validates email address syntax and deliverability.")
3f641af0 10580 (license license:cc0)))
22711e25
SB
10581
10582(define-public python2-email-validator
10583 (package-with-python2 python-email-validator))
10584
8987d91e
SB
10585(define-public python-ukpostcodeparser
10586 (package
10587 (name "python-ukpostcodeparser")
10588 (version "1.0.3")
10589 (source (origin
10590 (method url-fetch)
10591 (uri (pypi-uri "UkPostcodeParser" version))
10592 (sha256
10593 (base32
10594 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10595 (build-system python-build-system)
8987d91e
SB
10596 (home-page "https://github.com/hamstah/ukpostcodeparser")
10597 (synopsis "UK Postcode parser for Python")
10598 (description
10599 "This library provides the @code{parse_uk_postcode} function for
10600parsing UK postcodes.")
10601 (license license:expat)))
10602
10603(define-public python2-ukpostcodeparser
10604 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10605
10606(define-public python-fake-factory
10607 (package
10608 (name "python-fake-factory")
7adc698f 10609 (version "0.7.2")
ea92ae01
SB
10610 (source (origin
10611 (method url-fetch)
10612 (uri (pypi-uri "fake-factory" version))
10613 (sha256
10614 (base32
7adc698f 10615 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10616 (build-system python-build-system)
b7f3ea95
MB
10617 (arguments
10618 '(#:phases
10619 (modify-phases %standard-phases
10620 (replace 'check
10621 (lambda _
10622 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
ea92ae01 10623 (native-inputs
f3b98f4f 10624 `(;; For testing
ea92ae01
SB
10625 ("python-email-validator" ,python-email-validator)
10626 ("python-mock" ,python-mock)
10627 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297 10628 (propagated-inputs
22d7360b 10629 `(("python-dateutil" ,python-dateutil)
bbcd7297 10630 ("python-six" ,python-six)))
7adc698f 10631 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10632 (synopsis "Python package that generates fake data")
10633 (description
10634 "Faker is a Python package that generates fake data such as names,
10635addresses, and phone numbers.")
10636 (license license:expat)
10637 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10638
10639(define-public python2-fake-factory
10640 (let ((base (package-with-python2 (strip-python2-variant
10641 python-fake-factory))))
10642 (package
10643 (inherit base)
24c9aa18 10644 (propagated-inputs
ea92ae01 10645 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10646 ,@(package-propagated-inputs base))))))
ea92ae01 10647
b49504fd
SB
10648(define-public python-pyaml
10649 (package
10650 (name "python-pyaml")
10651 (version "15.8.2")
10652 (source (origin
10653 (method url-fetch)
10654 (uri (pypi-uri "pyaml" version))
10655 (sha256
10656 (base32
10657 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10658 (build-system python-build-system)
f620311a
MB
10659 (native-inputs
10660 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
10661 (propagated-inputs
10662 `(("python-pyyaml" ,python-pyyaml)))
10663 (home-page "https://github.com/mk-fg/pretty-yaml")
10664 (synopsis "YAML pretty-print library for Python")
10665 (description
10666 "pyaml is a PyYAML based python module to produce pretty and readable
10667YAML-serialized data.")
3f641af0 10668 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10669
10670(define-public python2-pyaml
10671 (package-with-python2 python-pyaml))
10672
347175a2
SB
10673(define-public python-flexmock
10674 (package
10675 (name "python-flexmock")
10676 (version "0.10.2")
10677 (source (origin
10678 (method url-fetch)
10679 (uri (pypi-uri "flexmock" version))
10680 (sha256
10681 (base32
10682 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10683 (build-system python-build-system)
347175a2
SB
10684 (home-page "https://flexmock.readthedocs.org")
10685 (synopsis "Testing library for Python")
10686 (description
10687 "flexmock is a testing library for Python that makes it easy to create
10688mocks, stubs and fakes.")
3f641af0 10689 (license license:bsd-3)))
347175a2
SB
10690
10691(define-public python2-flexmock
10692 (package-with-python2 python-flexmock))
10693
5a744191
SB
10694(define-public python-orator
10695 (package
10696 (name "python-orator")
10697 (version "0.8.2")
10698 (source (origin
10699 (method url-fetch)
10700 (uri (pypi-uri "orator" version))
10701 (sha256
10702 (base32
10703 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10704 (build-system python-build-system)
10705 (arguments '(#:tests? #f)) ; no tests
b2676030 10706 (propagated-inputs
5a744191
SB
10707 `(("python-arrow" ,python-arrow)
10708 ("python-blinker" ,python-blinker)
10709 ("python-cleo" ,python-cleo)
10710 ("python-fake-factory" ,python-fake-factory)
10711 ("python-inflection" ,python-inflection)
10712 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10713 ("python-pyaml" ,python-pyaml)
5a744191
SB
10714 ("python-simplejson" ,python-simplejson)
10715 ("python-wrapt" ,python-wrapt)))
10716 (home-page "https://orator-orm.com/")
10717 (synopsis "ActiveRecord ORM for Python")
10718 (description
10719 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10720implementation for Python.")
10721 (license license:expat)
10722 (properties `((python2-variant . ,(delay python2-orator))))))
10723
10724(define-public python2-orator
10725 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10726 (package
10727 (inherit base)
06961617 10728 (propagated-inputs
5a744191 10729 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10730 ,@(package-propagated-inputs base))))))
f4155188
DM
10731
10732(define-public python-prompt-toolkit
10733 (package
10734 (name "python-prompt-toolkit")
d15e2ef0 10735 (version "1.0.7")
f4155188
DM
10736 (source
10737 (origin
10738 (method url-fetch)
d15e2ef0 10739 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10740 (sha256
10741 (base32
d15e2ef0 10742 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188 10743 (build-system python-build-system)
bae18710
LF
10744 (arguments
10745 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
10746 (propagated-inputs
10747 `(("python-wcwidth" ,python-wcwidth)
2c199b55 10748 ("python-six" ,python-six)
f22efa01 10749 ("python-pygments" ,python-pygments)))
f4155188
DM
10750 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10751 (synopsis "Library for building command line interfaces in Python")
10752 (description
10753 "Prompt-Toolkit is a library for building interactive command line
10754interfaces in Python. It's like GNU Readline but it also features syntax
10755highlighting while typing, out-of-the-box multi-line input editing, advanced
10756code completion, incremental search, support for Chinese double-width
10757characters, mouse support, and auto suggestions.")
f210e944 10758 (license license:bsd-3)))
f4155188
DM
10759
10760(define-public python2-prompt-toolkit
f210e944 10761 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
10762
10763(define-public python-jedi
10764 (package
10765 (name "python-jedi")
10766 (version "0.9.0")
10767 (source
10768 (origin
10769 (method url-fetch)
10770 (uri (pypi-uri "jedi" version))
10771 (sha256
10772 (base32
10773 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10774 (build-system python-build-system)
bfce8a34
MB
10775 (arguments
10776 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
10777 '(#:tests? #f))
10778 (native-inputs
10779 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
10780 (home-page "https://github.com/davidhalter/jedi")
10781 (synopsis
10782 "Autocompletion for Python that can be used for text editors")
10783 (description
10784 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 10785 (license license:expat)))
a502dfbf
DM
10786
10787(define-public python2-jedi
f210e944 10788 (package-with-python2 python-jedi))
c2f0dc6e
DM
10789
10790(define-public ptpython
10791 (package
10792 (name "ptpython")
10793 (version "0.34")
10794 (source (origin
10795 (method url-fetch)
10796 (uri (pypi-uri "ptpython" version))
10797 (sha256
10798 (base32
10799 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10800 (build-system python-build-system)
32955348
MB
10801 (arguments
10802 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
f22efa01 10803 (propagated-inputs
c2f0dc6e
DM
10804 `(("python-docopt" ,python-docopt)
10805 ("python-jedi" ,python-jedi)
10806 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 10807 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
10808 (home-page "https://github.com/jonathanslenders/ptpython")
10809 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10810 (description
10811 "ptpython is a Python read-eval-print loop with IDE-like features.
10812It supports syntax highlighting, multiline editing, autocompletion, mouse,
10813color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10814etc.")
3f641af0 10815 (license license:bsd-3)
c2f0dc6e
DM
10816 (properties `((python2-variant . ,(delay ptpython-2))))))
10817
10818(define-public ptpython-2
10819 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10820 (package
10821 (inherit base)
10822 (name "ptpython2"))))
b227f0be 10823
b04a52a6
DJ
10824(define-public python-requests-oauthlib
10825 (package
10826 (name "python-requests-oauthlib")
10827 (version "0.6.2")
10828 (source
10829 (origin
10830 (method url-fetch)
10831 (uri (pypi-uri "requests-oauthlib" version))
10832 (sha256
10833 (base32
10834 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10835 (build-system python-build-system)
10836 (arguments
10837 `(#:phases
10838 (modify-phases %standard-phases
10839 ;; removes tests that require network access
10840 (add-before 'check 'pre-check
10841 (lambda _
10842 (delete-file "tests/test_core.py")
10843 #t)))))
10844 (native-inputs
10845 `(("python-requests-mock" ,python-requests-mock)
10846 ("python-mock" ,python-mock)))
f22efa01 10847 (propagated-inputs
b04a52a6
DJ
10848 `(("python-oauthlib" ,python-oauthlib)
10849 ("python-requests" ,python-requests)))
10850 (home-page
10851 "https://github.com/requests/requests-oauthlib")
10852 (synopsis
10853 "OAuthlib authentication support for Requests")
10854 (description
10855 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10856provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 10857 (license license:isc)))
b04a52a6
DJ
10858
10859(define-public python2-requests-oauthlib
f210e944 10860 (package-with-python2 python-requests-oauthlib))
b04a52a6 10861
b227f0be 10862(define-public python-stem
10863 (package
10864 (name "python-stem")
10865 (version "1.4.1b")
10866 (source
10867 (origin
10868 (method url-fetch)
10869 (uri (pypi-uri "stem" version ".tar.bz2"))
10870 (sha256
10871 (base32
10872 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10873 (build-system python-build-system)
10874 (arguments
10875 `(#:phases
10876 (modify-phases %standard-phases
10877 (replace 'check
10878 (lambda _
10879 (zero? (system* "./run_tests.py" "--unit")))))))
10880 (native-inputs
10881 `(("python-mock" ,python-mock)
10882 ("python-pep8" ,python-pep8)
10883 ("python-pyflakes" ,python-pyflakes)))
f22efa01 10884 (propagated-inputs
b227f0be 10885 `(("python-pycrypto" ,python-pycrypto)))
10886 (home-page "https://stem.torproject.org/")
10887 (synopsis
10888 "Python controller library that allows applications to interact with Tor")
10889 (description
10890 "Stem is a Python controller library for Tor. With it you can use Tor's
10891control protocol to script against the Tor process and read descriptor data
10892relays publish about themselves.")
3f641af0 10893 (license license:lgpl3)))
b227f0be 10894
10895(define-public python2-stem
10896 (package-with-python2 python-stem))
517a6c0c
DM
10897
10898(define-public python-pyserial
10899 (package
10900 (name "python-pyserial")
10901 (version "3.1.1")
10902 (source
10903 (origin
10904 (method url-fetch)
10905 (uri (pypi-uri "pyserial" version))
10906 (sha256
10907 (base32
10908 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10909 (build-system python-build-system)
0a702009
MB
10910 (arguments
10911 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10912 ;; #:phases
10913 ;; (modify-phases %standard-phases
10914 ;; (replace 'check
10915 ;; (lambda _
10916 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
517a6c0c
DM
10917 (home-page
10918 "https://github.com/pyserial/pyserial")
10919 (synopsis "Python Serial Port Bindings")
10920 (description "@code{pyserial} provide serial port bindings for Python. It
10921supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10922and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 10923 (license license:bsd-3)))
517a6c0c
DM
10924
10925(define-public python2-pyserial
f210e944 10926 (package-with-python2 python-pyserial))
6eb7af2a
DJ
10927
10928(define-public python-kivy
10929 (package
10930 (name "python-kivy")
10931 (version "1.9.1")
10932 (source
10933 (origin
10934 (method url-fetch)
10935 (uri (pypi-uri "kivy" version))
10936 (file-name (string-append name "-" version ".tar.gz"))
10937 (sha256
10938 (base32
10939 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10940 (build-system python-build-system)
10941 (arguments
10942 `(#:tests? #f ; Tests require many optional packages
10943 #:phases
10944 (modify-phases %standard-phases
10945 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10946 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10947 (lambda* (#:key inputs #:allow-other-keys)
10948 (setenv "KIVY_SDL2_PATH"
10949 (string-append (assoc-ref inputs "sdl-union")
10950 "/include/SDL2"))
10951 #t)))))
10952 (native-inputs
f2516de2
HG
10953 `(("pkg-config" ,pkg-config)
10954 ("python-cython" ,python-cython)))
6eb7af2a 10955 (inputs
f2516de2 10956 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
10957 ("mesa" ,mesa)
10958 ("sdl-union"
10959 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10960 (home-page "http://kivy.org")
10961 (synopsis
10962 "Multitouch application framework")
10963 (description
10964 "A software library for rapid development of
10965hardware-accelerated multitouch applications.")
10966 (license license:expat)))
10967
10968(define-public python2-kivy
10969 (package-with-python2 python-kivy))
10970
10971(define-public python-kivy-next
10972 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10973 (revision "1"))
10974 (package (inherit python-kivy)
10975 (name "python-kivy-next")
d80a71eb 10976 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
10977 (string-take commit 7)))
10978 (source
10979 (origin
10980 (method git-fetch)
10981 (uri (git-reference
10982 (url "https://github.com/kivy/kivy")
10983 (commit commit)))
10984 (file-name (string-append name "-" version "-checkout"))
10985 (sha256
10986 (base32
10987 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10988
10989(define-public python2-kivy-next
10990 (package-with-python2 python-kivy-next))
8794bd8b
DC
10991
10992(define-public python-binaryornot
10993 (package
10994 (name "python-binaryornot")
10995 (version "0.4.0")
10996 (source (origin
10997 (method url-fetch)
10998 (uri (pypi-uri "binaryornot" version))
10999 (sha256
11000 (base32
11001 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11002 (build-system python-build-system)
f22efa01 11003 (propagated-inputs
8794bd8b
DC
11004 `(("python-chardet" ,python-chardet)
11005 ("python-hypothesis" ,python-hypothesis)))
11006 (home-page "https://github.com/audreyr/binaryornot")
11007 (synopsis "Package to check if a file is binary or text")
11008 (description "Ultra-lightweight pure Python package to check if a file is
11009binary or text.")
11010 (license license:bsd-3)
11011 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11012
11013(define-public python2-binaryornot
11014 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11015 (package (inherit base)
f22efa01 11016 (propagated-inputs
8794bd8b 11017 `(("python2-enum34" ,python2-enum34)
f22efa01 11018 ,@(package-propagated-inputs base))))))
a9ac982a
DC
11019
11020(define-public python-nltk
11021 (package
11022 (name "python-nltk")
11023 (version "3.2.1")
11024 (source (origin
11025 (method url-fetch)
11026 (uri (pypi-uri "nltk" version))
11027 (sha256
11028 (base32
11029 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11030 (build-system python-build-system)
59f12985
LF
11031 (arguments
11032 '(;; The tests require some extra resources to be downloaded.
11033 ;; TODO Try packaging these resources.
11034 #:tests? #f))
a9ac982a
DC
11035 (home-page "http://nltk.org/")
11036 (synopsis "Natural Language Toolkit")
11037 (description "It provides interfaces to over 50 corpora and lexical
11038resources such as WordNet, along with a suite of text processing libraries
11039for classification, tokenization, stemming, tagging, parsing, and semantic
11040reasoning, wrappers for natural language processing libraries.")
f210e944 11041 (license license:asl2.0)))
a9ac982a
DC
11042
11043(define-public python2-nltk
f210e944 11044 (package-with-python2 python-nltk))
691cd90d
DC
11045
11046(define-public python-pymongo
11047 (package
11048 (name "python-pymongo")
11049 (version "3.3.0")
11050 (source (origin
11051 (method url-fetch)
11052 (uri (pypi-uri "pymongo" version))
11053 (sha256
11054 (base32
11055 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11056 (build-system python-build-system)
f22efa01 11057 (propagated-inputs
691cd90d
DC
11058 `(("python-certifi" ,python-certifi)))
11059 (home-page "http://github.com/mongodb/mongo-python-driver")
11060 (synopsis "Python driver for MongoDB")
11061 (description "Python driver for MongoDB.")
f210e944 11062 (license license:asl2.0)))
691cd90d
DC
11063
11064(define-public python2-pymongo
f210e944 11065 (package-with-python2 python-pymongo))
6a6c9d43
DC
11066
11067(define-public python-sh
11068 (package
11069 (name "python-sh")
11070 (version "1.11")
11071 (source (origin
11072 (method url-fetch)
11073 (uri (pypi-uri "sh" version))
11074 (sha256
11075 (base32
11076 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11077 (build-system python-build-system)
11078 (arguments
11079 `(#:tests? #f)) ; no tests
11080 (home-page "https://github.com/amoffat/sh")
11081 (synopsis "Python subprocess interface")
11082 (description "Abstracts process invocation by providing a function
11083interface for programs.")
f210e944 11084 (license license:expat)))
6a6c9d43
DC
11085
11086(define-public python2-sh
f210e944 11087 (package-with-python2 python-sh))
05b59190 11088
25702397
EF
11089(define-public python-consul
11090 (package
11091 (name "python-consul")
11092 (version "0.6.1")
11093 (source
11094 (origin
11095 (method url-fetch)
11096 (uri (pypi-uri "python-consul" version))
11097 (sha256
11098 (base32
11099 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11100 (build-system python-build-system)
11101 (native-inputs
fd1d6de7
HG
11102 `(("python-pytest" ,python-pytest)))
11103 (propagated-inputs
11104 `(("python-requests" ,python-requests)
25702397
EF
11105 ("python-six" ,python-six)))
11106 (home-page "https://github.com/cablehead/python-consul")
11107 (synopsis "Python client for Consul")
11108 (description
11109 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11110discovery, monitoring and configuration.")
11111 (license license:expat)))
11112
11113(define-public python2-consul
f210e944 11114 (package-with-python2 python-consul))
25702397 11115
05b59190
DC
11116(define-public python-schematics
11117 (package
11118 (name "python-schematics")
11119 (version "1.1.1")
11120 (source
11121 (origin
11122 (method url-fetch)
11123 (uri (string-append
11124 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11125 (file-name (string-append name "-" version ".tar.gz"))
11126 (sha256
11127 (base32
11128 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11129 (build-system python-build-system)
f22efa01 11130 (propagated-inputs
05b59190
DC
11131 `(("python-six" ,python-six)))
11132 (arguments
11133 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11134 ; version requirements (eg python-coveralls)
11135 (home-page "https://github.com/schematics/schematics")
11136 (synopsis "Python Data Structures for Humans")
11137 (description "Python Data Structures for Humans.")
f210e944 11138 (license license:bsd-3)))
05b59190
DC
11139
11140(define-public python2-schematics
f210e944 11141 (package-with-python2 python-schematics))
d6907ff7
DC
11142
11143(define-public python-publicsuffix
11144 (package
11145 (name "python-publicsuffix")
11146 (version "1.1.0")
11147 (source (origin
11148 (method url-fetch)
11149 (uri (pypi-uri "publicsuffix" version))
11150 (sha256
11151 (base32
11152 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11153 (build-system python-build-system)
11154 (arguments
11155 `(#:tests? #f)) ; tests use the internet
11156 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11157 (synopsis "Get suffix for a domain name")
11158 (description "Get a public suffix for a domain name using the Public Suffix
11159List.")
f210e944 11160 (license license:expat)))
d6907ff7
DC
11161
11162(define-public python2-publicsuffix
f210e944 11163 (package-with-python2 python-publicsuffix))
b2319996
DC
11164
11165(define-public python-publicsuffix2
11166 (package
11167 (name "python-publicsuffix2")
11168 (version "2.20160621")
11169 (source
11170 (origin
11171 (method url-fetch)
11172 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11173 (sha256
11174 (base32
11175 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11176 (build-system python-build-system)
10797a0a
LF
11177 (arguments
11178 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
11179 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11180 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11181 (description "Get a public suffix for a domain name using the Public Suffix
11182List. Forked from and using the same API as the publicsuffix package.")
f210e944 11183 (license (list license:expat license:mpl2.0))))
b2319996
DC
11184
11185(define-public python2-publicsuffix2
f210e944 11186 (package-with-python2 python-publicsuffix2))
81f1515d
DC
11187
11188(define-public python-url
11189 (package
11190 (name "python-url")
11191 (version "0.2.0")
11192 (source (origin
11193 (method url-fetch)
11194 (uri (pypi-uri "url" version))
11195 (sha256
11196 (base32
11197 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11198 (build-system python-build-system)
f22efa01 11199 (propagated-inputs
81f1515d
DC
11200 `(("python-publicsuffix" ,python-publicsuffix)))
11201 (native-inputs
11202 `(("python-coverage" ,python-coverage)
11203 ("python-nose" ,python-nose)))
11204 (arguments
11205 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11206 (home-page "http://github.com/seomoz/url-py")
11207 (synopsis "URL Parsing")
11208 (description "Library for parsing urls.")
11209 (license license:expat)
11210 (properties `((python2-variant . ,(delay python2-url))))))
11211
11212(define-public python2-url
11213 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11214 (package (inherit base)
f22efa01 11215 (propagated-inputs
f210e944 11216 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
11217
11218(define-public python-freezegun
11219 (package
11220 (name "python-freezegun")
11221 (version "0.3.7")
11222 (source
11223 (origin
11224 (method url-fetch)
11225 (uri (pypi-uri "freezegun" version))
11226 (sha256
11227 (base32
11228 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
11229 (build-system python-build-system)
11230 (native-inputs
11231 `(("python-mock" ,python-mock)
11232 ("python-nose" ,python-nose)
4e096968 11233 ("python-coverage" ,python-coverage)))
f22efa01 11234 (propagated-inputs
4e096968 11235 `(("python-six" ,python-six)
22d7360b 11236 ("python-dateutil" ,python-dateutil)))
974ee2c1
TS
11237 (arguments
11238 `(#:phases (modify-phases %standard-phases
11239 ;; The tests are normally executed via `make test`, but the PyPi
11240 ;; package does not include the Makefile.
11241 (replace 'check
11242 (lambda _
11243 (zero? (system* "nosetests" "./tests/")))))))
11244 (home-page "https://github.com/spulec/freezegun")
11245 (synopsis "Test utility for mocking the datetime module")
11246 (description
11247 "FreezeGun is a library that allows your python tests to travel through
11248time by mocking the datetime module.")
11249 (license license:asl2.0)))
11250
11251(define-public python2-freezegun
f210e944
HG
11252 (package-with-python2 python-freezegun))
11253
dddcb25c
MB
11254
11255(define-public python-odfpy
11256 (package
11257 (name "python-odfpy")
11258 (version "1.3.3")
11259 (source (origin
11260 (method url-fetch)
11261 (uri (pypi-uri "odfpy" version))
11262 (sha256
11263 (base32
11264 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11265 (arguments
11266 `(#:modules ((srfi srfi-1)
11267 (guix build python-build-system)
11268 (guix build utils))
11269 #:phases
11270 (modify-phases %standard-phases
11271 (replace 'check
11272 ;; The test runner invokes python2 and python3 for test*.py.
11273 ;; To avoid having both in inputs, we replicate it here.
11274 (lambda _
11275 (every (lambda (test-file)
11276 (zero? (system* "python" test-file)))
11277 (find-files "tests" "^test.*\\.py$")))))))
11278 (build-system python-build-system)
11279 (home-page "https://github.com/eea/odfpy")
11280 (synopsis "Python API and tools to manipulate OpenDocument files")
11281 (description "Collection of libraries and utility programs written in
11282Python to manipulate OpenDocument 1.2 files.")
11283 (license
11284 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11285 ;; number of files with other licenses.
11286 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11287
11288(define-public python2-odfpy
11289 (package-with-python2 python-odfpy))
b30565bd
MB
11290
11291(define-public python-cachecontrol
11292 (package
11293 (name "python-cachecontrol")
11294 (version "0.11.6")
11295 (source
11296 (origin
11297 (method url-fetch)
11298 ;; Pypi does not have tests.
11299 (uri (string-append
11300 "https://github.com/ionrock/cachecontrol/archive/v"
11301 version ".tar.gz"))
11302 (file-name (string-append name "-" version ".tar.gz"))
11303 (sha256
11304 (base32
11305 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11306 (build-system python-build-system)
11307 (arguments
11308 `(#:phases
11309 (modify-phases %standard-phases
11310 (replace 'check
11311 (lambda _
11312 ;; Drop test that requires internet access.
11313 (delete-file "tests/test_regressions.py")
11314 (setenv "PYTHONPATH"
11315 (string-append (getcwd) "/build/lib:"
11316 (getenv "PYTHONPATH")))
11317 (zero? (system* "py.test" "-vv")))))))
11318 (native-inputs
11319 `(("python-pytest" ,python-pytest)
11320 ("python-redis" ,python-redis)
11321 ("python-webtest" ,python-webtest)
11322 ("python-mock" ,python-mock)))
11323 (propagated-inputs
11324 `(("python-requests" ,python-requests)
11325 ("python-lockfile" ,python-lockfile)))
11326 (home-page "https://github.com/ionrock/cachecontrol")
11327 (synopsis "The httplib2 caching algorithms for use with requests")
11328 (description "CacheControl is a port of the caching algorithms in
11329@code{httplib2} for use with @code{requests} session objects.")
f210e944 11330 (license license:asl2.0)))
b30565bd
MB
11331
11332(define-public python2-cachecontrol
f210e944 11333 (package-with-python2 python-cachecontrol))
243db824
DM
11334
11335(define-public python-lit
11336 (package
11337 (name "python-lit")
11338 (version "0.5.0")
11339 (source
11340 (origin
11341 (method url-fetch)
11342 (uri (pypi-uri "lit" version))
11343 (sha256
11344 (base32
11345 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11346 (build-system python-build-system)
11347 (home-page "http://llvm.org/")
11348 (synopsis "LLVM Software Testing Tool")
11349 (description "@code{lit} is a portable tool for executing LLVM and Clang
11350style test suites, summarizing their results, and providing indication of
11351failures.")
f210e944 11352 (license license:ncsa)))
243db824
DM
11353
11354(define-public python2-lit
f210e944 11355 (package-with-python2 python-lit))
66f95b20
MB
11356
11357(define-public python-pytest-pep8
11358 (package
11359 (name "python-pytest-pep8")
11360 (version "1.0.6")
11361 (source (origin
11362 (method url-fetch)
11363 (uri (pypi-uri "pytest-pep8" version))
11364 (sha256
11365 (base32
11366 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11367 (build-system python-build-system)
11368 (arguments
b41a05ce 11369 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
11370 (native-inputs
11371 `(("python-pytest" ,python-pytest)))
11372 (propagated-inputs
11373 `(("python-pep8" ,python-pep8)))
11374 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11375 (synopsis "Py.test plugin to check PEP8 requirements")
11376 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 11377 (license license:expat)))
66f95b20
MB
11378
11379(define-public python2-pytest-pep8
f210e944 11380 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
11381
11382(define-public python-pytest-flakes
11383 (package
11384 (name "python-pytest-flakes")
11385 (version "1.0.1")
11386 (source (origin
11387 (method url-fetch)
11388 (uri (pypi-uri "pytest-flakes" version))
11389 (sha256
11390 (base32
11391 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11392 (build-system python-build-system)
11393 (arguments
b41a05ce 11394 `(#:phases
df94a6b5
MB
11395 (modify-phases %standard-phases
11396 (delete 'check)
11397 (add-after 'install 'check
05c2fd36
HG
11398 (lambda* (#:key outputs inputs #:allow-other-keys)
11399 ;; It's easier to run tests after install.
11400 ;; Make installed package available for running the tests
11401 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
11402 (zero? (system* "py.test" "-vv")))))))
11403 (native-inputs
11404 `(("python-coverage" ,python-coverage)
11405 ("python-pytest" ,python-pytest)
11406 ("python-pytest-cache" ,python-pytest-cache)
11407 ("python-pytest-pep8" ,python-pytest-pep8)))
11408 (propagated-inputs
11409 `(("python-pyflakes" ,python-pyflakes)))
11410 (home-page "https://github.com/fschulze/pytest-flakes")
11411 (synopsis "Py.test plugin to check source code with pyflakes")
11412 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 11413 (license license:expat)))
df94a6b5
MB
11414
11415(define-public python2-pytest-flakes
f210e944 11416 (package-with-python2 python-pytest-flakes))
5467ea62
MB
11417
11418(define-public python-natsort
11419 (package
11420 (name "python-natsort")
11421 (version "5.0.1")
11422 (source (origin
11423 (method url-fetch)
11424 (uri (pypi-uri "natsort" version))
11425 (sha256
11426 (base32
11427 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11428 (build-system python-build-system)
11429 (arguments
11430 `(#:phases
11431 (modify-phases %standard-phases
11432 (add-before 'check 'set-cachedir
11433 ;; Tests require write access to $HOME by default
11434 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11435 (native-inputs
11436 `(("python-hypothesis" ,python-hypothesis)
11437 ("python-pytest-cache" ,python-pytest-cache)
11438 ("python-pytest-cov" ,python-pytest-cov)
11439 ("python-pytest-flakes" ,python-pytest-flakes)
11440 ("python-pytest-pep8" ,python-pytest-pep8)))
11441 (propagated-inputs ; TODO: Add python-fastnumbers.
11442 `(("python-pyicu" ,python-pyicu)))
11443 (home-page "https://github.com/SethMMorton/natsort")
11444 (synopsis "Natural sorting for python and shell")
11445 (description
11446 "Natsort lets you apply natural sorting on lists instead of
11447lexicographical. If you use the built-in @code{sorted} method in python
11448on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11449returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11450function @code{natsorted} that identifies numbers and sorts them separately
11451from strings. It can also sort version numbers, real numbers, mixed types
11452and more, and comes with a shell command @command{natsort} that exposes this
11453functionality in the command line.")
11454 (license license:expat)
11455 (properties `((python2-variant . ,(delay python2-natsort))))))
11456
11457(define-public python2-natsort
11458 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11459 (package (inherit base)
11460 (native-inputs
00e10c6e 11461 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
11462 ("python2-mock" ,python2-mock)
11463 ("python2-enum34" ,python2-enum34)
11464 ,@(package-native-inputs base))))))
4efb9c54
SR
11465
11466(define-public python-glances
11467 (package
11468 (name "python-glances")
11469 (version "2.7.1")
11470 (source
11471 (origin
11472 (method url-fetch)
11473 (uri (pypi-uri "Glances" version))
11474 (sha256
11475 (base32
11476 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11477 (build-system python-build-system)
f22efa01 11478 (propagated-inputs
4efb9c54
SR
11479 `(("python-psutil" ,python-psutil)))
11480 (home-page
11481 "https://github.com/nicolargo/glances")
11482 (synopsis
11483 "A cross-platform curses-based monitoring tool")
11484 (description
11485 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11486Glances uses the PsUtil library to get information from your system. It monitors
11487CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 11488 (license license:lgpl3+)))
4efb9c54
SR
11489
11490(define-public python2-glances
f210e944 11491 (package-with-python2 python-glances))
05b7a593
EF
11492
11493(define-public python-graphql-core
11494 (package
11495 (name "python-graphql-core")
11496 (version "0.5.3")
11497 (source
11498 (origin
11499 (method url-fetch)
11500 (uri (pypi-uri "graphql-core" version))
11501 (sha256
11502 (base32
11503 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11504 (build-system python-build-system)
11505 (arguments
326f8285
LF
11506 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11507 #:phases
05b7a593
EF
11508 (modify-phases %standard-phases
11509 (add-after 'unpack 'patch-hardcoded-version
11510 (lambda _ (substitute*
11511 "setup.py"
11512 (("'gevent==1.1rc1'") "'gevent'"))
11513 #t)))))
11514 (native-inputs
11515 `(("python-gevent" ,python-gevent)
11516 ("python-mock" ,python-mock)
11517 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 11518 (propagated-inputs
05b7a593
EF
11519 `(("python-promise" ,python-promise)
11520 ("python-six" ,python-six)))
11521 (home-page "https://github.com/graphql-python/graphql-core")
11522 (synopsis "GraphQL implementation for Python")
11523 (description
11524 "GraphQL implementation for Python. GraphQL is a data query language and
11525runtime designed and used to request and deliver data to mobile and web apps.
11526This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11527to Python.")
05b7a593
EF
11528 (license license:expat)))
11529
11530(define-public python2-graphql-core
f210e944 11531 (package-with-python2 python-graphql-core))
7ee51575
EF
11532
11533(define-public python-graphql-relay
11534 (package
11535 (name "python-graphql-relay")
11536 (version "0.4.4")
11537 (source
11538 (origin
11539 (method url-fetch)
11540 (uri (pypi-uri "graphql-relay" version))
11541 (sha256
11542 (base32
11543 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11544 (build-system python-build-system)
11545 (native-inputs
11546 `(("python-pytest" ,python-pytest)))
f22efa01 11547 (propagated-inputs
7ee51575
EF
11548 `(("python-graphql-core" ,python-graphql-core)
11549 ("python-promise" ,python-promise)
11550 ("python-six" ,python-six)))
11551 (home-page "https://github.com/graphql-python/graphql-relay-py")
11552 (synopsis "Relay implementation for Python")
11553 (description
11554 "This is a library to allow the easy creation of Relay-compliant servers
11555using the GraphQL Python reference implementation of a GraphQL server. It
11556should be noted that the code is a exact port of the original
11557@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11558from Facebook.")
7ee51575
EF
11559 (license license:expat)))
11560
11561(define-public python2-graphql-relay
f210e944 11562 (package-with-python2 python-graphql-relay))
ddc63a56
EF
11563
11564(define-public python-graphene
11565 (package
11566 (name "python-graphene")
11567 (version "0.10.2")
11568 (source
11569 (origin
11570 (method url-fetch)
11571 (uri (pypi-uri "graphene" version))
11572 (sha256
11573 (base32
11574 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11575 (build-system python-build-system)
11576 (native-inputs
11577 `(("python-django-filter" ,python-django-filter)
11578 ("python-mock" ,python-mock)
11579 ("python-psycopg2" ,python-psycopg2)
11580 ("python-pytest-django" ,python-pytest-django)
11581 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 11582 (propagated-inputs
ddc63a56
EF
11583 `(("python-graphql-core" ,python-graphql-core)
11584 ("python-graphql-relay" ,python-graphql-relay)
11585 ("python-iso8601" ,python-iso8601)
11586 ("python-promise" ,python-promise)
11587 ("python-six" ,python-six)))
11588 (home-page "http://graphene-python.org/")
11589 (synopsis "GraphQL Framework for Python")
11590 (description
11591 "Graphene is a Python library for building GraphQL schemas/types.
11592A GraphQL schema describes your data model, and provides a GraphQL server
11593with an associated set of resolve methods that know how to fetch data.")
11594 (properties `((python2-variant . ,(delay python2-graphene))))
11595 (license license:expat)))
11596
11597(define-public python2-graphene
11598 (let ((base (package-with-python2
11599 (strip-python2-variant python-graphene))))
11600 (package (inherit base)
11601 (native-inputs
00e10c6e 11602 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 11603 ,@(package-native-inputs base))))))
d488d5d6
EF
11604
11605(define-public python-nautilus
11606 (package
11607 (name "python-nautilus")
11608 (version "0.4.9")
11609 (source
11610 (origin
11611 (method url-fetch)
11612 (uri (pypi-uri "nautilus" version))
11613 (sha256
11614 (base32
11615 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11616 (build-system python-build-system)
11617 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 11618 (propagated-inputs
d488d5d6
EF
11619 `(("python-bcrypt" ,python-bcrypt)
11620 ("python-click" ,python-click)
11621 ("python-consul" ,python-consul)
d488d5d6
EF
11622 ("python-graphene" ,python-graphene)
11623 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
11624 ("python-peewee" ,python-peewee)
11625 ("python-pika" ,python-pika)
d488d5d6
EF
11626 ("python-tornado" ,python-tornado)
11627 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
11628 (native-inputs
11629 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
11630 (home-page "https://github.com/AlecAivazis/nautilus")
11631 (synopsis "Library for creating microservice applications")
11632 (description
11633 "Nautilus is a framework for flux based microservices that looks to
11634provide extendible implementations of common aspects of a cloud so that you can
11635focus on building massively scalable web applications.")
11636 (license license:expat)))
94cffc63 11637
66d3f50a
LF
11638(define-public python-betamax
11639 (package
11640 (name "python-betamax")
11641 (version "0.8.0")
11642 (source
11643 (origin
11644 (method url-fetch)
11645 (uri (pypi-uri "betamax" version))
11646 (sha256
11647 (base32
11648 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11649 (build-system python-build-system)
11650 (arguments
11651 '(;; Many tests fail because they require networking.
11652 #:tests? #f))
c415f763 11653 (propagated-inputs
66d3f50a
LF
11654 `(("python-requests" ,python-requests)))
11655 (home-page "https://github.com/sigmavirus24/betamax")
11656 (synopsis "Record HTTP interactions with python-requests")
11657 (description "Betamax will record your test suite's HTTP interactions and
11658replay them during future tests. It is designed to work with python-requests.")
f210e944 11659 (license license:expat)))
66d3f50a
LF
11660
11661(define-public python2-betamax
f210e944 11662 (package-with-python2 python-betamax))
ca0635b4 11663
94cffc63
LF
11664(define-public python-s3transfer
11665 (package
11666 (name "python-s3transfer")
11667 (version "0.1.8")
11668 (source (origin
11669 (method url-fetch)
11670 (uri (pypi-uri "s3transfer" version))
11671 (sha256
11672 (base32
11673 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11674 (build-system python-build-system)
fad8bf97
LF
11675 (arguments
11676 `(#:phases
11677 (modify-phases %standard-phases
11678 (replace 'check
11679 (lambda _
11680 ;; 7 of the 'integration' tests require network access or login
11681 ;; credentials.
11682 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 11683 (native-inputs
fad8bf97
LF
11684 `(("python-docutils" ,python-docutils)
11685 ("python-mock" ,python-mock)
11686 ("python-nose" ,python-nose)))
f22efa01 11687 (propagated-inputs
94cffc63
LF
11688 `(("python-botocore" ,python-botocore)))
11689 (synopsis "Amazon S3 Transfer Manager")
11690 (description "S3transfer is a Python library for managing Amazon S3
11691transfers.")
11692 (home-page "https://github.com/boto/s3transfer")
11693 (license license:asl2.0)
11694 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11695
11696(define-public python2-s3transfer
11697 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11698 (package
11699 (inherit base)
11700 (native-inputs
11701 `(("python2-futures" ,python2-futures)
94cffc63 11702 ,@(package-native-inputs base))))))
8ab59181
HG
11703
11704(define-public python-setproctitle
11705(package
11706 (name "python-setproctitle")
11707 (version "1.1.10")
11708 (source
11709 (origin
11710 (method url-fetch)
11711 (uri (pypi-uri "setproctitle" version))
11712 (sha256
11713 (base32
11714 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11715 (build-system python-build-system)
11716 (arguments
11717 '(#:phases
11718 (modify-phases %standard-phases
11719 (add-before 'check 'patch-Makefile
11720 ;; Stricly this is only required for the python2 variant.
11721 ;; But adding a phase in an inherited package seems to be
11722 ;; cumbersum. So we patch even for python3.
11723 (lambda _
11724 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11725 (when nose
11726 (substitute* "Makefile"
11727 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11728 (string-append nose "/bin/nosetests "))))
11729 #t)))
11730 (replace 'check
11731 (lambda _
11732 (setenv "PYTHON" (or (which "python3") (which "python")))
11733 (setenv "PYCONFIG" (or (which "python3-config")
11734 (which "python-config")))
11735 (setenv "CC" "gcc")
11736 ;; No need to extend PYTHONPATH to find the built package, since
11737 ;; the Makefile will build anyway
11738 (zero? (system* "make" "check")))))))
11739 (native-inputs
11740 `(("procps" ,procps))) ; required for tests
11741 (home-page
11742 "https://github.com/dvarrazzo/py-setproctitle")
11743 (synopsis
11744 "Setproctitle implementation for Python to customize the process title")
11745 (description "The library allows a process to change its title (as displayed
11746by system tools such as ps and top).
11747
11748Changing the title is mostly useful in multi-process systems, for
11749example when a master process is forked: changing the children's title
11750allows to identify the task each process is busy with. The technique
11751is used by PostgreSQL and the OpenSSH Server for example.")
11752 (license license:bsd-3)
11753 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11754
11755(define-public python2-setproctitle
11756 (let ((base (package-with-python2
11757 (strip-python2-variant python-setproctitle))))
11758 (package
11759 (inherit base)
11760 (native-inputs `(("python2-nose" ,python2-nose)
11761 ,@(package-native-inputs base))))))
162e42d8
HG
11762
11763(define-public python-validictory
11764 (package
11765 (name "python-validictory")
11766 (version "1.0.1")
11767 (source
11768 (origin
11769 (method url-fetch)
11770 (uri (pypi-uri "validictory" version))
11771 (sha256
11772 (base32
11773 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11774 (build-system python-build-system)
11775 (arguments
11776 '(#:phases
11777 (modify-phases %standard-phases
11778 (add-after 'unpack 'bootstrap
11779 ;; Move the tests out of the package directory to avoid
11780 ;; packaging them.
11781 (lambda* _
11782 (rename-file "validictory/tests" "tests")
11783 (delete-file "tests/__init__.py")))
11784 (replace 'check
11785 (lambda _
11786 ;; Extend PYTHONPATH so the built package will be found.
11787 (setenv "PYTHONPATH"
11788 (string-append (getcwd) "/build/lib:"
11789 (getenv "PYTHONPATH")))
11790 (zero? (system* "py.test" "-vv" )))))))
11791 (native-inputs
11792 `(("python-pytest" ,python-pytest)))
11793 (home-page
11794 "https://github.com/jamesturk/validictory")
11795 (synopsis "General purpose Python data validator")
11796 (description "It allows validation of arbitrary Python data structures.
11797
11798The schema format is based on the JSON Schema
11799proposal (http://json-schema.org), so combined with json the library is also
11800useful as a validator for JSON data.")
f210e944 11801 (license license:expat)))
162e42d8
HG
11802
11803(define-public python2-validictory
f210e944 11804 (package-with-python2 python-validictory))
0990edfe
DM
11805
11806(define-public python-aniso8601
11807 (package
11808 (name "python-aniso8601")
11809 (version "1.1.0")
11810 (source
11811 (origin
11812 (method url-fetch)
11813 (uri (pypi-uri "aniso8601" version))
11814 (sha256
11815 (base32
11816 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11817 (build-system python-build-system)
11818 (propagated-inputs
22d7360b 11819 `(("python-dateutil" ,python-dateutil)))
0990edfe
DM
11820 (home-page
11821 "https://bitbucket.org/nielsenb/aniso8601")
11822 (synopsis
11823 "Python library for parsing ISO 8601 strings")
11824 (description
11825 "This package contains a library for parsing ISO 8601 datetime strings.")
11826 (license license:bsd-3)))
999d964d
DM
11827
11828(define-public python-flask-restful
11829 (package
11830 (name "python-flask-restful")
11831 (version "0.3.5")
11832 (source
11833 (origin
11834 (method url-fetch)
11835 (uri (pypi-uri "Flask-RESTful" version))
11836 (sha256
11837 (base32
11838 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11839 (build-system python-build-system)
11840 (propagated-inputs
11841 `(("python-aniso8601" ,python-aniso8601)
11842 ("python-flask" ,python-flask)
11843 ("python-pycrypto" ,python-pycrypto)
11844 ("python-pytz" ,python-pytz)))
11845 (native-inputs
11846 `(;; Optional dependency of Flask. Tests need it.
11847 ("python-blinker" ,python-blinker)
11848 ("python-mock" ,python-mock) ; For tests
11849 ("python-nose" ,python-nose) ; For tests
11850 ("python-sphinx" ,python-sphinx)))
11851 (home-page
11852 "https://www.github.com/flask-restful/flask-restful/")
11853 (synopsis
11854 "Flask module for creating REST APIs")
11855 (description
11856 "This package contains a Flask module for creating REST APIs.")
11857 (license license:bsd-3)))
31288222
DM
11858
11859(define-public python-flask-basicauth
11860 (package
11861 (name "python-flask-basicauth")
11862 (version "0.2.0")
11863 (source
11864 (origin
11865 (method url-fetch)
11866 (uri (pypi-uri "Flask-BasicAuth" version))
11867 (sha256
11868 (base32
11869 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11870 (build-system python-build-system)
11871 (propagated-inputs
11872 `(("python-flask" ,python-flask)))
11873 (home-page
11874 "https://github.com/jpvanhal/flask-basicauth")
11875 (synopsis
11876 "HTTP basic access authentication for Flask")
11877 (description
11878 "This package provides HTTP basic access authentication for Flask.")
11879 (license license:bsd-3)))
903276d0
DM
11880
11881(define-public python-flask-sqlalchemy
11882 (package
11883 (name "python-flask-sqlalchemy")
11884 (version "2.1")
11885 (source
11886 (origin
11887 (method url-fetch)
11888 (uri (pypi-uri "Flask-SQLAlchemy" version))
11889 (sha256
11890 (base32
11891 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11892 (build-system python-build-system)
11893 (propagated-inputs
11894 `(("python-flask" ,python-flask)
11895 ("python-sqlalchemy" ,python-sqlalchemy)))
11896 (home-page
11897 "http://github.com/mitsuhiko/flask-sqlalchemy")
11898 (synopsis
11899 "Module adding SQLAlchemy support to your Flask application")
11900 (description
11901 "This package adds SQLAlchemy support to your Flask application.")
11902 (license license:bsd-3)))
329b4b3b
LF
11903
11904(define-public python-pyev
11905 (package
11906 (name "python-pyev")
11907 (version "0.9.0")
11908 (source
11909 (origin
11910 (method url-fetch)
11911 (uri (pypi-uri "pyev" version))
11912 (sha256
11913 (base32
11914 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11915 (build-system python-build-system)
11916 (arguments
11917 `(#:tests? #f ; no test suite
11918 #:phases
11919 (modify-phases %standard-phases
11920 (add-after 'unpack 'patch
11921 (lambda* (#:key inputs #:allow-other-keys)
11922 (let ((libev (string-append (assoc-ref inputs "libev")
11923 "/lib/libev.so.4")))
11924 (substitute* "setup.py"
11925 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11926 (string-append "libev_dll_name = \"" libev "\"")))))))))
11927 (inputs
11928 `(("libev" ,libev)))
11929 (home-page "http://pythonhosted.org/pyev/")
11930 (synopsis "Python libev interface")
11931 (description "Pyev provides a Python interface to libev.")
11932 (license license:gpl3)))
11933
11934(define-public python2-pyev
11935 (package-with-python2 python-pyev))
45b4f127
DM
11936
11937(define-public python-imagesize
11938 (package
11939 (name "python-imagesize")
11940 (version "0.7.1")
11941 (source
11942 (origin
11943 (method url-fetch)
11944 (uri (pypi-uri "imagesize" version))
11945 (sha256
11946 (base32
11947 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11948 (build-system python-build-system)
9422c98a
LF
11949 (arguments
11950 '(;; Test files are not distributed on PyPi:
11951 ;; https://github.com/shibukawa/imagesize_py/issues/7
11952 #:tests? #f))
45b4f127
DM
11953 (home-page "https://github.com/shibukawa/imagesize_py")
11954 (synopsis "Gets image size of files in variaous formats in Python")
11955 (description
11956 "This package allows determination of image size from
11957PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 11958 (license license:expat)))
45b4f127
DM
11959
11960(define-public python2-imagesize
f210e944 11961 (package-with-python2 python-imagesize))
2f6dd9cd
AI
11962
11963(define-public python-axolotl-curve25519
11964 (package
11965 (name "python-axolotl-curve25519")
11966 (version "0.1")
11967 (source
11968 (origin
11969 (method git-fetch)
11970 (uri (git-reference
11971 (url "git://github.com/tgalal/python-axolotl-curve25519")
11972 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11973 (file-name (string-append name "-" version "-checkout"))
11974 (sha256
11975 (base32
11976 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11977 (build-system python-build-system)
11978 (arguments
11979 `(;; Prevent creation of the egg. This works around
11980 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11981 #:configure-flags '("--root=/")))
2f6dd9cd
AI
11982 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11983 (synopsis "Python wrapper for curve25519 library")
11984 (description "This is a python wrapper for the curve25519 library
11985with ed25519 signatures. The C code was pulled from
11986libaxolotl-android. At the moment this wrapper is meant for use by
11987python-axolotl.")
11988 (license (list license:gpl3 ; Most files
683cdbf5 11989 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
11990
11991(define-public python2-axolotl-curve25519
11992 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
11993
11994(define-public python-axolotl
11995 (package
11996 (name "python-axolotl")
11997 (version "0.1.35")
11998 (source
11999 (origin
12000 (method url-fetch)
12001 (uri (string-append
12002 "https://github.com/tgalal/python-axolotl/archive/"
12003 version ".tar.gz"))
12004 (file-name (string-append name "-" version ".tar.gz"))
12005 (sha256
12006 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12007 (build-system python-build-system)
12008 (arguments
12009 `(#:phases
12010 (modify-phases %standard-phases
12011 ;; Don't install tests
12012 (add-before 'install 'remove-tests
12013 (lambda _
12014 (for-each delete-file-recursively
12015 '("axolotl/tests" "build/lib/axolotl/tests"))
01fb9f66 12016 #t)))))
06ff0837
AI
12017 (propagated-inputs
12018 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12019 ("python-dateutil" ,python-dateutil)
12020 ("python-protobuf" ,python-protobuf)
12021 ("python-pycrypto" ,python-pycrypto)))
12022 (home-page "https://github.com/tgalal/python-axolotl")
12023 (synopsis "Python port of libaxolotl-android")
12024 (description "This is a python port of libaxolotl-android. This
12025is a ratcheting forward secrecy protocol that works in synchronous and
12026asynchronous messaging environments.")
12027 (license license:gpl3)))
12028
12029(define-public python2-axolotl
12030 (package-with-python2 python-axolotl))
e2fca490
DM
12031
12032(define-public python-termstyle
12033 (package
12034 (name "python-termstyle")
12035 (version "0.1.11")
12036 (source
12037 (origin
12038 (method url-fetch)
12039 (uri (pypi-uri "termstyle" version))
12040 (sha256
12041 (base32
12042 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12043 (build-system python-build-system)
7917a135
MB
12044 (arguments
12045 '(#:phases
12046 (modify-phases %standard-phases
12047 (replace 'check
12048 (lambda _
12049 (zero? (system* "python" "test3.py")))))))
e2fca490
DM
12050 (home-page "http://github.com/gfxmonk/termstyle")
12051 (synopsis "Console text coloring for Python")
12052 (description "This package provides console text coloring for Python.")
12053 (license license:bsd-3)))
1e6112d8
DM
12054
12055(define-public python-rednose
12056 (package
12057 (name "python-rednose")
12058 (version "1.2.1")
12059 (source
12060 (origin
12061 (method url-fetch)
12062 (uri (pypi-uri "rednose" version))
12063 (sha256
12064 (base32
12065 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
12066 (build-system python-build-system)
12067 (arguments
12068 `(#:phases
12069 (modify-phases %standard-phases
12070 (add-after 'unpack 'fix-deps
12071 (lambda _
12072 ;; See <https://github.com/JBKahn/rednose/issues/12>
12073 (substitute* "setup.py"
12074 (("python-termstyle") "termstyle"))
12075 #t)))))
12076 (propagated-inputs
12077 `(("python-colorama" ,python-colorama)
12078 ("python-termstyle" ,python-termstyle)))
12079 (native-inputs
12080 `(("python-six" ,python-six)
12081 ("python-nose" ,python-nose)))
12082 (home-page "https://github.com/JBKahn/rednose")
12083 (synopsis "Colored output for Python nosetests")
12084 (description "This package provides colored output for the
12085@command{nosetests} command of the Python Nose unit test framework.")
12086 (license license:bsd-3)))
0a7f17f0
DM
12087
12088(define-public python-flask-restplus
12089 (package
12090 (name "python-flask-restplus")
12091 (version "0.9.2")
12092 (source
12093 (origin
12094 (method url-fetch)
12095 (uri (pypi-uri "flask-restplus" version))
12096 (sha256
12097 (base32
12098 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
12099 (build-system python-build-system)
59f74825
MB
12100 (arguments
12101 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
12102 ;; #:phases
12103 ;; (modify-phases %standard-phases
12104 ;; (replace 'check
12105 ;; (lambda _
12106 ;; (zero? (system* "nosetests")))))))
0a7f17f0
DM
12107 (propagated-inputs
12108 `(("python-aniso8601" ,python-aniso8601)
12109 ("python-flask" ,python-flask)
12110 ("python-jsonschema" ,python-jsonschema)
12111 ("python-pytz" ,python-pytz)
12112 ("python-six" ,python-six)))
12113 (native-inputs
12114 `(("python-tzlocal" ,python-tzlocal)
12115 ("python-blinker" ,python-blinker)
12116 ("python-nose" ,python-nose)
12117 ("python-rednose" ,python-rednose)))
12118 (home-page "https://github.com/noirbizarre/flask-restplus")
12119 (synopsis "Framework for documented API development with Flask")
12120 (description "This package provides a framework for API development with
12121the Flask web framework in Python. It is similar to package
12122@code{python-flask-restful} but supports the @code{python-swagger}
12123documentation builder.")
12124 (license license:expat)))
1ed21519
DM
12125
12126(define-public python-sadisplay
12127 (package
12128 (name "python-sadisplay")
12129 (version "0.4.6")
12130 (source
12131 (origin
12132 (method url-fetch)
12133 (uri (pypi-uri "sadisplay" version))
12134 (sha256
12135 (base32
12136 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
12137 (build-system python-build-system)
12138 (propagated-inputs
12139 `(("python-sqlalchemy" ,python-sqlalchemy)))
12140 (native-inputs
12141 `(("python-nose" ,python-nose)))
12142 (home-page "https://bitbucket.org/estin/sadisplay")
12143 (synopsis "SQLAlchemy schema displayer")
12144 (description "This package provides a program to build Entity
12145Relationship diagrams from a SQLAlchemy model (or directly from the
12146database).")
12147 (license license:bsd-3)))
12148
12149(define-public python2-sadisplay
12150 (package-with-python2 python-sadisplay))
444a79b6
DM
12151
12152(define-public python-flask-restful-swagger
12153 (package
12154 (name "python-flask-restful-swagger")
12155 (version "0.19")
12156 (source
12157 (origin
12158 (method url-fetch)
12159 (uri (pypi-uri "flask-restful-swagger" version))
12160 (sha256
12161 (base32
12162 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
12163 (build-system python-build-system)
12164 (propagated-inputs
12165 `(("python-flask-restful" ,python-flask-restful)))
12166 (home-page "https://github.com/rantav/flask-restful-swagger")
12167 (synopsis "Extract Swagger specs from Flask-Restful projects")
12168 (description "This package lets you extract Swagger API documentation
12169specs from your Flask-Restful projects.")
12170 (license license:expat)))
12171
12172(define-public python2-flask-restful-swagger
12173 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
12174
12175(define-public python-argcomplete
12176 (package
12177 (name "python-argcomplete")
12178 (version "1.7.0")
12179 (source
12180 (origin
12181 (method url-fetch)
12182 (uri (pypi-uri "argcomplete" version))
12183 (sha256
12184 (base32
12185 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
12186 (build-system python-build-system)
80ce42bd
MB
12187 (native-inputs
12188 `(("python-pexpect" ,python-pexpect)
12189 ("tcsh" ,tcsh)))
6c2e82bc
TGR
12190 (home-page "https://github.com/kislyuk/argcomplete")
12191 (synopsis "Shell tab completion for Python argparse")
12192 (description "argcomplete provides extensible command line tab completion
12193of arguments and options for Python scripts using @code{argparse}. It's
12194particularly useful for programs with many options or sub-parsers that can
12195dynamically suggest completions; for example, when browsing resources over the
12196network.")
12197 (license license:asl2.0)))
12198
12199(define-public python2-argcomplete
12200 (package-with-python2 python-argcomplete))