gnu: python-flask-restplus: 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)
0da98533 77 #:use-module (gnu packages maths)
4ed20663 78 #:use-module (gnu packages multiprecision)
45203542 79 #:use-module (gnu packages networking)
be7134bf 80 #:use-module (gnu packages ncurses)
b04a52a6 81 #:use-module (gnu packages openstack)
d488d5d6 82 #:use-module (gnu packages password-utils)
c9b1b4f9 83 #:use-module (gnu packages pcre)
4ed20663 84 #:use-module (gnu packages perl)
b10ab723 85 #:use-module (gnu packages pkg-config)
06ff0837 86 #:use-module (gnu packages protobuf)
4ed20663 87 #:use-module (gnu packages readline)
6eb7af2a 88 #:use-module (gnu packages sdl)
c9b1b4f9 89 #:use-module (gnu packages statistics)
8f9ac901 90 #:use-module (gnu packages tex)
1c65314c 91 #:use-module (gnu packages texinfo)
cc2b77df 92 #:use-module (gnu packages tls)
e25f0174 93 #:use-module (gnu packages version-control)
02f8f804 94 #:use-module (gnu packages video)
8d12be1e 95 #:use-module (gnu packages web)
ce0614dd 96 #:use-module (gnu packages base)
26b307e2 97 #:use-module (gnu packages xml)
6fa14469 98 #:use-module (gnu packages xorg)
0bdc1671 99 #:use-module (gnu packages xdisorg)
4ed20663 100 #:use-module (gnu packages zip)
afa181ff 101 #:use-module (gnu packages tcl)
63bcec71 102 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
103 #:use-module (guix packages)
104 #:use-module (guix download)
ea5456c8 105 #:use-module (guix git-download)
11bb85a1 106 #:use-module (guix utils)
acc26ff1 107 #:use-module (guix build-system gnu)
d8c4998f 108 #:use-module (guix build-system cmake)
898238b9 109 #:use-module (guix build-system python)
1c65314c
FB
110 #:use-module (guix build-system trivial)
111 #:use-module (srfi srfi-1))
a01b6da7 112
45848023 113(define-public python-2.7
a01b6da7
NK
114 (package
115 (name "python")
f0499100 116 (version "2.7.12")
a01b6da7
NK
117 (source
118 (origin
119 (method url-fetch)
9b43a0ff 120 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
121 version "/Python-" version ".tar.xz"))
122 (sha256
123 (base32
f0499100 124 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
125 (patches (search-patches "python-2.7-search-paths.patch"
126 "python-2-deterministic-build-info.patch"
15e57f57 127 "python-2.7-site-prefixes.patch"
c3052d6b 128 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
129 (modules '((guix build utils)))
130 ;; suboptimal to delete failing tests here, but if we delete them in the
131 ;; arguments then we need to make sure to strip out that phase when it
132 ;; gets inherited by python and python-minimal.
133 (snippet
134 '(begin
135 (for-each delete-file
136 '("Lib/test/test_compileall.py"
f0499100 137 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
138 "Lib/test/test_distutils.py"
139 "Lib/test/test_import.py"
140 "Lib/test/test_shutil.py"
141 "Lib/test/test_socket.py"
1bb163b0 142 "Lib/test/test_subprocess.py"))
10a42aa2 143 #t))))
02f0c3b2
LC
144 (outputs '("out"
145 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 146 (build-system gnu-build-system)
3fdc99da 147 (arguments
10a42aa2 148 `(;; 356 tests OK.
e7e7a1eb
EF
149 ;; 6 tests failed:
150 ;; test_compileall test_distutils test_import test_shutil test_socket
151 ;; test_subprocess
152 ;; 39 tests skipped:
ff6f33cf
ED
153 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
154 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
155 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
156 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
157 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
158 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
159 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
160 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
161 ;; test_winreg test_winsound test_zipfile64
162 ;; 4 skips unexpected on linux2:
163 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 164 #:test-target "test"
3fdc99da 165 #:configure-flags
6a20289d
LC
166 (list "--enable-shared" ;allow embedding
167 "--with-system-ffi" ;build ctypes
aaf75c89 168 "--with-ensurepip=install" ;install pip and setuptools
6a20289d
LC
169 (string-append "LDFLAGS=-Wl,-rpath="
170 (assoc-ref %outputs "out") "/lib"))
fd982732 171
d2cc9c7c
LC
172 #:modules ((ice-9 ftw) (ice-9 match)
173 (guix build utils) (guix build gnu-build-system))
fd982732 174 #:phases
46472ecd
MW
175 (modify-phases %standard-phases
176 (add-before
177 'configure 'patch-lib-shells
178 (lambda _
179 ;; Filter for existing files, since some may not exist in all
180 ;; versions of python that are built with this recipe.
181 (substitute* (filter file-exists?
182 '("Lib/subprocess.py"
183 "Lib/popen2.py"
184 "Lib/distutils/tests/test_spawn.py"
185 "Lib/test/test_subprocess.py"))
186 (("/bin/sh") (which "sh")))
dedc8320
LC
187
188 ;; Use zero as the timestamp in .pyc files so that builds are
189 ;; deterministic. TODO: Remove it when this variable is set in
190 ;; gnu-build-system.scm.
a665996f 191 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 192 #t))
5b4e2791
LC
193 (add-before 'configure 'do-not-record-configure-flags
194 (lambda* (#:key configure-flags #:allow-other-keys)
195 ;; Remove configure flags from the installed '_sysconfigdata.py'
196 ;; and 'Makefile' so we don't end up keeping references to the
197 ;; build tools.
198 ;;
199 ;; Preserve at least '--with-system-ffi' since otherwise the
200 ;; thing tries to build libffi, fails, and we end up with a
201 ;; Python that lacks ctypes.
202 (substitute* "configure"
203 (("^CONFIG_ARGS=.*$")
204 (format #f "CONFIG_ARGS='~a'\n"
205 (if (member "--with-system-ffi" configure-flags)
206 "--with-system-ffi"
207 ""))))
208 #t))
46472ecd
MW
209 (add-before
210 'check 'pre-check
211 (lambda _
212 ;; 'Lib/test/test_site.py' needs a valid $HOME
213 (setenv "HOME" (getcwd))
214 #t))
215 (add-after
216 'unpack 'set-source-file-times-to-1980
217 ;; XXX One of the tests uses a ZIP library to pack up some of the
218 ;; source tree, and fails with "ZIP does not support timestamps
219 ;; before 1980". Work around this by setting the file times in the
220 ;; source tree to sometime in early 1980.
221 (lambda _
222 (let ((circa-1980 (* 10 366 24 60 60)))
223 (ftw "." (lambda (file stat flag)
224 (utime file circa-1980 circa-1980)
225 #t))
02f0c3b2 226 #t)))
9ffe61b0
LC
227 (add-after 'install 'remove-tests
228 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
229 ;; because these files are used by some libraries out there.
230 (lambda* (#:key outputs #:allow-other-keys)
231 (let ((out (assoc-ref outputs "out")))
232 (match (scandir (string-append out "/lib")
233 (lambda (name)
234 (string-prefix? "python" name)))
235 ((pythonX.Y)
236 (let ((testdir (string-append out "/lib/" pythonX.Y
237 "/test")))
238 (with-directory-excursion testdir
239 (for-each delete-file-recursively
240 (scandir testdir
241 (match-lambda
242 ((or "." "..") #f)
243 (file
244 (not
245 (string-prefix? "test_support."
246 file))))))
247 (call-with-output-file "__init__.py" (const #t))
248 #t)))))))
216c283b
LC
249 (add-before 'strip 'make-libraries-writable
250 (lambda* (#:key outputs #:allow-other-keys)
251 ;; Make .so files writable so they can be stripped.
252 (let ((out (assoc-ref outputs "out")))
253 (for-each (lambda (file)
254 (chmod file #o755))
255 (find-files (string-append out "/lib")
256 "\\.so"))
257 #t)))
02f0c3b2
LC
258 (add-after 'install 'move-tk-inter
259 (lambda* (#:key outputs #:allow-other-keys)
260 ;; When Tkinter support is built move it to a separate output so
261 ;; that the main output doesn't contain a reference to Tcl/Tk.
262 (let ((out (assoc-ref outputs "out"))
263 (tk (assoc-ref outputs "tk")))
264 (when tk
265 (match (find-files out "tkinter.*\\.so")
266 ((tkinter.so)
267 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
268 ;; want it under TK/lib/pythonX.Y/site-packages.
269 (let* ((len (string-length out))
270 (target (string-append
271 tk "/"
272 (string-drop
273 (dirname (dirname tkinter.so))
274 len)
275 "/site-packages")))
276 (install-file tkinter.so target)
277 (delete-file tkinter.so)))))
278 #t))))))
a01b6da7 279 (inputs
3fdc99da
CR
280 `(("bzip2" ,bzip2)
281 ("gdbm" ,gdbm)
b10ab723 282 ("libffi" ,libffi) ; for ctypes
b88e1b0a 283 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 284 ("openssl" ,openssl)
3fdc99da 285 ("readline" ,readline)
afa181ff
LC
286 ("zlib" ,zlib)
287 ("tcl" ,tcl)
288 ("tk" ,tk))) ; for tkinter
b10ab723
CR
289 (native-inputs
290 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
291 (native-search-paths
292 (list (search-path-specification
293 (variable "PYTHONPATH")
af070955 294 (files '("lib/python2.7/site-packages")))))
f0499100 295 (home-page "https://www.python.org")
afa181ff 296 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
297 (description
298 "Python is a remarkably powerful dynamic programming language that
299is used in a wide variety of application domains. Some of its key
300distinguishing features include: clear, readable syntax; strong
301introspection capabilities; intuitive object orientation; natural
302expression of procedural code; full modularity, supporting hierarchical
303packages; exception-based error handling; and very high level dynamic
304data types.")
3f641af0 305 (license license:psfl)))
acc26ff1 306
45848023
HG
307;; Current 2.x version.
308(define-public python-2 python-2.7)
309
72df6680 310(define-public python-3.5
b24d1cfc 311 (package (inherit python-2)
72df6680 312 (version "3.5.2")
717003e3
LC
313 (source (origin
314 (method url-fetch)
315 (uri (string-append "https://www.python.org/ftp/python/"
316 version "/Python-" version ".tar.xz"))
fc1adab1
AK
317 (patches (search-patches
318 "python-fix-tests.patch"
72df6680 319 "python-3.5-fix-tests.patch"
fc1adab1
AK
320 "python-3-deterministic-build-info.patch"
321 "python-3-search-paths.patch"))
717003e3
LC
322 (patch-flags '("-p0"))
323 (sha256
324 (base32
72df6680 325 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
326 (arguments (substitute-keyword-arguments (package-arguments python-2)
327 ((#:tests? _) #t)))
1aebc0cb
AE
328 (native-search-paths
329 (list (search-path-specification
330 (variable "PYTHONPATH")
0e05d01e
SB
331 (files (list (string-append "lib/python"
332 (version-major+minor version)
333 "/site-packages"))))))))
f26a77ff 334
72df6680
LF
335(define-public python-3.4
336 (package (inherit python-3.5)
337 (version "3.4.5")
338 (source (origin
339 (method url-fetch)
340 (uri (string-append "https://www.python.org/ftp/python/"
341 version "/Python-" version ".tar.xz"))
342 (patches (search-patches
343 "python-fix-tests.patch"
344 "python-3.4-fix-tests.patch"
345 "python-3-deterministic-build-info.patch"
346 "python-3-search-paths.patch"))
347 (patch-flags '("-p0"))
348 (sha256
349 (base32
350 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
351
45848023 352;; Current 3.x version.
72df6680 353(define-public python-3 python-3.5)
45848023
HG
354
355;; Current major version.
356(define-public python python-3)
357
95288fcc
LC
358;; Minimal variants of Python, mostly used to break the cycle between Tk and
359;; Python (Tk -> libxcb -> Python.)
360
361(define-public python2-minimal
362 (package (inherit python-2)
363 (name "python-minimal")
02f0c3b2 364 (outputs '("out"))
95288fcc
LC
365 (arguments
366 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
367 ((#:configure-flags cf)
368 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
369 (inputs '()))) ;none of the optional dependencies
370
371(define-public python-minimal
898238b9 372 (package (inherit python)
95288fcc 373 (name "python-minimal")
02f0c3b2 374 (outputs '("out"))
95288fcc 375
d0b73960 376 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
377 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
378 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
379 (inputs `(("libffi" ,libffi)
380 ("openssl" ,openssl)
95288fcc
LC
381 ("zlib" ,zlib)))))
382
64cb064c
LC
383(define* (wrap-python3 python
384 #:optional
385 (name (string-append (package-name python) "-wrapper")))
898238b9 386 (package (inherit python)
95288fcc 387 (name name)
898238b9
AE
388 (source #f)
389 (build-system trivial-build-system)
02f0c3b2 390 (outputs '("out"))
3969ca54 391 (inputs `(("bash" ,bash)))
3c0f2329 392 (propagated-inputs `(("python" ,python)))
898238b9
AE
393 (arguments
394 `(#:modules ((guix build utils))
395 #:builder
396 (begin
397 (use-modules (guix build utils))
398 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
399 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
400 (mkdir-p bin)
401 (for-each
402 (lambda (old new)
403 (symlink (string-append python old)
404 (string-append bin "/" new)))
3969ca54
SB
405 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
406 `("python" ,"pydoc" ,"idle" ,"pip"))
407 ;; python-config outputs search paths based upon its location,
408 ;; use a bash wrapper to avoid changing its outputs.
409 (let ((bash (string-append (assoc-ref %build-inputs "bash")
410 "/bin/bash"))
411 (old (string-append python "python3-config"))
412 (new (string-append bin "/python-config")))
413 (with-output-to-file new
414 (lambda ()
415 (format #t "#!~a~%" bash)
416 (format #t "exec \"~a\" \"$@\"~%" old)
417 (chmod new #o755)
418 #t)))))))
0d56e3e1
LC
419 (synopsis "Wrapper for the Python 3 commands")
420 (description
421 "This package provides wrappers for the commands of Python@tie{}3.x such
422that they can be invoked under their usual name---e.g., @command{python}
423instead of @command{python3}.")))
424
95288fcc
LC
425(define-public python-wrapper (wrap-python3 python))
426(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 427
aaf625b8
RW
428(define-public python-psutil
429 (package
430 (name "python-psutil")
88535a44 431 (version "4.3.0")
aaf625b8
RW
432 (source
433 (origin
434 (method url-fetch)
f56777be 435 (uri (pypi-uri "psutil" version))
aaf625b8
RW
436 (sha256
437 (base32
88535a44 438 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 439 (build-system python-build-system)
fb08c4fe
MB
440 (arguments
441 ;; FIXME: some tests does not return and times out.
442 '(#:tests? #f))
88535a44 443 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
444 (synopsis "Library for retrieving information on running processes")
445 (description
446 "psutil (Python system and process utilities) is a library for retrieving
447information on running processes and system utilization (CPU, memory, disks,
448network) in Python. It is useful mainly for system monitoring, profiling and
449limiting process resources and management of running processes. It implements
450many functionalities offered by command line tools such as: ps, top, lsof,
451netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
452pidof, tty, taskset, pmap.")
3f641af0 453 (license license:bsd-3)))
aaf625b8
RW
454
455(define-public python2-psutil
456 (package-with-python2 python-psutil))
898238b9 457
f9da1d8a
ED
458(define-public python-passlib
459 (package
460 (name "python-passlib")
1c9f78ec 461 (version "1.7.0")
f9da1d8a
ED
462 (source
463 (origin
464 (method url-fetch)
690e8c66 465 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
466 (sha256
467 (base32
1c9f78ec 468 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
f9da1d8a
ED
469 (build-system python-build-system)
470 (native-inputs
f3b98f4f 471 `(("python-nose" ,python-nose)))
f22efa01 472 (propagated-inputs
f9da1d8a
ED
473 `(("python-py-bcrypt" ,python-py-bcrypt)))
474 (arguments
475 `(#:phases
476 (alist-cons-before
477 'check 'set-PYTHON_EGG_CACHE
478 ;; some tests require access to "$HOME/.cython"
479 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
480 %standard-phases)))
481 (home-page "https://bitbucket.org/ecollins/passlib")
482 (synopsis
483 "Comprehensive password hashing framework")
484 (description
485 "Passlib is a password hashing library for Python 2 & 3, which provides
486cross-platform implementations of over 30 password hashing algorithms, as well
487as a framework for managing existing password hashes. It's designed to be
488useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
489to providing full-strength password hashing for multi-user application.")
3f641af0 490 (license license:bsd-3)))
f9da1d8a
ED
491
492(define-public python2-passlib
493 (package-with-python2 python-passlib))
494
feb0d9c3
ED
495(define-public python-py-bcrypt
496 (package
497 (name "python-py-bcrypt")
498 (version "0.4")
499 (source
500 (origin
501 (method url-fetch)
502 (uri (string-append
503 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
504 version
505 ".tar.gz"))
506 (sha256
507 (base32
508 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
509 (build-system python-build-system)
feb0d9c3
ED
510 (home-page "https://code.google.com/p/py-bcrypt")
511 (synopsis
512 "Bcrypt password hashing and key derivation")
513 (description
514 "A python wrapper of OpenBSD's Blowfish password hashing code. This
515system hashes passwords using a version of Bruce Schneier's Blowfish block
516cipher with modifications designed to raise the cost of off-line password
517cracking and frustrate fast hardware implementation. The computation cost of
518the algorithm is parametised, so it can be increased as computers get faster.
519The intent is to make a compromise of a password database less likely to
520result in an attacker gaining knowledge of the plaintext passwords (e.g. using
521John the Ripper).")
522 ;; "sha2.c" is under BSD-3;
523 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
524 ;; the rest is under ISC.
3f641af0 525 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
526
527(define-public python2-py-bcrypt
528 (package-with-python2 python-py-bcrypt))
529
530
429fdea1
ED
531(define-public python-paramiko
532 (package
533 (name "python-paramiko")
81b9bbbd 534 (version "1.16.0")
429fdea1
ED
535 (source
536 (origin
537 (method url-fetch)
81b9bbbd 538 (uri (pypi-uri "paramiko" version))
429fdea1
ED
539 (sha256
540 (base32
81b9bbbd 541 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1 542 (build-system python-build-system)
49910e6a
MB
543 (arguments
544 '(;; FIXME: One test fails with "EOFError not raised by connect".
545 #:tests? #f))
546 ;; #:phases
547 ;; (modify-phases %standard-phases
548 ;; (replace 'check
549 ;; (lambda _
550 ;; (zero? (system* "python" "test.py")))))))
a3fc12da 551 (propagated-inputs
f22efa01
HG
552 `(("python-pycrypto" ,python-pycrypto)
553 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
554 (home-page "http://www.paramiko.org/")
555 (synopsis "SSHv2 protocol library")
556 (description "Paramiko is a python implementation of the SSHv2 protocol,
557providing both client and server functionality. While it leverages a Python C
558extension for low level cryptography (PyCrypto), Paramiko itself is a pure
559Python interface around SSH networking concepts.")
3f641af0 560 (license license:lgpl2.1+)))
429fdea1
ED
561
562(define-public python2-paramiko
563 (package-with-python2 python-paramiko))
564
565
de73dbf6
ED
566(define-public python-httplib2
567 (package
568 (name "python-httplib2")
286f1bac 569 (version "0.9.2")
de73dbf6
ED
570 (source
571 (origin
572 (method url-fetch)
286f1bac 573 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
574 (sha256
575 (base32
286f1bac 576 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 577 (build-system python-build-system)
286f1bac 578 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
579 (synopsis "Comprehensive HTTP client library")
580 (description
581 "A comprehensive HTTP client library supporting many features left out of
582other HTTP libraries.")
583 (license license:expat)))
584
585(define-public python2-httplib2
586 (package-with-python2 python-httplib2))
587
67039875
ED
588(define-public python-ecdsa
589 (package
590 (name "python-ecdsa")
591 (version "0.13")
592 (source
593 (origin
594 (method url-fetch)
595 (uri (string-append
596 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
597 version
598 ".tar.gz"))
599 (sha256
600 (base32
601 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
602 (build-system python-build-system)
67039875
ED
603 (inputs
604 `(("openssl" ,openssl)))
605 (home-page
606 "http://github.com/warner/python-ecdsa")
607 (synopsis
608 "ECDSA cryptographic signature library (pure python)")
609 (description
610 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
611Curve Digital Signature Algorithm), implemented purely in Python. With this
612library, you can quickly create keypairs (signing key and verifying key), sign
613messages, and verify the signatures. The keys and signatures are very short,
614making them easy to handle and incorporate into other protocols.")
615 (license license:expat)))
616
617(define-public python2-ecdsa
618 (package-with-python2 python-ecdsa))
619
52323f32
ED
620(define-public python-ccm
621 (package
622 (name "python-ccm")
db5567f7 623 (version "2.1.6")
52323f32
ED
624 (source
625 (origin
626 (method url-fetch)
db5567f7 627 (uri (pypi-uri "ccm" version))
52323f32
ED
628 (sha256
629 (base32
db5567f7 630 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 631 (build-system python-build-system)
f22efa01 632 (propagated-inputs
52323f32 633 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
634 ;; Not listed in setup.py, but used in ccmlib/node.py for full
635 ;; functionality
636 ("python-psutil" ,python-psutil)
52323f32
ED
637 ("python-six" ,python-six)))
638 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
639 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
640localhost")
641 (description "Cassandra Cluster Manager is a development tool for testing
642local Cassandra clusters. It creates, launches and removes Cassandra clusters
643on localhost.")
3f641af0 644 (license license:asl2.0)))
52323f32
ED
645
646(define-public python2-ccm
647 (package-with-python2 python-ccm))
648
89114f39 649(define-public python-pytz
acc26ff1 650 (package
89114f39 651 (name "python-pytz")
61c9babb 652 (version "2016.3")
acc26ff1
CR
653 (source
654 (origin
655 (method url-fetch)
61c9babb 656 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
657 (sha256
658 (base32
61c9babb 659 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 660 (build-system python-build-system)
8498b8cf 661 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 662 (home-page "http://pythonhosted.org/pytz")
9e771e3b 663 (synopsis "Python timezone library")
acc26ff1
CR
664 (description
665 "This library allows accurate and cross platform timezone calculations
666using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 667 (license license:expat)))
5ace6e2f 668
89114f39 669(define-public python2-pytz
11bb85a1 670 (package-with-python2 python-pytz))
89114f39 671
fc50e9c6 672
89114f39 673(define-public python-babel
5ace6e2f 674 (package
89114f39 675 (name "python-babel")
3f37db6b 676 (version "2.3.2")
5ace6e2f
CR
677 (source
678 (origin
679 (method url-fetch)
b850a6d8 680 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
681 (sha256
682 (base32
3f37db6b 683 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f 684 (build-system python-build-system)
f22efa01 685 (propagated-inputs
f3b98f4f 686 `(("python-pytz" ,python-pytz)))
8498b8cf 687 (arguments `(#:tests? #f)) ; no test target
e1804763 688 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
689 (synopsis
690 "Tools for internationalizing Python applications")
691 (description
692 "Babel is composed of two major parts:
693- tools to build and work with gettext message catalogs
694- a Python interface to the CLDR (Common Locale Data Repository), providing
695access to various locale display names, localized number and date formatting,
696etc. ")
3f641af0 697 (license license:bsd-3)))
89114f39
AE
698
699(define-public python2-babel
11bb85a1 700 (package-with-python2 python-babel))
73adf220 701
ed377cc6
RW
702(define-public python2-backport-ssl-match-hostname
703 (package
704 (name "python2-backport-ssl-match-hostname")
f2d06d46 705 (version "3.5.0.1")
ed377cc6
RW
706 (source
707 (origin
708 (method url-fetch)
709 (uri (string-append
710 "https://pypi.python.org/packages/source/b/"
711 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
712 version ".tar.gz"))
713 (sha256
714 (base32
f2d06d46 715 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 716 (build-system python-build-system)
f2d06d46
EF
717 (arguments
718 `(#:python ,python-2
719 #:tests? #f)) ; no test target
f2d06d46
EF
720 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
721 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
722 (description
723 "This backport brings the ssl.match_hostname() function to users of
724earlier versions of Python. The function checks the hostname in the
725certificate returned by the server to which a connection has been established,
726and verifies that it matches the intended target hostname.")
3f641af0 727 (license license:psfl)))
ed377cc6 728
ef5cbf9b
RW
729(define-public python-h5py
730 (package
731 (name "python-h5py")
fe147c41 732 (version "2.6.0")
ef5cbf9b
RW
733 (source
734 (origin
735 (method url-fetch)
fe147c41 736 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
737 (sha256
738 (base32
fe147c41 739 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 740 (build-system python-build-system)
797e1401
RW
741 (arguments
742 `(#:tests? #f ; no test target
743 #:phases
744 (modify-phases %standard-phases
745 (add-after 'unpack 'fix-hdf5-paths
746 (lambda* (#:key inputs #:allow-other-keys)
747 (let ((prefix (assoc-ref inputs "hdf5")))
748 (substitute* "setup_build.py"
749 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
750 (string-append "['" prefix "/lib" "']"))
751 (("'/opt/local/include', '/usr/local/include'")
752 (string-append "'" prefix "/include" "'")))
753 (substitute* "setup_configure.py"
754 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
755 (string-append "['" prefix "/lib" "']")))
756 #t))))))
3c4010b1 757 (propagated-inputs
69866690
HG
758 `(("python-six" ,python-six)
759 ("python-numpy" ,python-numpy)))
ef5cbf9b 760 (inputs
69866690 761 `(("hdf5" ,hdf5)))
ef5cbf9b 762 (native-inputs
fe147c41
EF
763 `(("python-cython" ,python-cython)
764 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
765 (home-page "http://www.h5py.org/")
766 (synopsis "Read and write HDF5 files from Python")
767 (description
768 "The h5py package provides both a high- and low-level interface to the
769HDF5 library from Python. The low-level interface is intended to be a
770complete wrapping of the HDF5 API, while the high-level component supports
771access to HDF5 files, datasets and groups using established Python and NumPy
772concepts.")
9820a028 773 (license license:bsd-3)))
ef5cbf9b
RW
774
775(define-public python2-h5py
9820a028 776 (package-with-python2 python-h5py))
ef5cbf9b 777
c1448c69
EB
778(define-public python-lockfile
779 (package
780 (name "python-lockfile")
692add53 781 (version "0.12.2")
c1448c69
EB
782 (source
783 (origin
784 (method url-fetch)
785 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
786 "lockfile-" version ".tar.gz"))
787 (sha256
788 (base32
692add53 789 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
790 (build-system python-build-system)
791 (arguments '(#:test-target "check"))
692add53
BW
792 (native-inputs
793 `(("python-pbr" ,python-pbr)))
6a8f26a4 794 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
795 (synopsis "Platform-independent file locking module")
796 (description
797 "The lockfile package exports a LockFile class which provides a simple
798API for locking files.")
f210e944 799 (license license:expat)))
c1448c69
EB
800
801(define-public python2-lockfile
f210e944 802 (package-with-python2 python-lockfile))
c1448c69 803
5a1a4bf6
EB
804(define-public python-mock
805 (package
806 (name "python-mock")
807 (version "1.0.1")
808 (source
809 (origin
810 (method url-fetch)
811 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
812 "mock-" version ".tar.gz"))
813 (sha256
814 (base32
815 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
816 (build-system python-build-system)
817 (arguments '(#:test-target "check"))
07af3e5e 818 (home-page "http://code.google.com/p/mock/")
9e771e3b 819 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
820 (description
821 "Mock is a library for testing in Python. It allows you to replace parts
822of your system under test with mock objects and make assertions about how they
823have been used.")
bd3fa666 824 (license license:expat)))
5a1a4bf6
EB
825
826(define-public python2-mock
827 (package-with-python2 python-mock))
828
fc50e9c6 829
73adf220
AE
830(define-public python-setuptools
831 (package
832 (name "python-setuptools")
d660f7be 833 (version "31.0.0")
73adf220
AE
834 (source
835 (origin
836 (method url-fetch)
d660f7be 837 (uri (pypi-uri "setuptools" version))
73adf220
AE
838 (sha256
839 (base32
d660f7be 840 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
841 (modules '((guix build utils)))
842 (snippet
843 '(begin
844 ;; Remove included binaries which are used to build self-extracting
845 ;; installers for Windows.
846 ;; TODO: Find some way to build them ourself so we can include them.
847 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
848 #t))))
73adf220 849 (build-system python-build-system)
d3d656c5
AE
850 ;; FIXME: Tests require pytest, which itself relies on setuptools.
851 ;; One could bootstrap with an internal untested setuptools.
73adf220 852 (arguments
824af8ca 853 `(#:tests? #f))
73adf220
AE
854 (home-page "https://pypi.python.org/pypi/setuptools")
855 (synopsis
856 "Library designed to facilitate packaging Python projects")
857 (description
858 "Setuptools is a fully-featured, stable library designed to facilitate
859packaging Python projects, where packaging includes:
860Python package and module definitions,
861distribution package metadata,
862test hooks,
863project installation,
864platform-specific details,
865Python 3 support.")
d660f7be
MB
866 ;; TODO: setuptools now bundles the following libraries:
867 ;; packaging, pyparsing, six and appdirs. How to unbundle?
868 (license (list license:psfl ; setuptools itself
869 license:expat ; six, appdirs, pyparsing
870 license:asl2.0 ; packaging is dual ASL2/BSD-2
871 license:bsd-2))))
73adf220
AE
872
873(define-public python2-setuptools
874 (package-with-python2 python-setuptools))
fc50e9c6
AE
875
876
cafc3f5a
EB
877(define-public python-pycrypto
878 (package
879 (name "python-pycrypto")
880 (version "2.6.1")
881 (source
882 (origin
883 (method url-fetch)
884 (uri (string-append "https://pypi.python.org/packages/source/p/"
885 "pycrypto/pycrypto-" version ".tar.gz"))
886 (sha256
887 (base32
888 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
889 (build-system python-build-system)
cafc3f5a
EB
890 (inputs
891 `(("python" ,python)
892 ("gmp" ,gmp)))
893 (arguments
894 `(#:phases
895 (alist-cons-before
896 'build 'set-build-env
897 ;; pycrypto runs an autoconf configure script behind the scenes
898 (lambda _
899 (setenv "CONFIG_SHELL" (which "bash")))
900 %standard-phases)))
901 (home-page "http://www.pycrypto.org/")
902 (synopsis "Cryptographic modules for Python")
903 (description
904 "Pycrypto is a collection of both secure hash functions (such as SHA256
905and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 906etc.). The package is structured to make adding new modules easy.")
3f641af0 907 (license license:public-domain)))
cafc3f5a 908
345f0611 909(define-public python2-pycrypto
1c0059da
EF
910 (let ((pycrypto (package-with-python2 python-pycrypto)))
911 (package (inherit pycrypto)
912 (inputs
913 `(("python" ,python-2)
914 ,@(alist-delete
915 "python"
916 (package-inputs pycrypto)))))))
345f0611 917
cafc3f5a
EB
918(define-public python-keyring
919 (package
920 (name "python-keyring")
13f3ff35 921 (version "8.7")
cafc3f5a
EB
922 (source
923 (origin
924 (method url-fetch)
664e6c3a 925 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
926 (sha256
927 (base32
13f3ff35 928 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
929 (build-system python-build-system)
930 (native-inputs
13f3ff35 931 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 932 (propagated-inputs
cafc3f5a
EB
933 `(("python-pycrypto" ,python-pycrypto)))
934 (arguments
664e6c3a 935 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 936 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
937 (synopsis "Store and access your passwords safely")
938 (description
939 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 940service from python. It can be used in any application that needs safe
cafc3f5a
EB
941password storage.")
942 ;; "MIT" and PSF dual license
f210e944 943 (license license:x11)))
cafc3f5a 944
d7af1069 945(define-public python2-keyring
f210e944 946 (package-with-python2 python-keyring))
d7af1069 947
a480bc41
EB
948(define-public python-six
949 (package
950 (name "python-six")
b6ab89ef 951 (version "1.10.0")
a480bc41
EB
952 (source
953 (origin
954 (method url-fetch)
b6ab89ef 955 (uri (pypi-uri "six" version))
a480bc41
EB
956 (sha256
957 (base32
b6ab89ef 958 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 959 (build-system python-build-system)
4fd129ee
MB
960 (native-inputs
961 `(("python-py" ,python-py)
962 ("python-pytest" ,python-pytest)))
a480bc41
EB
963 (home-page "http://pypi.python.org/pypi/six/")
964 (synopsis "Python 2 and 3 compatibility utilities")
965 (description
35b9e423 966 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
967functions for smoothing over the differences between the Python versions with
968the goal of writing Python code that is compatible on both Python versions.
35b9e423 969Six supports every Python version since 2.5. It is contained in only one
a480bc41 970Python file, so it can be easily copied into your project.")
3f641af0 971 (license license:x11)))
a480bc41 972
0c20025c
AE
973(define-public python2-six
974 (package-with-python2 python-six))
975
cafc3f5a
EB
976(define-public python-dateutil-2
977 (package
978 (name "python-dateutil")
394b8060 979 (version "2.5.2")
cafc3f5a
EB
980 (source
981 (origin
982 (method url-fetch)
394b8060 983 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
984 (sha256
985 (base32
394b8060 986 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a 987 (build-system python-build-system)
f22efa01 988 (propagated-inputs
394b8060 989 `(("python-six" ,python-six)))
b5a5fb19 990 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
991 (synopsis "Extensions to the standard datetime module")
992 (description
993 "The dateutil module provides powerful extensions to the standard
994datetime module, available in Python 2.3+.")
f210e944 995 (license license:bsd-3)))
cafc3f5a
EB
996
997(define-public python2-dateutil-2
f210e944 998 (package-with-python2 python-dateutil-2))
cafc3f5a 999
fc50e9c6
AE
1000(define-public python-dateutil
1001 (package
1002 (name "python-dateutil")
1003 (version "1.5") ; last version for python < 3
1004 (source
1005 (origin
1006 (method url-fetch)
cafc3f5a
EB
1007 (uri (string-append "http://labix.org/download/python-dateutil/"
1008 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
1009 (sha256
1010 (base32
1011 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
1012 (build-system python-build-system)
b5a5fb19 1013 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a 1014 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
1015 (description
1016 "The dateutil module provides powerful extensions to the standard
1017datetime module, available in Python 2.3+.")
3f641af0 1018 (license license:psfl)))
fc50e9c6
AE
1019
1020(define-public python2-dateutil
1021 (package-with-python2 python-dateutil))
1d08c01f 1022
cafc3f5a
EB
1023(define-public python-parsedatetime
1024 (package
1025 (name "python-parsedatetime")
eebf6f01 1026 (version "2.1")
cafc3f5a
EB
1027 (source
1028 (origin
1029 (method url-fetch)
eebf6f01 1030 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1031 (sha256
1032 (base32
eebf6f01 1033 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1034 (build-system python-build-system)
1035 (native-inputs
eebf6f01
EF
1036 `(("python-nose" ,python-nose)
1037 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1038 (home-page "http://github.com/bear/parsedatetime/")
1039 (synopsis
1040 "Parse human-readable date/time text")
1041 (description
e881752c 1042 "Parse human-readable date/time text.")
f210e944 1043 (license license:asl2.0)))
cafc3f5a 1044
38b8f9b2 1045(define-public python2-parsedatetime
f210e944 1046 (package-with-python2 python-parsedatetime))
38b8f9b2 1047
d072efcb
RW
1048(define-public python-pandas
1049 (package
1050 (name "python-pandas")
7d0c3c8d 1051 (version "0.18.1")
d072efcb
RW
1052 (source
1053 (origin
1b96f069 1054 (method url-fetch)
7d0c3c8d
EF
1055 (uri (string-append
1056 "https://pypi.python.org/packages/11/09/"
1057 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1058 "pandas-" version ".tar.gz"))
1b96f069 1059 (sha256
7d0c3c8d 1060 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1061 (build-system python-build-system)
d072efcb 1062 (propagated-inputs
f22efa01
HG
1063 `(("python-numpy" ,python-numpy)
1064 ("python-pytz" ,python-pytz)
d072efcb
RW
1065 ("python-dateutil" ,python-dateutil-2)))
1066 (native-inputs
abcc7a0e
HG
1067 `(("python-nose" ,python-nose)
1068 ("python-cython" ,python-cython)))
d072efcb
RW
1069 (home-page "http://pandas.pydata.org")
1070 (synopsis "Data structures for data analysis, time series, and statistics")
1071 (description
1072 "Pandas is a Python package providing fast, flexible, and expressive data
1073structures designed to make working with structured (tabular,
1074multidimensional, potentially heterogeneous) and time series data both easy
1075and intuitive. It aims to be the fundamental high-level building block for
1076doing practical, real world data analysis in Python.")
f210e944 1077 (license license:bsd-3)))
d072efcb
RW
1078
1079(define-public python2-pandas
f210e944 1080 (package-with-python2 python-pandas))
d072efcb 1081
cafc3f5a
EB
1082(define-public python-tzlocal
1083 (package
1084 (name "python-tzlocal")
ed80839b 1085 (version "1.2.2")
cafc3f5a
EB
1086 (source
1087 (origin
1088 (method url-fetch)
226d3331 1089 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1090 (sha256
1091 (base32
ed80839b 1092 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1093 (build-system python-build-system)
f22efa01
HG
1094 (propagated-inputs
1095 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1096 (home-page "https://github.com/regebro/tzlocal")
1097 (synopsis
35b9e423 1098 "Local timezone information for Python")
cafc3f5a
EB
1099 (description
1100 "Tzlocal returns a tzinfo object with the local timezone information.
1101This module attempts to fix a glaring hole in pytz, that there is no way to
1102get the local timezone information, unless you know the zoneinfo name, and
1103under several distributions that's hard or impossible to figure out.")
3f641af0 1104 (license license:cc0)))
cafc3f5a 1105
1d08c01f
AE
1106(define-public python2-pysqlite
1107 (package
1108 (name "python2-pysqlite")
fe476868 1109 (version "2.8.1")
1d08c01f
AE
1110 (source
1111 (origin
1112 (method url-fetch)
fe476868 1113 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1114 (sha256
1115 (base32
fe476868 1116 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1117 (build-system python-build-system)
1118 (inputs
1119 `(("sqlite" ,sqlite)))
1120 (arguments
1121 `(#:python ,python-2 ; incompatible with Python 3
1122 #:tests? #f)) ; no test target
fe476868 1123 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1124 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1125 (description
1126 "Pysqlite provides SQLite bindings for Python that comply to the
1127Database API 2.0T.")
ed0cdf83 1128 (license license:zlib)))
1d08c01f 1129
2875caf5
AE
1130
1131(define-public python2-mechanize
1132 (package
1133 (name "python2-mechanize")
1134 (version "0.2.5")
1135 (source
1136 (origin
1137 (method url-fetch)
1138 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1139 version ".tar.gz"))
1140 (sha256
1141 (base32
1142 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1143 (build-system python-build-system)
2875caf5
AE
1144 (arguments
1145 `(#:python ,python-2 ; apparently incompatible with Python 3
1146 #:tests? #f))
1147 ;; test fails with message
1148 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1149 ;; (python-3.3.2) or
1150 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1151 ;; (python-2.7.5).
1152 ;; The source code is from March 2011 and probably not up-to-date
1153 ;; with respect to python unit tests.
1154 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1155 (synopsis
1156 "Stateful programmatic web browsing in Python")
1157 (description
1158 "Mechanize implements stateful programmatic web browsing in Python,
1159after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1160 (license (license:non-copyleft
1161 "file://COPYING"
1162 "See COPYING in the distribution."))))
2875caf5 1163
0352532e
AE
1164
1165(define-public python-simplejson
1166 (package
1167 (name "python-simplejson")
b2e6e150 1168 (version "3.10.0")
0352532e
AE
1169 (source
1170 (origin
1171 (method url-fetch)
988d1bad 1172 (uri (pypi-uri "simplejson" version))
0352532e
AE
1173 (sha256
1174 (base32
b2e6e150 1175 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1176 (build-system python-build-system)
1177 (home-page "http://simplejson.readthedocs.org/en/latest/")
1178 (synopsis
1179 "Json library for Python")
1180 (description
e881752c
AK
1181 "JSON (JavaScript Object Notation) is a subset of JavaScript
1182syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1183format.
0352532e
AE
1184
1185Simplejson exposes an API familiar to users of the standard library marshal
1186and pickle modules. It is the externally maintained version of the json
1187library contained in Python 2.6, but maintains compatibility with Python 2.5
1188and (currently) has significant performance advantages, even without using
1189the optional C extension for speedups. Simplejson is also supported on
1190Python 3.3+.")
3f641af0 1191 (license license:x11)))
0352532e
AE
1192
1193(define-public python2-simplejson
1194 (package-with-python2 python-simplejson))
421a80a2
AE
1195
1196
ed07b08d 1197(define-public python-pyicu
421a80a2 1198 (package
ed07b08d 1199 (name "python-pyicu")
d3b29319 1200 (version "1.9.2")
421a80a2
AE
1201 (source
1202 (origin
1203 (method url-fetch)
1204 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1205 version ".tar.gz"))
1206 (sha256
1207 (base32
d3b29319 1208 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1209 (build-system python-build-system)
1210 (inputs
1211 `(("icu4c" ,icu4c)))
421a80a2 1212 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1213 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1214 (description
1215 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1216 (license license:x11)))
ed07b08d
LF
1217
1218(define-public python2-pyicu
f210e944 1219 (package-with-python2 python-pyicu))
cc20a22a
LC
1220
1221(define-public python2-dogtail
1222 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1223 ;; spaces in indentation" with Python 3.
1224 (package
1225 (name "python2-dogtail")
1226 (version "0.8.2")
1227 (source (origin
1228 (method url-fetch)
1229 (uri (string-append
1230 "https://fedorahosted.org/released/dogtail/dogtail-"
1231 version ".tar.gz"))
1232 (sha256
1233 (base32
1234 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1235 (build-system python-build-system)
1236 (arguments `(#:python ,python-2
1237 #:tests? #f)) ; invalid command "test"
1238 (home-page "https://fedorahosted.org/dogtail/")
1239 (synopsis "GUI test tool and automation framework written in ​Python")
1240 (description
35b9e423 1241 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1242It uses Accessibility (a11y) technologies to communicate with desktop
1243applications. dogtail scripts are written in Python and executed like any
1244other Python program.")
3f641af0 1245 (license license:gpl2+)))
515e6878 1246
011b18c3
LC
1247(define-public python2-empy
1248 (package
1249 (name "python2-empy")
1250 (version "3.3")
1251 (source (origin
1252 (method url-fetch)
1253 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1254 version ".tar.gz"))
1255 (sha256
1256 (base32
1257 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1258 (build-system python-build-system)
1259 (arguments
1260 `(#:python ,python-2
1261 #:phases (alist-replace
1262 'check
1263 (lambda _
1264 (zero? (system* "./test.sh")))
1265 %standard-phases)))
1266 (home-page "http://www.alcyone.com/software/empy/")
1267 (synopsis "Templating system for Python")
1268 (description
1269 "EmPy is a system for embedding Python expressions and statements in
1270template text; it takes an EmPy source file, processes it, and produces
1271output. This is accomplished via expansions, which are special signals to the
1cd4027c 1272EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1273EmPy can expand arbitrary Python expressions and statements in this way, as
1274well as a variety of special forms. Textual data not explicitly delimited in
1275this way is sent unaffected to the output, allowing Python to be used in
1276effect as a markup language. Also supported are callbacks via hooks,
1277recording and playback via diversions, and dynamic, chainable filters. The
1278system is highly configurable via command line options and embedded
1279commands.")
3f641af0 1280 (license license:lgpl2.1+)))
011b18c3 1281
8deeda0c
LC
1282(define-public python2-element-tree
1283 (package
1284 (name "python2-element-tree")
1285 (version "1.2.6")
1286 (source (origin
1287 (method url-fetch)
1288 (uri (string-append
1289 "http://effbot.org/media/downloads/elementtree-"
1290 version "-20050316.tar.gz"))
1291 (sha256
1292 (base32
1293 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1294 (build-system python-build-system)
1295 (arguments
1296 `(#:python ,python-2 ; seems to be part of Python 3
1297 #:tests? #f)) ; no 'test' sub-command
1298 (synopsis "Toolkit for XML processing in Python")
1299 (description
1300 "ElementTree is a Python library supporting lightweight XML processing.")
1301 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1302 (license (license:x11-style
1303 "http://docs.python.org/2/license.html"
1304 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1305
1306(define-public python2-pybugz
1307 (package
1308 (name "python2-pybugz")
1309 (version "0.6.11")
1310 (source (origin
1311 (method url-fetch)
1312 (uri (string-append
1313 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1314 version ".tar.gz"))
1315 (sha256
1316 (base32
6f194a1e 1317 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1318 (patches (search-patches "pybugz-stty.patch"
1319 "pybugz-encode-error.patch"))))
8deeda0c
LC
1320 (build-system python-build-system)
1321 (arguments
1322 `(#:python ,python-2 ; SyntaxError with Python 3
1323 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1324 (propagated-inputs
1325 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1326 (synopsis "Python and command-line interface to Bugzilla")
1327 (description
1328 "PyBugz is a Python library and command-line tool to query the Bugzilla
1329bug tracking system. It is meant as an aid to speed up interaction with the
1330bug tracker.")
1331 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1332 (license license:gpl2)))
8deeda0c 1333
a480bc41
EB
1334(define-public python-enum34
1335 (package
1336 (name "python-enum34")
d39ae1e5 1337 (version "1.1.0")
a480bc41
EB
1338 (source
1339 (origin
1340 (method url-fetch)
d39ae1e5 1341 (uri (pypi-uri "enum34" version))
a480bc41
EB
1342 (sha256
1343 (base32
d39ae1e5 1344 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1345 (build-system python-build-system)
a480bc41
EB
1346 (arguments
1347 `(#:phases
1348 (alist-replace
1349 'check
1350 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1351 %standard-phases)))
1352 (home-page "https://pypi.python.org/pypi/enum34")
1353 (synopsis "Backported Python 3.4 Enum")
1354 (description
1355 "Enum34 is the new Python stdlib enum module available in Python 3.4
1356backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1357 (license license:bsd-3)))
a480bc41 1358
820acd1b
LF
1359(define-public python2-enum34
1360 (package-with-python2 python-enum34))
1361
a480bc41
EB
1362(define-public python-parse-type
1363 (package
1364 (name "python-parse-type")
1365 (version "0.3.4")
1366 (source
1367 (origin
1368 (method url-fetch)
1369 (uri (string-append "https://pypi.python.org/packages/source/p/"
1370 "parse_type/parse_type-" version ".tar.gz"))
1371 (sha256
1372 (base32
1373 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1374 (build-system python-build-system)
f22efa01 1375 (propagated-inputs
f3b98f4f 1376 `(("python-six" ,python-six)
68f1cdec 1377 ("python-parse" ,python-parse)))
a480bc41
EB
1378 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1379 (home-page "https://github.com/jenisys/parse_type")
1380 (synopsis "Extended parse module")
1381 (description
1382 "Parse_type extends the python parse module.")
3f641af0 1383 (license license:bsd-3)))
a480bc41
EB
1384
1385(define-public python-parse
1386 (package
1387 (name "python-parse")
eb3d3503 1388 (version "1.6.6")
a480bc41
EB
1389 (source
1390 (origin
1391 (method url-fetch)
eb3d3503 1392 (uri (pypi-uri "parse" version))
a480bc41
EB
1393 (sha256
1394 (base32
aa6c09ed
EF
1395 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1396 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1397 (build-system python-build-system)
1398 (arguments
1399 `(#:phases
f9a65318
EF
1400 (modify-phases %standard-phases
1401 (replace 'check
1402 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1403 (home-page "https://github.com/r1chardj0n3s/parse")
1404 (synopsis "Parse strings")
1405 (description
1406 "Parse strings using a specification based on the Python format()
1407syntax.")
3f641af0 1408 (license license:x11)))
a480bc41 1409
d3eff97a
JL
1410(define-public python-polib
1411 (package
1412 (name "python-polib")
1413 (version "1.0.8")
1414 (source (origin
1415 (method url-fetch)
1416 (uri (pypi-uri "polib" version))
1417 (sha256
1418 (base32
1419 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1420 (build-system python-build-system)
1421 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1422 (synopsis "Manipulate, create and modify gettext files")
1423 (description "Polib can manipulate any gettext format (po, pot and mo)
1424files. It can be used to create po files from scratch or to modify
1425existing ones.")
1426 (license license:expat)))
1427
1428(define-public python2-polib
1429 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1430 (package
1431 (inherit base)
1432 (arguments `(,@(package-arguments base)
1433 ;; Tests don't work with python2.
1434 #:tests? #f)))))
a480bc41 1435
515e6878
LC
1436(define-public scons
1437 (package
1438 (name "scons")
a3f61425 1439 (version "2.3.4")
515e6878
LC
1440 (source (origin
1441 (method url-fetch)
de67e922
LF
1442 (uri (string-append "mirror://sourceforge/scons/scons/" version
1443 "/scons-" version ".tar.gz"))
515e6878
LC
1444 (sha256
1445 (base32
a3f61425 1446 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1447 (build-system python-build-system)
1448 (arguments
1449 ;; With Python 3.x, fails to build with a syntax error.
1450 `(#:python ,python-2
b3e8b4bd 1451 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1452 #:tests? #f)) ; no 'python setup.py test' command
1453 (home-page "http://scons.org/")
1454 (synopsis "Software construction tool written in Python")
1455 (description
1456 "SCons is a software construction tool. Think of SCons as an improved,
1457cross-platform substitute for the classic Make utility with integrated
1458functionality similar to autoconf/automake and compiler caches such as ccache.
1459In short, SCons is an easier, more reliable and faster way to build
1460software.")
3f641af0 1461 (license license:x11)))
011b18c3 1462
c15a5c0e
DT
1463(define-public python-extras
1464 (package
1465 (name "python-extras")
1466 (version "0.0.3")
1467 (source
1468 (origin
1469 (method url-fetch)
1470 (uri (string-append
1471 "https://pypi.python.org/packages/source/e/extras/extras-"
1472 version ".tar.gz"))
1473 (sha256
1474 (base32
1475 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1476 (build-system python-build-system)
c15a5c0e
DT
1477 (arguments
1478 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1479 '(#:tests? #f))
1480 (home-page "https://github.com/testing-cabal/extras")
1481 (synopsis "Useful extensions to the Python standard library")
1482 (description
1483 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1484 (license license:expat)))
c15a5c0e
DT
1485
1486(define-public python2-extras
1487 (package-with-python2 python-extras))
1488
56ea0efd
DT
1489(define-public python-mimeparse
1490 (package
1491 (name "python-mimeparse")
1492 (version "0.1.4")
1493 (source
1494 (origin
1495 (method url-fetch)
1496 (uri (string-append
1497 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1498 version ".tar.gz"))
1499 (sha256
1500 (base32
1501 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1502 (build-system python-build-system)
56ea0efd
DT
1503 (arguments
1504 '(#:tests? #f)) ; no setup.py test command
1505 (home-page
1506 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1507 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1508 (description
1509 "Mimeparse provides basic functions for parsing MIME type names and
1510matching them against a list of media-ranges.")
bd3fa666 1511 (license license:expat)))
56ea0efd
DT
1512
1513(define-public python2-mimeparse
1514 (package-with-python2 python-mimeparse))
1515
4435427e
DT
1516(define-public python-nose
1517 (package
1518 (name "python-nose")
f7cb9841 1519 (version "1.3.7")
4435427e
DT
1520 (source
1521 (origin
1522 (method url-fetch)
f7cb9841 1523 (uri (pypi-uri "nose" version))
4435427e
DT
1524 (sha256
1525 (base32
f7cb9841 1526 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1527 (build-system python-build-system)
4435427e
DT
1528 (arguments
1529 '(#:tests? #f)) ; FIXME: test suite fails
1530 (home-page "http://readthedocs.org/docs/nose/")
1531 (synopsis "Python testing library")
1532 (description
1533 "Nose extends the unittest library to make testing easier.")
3f641af0 1534 (license license:lgpl2.0+)))
4435427e
DT
1535
1536(define-public python2-nose
1537 (package-with-python2 python-nose))
1538
0aea283a
EF
1539(define-public python-nose2
1540 (package
1541 (name "python-nose2")
1542 (version "0.6.5")
1543 (source
1544 (origin
1545 (method url-fetch)
1546 (uri (pypi-uri "nose2" version))
1547 (sha256
1548 (base32
1549 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1550 (build-system python-build-system)
1551 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1552 (propagated-inputs
0aea283a
EF
1553 `(("python-cov-core" ,python-cov-core)
1554 ("python-pytest-cov" ,python-pytest-cov)
1555 ("python-six" ,python-six)))
1556 (home-page "https://github.com/nose-devs/nose2")
1557 (synopsis "Next generation of nicer testing for Python")
1558 (description
1559 "Nose2 is the next generation of nicer testing for Python, based on the
1560plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1561better plugin api, being easier for users to configure, and simplifying internal
1562interfaces and processes.")
1563 (license license:bsd-2)))
1564
1565(define-public python2-nose2
1566 (package-with-python2 python-nose2))
1567
6cd9c356
DT
1568(define-public python-unittest2
1569 (package
1570 (name "python-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/unittest2py3k/unittest2py3k-"
1577 version ".tar.gz"))
1578 (sha256
1579 (base32
1580 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1581 (build-system python-build-system)
6cd9c356
DT
1582 (home-page "http://pypi.python.org/pypi/unittest2")
1583 (synopsis "Python unit testing library")
1584 (description
1585 "Unittest2 is a replacement for the unittest module in the Python
1586standard library.")
3f641af0 1587 (license license:psfl)))
6cd9c356
DT
1588
1589(define-public python2-unittest2
1590 (package (inherit python-unittest2)
1591 (name "python2-unittest2")
1592 (version "0.5.1")
1593 (source
1594 (origin
1595 (method url-fetch)
1596 (uri (string-append
1597 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1598 version ".tar.gz"))
1599 (sha256
1600 (base32
1601 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1602 (arguments
1603 `(#:python ,python-2
1604 #:tests? #f)))) ; no setup.py test command
1605
02f8f804 1606(define-public python-pafy
1607 (package
1608 (name "python-pafy")
1609 (version "0.5.2")
1610 (source
1611 (origin
1612 (method url-fetch)
1613 (uri (pypi-uri "pafy" version))
1614 (sha256
1615 (base32
1616 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1617 (build-system python-build-system)
ed3fee5f 1618 (arguments
1619 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1620 (propagated-inputs
1621 ;; Youtube-dl is a python package which is imported in the file
1622 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1623 `(("youtube-dl" ,youtube-dl)))
1624 (home-page "https://np1.github.io/pafy/")
1625 (synopsis "Retrieve YouTube content and metadata")
1626 (description
1627 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1628 (license license:lgpl3+)))
1629
542ad60f
DT
1630(define-public python-py
1631 (package
1632 (name "python-py")
71c8a804 1633 (version "1.4.31")
542ad60f
DT
1634 (source
1635 (origin
1636 (method url-fetch)
71c8a804 1637 (uri (pypi-uri "py" version))
542ad60f
DT
1638 (sha256
1639 (base32
71c8a804 1640 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f 1641 (build-system python-build-system)
dcb0da7b
MB
1642 (arguments
1643 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1644 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1645 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1646 ;; Is this module globally installed?"
1647 '(#:tests? #f))
542ad60f
DT
1648 (home-page "http://pylib.readthedocs.org/")
1649 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1650 (description
1651 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1652code introspection, and logging.")
bd3fa666 1653 (license license:expat)))
542ad60f
DT
1654
1655(define-public python2-py
1656 (package-with-python2 python-py))
1657
855d4761
DT
1658(define-public python-pytest
1659 (package
1660 (name "python-pytest")
61a4332d 1661 (version "2.7.3")
855d4761
DT
1662 (source
1663 (origin
1664 (method url-fetch)
1665 (uri (string-append
1666 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1667 version ".tar.gz"))
1668 (sha256
1669 (base32
61a4332d 1670 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1671 (modules '((guix build utils)))
1672 (snippet
1673 ;; One of the tests involves the /usr directory, so it fails.
1674 '(substitute* "testing/test_argcomplete.py"
1675 (("def test_remove_dir_prefix\\(self\\):")
1676 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1677 (build-system python-build-system)
482d9591
HG
1678 (propagated-inputs
1679 `(("python-py" ,python-py)))
e7881f3d 1680 (native-inputs
482d9591 1681 `(("python-nose" ,python-nose)
855d4761
DT
1682 ("python-mock" ,python-mock)))
1683 (home-page "http://pytest.org")
1684 (synopsis "Python testing library")
1685 (description
1686 "Pytest is a testing tool that provides auto-discovery of test modules
1687and functions, detailed info on failing assert statements, modular fixtures,
1688and many external plugins.")
bd3fa666 1689 (license license:expat)))
855d4761
DT
1690
1691(define-public python2-pytest
1692 (package-with-python2 python-pytest))
1693
fca4ff35
LF
1694;; This package is used by Borg until we can upgrade all our Python packages to
1695;; use a more recent pytest.
1696(define-public python-pytest-2.9.2
1697 (package
1698 (inherit python-pytest)
1699 (name "python-pytest")
1700 (version "2.9.2")
1701 (source (origin
1702 (method url-fetch)
1703 (uri (pypi-uri "pytest" version))
1704 (sha256
1705 (base32
1706 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1707 (arguments
1708 `(#:phases
1709 (modify-phases %standard-phases
1710 (add-before 'check 'disable-invalid-test
1711 (lambda _
1712 (substitute* "testing/test_argcomplete.py"
1713 (("def test_remove_dir_prefix" line)
1714 (string-append "@pytest.mark.skip"
1715 "(reason=\"Assumes that /usr exists.\")\n "
1716 line)))
1717 #t)))))))
1718
358c3d61
EF
1719(define-public python-pytest-cov
1720 (package
1721 (name "python-pytest-cov")
545f4a1c 1722 (version "2.2.1")
358c3d61
EF
1723 (source
1724 (origin
1725 (method url-fetch)
1726 (uri (pypi-uri "pytest-cov" version))
1727 (sha256
545f4a1c
EF
1728 (base32
1729 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1730 (build-system python-build-system)
ce40b383
HG
1731 (arguments
1732 `(#:phases
1733 (modify-phases %standard-phases
1734 (replace 'check
1735 (lambda _
1736 ;; options taken from tox.ini
1737 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1738 ;; with "Duplicate implicit target name"
1739 (zero? (system* "python" "./setup.py" "check"
1740 "--strict" "--metadata")))))))
f22efa01 1741 (propagated-inputs
10468636
EF
1742 `(("python-coverage" ,python-coverage)
1743 ("python-pytest" ,python-pytest)))
10468636
EF
1744 (home-page "https://github.com/pytest-dev/pytest-cov")
1745 (synopsis "Pytest plugin for measuring coverage")
1746 (description
1747 "Pytest-cov produces coverage reports. It supports centralised testing and
1748distributed testing in both @code{load} and @code{each} modes. It also
1749supports coverage of subprocesses.")
f210e944 1750 (license license:expat)))
358c3d61
EF
1751
1752(define-public python2-pytest-cov
f210e944 1753 (package-with-python2 python-pytest-cov))
358c3d61 1754
6784f2e3
RW
1755(define-public python-pytest-runner
1756 (package
1757 (name "python-pytest-runner")
1758 (version "2.6.2")
1759 (source
1760 (origin
1761 (method url-fetch)
54cd239b 1762 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1763 (sha256
1764 (base32
1765 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1766 (build-system python-build-system)
1767 (arguments
1768 `(#:phases
1769 (modify-phases %standard-phases
1770 ;; The fancy way of setting the version with setuptools_scm does not
1771 ;; seem to work here.
1772 (add-after 'unpack 'set-version
1773 (lambda _
1774 (substitute* "docs/conf.py"
1775 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1776 (string-append "version = \"" ,version "\"")))
1777 #t)))))
1778 (native-inputs
1779 `(("python-pytest" ,python-pytest)
1780 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1781 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1782 (synopsis "Invoke py.test as a distutils command")
1783 (description
1784 "This package provides a @command{pytest-runner} command that
1785@file{setup.py} files can use to run tests.")
f210e944 1786 (license license:expat)))
54cd239b
EF
1787
1788(define-public python2-pytest-runner
f210e944 1789 (package-with-python2 python-pytest-runner))
6784f2e3 1790
44547e51
EF
1791(define-public python-pytest-mock
1792 (package
1793 (name "python-pytest-mock")
1794 (version "1.2")
1795 (source
1796 (origin
1797 (method url-fetch)
1798 (uri (pypi-uri "pytest-mock" version ".zip"))
1799 (sha256
1800 (base32
1801 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1802 (build-system python-build-system)
1803 (native-inputs
1804 `(("unzip" ,unzip)))
f22efa01 1805 (propagated-inputs
d5e41cf2 1806 `(("python-pytest" ,python-pytest)))
44547e51
EF
1807 (home-page "https://github.com/pytest-dev/pytest-mock/")
1808 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1809 (description
1810 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1811around the patching API provided by the @code{mock} package, but with the
1812benefit of not having to worry about undoing patches at the end of a test.
1813The mocker fixture has the same API as @code{mock.patch}, supporting the
1814same arguments.")
1815 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1816 (license license:expat)))
1817
1818(define-public python2-pytest-mock
1819 (let ((base (package-with-python2
1820 (strip-python2-variant python-pytest-mock))))
1821 (package (inherit base)
f22efa01 1822 (propagated-inputs
44547e51 1823 `(("python2-mock" ,python2-mock)
f22efa01 1824 ,@(package-propagated-inputs base))))))
44547e51 1825
8fa58fc9
CAW
1826(define-public python-pytest-xdist
1827 (package
1828 (name "python-pytest-xdist")
1829 (version "1.14")
1830 (source
1831 (origin
1832 (method url-fetch)
1833 (uri (pypi-uri "pytest-xdist" version ".zip"))
1834 (sha256
1835 (base32
de585a7e
HG
1836 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1837 (modules '((guix build utils)))
1838 (snippet
1839 '(begin
1840 ;; Remove pre-compiled .pyc files from source.
1841 (for-each delete-file-recursively
1842 (find-files "." "__pycache__" #:directories? #t))
1843 (for-each delete-file (find-files "." "\\.pyc$"))
1844 #t))))
8fa58fc9 1845 (build-system python-build-system)
4eb385fb
MB
1846 (arguments
1847 '(#:tests? #f)) ;FIXME: Some tests are failing.
1848 ;; #:phases
1849 ;; (modify-phases %standard-phases
1850 ;; (delete 'check)
1851 ;; (add-after 'install 'check
1852 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
1853 ;; (add-installed-pythonpath inputs outputs)
1854 ;; (zero? (system* "py.test" "-v")))))
8fa58fc9
CAW
1855 (native-inputs
1856 `(("unzip" ,unzip)
8fa58fc9 1857 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1858 (propagated-inputs
c4516ad2 1859 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
1860 ("python-pytest" ,python-pytest)
1861 ("python-py" ,python-py)))
1862 (home-page
1863 "https://github.com/pytest-dev/pytest-xdist")
1864 (synopsis
1865 "Plugin for py.test with distributed testing and loop-on-failing modes")
1866 (description
1867 "The pytest-xdist plugin extends py.test with some unique test execution
1868modes: parallelization, running tests in boxed subprocesses, the ability
1869to run tests repeatedly when failed, and the ability to run tests on multiple
1870Python interpreters or platforms. It uses rsync to copy the existing
1871program code to a remote location, executes there, and then syncs the
1872result back.")
f210e944 1873 (license license:expat)))
8fa58fc9
CAW
1874
1875(define-public python2-pytest-xdist
f210e944 1876 (package-with-python2 python-pytest-xdist))
8fa58fc9 1877
84d24017
DT
1878(define-public python-scripttest
1879 (package
1880 (name "python-scripttest")
1881 (version "1.3")
1882 (source
1883 (origin
1884 (method url-fetch)
1885 (uri (string-append
1886 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1887 version ".tar.gz"))
1888 (sha256
1889 (base32
1890 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1891 (build-system python-build-system)
521b7772 1892 (native-inputs
f3b98f4f 1893 `(("python-pytest" ,python-pytest)))
84d24017
DT
1894 (home-page "http://pythonpaste.org/scripttest/")
1895 (synopsis "Python library to test command-line scripts")
1896 (description "Scripttest is a Python helper library for testing
1897interactive command-line applications. With it you can run a script in a
1898subprocess and see the output as well as any file modifications.")
bd3fa666 1899 (license license:expat)))
84d24017
DT
1900
1901(define-public python2-scripttest
1902 (package-with-python2 python-scripttest))
1903
d8fa80e1
DT
1904(define-public python-testtools
1905 (package
1906 (name "python-testtools")
1907 (version "1.0.0")
1908 (source
1909 (origin
1910 (method url-fetch)
1911 (uri (string-append
1912 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1913 version ".tar.gz"))
1914 (sha256
1915 (base32
1916 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1917 (build-system python-build-system)
0e88cbf8 1918 (propagated-inputs
f22efa01
HG
1919 `(("python-mimeparse" ,python-mimeparse)
1920 ("python-extras" ,python-extras)))
d8fa80e1
DT
1921 (home-page "https://github.com/testing-cabal/testtools")
1922 (synopsis
1923 "Extensions to the Python standard library unit testing framework")
1924 (description
1925 "Testtools extends the Python standard library unit testing framework to
1926provide matchers, more debugging information, and cross-Python
1927compatibility.")
3f641af0 1928 (license license:psfl)))
d8fa80e1
DT
1929
1930(define-public python2-testtools
1931 (package-with-python2 python-testtools))
1932
5bf3afea
DT
1933(define-public python-testscenarios
1934 (package
1935 (name "python-testscenarios")
1936 (version "0.4")
1937 (source
1938 (origin
1939 (method url-fetch)
1940 (uri (string-append
1941 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1942 version ".tar.gz"))
1943 (sha256
1944 (base32
1945 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1946 (build-system python-build-system)
f22efa01 1947 (propagated-inputs
8e73d3ba 1948 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
1949 (home-page "https://launchpad.net/testscenarios")
1950 (synopsis "Pyunit extension for dependency injection")
1951 (description
1952 "Testscenarios provides clean dependency injection for Python unittest
1953style tests.")
3f641af0 1954 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1955
1956(define-public python2-testscenarios
1957 (package-with-python2 python-testscenarios))
1958
dac79ecc
DT
1959(define-public python-testresources
1960 (package
1961 (name "python-testresources")
1962 (version "0.2.7")
1963 (source
1964 (origin
1965 (method url-fetch)
1966 (uri (string-append
1967 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1968 version ".tar.gz"))
1969 (sha256
1970 (base32
1971 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1972 (build-system python-build-system)
dac79ecc
DT
1973 (home-page "https://launchpad.net/testresources")
1974 (synopsis
1975 "Pyunit extension for managing test resources")
1976 (description
1977 "Testresources is an extension to Python's unittest to allow declarative
1978use of resources by test cases.")
3f641af0 1979 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
1980
1981(define-public python2-testresources
1982 (package-with-python2 python-testresources))
1983
070ab058
DT
1984(define-public python-subunit
1985 (package
1986 (name "python-subunit")
1987 (version "0.0.21")
1988 (source
1989 (origin
1990 (method url-fetch)
1991 (uri (string-append
1992 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1993 version ".tar.gz"))
1994 (sha256
1995 (base32
1996 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1997 (build-system python-build-system)
f22efa01 1998 (propagated-inputs
b52ad371
HG
1999 `(("python-extras" ,python-extras)
2000 ("python-mimeparse" ,python-mimeparse)))
2001 (native-inputs
2002 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
2003 (home-page "http://launchpad.net/subunit")
2004 (synopsis "Python implementation of the subunit protocol")
2005 (description
2006 "Python-subunit is a Python implementation of the subunit test streaming
2007protocol.")
3f641af0 2008 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2009
2010(define-public python2-subunit
2011 (package-with-python2 python-subunit))
2012
d2a8db92
HG
2013;; Recent versions of python-fixtures and python-testrepository need
2014;; python-pbr for packaging, which itself needs these two packages for
2015;; testing.
2016;; To fix this circular dependency, we use a build of python-pbr, based on the
2017;; same source, just without any test dependencies and with tests disabled.
2018;; python-pbr-minmal is then used to package python-fixtures and
2019;; python-testrepository.
2020;; Strictly speaking we currently could remove the test-requirements from the
2021;; normal python-pbr package (and save this package) since test are disabled
2022;; there anyway. But this may change in future.
2023(define python-pbr-minimal
cd49454b 2024 (package
d2a8db92
HG
2025 (name "python-pbr-minimal")
2026 (version "1.8.1")
7787ef76
CR
2027 (source
2028 (origin
2029 (method url-fetch)
d2a8db92 2030 (uri (pypi-uri "pbr" version))
7787ef76
CR
2031 (sha256
2032 (base32
d2a8db92 2033 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
7787ef76
CR
2034 (build-system python-build-system)
2035 (arguments
d2a8db92
HG
2036 `(#:tests? #f))
2037 (home-page "http://docs.openstack.org/developer/pbr/")
2038 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2039 (description
d2a8db92 2040 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2041 (license license:asl2.0)))
7787ef76 2042
d2a8db92
HG
2043(define python2-pbr-minimal
2044 (package-with-python2 python-pbr-minimal))
7787ef76 2045
1ef09c0c 2046(define-public python-pbr
e25f0174 2047 (package
d2a8db92 2048 (inherit python-pbr-minimal)
e25f0174 2049 (name "python-pbr")
e25f0174
BW
2050 (arguments
2051 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2052 (propagated-inputs
d2a8db92
HG
2053 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2054 (native-inputs
e25f0174 2055 `(("python-fixtures" ,python-fixtures)
d2a8db92 2056 ;; discover, coverage, hacking, subunit
e25f0174 2057 ("python-mock" ,python-mock)
d2a8db92 2058 ("python-six" ,python-six)
e25f0174
BW
2059 ("python-sphinx" ,python-sphinx)
2060 ("python-testrepository" ,python-testrepository)
2061 ("python-testresources" ,python-testresources)
2062 ("python-testscenarios" ,python-testscenarios)
2063 ("python-testtools" ,python-testtools)
2064 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2065 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2066 (description
2067 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2068and sensible default behaviors into your setuptools run. It will set
2069versions, process requirements files and generate AUTHORS and ChangeLog file
2070from git information.
2071")))
1ef09c0c
BW
2072
2073(define-public python2-pbr
e25f0174 2074 (package-with-python2 python-pbr))
1ef09c0c 2075
7787ef76
CR
2076(define-public python-fixtures
2077 (package
2078 (name "python-fixtures")
13fcc6df 2079 (version "1.4.0")
7787ef76
CR
2080 (source
2081 (origin
2082 (method url-fetch)
13fcc6df 2083 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2084 (sha256
2085 (base32
13fcc6df 2086 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76 2087 (build-system python-build-system)
f6c1ef18
MB
2088 (arguments
2089 '(#:phases
2090 (modify-phases %standard-phases
2091 (replace 'check
2092 (lambda _
2093 (zero? (system* "python" "-m" "testtools.run"
2094 "fixtures.test_suite")))))))
7787ef76 2095 (propagated-inputs
ae92cadd 2096 `(("python-six" ,python-six)))
e7881f3d 2097 (native-inputs
f6c1ef18
MB
2098 `(("python-mock" ,python-mock)
2099 ("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2100 ("python-testtools" ,python-testtools)))
7787ef76
CR
2101 (home-page "https://launchpad.net/python-fixtures")
2102 (synopsis "Python test fixture library")
2103 (description
2104 "Fixtures provides a way to create reusable state, useful when writing
2105Python tests.")
3f641af0 2106 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2107
cd49454b
DT
2108(define-public python2-fixtures
2109 (package-with-python2 python-fixtures))
2110
b24a0c00
DT
2111(define-public python-testrepository
2112 (package
2113 (name "python-testrepository")
2114 (version "0.0.20")
2115 (source
2116 (origin
2117 (method url-fetch)
2118 (uri (string-append
2119 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2120 version ".tar.gz"))
2121 (sha256
2122 (base32
2123 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2124 (build-system python-build-system)
90110ef9
MB
2125 (arguments
2126 ;; FIXME: Many tests are failing.
2127 '(#:tests? #f))
05de40c5 2128 (propagated-inputs
b2e66edf
HG
2129 `(("python-fixtures" ,python-fixtures)
2130 ("python-subunit" ,python-subunit)
b52ad371
HG
2131 ("python-testtools" ,python-testtools)))
2132 (native-inputs
2133 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2134 ("python-mimeparse" ,python-mimeparse)))
2135 (home-page "https://launchpad.net/testrepository")
2136 (synopsis "Database for Python test results")
2137 (description "Testrepository provides a database of test results which can
2138be used as part of a developer's workflow to check things such as what tests
2139have failed since the last commit or what tests are currently failing.")
3f641af0 2140 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2141
2142(define-public python2-testrepository
2143 (package-with-python2 python-testrepository))
2144
243a009a
DT
2145(define-public python-coverage
2146 (package
2147 (name "python-coverage")
4d4cf3dd 2148 (version "4.1")
243a009a
DT
2149 (source
2150 (origin
2151 (method url-fetch)
82a3c582 2152 (uri (pypi-uri "coverage" version))
243a009a
DT
2153 (sha256
2154 (base32
4d4cf3dd 2155 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2156 (build-system python-build-system)
bd10e677
MB
2157 (arguments
2158 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2159 '(#:tests? #f))
243a009a
DT
2160 (home-page "http://nedbatchelder.com/code/coverage")
2161 (synopsis "Code coverage measurement for Python")
2162 (description
2163 "Coverage measures code coverage, typically during test execution. It
2164uses the code analysis tools and tracing hooks provided in the Python standard
2165library to determine which lines are executable, and which have been
2166executed.")
3f641af0 2167 (license license:bsd-3)))
243a009a
DT
2168
2169(define-public python2-coverage
2170 (package-with-python2 python-coverage))
2171
12f839fd
EF
2172(define-public python-cov-core
2173 (package
2174 (name "python-cov-core")
2175 (version "1.15.0")
2176 (source
2177 (origin
2178 (method url-fetch)
2179 (uri (pypi-uri "cov-core" version))
2180 (sha256
2181 (base32
2182 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2183 (build-system python-build-system)
f78e1c27 2184 (propagated-inputs
12f839fd
EF
2185 `(("python-coverage" ,python-coverage)))
2186 (home-page "https://github.com/schlamar/cov-core")
2187 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2188 (description
2189 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2190It is useful for developing coverage plugins for these testing frameworks.")
f210e944 2191 (license license:expat)))
12f839fd
EF
2192
2193(define-public python2-cov-core
f210e944 2194 (package-with-python2 python-cov-core))
12f839fd 2195
041358fb
DT
2196(define-public python-discover
2197 (package
2198 (name "python-discover")
2199 (version "0.4.0")
2200 (source
2201 (origin
2202 (method url-fetch)
2203 (uri (string-append
2204 "https://pypi.python.org/packages/source/d/discover/discover-"
2205 version ".tar.gz"))
2206 (sha256
2207 (base32
2208 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2209 (build-system python-build-system)
041358fb
DT
2210 (home-page "http://pypi.python.org/pypi/discover/")
2211 (synopsis
2212 "Python test discovery for unittest")
2213 (description
2214 "Discover provides test discovery for unittest, a feature that has been
e881752c 2215backported from Python 2.7 for Python 2.4+.")
3f641af0 2216 (license license:bsd-3)))
041358fb
DT
2217
2218(define-public python2-discover
2219 (package-with-python2 python-discover))
2220
a480bc41
EB
2221(define-public behave
2222 (package
2223 (name "behave")
287cfd1a 2224 (version "1.2.5")
a480bc41
EB
2225 (source (origin
2226 (method url-fetch)
287cfd1a 2227 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2228 (sha256
2229 (base32
287cfd1a 2230 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2231 (build-system python-build-system)
f22efa01 2232 (propagated-inputs
f3b98f4f 2233 `(("python-six" ,python-six)
a480bc41
EB
2234 ("python-parse" ,python-parse)
2235 ("python-parse-type" ,python-parse-type)))
2236 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2237 ;PyHamcrest>=1.8
2238 (home-page "http://github.com/behave/behave")
2239 (synopsis "Python behavior-driven development")
2240 (description
2241 "Behave is a tool for behavior-driven development in python.
2242Behavior-driven development (or BDD) is an agile software development
2243technique that encourages collaboration between developers, QA and
2244non-technical or business participants in a software project. Behave uses
2245tests written in a natural language style, backed up by Python code.")
3f641af0 2246 (license license:x11)))
c7303d3c
DT
2247
2248(define-public python-exif-read
2249 (package
2250 (name "python-exif-read")
2a2d0981 2251 (version "2.1.2")
c7303d3c
DT
2252 (source (origin
2253 (method url-fetch)
2a2d0981 2254 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2255 (sha256
2256 (base32
2a2d0981 2257 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2258 (build-system python-build-system)
c7303d3c
DT
2259 (arguments `(#:tests? #f)) ; no tests
2260 (home-page "https://github.com/ianare/exif-py")
2261 (synopsis "Python library to extract EXIF data from image files")
2262 (description
2263 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2264files.")
3f641af0 2265 (license license:bsd-3)))
c7303d3c
DT
2266
2267(define-public python2-exif-read
2268 (package-with-python2 python-exif-read))
d5f89b22
DT
2269
2270(define-public python-pyld
2271 (package
2272 (name "python-pyld")
8957af32 2273 (version "0.7.1")
d5f89b22
DT
2274 (source (origin
2275 (method url-fetch)
af1ab773 2276 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2277 (sha256
2278 (base32
8957af32 2279 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2280 (build-system python-build-system)
d5f89b22
DT
2281 (arguments `(#:tests? #f)) ; no tests
2282 (home-page "http://github.com/digitalbazaar/pyld")
2283 (synopsis "Python implementation of the JSON-LD specification")
2284 (description
2285 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2286 (license license:bsd-3)))
d5f89b22
DT
2287
2288(define-public python2-pyld
2289 (package-with-python2 python-pyld))
3a1f9a68
DT
2290
2291(define-public python-certifi
2292 (package
2293 (name "python-certifi")
b2a2232c 2294 (version "2016.8.31")
3a1f9a68
DT
2295 (source (origin
2296 (method url-fetch)
9a41f443 2297 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2298 (sha256
2299 (base32
b2a2232c 2300 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68 2301 (build-system python-build-system)
3a1f9a68
DT
2302 (arguments `(#:tests? #f)) ; no tests
2303 (home-page "http://python-requests.org/")
2304 (synopsis "Python CA certificate bundle")
2305 (description
2306 "Certifi is a Python library that contains a CA certificate bundle, which
2307is used by the Requests library to verify HTTPS requests.")
3f641af0 2308 (license license:asl2.0)))
3a1f9a68
DT
2309
2310(define-public python2-certifi
2311 (package-with-python2 python-certifi))
e6cfbd36 2312
12c270dd
RW
2313(define-public python-click
2314 (package
2315 (name "python-click")
43accb58 2316 (version "6.6")
12c270dd
RW
2317 (source
2318 (origin
2319 (method url-fetch)
375f224b 2320 (uri (pypi-uri "click" version))
12c270dd 2321 (sha256
43accb58
LF
2322 (base32
2323 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2324 (build-system python-build-system)
e2ab5a09
BW
2325 (arguments
2326 `(#:phases
2327 (modify-phases %standard-phases
2328 (add-after 'unpack 'fix-paths
2329 (lambda* (#:key inputs #:allow-other-keys)
2330 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2331 "cross-libc" "libc"))))
2332 (substitute* "click/_unicodefun.py"
2333 (("'locale'")
2334 (string-append "'" glibc "/bin/locale'"))))
97be1bc2
MB
2335 #t))
2336 (replace 'check
2337 (lambda _
2338 (zero? (system* "make" "test")))))))
2339 (native-inputs
2340 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2341 (home-page "http://click.pocoo.org")
2342 (synopsis "Command line library for Python")
2343 (description
2344 "Click is a Python package for creating command line interfaces in a
2345composable way with as little code as necessary. Its name stands for
2346\"Command Line Interface Creation Kit\". It's highly configurable but comes
2347with sensible defaults out of the box.")
3f641af0 2348 (license license:bsd-3)))
12c270dd
RW
2349
2350(define-public python2-click
2351 (package-with-python2 python-click))
2352
addc808d
EF
2353(define-public python-wheel
2354 (package
2355 (name "python-wheel")
40981b5c 2356 (version "0.29.0")
e1ba0749
EF
2357 (source
2358 (origin
2359 (method url-fetch)
2360 (uri (pypi-uri "wheel" version))
2361 (sha256
2362 (base32
40981b5c 2363 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2364 (build-system python-build-system)
2365 (native-inputs
f3b98f4f 2366 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2367 ("python-pytest-cov" ,python-pytest-cov)))
2368 (home-page "https://bitbucket.org/pypa/wheel/")
2369 (synopsis "Format for built Python packages")
2370 (description
2371 "A wheel is a ZIP-format archive with a specially formatted filename and
2372the @code{.whl} extension. It is designed to contain all the files for a PEP
2373376 compatible install in a way that is very close to the on-disk format. Many
2374packages will be properly installed with only the @code{Unpack} step and the
2375unpacked archive preserves enough information to @code{Spread} (copy data and
2376scripts to their final locations) at any later time. Wheel files can be
2377installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2378 (license license:expat)
2379 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2380
2381(define-public python2-wheel
8ad4ae20
LF
2382 (let ((wheel (package-with-python2
2383 (strip-python2-variant python-wheel))))
264ae686 2384 (package (inherit wheel)
8ad4ae20
LF
2385 (native-inputs `(("python2-functools32" ,python2-functools32)
2386 ,@(package-native-inputs wheel))))))
2387
addc808d 2388
ae641128 2389(define-public python-requests
e6cfbd36 2390 (package
ae641128 2391 (name "python-requests")
74a066f9 2392 (version "2.9.1")
e6cfbd36
DT
2393 (source (origin
2394 (method url-fetch)
5d691657 2395 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2396 (sha256
2397 (base32
74a066f9 2398 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
cff0ccf9 2399 ;; TODO: unbundle urllib3 and chardet.
e6cfbd36 2400 (build-system python-build-system)
cff0ccf9
MB
2401 (arguments
2402 ;; FIXME: Some tests require network access.
2403 '(#:tests? #f))
e6cfbd36
DT
2404 (home-page "http://python-requests.org/")
2405 (synopsis "Python HTTP library")
2406 (description
2407 "Requests is a Python HTTP client library. It aims to be easier to use
2408than Python’s urllib2 library.")
3f641af0 2409 (license license:asl2.0)))
864b5211 2410
e9005180
DT
2411;; Some software requires an older version of Requests, notably Docker
2412;; Compose.
2413(define-public python-requests-2.7
2414 (package (inherit python-requests)
2415 (version "2.7.0")
2416 (source (origin
2417 (method url-fetch)
2418 (uri (pypi-uri "requests" version))
2419 (sha256
2420 (base32
2421 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2422
ae641128 2423(define-public python2-requests
8ad4ae20 2424 (package-with-python2 python-requests))
ae641128 2425
ea521b42
DT
2426(define-public python-vcversioner
2427 (package
2428 (name "python-vcversioner")
538fe019 2429 (version "2.16.0.0")
ea521b42
DT
2430 (source
2431 (origin
2432 (method url-fetch)
2433 (uri (pypi-uri "vcversioner" version))
2434 (sha256
2435 (base32
538fe019 2436 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2437 (build-system python-build-system)
ea521b42
DT
2438 (synopsis "Python library for version number discovery")
2439 (description "Vcversioner is a Python library that inspects tagging
2440information in a variety of version control systems in order to discover
2441version numbers.")
2442 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2443 (license license:isc)))
ea521b42
DT
2444
2445(define-public python2-vcversioner
f210e944 2446 (package-with-python2 python-vcversioner))
ae641128 2447
864b5211
DT
2448(define-public python-jsonschema
2449 (package
2450 (name "python-jsonschema")
b3667afb 2451 (version "2.5.1")
864b5211
DT
2452 (source (origin
2453 (method url-fetch)
2454 (uri
2455 (string-append
2456 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2457 version ".tar.gz"))
2458 (sha256
2459 (base32
b3667afb 2460 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2461 (build-system python-build-system)
8bcd6b91
EF
2462 (arguments
2463 '(#:phases
2464 (modify-phases %standard-phases
2465 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2466 (native-inputs
8bcd6b91
EF
2467 `(("python-nose" ,python-nose)
2468 ("python-vcversioner" ,python-vcversioner)))
2469 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2470 (synopsis "Implementation of JSON Schema for Python")
2471 (description
2472 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2473 (license license:expat)
2474 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2475
2476(define-public python2-jsonschema
a14600ec
LF
2477 (let ((jsonschema (package-with-python2
2478 (strip-python2-variant python-jsonschema))))
264ae686 2479 (package (inherit jsonschema)
eaba9d66 2480 (native-inputs
8bcd6b91 2481 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2482 ,@(package-native-inputs jsonschema)))
2483 (propagated-inputs
2484 `(("python2-functools32" ,python2-functools32))))))
850189b8
DT
2485
2486(define-public python-unidecode
2487 (package
2488 (name "python-unidecode")
8925d4f3 2489 (version "0.04.18")
850189b8
DT
2490 (source (origin
2491 (method url-fetch)
8925d4f3 2492 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2493 (sha256
2494 (base32
8925d4f3 2495 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8 2496 (build-system python-build-system)
850189b8
DT
2497 (home-page "https://pypi.python.org/pypi/Unidecode")
2498 (synopsis "ASCII transliterations of Unicode text")
2499 (description
2500 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2501useful when integrating with legacy code that doesn't support Unicode, or for
2502ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2503machine identifiers from human-readable Unicode strings that should still be
2504somewhat intelligeble.")
3f641af0 2505 (license license:gpl2+)))
850189b8
DT
2506
2507(define-public python2-unidecode
2508 (package-with-python2 python-unidecode))
6d45fef4
DT
2509
2510(define-public python-pyjwt
2511 (package
2512 (name "python-pyjwt")
eb31d4b4 2513 (version "1.4.0")
6d45fef4
DT
2514 (source
2515 (origin
2516 (method url-fetch)
eb31d4b4 2517 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2518 (sha256
2519 (base32
eb31d4b4 2520 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2521 (build-system python-build-system)
eb31d4b4 2522 (native-inputs
130fe994
HG
2523 `(("python-pytest" ,python-pytest)
2524 ("python-pytest-cov" ,python-pytest-cov)
2525 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2526 (home-page "http://github.com/progrium/pyjwt")
2527 (synopsis "JSON Web Token implementation in Python")
2528 (description
2529 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2530 (license license:expat)))
6d45fef4
DT
2531
2532(define-public python2-pyjwt
2533 (package-with-python2 python-pyjwt))
2534
2cec1f6f
DT
2535(define-public python-oauthlib
2536 (package
2537 (name "python-oauthlib")
bde2171d 2538 (version "1.0.3")
2cec1f6f
DT
2539 (source (origin
2540 (method url-fetch)
bde2171d 2541 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2542 (sha256
2543 (base32
bde2171d 2544 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2545 (build-system python-build-system)
bde2171d 2546 (native-inputs
bb06aa34 2547 `(("python-nose" ,python-nose)
c616b5d3 2548 ("python-mock" ,python-mock)
bde2171d 2549 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2550 ("python-pyjwt" ,python-pyjwt)
2551 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2552 (home-page "https://github.com/idan/oauthlib")
2553 (synopsis "OAuth implementation for Python")
2554 (description
2555 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2556OAuth request-signing logic.")
3f641af0 2557 (license license:bsd-3)
59f151ec 2558 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2559
2560(define-public python2-oauthlib
59f151ec 2561 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2562 (package
2563 (inherit base)
00e10c6e 2564 (native-inputs `(("python2-unittest2" ,python2-unittest2)
59f151ec 2565 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2566
2567(define-public python-itsdangerous
2568 (package
2569 (name "python-itsdangerous")
2570 (version "0.24")
2571 (source
2572 (origin
2573 (method url-fetch)
2574 (uri (string-append
2575 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2576 version ".tar.gz"))
2577 (sha256
2578 (base32
2579 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2580 (build-system python-build-system)
ec5dbb5c
DT
2581 (home-page "http://github.com/mitsuhiko/itsdangerous")
2582 (synopsis "Python library for passing data to/from untrusted environments")
2583 (description
2584 "Itsdangerous provides various helpers to pass trusted data to untrusted
2585environments and back.")
f210e944 2586 (license license:bsd-3)))
ec5dbb5c
DT
2587
2588(define-public python2-itsdangerous
f210e944 2589 (package-with-python2 python-itsdangerous))
5731cae3 2590
8d12be1e
RW
2591(define-public python-pyyaml
2592 (package
2593 (name "python-pyyaml")
2594 (version "3.11")
2595 (source
2596 (origin
2597 (method url-fetch)
2598 (uri (string-append
2599 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2600 version ".tar.gz"))
2601 (sha256
2602 (base32
2603 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2604 (build-system python-build-system)
2605 (inputs
2606 `(("libyaml" ,libyaml)))
8d12be1e
RW
2607 (home-page "http://pyyaml.org/wiki/PyYAML")
2608 (synopsis "YAML parser and emitter for Python")
2609 (description
2610 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2611complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2612API, and sensible error messages. PyYAML supports standard YAML tags and
2613provides Python-specific tags that allow to represent an arbitrary Python
2614object.")
2615 (license license:expat)))
2616
2617(define-public python2-pyyaml
2618 (package-with-python2 python-pyyaml))
2619
5731cae3
DT
2620(define-public python-virtualenv
2621 (package
2622 (name "python-virtualenv")
58d04dba 2623 (version "15.0.3")
5731cae3
DT
2624 (source
2625 (origin
2626 (method url-fetch)
17804240 2627 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2628 (sha256
2629 (base32
58d04dba 2630 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2631 (build-system python-build-system)
17804240
EF
2632 (arguments
2633 `(#:phases
2634 (modify-phases %standard-phases
58d04dba
RW
2635 (replace 'check
2636 (lambda _
2637 ;; Disable failing test. See upstream bug report
2638 ;; https://github.com/pypa/virtualenv/issues/957
2639 (substitute* "tests/test_virtualenv.py"
2640 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2641 (zero? (system* "py.test")))))))
e7881f3d 2642 (native-inputs
f3b98f4f 2643 `(("python-mock" ,python-mock)
17804240 2644 ("python-pytest" ,python-pytest)))
5731cae3
DT
2645 (home-page "https://virtualenv.pypa.io/")
2646 (synopsis "Virtual Python environment builder")
2647 (description
2648 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2649 (license license:expat)))
5731cae3
DT
2650
2651(define-public python2-virtualenv
2652 (package-with-python2 python-virtualenv))
8176d4d5
DT
2653
2654(define-public python-markupsafe
2655 (package
2656 (name "python-markupsafe")
2657 (version "0.23")
2658 (source
2659 (origin
2660 (method url-fetch)
2661 (uri (string-append
2662 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2663 version ".tar.gz"))
2664 (sha256
2665 (base32
2666 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2667 (build-system python-build-system)
8176d4d5
DT
2668 (home-page "http://github.com/mitsuhiko/markupsafe")
2669 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2670 (description
2671 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2672for Python.")
3f641af0 2673 (license license:bsd-3)))
8176d4d5
DT
2674
2675(define-public python2-markupsafe
2676 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2677
2678(define-public python-jinja2
2679 (package
2680 (name "python-jinja2")
e98149b3 2681 (version "2.8")
fe34f0d1
DT
2682 (source
2683 (origin
2684 (method url-fetch)
e98149b3 2685 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2686 (sha256
2687 (base32
e98149b3 2688 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2689 (build-system python-build-system)
f22efa01 2690 (propagated-inputs
f3b98f4f 2691 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2692 (home-page "http://jinja.pocoo.org/")
2693 (synopsis "Python template engine")
2694 (description
2695 "Jinja2 is a small but fast and easy to use stand-alone template engine
2696written in pure Python.")
3f641af0 2697 (license license:bsd-3)))
fe34f0d1
DT
2698
2699(define-public python2-jinja2
2700 (package-with-python2 python-jinja2))
3580ab8b 2701
f7d17ac7
EE
2702(define-public python-pystache
2703 (package
2704 (name "python-pystache")
2705 (version "0.5.4")
2706 (source (origin
2707 (method url-fetch)
2708 (uri (pypi-uri "pystache" version))
2709 (sha256
2710 (base32
2711 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2712 (build-system python-build-system)
8bd5164b
MB
2713 (arguments
2714 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
f7d17ac7
EE
2715 (home-page "http://defunkt.io/pystache/")
2716 (synopsis "Python logic-less template engine")
2717 (description
2718 "Pystache is a Python implementation of the framework agnostic,
2719logic-free templating system Mustache.")
8bd5164b
MB
2720 (license license:expat)
2721 (properties `((python2-variant . ,(delay python2-pystache))))))
f7d17ac7
EE
2722
2723(define-public python2-pystache
8bd5164b
MB
2724 (package (inherit (package-with-python2
2725 (strip-python2-variant python-pystache)))
2726 (arguments
2727 `(#:python ,python-2
2728 #:phases
2729 (modify-phases %standard-phases
2730 (replace 'check
2731 (lambda _
2732 (zero? (system* "python" "test_pystache.py")))))))))
f7d17ac7 2733
1285119b
RW
2734(define-public python-joblib
2735 (package
2736 (name "python-joblib")
f34ef331 2737 (version "0.10.3")
1285119b
RW
2738 (source (origin
2739 (method url-fetch)
f34ef331 2740 (uri (pypi-uri "joblib" version))
1285119b
RW
2741 (sha256
2742 (base32
6aa5f1ca
HG
2743 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2744 (modules '((guix build utils)))
2745 (snippet
2746 '(begin
2747 ;; Remove pre-compiled .pyc files from source.
2748 (for-each delete-file-recursively
2749 (find-files "." "__pycache__" #:directories? #t))
2750 (for-each delete-file (find-files "." "\\.pyc$"))
2751 #t))))
1285119b 2752 (build-system python-build-system)
a8dd960a
RW
2753 (arguments
2754 `(#:phases
2755 (modify-phases %standard-phases
2756 (add-before 'check 'disable-failing-tests
2757 (lambda _
2758 ;; This numpydoc tests fails for unknown reasons
2759 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2760 ;; This numpydoc test depends on matplotlib, which is not a
2761 ;; required input.
2762 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2763 ;; These tests fail to execute sys.executable
2764 (substitute* "joblib/test/test_parallel.py"
2765 (("import nose" line)
2766 (string-append "from nose.plugins.skip import SkipTest\n" line))
2767 (("def test_nested_parallel_warnings" line)
2768 (string-append "@SkipTest\n" line))
2769 (("def test_parallel_with_interactively_defined_functions" line)
2770 (string-append "@SkipTest\n" line)))
2771 #t)))))
f052ec9a 2772 ;; Provide nose to enable tests command
1285119b 2773 (native-inputs
f3b98f4f 2774 `(("python-nose" ,python-nose)
f34ef331
RW
2775 ("python-sphinx" ,python-sphinx)
2776 ("python-docutils" ,python-docutils)
2777 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2778 (home-page "http://pythonhosted.org/joblib/")
2779 (synopsis "Using Python functions as pipeline jobs")
2780 (description
2781 "Joblib is a set of tools to provide lightweight pipelining in Python.
2782In particular, joblib offers: transparent disk-caching of the output values
2783and lazy re-evaluation (memoize pattern), easy simple parallel computing
2784logging and tracing of the execution.")
3f641af0 2785 (license license:bsd-3)))
1285119b
RW
2786
2787(define-public python2-joblib
2788 (package-with-python2 python-joblib))
2789
3580ab8b
DT
2790(define-public python-docutils
2791 (package
2792 (name "python-docutils")
2793 (version "0.12")
2794 (source
2795 (origin
2796 (method url-fetch)
2797 (uri (string-append
2798 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2799 version ".tar.gz"))
2800 (sha256
2801 (base32
2802 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2803 (build-system python-build-system)
3580ab8b
DT
2804 (arguments
2805 '(#:tests? #f)) ; no setup.py test command
2806 (home-page "http://docutils.sourceforge.net/")
2807 (synopsis "Python Documentation Utilities")
2808 (description
2809 "Docutils is a modular system for processing documentation into useful
2810formats, such as HTML, XML, and LaTeX. For input Docutils supports
2811reStructuredText.")
2812 ;; Most of the source code is public domain, but some source files are
2813 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2814 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2815
2816(define-public python2-docutils
2817 (package-with-python2 python-docutils))
fb35b7c0
DT
2818
2819(define-public python-pygments
2820 (package
2821 (name "python-pygments")
9f442285 2822 (version "2.0.2")
fb35b7c0
DT
2823 (source
2824 (origin
2825 (method url-fetch)
9f442285 2826 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2827 (sha256
2828 (base32
9f442285 2829 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0 2830 (build-system python-build-system)
995cb99e
MB
2831 (arguments
2832 ;; FIXME: Tests require sphinx, which depends on this.
2833 '(#:tests? #f))
fb35b7c0
DT
2834 (home-page "http://pygments.org/")
2835 (synopsis "Syntax highlighting")
2836 (description
2837 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2838 (license license:bsd-2)))
fb35b7c0
DT
2839
2840(define-public python2-pygments
2841 (package-with-python2 python-pygments))
9dd6078d
DT
2842
2843(define-public python-sphinx
2844 (package
2845 (name "python-sphinx")
2846 (version "1.2.3")
2847 (source
2848 (origin
2849 (method url-fetch)
2850 (uri (string-append
2851 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2852 version ".tar.gz"))
2853 (sha256
2854 (base32
2855 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2856 (build-system python-build-system)
03cb5f9e
MB
2857 (arguments
2858 ;; FIXME: Missing dependencies.
2859 '(#:tests? #f))
f22efa01 2860 (propagated-inputs
f3b98f4f 2861 `(("python-jinja2" ,python-jinja2)
9dd6078d
DT
2862 ("python-docutils" ,python-docutils)
2863 ("python-pygments" ,python-pygments)))
2864 (home-page "http://sphinx-doc.org/")
2865 (synopsis "Python documentation generator")
2866 (description "Sphinx is a tool that makes it easy to create documentation
2867for Python projects or other documents consisting of multiple reStructuredText
2868sources.")
3f641af0 2869 (license license:bsd-3)))
9dd6078d
DT
2870
2871(define-public python2-sphinx
2872 (package-with-python2 python-sphinx))
6888830b 2873
ad320b20
RW
2874(define-public python-sphinx-rtd-theme
2875 (package
2876 (name "python-sphinx-rtd-theme")
2877 (version "0.1.6")
2878 (source
2879 (origin
2880 (method url-fetch)
2881 (uri (string-append "https://pypi.python.org/packages/source/s/"
2882 "sphinx_rtd_theme/sphinx_rtd_theme-"
2883 version ".tar.gz"))
2884 (sha256
2885 (base32
2886 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2887 (build-system python-build-system)
9d3a15b4
LF
2888 (propagated-inputs
2889 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
2890 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2891 (synopsis "ReadTheDocs.org theme for Sphinx")
2892 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2893 (license license:expat)))
ad320b20
RW
2894
2895(define-public python2-sphinx-rtd-theme
2896 (package-with-python2 python-sphinx-rtd-theme))
2897
fe94cf0c
HG
2898(define-public python-rst.linker
2899 (package
2900 (name "python-rst.linker")
2901 (version "1.7")
2902 (source
2903 (origin
2904 (method url-fetch)
2905 (uri (pypi-uri "rst.linker" version))
2906 (sha256
2907 (base32
2908 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2909 (build-system python-build-system)
2910 (propagated-inputs
2911 `(("python-dateutil" ,python-dateutil-2)
2912 ("python-six" ,python-six)))
2913 (native-inputs
2914 `(("python-setuptools-scm" ,python-setuptools-scm)))
2915 ;; Test would require path.py, which would introduce a cyclic dependence.
2916 (arguments `(#:tests? #f))
2917 ;; Note: As of version 1.7 the documentation is not worth building.
2918 (home-page "https://github.com/jaraco/rst.linker")
2919 (synopsis "Sphinx plugin to add links and timestamps")
2920 (description "rst.linker allows to automatically replace text by a
2921reStructuredText external reference or timestamps. It's primary purpose is to
2922augment the changelog, but it can be used for other documents, too.")
2923 (license license:expat)))
2924
2925(define-public python2-rst.linker
2926 (package-with-python2 python-rst.linker))
2927
f4de5b3b
CAW
2928(define-public python-feedgenerator
2929 (package
2930 (name "python-feedgenerator")
f0412aa2 2931 (version "1.8")
f4de5b3b 2932 (source
f4de5b3b 2933 (origin
f0412aa2
EF
2934 (method url-fetch)
2935 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2936 (sha256
2937 (base32
7c88bcf4
HG
2938 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
2939 (modules '((guix build utils)))
2940 (snippet
2941 '(begin
2942 ;; Remove pre-compiled .pyc files from source.
2943 (for-each delete-file-recursively
2944 (find-files "." "__pycache__" #:directories? #t))
2945 (for-each delete-file (find-files "." "\\.pyc$"))
2946 #t))))
f4de5b3b 2947 (build-system python-build-system)
dae73d9b 2948 (propagated-inputs
f3b98f4f 2949 `(("python-pytz" ,python-pytz)
f4de5b3b 2950 ("python-six" ,python-six)))
f0412aa2 2951 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2952 (synopsis
2953 "Standalone version of Django's Atom/RSS feed generator")
2954 (description
2955 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2956which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2957 (license license:bsd-3)))
f4de5b3b
CAW
2958
2959(define-public python2-feedgenerator
2960 (package-with-python2 python-feedgenerator))
2961
59ad30e3
CAW
2962(define-public python-blinker
2963 (package
2964 (name "python-blinker")
7fb9ff4d 2965 (version "1.4")
59ad30e3
CAW
2966 (source
2967 (origin
2968 (method url-fetch)
7fb9ff4d 2969 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2970 (sha256
2971 (base32
7fb9ff4d 2972 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 2973 (build-system python-build-system)
59ad30e3
CAW
2974 (home-page "http://pythonhosted.org/blinker/")
2975 (synopsis "Fast, simple object-to-object and broadcast signaling")
2976 (description
2977 "Blinker provides a fast dispatching system that allows any number of
2978interested parties to subscribe to events, or \"signals\".")
2979 (license license:expat)))
2980
2981(define-public python2-blinker
2982 (package-with-python2 python-blinker))
2983
b8050e71
CAW
2984(define-public pelican
2985 (package
2986 (name "pelican")
11f97c27 2987 (version "3.6.3")
b8050e71
CAW
2988 (source
2989 (origin
2990 (method url-fetch)
11f97c27 2991 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2992 (sha256
2993 (base32
11f97c27 2994 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2995 (build-system python-build-system)
f22efa01 2996 (propagated-inputs
b8050e71
CAW
2997 `(("python-feedgenerator" ,python-feedgenerator)
2998 ("python-jinja2" ,python-jinja2)
2999 ("python-pygments" ,python-pygments)
3000 ("python-docutils" ,python-docutils)
3001 ("python-pytz" ,python-pytz)
3002 ("python-blinker" ,python-blinker)
3003 ("python-unidecode" ,python-unidecode)
3004 ("python-six" ,python-six)
3005 ("python-dateutil-2" ,python-dateutil-2)))
3006 (home-page "http://getpelican.com/")
3007 (arguments
3008 `(;; XXX Requires a lot more packages to do unit tests :P
3009 #:tests? #f
3010 #:phases (modify-phases %standard-phases
3011 (add-before
3012 'install 'adjust-requires
3013 ;; Since feedgenerator is installed from git, it doesn't
3014 ;; conform to the version requirements.
3015 ;;
3016 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3017 ;; version requirement so setuptools doesn't get confused.
3018 (lambda _
3019 (substitute* "setup.py"
3020 (("['\"]feedgenerator.*?['\"]")
3021 "'feedgenerator'")))))))
3022 (synopsis "Python-based static site publishing system")
3023 (description
3024 "Pelican is a tool to generate a static blog from reStructuredText,
3025Markdown input files, and more. Pelican uses Jinja2 for templating
3026and is very extensible.")
3f641af0 3027 (license license:agpl3+)))
b8050e71 3028
240ca4aa
RW
3029(define-public python-scikit-learn
3030 (package
3031 (name "python-scikit-learn")
be0a4c26 3032 (version "0.16.1")
240ca4aa
RW
3033 (source
3034 (origin
3035 (method url-fetch)
3036 (uri (string-append
3037 "https://github.com/scikit-learn/scikit-learn/archive/"
3038 version ".tar.gz"))
7e21b9fb 3039 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3040 (sha256
3041 (base32
be0a4c26 3042 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
3043 (build-system python-build-system)
3044 (arguments
3045 `(#:phases
3046 (alist-cons-before
2f6b3d2e
RW
3047 'check 'set-HOME
3048 ;; some tests require access to "$HOME"
3049 (lambda _ (setenv "HOME" "/tmp"))
3050 ;; Tests can only be run after the library has been installed and not
3051 ;; within the source directory.
3052 (alist-cons-after
3053 'install 'check
3054 (lambda _
3055 (with-directory-excursion "/tmp"
3056 ;; With Python 3 one test of 3334 fails
3057 ;; (sklearn.tests.test_common.test_transformers); see
3058 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
3059 (system* "nosetests" "-v" "sklearn")))
3060 (alist-delete 'check %standard-phases)))))
240ca4aa 3061 (inputs
328bb95d
HG
3062 `(("openblas" ,openblas)))
3063 (native-inputs
3064 `(("python-nose" ,python-nose)))
240ca4aa
RW
3065 (propagated-inputs
3066 `(("python-numpy" ,python-numpy)
3067 ("python-scipy" ,python-scipy)))
3068 (home-page "http://scikit-learn.org/")
3069 (synopsis "Machine Learning in Python")
3070 (description
3071 "Scikit-learn provides simple and efficient tools for data
3072mining and data analysis.")
1b5241c5 3073 (license license:bsd-3)))
240ca4aa
RW
3074
3075(define-public python2-scikit-learn
1b5241c5 3076 (package-with-python2 python-scikit-learn))
240ca4aa 3077
12f8f9bb
RW
3078(define-public python-scikit-image
3079 (package
3080 (name "python-scikit-image")
3081 (version "0.11.3")
3082 (source
3083 (origin
3084 (method url-fetch)
3085 (uri (string-append
3086 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3087 version ".tar.gz"))
3088 (sha256
3089 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3090 (build-system python-build-system)
9026e689
MB
3091 (arguments
3092 ;; TODO: Some tests require running X11 server. Disable them?
3093 '(#:tests? #f))
b83e2333 3094 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3095 (propagated-inputs
3096 `(("python-matplotlib" ,python-matplotlib)
3097 ("python-networkx" ,python-networkx)
12f8f9bb 3098 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3099 ("python-pillow" ,python-pillow)))
3100 (native-inputs
b83e2333
HG
3101 `(("python-numpy" ,python-numpy)
3102 ("python-cython" ,python-cython)
3103 ("python-six" ,python-six)))
12f8f9bb
RW
3104 (home-page "http://scikit-image.org/")
3105 (synopsis "Image processing in Python")
3106 (description
e881752c 3107 "Scikit-image is a collection of algorithms for image processing.")
12733594 3108 (license license:bsd-3)))
12f8f9bb
RW
3109
3110(define-public python2-scikit-image
12733594 3111 (package-with-python2 python-scikit-image))
12f8f9bb 3112
5394a6a6
RW
3113(define-public python-redis
3114 (package
3115 (name "python-redis")
3116 (version "2.10.3")
3117 (source
3118 (origin
3119 (method url-fetch)
3120 (uri (string-append
3121 "https://pypi.python.org/packages/source/r/redis/redis-"
3122 version ".tar.gz"))
3123 (sha256
3124 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3125 (build-system python-build-system)
3126 ;; Tests require a running Redis server
3127 (arguments '(#:tests? #f))
cf8124b0
HG
3128 ;; As long as we are not running test, we do not need this input :-)
3129 ;;(native-inputs
3130 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3131 (home-page "https://github.com/andymccurdy/redis-py")
3132 (synopsis "Redis Python client")
3133 (description
3134 "This package provides a Python interface to the Redis key-value store.")
3135 (license license:expat)))
3136
3137(define-public python2-redis
3138 (package-with-python2 python-redis))
3139
748cef5b
RW
3140(define-public python-rq
3141 (package
3142 (name "python-rq")
3143 (version "0.5.2")
3144 (source
3145 (origin
3146 (method url-fetch)
3147 (uri (string-append
3148 "https://pypi.python.org/packages/source/r/rq/rq-"
3149 version ".tar.gz"))
3150 (sha256
3151 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3152 (build-system python-build-system)
3153 (propagated-inputs
3154 `(("python-click" ,python-click)
3155 ("python-redis" ,python-redis)))
748cef5b
RW
3156 (home-page "http://python-rq.org/")
3157 (synopsis "Simple job queues for Python")
3158 (description
3159 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3160processing them in the background with workers. It is backed by Redis and it
3161is designed to have a low barrier to entry.")
3f641af0 3162 (license license:bsd-2)))
748cef5b
RW
3163
3164(define-public python2-rq
3165 (package-with-python2 python-rq))
3166
6888830b
FB
3167(define-public python-cython
3168 (package
3169 (name "python-cython")
dd22efef 3170 (version "0.24.1")
6888830b
FB
3171 (source
3172 (origin
3173 (method url-fetch)
56918e26 3174 (uri (pypi-uri "Cython" version))
6888830b
FB
3175 (sha256
3176 (base32
dd22efef 3177 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3178 (build-system python-build-system)
3179 ;; we need the full python package and not just the python-wrapper
3180 ;; because we need libpython3.3m.so
3181 (inputs
3182 `(("python" ,python)))
3183 (arguments
3184 `(#:phases
b92f651b
EF
3185 (modify-phases %standard-phases
3186 (add-before 'check 'set-HOME
3187 ;; some tests require access to "$HOME/.cython"
3188 (lambda _ (setenv "HOME" "/tmp")))
3189 (replace 'check
3190 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3191 (home-page "http://cython.org/")
3192 (synopsis "C extensions for Python")
3193 (description "Cython is an optimising static compiler for both the Python
3194programming language and the extended Cython programming language. It makes
3195writing C extensions for Python as easy as Python itself.")
3f641af0 3196 (license license:asl2.0)
48b311b1 3197 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3198
3199(define-public python2-cython
48b311b1
LC
3200 (package (inherit (package-with-python2
3201 (strip-python2-variant python-cython)))
6888830b
FB
3202 (name "python2-cython")
3203 (inputs
3204 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3205
ee5fb7ee
AV
3206;; The RPython toolchain currently does not support Python 3.
3207(define-public python2-rpython
3208 (package
3209 (name "python2-rpython")
3210 (version "0.1.4")
3211 (source
3212 (origin
3213 (method url-fetch)
3214 (uri (pypi-uri "rpython" version))
3215 (sha256
3216 (base32
3217 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3218 (build-system python-build-system)
3219 (arguments `(#:python ,python-2))
3220 (native-inputs
f3b98f4f 3221 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3222 (home-page "https://rpython.readthedocs.org")
3223 (synopsis "Framework for implementing interpreters and virtual machines")
3224 (description "RPython is a translation and support framework for
3225producing implementations of dynamic languages, emphasizing a clean separation
3226between language specification and implementation aspects.")
3227 (license license:expat)))
3228
0da98533
FB
3229;; This version of numpy is missing the documentation and is only used to
3230;; build matplotlib which is required to build numpy's documentation.
3231(define python-numpy-bootstrap
3232 (package
3233 (name "python-numpy-bootstrap")
ef9b4c04 3234 (version "1.10.4")
0da98533
FB
3235 (source
3236 (origin
3237 (method url-fetch)
de67e922 3238 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3239 "/numpy-" version ".tar.gz"))
3240 (sha256
3241 (base32
ef9b4c04 3242 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3243 (build-system python-build-system)
3244 (inputs
328bb95d 3245 `(("openblas" ,openblas)
cba256f8 3246 ("lapack" ,lapack)))
0da98533 3247 (native-inputs
2efabc55
HG
3248 `(("python-nose" ,python-nose)
3249 ("gfortran" ,gfortran)))
0da98533
FB
3250 (arguments
3251 `(#:phases
2efabc55
HG
3252 (modify-phases %standard-phases
3253 (add-before 'build 'set-environment-variables
3254 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3255 (call-with-output-file "site.cfg"
3256 (lambda (port)
cba256f8
RW
3257 (format port
3258 "[openblas]
dbdfe515
RW
3259libraries = openblas
3260library_dirs = ~a/lib
3261include_dirs = ~a/include
cba256f8 3262
2efabc55
HG
3263# backslash-n to make emacs happy
3264\n[lapack]
cba256f8
RW
3265lapack_libs = lapack
3266library_dirs = ~a/lib
3267include_dirs = ~a/include
3268"
3269 (assoc-ref inputs "openblas")
3270 (assoc-ref inputs "openblas")
3271 (assoc-ref inputs "lapack")
3272 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3273 ;; Use "gcc" executable, not "cc".
3274 (substitute* "numpy/distutils/system_info.py"
3275 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3276 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3277 #t))
6a843168
FB
3278 ;; Tests can only be run after the library has been installed and not
3279 ;; within the source directory.
2efabc55
HG
3280 (delete 'check)
3281 (add-after 'install 'check
3282 (lambda* (#:key outputs inputs #:allow-other-keys)
3283 ;; Make installed package available for running the tests
3284 (add-installed-pythonpath inputs outputs)
6a843168 3285 (with-directory-excursion "/tmp"
89b5c60e 3286 (zero? (system* "python" "-c"
2efabc55 3287 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3288 (home-page "http://www.numpy.org/")
3289 (synopsis "Fundamental package for scientific computing with Python")
3290 (description "NumPy is the fundamental package for scientific computing
e881752c 3291with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3292object, sophisticated (broadcasting) functions, tools for integrating C/C++
3293and Fortran code, useful linear algebra, Fourier transform, and random number
3294capabilities.")
3f641af0 3295 (license license:bsd-3)))
0da98533
FB
3296
3297(define python2-numpy-bootstrap
3298 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3299
3a1bfe18
RW
3300(define-public python2-fastlmm
3301 (package
3302 (name "python2-fastlmm")
b074e7d4 3303 (version "0.2.21")
3a1bfe18
RW
3304 (source
3305 (origin
3306 (method url-fetch)
b074e7d4 3307 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3308 (sha256
3309 (base32
b074e7d4 3310 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3311 (build-system python-build-system)
3312 (arguments
3313 `(#:python ,python-2)) ; only Python 2.7 is supported
3314 (propagated-inputs
3315 `(("python2-numpy" ,python2-numpy)
3316 ("python2-scipy" ,python2-scipy)
3317 ("python2-matplotlib" ,python2-matplotlib)
3318 ("python2-pandas" ,python2-pandas)
3319 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3320 ("python2-pysnptools" ,python2-pysnptools)))
3321 (native-inputs
3322 `(("unzip" ,unzip)
2efabc55 3323 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3324 ("python2-mock" ,python2-mock)
3325 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3326 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3327 (synopsis "Perform genome-wide association studies on large data sets")
3328 (description
3329 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3330Models, is a program for performing both single-SNP and SNP-set genome-wide
3331association studies (GWAS) on extremely large data sets.")
3f641af0 3332 (license license:asl2.0)))
3a1bfe18 3333
2ee8869a
FB
3334(define-public python-numpy
3335 (package (inherit python-numpy-bootstrap)
3336 (name "python-numpy")
3337 (outputs '("out" "doc"))
89b5c60e 3338 (inputs
b0aa6ede
HG
3339 `(("which" ,which)
3340 ,@(package-inputs python-numpy-bootstrap)))
2efabc55
HG
3341 (propagated-inputs
3342 `(("python-matplotlib" ,python-matplotlib)
2ee8869a 3343 ("python-pyparsing" ,python-pyparsing)
b0aa6ede 3344 ,@(package-propagated-inputs python-numpy-bootstrap)))
2ee8869a
FB
3345 (native-inputs
3346 `(("pkg-config" ,pkg-config)
2efabc55
HG
3347 ("python-sphinx" ,python-sphinx)
3348 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3349 ("texlive" ,texlive)
3350 ("texinfo" ,texinfo)
3351 ("perl" ,perl)
3352 ,@(package-native-inputs python-numpy-bootstrap)))
3353 (arguments
89b5c60e 3354 `(,@(substitute-keyword-arguments
2ee8869a
FB
3355 (package-arguments python-numpy-bootstrap)
3356 ((#:phases phases)
3357 `(alist-cons-after
3358 'install 'install-doc
2efabc55
HG
3359 (lambda* (#:key inputs outputs #:allow-other-keys)
3360 ;; Make installed package available for building the
3361 ;; documentation
3362 (add-installed-pythonpath inputs outputs)
2ee8869a 3363 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3364 (doc (string-append
3365 data "/doc/" ,name "-"
2ee8869a
FB
3366 ,(package-version python-numpy-bootstrap)))
3367 (info (string-append data "/info"))
3368 (html (string-append doc "/html"))
3369 (pyver ,(string-append "PYVER=")))
3370 (with-directory-excursion "doc"
3371 (mkdir-p html)
3372 (system* "make" "html" pyver)
3373 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3374 (system* "make" "-C" "build/latex"
2ee8869a
FB
3375 "all-pdf" "PAPER=a4" pyver)
3376 ;; FIXME: Generation of the info file fails.
3377 ;; (system* "make" "info" pyver)
3378 ;; (mkdir-p info)
3379 ;; (copy-file "build/texinfo/numpy.info"
3380 ;; (string-append info "/numpy.info"))
3381 (for-each (lambda (file)
3382 (copy-file (string-append "build/latex" file)
3383 (string-append doc file)))
3384 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3385 (with-directory-excursion "build/html"
3386 (for-each (lambda (file)
3387 (let* ((dir (dirname file))
3388 (tgt-dir (string-append html "/" dir)))
3389 (unless (equal? "." dir)
3390 (mkdir-p tgt-dir))
96c46210 3391 (install-file file html)))
2ee8869a
FB
3392 (find-files "." ".*"))))))
3393 ,phases)))))))
3394
764c077b 3395(define-public python2-numpy
57b7b8cd 3396 (package-with-python2 python-numpy))
2ee8869a 3397
15bfe6d6
FB
3398(define-public python-pyparsing
3399 (package
3400 (name "python-pyparsing")
e0669289 3401 (version "2.0.3")
15bfe6d6
FB
3402 (source
3403 (origin
3404 (method url-fetch)
de67e922
LF
3405 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3406 "/pyparsing-" version
15bfe6d6
FB
3407 "/pyparsing-" version ".tar.gz"))
3408 (sha256
3409 (base32
e0669289 3410 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3411 (build-system python-build-system)
3412 (outputs '("out" "doc"))
3413 (arguments
3414 `(#:tests? #f ; no test target
3415 #:modules ((guix build python-build-system)
3416 (guix build utils))
3417 #:phases
3418 (alist-cons-after
3419 'install 'install-doc
3420 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3421 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3422 "/share/doc/" ,name "-" ,version))
3423 (html-doc (string-append doc "/html"))
3424 (examples (string-append doc "/examples")))
3425 (mkdir-p html-doc)
3426 (mkdir-p examples)
89b5c60e 3427 (for-each
15bfe6d6 3428 (lambda (dir tgt)
89b5c60e 3429 (map (lambda (file)
96c46210 3430 (install-file file tgt))
15bfe6d6
FB
3431 (find-files dir ".*")))
3432 (list "docs" "htmldoc" "examples")
3433 (list doc html-doc examples))))
3434 %standard-phases)))
3435 (home-page "http://pyparsing.wikispaces.com")
3436 (synopsis "Python parsing class library")
3437 (description
3438 "The pyparsing module is an alternative approach to creating and
3439executing simple grammars, vs. the traditional lex/yacc approach, or the use
3440of regular expressions. The pyparsing module provides a library of classes
3441that client code uses to construct the grammar directly in Python code.")
bd3fa666 3442 (license license:expat)))
15bfe6d6
FB
3443
3444(define-public python2-pyparsing
3445 (package-with-python2 python-pyparsing))
3446
ec00de35
FB
3447(define-public python-numpydoc
3448 (package
3449 (name "python-numpydoc")
3450 (version "0.5")
3451 (source
3452 (origin
3453 (method url-fetch)
89b5c60e 3454 (uri (string-append
ec00de35
FB
3455 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3456 version ".tar.gz"))
3457 (sha256
3458 (base32
5e4d8f67
AE
3459 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3460 (modules '((guix build utils)))
3461 (snippet
3462 '(begin
3463 ;; Drop a test requiring matplotlib, which we cannot add as an
3464 ;; input since it would create a circular dependency: Extend the
3465 ;; test for Python 3, where it is already dropped, to Python 2.
3466 (substitute* "numpydoc/tests/test_plot_directive.py"
3467 (("3") "2"))))))
ec00de35 3468 (build-system python-build-system)
fe4a8da4 3469 (propagated-inputs
213d1745
HG
3470 `(("python-sphinx" ,python-sphinx)))
3471 (native-inputs
3472 `(("python-nose" ,python-nose)))
ec00de35
FB
3473 (home-page "https://pypi.python.org/pypi/numpydoc")
3474 (synopsis
3475 "Numpy's Sphinx extensions")
3476 (description
3477 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3478 (license license:bsd-2)))
ec00de35
FB
3479
3480(define-public python2-numpydoc
5e4d8f67 3481 (package-with-python2 python-numpydoc))
1c65314c 3482
1e656049
RW
3483(define-public python-numexpr
3484 (package
3485 (name "python-numexpr")
26112c0a 3486 (version "2.6.0")
1e656049
RW
3487 (source
3488 (origin
3489 (method url-fetch)
26112c0a 3490 (uri (pypi-uri "numexpr" version))
1e656049
RW
3491 (sha256
3492 (base32
26112c0a 3493 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3494 (build-system python-build-system)
3495 (arguments `(#:tests? #f)) ; no tests included
3496 (propagated-inputs
3497 `(("python-numpy" ,python-numpy)))
3498 (home-page "https://github.com/pydata/numexpr")
3499 (synopsis "Fast numerical expression evaluator for NumPy")
3500 (description
3501 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3502expressions that operate on arrays are accelerated and use less memory than
3503doing the same calculation in Python. In addition, its multi-threaded
3504capabilities can make use of all your cores, which may accelerate
3505computations, most specially if they are not memory-bounded (e.g. those using
3506transcendental functions).")
f210e944 3507 (license license:expat)))
1e656049
RW
3508
3509(define-public python2-numexpr
f210e944 3510 (package-with-python2 python-numexpr))
1e656049 3511
1c65314c
FB
3512(define-public python-matplotlib
3513 (package
3514 (name "python-matplotlib")
1bbc659f 3515 (version "1.4.3")
1c65314c
FB
3516 (source
3517 (origin
3518 (method url-fetch)
de67e922
LF
3519 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3520 "/matplotlib-" version
1c65314c
FB
3521 "/matplotlib-" version ".tar.gz"))
3522 (sha256
3523 (base32
1bbc659f 3524 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3525 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3526 (build-system python-build-system)
3527 (outputs '("out" "doc"))
25f9a068
FB
3528 (propagated-inputs ; the following packages are all needed at run time
3529 `(("python-pyparsing" ,python-pyparsing)
3530 ("python-pygobject" ,python-pygobject)
3531 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3532 ("python-tkinter" ,python "tk")
ca33a3ad
HG
3533 ("python-dateutil" ,python-dateutil-2)
3534 ("python-numpy" ,python-numpy-bootstrap)
3535 ("python-pillow" ,python-pillow)
3536 ("python-pytz" ,python-pytz)
3537 ("python-six" ,python-six)
25f9a068
FB
3538 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3539 ;; from 'gtk+') provides the required 'typelib' files used by
3540 ;; 'gobject-introspection'. The location of these files is set with the
3541 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3542 ;; is done automatically by a 'native-search-path' procedure. However,
3543 ;; at run-time the user must set this variable as follows:
3544 ;;
3545 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3546 ("gtk+" ,gtk+)
3547 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3548 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3549 ;; object. For this reason we need to import both libraries.
3550 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3551 ("python-pycairo" ,python-pycairo)
3552 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3553 (inputs
ca33a3ad 3554 `(("libpng" ,libpng)
1c65314c
FB
3555 ("imagemagick" ,imagemagick)
3556 ("freetype" ,freetype)
25f9a068
FB
3557 ("cairo" ,cairo)
3558 ("glib" ,glib)
1c65314c 3559 ;; FIXME: Add backends when available.
1c65314c
FB
3560 ;("python-wxpython" ,python-wxpython)
3561 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3562 ("tcl" ,tcl)
3563 ("tk" ,tk)))
1c65314c
FB
3564 (native-inputs
3565 `(("pkg-config" ,pkg-config)
ca33a3ad
HG
3566 ("python-sphinx" ,python-sphinx)
3567 ("python-numpydoc" ,python-numpydoc)
3568 ("python-nose" ,python-nose)
3569 ("python-mock" ,python-mock)
1c65314c
FB
3570 ("texlive" ,texlive)
3571 ("texinfo" ,texinfo)))
3572 (arguments
3573 `(#:phases
25f9a068
FB
3574 (alist-cons-before
3575 'build 'configure-environment
3576 (lambda* (#:key outputs inputs #:allow-other-keys)
3577 (let ((cairo (assoc-ref inputs "cairo"))
3578 (gtk+ (assoc-ref inputs "gtk+")))
3579 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3580 ;; has not effect.
25f9a068
FB
3581 (setenv "LD_LIBRARY_PATH"
3582 (string-append cairo "/lib:" gtk+ "/lib"))
3583 (setenv "HOME" (getcwd))
3584 (call-with-output-file "setup.cfg"
3585 (lambda (port)
1bbc659f
FB
3586 (format port "[directories]~%
3587basedirlist = ~a,~a~%
57b7b8cd 3588 [rc_options]~%
1bbc659f
FB
3589backend = TkAgg~%"
3590 (assoc-ref inputs "tcl")
3591 (assoc-ref inputs "tk"))))))
25f9a068
FB
3592 (alist-cons-after
3593 'install 'install-doc
ca33a3ad 3594 (lambda* (#:key inputs outputs #:allow-other-keys)
25f9a068
FB
3595 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3596 (doc (string-append data "/doc/" ,name "-" ,version))
3597 (info (string-append data "/info"))
3598 (html (string-append doc "/html")))
ca33a3ad
HG
3599 ;; Make installed package available for building the
3600 ;; documentation
3601 (add-installed-pythonpath inputs outputs)
25f9a068 3602 (with-directory-excursion "doc"
25f9a068
FB
3603 ;; Produce pdf in 'A4' format.
3604 (substitute* (find-files "." "conf\\.py")
3605 (("latex_paper_size = 'letter'")
3606 "latex_paper_size = 'a4'"))
3607 (mkdir-p html)
3608 (mkdir-p info)
3609 ;; The doc recommends to run the 'html' target twice.
3610 (system* "python" "make.py" "html")
3611 (system* "python" "make.py" "html")
18b31516 3612 (copy-recursively "build/html" html)
25f9a068
FB
3613 (system* "python" "make.py" "latex")
3614 (system* "python" "make.py" "texinfo")
18b31516
FB
3615 (symlink (string-append html "/_images")
3616 (string-append info "/matplotlib-figures"))
3617 (with-directory-excursion "build/texinfo"
3618 (substitute* "matplotlib.texi"
3619 (("@image\\{([^,]*)" all file)
3620 (string-append "@image{matplotlib-figures/" file)))
3621 (symlink (string-append html "/_images")
3622 "./matplotlib-figures")
3623 (system* "makeinfo" "--no-split"
3624 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3625 (copy-file "build/texinfo/matplotlib.info"
3626 (string-append info "/matplotlib.info"))
3627 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3628 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3629 %standard-phases))))
1c65314c
FB
3630 (home-page "http://matplotlib.org")
3631 (synopsis "2D plotting library for Python")
3632 (description
3633 "Matplotlib is a Python 2D plotting library which produces publication
3634quality figures in a variety of hardcopy formats and interactive environments
3635across platforms. Matplotlib can be used in Python scripts, the python and
3636ipython shell, web application servers, and six graphical user interface
3637toolkits.")
3f641af0 3638 (license license:psfl)
57b7b8cd 3639 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3640
764c077b 3641(define-public python2-matplotlib
57b7b8cd
LC
3642 (let ((matplotlib (package-with-python2
3643 (strip-python2-variant python-matplotlib))))
764c077b 3644 (package (inherit matplotlib)
88c26834
AE
3645 ;; Make sure to use special packages for Python 2 instead
3646 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3647 (propagated-inputs
7ca0dbc3 3648 `(("python2-pycairo" ,python2-pycairo)
764c077b 3649 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3650 ("python2-tkinter" ,python-2 "tk")
3651 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3652 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3653
0dde6232
RW
3654(define-public python2-pysnptools
3655 (package
3656 (name "python2-pysnptools")
a800018e 3657 (version "0.3.9")
0dde6232
RW
3658 (source
3659 (origin
3660 (method url-fetch)
3f2e9675 3661 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3662 (sha256
3663 (base32
a800018e 3664 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3665 (build-system python-build-system)
3666 (arguments
3667 `(#:python ,python-2)) ; only Python 2.7 is supported
3668 (propagated-inputs
3669 `(("python2-numpy" ,python2-numpy)
3670 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
3671 ("python2-pandas" ,python2-pandas)))
3672 (native-inputs
3673 `(("python2-cython" ,python2-cython)))
0dde6232 3674 (native-inputs
f3b98f4f 3675 `(("unzip" ,unzip)))
0dde6232
RW
3676 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3677 (synopsis "Library for reading and manipulating genetic data")
3678 (description
3679 "PySnpTools is a library for reading and manipulating genetic data. It
3680can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3681those files. It can also efficiently manipulate ranges of integers using set
3682operators such as union, intersection, and difference.")
3f641af0 3683 (license license:asl2.0)))
0dde6232 3684
c9b1b4f9
RW
3685(define-public python-rpy2
3686 (package
3687 (name "python-rpy2")
ec3bcbc7 3688 (version "2.7.6")
c9b1b4f9
RW
3689 (source
3690 (origin
3691 (method url-fetch)
ec3bcbc7 3692 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3693 (sha256
3694 (base32
ec3bcbc7 3695 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 3696 (build-system python-build-system)
444464ec
MB
3697 (arguments
3698 '(#:phases
3699 (modify-phases %standard-phases
3700 (delete 'check)
3701 (add-after 'install 'check
3702 (lambda* (#:key outputs inputs #:allow-other-keys)
3703 ;; It's easier to run tests after install.
3704 ;; Make installed package available for running the tests
3705 (add-installed-pythonpath inputs outputs)
3706 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
482d9591
HG
3707 (propagated-inputs
3708 `(("python-six" ,python-six)))
c9b1b4f9 3709 (inputs
482d9591 3710 `(("readline" ,readline)
c9b1b4f9
RW
3711 ("icu4c" ,icu4c)
3712 ("pcre" ,pcre)
3713 ("r" ,r)))
3714 (native-inputs
f3b98f4f 3715 `(("zlib" ,zlib)))
c9b1b4f9
RW
3716 (home-page "http://rpy.sourceforge.net/")
3717 (synopsis "Python interface to the R language")
3718 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3719low-level interface to R from Python, a proposed high-level interface,
3720including wrappers to graphical libraries, as well as R-like structures and
3721functions.")
3f641af0 3722 (license license:gpl3+)))
c9b1b4f9
RW
3723
3724(define-public python2-rpy2
3725 (let ((rpy2 (package-with-python2 python-rpy2)))
3726 (package (inherit rpy2)
3727 (native-inputs
3728 `(("python2-singledispatch" ,python2-singledispatch)
3729 ,@(package-native-inputs rpy2))))))
3730
bb986599
FB
3731(define-public python-scipy
3732 (package
3733 (name "python-scipy")
ba8a0824 3734 (version "0.16.0")
bb986599
FB
3735 (source
3736 (origin
3737 (method url-fetch)
de67e922
LF
3738; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3739 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3740 "/scipy-" version ".tar.xz"))
bb986599
FB
3741 (sha256
3742 (base32
ba8a0824 3743 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3744 (build-system python-build-system)
dd86c0d1 3745 (propagated-inputs
bb986599
FB
3746 `(("python-numpy" ,python-numpy)
3747 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3748 ("python-pyparsing" ,python-pyparsing)))
3749 (inputs
3750 `(("lapack" ,lapack)
719b01c1 3751 ("openblas" ,openblas)))
bb986599 3752 (native-inputs
dd86c0d1
RW
3753 `(("python-nose" ,python-nose)
3754 ("python-sphinx" ,python-sphinx)
5248d49e 3755 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3756 ("gfortran" ,gfortran)
bb986599
FB
3757 ("texlive" ,texlive)
3758 ("perl" ,perl)))
3759 (outputs '("out" "doc"))
3760 (arguments
3761 `(#:phases
3762 (alist-cons-before
719b01c1 3763 'build 'configure-openblas
bb986599 3764 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3765 (call-with-output-file "site.cfg"
3766 (lambda (port)
3767 (format port
3768 "[blas]
3769libraries = openblas
3770library_dirs = ~a/lib
3771include_dirs = ~a/include
d548e6aa
HG
3772
3773# backslash-n to make emacs happy
3774\n[atlas]
719b01c1
RW
3775library_dirs = ~a/lib
3776atlas_libs = openblas
3777"
3778 (assoc-ref inputs "openblas")
3779 (assoc-ref inputs "openblas")
3780 (assoc-ref inputs "openblas"))))
3781 #t)
bb986599
FB
3782 (alist-cons-after
3783 'install 'install-doc
d548e6aa 3784 (lambda* (#:key inputs outputs #:allow-other-keys)
bb986599
FB
3785 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3786 (doc (string-append data "/doc/" ,name "-" ,version))
3787 (html (string-append doc "/html"))
3788 (pyver ,(string-append "PYVER=")))
d548e6aa
HG
3789 ;; Make installed package available for building the
3790 ;; documentation
3791 (add-installed-pythonpath inputs outputs)
bb986599 3792 (with-directory-excursion "doc"
bb986599
FB
3793 ;; Fix generation of images for mathematical expressions.
3794 (substitute* (find-files "source" "conf\\.py")
3795 (("pngmath_use_preview = True")
3796 "pngmath_use_preview = False"))
3797 (mkdir-p html)
3798 (system* "make" "html" pyver)
3799 (system* "make" "latex" "PAPER=a4" pyver)
3800 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3801 (copy-file "build/latex/scipy-ref.pdf"
3802 (string-append doc "/scipy-ref.pdf"))
3803 (with-directory-excursion "build/html"
3804 (for-each (lambda (file)
3805 (let* ((dir (dirname file))
3806 (tgt-dir (string-append html "/" dir)))
96c46210 3807 (install-file file html)))
bb986599
FB
3808 (find-files "." ".*"))))))
3809 ;; Tests can only be run after the library has been installed and not
3810 ;; within the source directory.
3811 (alist-cons-after
3812 'install 'check
89b5c60e 3813 (lambda _
bb986599
FB
3814 (with-directory-excursion "/tmp"
3815 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3816 (alist-delete
3817 'check
4f9ff21e
RW
3818 (alist-cons-after
3819 'unpack 'fix-tests
3820 (lambda _
3821 (substitute* "scipy/integrate/tests/test_quadpack.py"
3822 (("libm.so") "libm.so.6"))
3823 #t)
3824 %standard-phases)))))))
bb986599
FB
3825 (home-page "http://www.scipy.org/")
3826 (synopsis "The Scipy library provides efficient numerical routines")
3827 (description "The SciPy library is one of the core packages that make up
3828the SciPy stack. It provides many user-friendly and efficient numerical
3829routines such as routines for numerical integration and optimization.")
3f641af0 3830 (license license:bsd-3)))
bb986599 3831
764c077b 3832(define-public python2-scipy
57b7b8cd 3833 (package-with-python2 python-scipy))
bb986599 3834
73acc193 3835(define-public python-socksipy-branch
3836 (package
3837 (name "python-socksipy-branch")
3838 (version "1.01")
3839 (source
3840 (origin
3841 (method url-fetch)
3842 (uri (pypi-uri "SocksiPy-branch" version))
3843 (sha256
3844 (base32
3845 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3846 (build-system python-build-system)
3847 (arguments
3848 `(#:tests? #f)) ; There are no tests
3849 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3850 (synopsis "Python SOCKS module")
3851 (description
3852 "SocksiPy - A Python SOCKS client module. It provides a
3853socket-like interface that supports connections to any TCP
3854service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3855The original version was developed by Dan Haim, this is a
3856branch created by Mario Vilas to address some open issues,
3857as the original project seems to have been abandoned circa 2007.")
3858 (license license:bsd-3)))
3859
3860(define-public python2-socksipy-branch
3861 (package-with-python2 python-socksipy-branch))
3862
94914805
EB
3863(define-public python-sqlalchemy
3864 (package
3865 (name "python-sqlalchemy")
a4ba286b 3866 (version "1.0.12")
94914805
EB
3867 (source
3868 (origin
3869 (method url-fetch)
3870 (uri (string-append "https://pypi.python.org/packages/source/S/"
3871 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3872 (sha256
3873 (base32
a4ba286b 3874 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3875 (build-system python-build-system)
3876 (native-inputs
3877 `(("python-cython" ,python-cython) ;for c extensions
3878 ("python-pytest" ,python-pytest)
3879 ("python-mock" ,python-mock))) ;for tests
3880 (arguments
3881 `(#:phases (alist-replace
3882 'check
3883 (lambda _ (zero? (system* "py.test")))
3884 %standard-phases)))
3885 (home-page "http://www.sqlalchemy.org")
3886 (synopsis "Database abstraction library")
3887 (description
3888 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3889gives application developers the full power and flexibility of SQL. It
3890provides a full suite of well known enterprise-level persistence patterns,
3891designed for efficient and high-performing database access, adapted into a
3892simple and Pythonic domain language.")
3f641af0 3893 (license license:x11)))
94914805
EB
3894
3895(define-public python2-sqlalchemy
3896 (package-with-python2 python-sqlalchemy))
c937562e 3897
4a093330
DM
3898(define-public python-pycodestyle
3899 (package
3900 (name "python-pycodestyle")
3901 (version "2.0.0")
3902 (source
3903 (origin
3904 (method url-fetch)
3905 (uri (pypi-uri "pycodestyle" version))
3906 (sha256
3907 (base32
3908 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3909 (build-system python-build-system)
3910 (home-page "https://pycodestyle.readthedocs.io/")
3911 (synopsis "Python style guide checker")
3912 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3913Python code against some of the style conventions in
3914@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 3915 (license license:expat)))
4a093330
DM
3916
3917(define-public python2-pycodestyle
f210e944 3918 (package-with-python2 python-pycodestyle))
b91912c4
DM
3919
3920(define-public python-orderedmultidict
3921 (package
3922 (name "python-orderedmultidict")
3923 (version "0.7.10")
3924 (source
3925 (origin
3926 (method url-fetch)
3927 (uri (pypi-uri "orderedmultidict" version))
3928 (sha256
3929 (base32
3930 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3931 (build-system python-build-system)
3932 (arguments
3933 `(#:phases
3934 (modify-phases %standard-phases
3935 (add-after 'unpack 'fix-tests
3936 (lambda _
3937 ;; The package uses nosetest for running the tests.
3938 ;; Adding this initfile allows to run the test suite
3939 ;; without requiring nosetest.
3940 (zero? (system* "touch" "tests/__init__.py")))))))
3941 (propagated-inputs
3942 `(("python-six" ,python-six)))
3943 (native-inputs
3944 `(("python-pycodestyle" ,python-pycodestyle)))
3945 (home-page "https://github.com/gruns/orderedmultidict")
3946 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3947 (description "This package contains a library for ordered multivalue
3948dictionaries. A multivalue dictionary is a dictionary that can store
3949multiple values for the same key. An ordered multivalue dictionary is a
3950multivalue dictionary that retains the order of insertions and deletions.")
f210e944 3951 (license license:unlicense)))
b91912c4
DM
3952
3953(define-public python2-orderedmultidict
f210e944 3954 (package-with-python2 python-orderedmultidict))
9dede065
DM
3955
3956(define-public python-furl
3957 (package
3958 (name "python-furl")
3959 (version "0.5.6")
3960 (source
3961 (origin
3962 (method url-fetch)
3963 (uri (pypi-uri "furl" version))
3964 (sha256
3965 (base32
3966 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3967 (build-system python-build-system)
3968 (propagated-inputs
3969 `(("python-six" ,python-six)
3970 ("python-orderedmultidict" ,python-orderedmultidict)))
3971 (native-inputs
3972 `(("python-pycodestyle" ,python-pycodestyle)))
3973 (home-page "https://github.com/gruns/furl")
3974 (synopsis "URL manipulation in Python")
3975 (description "Furl provides an easy-to-use alternative to the
3976@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 3977 (license license:unlicense)))
9dede065
DM
3978
3979(define-public python2-furl
f210e944 3980 (package-with-python2 python-furl))
462bf271
DM
3981
3982(define-public python-flask-babel
3983 (package
3984 (name "python-flask-babel")
3985 (version "0.11.1")
3986 (source
3987 (origin
3988 (method url-fetch)
3989 (uri (pypi-uri "Flask-Babel" version))
3990 (sha256
3991 (base32
3992 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3993 (build-system python-build-system)
3994 (propagated-inputs
3995 `(("python-flask" ,python-flask)
3996 ("python-babel" ,python-babel)
3997 ("python-jinja2" ,python-jinja2)
3998 ("python-pytz" ,python-pytz)))
3999 (home-page "https://github.com/python-babel/flask-babel")
4000 (synopsis "Add i18n/l10n support to Flask applications")
4001 (description "This package implements internationalization and localization
4002support for Flask. This is based on the Python babel module as well as pytz -
4003both of which are installed automatically if you install this library.")
f210e944 4004 (license license:bsd-3)))
462bf271
DM
4005
4006(define-public python2-flask-babel
f210e944 4007 (package-with-python2 python-flask-babel))
4a093330 4008
de2966cf
EF
4009(define-public python-sqlalchemy-utils
4010 (package
4011 (name "python-sqlalchemy-utils")
bb4b1706 4012 (version "0.32.11")
de2966cf
EF
4013 (source
4014 (origin
4015 (method url-fetch)
4016 (uri (pypi-uri "SQLAlchemy-Utils" version))
4017 (sha256
4018 (base32
bb4b1706 4019 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
de2966cf 4020 (build-system python-build-system)
35d56b7b
MB
4021 (arguments
4022 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4023 ;; #:phases
4024 ;; (modify-phases %standard-phases
4025 ;; (replace 'check
4026 ;; (lambda _
4027 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
c22b4f87 4028 (propagated-inputs
de2966cf
EF
4029 `(("python-six" ,python-six)
4030 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb 4031 (native-inputs
35d56b7b
MB
4032 `(("python-dateutil" ,python-dateutil-2)
4033 ("python-flexmock" ,python-flexmock)
4034 ("python-psycopg2" ,python-psycopg2)
4035 ("python-pytest" ,python-pytest)
4036 ("python-pytz" ,python-pytz)))
de2966cf
EF
4037 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4038 (synopsis "Various utility functions for SQLAlchemy")
4039 (description
4040 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4041for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4042
4043You might also want to install the following optional dependencies:
4044@enumerate
4045@item @code{python-passlib}
4046@item @code{python-babel}
4047@item @code{python-cryptography}
4048@item @code{python-pytz}
4049@item @code{python-psycopg2}
4050@item @code{python-furl}
4051@item @code{python-flask-babel}
4052@end enumerate
4053")
de2966cf
EF
4054 (license license:bsd-3)))
4055
4056(define-public python2-sqlalchemy-utils
f210e944 4057 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4058
af5a4602
CAW
4059(define-public python-alembic
4060 (package
4061 (name "python-alembic")
bb484529 4062 (version "0.8.7")
af5a4602
CAW
4063 (source
4064 (origin
4065 (method url-fetch)
4066 (uri (pypi-uri "alembic" version))
4067 (sha256
4068 (base32
bb484529 4069 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
4070 (build-system python-build-system)
4071 (native-inputs
4072 `(("python-mock" ,python-mock)
4073 ("python-pytest-cov" ,python-pytest-cov)))
4074 (propagated-inputs
4075 `(("python-sqlalchemy" ,python-sqlalchemy)
4076 ("python-mako" ,python-mako)
4077 ("python-editor" ,python-editor)))
4078 (home-page "http://bitbucket.org/zzzeek/alembic")
4079 (synopsis
4080 "Database migration tool for SQLAlchemy")
4081 (description
4082 "Alembic is a lightweight database migration tool for usage with the
4083SQLAlchemy Database Toolkit for Python.")
f210e944 4084 (license license:expat)))
af5a4602
CAW
4085
4086(define-public python2-alembic
f210e944 4087 (package-with-python2 python-alembic))
af5a4602 4088
1671c07c
EB
4089(define-public python-distutils-extra
4090 (package
4091 (name "python-distutils-extra")
4092 (version "2.38")
4093 (source
4094 (origin
4095 (method url-fetch)
4096 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4097 version "/+download/python-distutils-extra-"
4098 version ".tar.gz"))
4099 (sha256
4100 (base32
4101 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4102 (build-system python-build-system)
1671c07c
EB
4103 (home-page "https://launchpad.net/python-distutils-extra/")
4104 (synopsis "Enhancements to Python's distutils")
4105 (description
4106 "The python-distutils-extra module enables you to easily integrate
4107gettext support, themed icons, and scrollkeeper-based documentation into
4108Python's distutils.")
3f641af0 4109 (license license:gpl2)))
1671c07c
EB
4110
4111(define-public python2-distutils-extra
4112 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4113
4114(define-public python2-elib.intl
4115 (package
4116 (name "python2-elib.intl")
4117 (version "0.0.3")
4118 (source
4119 (origin
4120 ;; This project doesn't tag releases or publish tarballs, so we take
4121 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4122 (method git-fetch)
4123 (uri (git-reference
4124 (url "https://github.com/dieterv/elib.intl.git")
4125 (commit "d09997cfef")))
4126 (sha256
4127 (base32
4128 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4129 (build-system python-build-system)
ea5456c8
EB
4130 (arguments
4131 ;; incompatible with Python 3 (exception syntax)
4132 `(#:python ,python-2
b41a05ce 4133 #:tests? #f))
ea5456c8
EB
4134 (home-page "https://github.com/dieterv/elib.intl")
4135 (synopsis "Enhanced internationalization for Python")
4136 (description
4137 "The elib.intl module provides enhanced internationalization (I18N)
4138services for your Python modules and applications.")
3f641af0 4139 (license license:lgpl3+)))
ea5456c8 4140
c937562e
EB
4141(define-public python-pillow
4142 (package
4143 (name "python-pillow")
aba5182c 4144 (version "3.3.3")
c937562e
EB
4145 (source
4146 (origin
4147 (method url-fetch)
f1d9231d 4148 (uri (pypi-uri "Pillow" version))
c937562e
EB
4149 (sha256
4150 (base32
aba5182c 4151 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4152 (build-system python-build-system)
4153 (native-inputs
f3b98f4f 4154 `(("python-nose" ,python-nose)))
c937562e 4155 (inputs
5ff408d9
SB
4156 `(("freetype" ,freetype)
4157 ("lcms" ,lcms)
c937562e
EB
4158 ("zlib" ,zlib)
4159 ("libjpeg" ,libjpeg)
4160 ("openjpeg" ,openjpeg)
5ff408d9
SB
4161 ("libtiff" ,libtiff)
4162 ("libwebp" ,libwebp)))
c937562e 4163 (arguments
e5358a6b 4164 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4165 (add-after
4166 'install 'check-installed
6151120a 4167 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4168 (begin
4169 (setenv "HOME" (getcwd))
6151120a
HG
4170 ;; Make installed package available for running the
4171 ;; tests
4172 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4173 (and (zero? (system* "python" "selftest.py"
4174 "--installed"))
4175 (zero? (system* "python" "test-installed.py"))))))
4176 (delete 'check))))
c937562e
EB
4177 (home-page "https://pypi.python.org/pypi/Pillow")
4178 (synopsis "Fork of the Python Imaging Library")
4179 (description
4180 "The Python Imaging Library adds image processing capabilities to your
4181Python interpreter. This library provides extensive file format support, an
4182efficient internal representation, and fairly powerful image processing
4183capabilities. The core image library is designed for fast access to data
4184stored in a few basic pixel formats. It should provide a solid foundation for
4185a general image processing tool.")
3f641af0 4186 (license (license:x11-style
c937562e
EB
4187 "http://www.pythonware.com/products/pil/license.htm"
4188 "The PIL Software License"))))
4189
4190(define-public python2-pillow
4191 (package-with-python2 python-pillow))
bb986599 4192
a415f036
FB
4193(define-public python-pycparser
4194 (package
4195 (name "python-pycparser")
38eb6919 4196 (version "2.14")
a415f036
FB
4197 (source
4198 (origin
4199 (method url-fetch)
38eb6919 4200 (uri (pypi-uri "pycparser" version))
a415f036
FB
4201 (sha256
4202 (base32
38eb6919 4203 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4204 (outputs '("out" "doc"))
4205 (build-system python-build-system)
4206 (native-inputs
f3b98f4f 4207 `(("pkg-config" ,pkg-config)))
a415f036 4208 (arguments
89b5c60e 4209 `(#:phases
a415f036
FB
4210 (alist-replace
4211 'check
4212 (lambda _
4213 (with-directory-excursion "tests"
4214 (zero? (system* "python" "all_tests.py"))))
4215 (alist-cons-after
4216 'install 'install-doc
4217 (lambda* (#:key outputs #:allow-other-keys)
4218 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4219 (doc (string-append data "/doc/" ,name "-" ,version))
4220 (examples (string-append doc "/examples")))
4221 (mkdir-p examples)
4222 (for-each (lambda (file)
4223 (copy-file (string-append "." file)
4224 (string-append doc file)))
4225 '("/README.rst" "/CHANGES" "/LICENSE"))
4226 (copy-recursively "examples" examples)))
4227 %standard-phases))))
4228 (home-page "https://github.com/eliben/pycparser")
4229 (synopsis "C parser in Python")
4230 (description
4231 "Pycparser is a complete parser of the C language, written in pure Python
4232using the PLY parsing library. It parses C code into an AST and can serve as
4233a front-end for C compilers or analysis tools.")
3f641af0 4234 (license license:bsd-3)))
a415f036
FB
4235
4236(define-public python2-pycparser
4237 (package-with-python2 python-pycparser))
57c3f716
FB
4238
4239(define-public python-cffi
4240 (package
4241 (name "python-cffi")
2d3a437c 4242 (version "1.4.2")
57c3f716
FB
4243 (source
4244 (origin
4245 (method url-fetch)
2d3a437c 4246 (uri (pypi-uri "cffi" version))
89b5c60e 4247 (sha256
2d3a437c 4248 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4249 (build-system python-build-system)
4250 (outputs '("out" "doc"))
4251 (inputs
4252 `(("libffi" ,libffi)))
4253 (propagated-inputs ; required at run-time
4254 `(("python-pycparser" ,python-pycparser)))
4255 (native-inputs
4256 `(("pkg-config" ,pkg-config)
4257 ("python-sphinx" ,python-sphinx)
f3b98f4f 4258 ("python-pytest" ,python-pytest)))
57c3f716 4259 (arguments
4179f952 4260 `(#:phases
57c3f716
FB
4261 (alist-cons-after
4262 'install 'install-doc
4263 (lambda* (#:key outputs #:allow-other-keys)
4264 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4265 (doc (string-append data "/doc/" ,name "-" ,version))
4266 (html (string-append doc "/html")))
4267 (with-directory-excursion "doc"
4268 (system* "make" "html")
4269 (mkdir-p html)
4270 (copy-recursively "build/html" html))
4271 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4272 %standard-phases)))
4273 (home-page "http://cffi.readthedocs.org")
4274 (synopsis "Foreign function interface for Python")
4275 (description
4276 "Foreign Function Interface for Python calling C code.")
bd3fa666 4277 (license license:expat)))
57c3f716
FB
4278
4279(define-public python2-cffi
4280 (package-with-python2 python-cffi))
6fa14469
FB
4281
4282(define-public python-xcffib
4283 (package
4284 (name "python-xcffib")
4285 (version "0.1.9")
4286 (source
4287 (origin
4288 (method url-fetch)
4289 (uri (string-append "https://pypi.python.org/packages/source/x/"
4290 "xcffib/xcffib-" version ".tar.gz"))
4291 (sha256
4292 (base32
4293 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4294 (build-system python-build-system)
4295 (inputs
482d9591 4296 `(("libxcb" ,libxcb)))
6fa14469 4297 (propagated-inputs
482d9591
HG
4298 `(("python-cffi" ,python-cffi) ; used at run time
4299 ("python-six" ,python-six)))
6fa14469 4300 (arguments
e2816ac7
MB
4301 `(;; FIXME: Tests cannot load libxcb.so.1
4302 #:tests? #f
4303 #:phases
c8cd850c
MB
4304 (modify-phases %standard-phases
4305 (add-after 'install 'install-doc
4306 (lambda* (#:key outputs #:allow-other-keys)
4307 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4308 "/doc/" ,name "-" ,version)))
4309 (mkdir-p doc)
4310 (copy-file "README.md"
4311 (string-append doc "/README.md"))
4312 #t))))))
6fa14469
FB
4313 (home-page "https://github.com/tych0/xcffib")
4314 (synopsis "XCB Python bindings")
4315 (description
4316 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4317support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4318 (license license:expat)))
6fa14469
FB
4319
4320(define-public python2-xcffib
4321 (package-with-python2 python-xcffib))
4322
9e099723
FB
4323(define-public python-cairocffi
4324 (package
4325 (name "python-cairocffi")
4326 (version "0.6")
4327 (source
4328 (origin
4329 (method url-fetch)
4330 ;; The archive on pypi is missing the 'utils' directory!
4331 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4332 version ".tar.gz"))
f586c877 4333 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4334 (sha256
4335 (base32
4336 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4337 (build-system python-build-system)
4338 (outputs '("out" "doc"))
4339 (inputs
4340 `(("gdk-pixbuf" ,gdk-pixbuf)
4341 ("cairo" ,cairo)))
4342 (native-inputs
4343 `(("pkg-config" ,pkg-config)
4344 ("python-sphinx" ,python-sphinx)
f3b98f4f 4345 ("python-docutils" ,python-docutils)))
9e099723
FB
4346 (propagated-inputs
4347 `(("python-xcffib" ,python-xcffib))) ; used at run time
4348 (arguments
a792e1aa
MB
4349 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4350 #:tests? #f
4351 #:phases
6734c7ba
MB
4352 (modify-phases %standard-phases
4353 (add-after 'install 'install-doc
4354 (lambda* (#:key inputs outputs #:allow-other-keys)
4355 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4356 (doc (string-append data "/doc/" ,name "-" ,version))
4357 (html (string-append doc "/html")))
4358 (setenv "LD_LIBRARY_PATH"
4359 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4360 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4361 (setenv "LANG" "en_US.UTF-8")
4362 (mkdir-p html)
4363 (for-each (lambda (file)
4364 (copy-file (string-append "." file)
4365 (string-append doc file)))
4366 '("/README.rst" "/CHANGES" "/LICENSE"))
4367 (system* "python" "setup.py" "build_sphinx")
4368 (copy-recursively "docs/_build/html" html)
4369 #t))))))
9e099723
FB
4370 (home-page "https://github.com/SimonSapin/cairocffi")
4371 (synopsis "Python bindings and object-oriented API for Cairo")
4372 (description
4373 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4374Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4375graphics library with support for multiple backends including image buffers,
4376PNG, PostScript, PDF, and SVG file output.")
3f641af0 4377 (license license:bsd-3)))
9e099723
FB
4378
4379(define-public python2-cairocffi
4380 (package-with-python2 python-cairocffi))
4381
3cff95cb
RW
4382(define-public python-decorator
4383 (package
4384 (name "python-decorator")
eb6e2e81 4385 (version "4.0.9")
3cff95cb
RW
4386 (source
4387 (origin
4388 (method url-fetch)
e21338be 4389 (uri (pypi-uri "decorator" version))
3cff95cb 4390 (sha256
eb6e2e81 4391 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4392 (build-system python-build-system)
4393 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4394 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4395 (synopsis "Python module to simplify usage of decorators")
4396 (description
4397 "The aim of the decorator module is to simplify the usage of decorators
4398for the average programmer, and to popularize decorators usage giving examples
4399of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4400etc. The core of this module is a decorator factory.")
4401 (license license:expat)))
4402
4403(define-public python2-decorator
4404 (package-with-python2 python-decorator))
4405
2c0499ad
RW
4406(define-public python-drmaa
4407 (package
4408 (name "python-drmaa")
4409 (version "0.7.6")
4410 (source
4411 (origin
4412 (method url-fetch)
4413 (uri (string-append
4414 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4415 version ".tar.gz"))
4416 (sha256
4417 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4418 (build-system python-build-system)
4419 ;; The test suite requires libdrmaa which is provided by the cluster
4420 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4421 ;; should be set to the path of the libdrmaa library.
4422 (arguments '(#:tests? #f))
4423 (native-inputs
f3b98f4f 4424 `(("python-nose" ,python-nose)))
2c0499ad
RW
4425 (home-page "https://pypi.python.org/pypi/drmaa")
4426 (synopsis "Python bindings for the DRMAA library")
4427 (description
4428 "A Python package for Distributed Resource Management (DRM) job
4429submission and control. This package is an implementation of the DRMAA 1.0
4430Python language binding specification.")
3f641af0 4431 (license license:bsd-3)))
2c0499ad
RW
4432
4433(define-public python2-drmaa
4434 (package-with-python2 python-drmaa))
4435
d05c6da0
RW
4436(define-public python-gridmap
4437 (package
4438 (name "python-gridmap")
4439 (version "0.13.0")
4440 (source
4441 (origin
4442 (method url-fetch)
4443 (uri (string-append
4444 "https://github.com/pygridtools/gridmap/archive/v"
4445 version ".tar.gz"))
4446 (file-name (string-append name "-" version ".tar.gz"))
4447 (sha256
4448 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4449 (build-system python-build-system)
ad348f9f
MB
4450 (arguments
4451 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
f22efa01 4452 (propagated-inputs
d05c6da0
RW
4453 `(("python-psutil" ,python-psutil)
4454 ("python-drmaa" ,python-drmaa)
4455 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4456 (home-page "https://github.com/pygridtools/gridmap")
4457 (synopsis "Create jobs on a cluster directly from Python")
4458 (description
4459 "Gridmap is a Python package to allow you to easily create jobs on the
4460cluster directly from Python. You can directly map Python functions onto the
4461cluster without needing to write any wrapper code yourself.")
3f641af0 4462 (license license:gpl3+)))
d05c6da0
RW
4463
4464(define-public python2-gridmap
4465 (package-with-python2 python-gridmap))
4466
cb6d5c54
RW
4467(define-public python-pexpect
4468 (package
4469 (name "python-pexpect")
4470 (version "3.3")
4471 (source
4472 (origin
4473 (method url-fetch)
4474 (uri (string-append "https://pypi.python.org/packages/source/p/"
4475 "pexpect/pexpect-" version ".tar.gz"))
4476 (sha256
4477 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4478 (build-system python-build-system)
4479 (arguments
4480 `(#:phases
4481 (modify-phases %standard-phases
4482 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4483 (native-inputs
4484 `(("python-nose" ,python-nose)))
4485 (home-page "http://pexpect.readthedocs.org/")
4486 (synopsis "Controlling interactive console applications")
4487 (description
4488 "Pexpect is a pure Python module for spawning child applications;
4489controlling them; and responding to expected patterns in their output.
4490Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4491child application and control it as if a human were typing commands.")
3f641af0 4492 (license license:isc)))
cb6d5c54
RW
4493
4494(define-public python2-pexpect
4495 (package-with-python2 python-pexpect))
4496
229ad120
RW
4497(define-public python-setuptools-scm
4498 (package
4499 (name "python-setuptools-scm")
42d6d0d0 4500 (version "1.11.1")
229ad120
RW
4501 (source (origin
4502 (method url-fetch)
383af6b0 4503 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4504 (sha256
4505 (base32
42d6d0d0 4506 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120
RW
4507 (build-system python-build-system)
4508 (home-page "https://github.com/pypa/setuptools_scm/")
4509 (synopsis "Manage Python package versions in SCM metadata")
4510 (description
383af6b0 4511 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4512@dfn{software configuration management} (SCM) metadata instead of declaring
4513them as the version argument or in a SCM managed file.")
4514 (license license:expat)))
4515
4516(define-public python2-setuptools-scm
4517 (package-with-python2 python-setuptools-scm))
4518
b74270ee
RW
4519(define-public python-pathpy
4520 (package
4521 (name "python-pathpy")
4522 (version "8.1.1")
4523 (source
4524 (origin
4525 (method url-fetch)
4526 (uri (string-append "https://pypi.python.org/packages/source/p/"
4527 "path.py/path.py-" version ".tar.gz"))
4528 (sha256
4529 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4530 (outputs '("out" "doc"))
b74270ee
RW
4531 (build-system python-build-system)
4532 (propagated-inputs
4533 `(("python-appdirs" ,python-appdirs)))
4534 (native-inputs
f3b98f4f 4535 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4536 ("python-sphinx" ,python-sphinx)
4537 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4538 ("python-pytest" ,python-pytest)
4539 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4540 (arguments
4541 `(#:phases
4542 (modify-phases %standard-phases
4543 (add-after 'build 'build-doc
4544 (lambda _
4545 (setenv "LANG" "en_US.UTF-8")
4546 (zero? (system* "python" "setup.py" "build_sphinx"))))
4547 (add-after 'install 'install-doc
4548 (lambda* (#:key outputs #:allow-other-keys)
4549 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4550 (doc (string-append data "/doc/" ,name "-" ,version))
4551 (html (string-append doc "/html")))
4552 (mkdir-p html)
4553 (for-each (lambda (file)
4554 (copy-file file (string-append doc "/" file)))
4555 '("README.rst" "CHANGES.rst"))
4556 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4557 (home-page "http://github.com/jaraco/path.py")
4558 (synopsis "Python module wrapper for built-in os.path")
4559 (description
4560 "@code{path.py} implements path objects as first-class entities, allowing
4561common operations on files to be invoked on those path objects directly.")
4562 (license license:expat)))
4563
4564(define-public python2-pathpy
4565 (package-with-python2 python-pathpy))
4566
0d34e01b
RW
4567(define-public python-pickleshare
4568 (package
4569 (name "python-pickleshare")
4570 (version "0.5")
4571 (source
4572 (origin
4573 (method url-fetch)
4574 (uri (string-append "https://pypi.python.org/packages/source/p/"
4575 "pickleshare/pickleshare-" version ".tar.gz"))
4576 (sha256
4577 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4578 (build-system python-build-system)
4579 (propagated-inputs
4580 `(("python-pathpy" ,python-pathpy)))
4581 (home-page "https://github.com/vivainio/pickleshare")
4582 (synopsis "Tiny key value database with concurrency support")
4583 (description
4584 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4585Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4586shelve, many processes can access the database simultaneously. Changing a
4587value in database is immediately visible to other processes accessing the same
4588database. Concurrency is possible because the values are stored in separate
4589files. Hence the “database” is a directory where all files are governed by
4590PickleShare.")
4591 (license license:expat)))
4592
4593(define-public python2-pickleshare
4594 (package-with-python2 python-pickleshare))
4595
cd6e5189
RW
4596(define-public python-simplegeneric
4597 (package
4598 (name "python-simplegeneric")
4599 (version "0.8.1")
4600 (source
4601 (origin
4602 (method url-fetch)
4603 (uri (string-append "https://pypi.python.org/packages/source/s/"
4604 "simplegeneric/simplegeneric-" version ".zip"))
4605 (sha256
4606 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4607 (build-system python-build-system)
4608 (native-inputs
f3b98f4f 4609 `(("unzip" ,unzip)))
cd6e5189
RW
4610 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4611 (synopsis "Python module for simple generic functions")
4612 (description
4613 "The simplegeneric module lets you define simple single-dispatch generic
4614functions, akin to Python’s built-in generic functions like @code{len()},
4615@code{iter()} and so on. However, instead of using specially-named methods,
4616these generic functions use simple lookup tables, akin to those used by
4617e.g. @code{pickle.dump()} and other generic functions found in the Python
4618standard library.")
3f641af0 4619 (license license:zpl2.1)))
cd6e5189
RW
4620
4621(define-public python2-simplegeneric
4622 (package-with-python2 python-simplegeneric))
4623
ddc7d8ed 4624(define-public python-ipython-genutils
c4abbac3 4625 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
4626 (package
4627 (name "python-ipython-genutils")
4628 (version "0.1.0")
4629 (source
4630 (origin
4631 (method url-fetch)
4632 (uri (string-append "https://pypi.python.org/packages/source/i/"
4633 "ipython_genutils/ipython_genutils-"
4634 version ".tar.gz"))
4635 (sha256
4636 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4637 (build-system python-build-system)
4638 (arguments `(#:tests? #f)) ; no tests
4639 (home-page "http://ipython.org")
4640 (synopsis "Vestigial utilities from IPython")
4641 (description
c4abbac3
HG
4642 "This package provides retired utilities from IPython. No packages
4643outside IPython/Jupyter should depend on it.
4644
4645This package shouldn't exist. It contains some common utilities shared by
4646Jupyter and IPython projects during The Big Split. As soon as possible, those
4647packages will remove their dependency on this, and this package will go
4648away.")
3f641af0 4649 (license license:bsd-3)))
ddc7d8ed
RW
4650
4651(define-public python2-ipython-genutils
4652 (package-with-python2 python-ipython-genutils))
4653
2b10eb48
RW
4654(define-public python-traitlets
4655 (package
4656 (name "python-traitlets")
a5ba1481 4657 (version "4.2.0")
2b10eb48
RW
4658 (source
4659 (origin
4660 (method url-fetch)
cc0c4fde 4661 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4662 (sha256
4663 (base32
a5ba1481 4664 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4665 (build-system python-build-system)
4666 (arguments
4667 `(#:phases
4668 (modify-phases %standard-phases
4669 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4670 (propagated-inputs
4671 `(("python-ipython-genutils" ,python-ipython-genutils)
4672 ("python-decorator" ,python-decorator)))
4673 (native-inputs
cc0c4fde
EF
4674 `(("python-mock" ,python-mock)
4675 ("python-nose" ,python-nose)))
2b10eb48
RW
4676 (home-page "http://ipython.org")
4677 (synopsis "Configuration system for Python applications")
4678 (description
4679 "Traitlets is a framework that lets Python classes have attributes with
4680type checking, dynamically calculated default values, and ‘on change’
4681callbacks. The package also includes a mechanism to use traitlets for
4682configuration, loading values from files or from command line arguments. This
4683is a distinct layer on top of traitlets, so you can use traitlets in your code
4684without using the configuration machinery.")
3f641af0 4685 (license license:bsd-3)))
2b10eb48
RW
4686
4687(define-public python2-traitlets
4688 (package-with-python2 python-traitlets))
4689
4263b06f
RW
4690(define-public python-jupyter-core
4691 (package
4692 (name "python-jupyter-core")
4693 (version "4.2.0")
4694 (source
4695 (origin
4696 (method url-fetch)
4697 (uri (string-append (pypi-uri "jupyter_core" version)))
4698 (sha256
4699 (base32
4700 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4701 (build-system python-build-system)
4702 ;; FIXME: not sure how to run the tests
4703 (arguments `(#:tests? #f))
4704 (propagated-inputs
4705 `(("python-traitlets" ,python-traitlets)))
4706 (home-page "http://jupyter.org/")
4707 (synopsis "Jupyter base package")
4708 (description
4709 "Jupyter core is the base package on which Jupyter projects rely.")
4710 (license license:bsd-3)))
4711
4712(define-public python2-jupyter-core
4713 (package-with-python2 python-jupyter-core))
4714
9ff01f2d
RW
4715(define-public python-jupyter-client
4716 (package
4717 (name "python-jupyter-client")
4718 (version "4.4.0")
4719 (source
4720 (origin
4721 (method url-fetch)
4722 (uri (pypi-uri "jupyter_client" version))
4723 (sha256
4724 (base32
4725 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4726 (build-system python-build-system)
4727 ;; Tests fail because of missing native python kernel which I assume is
4728 ;; provided by the ipython package, which we cannot use because it would
4729 ;; cause a dependency cycle.
4730 (arguments `(#:tests? #f))
4731 (propagated-inputs
4732 `(("python-pyzmq" ,python-pyzmq)
4733 ("python-traitlets" ,python-traitlets)
4734 ("python-jupyter-core" ,python-jupyter-core)))
4735 (home-page "http://jupyter.org/")
4736 (synopsis "Jupyter protocol implementation and client libraries")
4737 (description
4738 "The @code{jupyter_client} package contains the reference implementation
4739of the Jupyter protocol. It also provides client and kernel management APIs
4740for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4741installing @code{kernelspec}s for use with Jupyter frontends.")
4742 (license license:bsd-3)))
4743
4744(define-public python2-jupyter-client
4745 (package-with-python2 python-jupyter-client))
4746
ab526102
RW
4747(define-public python-ipykernel
4748 (package
4749 (name "python-ipykernel")
4750 (version "4.5.0")
4751 (source
4752 (origin
4753 (method url-fetch)
4754 (uri (pypi-uri "ipykernel" version))
4755 (sha256
4756 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4757 (build-system python-build-system)
4758 ;; The tests load a submodule of IPython. However, IPython itself depends
4759 ;; on ipykernel.
4760 (arguments `(#:tests? #f))
4761 (propagated-inputs
4762 ;; imported at runtime during connect
4763 `(("python-jupyter-client" ,python-jupyter-client)))
4764 (home-page "http://ipython.org")
4765 (synopsis "IPython Kernel for Jupyter")
4766 (description
4767 "This package provides the IPython kernel for Jupyter.")
4768 (license license:bsd-3)))
4769
4770(define-public python2-ipykernel
4771 (package-with-python2 python-ipykernel))
4772
5ff6effc
RW
4773(define-public python-testpath
4774 (package
4775 (name "python-testpath")
4776 (version "0.2")
4777 (source
4778 (origin
4779 (method url-fetch)
4780 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4781 version ".tar.gz"))
4782 (file-name (string-append name "-" version ".tar.gz"))
4783 (sha256
4784 (base32
4785 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4786 (build-system python-build-system)
4787 (arguments
4788 `(#:tests? #f ; this package does not even have a setup.py
4789 #:phases
4790 (modify-phases %standard-phases
4791 (delete 'install)
4792 (replace 'build
4793 (lambda* (#:key inputs outputs #:allow-other-keys)
4794 (let ((dir (string-append
4795 (assoc-ref outputs "out")
4796 "/lib/python"
4797 (string-take (string-take-right
4798 (assoc-ref inputs "python") 5) 3)
4799 "/site-packages/testpath")))
4800 (mkdir-p dir)
4801 (copy-recursively "testpath" dir))
4802 #t)))))
4803 (home-page "https://github.com/takluyver/testpath")
4804 (synopsis "Test utilities for code working with files and commands")
4805 (description
4806 "Testpath is a collection of utilities for Python code working with files
4807and commands. It contains functions to check things on the filesystem, and
4808tools for mocking system commands and recording calls to those.")
4809 (license license:expat)))
4810
4811(define-public python2-testpath
4812 (package-with-python2 python-testpath))
4813
ae1ab9fe
FB
4814(define-public python-ipython
4815 (package
4816 (name "python-ipython")
4dbc8ec4 4817 (version "4.0.3")
ae1ab9fe
FB
4818 (source
4819 (origin
fceac880 4820 (method url-fetch)
accd5f99 4821 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 4822 (sha256
4dbc8ec4 4823 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
ae1ab9fe
FB
4824 (build-system python-build-system)
4825 (outputs '("out" "doc"))
3a0b1b9a
FB
4826 (propagated-inputs
4827 `(("python-pyzmq" ,python-pyzmq)
accd5f99 4828 ("python-terminado" ,python-terminado)
ae1ab9fe 4829 ("python-matplotlib" ,python-matplotlib)
5d26e542 4830 ("python-numpy" ,python-numpy)
ae1ab9fe 4831 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4832 ("python-jinja2" ,python-jinja2)
4833 ("python-mistune" ,python-mistune)
accd5f99
RW
4834 ("python-pexpect" ,python-pexpect)
4835 ("python-pickleshare" ,python-pickleshare)
4836 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 4837 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
4838 ("python-traitlets" ,python-traitlets)
4839 ("python-ipykernel" ,python-ipykernel)
4840 ("python-pygments" ,python-pygments)))
4841 (inputs
4842 `(("readline" ,readline)
4843 ("which" ,which)))
ae1ab9fe
FB
4844 (native-inputs
4845 `(("pkg-config" ,pkg-config)
accd5f99
RW
4846 ("python-requests" ,python-requests) ;; for tests
4847 ("python-testpath" ,python-testpath)
4848 ("python-nose" ,python-nose)
ae1ab9fe
FB
4849 ("python-sphinx" ,python-sphinx)
4850 ("texlive" ,texlive)
f3b98f4f 4851 ("texinfo" ,texinfo)))
ae1ab9fe 4852 (arguments
89b5c60e 4853 `(#:phases
3a0b1b9a
FB
4854 (modify-phases %standard-phases
4855 (add-after
4856 'install 'install-doc
4857 (lambda* (#:key inputs outputs #:allow-other-keys)
4858 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4859 (doc (string-append data "/doc/" ,name "-" ,version))
4860 (html (string-append doc "/html"))
4861 (man1 (string-append data "/man/man1"))
4862 (info (string-append data "/info"))
4863 (examples (string-append doc "/examples")))
afd3d931 4864 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
4865 ;; Make installed package available for running the tests
4866 (add-installed-pythonpath inputs outputs)
3a0b1b9a 4867 (with-directory-excursion "docs"
accd5f99
RW
4868 ;; FIXME: pdf fails to build
4869 ;;(system* "make" "pdf" "PAPER=a4")
4870 (system* "make" "html")
3a0b1b9a
FB
4871 (system* "make" "info"))
4872 (copy-recursively "docs/man" man1)
4873 (copy-recursively "examples" examples)
accd5f99 4874 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
4875 ;; (copy-file "docs/build/latex/ipython.pdf"
4876 ;; (string-append doc "/ipython.pdf"))
4877 (mkdir-p info)
4878 (copy-file "docs/build/texinfo/ipython.info"
4879 (string-append info "/ipython.info"))
4880 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4881 ;; Tests can only be run after the library has been installed and not
4882 ;; within the source directory.
4883 (delete 'check)
4884 (add-after
4885 'install 'check
eee5cd04 4886 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
4887 (if tests?
4888 (with-directory-excursion "/tmp"
eee5cd04
HG
4889 ;; Make installed package available for running the tests
4890 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
4891 (setenv "HOME" "/tmp/") ;; required by a test
4892 (zero? (system* (string-append (assoc-ref outputs "out")
4893 "/bin/iptest"))))
4894 #t)))
4895 (add-before
4896 'install 'fix-tests
4897 (lambda* (#:key inputs #:allow-other-keys)
4898 (substitute* "./IPython/utils/_process_posix.py"
4899 (("/usr/bin/env', 'which") (which "which")))
4900 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4901 (("#!/usr/bin/env python")
4902 (string-append "#!" (which "python"))))
4903 ;; Disable 1 failing test
4904 (substitute* "./IPython/core/tests/test_magic.py"
4905 (("def test_dirops\\(\\):" all)
4906 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4907 (home-page "http://ipython.org")
4908 (synopsis "IPython is a tool for interactive computing in Python")
4909 (description
4910 "IPython provides a rich architecture for interactive computing with:
4911Powerful interactive shells, a browser-based notebook, support for interactive
4912data visualization, embeddable interpreters and tools for parallel
4913computing.")
135ba811
EF
4914 (license license:bsd-3)
4915 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4916
4917(define-public python2-ipython
135ba811 4918 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4919 (package
4920 (inherit ipython)
4921 ;; FIXME: some tests are failing
4922 (arguments
4923 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4924 ;; FIXME: add pyreadline once available.
e62600fe 4925 (native-inputs
135ba811 4926 `(("python2-mock" ,python2-mock)
77a6932a 4927 ,@(package-native-inputs ipython))))))
03411993
AE
4928
4929(define-public python-isodate
4930 (package
4931 (name "python-isodate")
b6785c2e 4932 (version "0.5.4")
03411993
AE
4933 (source
4934 (origin
4935 (method url-fetch)
b6785c2e 4936 (uri (pypi-uri "isodate" version))
03411993
AE
4937 (sha256
4938 (base32
b6785c2e 4939 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 4940 (build-system python-build-system)
03411993
AE
4941 (home-page
4942 "http://cheeseshop.python.org/pypi/isodate")
4943 (synopsis
4944 "Python date parser and formatter")
4945 (description
4946 "Python-isodate is a python module for parsing and formatting
4947ISO 8601 dates, time and duration.")
3f641af0 4948 (license license:bsd-3)))
03411993
AE
4949
4950(define-public python2-isodate
4951 (package-with-python2 python-isodate))
673ab897
AE
4952
4953(define-public python-html5lib
4954 (package
4955 (name "python-html5lib")
a14061aa 4956 (version "1.0b10")
673ab897
AE
4957 (source
4958 (origin
4959 (method url-fetch)
fee04c19 4960 (uri (pypi-uri "html5lib" version))
673ab897
AE
4961 (sha256
4962 (base32
a14061aa 4963 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 4964 (build-system python-build-system)
3dd75476 4965 (propagated-inputs
4eb6ed28
MB
4966 `(("python-six" ,python-six)
4967 ("python-webencodings" ,python-webencodings)))
673ab897
AE
4968 (arguments
4969 `(#:test-target "check"))
4970 (home-page
4971 "https://github.com/html5lib/html5lib-python")
4972 (synopsis
4973 "Python HTML parser based on the WHATWG HTML specifcation")
4974 (description
4975 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4976and written in Python.")
bd3fa666 4977 (license license:expat)))
673ab897
AE
4978
4979(define-public python2-html5lib
4980 (package-with-python2 python-html5lib))
e99f4211 4981
8ee62c97
RW
4982;; Needed for python-bleach, a dependency of python-notebook
4983(define-public python-html5lib-0.9
4984 (package
4985 (inherit python-html5lib)
4986 (version "0.999")
4987 (source
4988 (origin
4989 (method url-fetch)
4990 (uri (pypi-uri "html5lib" version))
4991 (sha256
4992 (base32
4993 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4994
4995(define-public python2-html5lib-0.9
4996 (package-with-python2 python-html5lib-0.9))
4997
adbca19e
MB
4998(define-public python-webencodings
4999 (package
5000 (name "python-webencodings")
5001 (version "0.5")
5002 (source (origin
5003 (method url-fetch)
5004 (uri (pypi-uri "webencodings" version))
5005 (sha256
5006 (base32
5007 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5008 (build-system python-build-system)
5009 (arguments
5010 '(#:phases
5011 (modify-phases %standard-phases
5012 (replace 'check
5013 (lambda _
5014 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5015 (native-inputs
5016 `(("python-pytest" ,python-pytest)))
5017 (home-page "https://github.com/SimonSapin/python-webencodings")
5018 (synopsis "Character encoding aliases for legacy web content")
5019 (description
5020 "In order to be compatible with legacy web content when interpreting
5021something like @code{Content-Type: text/html; charset=latin1}, tools need
5022to use a particular set of aliases for encoding labels as well as some
5023overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5024the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5025or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5026The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5027defines all such details so that implementations do not have to
5028reverse-engineer each other.
5029
5030This module implements the Encoding standard and has encoding labels and
5031BOM detection, but the actual implementation for encoders and decoders
5032is Python’s.")
5033 (license license:bsd-3)))
5034
5035(define-public python2-webencodings
5036 (package-with-python2 python-webencodings))
5037
e99f4211
MW
5038(define-public python-urwid
5039 (package
5040 (name "python-urwid")
51ff41f6 5041 (version "1.3.1")
e99f4211
MW
5042 (source
5043 (origin
5044 (method url-fetch)
b97c1bfd 5045 (uri (pypi-uri "urwid" version))
e99f4211
MW
5046 (sha256
5047 (base32
51ff41f6 5048 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5049 (build-system python-build-system)
b97c1bfd
LF
5050 (arguments
5051 `(#:phases
5052 (modify-phases %standard-phases
5053 ;; Disable failing test. Bug filed upstream:
5054 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5055 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5056 (add-after 'unpack 'disable-failing-test
5057 (lambda _
5058 (substitute* "urwid/tests/test_event_loops.py"
5059 (("test_remove_watch_file")
5060 "disable_remove_watch_file")))))))
e99f4211
MW
5061 (home-page "http://urwid.org")
5062 (synopsis "Console user interface library for Python")
5063 (description
5064 "Urwid is a curses-based UI/widget library for Python. It includes many
5065features useful for text console applications.")
3f641af0 5066 (license license:lgpl2.1+)))
e99f4211
MW
5067
5068(define-public python2-urwid
5069 (package-with-python2 python-urwid))
d95a56c6 5070
47d0b292
TS
5071(define-public python-urwidtrees
5072 (package
5073 (name "python-urwidtrees")
37ec4623 5074 (version "1.0.2")
47d0b292
TS
5075 (source
5076 (origin
5077 (method url-fetch)
37ec4623
TS
5078 ;; package author intends on distributing via github rather than pypi:
5079 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5080 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5081 version ".tar.gz"))
5082 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5083 (sha256
5084 (base32
37ec4623 5085 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5086 (build-system python-build-system)
5087 (arguments
5088 '(#:tests? #f)) ; no tests
f22efa01 5089 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5090 (home-page "https://github.com/pazz/urwidtrees")
5091 (synopsis "Tree widgets for urwid")
5092 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5093toolkit. Use it to build trees of widgets.")
3f641af0 5094 (license license:gpl3+)))
47d0b292
TS
5095
5096(define-public python2-urwidtrees
5097 (package-with-python2 python-urwidtrees))
5098
d95a56c6
PAR
5099(define-public python-dbus
5100 (package
5101 (name "python-dbus")
5102 (version "1.2.0")
5103 (source
5104 (origin
5105 (method url-fetch)
5106 (uri (string-append
5cc3096c 5107 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5108 version ".tar.gz"))
5109 (sha256
5110 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5111 (build-system gnu-build-system)
6717c879
SB
5112 (arguments
5113 '(#:phases
5114 (modify-phases %standard-phases
5115 (add-before
5116 'check 'pre-check
5117 (lambda _
5118 ;; XXX: For the missing '/etc/machine-id'.
5119 (substitute* "test/run-test.sh"
5120 (("DBUS_FATAL_WARNINGS=1")
5121 "DBUS_FATAL_WARNINGS=0"))
5122 #t)))))
d95a56c6
PAR
5123 (native-inputs
5124 `(("pkg-config" ,pkg-config)))
5125 (inputs
5126 `(("python" ,python)
2e88d113 5127 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5128 (synopsis "Python bindings for D-bus")
5129 (description "python-dbus provides bindings for libdbus, the reference
5130implementation of D-Bus.")
5131 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5132 (license license:expat)))
b52af02b
MW
5133
5134(define-public python2-dbus
5135 (package (inherit python-dbus)
5136 (name "python2-dbus")
5137 (inputs `(("python" ,python-2)
5138 ,@(alist-delete "python"
5139 (package-inputs python-dbus)
5140 equal?)))
5141 ;; FIXME: on Python 2, the test_utf8 fails with:
5142 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5143 (arguments `(#:tests? #f))))
a6ac8332
AE
5144
5145(define-public python-apsw
5146 (package
5147 (name "python-apsw")
917708c2 5148 (version "3.9.2-r1")
a6ac8332
AE
5149 (source
5150 (origin
5151 (method url-fetch)
917708c2 5152 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5153 (sha256
5154 (base32
917708c2 5155 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5156 (build-system python-build-system)
5157 (inputs
f3b98f4f 5158 `(("sqlite" ,sqlite)))
a6ac8332
AE
5159 (arguments
5160 `(#:phases
5161 ;; swap check and install phases
5162 (alist-cons-after
5163 'install 'check
5164 (assoc-ref %standard-phases 'check)
5165 (alist-delete
5166 'check
5167 %standard-phases))))
5168 (home-page "https://github.com/rogerbinns/apsw/")
5169 (synopsis "Another Python SQLite Wrapper")
5170 (description "APSW is a Python wrapper for the SQLite
5171embedded relational database engine. In contrast to other wrappers such as
5172pysqlite it focuses on being a minimal layer over SQLite attempting just to
5173translate the complete SQLite API into Python.")
abde5f37 5174 (license license:zlib)))
a6ac8332
AE
5175
5176(define-public python2-apsw
5177 (package-with-python2 python-apsw))
26b307e2
AE
5178
5179(define-public python-lxml
5180 (package
5181 (name "python-lxml")
d58a3203 5182 (version "3.6.0")
26b307e2
AE
5183 (source
5184 (origin
5185 (method url-fetch)
97bbc480 5186 (uri (pypi-uri "lxml" version))
26b307e2 5187 (sha256
d58a3203
EF
5188 (base32
5189 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5190 (build-system python-build-system)
5191 (inputs
5192 `(("libxml2" ,libxml2)
f3b98f4f 5193 ("libxslt" ,libxslt)))
26b307e2
AE
5194 (home-page "http://lxml.de/")
5195 (synopsis
5196 "Python XML processing library")
5197 (description
5198 "The lxml XML toolkit is a Pythonic binding for the C libraries
5199libxml2 and libxslt.")
3f641af0 5200 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5201
5202(define-public python2-lxml
5203 (package-with-python2 python-lxml))
4ed20663 5204
b32a1e47
CAW
5205;; beautifulsoup4 has a totally different namespace than 3.x,
5206;; and pypi seems to put it under its own name, so I guess we should too
5207(define-public python-beautifulsoup4
5208 (package
5209 (name "python-beautifulsoup4")
67fd4a12 5210 (version "4.5.1")
b32a1e47
CAW
5211 (source
5212 (origin
5213 (method url-fetch)
5214 (uri (pypi-uri "beautifulsoup4" version))
5215 (sha256
5216 (base32
67fd4a12 5217 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5218 (build-system python-build-system)
5f37f0b6
LF
5219 (arguments
5220 `(#:phases
5221 (modify-phases %standard-phases
5222 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5223 ;; must use this conversion script when building with Python 3. The
5224 ;; conversion script also runs the tests.
5225 ;; For more information, see the file 'convert-py3k' in the source
5226 ;; distribution.
5227 (replace 'check
5228 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5229 (home-page
5230 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5231 (synopsis
5232 "Python screen-scraping library")
5233 (description
5234 "Beautiful Soup is a Python library designed for rapidly setting up
5235screen-scraping projects. It offers Pythonic idioms for navigating,
5236searching, and modifying a parse tree, providing a toolkit for
5237dissecting a document and extracting what you need. It automatically
5238converts incoming documents to Unicode and outgoing documents to UTF-8.")
f210e944 5239 (license license:expat)))
b32a1e47
CAW
5240
5241(define-public python2-beautifulsoup4
5242 (package
5243 (inherit (package-with-python2
5244 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5245 (arguments `(#:python ,python-2))))
b32a1e47 5246
092e86f5
AE
5247(define-public python2-cssutils
5248 (package
5249 (name "python2-cssutils")
58d1d816 5250 (version "1.0.1")
092e86f5
AE
5251 (source
5252 (origin
5253 (method url-fetch)
58d1d816 5254 (uri (pypi-uri "cssutils" version))
092e86f5 5255 (sha256
58d1d816
EF
5256 (base32
5257 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5258 (build-system python-build-system)
5259 (native-inputs
5260 `(("python2-mock" ,python2-mock) ; for the tests
5261 ("unzip" ,unzip))) ; for unpacking the source
092e86f5
AE
5262 (arguments
5263 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5264 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5265 ))
092e86f5
AE
5266 (home-page "http://cthedot.de/cssutils/")
5267 (synopsis
5268 "CSS Cascading Style Sheets library for Python")
5269 (description
5270 "Cssutils is a Python package for parsing and building CSS
5271Cascading Style Sheets. Currently it provides a DOM only and no rendering
5272options.")
3f641af0 5273 (license license:lgpl3+)))
880ff77c
AE
5274
5275(define-public python-cssselect
5276 (package
5277 (name "python-cssselect")
d5ccd9ab 5278 (version "0.9.2")
880ff77c
AE
5279 (source
5280 (origin
5281 (method url-fetch)
d5ccd9ab 5282 (uri (pypi-uri "cssselect" version))
880ff77c 5283 (sha256
d5ccd9ab
EF
5284 (base32
5285 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5286 (build-system python-build-system)
880ff77c
AE
5287 (arguments
5288 ;; tests fail with message
5289 ;; AttributeError: 'module' object has no attribute 'tests'
5290 `(#:tests? #f))
5291 (home-page
5292 "https://pythonhosted.org/cssselect/")
5293 (synopsis
5294 "CSS3 selector parser and translator to XPath 1.0")
5295 (description
5296 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5297them to XPath 1.0 expressions. Such expressions can be used in lxml or
5298another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5299 (license license:bsd-3)))
880ff77c
AE
5300
5301(define-public python2-cssselect
5302 (package-with-python2 python-cssselect))
60357f99
AE
5303
5304(define-public python-netifaces
5305 (package
5306 (name "python-netifaces")
5307 (version "0.10.4")
5308 (source
5309 (origin
5310 (method url-fetch)
5311 (uri (string-append
5312 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5313 version
5314 ".tar.gz"))
5315 (sha256
5316 (base32
5317 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5318 (build-system python-build-system)
60357f99
AE
5319 (home-page
5320 "https://bitbucket.org/al45tair/netifaces")
5321 (synopsis
5322 "Python module for portable network interface information")
5323 (description
5324 "Netifaces is a Python module providing information on network
5325interfaces in an easy and portable manner.")
5326 (license license:expat)))
5327
5328(define-public python2-netifaces
5329 (package-with-python2 python-netifaces))
92cb152b 5330
32f77c04
RW
5331(define-public python-networkx
5332 (package
5333 (name "python-networkx")
a4d9609c 5334 (version "1.11")
32f77c04
RW
5335 (source
5336 (origin
5337 (method url-fetch)
a4d9609c 5338 (uri (pypi-uri "networkx" version))
32f77c04 5339 (sha256
a4d9609c 5340 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5341 (build-system python-build-system)
5342 ;; python-decorator is needed at runtime
5343 (propagated-inputs
5344 `(("python-decorator" ,python-decorator)))
5345 (native-inputs
f3b98f4f 5346 `(("python-nose" ,python-nose)))
32f77c04
RW
5347 (home-page "http://networkx.github.io/")
5348 (synopsis "Python module for creating and manipulating graphs and networks")
5349 (description
5350 "NetworkX is a Python package for the creation, manipulation, and study
5351of the structure, dynamics, and functions of complex networks.")
3f641af0 5352 (license license:bsd-3)))
32f77c04
RW
5353
5354(define-public python2-networkx
5355 (package-with-python2 python-networkx))
5356
92cb152b
RW
5357(define-public snakemake
5358 (package
5359 (name "snakemake")
7b93d866 5360 (version "3.9.0")
92cb152b
RW
5361 (source
5362 (origin
5363 (method url-fetch)
7b93d866 5364 (uri (pypi-uri "snakemake" version))
92cb152b 5365 (sha256
7b93d866 5366 (base32 "1d48ql0010v9ls6mac7fz6j391gm4h74a64hqgw89s0vfqgdyzdl"))))
92cb152b 5367 (build-system python-build-system)
7b93d866
MB
5368 (arguments
5369 ;; TODO: Package missing test dependencies.
5370 '(#:tests? #f))
5371 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
5372 (synopsis "Python-based execution environment for make-like workflows")
5373 (description
5374 "Snakemake aims to reduce the complexity of creating workflows by
5375providing a clean and modern domain specific specification language (DSL) in
5376Python style, together with a fast and comfortable execution environment.")
5377 (license license:expat)))
a1920bc9 5378
35de1fbd
RW
5379(define-public python-seaborn
5380 (package
5381 (name "python-seaborn")
fc899d4f 5382 (version "0.7.0")
35de1fbd
RW
5383 (source
5384 (origin
5385 (method url-fetch)
fc899d4f 5386 (uri (pypi-uri "seaborn" version))
35de1fbd 5387 (sha256
fc899d4f 5388 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd 5389 (build-system python-build-system)
6f976df6
MB
5390 (arguments
5391 '(#:tests? #f)) ; Tests requires a running X11 server.
35de1fbd
RW
5392 (propagated-inputs
5393 `(("python-pandas" ,python-pandas)
5394 ("python-matplotlib" ,python-matplotlib)
5395 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5396 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5397 (synopsis "Statistical data visualization")
5398 (description
5399 "Seaborn is a library for making attractive and informative statistical
5400graphics in Python. It is built on top of matplotlib and tightly integrated
5401with the PyData stack, including support for numpy and pandas data structures
5402and statistical routines from scipy and statsmodels.")
3f641af0 5403 (license license:bsd-3)
fc899d4f 5404 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5405
5406(define-public python2-seaborn
fc899d4f
EF
5407 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5408 (package
5409 (inherit base)
5410 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5411 ,@(package-propagated-inputs base))))))
35de1fbd 5412
90fc547f
RW
5413(define-public python-sympy
5414 (package
5415 (name "python-sympy")
5416 (version "0.7.6")
5417 (source
5418 (origin
5419 (method url-fetch)
5420 (uri (string-append
5421 "https://github.com/sympy/sympy/releases/download/sympy-"
5422 version "/sympy-" version ".tar.gz"))
5423 (sha256
5424 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5425 (build-system python-build-system)
90fc547f
RW
5426 (home-page "http://www.sympy.org/")
5427 (synopsis "Python library for symbolic mathematics")
5428 (description
5429 "SymPy is a Python library for symbolic mathematics. It aims to become a
5430full-featured computer algebra system (CAS) while keeping the code as simple
5431as possible in order to be comprehensible and easily extensible.")
3f641af0 5432 (license license:bsd-3)))
90fc547f
RW
5433
5434(define-public python2-sympy
5435 (package-with-python2 python-sympy))
5436
e8c9b010
SR
5437(define-public python-q
5438 (package
5439 (name "python-q")
5440 (version "2.6")
5441 (source
5442 (origin
5443 (method url-fetch)
5444 (uri (pypi-uri "q" version))
5445 (sha256
5446 (base32
5447 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5448 (build-system python-build-system)
5449 (home-page "https://github.com/zestyping/q")
5450 (synopsis "Quick-and-dirty debugging output for tired programmers")
5451 (description
5452 "q is a Python module for \"print\" style of debugging Python code. It
5453provides convenient short API for print out of values, tracebacks, and
5454falling into the Python interpreter.")
f210e944 5455 (license license:asl2.0)))
e8c9b010
SR
5456
5457(define-public python2-q
f210e944 5458 (package-with-python2 python-q))
e8c9b010 5459
a1920bc9
FB
5460(define-public python-testlib
5461 (package
5462 (name "python-testlib")
5463 (version "0.6.5")
5464 (source
5465 (origin
5466 (method url-fetch)
5467 (uri (string-append
5468 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5469 version ".zip"))
5470 (sha256
5471 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5472 (build-system python-build-system)
a1920bc9 5473 (native-inputs
632735f2 5474 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
5475 (synopsis "Python micro test suite harness")
5476 (description "A micro unittest suite harness for Python.")
5477 (home-page "https://github.com/trentm/testlib")
1cb9c006 5478 (license license:expat)))
a1920bc9
FB
5479
5480(define-public python2-testlib
5481 (package-with-python2 python-testlib))
db62afa5
LC
5482
5483(define-public python2-xlib
5484 (package
5485 (name "python2-xlib")
5486 (version "0.14")
5487 (source (origin
5488 (method url-fetch)
de67e922
LF
5489 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5490 "/" version "/"
db62afa5
LC
5491 "python-xlib-" version ".tar.gz"))
5492 (sha256
5493 (base32
5494 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5495 (build-system python-build-system)
5496 (arguments
5497 `(#:python ,python-2 ;Python 2 only
5498 #:tests? #f)) ;no tests
db62afa5
LC
5499 (home-page "http://python-xlib.sourceforge.net/")
5500 (synopsis "Python X11 client library")
5501 (description
5502 "The Python X Library is intended to be a fully functional X client
5503library for Python programs. It is useful to implement low-level X clients.
5504It is written entirely in Python.")
3f641af0 5505 (license license:gpl2+)))
0234ca06
DT
5506
5507(define-public python-singledispatch
5508 (package
5509 (name "python-singledispatch")
5510 (version "3.4.0.3")
5511 (source
5512 (origin
5513 (method url-fetch)
bdb67d84 5514 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5515 (sha256
5516 (base32
5517 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5518 (build-system python-build-system)
5e1c9d24
HG
5519 (native-inputs
5520 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
5521 (home-page
5522 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5523 (synopsis "Backport of singledispatch feature from Python 3.4")
5524 (description
5525 "This library brings functools.singledispatch from Python 3.4 to Python
55262.6-3.3.")
5527 (license license:expat)))
5528
5529(define-public python2-singledispatch
5530 (package-with-python2 python-singledispatch))
feaae484 5531
310d218f
RW
5532(define-public python-tornado
5533 (package
5534 (name "python-tornado")
a724924b 5535 (version "4.3")
310d218f
RW
5536 (source
5537 (origin
5538 (method url-fetch)
a724924b 5539 (uri (pypi-uri "tornado" version))
310d218f 5540 (sha256
a724924b 5541 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5542 (build-system python-build-system)
3fe2c209
MB
5543 (arguments
5544 '(;; FIXME: Two tests error out with:
5545 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
5546 ;; #:phases
5547 ;; (modify-phases %standard-phases
5548 ;; (replace 'check
5549 ;; (lambda _
5550 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
5551 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
5552 ;; (zero? (system* "python" "-m" "tornado.test")))))
5553 #:tests? #f))
310d218f 5554 (native-inputs
b455439b 5555 `(("python-certifi" ,python-certifi)))
f22efa01 5556 (propagated-inputs
b455439b 5557 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5558 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5559 (synopsis "Python web framework and asynchronous networking library")
5560 (description
5561 "Tornado is a Python web framework and asynchronous networking library,
5562originally developed at FriendFeed. By using non-blocking network I/O,
5563Tornado can scale to tens of thousands of open connections, making it ideal
5564for long polling, WebSockets, and other applications that require a long-lived
5565connection to each user.")
3f641af0 5566 (license license:asl2.0)
b455439b 5567 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5568
5569(define-public python2-tornado
b455439b 5570 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 5571 (package (inherit tornado)
f22efa01 5572 (propagated-inputs
310d218f
RW
5573 `(("python2-backport-ssl-match-hostname"
5574 ,python2-backport-ssl-match-hostname)
b455439b 5575 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 5576 ,@(package-propagated-inputs tornado))))))
310d218f 5577
6b59fc10
EF
5578;; the python- version can be removed with python-3.5
5579(define-public python-backports-abc
5580 (package
5581 (name "python-backports-abc")
5582 (version "0.4")
5583 (source
5584 (origin
5585 (method url-fetch)
5586 (uri (pypi-uri "backports_abc" version))
5587 (sha256
5588 (base32
5589 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5590 (build-system python-build-system)
6b59fc10 5591 (home-page "https://github.com/cython/backports_abc")
66e07664 5592 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5593 (description
5594 "Python-backports-abc provides a backport of additions to the
5595'collections.abc' module in Python-3.5.")
3f641af0 5596 (license license:psfl)))
6b59fc10
EF
5597
5598(define-public python2-backports-abc
5599 (package-with-python2 python-backports-abc))
5600
feaae484
SB
5601(define-public python-waf
5602 (package
5603 (name "python-waf")
7dd55dfe 5604 (version "1.9.5")
feaae484
SB
5605 (source (origin
5606 (method url-fetch)
bae67829 5607 (uri (string-append "https://waf.io/"
feaae484
SB
5608 "waf-" version ".tar.bz2"))
5609 (sha256
5610 (base32
7dd55dfe 5611 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5612 (build-system python-build-system)
5613 (arguments
5614 '(#:phases
5615 (modify-phases %standard-phases
5616 (replace 'build
7dd55dfe
EF
5617 (lambda _
5618 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5619 (replace 'check
7dd55dfe
EF
5620 (lambda _
5621 (zero? (system* "python" "waf" "--version"))))
feaae484 5622 (replace 'install
7dd55dfe
EF
5623 (lambda _
5624 (copy-file "waf" %output))))))
5625 (home-page "http://waf.io/")
feaae484
SB
5626 (synopsis "Python-based build system")
5627 (description
5628 "Waf is a Python-based framework for configuring, compiling and installing
5629applications.")
3f641af0 5630 (license license:bsd-3)))
feaae484
SB
5631
5632(define-public python2-waf
5633 (package-with-python2 python-waf))
45203542
RW
5634
5635(define-public python-pyzmq
5636 (package
5637 (name "python-pyzmq")
3655ee76 5638 (version "15.1.0")
45203542
RW
5639 (source
5640 (origin
5641 (method url-fetch)
3655ee76 5642 (uri (pypi-uri "pyzmq" version))
45203542 5643 (sha256
3655ee76 5644 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5645 (build-system python-build-system)
5646 (arguments
5647 `(#:configure-flags
5648 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5649 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5650 ;; --inplace' for 'python setup.py test' to work.
5651 #:tests? #f))
5652 (inputs
5653 `(("zeromq" ,zeromq)))
5654 (native-inputs
5655 `(("pkg-config" ,pkg-config)
f3b98f4f 5656 ("python-nose" ,python-nose)))
45203542
RW
5657 (home-page "http://github.com/zeromq/pyzmq")
5658 (synopsis "Python bindings for 0MQ")
5659 (description
5660 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5661 (license license:bsd-4)))
45203542
RW
5662
5663(define-public python2-pyzmq
5664 (package-with-python2 python-pyzmq))
d889e6c4
CR
5665
5666(define-public python-pep8
5667 (package
5668 (name "python-pep8")
db251311 5669 (version "1.7.0")
d889e6c4
CR
5670 (source
5671 (origin
5672 (method url-fetch)
db251311 5673 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5674 (sha256
5675 (base32
db251311 5676 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 5677 (build-system python-build-system)
d889e6c4
CR
5678 (home-page "http://pep8.readthedocs.org/")
5679 (synopsis "Python style guide checker")
5680 (description
5681 "This tools checks Python code against some of the style conventions in
5682PEP 8.")
5683 (license license:expat)))
5684
5685(define-public python2-pep8
5686 (package-with-python2 python-pep8))
e31d7f44
CR
5687
5688(define-public python-pyflakes
5689 (package
5690 (name "python-pyflakes")
2abc3972 5691 (version "1.0.0")
e31d7f44
CR
5692 (source
5693 (origin
5694 (method url-fetch)
2abc3972 5695 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5696 (sha256
5697 (base32
2abc3972 5698 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 5699 (build-system python-build-system)
e31d7f44
CR
5700 (home-page
5701 "https://github.com/pyflakes/pyflakes")
5702 (synopsis "Passive checker of Python programs")
5703 (description
5704 "Pyflakes statically checks Python source code for common errors.")
5705 (license license:expat)))
a59e017c 5706
7261d9eb
CR
5707(define-public python2-pyflakes
5708 (package-with-python2 python-pyflakes))
5709
a59e017c
CR
5710(define-public python-mccabe
5711 (package
5712 (name "python-mccabe")
c6ebd40d 5713 (version "0.4.0")
a59e017c
CR
5714 (source
5715 (origin
5716 (method url-fetch)
c6ebd40d 5717 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5718 (sha256
5719 (base32
c6ebd40d 5720 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 5721 (build-system python-build-system)
328bb95d 5722 (native-inputs
c6ebd40d 5723 `(("python-pytest" ,python-pytest)
f3b98f4f 5724 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
5725 (home-page "https://github.com/flintwork/mccabe")
5726 (synopsis "McCabe checker, plugin for flake8")
5727 (description
5728 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5729complexity of Python source code.")
7362371d 5730 (license license:expat)))
a59e017c
CR
5731
5732(define-public python2-mccabe
5733 (package-with-python2 python-mccabe))
e8df8f47 5734
7477fbb1
CR
5735(define-public python-mccabe-0.2.1
5736 (package (inherit python-mccabe)
5737 (version "0.2.1")
5738 (source
5739 (origin
5740 (method url-fetch)
5741 (uri (pypi-uri "mccabe" version))
5742 (sha256
5743 (base32
f3b98f4f 5744 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
5745
5746(define-public python2-mccabe-0.2.1
5747 (package-with-python2 python-mccabe-0.2.1))
5748
e8df8f47
CR
5749;; Flake8 2.4.1 requires an older version of pep8.
5750;; This should be removed ASAP.
5751(define-public python-pep8-1.5.7
5752 (package (inherit python-pep8)
5753 (version "1.5.7")
5754 (source
5755 (origin
5756 (method url-fetch)
5757 (uri (string-append
5758 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5759 version
5760 ".tar.gz"))
5761 (sha256
5762 (base32
73e3060d
MB
5763 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5764 (arguments
5765 ;; XXX Tests not compatible with Python 3.5.
5766 '(#:tests? #f))))
e8df8f47
CR
5767
5768(define-public python2-pep8-1.5.7
5769 (package-with-python2 python-pep8-1.5.7))
5770
5771;; Flake8 2.4.1 requires an older version of pyflakes.
5772;; This should be removed ASAP.
5773(define-public python-pyflakes-0.8.1
5774 (package (inherit python-pyflakes)
5775 (version "0.8.1")
5776 (source
5777 (origin
5778 (method url-fetch)
5779 (uri (string-append
5780 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5781 version
5782 ".tar.gz"))
5783 (sha256
5784 (base32
0d84e1ef
MB
5785 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5786 (arguments
5787 ;; XXX Tests not compatible with Python 3.5.
5788 '(#:tests? #f))))
e8df8f47
CR
5789
5790(define-public python2-pyflakes-0.8.1
7261d9eb 5791 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5792
5793(define-public python-flake8
5794 (package
5795 (name "python-flake8")
43789136 5796 (version "2.5.4")
e8df8f47
CR
5797 (source
5798 (origin
5799 (method url-fetch)
1b995533 5800 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5801 (sha256
5802 (base32
011271c7
HG
5803 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5804 (modules '((guix build utils)))
5805 (snippet
5806 '(begin
5807 ;; Remove pre-compiled .pyc files from source.
5808 (for-each delete-file-recursively
5809 (find-files "." "__pycache__" #:directories? #t))
5810 (for-each delete-file (find-files "." "\\.pyc$"))
5811 #t))))
e8df8f47 5812 (build-system python-build-system)
482d9591 5813 (propagated-inputs
f3b98f4f 5814 `(("python-pep8" ,python-pep8)
43789136 5815 ("python-pyflakes" ,python-pyflakes)
482d9591 5816 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
5817 (native-inputs
5818 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
5819 ("python-nose" ,python-nose)))
5820 (home-page "https://gitlab.com/pycqa/flake8")
5821 (synopsis
5822 "The modular source code checker: pep8, pyflakes and co")
5823 (description
5824 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5825 (license license:expat)))
5826
5827(define-public python2-flake8
5828 (package-with-python2 python-flake8))
61b9ac53 5829
abf21efc
CR
5830;; This will only be needed by the python-hacking package and will not be
5831;; necessary once python-hacking > 0.10.2 is released.
5832(define-public python-flake8-2.2.4
5833 (package (inherit python-flake8)
482d9591 5834 (propagated-inputs
f3b98f4f 5835 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 5836 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 5837 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 5838 (native-inputs
482d9591 5839 `(("python-mock" ,python-mock)
abf21efc
CR
5840 ("python-nose" ,python-nose)))
5841 (version "2.2.4")
5842 (source
5843 (origin
5844 (method url-fetch)
5845 (uri (pypi-uri "flake8" version))
5846 (sha256
5847 (base32
b9c8ccce
HG
5848 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
5849 (modules '((guix build utils)))
5850 (snippet
5851 '(begin
5852 ;; Remove pre-compiled .pyc files from source.
5853 (for-each delete-file-recursively
5854 (find-files "." "__pycache__" #:directories? #t))
5855 (for-each delete-file (find-files "." "\\.pyc$"))
a717e8a6
MB
5856 #t))))
5857 (arguments
5858 ;; XXX Fails with Python 3.5.
5859 '(#:tests? #f))))
abf21efc
CR
5860
5861(define-public python2-flake8-2.2.4
5862 (package-with-python2 python-flake8-2.2.4))
5863
61b9ac53
FB
5864(define-public python-mistune
5865 (package
5866 (name "python-mistune")
5867 (version "0.7")
5868 (source
5869 (origin
5870 (method url-fetch)
5871 (uri (string-append
5872 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5873 version
5874 ".tar.gz"))
5875 (sha256
5876 (base32
5877 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5878 (build-system python-build-system)
328bb95d 5879 (native-inputs
f3b98f4f 5880 `(("python-nose" ,python-nose)
61b9ac53
FB
5881 ("python-cython" ,python-cython)))
5882 (home-page "https://github.com/lepture/mistune")
5883 (synopsis "Markdown parser in pure Python")
5884 (description "This package provides a fast markdown parser in pure
5885Python.")
3f641af0 5886 (license license:bsd-3)))
61b9ac53
FB
5887
5888(define-public python2-mistune
5889 (package-with-python2 python-mistune))
6d992d07 5890
b9893908
EE
5891(define-public python-markdown
5892 (package
5893 (name "python-markdown")
5894 (version "2.6.5")
5895 (source
5896 (origin
5897 (method url-fetch)
5898 (uri (pypi-uri "Markdown" version))
5899 (sha256
5900 (base32
5901 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5902 (build-system python-build-system)
5903 (arguments
5904 `(#:phases
5905 (modify-phases %standard-phases
5906 (replace 'check
5907 (lambda _
5908 (zero? (system* "python" "run-tests.py")))))))
5909 (native-inputs
5910 `(("python-nose" ,python-nose)
5911 ("python-pyyaml" ,python-pyyaml)))
5912 (home-page "https://pythonhosted.org/Markdown/")
5913 (synopsis "Python implementation of Markdown")
5914 (description
5915 "This package provides a Python implementation of John Gruber's
5916Markdown. The library features international input, various Markdown
5917extensions, and several HTML output formats. A command line wrapper
5918markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5919 (license license:bsd-3)))
b9893908
EE
5920
5921(define-public python2-markdown
5922 (package-with-python2 python-markdown))
5923
6d992d07
FB
5924(define-public python-ptyprocess
5925 (package
5926 (name "python-ptyprocess")
5927 (version "0.5")
5928 (source
5929 (origin
5930 (method url-fetch)
5931 (uri (string-append
5932 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5933 version ".tar.gz"))
5934 (sha256
5935 (base32
5936 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5937 (build-system python-build-system)
328bb95d 5938 (native-inputs
f3b98f4f 5939 `(("python-nose" ,python-nose)))
6d992d07
FB
5940 (arguments
5941 `(#:phases
5942 (modify-phases %standard-phases
5943 (replace 'check
5944 (lambda _
5945 (zero? (system* "nosetests")))))))
5946 (home-page "https://github.com/pexpect/ptyprocess")
5947 (synopsis "Run a subprocess in a pseudo terminal")
5948 (description
5949 "This package provides a Python library used to launch a subprocess in a
5950pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5951 (license license:isc)))
6d992d07
FB
5952
5953(define-public python2-ptyprocess
5954 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5955
5956(define-public python-terminado
5957 (package
5958 (name "python-terminado")
783fb0a3 5959 (version "0.6")
4aadb1df
FB
5960 (source
5961 (origin
5962 (method url-fetch)
783fb0a3 5963 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5964 (sha256
5965 (base32
783fb0a3 5966 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5967 (build-system python-build-system)
5968 (propagated-inputs
5969 `(("python-tornado" ,python-tornado)
5970 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5971 (native-inputs
5972 `(("python-nose" ,python-nose)))
4aadb1df
FB
5973 (arguments
5974 `(#:phases
5975 (modify-phases %standard-phases
5976 (replace 'check
5977 (lambda _
5978 (zero? (system* "nosetests")))))))
5979 (home-page "https://github.com/takluyver/terminado")
5980 (synopsis "Terminals served to term.js using Tornado websockets")
5981 (description "This package provides a Tornado websocket backend for the
5982term.js Javascript terminal emulator library.")
3f641af0 5983 (license license:bsd-2)
783fb0a3 5984 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5985
5986(define-public python2-terminado
783fb0a3 5987 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5988 (package (inherit terminado)
783fb0a3
EF
5989 (propagated-inputs
5990 `(("python2-backport-ssl-match-hostname"
5991 ,python2-backport-ssl-match-hostname)
00e10c6e 5992 ,@(package-propagated-inputs terminado))))))
5faa5ce4 5993
d582eaac
SB
5994(define-public python-fonttools
5995 (package
5996 (name "python-fonttools")
5997 (version "2.5")
5998 (source (origin
5999 (method url-fetch)
6000 (uri (string-append
6001 "https://pypi.python.org/packages/source/F/FontTools/"
6002 "fonttools-" version ".tar.gz"))
6003 (sha256
6004 (base32
6005 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6006 (build-system python-build-system)
9e8c6a37
HG
6007 (arguments
6008 '(#:test-target "check"
6009 #:phases
6010 (modify-phases %standard-phases
6011 (add-after 'unpack 'patch-setuppy
6012 ;; Remove the undocumented "extra_path" argument, which adds an
6013 ;; intervening directories between site-packages and the package
6014 ;; directory.
6015 (lambda _
6016 (substitute* "setup.py"
6017 (("^[ \t]*extra_path *= *'FontTools',") ""))
6018 #t)))))
d582eaac
SB
6019 (home-page "http://github.com/behdad/fonttools")
6020 (synopsis "Tools to manipulate font files")
6021 (description
6022 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 6023supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
6024of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6025also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6026from an XML-based format.")
3f641af0
DC
6027 (license (license:non-copyleft
6028 "file://LICENSE.txt"
6029 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6030
6031(define-public python2-fonttools
6032 (package-with-python2 python-fonttools))
75710da6 6033
5faa5ce4
RW
6034(define-public python-ly
6035 (package
6036 (name "python-ly")
5135354f 6037 (version "0.9.4")
5faa5ce4
RW
6038 (source
6039 (origin
6040 (method url-fetch)
5135354f
RW
6041 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6042 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6043 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6044 (sha256
6045 (base32
5135354f 6046 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6047 (build-system python-build-system)
972cf9be
MB
6048 (arguments
6049 ;; FIXME: Some tests need network access.
6050 '(#:tests? #f))
5faa5ce4
RW
6051 (synopsis "Tool and library for manipulating LilyPond files")
6052 (description "This package provides a Python library to parse, manipulate
6053or create documents in LilyPond format. A command line program ly is also
6054provided that can be used to do various manipulations with LilyPond files.")
6055 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6056 (license license:gpl2+)))
7e7b27d9
CR
6057
6058(define-public python-appdirs
6059 (package
6060 (name "python-appdirs")
6061 (version "1.4.0")
6062 (source
6063 (origin
6064 (method url-fetch)
6065 (uri (string-append
6066 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6067 version
6068 ".tar.gz"))
6069 (sha256
6070 (base32
6071 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6072 (build-system python-build-system)
7e7b27d9
CR
6073 (home-page "http://github.com/ActiveState/appdirs")
6074 (synopsis
6075 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6076 (description
6077 "This module provides a portable way of finding out where user data
6078should be stored on various operating systems.")
6079 (license license:expat)))
6080
6081(define-public python2-appdirs
6082 (package-with-python2 python-appdirs))
89b2e0b0
LF
6083
6084(define-public python-llfuse
6085 (package
6086 (name "python-llfuse")
e36ace36 6087 (version "1.1.1")
89b2e0b0
LF
6088 (source (origin
6089 (method url-fetch)
6090 (uri (string-append
6091 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6092 "llfuse-" version ".tar.bz2"))
6093 (sha256
6094 (base32
e36ace36 6095 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6096 (build-system python-build-system)
6097 (inputs
6098 `(("fuse" ,fuse)
6099 ("attr" ,attr)))
6100 (native-inputs
f3b98f4f 6101 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6102 (synopsis "Python bindings for FUSE")
6103 (description
6104 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6105 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6106 (license license:lgpl2.0+)
cd0569c4 6107 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6108
6109(define-public python2-llfuse
cd0569c4
LF
6110 (package (inherit (package-with-python2
6111 (strip-python2-variant python-llfuse)))
6112 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6113
6114;; For attic-0.16
6115(define-public python-llfuse-0.41
6116 (package (inherit python-llfuse)
229b3661 6117 (version "0.41.1")
cd0569c4
LF
6118 (source (origin
6119 (method url-fetch)
6120 (uri (string-append
6121 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6122 "llfuse-" version ".tar.bz2"))
6123 (sha256
6124 (base32
229b3661 6125 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6126 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6127 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6128 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6129
6130(define-public python-msgpack
6131 (package
6132 (name "python-msgpack")
aed625bd 6133 (version "0.4.8")
641c9871
LF
6134 (source (origin
6135 (method url-fetch)
ae831df4 6136 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6137 (sha256
6138 (base32
aed625bd 6139 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6140 (build-system python-build-system)
641c9871
LF
6141 (synopsis "MessagePack (de)serializer")
6142 (description "MessagePack is a fast, compact binary serialization format,
6143suitable for similar data to JSON. This package provides CPython bindings for
6144reading and writing MessagePack data.")
6145 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6146 (license license:asl2.0)))
bd74be7b
LF
6147
6148(define-public python2-msgpack
f210e944 6149 (package-with-python2 python-msgpack))
641c9871 6150
6e5e39f4
CR
6151(define-public python-netaddr
6152 (package
6153 (name "python-netaddr")
6154 (version "0.7.18")
6155 (source
6156 (origin
6157 (method url-fetch)
6158 (uri (string-append
6159 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6160 version
6161 ".tar.gz"))
6162 (sha256
6163 (base32
6164 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6165 (build-system python-build-system)
6166 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6167 (home-page "https://github.com/drkjam/netaddr/")
6168 (synopsis "Pythonic manipulation of network addresses")
6169 (description
6170 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6171and MAC network addresses.")
3f641af0 6172 (license license:bsd-3)))
6e5e39f4
CR
6173
6174(define-public python2-netaddr
6175 (package-with-python2 python-netaddr))
8c692a52
CR
6176
6177(define-public python-wrapt
6178 (package
6179 (name "python-wrapt")
6180 (version "1.10.5")
6181 (source
6182 (origin
6183 (method url-fetch)
6184 (uri (string-append
6185 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6186 version
6187 ".tar.gz"))
6188 (sha256
6189 (base32
6190 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6191 (build-system python-build-system)
6192 (arguments
6193 ;; Tests are not included in the tarball, they are only available in the
6194 ;; git repository.
6195 `(#:tests? #f))
8c692a52
CR
6196 (home-page "https://github.com/GrahamDumpleton/wrapt")
6197 (synopsis "Module for decorators, wrappers and monkey patching")
6198 (description
6199 "The aim of the wrapt module is to provide a transparent object proxy for
6200 Python, which can be used as the basis for the construction of function
6201 wrappers and decorator functions.")
3f641af0 6202 (license license:bsd-2)))
8c692a52
CR
6203
6204(define-public python2-wrapt
6205 (package-with-python2 python-wrapt))
b85c85be
CR
6206
6207(define-public python-iso8601
6208 (package
6209 (name "python-iso8601")
fe84bc9a 6210 (version "0.1.11")
b85c85be
CR
6211 (source
6212 (origin
6213 (method url-fetch)
fe84bc9a 6214 (uri (pypi-uri "iso8601" version))
b85c85be 6215 (sha256
fe84bc9a
EF
6216 (base32
6217 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6218 (build-system python-build-system)
63b02364
MB
6219 (native-inputs
6220 `(("python-pytest" ,python-pytest)))
b85c85be
CR
6221 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6222 (synopsis "Module to parse ISO 8601 dates")
6223 (description
6224 "This module parses the most common forms of ISO 8601 date strings (e.g.
6225@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6226 (license license:expat)))
6227
6228(define-public python2-iso8601
6229 (package-with-python2 python-iso8601))
5e412b63
CR
6230
6231(define-public python-monotonic
6232 (package
6233 (name "python-monotonic")
6234 (version "0.3")
6235 (source
6236 (origin
6237 (method url-fetch)
6238 (uri (string-append
6239 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6240 version
6241 ".tar.gz"))
6242 (sha256
6243 (base32
6244 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6245 (build-system python-build-system)
5e412b63
CR
6246 (home-page "https://github.com/atdt/monotonic")
6247 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6248 (description
6249 "This module provides a monotonic() function which returns the value (in
6250fractional seconds) of a clock which never goes backwards.")
3f641af0 6251 (license license:asl2.0)))
5e412b63
CR
6252
6253(define-public python2-monotonic
6254 (package-with-python2 python-monotonic))
de34afac
CR
6255
6256(define-public python-webob
6257 (package
6258 (name "python-webob")
b8834c21 6259 (version "1.5.1")
de34afac
CR
6260 (source
6261 (origin
6262 (method url-fetch)
b8834c21 6263 (uri (pypi-uri "WebOb" version))
de34afac
CR
6264 (sha256
6265 (base32
b8834c21 6266 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6267 (build-system python-build-system)
328bb95d 6268 (native-inputs
f3b98f4f 6269 `(("python-nose" ,python-nose)))
de34afac
CR
6270 (home-page "http://webob.org/")
6271 (synopsis "WSGI request and response object")
6272 (description
6273 "WebOb provides wrappers around the WSGI request environment, and an
6274object to help create WSGI responses.")
6275 (license license:expat)))
6276
6277(define-public python2-webob
6278 (package-with-python2 python-webob))
350ba0a3 6279
02a8a187
BW
6280(define-public python-xlrd
6281 (package
6282 (name "python-xlrd")
c2ad4d70 6283 (version "1.0.0")
02a8a187
BW
6284 (source (origin
6285 (method url-fetch)
e775f48e 6286 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6287 (sha256
6288 (base32
c2ad4d70 6289 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6290 (build-system python-build-system)
6291 (arguments
6292 `(#:phases
6293 (modify-phases %standard-phases
c2ad4d70 6294 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6295 ;; run tests instead for now.
6296 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6297 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6298 (home-page "http://www.python-excel.org/")
6299 (synopsis "Library for extracting data from Excel files")
6300 (description "This packages provides a library to extract data from
c598e35c 6301spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6302@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6303Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6304 (license license:bsd-3)))
02a8a187
BW
6305
6306(define-public python2-xlrd
6307 (package-with-python2 python-xlrd))
6308
350ba0a3
CR
6309(define-public python-prettytable
6310 (package
6311 (name "python-prettytable")
6312 (version "0.7.2")
6313 (source
6314 (origin
6315 (method url-fetch)
6316 (uri (string-append
6317 "https://pypi.python.org/packages/source/P/PrettyTable/"
6318 "prettytable-" version ".tar.bz2"))
6319 (sha256
6320 (base32
6321 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6322 (build-system python-build-system)
350ba0a3
CR
6323 (home-page "http://code.google.com/p/prettytable/")
6324 (synopsis "Display tabular data in an ASCII table format")
6325 (description
6326 "A library designed to represent tabular data in visually appealing ASCII
6327tables. PrettyTable allows for selection of which columns are to be printed,
6328independent alignment of columns (left or right justified or centred) and
6329printing of sub-tables by specifying a row range.")
3f641af0 6330 (license license:bsd-3)))
350ba0a3
CR
6331
6332(define-public python2-prettytable
6333 (package-with-python2 python-prettytable))
7a8ac75a 6334
9f8ee3fe
RW
6335(define-public python-tables
6336 (package
6337 (name "python-tables")
6338 (version "3.2.2")
6339 (source
6340 (origin
6341 (method url-fetch)
6342 (uri (pypi-uri "tables" version))
6343 (sha256
6344 (base32
bac23672
HG
6345 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6346 (modules '((guix build utils)))
6347 (snippet
6348 '(begin
6349 ;; Remove pre-compiled .pyc files from source.
6350 (for-each delete-file-recursively
6351 (find-files "." "__pycache__" #:directories? #t))
6352 (for-each delete-file (find-files "." "\\.pyc$"))
6353 #t))))
9f8ee3fe
RW
6354 (build-system python-build-system)
6355 (arguments
6356 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6357 ;; or "check", so we must override the build and check phases.
6358 #:phases
6359 (modify-phases %standard-phases
6360 (add-after 'unpack 'use-gcc
6361 (lambda _
6362 (substitute* "setup.py"
6363 (("compiler = new_compiler\\(\\)" line)
6364 (string-append line
6365 "\ncompiler.set_executables(compiler='gcc',"
6366 "compiler_so='gcc',"
6367 "linker_exe='gcc',"
6368 "linker_so='gcc -shared')")))
6369 #t))
6370 (replace 'build
6371 (lambda* (#:key inputs #:allow-other-keys)
6372 (zero? (system* "python" "setup.py" "build"
6373 (string-append "--hdf5="
6374 (assoc-ref inputs "hdf5"))))))
6375 (replace 'check
6376 (lambda* (#:key inputs #:allow-other-keys)
6377 (zero? (system* "python" "setup.py" "check"
6378 (string-append "--hdf5="
6379 (assoc-ref inputs "hdf5")))))))))
6380 (propagated-inputs
6381 `(("python-numexpr" ,python-numexpr)
6382 ("python-numpy" ,python-numpy)))
6383 (native-inputs
f3b98f4f 6384 `(("python-cython" ,python-cython)
9f8ee3fe
RW
6385 ("pkg-config" ,pkg-config)))
6386 (inputs
6387 `(("hdf5" ,hdf5)
6388 ("bzip2" ,bzip2)
6389 ("zlib" ,zlib)))
6390 (home-page "http://www.pytables.org/")
6391 (synopsis "Hierarchical datasets for Python")
6392 (description "PyTables is a package for managing hierarchical datasets and
6393designed to efficently cope with extremely large amounts of data.")
3f641af0 6394 (license license:bsd-3)))
9f8ee3fe
RW
6395
6396(define-public python2-tables
6397 (package-with-python2 python-tables))
6398
7a8ac75a
RW
6399(define-public python-pyasn1
6400 (package
6401 (name "python-pyasn1")
caa0edb3 6402 (version "0.1.9")
7a8ac75a
RW
6403 (source
6404 (origin
6405 (method url-fetch)
caa0edb3 6406 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6407 (sha256
6408 (base32
caa0edb3 6409 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6410 (build-system python-build-system)
6411 (home-page "http://pyasn1.sourceforge.net/")
6412 (synopsis "ASN.1 types and codecs")
6413 (description
6414 "This is an implementation of ASN.1 types and codecs in Python. It is
6415suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6416 (license license:bsd-2)))
7a8ac75a
RW
6417
6418(define-public python2-pyasn1
6419 (package-with-python2 python-pyasn1))
9a49a535 6420
5988c299
EF
6421(define-public python-pyasn1-modules
6422 (package
6423 (name "python-pyasn1-modules")
6424 (version "0.0.8")
6425 (source
6426 (origin
6427 (method url-fetch)
6428 (uri (pypi-uri "pyasn1-modules" version))
6429 (sha256
6430 (base32
6431 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6432 (build-system python-build-system)
5988c299
EF
6433 (propagated-inputs
6434 `(("python-pyasn1" ,python-pyasn1)))
6435 (home-page "http://sourceforge.net/projects/pyasn1/")
6436 (synopsis "ASN.1 codec implementations")
6437 (description
6438 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6439implementations of ASN.1-based codecs and protocols.")
3f641af0 6440 (license license:bsd-3)))
5988c299
EF
6441
6442(define-public python2-pyasn1-modules
6443 (package-with-python2 python-pyasn1-modules))
6444
520af157 6445(define-public python-ipaddress
9a49a535 6446 (package
520af157
DC
6447 (name "python-ipaddress")
6448 (version "1.0.16")
6449 (source (origin
6450 (method url-fetch)
6451 (uri (pypi-uri "ipaddress" version))
6452 (sha256
6453 (base32
6454 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6455 (build-system python-build-system)
9a49a535
RW
6456 (home-page "https://github.com/phihag/ipaddress")
6457 (synopsis "IP address manipulation library")
6458 (description
520af157
DC
6459 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6460 in Python. This library is used to create, poke at, and manipulate IPv4 and
6461 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6462 module to older versions of Python.")
f210e944 6463 (license license:psfl)))
520af157
DC
6464
6465(define-public python2-ipaddress
f210e944 6466 (package-with-python2 python-ipaddress))
3f00e078 6467
4a238186
HG
6468(define-public python2-ipaddr
6469 (package
6470 (name "python2-ipaddr")
6471 (version "2.1.11")
6472 (source
6473 (origin
6474 (method url-fetch)
6475 (uri (pypi-uri "ipaddr" version))
6476 (sha256
6477 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6478 (build-system python-build-system)
6479 (arguments
6480 `(#:python ,python-2 ;version 2 only
6481 #:phases
6482 (modify-phases %standard-phases
6483 (replace 'check
6484 (lambda* _
6485 (zero? (system* "python" "ipaddr_test.py")))))))
6486 (home-page "https://github.com/google/ipaddr-py")
6487 (synopsis "IP address manipulation library")
6488 (description
6489 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6490IPv6 addresses and networks.
6491
6492For new implementations you may prefer to use the standard module
6493@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6494versions of Python.")
3f641af0 6495 (license license:asl2.0)))
4a238186 6496
3f00e078
RW
6497(define-public python-idna
6498 (package
6499 (name "python-idna")
6500 (version "2.0")
6501 (source
6502 (origin
6503 (method url-fetch)
6504 (uri (string-append "https://pypi.python.org/packages/source/i/"
6505 "idna/idna-" version ".tar.gz"))
6506 (sha256
6507 (base32
6508 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6509 (build-system python-build-system)
3f00e078
RW
6510 (home-page "https://github.com/kjd/idna")
6511 (synopsis "Internationalized domain names in applications")
6512 (description
6513 "This is a library to support the Internationalised Domain Names in
6514Applications (IDNA) protocol as specified in RFC 5891. This version of the
6515protocol is often referred to as “IDNA2008” and can produce different results
6516from the earlier standard from 2003. The library is also intended to act as a
6517suitable drop-in replacement for the “encodings.idna” module that comes with
6518the Python standard library but currently only supports the older 2003
6519specification.")
3f641af0 6520 (license license:bsd-4)))
3f00e078
RW
6521
6522(define-public python2-idna
6523 (package-with-python2 python-idna))
36ebf972
RW
6524
6525(define-public python-pretend
6526 (package
6527 (name "python-pretend")
6528 (version "1.0.8")
6529 (source
6530 (origin
6531 (method url-fetch)
6532 (uri (string-append "https://pypi.python.org/packages/source/p/"
6533 "pretend/pretend-" version ".tar.gz"))
6534 (sha256
6535 (base32
6536 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6537 (build-system python-build-system)
36ebf972
RW
6538 (home-page "https://github.com/alex/pretend")
6539 (synopsis "Library for stubbing in Python")
6540 (description
6541 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6542technique for writing tests. You may hear the term mixed up with mocks,
6543fakes, or doubles. Basically, a stub is an object that returns pre-canned
6544responses, rather than doing any computation.")
3f641af0 6545 (license license:bsd-3)))
36ebf972
RW
6546
6547(define-public python2-pretend
6548 (package-with-python2 python-pretend))
aa759a51
RW
6549
6550(define-public python-cryptography-vectors
6551 (package
6552 (name "python-cryptography-vectors")
a6c47905 6553 (version "1.6")
aa759a51
RW
6554 (source
6555 (origin
6556 (method url-fetch)
9c509ca9 6557 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6558 (sha256
6559 (base32
a6c47905 6560 "0xgn3yvlmv5rs92wgjj39qscr6s7mwbbsx7j683sfa6ijmyb1k01"))))
aa759a51 6561 (build-system python-build-system)
aa759a51 6562 (home-page "https://github.com/pyca/cryptography")
66e07664 6563 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6564 (description
6565 "This package contains test vectors for the cryptography package.")
6566 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6567 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6568
6569(define-public python2-cryptography-vectors
6570 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6571
6572(define-public python-cryptography
6573 (package
6574 (name "python-cryptography")
a6c47905 6575 (version "1.6")
88b47cb0
RW
6576 (source
6577 (origin
6578 (method url-fetch)
9c509ca9 6579 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6580 (sha256
6581 (base32
a6c47905 6582 "0gwvmz6w5ml0bjbgmdiscsv5i948lrjd381z7h9qkz6kr398c3ad"))))
88b47cb0 6583 (build-system python-build-system)
470613f9
LF
6584 (arguments
6585 `(#:phases
6586 (modify-phases %standard-phases
6587 (add-before 'check 'disable-failing-test
6588 (lambda _
6589 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6590 ;; versions of python-cryptography:
6591 ;; https://github.com/pyca/cryptography/issues/3196
6592 ;; TODO: Try re-enabling the test when upgrading
6593 ;; python-cryptography.
6594 (substitute* "tests/hazmat/backends/test_openssl.py"
6595 (("def test_numeric_string_x509_name_entry")
6596 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6597 #t)))))
88b47cb0
RW
6598 (inputs
6599 `(("openssl" ,openssl)))
6600 (propagated-inputs
6601 `(("python-cffi" ,python-cffi)
6602 ("python-six" ,python-six)
6603 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6604 ("python-idna" ,python-idna)
6605 ("python-iso8601" ,python-iso8601)))
6606 (native-inputs
6607 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6608 ("python-hypothesis" ,python-hypothesis)
88b47cb0 6609 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6610 ("python-pyasn1" ,python-pyasn1)
6611 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
6612 ("python-pytz" ,python-pytz)
6613 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
6614 (home-page "https://github.com/pyca/cryptography")
6615 (synopsis "Cryptographic recipes and primitives for Python")
6616 (description
6617 "cryptography is a package which provides cryptographic recipes and
6618primitives to Python developers. It aims to be the “cryptographic standard
6619library” for Python. The package includes both high level recipes, and low
6620level interfaces to common cryptographic algorithms such as symmetric ciphers,
6621message digests and key derivation functions.")
6622 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6623 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6624 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6625
6626(define-public python2-cryptography
519e2f4f
LF
6627 (let ((crypto (package-with-python2
6628 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6629 (package (inherit crypto)
6630 (propagated-inputs
6631 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6632 ("python2-backport-ssl-match-hostname"
6633 ,python2-backport-ssl-match-hostname)
68f1cdec 6634 ("python2-enum34" ,python2-enum34)
88b47cb0 6635 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6636
6637(define-public python-pyopenssl
6638 (package
6639 (name "python-pyopenssl")
61684de2 6640 (version "16.2.0")
5af999b8
RW
6641 (source
6642 (origin
6643 (method url-fetch)
eb68d268 6644 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6645 (sha256
6646 (base32
61684de2 6647 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))))
5af999b8 6648 (build-system python-build-system)
30e0229a
MB
6649 (arguments
6650 ;; FIXME: Some tests fail with "NameError: name 'long' is not defined".
6651 '(#:tests? #f))
5af999b8
RW
6652 (propagated-inputs
6653 `(("python-cryptography" ,python-cryptography)
6654 ("python-six" ,python-six)))
6655 (inputs
6656 `(("openssl" ,openssl)))
30e0229a
MB
6657 (native-inputs
6658 `(("python-pytest" ,python-pytest)))
5af999b8
RW
6659 (home-page "https://github.com/pyca/pyopenssl")
6660 (synopsis "Python wrapper module around the OpenSSL library")
6661 (description
6662 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6663library.")
3f641af0 6664 (license license:asl2.0)))
5af999b8
RW
6665
6666(define-public python2-pyopenssl
519e2f4f 6667 (package-with-python2 python-pyopenssl))
643725a1
CR
6668
6669(define-public python-pip
6670 (package
6671 (name "python-pip")
6fb54e3b 6672 (version "8.0.2")
643725a1
CR
6673 (source
6674 (origin
6675 (method url-fetch)
6fb54e3b 6676 (uri (pypi-uri "pip" version))
643725a1
CR
6677 (sha256
6678 (base32
6fb54e3b 6679 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1 6680 (build-system python-build-system)
05e2e4cf
HG
6681 (native-inputs
6682 `(;; Tests
6683 ("python-virtualenv" ,python-virtualenv)
643725a1
CR
6684 ("python-mock" ,python-mock)
6685 ("python-pytest" ,python-pytest)
6686 ("python-scripttest" ,python-scripttest)))
6687 (home-page "https://pip.pypa.io/")
6688 (synopsis
6689 "Package manager for Python software")
6690 (description
6691 "Pip is a package manager for Python software, that finds packages on the
6692Python Package Index (PyPI).")
6693 (license license:expat)))
6694
6695(define-public python2-pip
6696 (package-with-python2 python-pip))
d8c4998f
LC
6697
6698(define-public python-tlsh
6699 (package
6700 (name "python-tlsh")
99b00dc7 6701 (version "3.4.4")
d8c4998f
LC
6702 (home-page "https://github.com/trendmicro/tlsh")
6703 (source (origin
99b00dc7
EF
6704 (method url-fetch)
6705 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6706 version ".tar.gz"))
d8c4998f
LC
6707 (sha256
6708 (base32
99b00dc7
EF
6709 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6710 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6711 (build-system cmake-build-system)
6712 (arguments
6713 '(#:out-of-source? #f
6714 #:phases (modify-phases %standard-phases
6715 (replace
6716 'install
6717 (lambda* (#:key outputs #:allow-other-keys)
6718 ;; Build and install the Python bindings. The underlying
6719 ;; C++ library is apparently not meant to be installed.
6720 (let ((out (assoc-ref outputs "out")))
6721 (with-directory-excursion "py_ext"
6722 (and (system* "python" "setup.py" "build")
6723 (system* "python" "setup.py" "install"
6724 (string-append "--prefix=" out))))))))))
6725 (inputs `(("python" ,python-wrapper))) ;for the bindings
6726 (synopsis "Fuzzy matching library for Python")
6727 (description
6728 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6729Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6730value which can be used for similarity comparisons. Similar objects have
6731similar hash values, which allows for the detection of similar objects by
6732comparing their hash values. The byte stream should have a sufficient amount
6733of complexity; for example, a byte stream of identical bytes will not generate
6734a hash value.")
3f641af0 6735 (license license:asl2.0)))
d8c4998f
LC
6736
6737(define-public python2-tlsh
6738 (package
6739 (inherit python-tlsh)
6740 (name "python2-tlsh")
6741 (inputs `(("python" ,python-2)))))
d96034ed 6742
67f66812
BW
6743(define-public python-termcolor
6744 (package
6745 (name "python-termcolor")
6746 (version "1.1.0")
6747 (source
6748 (origin
6749 (method url-fetch)
6750 (uri (pypi-uri "python-termcolor" version))
6751 (sha256
6752 (base32
6753 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6754 (build-system python-build-system)
6755 (arguments
6756 ;; There are no tests.
6757 `(#:tests? #f))
6758 (home-page "http://pypi.python.org/pypi/termcolor")
6759 (synopsis "ANSII Color formatting for terminal output")
6760 (description
6761 "This package provides ANSII Color formatting for output in terminals.")
6762 (license license:expat)))
6763
6764(define-public python2-termcolor
6765 (package-with-python2 python-termcolor))
6766
d96034ed
LC
6767(define-public python-libarchive-c
6768 (package
6769 (name "python-libarchive-c")
03fd001c 6770 (version "2.2")
d96034ed
LC
6771 (source (origin
6772 (method url-fetch)
03fd001c 6773 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6774 (sha256
6775 (base32
03fd001c 6776 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6777 (build-system python-build-system)
6778 (arguments
6779 '(#:phases (modify-phases %standard-phases
6780 (add-before
6781 'build 'reference-libarchive
6782 (lambda* (#:key inputs #:allow-other-keys)
6783 ;; Retain the absolute file name of libarchive.so.
6784 (let ((libarchive (assoc-ref inputs "libarchive")))
6785 (substitute* "libarchive/ffi.py"
6786 (("find_library\\('archive'\\)")
6787 (string-append "'" libarchive
b41a05ce 6788 "/lib/libarchive.so'")))))))))
d96034ed 6789 (inputs
f3b98f4f 6790 `(("libarchive" ,libarchive)))
d96034ed
LC
6791 (home-page "https://github.com/Changaco/python-libarchive-c")
6792 (synopsis "Python interface to libarchive")
6793 (description
6794 "This package provides Python bindings to libarchive, a C library to
6795access possibly compressed archives in many different formats. It uses
6796Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6797 (license license:lgpl2.0+)))
d96034ed
LC
6798
6799(define-public python2-libarchive-c
6800 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6801
6802(define-public python-file
6803 (package
6804 (inherit file)
6805 (name "python-file")
7ffa5d4a
LF
6806 (source (origin
6807 (inherit (package-source file))
6808 ;; This patch should not be applied to python2-file.
6809 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
6810 (build-system python-build-system)
6811 (arguments
6812 '(#:tests? #f ;no tests
00bf74be 6813 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
6814 #:phases (modify-phases %standard-phases
6815 (add-before 'build 'change-directory
6816 (lambda _
6817 (chdir "python")
6818 #t))
6819 (add-before 'build 'set-library-file-name
6820 (lambda* (#:key inputs #:allow-other-keys)
6821 (let ((file (assoc-ref inputs "file")))
6822 (substitute* "magic.py"
6823 (("find_library\\('magic'\\)")
6824 (string-append "'" file "/lib/libmagic.so'")))
6825 #t))))))
6826 (inputs `(("file" ,file)))
6827 (self-native-input? #f)
daeeea71
CM
6828 (synopsis "Python bindings to the libmagic file type guesser. Note that
6829this module and the python-magic module both provide a \"magic.py\" file;
6830these two modules, which are different and were developed separately, both
f210e944 6831serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6832
6833(define-public python2-file
f210e944 6834 (package-with-python2 python-file))
85d4aeac
LC
6835
6836(define-public python-debian
6837 (package
6838 (name "python-debian")
6839 (version "0.1.23")
6840 (source
6841 (origin
6842 (method url-fetch)
6843 (uri (string-append
6844 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6845 version ".tar.gz"))
6846 (sha256
6847 (base32
6848 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6849 (build-system python-build-system)
f22efa01 6850 (propagated-inputs
85d4aeac 6851 `(("python-six" ,python-six)))
85d4aeac
LC
6852 (home-page "http://packages.debian.org/sid/python-debian")
6853 (synopsis "Debian package related modules")
6854 (description
5c7bdc9a
LC
6855 ;; XXX: Use @enumerate instead of @itemize to work around
6856 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6857 "This package provides Python modules that abstract many formats of
6858Debian-related files, such as:
6859
5c7bdc9a 6860@enumerate
85d4aeac
LC
6861@item Debtags information;
6862@item @file{debian/changelog} files;
6863@item packages files, pdiffs;
6864@item control files of single or multiple RFC822-style paragraphs---e.g.
6865 @file{debian/control}, @file{.changes}, @file{.dsc};
6866@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6867 contained files and meta-information.
5c7bdc9a 6868@end enumerate\n")
85d4aeac
LC
6869
6870 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6871 (license license:gpl3+)))
85d4aeac
LC
6872
6873(define-public python2-debian
6874 (package-with-python2 python-debian))
816a6538 6875
2d321bb2
RW
6876(define-public python-nbformat
6877 (package
6878 (name "python-nbformat")
6879 (version "4.1.0")
6880 (source
6881 (origin
6882 (method url-fetch)
6883 (uri (pypi-uri "nbformat" version))
6884 (sha256
6885 (base32
6886 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6887 (build-system python-build-system)
6888 (arguments `(#:tests? #f)) ; no test target
6889 (propagated-inputs
6890 `(("python-ipython-genutils" ,python-ipython-genutils)
6891 ("python-jsonschema" ,python-jsonschema)
6892 ("python-jupyter-core" ,python-jupyter-core)
6893 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
6894 (home-page "http://jupyter.org")
6895 (synopsis "Jupyter Notebook format")
6896 (description "This package provides the reference implementation of the
6897Jupyter Notebook format and Python APIs for working with notebooks.")
6898 (license license:bsd-3)))
6899
6900(define-public python2-nbformat
6901 (package-with-python2 python-nbformat))
6902
55436048
RW
6903(define-public python-bleach
6904 (package
6905 (name "python-bleach")
6906 (version "1.4.3")
6907 (source
6908 (origin
6909 (method url-fetch)
6910 (uri (pypi-uri "bleach" version))
6911 (sha256
6912 (base32
6913 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6914 (build-system python-build-system)
6915 (propagated-inputs
6916 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
6917 ("python-six" ,python-six)))
6918 (native-inputs
6919 `(("python-nose" ,python-nose)))
6920 (home-page "http://github.com/jsocol/bleach")
6921 (synopsis "Whitelist-based HTML-sanitizing tool")
6922 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6923 (license license:asl2.0)))
6924
6925(define-public python2-bleach
6926 (package-with-python2 python-bleach))
6927
60590a3a
RW
6928(define-public python-entrypoints
6929 (package
6930 (name "python-entrypoints")
6931 (version "0.2.2")
6932 (source
6933 (origin
6934 (method url-fetch)
6935 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6936 version ".tar.gz"))
6937 (file-name (string-append name "-" version ".tar.gz"))
6938 (sha256
6939 (base32
6940 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6941 (build-system python-build-system)
6942 ;; The package does not come with a setup.py file, so we have to generate
6943 ;; one ourselves.
6944 (arguments
6945 `(#:tests? #f
6946 #:phases
6947 (modify-phases %standard-phases
6948 (add-after 'unpack 'create-setup.py
6949 (lambda _
6950 (call-with-output-file "setup.py"
6951 (lambda (port)
6952 (format port "\
6953from setuptools import setup
6954setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6955" ,version))))))))
6956 (home-page "https://github.com/takluyver/entrypoints")
6957 (synopsis "Discover and load entry points from installed Python packages")
6958 (description "Entry points are a way for Python packages to advertise
6959objects with some common interface. The most common examples are
6960@code{console_scripts} entry points, which define shell commands by
6961identifying a Python function to run. The @code{entrypoints} module contains
6962functions to find and load entry points.")
6963 (license license:expat)))
6964
6965(define-public python2-entrypoints
6966 (package-with-python2 python-entrypoints))
6967
c60898a8
RW
6968(define-public python-nbconvert
6969 (package
6970 (name "python-nbconvert")
6971 (version "5.0.0b1")
6972 (source
6973 (origin
6974 (method url-fetch)
6975 (uri (pypi-uri "nbconvert" version))
6976 (sha256
6977 (base32
6978 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6979 (build-system python-build-system)
497355dc
MB
6980 (arguments
6981 `(;; The "bdist_egg" target is disabled by default, causing the installation
6982 ;; to fail.
6983 #:configure-flags (list "bdist_egg")
6984 ;; FIXME: 5 failures, 40 errors.
6985 #:tests? #f))
6986 ;; #:phases
6987 ;; (modify-phases %standard-phases
6988 ;; (replace 'check
6989 ;; (lambda _
6990 ;; (zero? (system* "py.test" "-v")))))
6991 (native-inputs
6992 `(("python-pytest" ,python-pytest)))
c60898a8
RW
6993 (propagated-inputs
6994 `(("python-bleach" ,python-bleach)
6995 ("python-entrypoints" ,python-entrypoints)
6996 ("python-jinja2" ,python-jinja2)
6997 ("python-jupyter-core" ,python-jupyter-core)
6998 ("python-mistune" ,python-mistune)
6999 ("python-nbformat" ,python-nbformat)
7000 ("python-pygments" ,python-pygments)
c60898a8
RW
7001 ("python-traitlets" ,python-traitlets)))
7002 (home-page "http://jupyter.org")
7003 (synopsis "Converting Jupyter Notebooks")
7004 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7005notebooks to various other formats via Jinja templates. It allows you to
7006convert an @code{.ipynb} notebook file into various static formats including:
7007
7008@enumerate
7009@item HTML
7010@item LaTeX
7011@item PDF
7012@item Reveal JS
7013@item Markdown (md)
7014@item ReStructured Text (rst)
7015@item executable script
7016@end enumerate\n")
7017 (license license:bsd-3)))
7018
7019(define-public python2-nbconvert
7020 (package-with-python2 python-nbconvert))
7021
a0d62280
RW
7022(define-public python-notebook
7023 (package
7024 (name "python-notebook")
7025 (version "4.2.3")
7026 (source (origin
7027 (method url-fetch)
7028 (uri (pypi-uri "notebook" version))
7029 (sha256
7030 (base32
7031 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7032 (build-system python-build-system)
7033 (arguments
7034 `(#:phases
7035 (modify-phases %standard-phases
7036 (replace 'check
7037 (lambda _
7038 ;; HOME must be set for tests
7039 (setenv "HOME" "/tmp")
7040 (zero? (system* "nosetests")))))))
7041 (propagated-inputs
7042 `(("python-jupyter-core" ,python-jupyter-core)
7043 ("python-nbformat" ,python-nbformat)
7044 ("python-nbconvert" ,python-nbconvert)
7045 ("python-ipython" ,python-ipython)))
7046 (native-inputs
7047 `(("python-nose" ,python-nose)
7048 ("python-sphinx" ,python-sphinx)
7049 ("python-requests" ,python-requests)))
7050 (home-page "http://jupyter.org/")
7051 (synopsis "Web-based notebook environment for interactive computing")
7052 (description
7053 "The Jupyter HTML notebook is a web-based notebook environment for
7054interactive computing.")
3a735ecf 7055 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
7056 (license license:bsd-3)))
7057
7058(define-public python2-notebook
3a735ecf
HG
7059 (let ((base (package-with-python2
7060 (strip-python2-variant python-notebook))))
7061 (package (inherit base)
7062 (native-inputs
7063 `(("python2-mock" ,python2-mock)
7064 ,@(package-native-inputs base)))
7065 (arguments
7066 (substitute-keyword-arguments (package-arguments base)
7067 ((#:phases phases)
7068 `(modify-phases ,phases
7069 (add-before 'check 'disable-test-case
7070 ;; The test requires network access to localhost. Curiously it
7071 ;; fails with Python 2 only. Simply make the test-case return
7072 ;; immediately.
7073 (lambda _
7074 (substitute*
7075 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7076 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7077
d55724ed
RW
7078(define-public python-widgetsnbextension
7079 (package
7080 (name "python-widgetsnbextension")
7081 (version "1.2.6")
7082 (source
7083 (origin
7084 (method url-fetch)
7085 (uri (pypi-uri "widgetsnbextension" version))
7086 (sha256
7087 (base32
7088 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7089 (build-system python-build-system)
7090 (propagated-inputs
7091 `(("python-notebook" ,python-notebook)))
7092 (native-inputs
f3b98f4f 7093 `(("python-nose" ,python-nose)))
d55724ed
RW
7094 (home-page "http://ipython.org")
7095 (synopsis "IPython HTML widgets for Jupyter")
7096 (description "This package provides interactive HTML widgets for Jupyter
7097notebooks.")
7098 (license license:bsd-3)))
7099
7100(define-public python2-widgetsnbextension
7101 (package-with-python2 python-widgetsnbextension))
7102
4fe2e344
RW
7103(define-public python-ipywidgets
7104 (package
7105 (name "python-ipywidgets")
7106 (version "5.2.2")
7107 (source
7108 (origin
7109 (method url-fetch)
7110 (uri (pypi-uri "ipywidgets" version))
7111 (sha256
7112 (base32
7113 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7114 (build-system python-build-system)
7115 ;; FIXME: it's not clear how to run the tests.
7116 (arguments `(#:tests? #f))
7117 (propagated-inputs
7118 `(("python-ipykernel" ,python-ipykernel)
7119 ("python-ipython" ,python-ipython)
4fe2e344
RW
7120 ("python-traitlets" ,python-traitlets)
7121 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7122 (home-page "http://ipython.org")
7123 (synopsis "IPython HTML widgets for Jupyter")
7124 (description "Ipywidgets are interactive HTML widgets for Jupyter
7125notebooks and the IPython kernel. Notebooks come alive when interactive
7126widgets are used. Users gain control of their data and can visualize changes
7127in the data.")
7128 (license license:bsd-3)))
7129
7130(define-public python2-ipywidgets
7131 (package-with-python2 python-ipywidgets))
7132
8ceebf8f
RW
7133(define-public python-jupyter-console
7134 (package
7135 (name "python-jupyter-console")
7136 (version "5.0.0")
7137 (source
7138 (origin
7139 (method url-fetch)
7140 (uri (pypi-uri "jupyter_console" version))
7141 (sha256
7142 (base32
7143 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7144 (build-system python-build-system)
7145 ;; FIXME: it's not clear how to run the tests.
7146 (arguments `(#:tests? #f))
7147 (propagated-inputs
7148 `(("python-ipykernel" ,python-ipykernel)
7149 ("python-ipython" ,python-ipython)
7150 ("python-jupyter-client" ,python-jupyter-client)
7151 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7152 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7153 (home-page "https://jupyter.org")
7154 (synopsis "Jupyter terminal console")
7155 (description "This package provides a terminal-based console frontend for
7156Jupyter kernels. It also allows for console-based interaction with non-Python
7157Jupyter kernels such as IJulia and IRKernel.")
7158 (license license:bsd-3)))
7159
7160(define-public python2-jupyter-console
7161 (package-with-python2 python-jupyter-console))
7162
c27ae827
RW
7163(define-public jupyter
7164 (package
7165 (name "jupyter")
7166 (version "1.0.0")
7167 (source
7168 (origin
7169 (method url-fetch)
7170 (uri (pypi-uri "jupyter" version))
7171 (sha256
7172 (base32
7173 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7174 (build-system python-build-system)
7175 ;; FIXME: it's not clear how to run the tests.
7176 (arguments `(#:tests? #f))
7177 (propagated-inputs
7178 `(("python-ipykernel" ,python-ipykernel)
7179 ("python-ipywidgets" ,python-ipywidgets)
7180 ("python-jupyter-console" ,python-jupyter-console)
7181 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7182 ("python-notebook" ,python-notebook)))
c27ae827
RW
7183 (home-page "http://jupyter.org")
7184 (synopsis "Web application for interactive documents")
7185 (description
7186 "The Jupyter Notebook is a web application that allows you to create and
7187share documents that contain live code, equations, visualizations and
7188explanatory text. Uses include: data cleaning and transformation, numerical
7189simulation, statistical modeling, machine learning and much more.")
7190 (license license:bsd-3)))
7191
816a6538
LC
7192(define-public python-chardet
7193 (package
7194 (name "python-chardet")
7195 (version "2.3.0")
7196 (source
7197 (origin
7198 (method url-fetch)
7199 (uri (string-append
7200 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7201 version
7202 ".tar.gz"))
7203 (sha256
7204 (base32
7205 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7206 (build-system python-build-system)
816a6538
LC
7207 (home-page "https://github.com/chardet/chardet")
7208 (synopsis "Universal encoding detector for Python 2 and 3")
7209 (description
7210 "This package provides @code{chardet}, a Python module that can
7211automatically detect a wide range of file encodings.")
3f641af0 7212 (license license:lgpl2.1+)))
816a6538
LC
7213
7214(define-public python2-chardet
7215 (package-with-python2 python-chardet))
2fc5f186 7216
1872f1bb
KM
7217(define-public python-docopt
7218 (package
7219 (name "python-docopt")
7220 (version "0.6.2")
7221 (source
7222 (origin
7223 (method url-fetch)
7224 ;; The release on PyPI does not include tests.
7225 (uri (string-append
7226 "https://github.com/docopt/docopt/archive/"
7227 version ".tar.gz"))
7228 (file-name (string-append name "-" version ".tar.gz"))
7229 (sha256
7230 (base32
7231 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7232 (build-system python-build-system)
7233 (native-inputs
f3b98f4f 7234 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7235 (arguments
7236 `(#:phases (alist-replace
7237 'check
7238 (lambda _ (zero? (system* "py.test")))
7239 %standard-phases)))
7240 (home-page "http://docopt.org")
7241 (synopsis "Command-line interface description language for Python")
7242 (description "This library allows the user to define a command-line
7243interface from a program's help message rather than specifying it
7244programatically with command-line parsers like @code{getopt} and
7245@code{argparse}.")
7246 (license license:expat)))
7247
7248(define-public python2-docopt
7249 (package-with-python2 python-docopt))
7250
2fc5f186
LF
7251(define-public python-zope-event
7252 (package
7253 (name "python-zope-event")
7254 (version "4.1.0")
7255 (source
7256 (origin
7257 (method url-fetch)
7258 (uri (string-append "https://pypi.python.org/packages/source/z"
7259 "/zope.event/zope.event-" version ".tar.gz"))
7260 (sha256
7261 (base32
7262 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7263 (build-system python-build-system)
2fc5f186
LF
7264 (home-page "http://pypi.python.org/pypi/zope.event")
7265 (synopsis "Event publishing system for Python")
7266 (description "Zope.event provides an event publishing API, intended for
7267use by applications which are unaware of any subscribers to their events. It
7268is a simple event-dispatching system on which more sophisticated event
7269dispatching systems can be built.")
3f641af0 7270 (license license:zpl2.1)))
2fc5f186
LF
7271
7272(define-public python2-zope-event
7273 (package-with-python2 python-zope-event))
97abe268
LF
7274
7275(define-public python-zope-interface
7276 (package
7277 (name "python-zope-interface")
7278 (version "4.1.3")
7279 (source
7280 (origin
7281 (method url-fetch)
7282 (uri (string-append "https://pypi.python.org/packages/source/z"
7283 "/zope.interface/zope.interface-" version ".tar.gz"))
7284 (sha256
7285 (base32
7286 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7287 (build-system python-build-system)
38d480a8 7288 (native-inputs
97abe268
LF
7289 `(("python-zope-event" ,python-zope-event)))
7290 (home-page "https://github.com/zopefoundation/zope.interface")
7291 (synopsis "Python implementation of the \"design by contract\"
7292methodology")
7293 (description "Zope.interface provides an implementation of \"object
7294interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7295conforming to a given API or contract.")
3f641af0 7296 (license license:zpl2.1)))
97abe268
LF
7297
7298(define-public python2-zope-interface
7299 (package-with-python2 python-zope-interface))
81f2373c
LF
7300
7301(define-public python-zope-exceptions
7302 (package
7303 (name "python-zope-exceptions")
7304 (version "4.0.8")
7305 (source
7306 (origin
7307 (method url-fetch)
7308 (uri (string-append "https://pypi.python.org/packages/source/z"
7309 "/zope.exceptions/zope.exceptions-"
7310 version ".tar.gz"))
7311 (sha256
7312 (base32
7313 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7314 (build-system python-build-system)
7315 (arguments
7316 '(#:tests? #f)) ; circular dependency with zope.testrunner
7317 (propagated-inputs
7318 `(("python-zope-interface" ,python-zope-interface)))
7319 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7320 (synopsis "Zope exceptions")
7321 (description "Zope.exceptions provides general-purpose exception types
7322that have uses outside of the Zope framework.")
3f641af0 7323 (license license:zpl2.1)))
81f2373c
LF
7324
7325(define-public python2-zope-exceptions
7326 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7327
7328(define-public python-zope-testing
7329 (package
7330 (name "python-zope-testing")
7331 (version "4.5.0")
7332 (source
7333 (origin
7334 (method url-fetch)
7335 (uri (string-append "https://pypi.python.org/packages/source/z"
7336 "/zope.testing/zope.testing-" version ".tar.gz"))
7337 (sha256
7338 (base32
b02f7a21
HG
7339 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7340 (modules '((guix build utils)))
7341 (snippet
7342 '(begin
7343 ;; Remove pre-compiled .pyc files backup files from source.
7344 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7345 #t))))
900e3c0e
LF
7346 (build-system python-build-system)
7347 (native-inputs
7348 `(("python-zope-exceptions" ,python-zope-exceptions)))
7349 (propagated-inputs
7350 `(("python-zope-interface" ,python-zope-interface)))
7351 (home-page "http://pypi.python.org/pypi/zope.testing")
7352 (synopsis "Zope testing helpers")
7353 (description "Zope.testing provides a number of testing utilities for HTML
7354forms, HTTP servers, regular expressions, and more.")
3f641af0 7355 (license license:zpl2.1)))
900e3c0e
LF
7356
7357(define-public python2-zope-testing
7358 (package-with-python2 python-zope-testing))
01614c4f
LF
7359
7360(define-public python-zope-testrunner
7361 (package
7362 (name "python-zope-testrunner")
7363 (version "4.4.9")
7364 (source
7365 (origin
7366 (method url-fetch)
7367 (uri (string-append "https://pypi.python.org/packages/source/z"
7368 "/zope.testrunner/zope.testrunner-"
7369 version ".zip"))
7370 (sha256
7371 (base32
7372 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7373 (build-system python-build-system)
385871e5
MB
7374 (arguments
7375 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
7376 (native-inputs
7377 `(("python-six" ,python-six)
e408ffc3 7378 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
7379 ("python-zope-exceptions" ,python-zope-exceptions)
7380 ("python-zope-testing" ,python-zope-testing)
7381 ("unzip" ,unzip)))
7382 (propagated-inputs
7383 `(("python-zope-interface" ,python-zope-interface)))
7384 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7385 (synopsis "Zope testrunner script")
7386 (description "Zope.testrunner provides a script for running Python
7387tests.")
3f641af0 7388 (license license:zpl2.1)))
01614c4f
LF
7389
7390(define-public python2-zope-testrunner
7391 (let ((base (package-with-python2 python-zope-testrunner)))
7392 (package
7393 (inherit base)
7394 (native-inputs
7395 (append (package-native-inputs base)
7396 `(("python2-subunit" ,python2-subunit)
7397 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7398
7399(define-public python-zope-i18nmessageid
7400 (package
7401 (name "python-zope-i18nmessageid")
7402 (version "4.0.3")
7403 (source
7404 (origin
7405 (method url-fetch)
7406 (uri (string-append
7407 "https://pypi.python.org/packages/source/z"
7408 "/zope.i18nmessageid/zope.i18nmessageid-"
7409 version ".tar.gz"))
7410 (sha256
7411 (base32
7412 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7413 (build-system python-build-system)
6a5c710c
LF
7414 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7415 (synopsis "Message identifiers for internationalization")
7416 (description "Zope.i18nmessageid provides facilities for declaring
7417internationalized messages within program source text.")
3f641af0 7418 (license license:zpl2.1)))
6a5c710c
LF
7419
7420(define-public python2-zope-i18nmessageid
7421 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7422
7423(define-public python-zope-schema
7424 (package
7425 (name "python-zope-schema")
7426 (version "4.4.2")
7427 (source
7428 (origin
7429 (method url-fetch)
7430 (uri (string-append "https://pypi.python.org/packages/source/z"
7431 "/zope.schema/zope.schema-" version ".tar.gz"))
7432 (sha256
7433 (base32
7434 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7435 (build-system python-build-system)
22dba2ef
MB
7436 (arguments
7437 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
7438 (propagated-inputs
7439 `(("python-zope-event" ,python-zope-event)
2b9e4bea 7440 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
7441 ("python-zope-interface" ,python-zope-interface)))
7442 (native-inputs
47f77210
HG
7443 `(("python-zope-testing" ,python-zope-testing)
7444 ("python-coverage" ,python-coverage)
7445 ("python-nose" ,python-nose)))
71fb09f3
LF
7446 (home-page "http://pypi.python.org/pypi/zope.schema")
7447 (synopsis "Zope data schemas")
7448 (description "Zope.scheme provides extensions to zope.interface for
7449defining data schemas.")
3f641af0 7450 (license license:zpl2.1)))
71fb09f3
LF
7451
7452(define-public python2-zope-schema
7453 (package-with-python2 python-zope-schema))
fbac9b17
LF
7454
7455(define-public python-zope-configuration
7456 (package
7457 (name "python-zope-configuration")
7458 (version "4.0.3")
7459 (source (origin
7460 (method url-fetch)
7461 (uri (string-append "https://pypi.python.org/packages/source/z"
7462 "/zope.configuration/zope.configuration-"
7463 version ".tar.gz"))
7464 (sha256
7465 (base32
7466 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7467 (build-system python-build-system)
7e8b1bfa
MB
7468 (arguments
7469 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
7470 (propagated-inputs
7471 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7472 ("python-zope-schema" ,python-zope-schema)))
7473 (home-page "http://pypi.python.org/pypi/zope.configuration")
7474 (synopsis "Zope Configuration Markup Language")
7475 (description "Zope.configuration implements ZCML, the Zope Configuration
7476Markup Language.")
3f641af0 7477 (license license:zpl2.1)))
fbac9b17
LF
7478
7479(define-public python2-zope-configuration
7480 (package-with-python2 python-zope-configuration))
2ad52086
LF
7481
7482(define-public python-zope-proxy
7483 (package
7484 (name "python-zope-proxy")
7485 (version "4.1.6")
7486 (source
7487 (origin
7488 (method url-fetch)
7489 (uri (string-append "https://pypi.python.org/packages/source/z"
7490 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7491 (sha256
7492 (base32
7493 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7494 (build-system python-build-system)
66b3aadb
MB
7495 (arguments
7496 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
7497 (propagated-inputs
7498 `(("python-zope-interface" ,python-zope-interface)))
7499 (home-page "http://pypi.python.org/pypi/zope.proxy")
7500 (synopsis "Generic, transparent proxies")
7501 (description "Zope.proxy provides generic, transparent proxies for Python.
7502Proxies are special objects which serve as mostly-transparent wrappers around
7503another object, intervening in the apparent behavior of the wrapped object
7504only when necessary to apply the policy (e.g., access checking, location
7505brokering, etc.) for which the proxy is responsible.")
3f641af0 7506 (license license:zpl2.1)))
2ad52086
LF
7507
7508(define-public python2-zope-proxy
7509 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7510
7511(define-public python-zope-location
7512 (package
7513 (name "python-zope-location")
7514 (version "4.0.3")
7515 (source
7516 (origin
7517 (method url-fetch)
7518 (uri (string-append "https://pypi.python.org/packages/source/z"
7519 "/zope.location/zope.location-" version ".tar.gz"))
7520 (sha256
7521 (base32
7522 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7523 (build-system python-build-system)
40bb8e07
MB
7524 (arguments
7525 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 7526 (propagated-inputs
f404b5ea
LF
7527 `(("python-zope-proxy" ,python-zope-proxy)
7528 ("python-zope-schema" ,python-zope-schema)))
7529 (home-page "http://pypi.python.org/pypi/zope.location/")
7530 (synopsis "Zope location library")
7531 (description "Zope.location implements the concept of \"locations\" in
7532Zope3, which are are special objects that have a structural location.")
3f641af0 7533 (license license:zpl2.1)))
f404b5ea
LF
7534
7535(define-public python2-zope-location
7536 (package-with-python2 python-zope-location))
d4b77f36
LF
7537
7538(define-public python-zope-security
7539 (package
7540 (name "python-zope-security")
7541 (version "4.0.3")
7542 (source
7543 (origin
7544 (method url-fetch)
7545 (uri (string-append "https://pypi.python.org/packages/source/z"
7546 "/zope.security/zope.security-" version ".tar.gz"))
7547 (sha256
7548 (base32
7549 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7550 (build-system python-build-system)
a74f9b12
MB
7551 (arguments
7552 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
7553 (propagated-inputs
7554 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 7555 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 7556 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
7557 (native-inputs
7558 `(("python-six" ,python-six)
7559 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
7560 ("python-zope-configuration" ,python-zope-configuration)
7561 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
7562 ("python-zope-testrunner" ,python-zope-testrunner)
7563 ("python-zope-testing" ,python-zope-testing)))
7564 (home-page "http://pypi.python.org/pypi/zope.security")
7565 (synopsis "Zope security framework")
7566 (description "Zope.security provides a generic mechanism to implement
7567security policies on Python objects.")
3f641af0 7568 (license license:zpl2.1)))
d4b77f36
LF
7569
7570(define-public python2-zope-security
04417662
EF
7571 (let ((zope-security (package-with-python2 python-zope-security)))
7572 (package (inherit zope-security)
7573 (propagated-inputs
7574 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7575 ,@(alist-delete
7576 "python-zope-testrunner"
7577 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7578
7579(define-public python-zope-component
7580 (package
7581 (name "python-zope-component")
7582 (version "4.2.2")
7583 (source
7584 (origin
7585 (method url-fetch)
7586 (uri (string-append "https://pypi.python.org/packages/source/z"
7587 "/zope.component/zope.component-" version ".tar.gz"))
7588 (sha256
7589 (base32
7590 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7591 (build-system python-build-system)
7592 (arguments
7593 ;; Skip tests due to circular dependency with python-zope-security.
7594 '(#:tests? #f))
7595 (native-inputs
7596 `(("python-zope-testing" ,python-zope-testing)))
7597 (propagated-inputs
7598 `(("python-zope-event" ,python-zope-event)
7599 ("python-zope-interface" ,python-zope-interface)
7600 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7601 ("python-zope-configuration" ,python-zope-configuration)))
7602 (home-page "https://github.com/zopefoundation/zope.component")
7603 (synopsis "Zope Component Architecture")
7604 (description "Zope.component represents the core of the Zope Component
7605Architecture. Together with the zope.interface package, it provides
7606facilities for defining, registering and looking up components.")
3f641af0 7607 (license license:zpl2.1)))
a6b61b27
LF
7608
7609(define-public python2-zope-component
7610 (package-with-python2 python-zope-component))
3859ac12 7611
1ae44b80 7612(define-public python-pythondialog
b5f218be 7613 (package
1ae44b80 7614 (name "python-pythondialog")
42c4b246 7615 (version "3.4.0")
b5f218be
LF
7616 (source
7617 (origin
7618 (method url-fetch)
1ae44b80 7619 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7620 (sha256
7621 (base32
1ae44b80 7622 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7623 (build-system python-build-system)
7624 (arguments
7625 `(#:phases
7626 (modify-phases %standard-phases
7627 (add-after 'unpack 'patch-path
7628 (lambda* (#:key inputs #:allow-other-keys)
7629 (let* ((dialog (assoc-ref inputs "dialog")))
7630 ;; Since this library really wants to grovel the search path, we
7631 ;; must hardcode dialog's store path into it.
7632 (substitute* "dialog.py"
7633 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7634 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7635 #t))))
b5f218be
LF
7636 #:tests? #f)) ; no test suite
7637 (propagated-inputs
7638 `(("dialog" ,dialog)))
7639 (home-page "http://pythondialog.sourceforge.net/")
7640 (synopsis "Python interface to the UNIX dialog utility")
7641 (description "A Python wrapper for the dialog utility. Its purpose is to
7642provide an easy to use, pythonic and comprehensive Python interface to dialog.
7643This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7644 (license license:lgpl2.1)
1ae44b80
LF
7645 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7646
7647(define-public python2-pythondialog
7648 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7649 (package
7650 (inherit base)
7651 (version (package-version python-pythondialog))
7652 (source (origin
7653 (method url-fetch)
7654 (uri (pypi-uri "python2-pythondialog" version))
7655 (sha256
7656 (base32
7657 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7658
3859ac12
LF
7659(define-public python-pyrfc3339
7660 (package
7661 (name "python-pyrfc3339")
d9aa097b 7662 (version "1.0")
3859ac12
LF
7663 (source
7664 (origin
7665 (method url-fetch)
d9aa097b 7666 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7667 (sha256
7668 (base32
d9aa097b 7669 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7670 (build-system python-build-system)
7671 (propagated-inputs
7672 `(("python-pytz" ,python-pytz)))
7673 (native-inputs
f3b98f4f 7674 `(("python-nose" ,python-nose)))
3859ac12
LF
7675 (home-page "https://github.com/kurtraschke/pyRFC3339")
7676 (synopsis "Python timestamp library")
7677 (description "Python library for generating and parsing RFC 3339-compliant
7678timestamps.")
7679 (license license:expat)))
7680
7681(define-public python2-pyrfc3339
7682 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7683
7684(define-public python-werkzeug
7685 (package
7686 (name "python-werkzeug")
0580e383 7687 (version "0.11.11")
5eea2005
LF
7688 (source
7689 (origin
7690 (method url-fetch)
4b47cbfa 7691 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7692 (sha256
7693 (base32
0580e383 7694 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7695 (build-system python-build-system)
7696 (native-inputs
7697 `(("python-pytest" ,python-pytest)))
7698 (home-page "http://werkzeug.pocoo.org/")
7699 (synopsis "Utilities for WSGI applications")
7700 (description "One of the most advanced WSGI utility modules. It includes a
7701powerful debugger, full-featured request and response objects, HTTP utilities to
7702handle entity tags, cache control headers, HTTP dates, cookie handling, file
7703uploads, a powerful URL routing system and a bunch of community-contributed
7704addon modules.")
3f641af0 7705 (license license:x11)))
5eea2005
LF
7706
7707(define-public python2-werkzeug
7708 (package-with-python2 python-werkzeug))
99fffa8a
LF
7709
7710(define-public python-configobj
7711 (package
7712 (name "python-configobj")
7713 (version "5.0.6")
7714 (source (origin
7715 (method url-fetch)
7716 (uri (string-append
7717 "https://pypi.python.org/packages/source/c/configobj/"
7718 "configobj-" version ".tar.gz"))
7719 (sha256
7720 (base32
7721 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7722 ;; Patch setup.py so it looks for python-setuptools, which is
7723 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7724 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 7725 (build-system python-build-system)
861f70c9 7726 (propagated-inputs
f3b98f4f 7727 `(("python-six" ,python-six)))
99fffa8a
LF
7728 (synopsis "Config file reading, writing and validation")
7729 (description "ConfigObj is a simple but powerful config file reader and
7730writer: an ini file round tripper. Its main feature is that it is very easy to
7731use, with a straightforward programmer’s interface and a simple syntax for
7732config files.")
7733 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7734 (license license:bsd-3)))
99fffa8a
LF
7735
7736(define-public python2-configobj
7737 (package-with-python2 python-configobj))
79e8a291
LF
7738
7739(define-public python-configargparse
7740 (package
7741 (name "python-configargparse")
7742 (version "0.10.0")
7743 (source (origin
7744 (method url-fetch)
7745 (uri (string-append
7746 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7747 "ConfigArgParse-" version ".tar.gz"))
7748 (sha256
7749 (base32
7750 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7751 (build-system python-build-system)
7752 (arguments
7753 ;; FIXME: Bug in test suite filed upstream:
7754 ;; https://github.com/bw2/ConfigArgParse/issues/32
7755 '(#:tests? #f))
7756 (synopsis "Replacement for argparse")
7757 (description "A drop-in replacement for argparse that allows options to also
7758be set via config files and/or environment variables.")
7759 (home-page "https://github.com/bw2/ConfigArgParse")
7760 (license license:expat)))
7761
7762(define-public python2-configargparse
7763 (package-with-python2 python-configargparse))
ab41f979
LF
7764
7765(define-public python-ndg-httpsclient
7766 (package
7767 (name "python-ndg-httpsclient")
7768 (version "0.4.0")
7769 (source (origin
7770 (method url-fetch)
7771 (uri (string-append
7772 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7773 "ndg_httpsclient-" version ".tar.gz"))
7774 (sha256
7775 (base32
7776 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7777 (build-system python-build-system)
a39cc016
LF
7778 (arguments
7779 '(;; The tests appear to require networking.
7780 #:tests? #f))
ab41f979
LF
7781 (propagated-inputs
7782 `(("python-pyopenssl" ,python-pyopenssl)))
7783 (synopsis "HTTPS support for Python's httplib and urllib2")
7784 (description "This is a HTTPS client implementation for httplib and urllib2
7785based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7786over the default provided with Python and importantly enables full verification
7787of the SSL peer.")
7788 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7789 (license license:bsd-3)))
ab41f979
LF
7790
7791;; python2-openssl requires special care, so package-with-python2 is
7792;; insufficient.
7793(define-public python2-ndg-httpsclient
7794 (package (inherit python-ndg-httpsclient)
7795 (name "python2-ndg-httpsclient")
7796 (arguments `(#:python ,python-2))
7797 (propagated-inputs
7798 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7799
7800(define-public python-contextlib2
7801 (package
7802 (name "python-contextlib2")
7803 (version "0.4.0")
7804 (source
7805 (origin
7806 (method url-fetch)
7807 (uri (pypi-uri "contextlib2" version))
7808 (sha256
7809 (base32
7810 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7811 (build-system python-build-system)
7812 (arguments
7813 `(#:phases
7814 (modify-phases %standard-phases
7815 (replace 'check
7816 (lambda _ (zero?
7817 (system*
b3546174 7818 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7819 (home-page "http://contextlib2.readthedocs.org/")
7820 (synopsis "Tools for decorators and context managers")
7821 (description "This module is primarily a backport of the Python
78223.2 contextlib to earlier Python versions. Like contextlib, it
7823provides utilities for common tasks involving decorators and context
7824managers. It also contains additional features that are not part of
7825the standard library.")
3f641af0 7826 (license license:psfl)))
03f964a5
CM
7827
7828(define-public python2-contextlib2
7829 (package-with-python2 python-contextlib2))
210bf497
DT
7830
7831(define-public python-texttable
7832 (package
7833 (name "python-texttable")
7834 (version "0.8.4")
7835 (source
7836 (origin
7837 (method url-fetch)
7838 (uri (pypi-uri "texttable" version))
7839 (sha256
7840 (base32
7841 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7842 (build-system python-build-system)
7843 (arguments '(#:tests? #f)) ; no tests
7844 (home-page "https://github.com/foutaise/texttable/")
7845 (synopsis "Python module for creating simple ASCII tables")
7846 (description "Texttable is a Python module for creating simple ASCII
7847tables.")
3f641af0 7848 (license license:lgpl2.1+)))
210bf497
DT
7849
7850(define-public python2-texttable
7851 (package-with-python2 python-texttable))
67c52bb3
DT
7852
7853(define-public python-websocket-client
7854 (package
7855 (name "python-websocket-client")
6b810897 7856 (version "0.37.0")
67c52bb3
DT
7857 (source
7858 (origin
7859 (method url-fetch)
6b810897 7860 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7861 (sha256
7862 (base32
6b810897 7863 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 7864 (build-system python-build-system)
a5333f7c
HG
7865 (propagated-inputs
7866 `(("python-six" ,python-six)))
67c52bb3
DT
7867 (home-page "https://github.com/liris/websocket-client")
7868 (synopsis "WebSocket client for Python")
7869 (description "The Websocket-client module provides the low level APIs for
7870WebSocket usage in Python programs.")
3f641af0 7871 (license license:lgpl2.1+)))
67c52bb3
DT
7872
7873(define-public python2-websocket-client
7874 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7875
7876(define-public python-atomicwrites
7877 (package
7878 (name "python-atomicwrites")
4e92d76a 7879 (version "1.1.0")
5c6eea2a
LF
7880 (source (origin
7881 (method url-fetch)
7882 (uri (pypi-uri "atomicwrites" version))
7883 (sha256
7884 (base32
4e92d76a 7885 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7886 (build-system python-build-system)
7887 (synopsis "Atomic file writes in Python")
7888 (description "Library for atomic file writes using platform dependent tools
8f65585b 7889for atomic file system operations.")
5c6eea2a 7890 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 7891 (license license:expat)))
9bb6d184
LF
7892
7893(define-public python2-atomicwrites
f210e944 7894 (package-with-python2 python-atomicwrites))
561bb3cb
LF
7895
7896(define-public python-requests-toolbelt
7897 (package
7898 (name "python-requests-toolbelt")
c02af1c8 7899 (version "0.6.2")
561bb3cb
LF
7900 (source (origin
7901 (method url-fetch)
c02af1c8
LF
7902 (uri (string-append
7903 "https://pypi.python.org/packages/"
7904 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7905 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7906 (sha256
7907 (base32
c02af1c8 7908 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 7909 (build-system python-build-system)
759aadd4
LF
7910 (native-inputs
7911 `(("python-betamax" ,python-betamax)
7912 ("python-mock" ,python-mock)
7913 ("python-pytest" ,python-pytest)))
561bb3cb
LF
7914 (propagated-inputs
7915 `(("python-requests" ,python-requests)))
7916 (synopsis "Extensions to python-requests")
7917 (description "This is a toolbelt of useful classes and functions to be used
7918with python-requests.")
7919 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7920 (license license:asl2.0)))
d1deb90b
LF
7921
7922(define-public python-click-threading
7923 (package
7924 (name "python-click-threading")
3d2e0dbc 7925 (version "0.2.0")
d1deb90b
LF
7926 (source (origin
7927 (method url-fetch)
3d2e0dbc
LF
7928 (uri (string-append
7929 "https://pypi.python.org/packages/"
7930 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7931 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7932 (sha256
7933 (base32
3d2e0dbc 7934 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7935 (build-system python-build-system)
7936 (propagated-inputs
7937 `(("python-click" ,python-click)))
7938 (synopsis "Utilities for multithreading in Click")
7939 (description "This package provides utilities for multithreading in Click
7940applications.")
7941 (home-page "https://github.com/click-contrib/click-threading")
7942 (license license:expat)))
7b17cab9
LF
7943
7944(define-public python-click-log
7945 (package
7946 (name "python-click-log")
a9da8fec 7947 (version "0.1.3")
7b17cab9
LF
7948 (source (origin
7949 (method url-fetch)
7950 (uri (pypi-uri "click-log" version))
7951 (sha256
7952 (base32
a9da8fec 7953 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7954 (build-system python-build-system)
7955 (propagated-inputs
7956 `(("python-click" ,python-click)))
7957 (synopsis "Logging for click applications")
7958 (description "This package provides a Python library for logging Click
7959applications.")
7960 (home-page "https://github.com/click-contrib/click-log")
7961 (license license:expat)))
7b3a4ee4
LF
7962
7963(define-public python-apipkg
7964 (package
7965 (name "python-apipkg")
7966 (version "1.4")
7967 (source (origin
7968 (method url-fetch)
7969 (uri (pypi-uri "apipkg" version))
7970 (sha256
7971 (base32
7972 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7973 (build-system python-build-system)
328bb95d 7974 (native-inputs
7b3a4ee4
LF
7975 `(("python-pytest" ,python-pytest)))
7976 (synopsis "Namespace control and lazy-import mechanism")
7977 (description "With apipkg you can control the exported namespace of a Python
7978package and greatly reduce the number of imports for your users. It is a small
7979pure Python module that works on virtually all Python versions.")
7980 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 7981 (license license:expat)))
e08739c3
CAW
7982
7983(define-public python2-apipkg
f210e944 7984 (package-with-python2 python-apipkg))
848964fe
LF
7985
7986(define-public python-execnet
7987 (package
7988 (name "python-execnet")
7989 (version "1.4.1")
7990 (source (origin
7991 (method url-fetch)
7992 (uri (pypi-uri "execnet" version))
7993 (sha256
7994 (base32
7995 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7996 (build-system python-build-system)
ca0eee9d
LF
7997 (arguments
7998 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7999 ;; The two test failures are caused by the lack of an `ssh` executable.
8000 ;; The test suite can be run with pytest after the 'install' phase.
8001 #:tests? #f))
848964fe 8002 (native-inputs
ca0eee9d
LF
8003 `(("python-pytest" ,python-pytest)
8004 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 8005 (propagated-inputs
848964fe
LF
8006 `(("python-apipkg" ,python-apipkg)))
8007 (synopsis "Rapid multi-Python deployment")
8008 (description "Execnet provides a share-nothing model with
8009channel-send/receive communication for distributing execution across many
8010Python interpreters across version, platform and network barriers. It has a
8011minimal and fast API targetting the following uses:
8012@enumerate
8013@item distribute tasks to (many) local or remote CPUs
8014@item write and deploy hybrid multi-process applications
8015@item write scripts to administer multiple environments
8016@end enumerate")
8017 (home-page "http://codespeak.net/execnet/")
f210e944 8018 (license license:expat)))
16c84f90
CAW
8019
8020(define-public python2-execnet
f210e944 8021 (package-with-python2 python-execnet))
6720dbb4
LF
8022
8023;;; The software provided by this package was integrated into pytest 2.8.
8024(define-public python-pytest-cache
8025 (package
8026 (name "python-pytest-cache")
8027 (version "1.0")
8028 (source (origin
8029 (method url-fetch)
8030 (uri (pypi-uri "pytest-cache" version))
8031 (sha256
8032 (base32
8033 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8034 (build-system python-build-system)
f22efa01 8035 (propagated-inputs
630d938f
EF
8036 `(("python-apipkg" ,python-apipkg)
8037 ("python-execnet" ,python-execnet)
8038 ("python-py" ,python-py)
8039 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8040 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8041 (description "The pytest-cache plugin provides tools to rerun failures from
8042the last py.test invocation.")
8043 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 8044 (license license:expat)))
0adc21c2
EF
8045
8046(define-public python2-pytest-cache
f210e944 8047 (package-with-python2 python-pytest-cache))
d7e729fe
LF
8048
8049(define-public python-pytest-localserver
8050 (package
8051 (name "python-pytest-localserver")
29f20168 8052 (version "0.3.5")
d7e729fe
LF
8053 (source (origin
8054 (method url-fetch)
29f20168 8055 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8056 (sha256
8057 (base32
29f20168 8058 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8059 (build-system python-build-system)
8060 (arguments
8061 `(#:phases (modify-phases %standard-phases
8062 (replace 'check
8063 (lambda _
8064 (zero? (system* "py.test" "--genscript=runtests.py"))
8065 (zero? (system* "py.test")))))))
8066 (native-inputs
d7e729fe
LF
8067 `(("python-pytest" ,python-pytest)
8068 ("python-requests" ,python-requests)
9ba40f05 8069 ("python-six" ,python-six)))
f22efa01 8070 (propagated-inputs
9ba40f05 8071 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8072 (synopsis "Py.test plugin to test server connections locally")
8073 (description "Pytest-localserver is a plugin for the pytest testing
8074framework which enables you to test server connections locally.")
8075 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8076 (license license:expat)))
28cecbb7
LF
8077
8078(define-public python-wsgi-intercept
8079 (package
8080 (name "python-wsgi-intercept")
909fbd2b 8081 (version "1.2.2")
28cecbb7
LF
8082 (source (origin
8083 (method url-fetch)
909fbd2b
LF
8084 (uri (string-append
8085 "https://pypi.python.org/packages/"
8086 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8087 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8088 (sha256
8089 (base32
909fbd2b 8090 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8091 (build-system python-build-system)
b9fc496f
HG
8092 (propagated-inputs
8093 `(("python-six" ,python-six)))
28cecbb7 8094 (native-inputs
9d813ec1 8095 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8096 ("python-httplib2" ,python-httplib2)
8097 ("python-requests" ,python-requests)
8757f050 8098 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8099 (synopsis "Puts a WSGI application in place of a real URI for testing")
8100 (description "Wsgi_intercept installs a WSGI application in place of a real
8101URI for testing. Testing a WSGI application normally involves starting a
8102server at a local host and port, then pointing your test code to that address.
8103Instead, this library lets you intercept calls to any specific host/port
8104combination and redirect them into a WSGI application importable by your test
8105program. Thus, you can avoid spawning multiple processes or threads to test
8106your Web app.")
8107 (home-page "https://github.com/cdent/wsgi-intercept")
8108 (license license:expat)))
89b8a551
LF
8109
8110(define-public python-pytest-xprocess
8111 (package
8112 (name "python-pytest-xprocess")
8113 (version "0.9.1")
8114 (source (origin
8115 (method url-fetch)
8116 (uri (pypi-uri "pytest-xprocess" version))
8117 (sha256
8118 (base32
8119 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8120 (build-system python-build-system)
8121 (propagated-inputs
8122 `(("python-pytest" ,python-pytest)
8123 ("python-pytest-cache" ,python-pytest-cache)
8124 ("python-psutil" ,python-psutil)))
8125 (synopsis "Pytest plugin to manage external processes across test runs")
8126 (description "Pytest-xprocess is an experimental py.test plugin for managing
8127processes across test runs.")
8128 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8129 (license license:expat)))
5c299bf0
LF
8130
8131(define-public python-icalendar
8132 (package
8133 (name "python-icalendar")
25291aca 8134 (version "3.11")
5c299bf0
LF
8135 (source (origin
8136 (method url-fetch)
8137 (uri (pypi-uri "icalendar" version))
8138 (sha256
8139 (base32
25291aca 8140 "01v2f3swd5s72x65cdihw83dx1z799b4i49a6ncg7vqmcm20wapd"))))
5c299bf0
LF
8141 (build-system python-build-system)
8142 (propagated-inputs
8143 `(("python-dateutil-2" ,python-dateutil-2)
8144 ("python-pytz" ,python-pytz)))
8145 (synopsis "Python library for parsing iCalendar files")
8146 (description "The icalendar package is a parser/generator of iCalendar
8147files for use with Python.")
8148 (home-page "https://github.com/collective/icalendar")
3f641af0 8149 (license license:bsd-2)))
6bbbb53e
LF
8150
8151(define-public python-sphinxcontrib-newsfeed
8152 (package
8153 (name "python-sphinxcontrib-newsfeed")
8154 (version "0.1.4")
8155 (source (origin
8156 (method url-fetch)
8157 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8158 (sha256
8159 (base32
8160 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8161 (build-system python-build-system)
8162 (propagated-inputs
251ed7f2 8163 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8164 (synopsis "News Feed extension for Sphinx")
8165 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8166Blog, News or Announcements section to a Sphinx website.")
8167 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8168 (license license:bsd-2)))
2216e15c
SB
8169
8170(define-public python-args
8171 (package
8172 (name "python-args")
8173 (version "0.1.0")
8174 (source (origin
8175 (method url-fetch)
8176 (uri (pypi-uri "args" version))
8177 (sha256
8178 (base32
8179 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8180 (build-system python-build-system)
2216e15c
SB
8181 (home-page "https://github.com/kennethreitz/args")
8182 (synopsis "Command-line argument parser")
8183 (description
8184 "This library provides a Python module to parse command-line arguments.")
3f641af0 8185 (license license:bsd-3)))
2216e15c
SB
8186
8187(define-public python2-args
8188 (package-with-python2 python-args))
c06a3de9
SB
8189
8190(define-public python-clint
8191 (package
8192 (name "python-clint")
8193 (version "0.5.1")
8194 (source (origin
8195 (method url-fetch)
8196 (uri (pypi-uri "clint" version))
8197 (sha256
8198 (base32
8199 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8200 (build-system python-build-system)
6145b604
MB
8201 (arguments
8202 '(#:phases
8203 (modify-phases %standard-phases
8204 (replace 'check
8205 (lambda _
8206 (zero? (system* "py.test" "-v")))))))
8207 (native-inputs
8208 `(("python-pytest" ,python-pytest)))
f22efa01 8209 (propagated-inputs
f3b98f4f 8210 `(("python-args" ,python-args)))
c06a3de9
SB
8211 (home-page "https://github.com/kennethreitz/clint")
8212 (synopsis "Command-line interface tools")
8213 (description
8214 "Clint is a Python module filled with a set of tools for developing
8215command-line applications, including tools for colored and indented
8216output, progress bar display, and pipes.")
3f641af0 8217 (license license:isc)))
c06a3de9
SB
8218
8219(define-public python2-clint
8220 (package-with-python2 python-clint))
4ecdeef8
SB
8221
8222(define-public python-astor
8223 (package
8224 (name "python-astor")
8225 (version "0.5")
8226 (source (origin
8227 (method url-fetch)
8228 (uri (pypi-uri "astor" version))
8229 (sha256
8230 (base32
8231 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8232 (build-system python-build-system)
4ecdeef8
SB
8233 (home-page "https://github.com/berkerpeksag/astor")
8234 (synopsis "Read and write Python ASTs")
8235 (description
8236 "Astor is designed to allow easy manipulation of Python source via the
8237Abstract Syntax Tree.")
3f641af0 8238 (license license:bsd-3)))
4ecdeef8
SB
8239
8240(define-public python2-astor
8241 (package-with-python2 python-astor))
e224b7d0
SB
8242
8243(define-public python-rply
8244 (package
8245 (name "python-rply")
8246 (version "0.7.4")
8247 (source (origin
8248 (method url-fetch)
8249 (uri (pypi-uri "rply" version))
8250 (sha256
8251 (base32
8252 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8253 (build-system python-build-system)
f22efa01 8254 (propagated-inputs
f3b98f4f 8255 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
8256 (home-page "https://github.com/alex/rply")
8257 (synopsis "Parser generator for Python")
8258 (description
8259 "This package provides a pure Python based parser generator, that also
8260works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8261with a new public API, and RPython support.")
3f641af0 8262 (license license:bsd-3)))
e224b7d0
SB
8263
8264(define-public python2-rply
8265 (package-with-python2 python-rply))
c3e919d7
SB
8266
8267(define-public python-hy
8268 (package
8269 (name "python-hy")
8270 (version "0.11.1")
8271 (source (origin
8272 (method url-fetch)
8273 (uri (pypi-uri "hy" version))
8274 (sha256
8275 (base32
8276 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8277 (build-system python-build-system)
15c37077
MB
8278 (arguments
8279 '(#:phases
8280 (modify-phases %standard-phases
8281 (replace 'check
8282 (lambda _
8283 ;; Tests require write access to HOME.
8284 (setenv "HOME" "/tmp")
8285 (zero? (system* "nosetests")))))))
8286 (native-inputs
8287 `(("python-coverage" ,python-coverage)
8288 ("python-nose" ,python-nose)))
f22efa01 8289 (propagated-inputs
c3e919d7
SB
8290 `(("python-astor" ,python-astor)
8291 ("python-clint" ,python-clint)
f3b98f4f 8292 ("python-rply" ,python-rply)))
c3e919d7
SB
8293 (home-page "http://hylang.org/")
8294 (synopsis "Lisp frontend to Python")
8295 (description
8296 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8297its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8298Python at your fingertips, in Lisp form.")
8299 (license license:expat)))
8300
8301(define-public python2-hy
8302 (package-with-python2 python-hy))
7a5b944e 8303
81f7f297
EF
8304(define-public python-rauth
8305 (package
8306 (name "python-rauth")
8307 (version "0.7.2")
8308 (source
8309 (origin
8310 (method url-fetch)
8311 (uri (pypi-uri "rauth" version))
8312 (sha256
8313 (base32
8314 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8315 (build-system python-build-system)
8316 (arguments
8317 `(#:test-target "check"))
f22efa01 8318 (propagated-inputs
81f7f297
EF
8319 `(("python-requests" ,python-requests)))
8320 (home-page "https://github.com/litl/rauth")
8321 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8322 (description
8323 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8324provides service wrappers for convenient connection initialization and
8325authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8326 (license license:expat)
8327 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8328
8329(define-public python2-rauth
0848d8d3
EF
8330 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8331 (package
8332 (inherit base)
00e10c6e 8333 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 8334 ,@(package-native-inputs base))))))
81f7f297 8335
1abe448d
EF
8336(define-public python2-functools32
8337 (package
8338 (name "python2-functools32")
8339 (version "3.2.3-2")
8340 (source
8341 (origin
8342 (method url-fetch)
8343 (uri (pypi-uri "functools32" version))
8344 (sha256
8345 (base32
8346 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8347 (build-system python-build-system)
8348 (arguments
8349 `(#:python ,python-2
8350 #:tests? #f)) ; no test target
1abe448d
EF
8351 (home-page "https://github.com/MiCHiLU/python-functools32")
8352 (synopsis
8353 "Backport of the functools module from Python 3.2.3")
8354 (description
8355 "This package is a backport of the @code{functools} module from Python
83563.2.3 for use with older versions of Python and PyPy.")
8357 (license license:expat)))
8358
877889f3 8359(define-public python2-futures
7a5b944e 8360 (package
877889f3 8361 (name "python2-futures")
7a5b944e
EF
8362 (version "3.0.3")
8363 (source
8364 (origin
8365 (method url-fetch)
8366 (uri (pypi-uri "futures" version))
8367 (sha256
8368 (base32
8369 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8370 (build-system python-build-system)
877889f3 8371 (arguments `(#:python ,python-2))
7a5b944e
EF
8372 (home-page "https://github.com/agronholm/pythonfutures")
8373 (synopsis
8374 "Backport of the concurrent.futures package from Python 3.2")
8375 (description
8376 "The concurrent.futures module provides a high-level interface for
8377asynchronously executing callables. This package backports the
8378concurrent.futures package from Python 3.2")
3f641af0 8379 (license license:bsd-3)))
7a5b944e 8380
5cb2fe44
EF
8381(define-public python-promise
8382 (package
8383 (name "python-promise")
8384 (version "0.4.2")
8385 (source
8386 (origin
8387 (method url-fetch)
8388 (uri (pypi-uri "promise" version))
8389 (sha256
8390 (base32
8391 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8392 (build-system python-build-system)
8393 ;; Tests wants python-futures, which is a python2 only program, and
8394 ;; can't be found by python-promise at test time.
8395 (arguments `(#:tests? #f))
8396 (home-page "https://github.com/syrusakbary/promise")
8397 (synopsis "Promises/A+ implementation for Python")
8398 (description
8399 "Promises/A+ implementation for Python")
8400 (properties `((python2-variant . ,(delay python2-promise))))
8401 (license license:expat)))
8402
8403(define-public python2-promise
8404 (let ((promise (package-with-python2
8405 (strip-python2-variant python-promise))))
8406 (package (inherit promise)
8407 (arguments (substitute-keyword-arguments (package-arguments promise)
8408 ((#:tests? _) #t)))
8409 (native-inputs
8410 `(("python2-futures" ,python2-futures)
8411 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
8412 ,@(package-native-inputs promise))))))
8413
c18f6368
EF
8414(define-public python-urllib3
8415 (package
8416 (name "python-urllib3")
6178274d 8417 (version "1.18.1")
c18f6368
EF
8418 (source
8419 (origin
8420 (method url-fetch)
8421 (uri (pypi-uri "urllib3" version))
8422 (sha256
8423 (base32
6178274d 8424 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8425 (build-system python-build-system)
8426 (arguments `(#:tests? #f))
8427 (native-inputs
f3b98f4f 8428 `(;; some packages for tests
c18f6368
EF
8429 ("python-nose" ,python-nose)
8430 ("python-mock" ,python-mock)
8431 ("python-tornado" ,python-tornado)))
8432 (propagated-inputs
8322749a 8433 `(;; extra packages for https security
c18f6368
EF
8434 ("python-certifi" ,python-certifi)
8435 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8436 ("python-pyasn1" ,python-pyasn1)
8437 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8438 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8439 (synopsis "HTTP library with thread-safe connection pooling")
8440 (description
8441 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8442can reuse the same socket connection for multiple requests, it can POST files,
8443supports url redirection and retries, and also gzip and deflate decoding.")
8444 (license license:expat)))
8445
8446(define-public python2-urllib3
8447 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8448
8449(define-public python-colorama
8450 (package
8451 (name "python-colorama")
8452 (version "0.3.3")
8453 (source
8454 (origin
8455 (method url-fetch)
8456 (uri (pypi-uri "colorama" version))
8457 (sha256
8458 (base32
8459 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8460 (build-system python-build-system)
2b2f2fc1
DT
8461 (synopsis "colored terminal text rendering for Python")
8462 (description "Colorama is a Python library for rendering colored terminal
8463text.")
8464 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8465 (license license:bsd-3)))
2b2f2fc1
DT
8466
8467(define-public python2-colorama
8468 (package-with-python2 python-colorama))
f5bcec6e
DT
8469
8470(define-public python-rsa
8471 (package
8472 (name "python-rsa")
ecd68c53 8473 (version "3.4.2")
f5bcec6e
DT
8474 (source
8475 (origin
8476 (method url-fetch)
8477 (uri (pypi-uri "rsa" version))
8478 (sha256
8479 (base32
ecd68c53 8480 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 8481 (build-system python-build-system)
f22efa01 8482 (propagated-inputs
f3b98f4f 8483 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
8484 (synopsis "Pure-Python RSA implementation")
8485 (description "Python-RSA is a pure-Python RSA implementation. It supports
8486encryption and decryption, signing and verifying signatures, and key
8487generation according to PKCS#1 version 1.5. It can be used as a Python
8488library as well as on the command line.")
8489 (home-page "http://stuvel.eu/rsa")
3f641af0 8490 (license license:asl2.0)))
f5bcec6e
DT
8491
8492(define-public python2-rsa
8493 (package-with-python2 python-rsa))
c0aacfa5
DT
8494
8495(define-public python-pluggy
8496 (package
8497 (name "python-pluggy")
8498 (version "0.3.1")
8499 (source
8500 (origin
8501 (method url-fetch)
8502 (uri (pypi-uri "pluggy" version))
8503 (sha256
8504 (base32
8505 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8506 (build-system python-build-system)
c0aacfa5
DT
8507 (synopsis "Plugin and hook calling mechanism for Python")
8508 (description "Pluggy is an extraction of the plugin manager as used by
8509Pytest but stripped of Pytest specific details.")
8510 (home-page "https://pypi.python.org/pypi/pluggy")
8511 (license license:expat)))
8512
8513(define-public python2-pluggy
8514 (package-with-python2 python-pluggy))
a4af21ca
DT
8515
8516(define-public python-tox
8517 (package
8518 (name "python-tox")
8519 (version "2.3.1")
8520 (source
8521 (origin
8522 (method url-fetch)
8523 (uri (pypi-uri "tox" version))
8524 (sha256
8525 (base32
8526 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8527 (build-system python-build-system)
8528 (arguments
7ba07edf
HG
8529 ;; FIXME: Tests require pytest-timeout, which itself requires
8530 ;; pytest>=2.8.0 for installation.
a4af21ca 8531 '(#:tests? #f))
482d9591
HG
8532 (propagated-inputs
8533 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 8534 ("python-py" ,python-py)
482d9591 8535 ("python-virtualenv" ,python-virtualenv)))
328bb95d 8536 (native-inputs
7ba07edf
HG
8537 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8538 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
8539 (home-page "http://tox.testrun.org/")
8540 (synopsis "Virtualenv-based automation of test activities")
8541 (description "Tox is a generic virtualenv management and test command line
8542tool. It can be used to check that a package installs correctly with
8543different Python versions and interpreters, or run tests in each type of
8544supported environment, or act as a frontend to continuous integration
8545servers.")
8546 (license license:expat)))
8547
8548(define-public python2-tox
8549 (package-with-python2 python-tox))
ba9da248
DT
8550
8551(define-public python-jmespath
8552 (package
8553 (name "python-jmespath")
8554 (version "0.9.0")
8555 (source
8556 (origin
8557 (method url-fetch)
8558 (uri (pypi-uri "jmespath" version))
8559 (sha256
8560 (base32
8561 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8562 (build-system python-build-system)
52a75a83
MB
8563 (native-inputs
8564 `(("python-nose" ,python-nose)))
ba9da248
DT
8565 (synopsis "JSON Matching Expressions")
8566 (description "JMESPath (pronounced “james path”) is a Python library that
8567allows one to declaratively specify how to extract elements from a JSON
8568document.")
8569 (home-page "https://github.com/jmespath/jmespath.py")
8570 (license license:expat)))
8571
8572(define-public python2-jmespath
8573 (package-with-python2 python-jmespath))
935fcd5c
DT
8574
8575(define-public python-botocore
8576 (package
8577 (name "python-botocore")
e09f952d 8578 (version "1.4.62")
935fcd5c
DT
8579 (source
8580 (origin
8581 (method url-fetch)
8582 (uri (pypi-uri "botocore" version))
8583 (sha256
8584 (base32
e09f952d 8585 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c 8586 (build-system python-build-system)
877fdac9
MB
8587 (arguments
8588 ;; FIXME: Many tests are failing.
8589 '(#:tests? #f))
482d9591 8590 (propagated-inputs
935fcd5c
DT
8591 `(("python-dateutil" ,python-dateutil-2)
8592 ("python-docutils" ,python-docutils)
482d9591 8593 ("python-jmespath" ,python-jmespath)))
8fa6890b 8594 (native-inputs
482d9591 8595 `(("python-mock" ,python-mock)
935fcd5c 8596 ("python-nose" ,python-nose)
482d9591 8597 ("behave" ,behave)
935fcd5c 8598 ("python-tox" ,python-tox)
482d9591 8599 ("python-wheel" ,python-wheel)))
935fcd5c
DT
8600 (home-page "https://github.com/boto/botocore")
8601 (synopsis "Low-level interface to AWS")
8602 (description "Botocore is a Python library that provides a low-level
8603interface to the Amazon Web Services (AWS) API.")
3f641af0 8604 (license license:asl2.0)))
935fcd5c
DT
8605
8606(define-public python2-botocore
8607 (package-with-python2 python-botocore))
f861b8b8
DT
8608
8609(define-public awscli
8610 (package
8611 (name "awscli")
d5ccf71e 8612 (version "1.11.5")
f861b8b8
DT
8613 (source
8614 (origin
8615 (method url-fetch)
d5ccf71e 8616 (uri (pypi-uri name version))
f861b8b8
DT
8617 (sha256
8618 (base32
d5ccf71e 8619 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8 8620 (build-system python-build-system)
482d9591 8621 (propagated-inputs
f861b8b8 8622 `(("python-colorama" ,python-colorama)
482d9591
HG
8623 ("python-botocore" ,python-botocore)
8624 ("python-s3transfer" ,python-s3transfer)
f861b8b8 8625 ("python-docutils" ,python-docutils)
482d9591 8626 ("python-rsa" ,python-rsa)))
d4649177 8627 (native-inputs
482d9591 8628 `(("python-mock" ,python-mock)
f861b8b8 8629 ("python-nose" ,python-nose)
f861b8b8
DT
8630 ("python-sphinx" ,python-sphinx)
8631 ("python-tox" ,python-tox)
482d9591 8632 ("python-wheel" ,python-wheel)))
f861b8b8
DT
8633 (home-page "http://aws.amazon.com/cli/")
8634 (synopsis "Command line client for AWS")
8635 (description "AWS CLI provides a unified command line interface to the
8636Amazon Web Services (AWS) API.")
3f641af0 8637 (license license:asl2.0)))
6a44697d
LF
8638
8639(define-public python-hypothesis
8640 (package
8641 (name "python-hypothesis")
bea6d94d 8642 (version "3.1.0")
6a44697d
LF
8643 (source (origin
8644 (method url-fetch)
8645 (uri (pypi-uri "hypothesis" version))
8646 (sha256
8647 (base32
bea6d94d 8648 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8649 (build-system python-build-system)
bd100c71 8650 (native-inputs
6a44697d
LF
8651 `(("python-flake8" ,python-flake8)
8652 ("python-pytest" ,python-pytest)))
8653 (synopsis "Library for property based testing")
8654 (description "Hypothesis is a library for testing your Python code against a
8655much larger range of examples than you would ever want to write by hand. It’s
8656based on the Haskell library, Quickcheck, and is designed to integrate
8657seamlessly into your existing Python unit testing work flow.")
8658 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8659 (license license:mpl2.0)
6f068e08 8660 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8661
8662(define-public python2-hypothesis
6f068e08
EF
8663 (let ((hypothesis (package-with-python2
8664 (strip-python2-variant python-hypothesis))))
8665 (package (inherit hypothesis)
8666 (native-inputs
bd100c71
MB
8667 `(("python2-enum34" ,python2-enum34)
8668 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
8669
8670(define-public python-pytest-subtesthack
8671 (package
8672 (name "python-pytest-subtesthack")
8673 (version "0.1.1")
8674 (source (origin
8675 (method url-fetch)
8676 (uri (pypi-uri "pytest-subtesthack" version))
8677 (sha256
8678 (base32
8679 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8680 (build-system python-build-system)
7517e73c
LF
8681 (propagated-inputs
8682 `(("python-pytest" ,python-pytest)))
8683 (synopsis "Set-up and tear-down fixtures for unit tests")
8684 (description "This plugin allows you to set up and tear down fixtures within
8685unit test functions that use @code{py.test}. This is useful for using
8686@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8687function multiple times, without setting up or tearing down fixture state as is
8688normally the case.")
8689 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8690 (license license:unlicense)))
7517e73c
LF
8691
8692(define-public python2-pytest-subtesthack
8693 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8694
8695(define-public python2-xdo
8696 (package
8697 (name "python2-xdo")
8698 (version "0.2")
8699 (source (origin
8700 (method url-fetch)
8701 (uri (string-append
8702 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8703 "python-xdo_" version ".orig.tar.gz"))
8704 (sha256
8705 (base32
8706 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8707 (build-system python-build-system)
8708 (arguments
8709 `(#:python ,python-2
8710 #:tests? #f)) ; no tests provided
8711 (inputs
8712 `(("xdotool" ,xdotool)
8713 ("libX11" ,libx11)))
8714 (home-page "https://tracker.debian.org/pkg/python-xdo")
8715 (synopsis "Python library for simulating X11 keyboard/mouse input")
8716 (description "Provides bindings to libxdo for manipulating X11 via simulated
8717input. (Note that this is mostly a legacy library; you may wish to look at
8718python-xdo for newer bindings.)")
3f641af0 8719 (license license:bsd-3)))
0bdc1671 8720
cb34dc6c
CAW
8721(define-public python-wtforms
8722 (package
8723 (name "python-wtforms")
8724 (version "2.1")
8725 (source
8726 (origin
8727 (method url-fetch)
8728 (uri (pypi-uri "WTForms" version ".zip"))
8729 (sha256
8730 (base32
8731 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8732 (build-system python-build-system)
13c4d874
EF
8733 (arguments
8734 '(#:phases
8735 (modify-phases %standard-phases
8736 (add-after 'unpack 'remove-django-test
8737 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8738 (lambda _
8739 (substitute*
8740 "tests/runtests.py"
8741 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8742 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8743 #t)))))
cb34dc6c
CAW
8744 (native-inputs
8745 `(("unzip" ,unzip)))
8746 (home-page "http://wtforms.simplecodes.com/")
8747 (synopsis
8748 "Form validation and rendering library for Python web development")
8749 (description
8750 "WTForms is a flexible forms validation and rendering library
8751for Python web development. It is very similar to the web form API
8752available in Django, but is a standalone package.")
f210e944 8753 (license license:bsd-3)))
cb34dc6c
CAW
8754
8755(define-public python2-wtforms
f210e944 8756 (package-with-python2 python-wtforms))
50aaec25
DT
8757
8758(define-public python-mako
8759 (package
8760 (name "python-mako")
8761 (version "1.0.3")
8762 (source
8763 (origin
8764 (method url-fetch)
8765 (uri (pypi-uri "Mako" version))
8766 (sha256
8767 (base32
8768 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8769 (build-system python-build-system)
482d9591
HG
8770 (propagated-inputs
8771 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 8772 (native-inputs
482d9591 8773 `(("python-mock" ,python-mock)
50aaec25
DT
8774 ("python-nose" ,python-nose)))
8775 (home-page "http://www.makotemplates.org/")
8776 (synopsis "Templating language for Python")
8777 (description "Mako is a templating language for Python that compiles
8778templates into Python modules.")
f210e944 8779 (license license:expat)))
50aaec25
DT
8780
8781(define-public python2-mako
f210e944 8782 (package-with-python2 python-mako))
ae00a41f
CAW
8783
8784(define-public python-waitress
8785 (package
8786 (name "python-waitress")
8787 (version "0.8.10")
8788 (source
8789 (origin
8790 (method url-fetch)
8791 (uri (pypi-uri "waitress" version))
8792 (sha256
8793 (base32
8794 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8795 (build-system python-build-system)
8796 (home-page "https://github.com/Pylons/waitress")
8797 (synopsis "Waitress WSGI server")
8798 (description "Waitress is meant to be a production-quality pure-Python WSGI
8799server with very acceptable performance.")
f210e944 8800 (license license:zpl2.1)))
ae00a41f
CAW
8801
8802(define-public python2-waitress
f210e944 8803 (package-with-python2 python-waitress))
778a284b
CAW
8804
8805(define-public python-wsgiproxy2
8806 (package
8807 (name "python-wsgiproxy2")
8808 (version "0.4.2")
8809 (source
8810 (origin
8811 (method url-fetch)
8812 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8813 (sha256
8814 (base32
8815 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8816 (build-system python-build-system)
e359b31a
LF
8817 (arguments
8818 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8819 ;; support Python 3:
8820 ;; https://github.com/benoitc/restkit/issues/140
8821 #:tests? #f))
778a284b
CAW
8822 (native-inputs
8823 `(("unzip" ,unzip)
8824 ("python-nose" ,python-nose)
8825 ("python-coverage" ,python-coverage)))
8826 (propagated-inputs
8827 `(("python-six" ,python-six)
8828 ("python-webob" ,python-webob)))
8829 (home-page
8830 "https://github.com/gawel/WSGIProxy2/")
8831 (synopsis "WSGI Proxy with various http client backends")
8832 (description "WSGI turns HTTP requests into WSGI function calls.
8833WSGIProxy turns WSGI function calls into HTTP requests.
8834It also includes code to sign requests and pass private data,
8835and to spawn subprocesses to handle requests.")
f210e944 8836 (license license:expat)))
778a284b
CAW
8837
8838(define-public python2-wsgiproxy2
f210e944 8839 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
8840
8841(define-public python-pastedeploy
8842 (package
8843 (name "python-pastedeploy")
8844 (version "1.5.2")
8845 (source
8846 (origin
8847 (method url-fetch)
8848 (uri (pypi-uri "PasteDeploy" version))
8849 (sha256
8850 (base32
8851 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8852 (build-system python-build-system)
8853 (native-inputs
8854 `(("python-nose" ,python-nose)))
bb7518b1
CAW
8855 (home-page "http://pythonpaste.org/deploy/")
8856 (synopsis
8857 "Load, configure, and compose WSGI applications and servers")
8858 (description
8859 "This tool provides code to load WSGI applications and servers from URIs;
8860these URIs can refer to Python Eggs for INI-style configuration files. Paste
8861Script provides commands to serve applications based on this configuration
8862file.")
8863 (license license:expat)))
8864
8865(define-public python2-pastedeploy
8866 (package-with-python2 python-pastedeploy))
1cf53652 8867
c4a7904c
CAW
8868(define-public python-paste
8869 (package
8870 (name "python-paste")
8871 (version "2.0.2")
8872 (source
8873 (origin
8874 (method url-fetch)
8875 (uri (pypi-uri "Paste" version))
8876 (sha256
8877 (base32
8878 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8879 (patches (search-patches "python-paste-remove-website-test.patch"
8880 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8881 (build-system python-build-system)
8882 (native-inputs
8883 `(("python-nose" ,python-nose)))
8884 (propagated-inputs
f3b98f4f 8885 `(("python-six" ,python-six)))
c4a7904c
CAW
8886 (arguments
8887 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8888 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8889 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8890 ;; still... things should be better by the next Paste release.)
8891 #:tests? #f))
8892 (home-page "http://pythonpaste.org")
8893 (synopsis
8894 "Python web development tools, focusing on WSGI")
8895 (description
8896 "Paste provides a variety of web development tools and middleware which
8897can be nested together to build web applications. Paste's design closely
8898follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8899 (license license:expat)
8900 (properties `((python2-variant . ,(delay python2-paste))))))
8901
8902(define-public python2-paste
8903 (let ((paste (package-with-python2
8904 (strip-python2-variant python-paste))))
8905 (package
8906 (inherit paste)
8907 (arguments
8908 ;; Tests are back for Python 2!
8909 `(#:tests? #t
8910 ,@(package-arguments paste))))))
8911
a8f20f63
CAW
8912(define-public python-pastescript
8913 (package
8914 (name "python-pastescript")
8915 (version "2.0.2")
8916 (source
8917 (origin
8918 (method url-fetch)
8919 (uri (pypi-uri "PasteScript" version))
8920 (sha256
8921 (base32
8922 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8923 (build-system python-build-system)
8924 (native-inputs
8925 `(("python-nose" ,python-nose)))
8926 (propagated-inputs
f3b98f4f 8927 `(("python-paste" ,python-paste)
a8f20f63
CAW
8928 ("python-pastedeploy" ,python-pastedeploy)))
8929 (home-page "http://pythonpaste.org/script/")
8930 (arguments
8931 '(;; Unfortunately, this requires the latest unittest2,
8932 ;; but that requires traceback2 which requires linecache2 which requires
8933 ;; unittest2. So we're skipping tests for now.
8934 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8935 ;; so in theory we could get around this situation somehow.)
8936 #:tests? #f))
8937 (synopsis
8938 "Pluggable command line tool for serving web applications and more")
8939 (description
8940 "PasteScript is a plugin-friendly command line tool which provides a
8941variety of features, from launching web applications to bootstrapping project
8942layouts.")
8943 (license license:expat)))
8944
8945(define-public python2-pastescript
8946 (package-with-python2 python-pastescript))
8947
1cf53652
CAW
8948(define-public python-pyquery
8949 (package
8950 (name "python-pyquery")
aab76e80 8951 (version "1.2.13")
1cf53652
CAW
8952 (source
8953 (origin
8954 (method url-fetch)
8955 (uri (pypi-uri "pyquery" version))
8956 (sha256
8957 (base32
aab76e80 8958 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652 8959 (build-system python-build-system)
2ddbfa8c
LF
8960 (native-inputs
8961 `(("python-webob" ,python-webob)
8962 ("python-webtest" ,python-webtest)))
1cf53652
CAW
8963 (propagated-inputs
8964 `(("python-lxml" ,python-lxml)
8965 ("python-cssselect" ,python-cssselect)))
8966 (home-page "https://github.com/gawel/pyquery")
8967 (synopsis "Make jQuery-like queries on xml documents")
8968 (description "pyquery allows you to make jQuery queries on xml documents.
8969The API is as much as possible the similar to jQuery. pyquery uses lxml for
8970fast xml and html manipulation.")
f210e944 8971 (license license:bsd-3)))
1cf53652
CAW
8972
8973(define-public python2-pyquery
f210e944 8974 (package-with-python2 python-pyquery))
aa6313d6
CAW
8975
8976(define-public python-webtest
8977 (package
8978 (name "python-webtest")
8979 (version "2.0.20")
8980 (source
8981 (origin
8982 (method url-fetch)
8983 (uri (pypi-uri "WebTest" version))
8984 (sha256
8985 (base32
8986 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8987 (build-system python-build-system)
8988 (arguments
8989 `(;; Unfortunately we have to disable tests!
8990 ;; This release of WebTest is pinned to python-nose < 1.3,
8991 ;; but older versions of python-nose are plagued with the following
8992 ;; bug(s), which rears its ugly head during test execution:
8993 ;; https://github.com/nose-devs/nose/issues/759
8994 ;; https://github.com/nose-devs/nose/pull/811
8995 #:tests? #f))
8996 ;; Commented out code is no good, but in this case, once tests
8997 ;; are ready to be enabled again, we should put the following
8998 ;; in place:
8999 ;; (native-inputs
9000 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9001 ;; ; but see above comment
9002 ;; ("python-coverage" ,python-coverage)
9003 ;; ("python-mock" ,python-mock)
9004 ;; ("python-pastedeploy" ,python-pastedeploy)
9005 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9006 ;; ("python-pyquery" ,python-pyquery)))
9007 (propagated-inputs
9008 `(("python-waitress" ,python-waitress)
9009 ("python-webob" ,python-webob)
9010 ("python-six" ,python-six)
9011 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9012 (home-page "http://webtest.pythonpaste.org/")
9013 (synopsis "Helper to test WSGI applications")
9014 (description "Webtest allows you to test your Python web applications
9015without starting an HTTP server. It supports anything that supports the
9016minimum of WSGI.")
f210e944 9017 (license license:expat)))
aa6313d6
CAW
9018
9019(define-public python2-webtest
f210e944 9020 (package-with-python2 python-webtest))
4cb122cd
CAW
9021
9022(define-public python-anyjson
9023 (package
9024 (name "python-anyjson")
9025 (version "0.3.3")
9026 (source
9027 (origin
9028 (method url-fetch)
9029 (uri (pypi-uri "anyjson" version))
9030 (sha256
9031 (base32
9032 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9033 (build-system python-build-system)
9034 (arguments
9035 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9036 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9037 ;; whatever) so this transformation needs to be done before the tests
9038 ;; can be run. Maybe we could add a build step to transform beforehand
9039 ;; but it could be annoying/difficult.
9040 ;; We can enable tests for the Python 2 version, though, and do below.
9041 #:tests? #f))
9042 (home-page "http://bitbucket.org/runeh/anyjson/")
9043 (synopsis
9044 "Wraps best available JSON implementation in a common interface")
9045 (description
9046 "Anyjson loads whichever is the fastest JSON module installed
9047and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 9048 (license license:bsd-3)
4cb122cd
CAW
9049 (properties `((python2-variant . ,(delay python2-anyjson))))))
9050
9051(define-public python2-anyjson
9052 (let ((anyjson (package-with-python2
9053 (strip-python2-variant python-anyjson))))
9054 (package
9055 (inherit anyjson)
9056 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9057 #:tests? #t
9058 ,@(package-arguments anyjson)))
00e10c6e 9059 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
9060
9061(define-public python-amqp
9062 (package
9063 (name "python-amqp")
9064 (version "1.4.9")
9065 (source
9066 (origin
9067 (method url-fetch)
9068 (uri (pypi-uri "amqp" version))
9069 (sha256
9070 (base32
9071 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9072 (build-system python-build-system)
9073 (native-inputs
9074 `(("python-nose" ,python-nose)
9075 ("python-mock" ,python-mock)))
9076 (home-page "http://github.com/celery/py-amqp")
9077 (synopsis
9078 "Low-level AMQP client for Python (fork of amqplib)")
9079 (description
9080 "This is a fork of amqplib which was originally written by Barry Pederson.
9081It is maintained by the Celery project, and used by kombu as a pure python
9082alternative when librabbitmq is not available.")
3f641af0 9083 (license license:lgpl2.1+)
8dfceab7
CAW
9084 (properties `((python2-variant . ,(delay python2-amqp))))))
9085
9086(define-public python2-amqp
9087 (let ((amqp (package-with-python2
9088 (strip-python2-variant python-amqp))))
9089 (package
9090 (inherit amqp)
9091 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9092 ;; unmaintained. Weirdly, does not do this on the python 3
9093 ;; version?
9094 #:tests? #f
00e10c6e 9095 ,@(package-arguments amqp))))))
7d387305
CAW
9096
9097(define-public python-kombu
9098 (package
9099 (name "python-kombu")
0cb59822 9100 (version "3.0.37")
7d387305
CAW
9101 (source
9102 (origin
9103 (method url-fetch)
9104 (uri (pypi-uri "kombu" version))
9105 (sha256
9106 (base32
0cb59822 9107 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9108 (build-system python-build-system)
9109 (native-inputs
9110 `(("python-mock" ,python-mock)
9111 ("python-nose" ,python-nose)))
9112 (propagated-inputs
9113 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9114 ("python-amqp" ,python-amqp)
9115 ("python-redis" ,python-redis)))
7d387305
CAW
9116 (home-page "http://kombu.readthedocs.org")
9117 (synopsis "Message passing library for Python")
9118 (description "The aim of Kombu is to make messaging in Python as easy as
9119possible by providing an idiomatic high-level interface for the AMQ protocol,
9120and also provide proven and tested solutions to common messaging problems.
9121AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9122message orientation, queuing, routing, reliability and security, for which the
9123RabbitMQ messaging server is the most popular implementation.")
3f641af0 9124 (license license:bsd-3)
7d387305
CAW
9125 (properties `((python2-variant . ,(delay python2-kombu))))))
9126
9127(define-public python2-kombu
9128 (let ((kombu (package-with-python2
9129 (strip-python2-variant python-kombu))))
9130 (package
9131 (inherit kombu)
328bb95d
HG
9132 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9133 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
9134
9135(define-public python-billiard
9136 (package
9137 (name "python-billiard")
a6bb9e44 9138 (version "3.3.0.23")
b6f0b9fb
CAW
9139 (source
9140 (origin
9141 (method url-fetch)
9142 (uri (pypi-uri "billiard" version))
9143 (sha256
9144 (base32
a6bb9e44 9145 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9146 (build-system python-build-system)
9147 (native-inputs
9148 `(("python-nose" ,python-nose)))
9149 (home-page "http://github.com/celery/billiard")
9150 (synopsis
9151 "Python multiprocessing fork with improvements and bugfixes")
9152 (description
9153 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9154multiprocessing package itself is a renamed and updated version of R Oudkerk's
9155pyprocessing package. This standalone variant is intended to be compatible with
9156Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9157 (license license:bsd-3)
b6f0b9fb
CAW
9158 (properties `((python2-variant . ,(delay python2-billiard))))))
9159
9160(define-public python2-billiard
9161 (let ((billiard (package-with-python2
9162 (strip-python2-variant python-billiard))))
9163 (package
9164 (inherit billiard)
00e10c6e 9165 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9166 ("python2-mock" ,python2-mock)
9167 ,@(package-native-inputs billiard))))))
22df6419
CAW
9168
9169(define-public python-celery
9170 (package
9171 (name "python-celery")
9ebe87fe 9172 (version "3.1.24")
22df6419
CAW
9173 (source
9174 (origin
9175 (method url-fetch)
9176 (uri (pypi-uri "celery" version))
9177 (sha256
9178 (base32
9ebe87fe 9179 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9180 (build-system python-build-system)
9ebe87fe
LF
9181 (arguments
9182 `(#:phases
9183 (modify-phases %standard-phases
9184 ;; These tests break with Python 3.5:
9185 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9186 (replace 'check
9187 (lambda _
9188 (zero?
9189 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9190 (native-inputs
9191 `(("python-nose" ,python-nose)))
f22efa01 9192 (propagated-inputs
22df6419
CAW
9193 `(("python-pytz" ,python-pytz)
9194 ("python-billiard" ,python-billiard)
9195 ("python-kombu" ,python-kombu)))
9196 (home-page "http://celeryproject.org")
9197 (synopsis "Distributed Task Queue")
9198 (description "Celery is an asynchronous task queue/job queue based on
9199distributed message passing. It is focused on real-time operation, but
9200supports scheduling as well. The execution units, called tasks, are executed
9201concurrently on a single or more worker servers using multiprocessing,
9202Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9203synchronously (wait until ready).")
3f641af0 9204 (license license:bsd-3)
22df6419
CAW
9205 (properties `((python2-variant . ,(delay python2-celery))))))
9206
9207(define-public python2-celery
9208 (let ((celery (package-with-python2
9209 (strip-python2-variant python-celery))))
9210 (package
9211 (inherit celery)
00e10c6e 9212 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
9213 ("python2-mock" ,python2-mock)
9214 ,@(package-native-inputs celery))))))
97e32948
CAW
9215
9216(define-public python-translitcodec
9217 (package
9218 (name "python-translitcodec")
9219 (version "0.4.0")
9220 (source
9221 (origin
9222 (method url-fetch)
9223 (uri (pypi-uri "translitcodec" version))
9224 (sha256
9225 (base32
9226 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9227 (build-system python-build-system)
9228 (arguments
9229 `(#:tests? #f)) ; no tests provided
9230 (home-page
9231 "https://github.com/claudep/translitcodec")
9232 (synopsis
9233 "Unicode to 8-bit charset transliteration codec")
9234 (description
9235 "This package contains codecs for transliterating ISO 10646 texts into
9236best-effort representations using smaller coded character sets (ASCII,
9237ISO 8859, etc.).")
f210e944 9238 (license license:expat)))
97e32948
CAW
9239
9240(define-public python2-translitcodec
f210e944 9241 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
9242
9243(define-public python-editor
9244 (package
9245 (name "python-editor")
9246 (version "0.5")
9247 (source
9248 (origin
9249 (method url-fetch)
9250 (uri (pypi-uri "python-editor" version))
9251 (sha256
9252 (base32
9253 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9254 (build-system python-build-system)
9255 (home-page
9256 "https://github.com/fmoo/python-editor")
9257 (synopsis
9258 "Programmatically open an editor, capture the result")
9259 (description
9260 "python-editor is a library that provides the editor module for
9261programmatically interfacing with your system's $EDITOR.")
f210e944 9262 (license license:asl2.0)))
0c3b90d4
CAW
9263
9264(define-public python2-editor
f210e944 9265 (package-with-python2 python-editor))
3276517c
LF
9266
9267(define-public python-sphinxcontrib-programoutput
9268 (package
9269 (name "python-sphinxcontrib-programoutput")
9270 (version "0.8")
9271 (source (origin
9272 (method url-fetch)
9273 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9274 (sha256
9275 (base32
9276 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9277 (build-system python-build-system)
9278 (propagated-inputs
a0a09859 9279 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
9280 (synopsis "Sphinx extension to include program output")
9281 (description "A Sphinx extension to literally insert the output of arbitrary
9282commands into documents, helping you to keep your command examples up to date.")
9283 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 9284 (license license:bsd-2)))
3276517c
LF
9285
9286(define-public python2-sphinxcontrib-programoutput
f210e944 9287 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
9288
9289(define-public python-sphinx-repoze-autointerface
9290 (package
9291 (name "python-sphinx-repoze-autointerface")
328ae341 9292 (version "0.8")
548d7165
LF
9293 (source (origin
9294 (method url-fetch)
9295 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9296 (sha256
9297 (base32
328ae341 9298 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9299 (build-system python-build-system)
9300 (propagated-inputs
47c7dc4a 9301 `(("python-sphinx" ,python-sphinx)
548d7165
LF
9302 ("python-zope-interface" ,python-zope-interface)))
9303 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9304 (description "This package defines an extension for the Sphinx documentation
9305system. The extension allows generation of API documentation by
9306introspection of @code{zope.interface} instances in code.")
9307 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9308 (license license:repoze)))
548d7165
LF
9309
9310(define-public python2-sphinx-repoze-autointerface
9311 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9312
9313(define-public python-psycopg2
9314 (package
9315 (name "python-psycopg2")
9316 (version "2.6.1")
9317 (source
9318 (origin
9319 (method url-fetch)
9320 (uri (pypi-uri "psycopg2" version))
9321 (sha256
9322 (base32
9323 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9324 (build-system python-build-system)
9325 (arguments
9326 ;; Tests would require a postgresql database "psycopg2_test"
9327 ;; and a running postgresql database management service.
9328 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9329 (inputs
9330 `(("postgresql" ,postgresql))) ; libpq
9331 (home-page "http://initd.org/psycopg/")
9332 (synopsis "Python PostgreSQL adapter")
9333 (description
9334 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 9335 (license license:lgpl3+)))
b31fbea5
DM
9336
9337(define-public python2-psycopg2
f210e944 9338 (package-with-python2 python-psycopg2))
eed1a61f
LF
9339
9340(define-public python-vobject
9341 (package
9342 (name "python-vobject")
9bed9b15 9343 (version "0.9.2")
eed1a61f
LF
9344 (source (origin
9345 (method url-fetch)
9346 (uri (pypi-uri "vobject" version))
9347 (sha256
9348 (base32
9bed9b15 9349 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 9350 (build-system python-build-system)
a9871b7b
LF
9351 (arguments
9352 '(;; The test suite relies on some non-portable Windows interfaces.
9353 #:tests? #f))
f22efa01 9354 (propagated-inputs
eed1a61f
LF
9355 `(("python-dateutil-2" ,python-dateutil-2)
9356 ("python-pyicu" ,python-pyicu)))
9357 (synopsis "Parse and generate vCard and vCalendar files")
9358 (description "Vobject is intended to be a full featured Python package for
9359parsing and generating vCard and vCalendar files. Currently, iCalendar files
9360are supported and well tested. vCard 3.0 files are supported, and all data
9361should be imported, but only a few components are understood in a sophisticated
9362way.")
9363 (home-page "http://eventable.github.io/vobject/")
f210e944 9364 (license license:asl2.0)))
eed1a61f
LF
9365
9366(define-public python2-vobject
f210e944 9367 (package-with-python2 python-vobject))
cedac813
LF
9368
9369(define-public python-munkres
9370 (package
9371 (name "python-munkres")
38e81a2c 9372 (version "1.0.8")
cedac813
LF
9373 (source (origin
9374 (method url-fetch)
9375 (uri (pypi-uri "munkres" version))
9376 (sha256
9377 (base32
38e81a2c 9378 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
9379 (build-system python-build-system)
9380 (arguments
9381 '(#:tests? #f)) ; no test suite
9382 (home-page "http://software.clapper.org/munkres/")
9383 (synopsis "Implementation of the Munkres algorithm")
9384 (description "The Munkres module provides an implementation of the Munkres
9385algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9386useful for solving the Assignment Problem.")
3f641af0 9387 (license license:bsd-3)))
cedac813
LF
9388
9389(define-public python2-munkres
9390 (package-with-python2 python-munkres))
f3b3d78f
LF
9391
9392(define-public python-flask
9393 (package
9394 (name "python-flask")
c6c80104 9395 (version "0.11.1")
f3b3d78f
LF
9396 (source (origin
9397 (method url-fetch)
9398 (uri (pypi-uri "Flask" version))
9399 (sha256
9400 (base32
c6c80104 9401 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
9402 (build-system python-build-system)
9403 (propagated-inputs
9404 `(("python-itsdangerous" ,python-itsdangerous)
9405 ("python-jinja2" ,python-jinja2)
8f35c030 9406 ("python-click" ,python-click)
f3b3d78f
LF
9407 ("python-werkzeug" ,python-werkzeug)))
9408 (home-page "https://github.com/mitsuhiko/flask/")
9409 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9410 (description "Flask is a micro web framework based on the Werkzeug toolkit
9411and Jinja2 template engine. It is called a micro framework because it does not
9412presume or force a developer to use a particular tool or library.")
f210e944 9413 (license license:bsd-3)))
f3b3d78f
LF
9414
9415(define-public python2-flask
f210e944 9416 (package-with-python2 python-flask))
603d665b
LF
9417
9418(define-public python-cookies
9419 (package
9420 (name "python-cookies")
9421 (version "2.2.1")
9422 (source (origin
9423 (method url-fetch)
9424 (uri (pypi-uri "cookies" version))
9425 (sha256
9426 (base32
9427 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9428 (build-system python-build-system)
9429 (arguments
9430 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9431 #:tests? #f))
9432 (native-inputs
9433 `(("python-pytest" ,python2-pytest)))
9434 (synopsis "HTTP cookie parser and renderer")
9435 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9436Python.")
9437 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 9438 (license license:expat)))
603d665b
LF
9439
9440(define-public python2-cookies
f210e944 9441 (package-with-python2 python-cookies))
0efde7d6
LF
9442
9443(define-public python-responses
9444 (package
9445 (name "python-responses")
9446 (version "0.5.1")
9447 (source (origin
9448 (method url-fetch)
9449 (uri (pypi-uri "responses" version))
9450 (sha256
9451 (base32
9452 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9453 (build-system python-build-system)
9454 (arguments
9455 `(;; Test suite is not distributed:
9456 ;; https://github.com/getsentry/responses/issues/38
9457 #:tests? #f))
9458 (native-inputs
d8ea5f2f 9459 `(("python-mock" ,python-mock)))
0efde7d6
LF
9460 (propagated-inputs
9461 `(("python-requests" ,python-requests)
d8ea5f2f 9462 ("python-cookies" ,python-cookies)
0efde7d6
LF
9463 ("python-six" ,python-six)))
9464 (home-page "https://github.com/getsentry/responses")
9465 (synopsis "Utility for mocking out the `requests` Python library")
9466 (description "A utility library for mocking out the `requests` Python
9467library.")
f210e944 9468 (license license:asl2.0)))
0efde7d6
LF
9469
9470(define-public python2-responses
f210e944 9471 (package-with-python2 python-responses))
76b94885 9472
b7afd018
RW
9473(define-public python-whoosh
9474 (package
9475 (name "python-whoosh")
9476 (version "2.7.4")
9477 (source
9478 (origin
9479 (method url-fetch)
9480 (uri (pypi-uri "Whoosh" version))
9481 (sha256
9482 (base32
9483 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9484 (build-system python-build-system)
9485 (native-inputs
f3b98f4f 9486 `(("python-pytest" ,python-pytest)))
b7afd018
RW
9487 (home-page "http://bitbucket.org/mchaput/whoosh")
9488 (synopsis "Full text indexing, search, and spell checking library")
9489 (description
9490 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9491checking library.")
9492 (license license:bsd-2)))
9493
9494(define-public python2-whoosh
9495 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9496 (package (inherit whoosh)
9497 (propagated-inputs
9498 `(("python2-backport-ssl-match-hostname"
9499 ,python2-backport-ssl-match-hostname)
9500 ,@(package-propagated-inputs whoosh))))))
9501
76b94885
LF
9502(define-public python-pathlib
9503 (package
9504 (name "python-pathlib")
9505 (version "1.0.1")
9506 (source (origin
9507 (method url-fetch)
9508 (uri (pypi-uri "pathlib" version))
9509 (sha256
9510 (base32
9511 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9512 (build-system python-build-system)
92a312dc
RW
9513 ;; The tests depend on the internal "test" module, which does not provide
9514 ;; a stable interface.
9515 (arguments `(#:tests? #f))
76b94885 9516 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9517 (synopsis "Object-oriented file system paths")
9518 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9519It offers the following advantages over using string objects:
9520
9521@enumerate
9522@item No more cumbersome use of os and os.path functions. Everything can
9523be done easily through operators, attribute accesses, and method calls.
9524@item Embodies the semantics of different path types. For example,
9525comparing Windows paths ignores casing.
9526@item Well-defined semantics, eliminating any inconsistencies or
9527ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9528@end enumerate
9529
9530Note: In Python 3.4, pathlib is now part of the standard library. For other
9531Python versions please consider python-pathlib2 instead, which tracks the
9532standard library module. This module (python-pathlib) isn't maintained
9533anymore.")
76b94885
LF
9534 (license license:expat)))
9535
9536(define-public python2-pathlib
9537 (package-with-python2 python-pathlib))
25a7db0a 9538
b7703c81
HG
9539(define-public python2-pathlib2
9540 (package
9541 (name "python2-pathlib2")
9542 (version "2.1.0")
9543 (source (origin
9544 (method url-fetch)
9545 (uri (pypi-uri "pathlib2" version))
9546 (sha256
9547 (base32
9548 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9549 (build-system python-build-system)
49a531f5
HG
9550 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9551 ;; version is 3.4 which already includes this package as part of the
9552 ;; standard library.
b7703c81
HG
9553 (arguments
9554 `(#:python ,python-2))
9555 (native-inputs
f3b98f4f 9556 `(("python2-six" ,python2-six)))
b7703c81
HG
9557 (home-page "http://pypi.python.org/pypi/pathlib2/")
9558 (synopsis "Object-oriented file system paths - backport of standard
9559pathlib module")
9560 (description "The goal of pathlib2 is to provide a backport of standard
9561pathlib module which tracks the standard library module, so all the newest
9562features of the standard pathlib can be used also on older Python versions.
9563
9564Pathlib offers a set of classes to handle file system paths. It offers the
9565following advantages over using string objects:
9566
9567@enumerate
9568@item No more cumbersome use of os and os.path functions. Everything can
9569be done easily through operators, attribute accesses, and method calls.
9570@item Embodies the semantics of different path types. For example,
9571comparing Windows paths ignores casing.
9572@item Well-defined semantics, eliminating any inconsistencies or
9573ambiguities (forward vs. backward slashes, etc.).
9574@end enumerate")
9575 (license license:expat)))
9576
25a7db0a
LF
9577(define-public python-jellyfish
9578 (package
9579 (name "python-jellyfish")
8c4964dd 9580 (version "0.5.6")
25a7db0a
LF
9581 (source (origin
9582 (method url-fetch)
9583 (uri (pypi-uri "jellyfish" version))
9584 (sha256
9585 (base32
8c4964dd 9586 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
9587 (build-system python-build-system)
9588 (native-inputs
9589 `(("python-pytest" ,python-pytest)))
9590 (home-page "https://github.com/jamesturk/jellyfish")
9591 (synopsis "Approximate and phonetic matching of strings")
9592 (description "Jellyfish uses a variety of string comparison and phonetic
9593encoding algorithms to do fuzzy string matching.")
3f641af0 9594 (license license:bsd-2)
25a7db0a
LF
9595 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9596
9597(define-public python2-jellyfish
9598 (let ((jellyfish (package-with-python2
9599 (strip-python2-variant python-jellyfish))))
9600 (package (inherit jellyfish)
00e10c6e 9601 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 9602 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9603
9604(define-public python2-unicodecsv
9605 (package
9606 (name "python2-unicodecsv")
9607 (version "0.14.1")
9608 (source (origin
9609 (method url-fetch)
9610 ;; The test suite is not included in the PyPi release.
9611 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9612 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9613 "archive/" version ".tar.gz"))
9614 (file-name (string-append name "-" version ".tar.gz"))
9615 (sha256
9616 (base32
9617 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9618 (build-system python-build-system)
9619 (arguments
9620 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9621 #:python ,python-2))
9622 (native-inputs
f3b98f4f 9623 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
9624 (home-page "https://github.com/jdunck/python-unicodecsv")
9625 (synopsis "Unicode CSV module for Python 2")
9626 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9627module, adding support for Unicode strings.")
3f641af0 9628 (license license:bsd-2)))
064503aa
LF
9629
9630(define-public python-rarfile
9631 (package
9632 (name "python-rarfile")
67824447 9633 (version "2.8")
064503aa
LF
9634 (source (origin
9635 (method url-fetch)
9636 (uri (pypi-uri "rarfile" version))
9637 (sha256
9638 (base32
67824447 9639 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
9640 (build-system python-build-system)
9641 (arguments
9642 '(#:phases
9643 (modify-phases %standard-phases
9644 (replace 'check
9645 ;; Many tests fail, but the installation proceeds.
9646 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9647 (native-inputs
9648 `(("which" ,which))) ; required for tests
9649 (propagated-inputs
9650 `(("libarchive" ,libarchive)))
9651 (home-page "https://github.com/markokr/rarfile")
9652 (synopsis "RAR archive reader for Python")
9653 (description "This is Python module for RAR archive reading. The interface
9654is made as zipfile like as possible.")
3f641af0 9655 (license license:isc)))
064503aa
LF
9656
9657(define-public python2-rarfile
9658 (package-with-python2 python-rarfile))
daeeea71
CM
9659
9660(define-public python-magic
9661 (package
9662 (name "python-magic")
9663 (version "0.4.3")
9664 (source
9665 (origin
9666 (method url-fetch)
9667 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9668 version ".tar.gz"))
9669 (sha256
9670 (base32
9671 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9672 (file-name (string-append name "-" version "-checkout"))))
9673 (build-system python-build-system)
9674 (arguments
9675 ;; The tests are unreliable, so don't run them. The tests fail
9676 ;; under Python3 because they were written for Python2 and
9677 ;; contain import statements that do not work in Python3. One of
9678 ;; the tests fails under Python2 because its assertions are
9679 ;; overly stringent; it relies on comparing output strings which
9680 ;; are brittle and can change depending on the version of
9681 ;; libmagic being used and the system on which the test is
9682 ;; running. In my case, under GuixSD 0.10.0, only one test
9683 ;; failed, and it seems to have failed only because the version
9684 ;; of libmagic that is packaged in Guix outputs a slightly
9685 ;; different (but not wrong) string than the one that the test
9686 ;; expected.
9687 '(#:tests? #f
9688 #:phases (modify-phases %standard-phases
9689 ;; Replace a specific method call with a hard-coded
9690 ;; path to the necessary libmagic.so file in the
9691 ;; store. If we don't do this, then the method call
9692 ;; will fail to find the libmagic.so file, which in
9693 ;; turn will cause any application using
9694 ;; python-magic to fail.
9695 (add-before 'build 'hard-code-path-to-libmagic
9696 (lambda* (#:key inputs #:allow-other-keys)
9697 (let ((file (assoc-ref inputs "file")))
9698 (substitute* "magic.py"
9699 (("ctypes.util.find_library\\('magic'\\)")
9700 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9701 #t)))
9702 (add-before 'install 'disable-egg-compression
9703 (lambda _
9704 (let ((port (open-file "setup.cfg" "a")))
9705 (display "\n[easy_install]\nzip_ok = 0\n"
9706 port)
9707 (close-port port)
9708 #t))))))
daeeea71
CM
9709 (inputs
9710 ;; python-magic needs to be able to find libmagic.so.
9711 `(("file" ,file)))
9712 (home-page "https://github.com/ahupp/python-magic")
9713 (synopsis "File type identification using libmagic")
9714 (description
9715 "This module uses ctypes to access the libmagic file type
9716identification library. It makes use of the local magic database and
9717supports both textual and MIME-type output. Note that this module and
9718the python-file module both provide a \"magic.py\" file; these two
9719modules, which are different and were developed separately, both serve
9720the same purpose: to provide Python bindings for libmagic.")
9721 (license license:expat)))
9722
9723(define-public python2-magic
9724 (package-with-python2 python-magic))
12af303f
CM
9725
9726(define-public python2-s3cmd
9727 (package
9728 (name "python2-s3cmd")
9729 (version "1.6.1")
9730 (source
9731 (origin
9732 (method url-fetch)
de67e922 9733 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9734 "s3cmd-" version ".tar.gz"))
9735 (sha256
9736 (base32
9737 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9738 (build-system python-build-system)
9739 (arguments
9740 ;; s3cmd is written for python2 only and contains no tests.
9741 `(#:python ,python-2
9742 #:tests? #f))
f22efa01 9743 (propagated-inputs
12af303f
CM
9744 `(("python2-dateutil" ,python2-dateutil)
9745 ;; The python-file package also provides a magic.py module.
9746 ;; This is an unfortunate state of affairs; however, s3cmd
9747 ;; fails to install if it cannot find specifically the
9748 ;; python-magic package. Thus we include it, instead of using
9749 ;; python-file. Ironically, s3cmd sometimes works better
9750 ;; without libmagic bindings at all:
9751 ;; https://github.com/s3tools/s3cmd/issues/198
9752 ("python2-magic" ,python2-magic)))
9753 (home-page "http://s3tools.org/s3cmd")
9754 (synopsis "Command line tool for S3-compatible storage services")
9755 (description
9756 "S3cmd is a command line tool for uploading, retrieving and managing data
9757in storage services that are compatible with the Amazon Simple Storage
9758Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9759GnuPG encryption, and more. It also supports management of Amazon's
9760CloudFront content delivery network.")
3f641af0 9761 (license license:gpl2+)))
4323a5f0
AE
9762
9763(define-public python-pkgconfig
9764 (package
9765 (name "python-pkgconfig")
9766 (version "1.1.0")
9767 (source
9768 (origin
9769 (method url-fetch)
9770 (uri (pypi-uri "pkgconfig" version))
9771 (sha256
9772 (base32
9773 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9774 (build-system python-build-system)
9775 (native-inputs
f3b98f4f 9776 `(("python-nose" ,python-nose)))
4323a5f0
AE
9777 (inputs
9778 `(("pkg-config" ,pkg-config)))
9779 (arguments
9780 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9781 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9782 #:tests? #f
4323a5f0
AE
9783 ;; Hard-code the path to pkg-config.
9784 #:phases
9785 (modify-phases %standard-phases
9786 (add-before
9787 'build 'patch
9788 (lambda _
9789 (substitute* "pkgconfig/pkgconfig.py"
9790 (("cmd = 'pkg-config")
9791 (string-append "cmd = '" (which "pkg-config"))))
9792 #t)))))
9793 (home-page "http://github.com/matze/pkgconfig")
9794 (synopsis "Python interface for pkg-config")
9795 (description "This module provides a Python interface to pkg-config. It
9796can be used to find all pkg-config packages, check if a package exists,
9797check if a package meets certain version requirements, query CFLAGS and
9798LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9799 (license license:expat)))
4323a5f0
AE
9800
9801(define-public python2-pkgconfig
9802 (package-with-python2 python-pkgconfig))
9803
2e697322
BW
9804(define-public python-bz2file
9805 (package
9806 (name "python-bz2file")
9807 (version "0.98")
9808 (source
9809 (origin
9810 (method url-fetch)
9811 (uri (pypi-uri "bz2file" version))
9812 (sha256
9813 (base32
9814 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9815 (build-system python-build-system)
9816 (arguments
124df723 9817 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9818 (home-page "https://github.com/nvawda/bz2file")
9819 (synopsis "Read and write bzip2-compressed files")
9820 (description
9821 "Bz2file is a Python library for reading and writing bzip2-compressed
9822files. It contains a drop-in replacement for the I/O interface in the
9823standard library's @code{bz2} module, including features from the latest
9824development version of CPython that are not available in older releases.")
3f641af0 9825 (license license:asl2.0)
2e697322
BW
9826 (properties `((python2-variant . ,(delay python2-bz2file))))))
9827
9828(define-public python2-bz2file
9829 (let ((base (package-with-python2
9830 (strip-python2-variant python-bz2file))))
9831 (package
9832 (inherit base)
124df723 9833 (arguments
752bb447
BW
9834 `(#:python ,python-2
9835 #:phases
124df723
BW
9836 (modify-phases %standard-phases
9837 ;; 'python setup.py test' does not work as of 0.98.
9838 ;; There is only the one test file, so we run it directly.
9839 (replace 'check
9840 (lambda _ (zero? (system* "python"
9841 "test_bz2file.py"))))))))))
2e697322 9842
da4ac1aa
BW
9843(define-public python-future
9844 (package
9845 (name "python-future")
9846 (version "0.15.2")
9847 (source
9848 (origin
9849 (method url-fetch)
9850 (uri (pypi-uri "future" version))
9851 (sha256
9852 (base32
9853 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9854 (build-system python-build-system)
9855 ;; Many tests connect to the network or are otherwise flawed.
9856 ;; https://github.com/PythonCharmers/python-future/issues/210
9857 (arguments
9858 `(#:tests? #f))
9859 (home-page "http://python-future.org")
9860 (synopsis "Single-source support for Python 3 and 2")
9861 (description
9862 "@code{python-future} is the missing compatibility layer between Python 2 and
9863Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9864to support both Python 2 and Python 3 with minimal overhead.")
f210e944 9865 (license license:expat)))
da4ac1aa
BW
9866
9867(define-public python2-future
f210e944 9868 (package-with-python2 python-future))
da4ac1aa 9869
8e451885
AE
9870(define-public python-cysignals
9871 (package
9872 (name "python-cysignals")
9873 (version "1.1.0")
9874 (source
9875 (origin
9876 (method url-fetch)
9877 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9878 (sha256
9879 (base32
9880 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9881 (build-system python-build-system)
9882 (native-inputs
9883 `(("python-cython" ,python-cython)
8e451885
AE
9884 ("python-sphinx" ,python-sphinx)))
9885 (inputs
9886 `(("pari-gp" ,pari-gp)))
9887 (arguments
9888 `(#:modules ((guix build python-build-system)
9889 ((guix build gnu-build-system) #:prefix gnu:)
9890 (guix build utils))
9891 ;; FIXME: Tests are executed after installation and currently fail
9892 ;; when not installing into standard locations; the author is working
9893 ;; on a fix.
9894 #:tests? #f
9895 #:phases
9896 (modify-phases %standard-phases
9897 (add-before
9898 'build 'configure
9899 (assoc-ref gnu:%standard-phases 'configure)))))
9900 (home-page
9901 "https://github.com/sagemath/cysignals")
9902 (synopsis
9903 "Handling of interrupts and signals for Cython")
9904 (description
9905 "The cysignals package provides mechanisms to handle interrupts (and
9906other signals and errors) in Cython code, using two related approaches,
9907for mixed Cython/Python code or external C libraries and pure Cython code,
9908respectively.")
3f641af0 9909 (license license:lgpl3+)))
8e451885
AE
9910
9911(define-public python2-cysignals
9912 (package-with-python2 python-cysignals))
9913
63bcec71
DM
9914(define-public python2-shedskin
9915 (package
9916 (name "python2-shedskin")
9917 (version "0.9.4")
9918 (source
9919 (origin
9920 (method url-fetch)
9921 (uri (string-append "https://github.com/shedskin/shedskin/"
9922 "releases/download/v" version
9923 "/shedskin-" version ".tgz"))
9924 (sha256
9925 (base32
9926 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9927 (build-system python-build-system)
9928 (arguments
9929 `(#:python ,python-2
9930 #:phases (modify-phases %standard-phases
9931 (add-after 'unpack 'fix-resulting-include-libs
9932 (lambda* (#:key inputs #:allow-other-keys)
9933 (let ((libgc (assoc-ref inputs "libgc"))
9934 (pcre (assoc-ref inputs "pcre")))
9935 (substitute* "shedskin/makefile.py"
9936 (("variable == 'CCFLAGS':[ ]*")
9937 (string-append "variable == 'CCFLAGS':\n"
9938 " line += ' -I " pcre "/include"
9939 " -I " libgc "/include'"))
9940 (("variable == 'LFLAGS':[ ]*")
9941 (string-append "variable == 'LFLAGS':\n"
9942 " line += ' -L" pcre "/lib"
9943 " -L " libgc "/lib'")))
9944 #t))))))
63bcec71
DM
9945 (inputs `(("pcre" ,pcre)
9946 ("libgc" ,libgc)))
9947 (home-page "https://shedskin.github.io/")
9948 (synopsis "Experimental Python-2 to C++ Compiler")
9949 (description (string-append "This is an experimental compiler for a subset of
9950Python. It generates C++ code and a Makefile."))
3f641af0 9951 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
9952
9953(define-public python2-rope
9954 (package
9955 (name "python2-rope")
9956 (version "0.10.3")
9957 (source
9958 (origin
9959 (method url-fetch)
9960 (uri (pypi-uri "rope" version))
9961 (sha256
9962 (base32
9963 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9964 (arguments
9965 ;; Rope is currently python-2 only.
9966 ;; https://github.com/python-rope/rope/issues/57
9967 `(#:python ,python-2))
9968 (build-system python-build-system)
9969 (native-inputs
f3b98f4f 9970 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
9971 (home-page "https://github.com/python-rope/rope")
9972 (synopsis "Refactoring library for Python")
9973 (description "Rope is a refactoring library for Python. It facilitates
9974the renaming, moving and extracting of attributes, functions, modules, fields
9975and parameters in Python 2 source code. These refactorings can also be applied
9976to occurences in strings and comments.")
3f641af0 9977 (license license:gpl2)))
6ba8ca17
9978
9979(define-public python-py3status
9980 (package
9981 (name "python-py3status")
d2262d70 9982 (version "3.1")
6ba8ca17
9983 (source
9984 (origin
9985 (method url-fetch)
9986 (uri (pypi-uri "py3status" version))
9987 (sha256
9988 (base32
d2262d70 9989 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 9990 (build-system python-build-system)
8653c1d5
MB
9991 (arguments
9992 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
6ba8ca17
9993 (home-page "https://github.com/ultrabug/py3status")
9994 (synopsis "Extensible i3status wrapper written in Python")
9995 (description "py3status is an i3status wrapper which extends i3status
9996functionality in a modular way, allowing you to extend your panel with your
9997own code, responding to click events and updating clock every second.")
3f641af0 9998 (license license:bsd-3)))
b8fdbca3
HG
9999
10000(define-public python-tblib
10001 (package
10002 (name "python-tblib")
10003 (version "1.3.0")
10004 (source (origin
10005 (method url-fetch)
10006 (uri (pypi-uri "tblib" version))
10007 (sha256 (base32
10008 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10009 (build-system python-build-system)
10010 (arguments
10011 `(#:phases
10012 (modify-phases %standard-phases
10013 (replace 'check
10014 (lambda _
10015 ;; Upstream runs tests after installation and the package itself
10016 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10017 ;; found.
10018 (setenv "PYTHONPATH"
10019 (string-append (getcwd) "/build/lib:"
10020 (getenv "PYTHONPATH")))
10021 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10022 (native-inputs
10023 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
10024 ("python-six" ,python-six)))
10025 (home-page "https://github.com/ionelmc/python-tblib")
10026 (synopsis "Traceback serialization library")
10027 (description
10028 "Traceback serialization allows you to:
10029
10030@enumerate
10031@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10032different processes. This allows better error handling when running code over
10033multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10034
10035@item Parse traceback strings and raise with the parsed tracebacks.
10036@end itemize")
3f641af0 10037 (license license:bsd-3)))
b8fdbca3
HG
10038
10039(define-public python2-tblib
10040 (package-with-python2 python-tblib))
1a024de4
HG
10041
10042(define-public python-sqlparse
10043 (package
10044 (name "python-sqlparse")
10045 (version "0.1.19")
10046 (source (origin
10047 (method url-fetch)
10048 (uri (pypi-uri "sqlparse" version))
10049 (sha256
10050 (base32
10051 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10052 (build-system python-build-system)
10053 (arguments
10054 `(#:phases
10055 (modify-phases %standard-phases
10056 (replace 'check
10057 (lambda* _
10058 ;; setup.py-integrated 2to3 only affects the build files, but
10059 ;; py.test is using the source files. So we need to convert them
10060 ;; manually.
10061 (when (zero? (system* "python3"))
10062 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10063 (zero? (system* "py.test")))))))
10064 (native-inputs
f3b98f4f 10065 `(("python-pytest" ,python-pytest)))
1a024de4
HG
10066 (home-page "https://github.com/andialbrecht/sqlparse")
10067 (synopsis "Non-validating SQL parser")
10068 (description "Sqlparse is a non-validating SQL parser for Python. It
10069provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10070 (license license:bsd-3)))
1a024de4
HG
10071
10072(define-public python2-sqlparse
10073 (package-with-python2 python-sqlparse))
68b9d242
SB
10074
10075(define-public python-greenlet
10076 (package
10077 (name "python-greenlet")
10078 (version "0.4.9")
10079 (source (origin
10080 (method url-fetch)
10081 (uri (pypi-uri "greenlet" version))
10082 (sha256
10083 (base32
10084 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
10085 (build-system python-build-system)
68b9d242
SB
10086 (home-page "https://greenlet.readthedocs.io/")
10087 (synopsis "Lightweight in-process concurrent programming")
10088 (description
10089 "Greenlet package is a spin-off of Stackless, a version of CPython
10090that supports micro-threads called \"tasklets\". Tasklets run
10091pseudo-concurrently (typically in a single or a few OS-level threads) and
10092are synchronized with data exchanges on \"channels\".")
3f641af0 10093 (license (list license:psfl license:expat))))
68b9d242
SB
10094
10095(define-public python2-greenlet
10096 (package-with-python2 python-greenlet))
d79a343b
SB
10097
10098(define-public python-gevent
10099 (package
10100 (name "python-gevent")
10101 (version "1.1.1")
10102 (source (origin
10103 (method url-fetch)
10104 (uri (pypi-uri "gevent" version))
10105 (sha256
10106 (base32
10107 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10108 (modules '((guix build utils)))
10109 (snippet
10110 '(begin
10111 ;; unbunding libev and c-ares
10112 (for-each delete-file-recursively '("libev" "c-ares"))
10113 ;; fixing testsuite
10114 (call-with-output-file "greentest/__init__.py" noop)
10115 (substitute* "greentest/testrunner.py"
10116 (("import util") "from . import util")
10117 (("from util import log") "from .util import log"))))))
10118 (build-system python-build-system)
10119 (propagated-inputs
10120 `(("python-greenlet" ,python-greenlet)))
10121 (native-inputs
f3b98f4f 10122 `(("python-six" ,python-six)))
d79a343b
SB
10123 (inputs
10124 `(("c-ares" ,c-ares)
10125 ("libev" ,libev)))
10126 (home-page "http://www.gevent.org/")
10127 (synopsis "Coroutine-based network library")
10128 (description
10129 "gevent is a coroutine-based Python networking library that uses greenlet
10130to provide a high-level synchronous API on top of the libev event loop.")
10131 (license license:expat)))
10132
10133(define-public python2-gevent
10134 (package-with-python2 python-gevent))
da3aeeb6
SB
10135
10136(define-public python-twisted
10137 (package
10138 (name "python-twisted")
10139 (version "16.2.0")
10140 (source (origin
10141 (method url-fetch)
8ea8e8d3 10142 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
10143 (sha256
10144 (base32
10145 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10146 (build-system python-build-system)
a960e73f
MB
10147 (arguments
10148 '(#:tests? #f)) ; FIXME: Some tests are failing.
10149 ;; #:phases
10150 ;; (modify-phases %standard-phases
10151 ;; (replace 'check
10152 ;; (lambda _
10153 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170
SB
10154 (propagated-inputs
10155 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
10156 (home-page "https://twistedmatrix.com/")
10157 (synopsis "Asynchronous networking framework written in Python")
10158 (description
10159 "Twisted is an extensible framework for Python programming, with special
10160focus on event-based network programming and multiprotocol integration.")
10161 (license license:expat)))
10162
10163(define-public python2-twisted
10164 (package-with-python2 python-twisted))
d0b6fed6 10165
4d3fa5a4
EF
10166(define-public python-pika
10167 (package
10168 (name "python-pika")
10169 (version "0.10.0")
10170 (source
10171 (origin
10172 (method url-fetch)
10173 (uri (pypi-uri "pika" version))
10174 (sha256
10175 (base32
10176 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10177 (build-system python-build-system)
10178 (native-inputs
269d9172
LF
10179 `(("python-pyev" ,python-pyev)
10180 ("python-tornado" ,python-tornado)
10181 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
10182 (home-page "https://pika.readthedocs.org")
10183 (synopsis "Pure Python AMQP Client Library")
10184 (description
10185 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10186Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10187network support library.")
10188 (license license:bsd-3)))
10189
10190(define-public python2-pika
10191 (package-with-python2 python-pika))
10192
d0b6fed6
DM
10193(define-public python-ply
10194 (package
10195 (name "python-ply")
10196 (version "3.8")
10197 (source
10198 (origin
10199 (method url-fetch)
10200 (uri (string-append
10201 "https://pypi.python.org/packages/"
10202 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
10203 "/ply-" version ".tar.gz"))
10204 (sha256
10205 (base32
10206 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
10207 (build-system python-build-system)
10208 (home-page "http://www.dabeaz.com/ply/")
10209 (synopsis "Python Lex & Yacc")
10210 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10211It uses LR parsing and does extensive error checking.")
f210e944 10212 (license license:bsd-3)))
d0b6fed6
DM
10213
10214(define-public python2-ply
f210e944 10215 (package-with-python2 python-ply))
d951bd54
SB
10216
10217(define-public python-tabulate
10218 (package
10219 (name "python-tabulate")
10220 (version "0.7.5")
10221 (source (origin
10222 (method url-fetch)
10223 (uri (pypi-uri "tabulate" version))
10224 (sha256
10225 (base32
10226 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10227 ;; Fix tests
10228 (modules '((guix build utils)))
10229 (snippet '(substitute* '("test/test_cli.py"
10230 "test/test_input.py"
10231 "test/test_output.py"
10232 "test/test_regression.py")
10233 (("from common") "from nose.tools")))))
10234 (build-system python-build-system)
10235 (native-inputs
f3b98f4f 10236 `(;; For testing
d951bd54
SB
10237 ("python-nose" ,python-nose)))
10238 (home-page "https://bitbucket.org/astanin/python-tabulate")
10239 (synopsis "Pretty-print tabular data")
10240 (description
10241 "Tabulate is a library and command-line utility to pretty-print tabular
10242data in Python.")
10243 (license license:expat)))
10244
10245(define-public python2-tabulate
10246 (package-with-python2 python-tabulate))
1c4c8a33
SB
10247
10248(define-public python-kazoo
10249 (package
10250 (name "python-kazoo")
10251 (version "2.2.1")
10252 (source
10253 (origin
10254 (method url-fetch)
10255 (uri (pypi-uri "kazoo" version))
10256 (sha256
10257 (base32
10258 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10259 (build-system python-build-system)
10260 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
10261 (propagated-inputs
10262 `(("python-six" ,python-six)))
1c4c8a33
SB
10263 (home-page "https://kazoo.readthedocs.org")
10264 (synopsis "High-level Zookeeper client library")
10265 (description
10266 "Kazoo is a Python client library for the Apache Zookeeper distributed
10267application service. It is designed to be easy to use and to avoid common
10268programming errors.")
3f641af0 10269 (license license:asl2.0)))
1c4c8a33
SB
10270
10271(define-public python2-kazoo
10272 (package-with-python2 python-kazoo))
45dda35e
SB
10273
10274(define-public python-pykafka
10275 (package
10276 (name "python-pykafka")
10277 (version "2.4.0")
10278 (source (origin
10279 (method url-fetch)
c6bccf71
EF
10280 (uri (string-append
10281 "https://pypi.python.org/packages/8b/3e/"
10282 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10283 "pykafka-" version ".tar.gz"))
45dda35e
SB
10284 (sha256
10285 (base32
10286 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10287 (build-system python-build-system)
10288 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 10289 (propagated-inputs
45dda35e
SB
10290 `(("python-gevent" ,python-gevent)
10291 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10292 ("python-tabulate" ,python-tabulate)))
10293 (inputs
10294 `(("librdkafka" ,librdkafka)))
10295 (home-page "https://pykafka.readthedocs.io/")
10296 (synopsis "Apache Kafka client for Python")
10297 (description
10298 "PyKafka is a client for the Apache Kafka distributed messaging system.
10299It includes Python implementations of Kafka producers and consumers, which
10300are optionally backed by a C extension built on librdkafka.")
3f641af0 10301 (license license:asl2.0)))
45dda35e
SB
10302
10303(define-public python2-pykafka
10304 (package-with-python2 python-pykafka))
a44fd439
DM
10305
10306(define-public python-wcwidth
10307 (package
10308 (name "python-wcwidth")
10309 (version "0.1.6")
10310 (source
10311 (origin
10312 (method url-fetch)
10313 (uri (string-append
10314 "https://pypi.python.org/packages/"
10315 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10316 "wcwidth-" version ".tar.gz"))
10317 (sha256
10318 (base32
10319 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10320 (build-system python-build-system)
10321 (home-page "https://github.com/jquast/wcwidth")
66e07664 10322 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10323 (description "Wcwidth measures the number of terminal column cells of
10324wide-character codes. It is useful for those implementing a terminal emulator,
10325or programs that carefully produce output to be interpreted by one. It is a
10326Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10327specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 10328 (license license:expat)))
a44fd439
DM
10329
10330(define-public python2-wcwidth
f210e944 10331 (package-with-python2 python-wcwidth))
0de78c95
DP
10332
10333(define-public python2-jsonrpclib
10334 (package
10335 (name "python2-jsonrpclib")
10336 (version "0.1.7")
10337 (source (origin
10338 (method url-fetch)
10339 (uri (string-append
10340 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10341 "jsonrpclib-" version ".tar.gz"))
10342 (sha256
10343 (base32
10344 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10345 (build-system python-build-system)
0de78c95
DP
10346 (arguments
10347 `(#:tests? #f
10348 #:python ,python-2))
10349 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10350 (synopsis "Implementation of JSON-RPC specification for Python")
10351 (description
10352 "This library is an implementation of the JSON-RPC specification.
10353It supports both the original 1.0 specification, as well as the
10354new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10355etc.")
3f641af0 10356 (license license:asl2.0)))
9250b0f3
SB
10357
10358(define-public python-chai
10359 (package
10360 (name "python-chai")
10361 (version "1.1.1")
10362 (source (origin
10363 (method url-fetch)
10364 (uri (pypi-uri "chai" version))
10365 (sha256
10366 (base32
10367 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10368 (build-system python-build-system)
9250b0f3
SB
10369 (home-page "https://github.com/agoragames/chai")
10370 (synopsis "Mocking framework for Python")
10371 (description
10372 "Chai provides an api for mocking, stubbing and spying your python
10373objects, patterned after the Mocha library for Ruby.")
3f641af0 10374 (license license:bsd-3)))
9250b0f3
SB
10375
10376(define-public python2-chai
10377 (package-with-python2 python-chai))
10378
ae43baa8
SB
10379(define-public python-arrow
10380 (package
10381 (name "python-arrow")
10382 (version "0.8.0")
10383 (source (origin
10384 (method url-fetch)
10385 (uri (pypi-uri "arrow" version))
10386 (sha256
10387 (base32
10388 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10389 (build-system python-build-system)
10390 (native-inputs
f3b98f4f 10391 `(;; For testing
ae43baa8
SB
10392 ("python-chai" ,python-chai)
10393 ("python-simplejson" ,python-simplejson)))
36aed736
SB
10394 (propagated-inputs
10395 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
10396 (home-page "https://github.com/crsmithdev/arrow/")
10397 (synopsis "Dates and times for Python")
10398 (description
10399 "Arrow is a Python library to creating, manipulating, formatting and
10400converting dates, times, and timestamps. It implements and updates the
10401datetime type.")
3f641af0 10402 (license license:asl2.0)))
ae43baa8
SB
10403
10404(define-public python2-arrow
10405 (package-with-python2 python-arrow))
10406
1f2b62a4
SB
10407(define-public python-inflection
10408 (package
10409 (name "python-inflection")
10410 (version "0.3.1")
10411 (source
10412 (origin (method url-fetch)
10413 (uri (pypi-uri "inflection" version))
10414 (sha256
10415 (base32
10416 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10417 (build-system python-build-system)
e9127525
MB
10418 (native-inputs
10419 `(("python-pytest" ,python-pytest)))
1f2b62a4
SB
10420 (home-page "http://github.com/jpvanhal/inflection")
10421 (synopsis "Python string transformation library")
10422 (description
10423 "Inflection is a string transformation library. It singularizes
10424and pluralizes English words, and transforms strings from CamelCase to
10425underscored string.")
10426 (license license:expat)))
10427
10428(define-public python2-inflection
10429 (package-with-python2 python-inflection))
10430
18995566
SB
10431(define-public python-pylev
10432 (package
10433 (name "python-pylev")
10434 (version "1.3.0")
10435 (source (origin
10436 (method url-fetch)
10437 (uri (pypi-uri "pylev" version))
10438 (sha256
10439 (base32
10440 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10441 (build-system python-build-system)
18995566
SB
10442 (home-page "http://github.com/toastdriven/pylev")
10443 (synopsis "Levenshtein distance implementation in Python")
10444 (description "Pure Python Levenshtein implementation, based off the
10445Wikipedia code samples at
10446@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10447 (license license:bsd-3)))
18995566
SB
10448
10449(define-public python2-pylev
10450 (package-with-python2 python-pylev))
10451
f5deff7a
SB
10452(define-public python-cleo
10453 (package
10454 (name "python-cleo")
10455 (version "0.4.1")
10456 (source (origin
10457 (method url-fetch)
10458 (uri (pypi-uri "cleo" version))
10459 (sha256
10460 (base32
10461 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10462 (build-system python-build-system)
10463 (native-inputs
f3b98f4f 10464 `(;; For testing
f5deff7a
SB
10465 ("python-mock" ,python-mock)
10466 ("python-pytest" ,python-pytest)))
9403150a
SB
10467 (propagated-inputs
10468 `(("python-psutil" ,python-psutil)
10469 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10470 (home-page "https://github.com/sdispater/cleo")
10471 (synopsis "Command-line arguments library for Python")
10472 (description
10473 "Cleo allows you to create command-line commands with signature in
10474docstring and colored output.")
10475 (license license:expat)))
10476
10477(define-public python2-cleo
10478 (package-with-python2 python-cleo))
10479
77cadb43
SB
10480(define-public python-lazy-object-proxy
10481 (package
10482 (name "python-lazy-object-proxy")
10483 (version "1.2.2")
10484 (source (origin
10485 (method url-fetch)
10486 (uri (pypi-uri "lazy-object-proxy" version))
10487 (sha256
10488 (base32
10489 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10490 (build-system python-build-system)
77cadb43
SB
10491 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10492 (synopsis "Lazy object proxy for python")
10493 (description
10494 "Lazy object proxy is an object that wraps a callable but defers the call
10495until the object is actually required, and caches the result of said call.")
3f641af0 10496 (license license:bsd-2)))
77cadb43
SB
10497
10498(define-public python2-lazy-object-proxy
10499 (package-with-python2 python-lazy-object-proxy))
10500
5477e05f
SB
10501(define-public python-dnspython
10502 (package
10503 (name "python-dnspython")
6c514128 10504 (version "1.15.0")
5477e05f
SB
10505 (source (origin
10506 (method url-fetch)
10507 (uri (string-append "http://www.dnspython.org/kits/"
10508 version "/dnspython-" version ".tar.gz"))
10509 (sha256
10510 (base32
6c514128 10511 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10512 (build-system python-build-system)
10513 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
10514 (home-page "http://www.dnspython.org")
10515 (synopsis "DNS toolkit for Python")
10516 (description
10517 "dnspython is a DNS toolkit for Python. It supports almost all record
10518types. It can be used for queries, zone transfers, and dynamic updates.
10519It supports TSIG authenticated messages and EDNS0.")
10520 (license license:expat)))
10521
10522(define-public python2-dnspython
10523 (package-with-python2 python-dnspython))
10524
22711e25
SB
10525(define-public python-email-validator
10526 (package
10527 (name "python-email-validator")
10528 (version "1.0.1")
10529 (source
10530 (origin (method url-fetch)
10531 (uri (pypi-uri "email_validator" version))
10532 (sha256
10533 (base32
10534 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10535 (build-system python-build-system)
10536 (arguments
10537 '(#:phases
10538 (modify-phases %standard-phases
10539 (add-before 'build 'use-dnspython
10540 (lambda _
10541 (substitute* "setup.py"
10542 (("dnspython3") "dnspython"))
10543 #t)))))
d42560bd 10544 (propagated-inputs
22711e25 10545 `(("python-dnspython" ,python-dnspython)
d42560bd 10546 ("python-idna" ,python-idna)))
22711e25
SB
10547 (home-page "https://github.com/JoshData/python-email-validator")
10548 (synopsis "Email address validation library for Python")
10549 (description
10550 "This library validates email address syntax and deliverability.")
3f641af0 10551 (license license:cc0)))
22711e25
SB
10552
10553(define-public python2-email-validator
10554 (package-with-python2 python-email-validator))
10555
8987d91e
SB
10556(define-public python-ukpostcodeparser
10557 (package
10558 (name "python-ukpostcodeparser")
10559 (version "1.0.3")
10560 (source (origin
10561 (method url-fetch)
10562 (uri (pypi-uri "UkPostcodeParser" version))
10563 (sha256
10564 (base32
10565 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10566 (build-system python-build-system)
8987d91e
SB
10567 (home-page "https://github.com/hamstah/ukpostcodeparser")
10568 (synopsis "UK Postcode parser for Python")
10569 (description
10570 "This library provides the @code{parse_uk_postcode} function for
10571parsing UK postcodes.")
10572 (license license:expat)))
10573
10574(define-public python2-ukpostcodeparser
10575 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10576
10577(define-public python-fake-factory
10578 (package
10579 (name "python-fake-factory")
7adc698f 10580 (version "0.7.2")
ea92ae01
SB
10581 (source (origin
10582 (method url-fetch)
10583 (uri (pypi-uri "fake-factory" version))
10584 (sha256
10585 (base32
7adc698f 10586 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10587 (build-system python-build-system)
b7f3ea95
MB
10588 (arguments
10589 '(#:phases
10590 (modify-phases %standard-phases
10591 (replace 'check
10592 (lambda _
10593 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
ea92ae01 10594 (native-inputs
f3b98f4f 10595 `(;; For testing
ea92ae01
SB
10596 ("python-email-validator" ,python-email-validator)
10597 ("python-mock" ,python-mock)
10598 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
10599 (propagated-inputs
10600 `(("python-dateutil" ,python-dateutil-2)
10601 ("python-six" ,python-six)))
7adc698f 10602 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10603 (synopsis "Python package that generates fake data")
10604 (description
10605 "Faker is a Python package that generates fake data such as names,
10606addresses, and phone numbers.")
10607 (license license:expat)
10608 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10609
10610(define-public python2-fake-factory
10611 (let ((base (package-with-python2 (strip-python2-variant
10612 python-fake-factory))))
10613 (package
10614 (inherit base)
24c9aa18 10615 (propagated-inputs
ea92ae01 10616 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10617 ,@(package-propagated-inputs base))))))
ea92ae01 10618
b49504fd
SB
10619(define-public python-pyaml
10620 (package
10621 (name "python-pyaml")
10622 (version "15.8.2")
10623 (source (origin
10624 (method url-fetch)
10625 (uri (pypi-uri "pyaml" version))
10626 (sha256
10627 (base32
10628 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10629 (build-system python-build-system)
f620311a
MB
10630 (native-inputs
10631 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
10632 (propagated-inputs
10633 `(("python-pyyaml" ,python-pyyaml)))
10634 (home-page "https://github.com/mk-fg/pretty-yaml")
10635 (synopsis "YAML pretty-print library for Python")
10636 (description
10637 "pyaml is a PyYAML based python module to produce pretty and readable
10638YAML-serialized data.")
3f641af0 10639 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10640
10641(define-public python2-pyaml
10642 (package-with-python2 python-pyaml))
10643
347175a2
SB
10644(define-public python-flexmock
10645 (package
10646 (name "python-flexmock")
10647 (version "0.10.2")
10648 (source (origin
10649 (method url-fetch)
10650 (uri (pypi-uri "flexmock" version))
10651 (sha256
10652 (base32
10653 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10654 (build-system python-build-system)
347175a2
SB
10655 (home-page "https://flexmock.readthedocs.org")
10656 (synopsis "Testing library for Python")
10657 (description
10658 "flexmock is a testing library for Python that makes it easy to create
10659mocks, stubs and fakes.")
3f641af0 10660 (license license:bsd-3)))
347175a2
SB
10661
10662(define-public python2-flexmock
10663 (package-with-python2 python-flexmock))
10664
5a744191
SB
10665(define-public python-orator
10666 (package
10667 (name "python-orator")
10668 (version "0.8.2")
10669 (source (origin
10670 (method url-fetch)
10671 (uri (pypi-uri "orator" version))
10672 (sha256
10673 (base32
10674 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10675 (build-system python-build-system)
10676 (arguments '(#:tests? #f)) ; no tests
b2676030 10677 (propagated-inputs
5a744191
SB
10678 `(("python-arrow" ,python-arrow)
10679 ("python-blinker" ,python-blinker)
10680 ("python-cleo" ,python-cleo)
10681 ("python-fake-factory" ,python-fake-factory)
10682 ("python-inflection" ,python-inflection)
10683 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10684 ("python-pyaml" ,python-pyaml)
5a744191
SB
10685 ("python-simplejson" ,python-simplejson)
10686 ("python-wrapt" ,python-wrapt)))
10687 (home-page "https://orator-orm.com/")
10688 (synopsis "ActiveRecord ORM for Python")
10689 (description
10690 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10691implementation for Python.")
10692 (license license:expat)
10693 (properties `((python2-variant . ,(delay python2-orator))))))
10694
10695(define-public python2-orator
10696 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10697 (package
10698 (inherit base)
06961617 10699 (propagated-inputs
5a744191 10700 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10701 ,@(package-propagated-inputs base))))))
f4155188
DM
10702
10703(define-public python-prompt-toolkit
10704 (package
10705 (name "python-prompt-toolkit")
d15e2ef0 10706 (version "1.0.7")
f4155188
DM
10707 (source
10708 (origin
10709 (method url-fetch)
d15e2ef0 10710 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10711 (sha256
10712 (base32
d15e2ef0 10713 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188 10714 (build-system python-build-system)
bae18710
LF
10715 (arguments
10716 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
10717 (propagated-inputs
10718 `(("python-wcwidth" ,python-wcwidth)
2c199b55 10719 ("python-six" ,python-six)
f22efa01 10720 ("python-pygments" ,python-pygments)))
f4155188
DM
10721 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10722 (synopsis "Library for building command line interfaces in Python")
10723 (description
10724 "Prompt-Toolkit is a library for building interactive command line
10725interfaces in Python. It's like GNU Readline but it also features syntax
10726highlighting while typing, out-of-the-box multi-line input editing, advanced
10727code completion, incremental search, support for Chinese double-width
10728characters, mouse support, and auto suggestions.")
f210e944 10729 (license license:bsd-3)))
f4155188
DM
10730
10731(define-public python2-prompt-toolkit
f210e944 10732 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
10733
10734(define-public python-jedi
10735 (package
10736 (name "python-jedi")
10737 (version "0.9.0")
10738 (source
10739 (origin
10740 (method url-fetch)
10741 (uri (pypi-uri "jedi" version))
10742 (sha256
10743 (base32
10744 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10745 (build-system python-build-system)
bfce8a34
MB
10746 (arguments
10747 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
10748 '(#:tests? #f))
10749 (native-inputs
10750 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
10751 (home-page "https://github.com/davidhalter/jedi")
10752 (synopsis
10753 "Autocompletion for Python that can be used for text editors")
10754 (description
10755 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 10756 (license license:expat)))
a502dfbf
DM
10757
10758(define-public python2-jedi
f210e944 10759 (package-with-python2 python-jedi))
c2f0dc6e
DM
10760
10761(define-public ptpython
10762 (package
10763 (name "ptpython")
10764 (version "0.34")
10765 (source (origin
10766 (method url-fetch)
10767 (uri (pypi-uri "ptpython" version))
10768 (sha256
10769 (base32
10770 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10771 (build-system python-build-system)
f22efa01 10772 (propagated-inputs
c2f0dc6e
DM
10773 `(("python-docopt" ,python-docopt)
10774 ("python-jedi" ,python-jedi)
10775 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 10776 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
10777 (home-page "https://github.com/jonathanslenders/ptpython")
10778 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10779 (description
10780 "ptpython is a Python read-eval-print loop with IDE-like features.
10781It supports syntax highlighting, multiline editing, autocompletion, mouse,
10782color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10783etc.")
3f641af0 10784 (license license:bsd-3)
c2f0dc6e
DM
10785 (properties `((python2-variant . ,(delay ptpython-2))))))
10786
10787(define-public ptpython-2
10788 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10789 (package
10790 (inherit base)
10791 (name "ptpython2"))))
b227f0be 10792
b04a52a6
DJ
10793(define-public python-requests-oauthlib
10794 (package
10795 (name "python-requests-oauthlib")
10796 (version "0.6.2")
10797 (source
10798 (origin
10799 (method url-fetch)
10800 (uri (pypi-uri "requests-oauthlib" version))
10801 (sha256
10802 (base32
10803 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10804 (build-system python-build-system)
10805 (arguments
10806 `(#:phases
10807 (modify-phases %standard-phases
10808 ;; removes tests that require network access
10809 (add-before 'check 'pre-check
10810 (lambda _
10811 (delete-file "tests/test_core.py")
10812 #t)))))
10813 (native-inputs
10814 `(("python-requests-mock" ,python-requests-mock)
10815 ("python-mock" ,python-mock)))
f22efa01 10816 (propagated-inputs
b04a52a6
DJ
10817 `(("python-oauthlib" ,python-oauthlib)
10818 ("python-requests" ,python-requests)))
10819 (home-page
10820 "https://github.com/requests/requests-oauthlib")
10821 (synopsis
10822 "OAuthlib authentication support for Requests")
10823 (description
10824 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10825provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 10826 (license license:isc)))
b04a52a6
DJ
10827
10828(define-public python2-requests-oauthlib
f210e944 10829 (package-with-python2 python-requests-oauthlib))
b04a52a6 10830
b227f0be 10831(define-public python-stem
10832 (package
10833 (name "python-stem")
10834 (version "1.4.1b")
10835 (source
10836 (origin
10837 (method url-fetch)
10838 (uri (pypi-uri "stem" version ".tar.bz2"))
10839 (sha256
10840 (base32
10841 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10842 (build-system python-build-system)
10843 (arguments
10844 `(#:phases
10845 (modify-phases %standard-phases
10846 (replace 'check
10847 (lambda _
10848 (zero? (system* "./run_tests.py" "--unit")))))))
10849 (native-inputs
10850 `(("python-mock" ,python-mock)
10851 ("python-pep8" ,python-pep8)
10852 ("python-pyflakes" ,python-pyflakes)))
f22efa01 10853 (propagated-inputs
b227f0be 10854 `(("python-pycrypto" ,python-pycrypto)))
10855 (home-page "https://stem.torproject.org/")
10856 (synopsis
10857 "Python controller library that allows applications to interact with Tor")
10858 (description
10859 "Stem is a Python controller library for Tor. With it you can use Tor's
10860control protocol to script against the Tor process and read descriptor data
10861relays publish about themselves.")
3f641af0 10862 (license license:lgpl3)))
b227f0be 10863
10864(define-public python2-stem
10865 (package-with-python2 python-stem))
517a6c0c
DM
10866
10867(define-public python-pyserial
10868 (package
10869 (name "python-pyserial")
10870 (version "3.1.1")
10871 (source
10872 (origin
10873 (method url-fetch)
10874 (uri (pypi-uri "pyserial" version))
10875 (sha256
10876 (base32
10877 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10878 (build-system python-build-system)
0a702009
MB
10879 (arguments
10880 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10881 ;; #:phases
10882 ;; (modify-phases %standard-phases
10883 ;; (replace 'check
10884 ;; (lambda _
10885 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
517a6c0c
DM
10886 (home-page
10887 "https://github.com/pyserial/pyserial")
10888 (synopsis "Python Serial Port Bindings")
10889 (description "@code{pyserial} provide serial port bindings for Python. It
10890supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10891and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 10892 (license license:bsd-3)))
517a6c0c
DM
10893
10894(define-public python2-pyserial
f210e944 10895 (package-with-python2 python-pyserial))
6eb7af2a
DJ
10896
10897(define-public python-kivy
10898 (package
10899 (name "python-kivy")
10900 (version "1.9.1")
10901 (source
10902 (origin
10903 (method url-fetch)
10904 (uri (pypi-uri "kivy" version))
10905 (file-name (string-append name "-" version ".tar.gz"))
10906 (sha256
10907 (base32
10908 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10909 (build-system python-build-system)
10910 (arguments
10911 `(#:tests? #f ; Tests require many optional packages
10912 #:phases
10913 (modify-phases %standard-phases
10914 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10915 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10916 (lambda* (#:key inputs #:allow-other-keys)
10917 (setenv "KIVY_SDL2_PATH"
10918 (string-append (assoc-ref inputs "sdl-union")
10919 "/include/SDL2"))
10920 #t)))))
10921 (native-inputs
f2516de2
HG
10922 `(("pkg-config" ,pkg-config)
10923 ("python-cython" ,python-cython)))
6eb7af2a 10924 (inputs
f2516de2 10925 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
10926 ("mesa" ,mesa)
10927 ("sdl-union"
10928 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10929 (home-page "http://kivy.org")
10930 (synopsis
10931 "Multitouch application framework")
10932 (description
10933 "A software library for rapid development of
10934hardware-accelerated multitouch applications.")
10935 (license license:expat)))
10936
10937(define-public python2-kivy
10938 (package-with-python2 python-kivy))
10939
10940(define-public python-kivy-next
10941 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10942 (revision "1"))
10943 (package (inherit python-kivy)
10944 (name "python-kivy-next")
d80a71eb 10945 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
10946 (string-take commit 7)))
10947 (source
10948 (origin
10949 (method git-fetch)
10950 (uri (git-reference
10951 (url "https://github.com/kivy/kivy")
10952 (commit commit)))
10953 (file-name (string-append name "-" version "-checkout"))
10954 (sha256
10955 (base32
10956 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10957
10958(define-public python2-kivy-next
10959 (package-with-python2 python-kivy-next))
8794bd8b
DC
10960
10961(define-public python-binaryornot
10962 (package
10963 (name "python-binaryornot")
10964 (version "0.4.0")
10965 (source (origin
10966 (method url-fetch)
10967 (uri (pypi-uri "binaryornot" version))
10968 (sha256
10969 (base32
10970 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10971 (build-system python-build-system)
f22efa01 10972 (propagated-inputs
8794bd8b
DC
10973 `(("python-chardet" ,python-chardet)
10974 ("python-hypothesis" ,python-hypothesis)))
10975 (home-page "https://github.com/audreyr/binaryornot")
10976 (synopsis "Package to check if a file is binary or text")
10977 (description "Ultra-lightweight pure Python package to check if a file is
10978binary or text.")
10979 (license license:bsd-3)
10980 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10981
10982(define-public python2-binaryornot
10983 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10984 (package (inherit base)
f22efa01 10985 (propagated-inputs
8794bd8b 10986 `(("python2-enum34" ,python2-enum34)
f22efa01 10987 ,@(package-propagated-inputs base))))))
a9ac982a
DC
10988
10989(define-public python-nltk
10990 (package
10991 (name "python-nltk")
10992 (version "3.2.1")
10993 (source (origin
10994 (method url-fetch)
10995 (uri (pypi-uri "nltk" version))
10996 (sha256
10997 (base32
10998 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10999 (build-system python-build-system)
59f12985
LF
11000 (arguments
11001 '(;; The tests require some extra resources to be downloaded.
11002 ;; TODO Try packaging these resources.
11003 #:tests? #f))
a9ac982a
DC
11004 (home-page "http://nltk.org/")
11005 (synopsis "Natural Language Toolkit")
11006 (description "It provides interfaces to over 50 corpora and lexical
11007resources such as WordNet, along with a suite of text processing libraries
11008for classification, tokenization, stemming, tagging, parsing, and semantic
11009reasoning, wrappers for natural language processing libraries.")
f210e944 11010 (license license:asl2.0)))
a9ac982a
DC
11011
11012(define-public python2-nltk
f210e944 11013 (package-with-python2 python-nltk))
691cd90d
DC
11014
11015(define-public python-pymongo
11016 (package
11017 (name "python-pymongo")
11018 (version "3.3.0")
11019 (source (origin
11020 (method url-fetch)
11021 (uri (pypi-uri "pymongo" version))
11022 (sha256
11023 (base32
11024 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11025 (build-system python-build-system)
f22efa01 11026 (propagated-inputs
691cd90d
DC
11027 `(("python-certifi" ,python-certifi)))
11028 (home-page "http://github.com/mongodb/mongo-python-driver")
11029 (synopsis "Python driver for MongoDB")
11030 (description "Python driver for MongoDB.")
f210e944 11031 (license license:asl2.0)))
691cd90d
DC
11032
11033(define-public python2-pymongo
f210e944 11034 (package-with-python2 python-pymongo))
6a6c9d43
DC
11035
11036(define-public python-sh
11037 (package
11038 (name "python-sh")
11039 (version "1.11")
11040 (source (origin
11041 (method url-fetch)
11042 (uri (pypi-uri "sh" version))
11043 (sha256
11044 (base32
11045 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11046 (build-system python-build-system)
11047 (arguments
11048 `(#:tests? #f)) ; no tests
11049 (home-page "https://github.com/amoffat/sh")
11050 (synopsis "Python subprocess interface")
11051 (description "Abstracts process invocation by providing a function
11052interface for programs.")
f210e944 11053 (license license:expat)))
6a6c9d43
DC
11054
11055(define-public python2-sh
f210e944 11056 (package-with-python2 python-sh))
05b59190 11057
25702397
EF
11058(define-public python-consul
11059 (package
11060 (name "python-consul")
11061 (version "0.6.1")
11062 (source
11063 (origin
11064 (method url-fetch)
11065 (uri (pypi-uri "python-consul" version))
11066 (sha256
11067 (base32
11068 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11069 (build-system python-build-system)
11070 (native-inputs
fd1d6de7
HG
11071 `(("python-pytest" ,python-pytest)))
11072 (propagated-inputs
11073 `(("python-requests" ,python-requests)
25702397
EF
11074 ("python-six" ,python-six)))
11075 (home-page "https://github.com/cablehead/python-consul")
11076 (synopsis "Python client for Consul")
11077 (description
11078 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11079discovery, monitoring and configuration.")
11080 (license license:expat)))
11081
11082(define-public python2-consul
f210e944 11083 (package-with-python2 python-consul))
25702397 11084
05b59190
DC
11085(define-public python-schematics
11086 (package
11087 (name "python-schematics")
11088 (version "1.1.1")
11089 (source
11090 (origin
11091 (method url-fetch)
11092 (uri (string-append
11093 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11094 (file-name (string-append name "-" version ".tar.gz"))
11095 (sha256
11096 (base32
11097 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11098 (build-system python-build-system)
f22efa01 11099 (propagated-inputs
05b59190
DC
11100 `(("python-six" ,python-six)))
11101 (arguments
11102 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11103 ; version requirements (eg python-coveralls)
11104 (home-page "https://github.com/schematics/schematics")
11105 (synopsis "Python Data Structures for Humans")
11106 (description "Python Data Structures for Humans.")
f210e944 11107 (license license:bsd-3)))
05b59190
DC
11108
11109(define-public python2-schematics
f210e944 11110 (package-with-python2 python-schematics))
d6907ff7
DC
11111
11112(define-public python-publicsuffix
11113 (package
11114 (name "python-publicsuffix")
11115 (version "1.1.0")
11116 (source (origin
11117 (method url-fetch)
11118 (uri (pypi-uri "publicsuffix" version))
11119 (sha256
11120 (base32
11121 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11122 (build-system python-build-system)
11123 (arguments
11124 `(#:tests? #f)) ; tests use the internet
11125 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11126 (synopsis "Get suffix for a domain name")
11127 (description "Get a public suffix for a domain name using the Public Suffix
11128List.")
f210e944 11129 (license license:expat)))
d6907ff7
DC
11130
11131(define-public python2-publicsuffix
f210e944 11132 (package-with-python2 python-publicsuffix))
b2319996
DC
11133
11134(define-public python-publicsuffix2
11135 (package
11136 (name "python-publicsuffix2")
11137 (version "2.20160621")
11138 (source
11139 (origin
11140 (method url-fetch)
11141 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11142 (sha256
11143 (base32
11144 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11145 (build-system python-build-system)
10797a0a
LF
11146 (arguments
11147 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
11148 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11149 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11150 (description "Get a public suffix for a domain name using the Public Suffix
11151List. Forked from and using the same API as the publicsuffix package.")
f210e944 11152 (license (list license:expat license:mpl2.0))))
b2319996
DC
11153
11154(define-public python2-publicsuffix2
f210e944 11155 (package-with-python2 python-publicsuffix2))
81f1515d
DC
11156
11157(define-public python-url
11158 (package
11159 (name "python-url")
11160 (version "0.2.0")
11161 (source (origin
11162 (method url-fetch)
11163 (uri (pypi-uri "url" version))
11164 (sha256
11165 (base32
11166 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11167 (build-system python-build-system)
f22efa01 11168 (propagated-inputs
81f1515d
DC
11169 `(("python-publicsuffix" ,python-publicsuffix)))
11170 (native-inputs
11171 `(("python-coverage" ,python-coverage)
11172 ("python-nose" ,python-nose)))
11173 (arguments
11174 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11175 (home-page "http://github.com/seomoz/url-py")
11176 (synopsis "URL Parsing")
11177 (description "Library for parsing urls.")
11178 (license license:expat)
11179 (properties `((python2-variant . ,(delay python2-url))))))
11180
11181(define-public python2-url
11182 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11183 (package (inherit base)
f22efa01 11184 (propagated-inputs
f210e944 11185 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
11186
11187(define-public python-freezegun
11188 (package
11189 (name "python-freezegun")
11190 (version "0.3.7")
11191 (source
11192 (origin
11193 (method url-fetch)
11194 (uri (pypi-uri "freezegun" version))
11195 (sha256
11196 (base32
11197 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
11198 (build-system python-build-system)
11199 (native-inputs
11200 `(("python-mock" ,python-mock)
11201 ("python-nose" ,python-nose)
4e096968 11202 ("python-coverage" ,python-coverage)))
f22efa01 11203 (propagated-inputs
4e096968
HG
11204 `(("python-six" ,python-six)
11205 ("python-dateutil-2" ,python-dateutil-2)))
974ee2c1
TS
11206 (arguments
11207 `(#:phases (modify-phases %standard-phases
11208 ;; The tests are normally executed via `make test`, but the PyPi
11209 ;; package does not include the Makefile.
11210 (replace 'check
11211 (lambda _
11212 (zero? (system* "nosetests" "./tests/")))))))
11213 (home-page "https://github.com/spulec/freezegun")
11214 (synopsis "Test utility for mocking the datetime module")
11215 (description
11216 "FreezeGun is a library that allows your python tests to travel through
11217time by mocking the datetime module.")
11218 (license license:asl2.0)))
11219
11220(define-public python2-freezegun
f210e944
HG
11221 (package-with-python2 python-freezegun))
11222
dddcb25c
MB
11223
11224(define-public python-odfpy
11225 (package
11226 (name "python-odfpy")
11227 (version "1.3.3")
11228 (source (origin
11229 (method url-fetch)
11230 (uri (pypi-uri "odfpy" version))
11231 (sha256
11232 (base32
11233 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11234 (arguments
11235 `(#:modules ((srfi srfi-1)
11236 (guix build python-build-system)
11237 (guix build utils))
11238 #:phases
11239 (modify-phases %standard-phases
11240 (replace 'check
11241 ;; The test runner invokes python2 and python3 for test*.py.
11242 ;; To avoid having both in inputs, we replicate it here.
11243 (lambda _
11244 (every (lambda (test-file)
11245 (zero? (system* "python" test-file)))
11246 (find-files "tests" "^test.*\\.py$")))))))
11247 (build-system python-build-system)
11248 (home-page "https://github.com/eea/odfpy")
11249 (synopsis "Python API and tools to manipulate OpenDocument files")
11250 (description "Collection of libraries and utility programs written in
11251Python to manipulate OpenDocument 1.2 files.")
11252 (license
11253 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11254 ;; number of files with other licenses.
11255 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11256
11257(define-public python2-odfpy
11258 (package-with-python2 python-odfpy))
b30565bd
MB
11259
11260(define-public python-cachecontrol
11261 (package
11262 (name "python-cachecontrol")
11263 (version "0.11.6")
11264 (source
11265 (origin
11266 (method url-fetch)
11267 ;; Pypi does not have tests.
11268 (uri (string-append
11269 "https://github.com/ionrock/cachecontrol/archive/v"
11270 version ".tar.gz"))
11271 (file-name (string-append name "-" version ".tar.gz"))
11272 (sha256
11273 (base32
11274 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11275 (build-system python-build-system)
11276 (arguments
11277 `(#:phases
11278 (modify-phases %standard-phases
11279 (replace 'check
11280 (lambda _
11281 ;; Drop test that requires internet access.
11282 (delete-file "tests/test_regressions.py")
11283 (setenv "PYTHONPATH"
11284 (string-append (getcwd) "/build/lib:"
11285 (getenv "PYTHONPATH")))
11286 (zero? (system* "py.test" "-vv")))))))
11287 (native-inputs
11288 `(("python-pytest" ,python-pytest)
11289 ("python-redis" ,python-redis)
11290 ("python-webtest" ,python-webtest)
11291 ("python-mock" ,python-mock)))
11292 (propagated-inputs
11293 `(("python-requests" ,python-requests)
11294 ("python-lockfile" ,python-lockfile)))
11295 (home-page "https://github.com/ionrock/cachecontrol")
11296 (synopsis "The httplib2 caching algorithms for use with requests")
11297 (description "CacheControl is a port of the caching algorithms in
11298@code{httplib2} for use with @code{requests} session objects.")
f210e944 11299 (license license:asl2.0)))
b30565bd
MB
11300
11301(define-public python2-cachecontrol
f210e944 11302 (package-with-python2 python-cachecontrol))
243db824
DM
11303
11304(define-public python-lit
11305 (package
11306 (name "python-lit")
11307 (version "0.5.0")
11308 (source
11309 (origin
11310 (method url-fetch)
11311 (uri (pypi-uri "lit" version))
11312 (sha256
11313 (base32
11314 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11315 (build-system python-build-system)
11316 (home-page "http://llvm.org/")
11317 (synopsis "LLVM Software Testing Tool")
11318 (description "@code{lit} is a portable tool for executing LLVM and Clang
11319style test suites, summarizing their results, and providing indication of
11320failures.")
f210e944 11321 (license license:ncsa)))
243db824
DM
11322
11323(define-public python2-lit
f210e944 11324 (package-with-python2 python-lit))
66f95b20
MB
11325
11326(define-public python-pytest-pep8
11327 (package
11328 (name "python-pytest-pep8")
11329 (version "1.0.6")
11330 (source (origin
11331 (method url-fetch)
11332 (uri (pypi-uri "pytest-pep8" version))
11333 (sha256
11334 (base32
11335 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11336 (build-system python-build-system)
11337 (arguments
b41a05ce 11338 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
11339 (native-inputs
11340 `(("python-pytest" ,python-pytest)))
11341 (propagated-inputs
11342 `(("python-pep8" ,python-pep8)))
11343 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11344 (synopsis "Py.test plugin to check PEP8 requirements")
11345 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 11346 (license license:expat)))
66f95b20
MB
11347
11348(define-public python2-pytest-pep8
f210e944 11349 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
11350
11351(define-public python-pytest-flakes
11352 (package
11353 (name "python-pytest-flakes")
11354 (version "1.0.1")
11355 (source (origin
11356 (method url-fetch)
11357 (uri (pypi-uri "pytest-flakes" version))
11358 (sha256
11359 (base32
11360 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11361 (build-system python-build-system)
11362 (arguments
b41a05ce 11363 `(#:phases
df94a6b5
MB
11364 (modify-phases %standard-phases
11365 (delete 'check)
11366 (add-after 'install 'check
05c2fd36
HG
11367 (lambda* (#:key outputs inputs #:allow-other-keys)
11368 ;; It's easier to run tests after install.
11369 ;; Make installed package available for running the tests
11370 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
11371 (zero? (system* "py.test" "-vv")))))))
11372 (native-inputs
11373 `(("python-coverage" ,python-coverage)
11374 ("python-pytest" ,python-pytest)
11375 ("python-pytest-cache" ,python-pytest-cache)
11376 ("python-pytest-pep8" ,python-pytest-pep8)))
11377 (propagated-inputs
11378 `(("python-pyflakes" ,python-pyflakes)))
11379 (home-page "https://github.com/fschulze/pytest-flakes")
11380 (synopsis "Py.test plugin to check source code with pyflakes")
11381 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 11382 (license license:expat)))
df94a6b5
MB
11383
11384(define-public python2-pytest-flakes
f210e944 11385 (package-with-python2 python-pytest-flakes))
5467ea62
MB
11386
11387(define-public python-natsort
11388 (package
11389 (name "python-natsort")
11390 (version "5.0.1")
11391 (source (origin
11392 (method url-fetch)
11393 (uri (pypi-uri "natsort" version))
11394 (sha256
11395 (base32
11396 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11397 (build-system python-build-system)
11398 (arguments
11399 `(#:phases
11400 (modify-phases %standard-phases
11401 (add-before 'check 'set-cachedir
11402 ;; Tests require write access to $HOME by default
11403 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11404 (native-inputs
11405 `(("python-hypothesis" ,python-hypothesis)
11406 ("python-pytest-cache" ,python-pytest-cache)
11407 ("python-pytest-cov" ,python-pytest-cov)
11408 ("python-pytest-flakes" ,python-pytest-flakes)
11409 ("python-pytest-pep8" ,python-pytest-pep8)))
11410 (propagated-inputs ; TODO: Add python-fastnumbers.
11411 `(("python-pyicu" ,python-pyicu)))
11412 (home-page "https://github.com/SethMMorton/natsort")
11413 (synopsis "Natural sorting for python and shell")
11414 (description
11415 "Natsort lets you apply natural sorting on lists instead of
11416lexicographical. If you use the built-in @code{sorted} method in python
11417on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11418returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11419function @code{natsorted} that identifies numbers and sorts them separately
11420from strings. It can also sort version numbers, real numbers, mixed types
11421and more, and comes with a shell command @command{natsort} that exposes this
11422functionality in the command line.")
11423 (license license:expat)
11424 (properties `((python2-variant . ,(delay python2-natsort))))))
11425
11426(define-public python2-natsort
11427 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11428 (package (inherit base)
11429 (native-inputs
00e10c6e 11430 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
11431 ("python2-mock" ,python2-mock)
11432 ("python2-enum34" ,python2-enum34)
11433 ,@(package-native-inputs base))))))
4efb9c54
SR
11434
11435(define-public python-glances
11436 (package
11437 (name "python-glances")
11438 (version "2.7.1")
11439 (source
11440 (origin
11441 (method url-fetch)
11442 (uri (pypi-uri "Glances" version))
11443 (sha256
11444 (base32
11445 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11446 (build-system python-build-system)
f22efa01 11447 (propagated-inputs
4efb9c54
SR
11448 `(("python-psutil" ,python-psutil)))
11449 (home-page
11450 "https://github.com/nicolargo/glances")
11451 (synopsis
11452 "A cross-platform curses-based monitoring tool")
11453 (description
11454 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11455Glances uses the PsUtil library to get information from your system. It monitors
11456CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 11457 (license license:lgpl3+)))
4efb9c54
SR
11458
11459(define-public python2-glances
f210e944 11460 (package-with-python2 python-glances))
05b7a593
EF
11461
11462(define-public python-graphql-core
11463 (package
11464 (name "python-graphql-core")
11465 (version "0.5.3")
11466 (source
11467 (origin
11468 (method url-fetch)
11469 (uri (pypi-uri "graphql-core" version))
11470 (sha256
11471 (base32
11472 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11473 (build-system python-build-system)
11474 (arguments
326f8285
LF
11475 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11476 #:phases
05b7a593
EF
11477 (modify-phases %standard-phases
11478 (add-after 'unpack 'patch-hardcoded-version
11479 (lambda _ (substitute*
11480 "setup.py"
11481 (("'gevent==1.1rc1'") "'gevent'"))
11482 #t)))))
11483 (native-inputs
11484 `(("python-gevent" ,python-gevent)
11485 ("python-mock" ,python-mock)
11486 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 11487 (propagated-inputs
05b7a593
EF
11488 `(("python-promise" ,python-promise)
11489 ("python-six" ,python-six)))
11490 (home-page "https://github.com/graphql-python/graphql-core")
11491 (synopsis "GraphQL implementation for Python")
11492 (description
11493 "GraphQL implementation for Python. GraphQL is a data query language and
11494runtime designed and used to request and deliver data to mobile and web apps.
11495This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11496to Python.")
05b7a593
EF
11497 (license license:expat)))
11498
11499(define-public python2-graphql-core
f210e944 11500 (package-with-python2 python-graphql-core))
7ee51575
EF
11501
11502(define-public python-graphql-relay
11503 (package
11504 (name "python-graphql-relay")
11505 (version "0.4.4")
11506 (source
11507 (origin
11508 (method url-fetch)
11509 (uri (pypi-uri "graphql-relay" version))
11510 (sha256
11511 (base32
11512 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11513 (build-system python-build-system)
11514 (native-inputs
11515 `(("python-pytest" ,python-pytest)))
f22efa01 11516 (propagated-inputs
7ee51575
EF
11517 `(("python-graphql-core" ,python-graphql-core)
11518 ("python-promise" ,python-promise)
11519 ("python-six" ,python-six)))
11520 (home-page "https://github.com/graphql-python/graphql-relay-py")
11521 (synopsis "Relay implementation for Python")
11522 (description
11523 "This is a library to allow the easy creation of Relay-compliant servers
11524using the GraphQL Python reference implementation of a GraphQL server. It
11525should be noted that the code is a exact port of the original
11526@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11527from Facebook.")
7ee51575
EF
11528 (license license:expat)))
11529
11530(define-public python2-graphql-relay
f210e944 11531 (package-with-python2 python-graphql-relay))
ddc63a56
EF
11532
11533(define-public python-graphene
11534 (package
11535 (name "python-graphene")
11536 (version "0.10.2")
11537 (source
11538 (origin
11539 (method url-fetch)
11540 (uri (pypi-uri "graphene" version))
11541 (sha256
11542 (base32
11543 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11544 (build-system python-build-system)
11545 (native-inputs
11546 `(("python-django-filter" ,python-django-filter)
11547 ("python-mock" ,python-mock)
11548 ("python-psycopg2" ,python-psycopg2)
11549 ("python-pytest-django" ,python-pytest-django)
11550 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 11551 (propagated-inputs
ddc63a56
EF
11552 `(("python-graphql-core" ,python-graphql-core)
11553 ("python-graphql-relay" ,python-graphql-relay)
11554 ("python-iso8601" ,python-iso8601)
11555 ("python-promise" ,python-promise)
11556 ("python-six" ,python-six)))
11557 (home-page "http://graphene-python.org/")
11558 (synopsis "GraphQL Framework for Python")
11559 (description
11560 "Graphene is a Python library for building GraphQL schemas/types.
11561A GraphQL schema describes your data model, and provides a GraphQL server
11562with an associated set of resolve methods that know how to fetch data.")
11563 (properties `((python2-variant . ,(delay python2-graphene))))
11564 (license license:expat)))
11565
11566(define-public python2-graphene
11567 (let ((base (package-with-python2
11568 (strip-python2-variant python-graphene))))
11569 (package (inherit base)
11570 (native-inputs
00e10c6e 11571 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 11572 ,@(package-native-inputs base))))))
d488d5d6
EF
11573
11574(define-public python-nautilus
11575 (package
11576 (name "python-nautilus")
11577 (version "0.4.9")
11578 (source
11579 (origin
11580 (method url-fetch)
11581 (uri (pypi-uri "nautilus" version))
11582 (sha256
11583 (base32
11584 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11585 (build-system python-build-system)
11586 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 11587 (propagated-inputs
d488d5d6
EF
11588 `(("python-bcrypt" ,python-bcrypt)
11589 ("python-click" ,python-click)
11590 ("python-consul" ,python-consul)
d488d5d6
EF
11591 ("python-graphene" ,python-graphene)
11592 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
11593 ("python-peewee" ,python-peewee)
11594 ("python-pika" ,python-pika)
d488d5d6
EF
11595 ("python-tornado" ,python-tornado)
11596 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
11597 (native-inputs
11598 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
11599 (home-page "https://github.com/AlecAivazis/nautilus")
11600 (synopsis "Library for creating microservice applications")
11601 (description
11602 "Nautilus is a framework for flux based microservices that looks to
11603provide extendible implementations of common aspects of a cloud so that you can
11604focus on building massively scalable web applications.")
11605 (license license:expat)))
94cffc63 11606
66d3f50a
LF
11607(define-public python-betamax
11608 (package
11609 (name "python-betamax")
11610 (version "0.8.0")
11611 (source
11612 (origin
11613 (method url-fetch)
11614 (uri (pypi-uri "betamax" version))
11615 (sha256
11616 (base32
11617 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11618 (build-system python-build-system)
11619 (arguments
11620 '(;; Many tests fail because they require networking.
11621 #:tests? #f))
c415f763 11622 (propagated-inputs
66d3f50a
LF
11623 `(("python-requests" ,python-requests)))
11624 (home-page "https://github.com/sigmavirus24/betamax")
11625 (synopsis "Record HTTP interactions with python-requests")
11626 (description "Betamax will record your test suite's HTTP interactions and
11627replay them during future tests. It is designed to work with python-requests.")
f210e944 11628 (license license:expat)))
66d3f50a
LF
11629
11630(define-public python2-betamax
f210e944 11631 (package-with-python2 python-betamax))
ca0635b4 11632
94cffc63
LF
11633(define-public python-s3transfer
11634 (package
11635 (name "python-s3transfer")
11636 (version "0.1.8")
11637 (source (origin
11638 (method url-fetch)
11639 (uri (pypi-uri "s3transfer" version))
11640 (sha256
11641 (base32
11642 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11643 (build-system python-build-system)
fad8bf97
LF
11644 (arguments
11645 `(#:phases
11646 (modify-phases %standard-phases
11647 (replace 'check
11648 (lambda _
11649 ;; 7 of the 'integration' tests require network access or login
11650 ;; credentials.
11651 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 11652 (native-inputs
fad8bf97
LF
11653 `(("python-docutils" ,python-docutils)
11654 ("python-mock" ,python-mock)
11655 ("python-nose" ,python-nose)))
f22efa01 11656 (propagated-inputs
94cffc63
LF
11657 `(("python-botocore" ,python-botocore)))
11658 (synopsis "Amazon S3 Transfer Manager")
11659 (description "S3transfer is a Python library for managing Amazon S3
11660transfers.")
11661 (home-page "https://github.com/boto/s3transfer")
11662 (license license:asl2.0)
11663 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11664
11665(define-public python2-s3transfer
11666 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11667 (package
11668 (inherit base)
11669 (native-inputs
11670 `(("python2-futures" ,python2-futures)
94cffc63 11671 ,@(package-native-inputs base))))))
8ab59181
HG
11672
11673(define-public python-setproctitle
11674(package
11675 (name "python-setproctitle")
11676 (version "1.1.10")
11677 (source
11678 (origin
11679 (method url-fetch)
11680 (uri (pypi-uri "setproctitle" version))
11681 (sha256
11682 (base32
11683 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11684 (build-system python-build-system)
11685 (arguments
11686 '(#:phases
11687 (modify-phases %standard-phases
11688 (add-before 'check 'patch-Makefile
11689 ;; Stricly this is only required for the python2 variant.
11690 ;; But adding a phase in an inherited package seems to be
11691 ;; cumbersum. So we patch even for python3.
11692 (lambda _
11693 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11694 (when nose
11695 (substitute* "Makefile"
11696 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11697 (string-append nose "/bin/nosetests "))))
11698 #t)))
11699 (replace 'check
11700 (lambda _
11701 (setenv "PYTHON" (or (which "python3") (which "python")))
11702 (setenv "PYCONFIG" (or (which "python3-config")
11703 (which "python-config")))
11704 (setenv "CC" "gcc")
11705 ;; No need to extend PYTHONPATH to find the built package, since
11706 ;; the Makefile will build anyway
11707 (zero? (system* "make" "check")))))))
11708 (native-inputs
11709 `(("procps" ,procps))) ; required for tests
11710 (home-page
11711 "https://github.com/dvarrazzo/py-setproctitle")
11712 (synopsis
11713 "Setproctitle implementation for Python to customize the process title")
11714 (description "The library allows a process to change its title (as displayed
11715by system tools such as ps and top).
11716
11717Changing the title is mostly useful in multi-process systems, for
11718example when a master process is forked: changing the children's title
11719allows to identify the task each process is busy with. The technique
11720is used by PostgreSQL and the OpenSSH Server for example.")
11721 (license license:bsd-3)
11722 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11723
11724(define-public python2-setproctitle
11725 (let ((base (package-with-python2
11726 (strip-python2-variant python-setproctitle))))
11727 (package
11728 (inherit base)
11729 (native-inputs `(("python2-nose" ,python2-nose)
11730 ,@(package-native-inputs base))))))
162e42d8
HG
11731
11732(define-public python-validictory
11733 (package
11734 (name "python-validictory")
11735 (version "1.0.1")
11736 (source
11737 (origin
11738 (method url-fetch)
11739 (uri (pypi-uri "validictory" version))
11740 (sha256
11741 (base32
11742 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11743 (build-system python-build-system)
11744 (arguments
11745 '(#:phases
11746 (modify-phases %standard-phases
11747 (add-after 'unpack 'bootstrap
11748 ;; Move the tests out of the package directory to avoid
11749 ;; packaging them.
11750 (lambda* _
11751 (rename-file "validictory/tests" "tests")
11752 (delete-file "tests/__init__.py")))
11753 (replace 'check
11754 (lambda _
11755 ;; Extend PYTHONPATH so the built package will be found.
11756 (setenv "PYTHONPATH"
11757 (string-append (getcwd) "/build/lib:"
11758 (getenv "PYTHONPATH")))
11759 (zero? (system* "py.test" "-vv" )))))))
11760 (native-inputs
11761 `(("python-pytest" ,python-pytest)))
11762 (home-page
11763 "https://github.com/jamesturk/validictory")
11764 (synopsis "General purpose Python data validator")
11765 (description "It allows validation of arbitrary Python data structures.
11766
11767The schema format is based on the JSON Schema
11768proposal (http://json-schema.org), so combined with json the library is also
11769useful as a validator for JSON data.")
f210e944 11770 (license license:expat)))
162e42d8
HG
11771
11772(define-public python2-validictory
f210e944 11773 (package-with-python2 python-validictory))
0990edfe
DM
11774
11775(define-public python-aniso8601
11776 (package
11777 (name "python-aniso8601")
11778 (version "1.1.0")
11779 (source
11780 (origin
11781 (method url-fetch)
11782 (uri (pypi-uri "aniso8601" version))
11783 (sha256
11784 (base32
11785 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11786 (build-system python-build-system)
11787 (propagated-inputs
11788 `(("python-dateutil-2" ,python-dateutil-2)))
11789 (home-page
11790 "https://bitbucket.org/nielsenb/aniso8601")
11791 (synopsis
11792 "Python library for parsing ISO 8601 strings")
11793 (description
11794 "This package contains a library for parsing ISO 8601 datetime strings.")
11795 (license license:bsd-3)))
999d964d
DM
11796
11797(define-public python-flask-restful
11798 (package
11799 (name "python-flask-restful")
11800 (version "0.3.5")
11801 (source
11802 (origin
11803 (method url-fetch)
11804 (uri (pypi-uri "Flask-RESTful" version))
11805 (sha256
11806 (base32
11807 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11808 (build-system python-build-system)
11809 (propagated-inputs
11810 `(("python-aniso8601" ,python-aniso8601)
11811 ("python-flask" ,python-flask)
11812 ("python-pycrypto" ,python-pycrypto)
11813 ("python-pytz" ,python-pytz)))
11814 (native-inputs
11815 `(;; Optional dependency of Flask. Tests need it.
11816 ("python-blinker" ,python-blinker)
11817 ("python-mock" ,python-mock) ; For tests
11818 ("python-nose" ,python-nose) ; For tests
11819 ("python-sphinx" ,python-sphinx)))
11820 (home-page
11821 "https://www.github.com/flask-restful/flask-restful/")
11822 (synopsis
11823 "Flask module for creating REST APIs")
11824 (description
11825 "This package contains a Flask module for creating REST APIs.")
11826 (license license:bsd-3)))
31288222
DM
11827
11828(define-public python-flask-basicauth
11829 (package
11830 (name "python-flask-basicauth")
11831 (version "0.2.0")
11832 (source
11833 (origin
11834 (method url-fetch)
11835 (uri (pypi-uri "Flask-BasicAuth" version))
11836 (sha256
11837 (base32
11838 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11839 (build-system python-build-system)
11840 (propagated-inputs
11841 `(("python-flask" ,python-flask)))
11842 (home-page
11843 "https://github.com/jpvanhal/flask-basicauth")
11844 (synopsis
11845 "HTTP basic access authentication for Flask")
11846 (description
11847 "This package provides HTTP basic access authentication for Flask.")
11848 (license license:bsd-3)))
903276d0
DM
11849
11850(define-public python-flask-sqlalchemy
11851 (package
11852 (name "python-flask-sqlalchemy")
11853 (version "2.1")
11854 (source
11855 (origin
11856 (method url-fetch)
11857 (uri (pypi-uri "Flask-SQLAlchemy" version))
11858 (sha256
11859 (base32
11860 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11861 (build-system python-build-system)
11862 (propagated-inputs
11863 `(("python-flask" ,python-flask)
11864 ("python-sqlalchemy" ,python-sqlalchemy)))
11865 (home-page
11866 "http://github.com/mitsuhiko/flask-sqlalchemy")
11867 (synopsis
11868 "Module adding SQLAlchemy support to your Flask application")
11869 (description
11870 "This package adds SQLAlchemy support to your Flask application.")
11871 (license license:bsd-3)))
329b4b3b
LF
11872
11873(define-public python-pyev
11874 (package
11875 (name "python-pyev")
11876 (version "0.9.0")
11877 (source
11878 (origin
11879 (method url-fetch)
11880 (uri (pypi-uri "pyev" version))
11881 (sha256
11882 (base32
11883 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11884 (build-system python-build-system)
11885 (arguments
11886 `(#:tests? #f ; no test suite
11887 #:phases
11888 (modify-phases %standard-phases
11889 (add-after 'unpack 'patch
11890 (lambda* (#:key inputs #:allow-other-keys)
11891 (let ((libev (string-append (assoc-ref inputs "libev")
11892 "/lib/libev.so.4")))
11893 (substitute* "setup.py"
11894 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11895 (string-append "libev_dll_name = \"" libev "\"")))))))))
11896 (inputs
11897 `(("libev" ,libev)))
11898 (home-page "http://pythonhosted.org/pyev/")
11899 (synopsis "Python libev interface")
11900 (description "Pyev provides a Python interface to libev.")
11901 (license license:gpl3)))
11902
11903(define-public python2-pyev
11904 (package-with-python2 python-pyev))
45b4f127
DM
11905
11906(define-public python-imagesize
11907 (package
11908 (name "python-imagesize")
11909 (version "0.7.1")
11910 (source
11911 (origin
11912 (method url-fetch)
11913 (uri (pypi-uri "imagesize" version))
11914 (sha256
11915 (base32
11916 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11917 (build-system python-build-system)
9422c98a
LF
11918 (arguments
11919 '(;; Test files are not distributed on PyPi:
11920 ;; https://github.com/shibukawa/imagesize_py/issues/7
11921 #:tests? #f))
45b4f127
DM
11922 (home-page "https://github.com/shibukawa/imagesize_py")
11923 (synopsis "Gets image size of files in variaous formats in Python")
11924 (description
11925 "This package allows determination of image size from
11926PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 11927 (license license:expat)))
45b4f127
DM
11928
11929(define-public python2-imagesize
f210e944 11930 (package-with-python2 python-imagesize))
2f6dd9cd
AI
11931
11932(define-public python-axolotl-curve25519
11933 (package
11934 (name "python-axolotl-curve25519")
11935 (version "0.1")
11936 (source
11937 (origin
11938 (method git-fetch)
11939 (uri (git-reference
11940 (url "git://github.com/tgalal/python-axolotl-curve25519")
11941 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11942 (file-name (string-append name "-" version "-checkout"))
11943 (sha256
11944 (base32
11945 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11946 (build-system python-build-system)
11947 (arguments
11948 `(;; Prevent creation of the egg. This works around
11949 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11950 #:configure-flags '("--root=/")))
2f6dd9cd
AI
11951 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11952 (synopsis "Python wrapper for curve25519 library")
11953 (description "This is a python wrapper for the curve25519 library
11954with ed25519 signatures. The C code was pulled from
11955libaxolotl-android. At the moment this wrapper is meant for use by
11956python-axolotl.")
11957 (license (list license:gpl3 ; Most files
683cdbf5 11958 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
11959
11960(define-public python2-axolotl-curve25519
11961 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
11962
11963(define-public python-axolotl
11964 (package
11965 (name "python-axolotl")
11966 (version "0.1.35")
11967 (source
11968 (origin
11969 (method url-fetch)
11970 (uri (string-append
11971 "https://github.com/tgalal/python-axolotl/archive/"
11972 version ".tar.gz"))
11973 (file-name (string-append name "-" version ".tar.gz"))
11974 (sha256
11975 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11976 (build-system python-build-system)
11977 (arguments
11978 `(#:phases
11979 (modify-phases %standard-phases
11980 ;; Don't install tests
11981 (add-before 'install 'remove-tests
11982 (lambda _
11983 (for-each delete-file-recursively
11984 '("axolotl/tests" "build/lib/axolotl/tests"))
11985 #t)))
11986 ;; Prevent creation of the egg. This works around
11987 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11988 #:configure-flags '("--root=/")))
06ff0837
AI
11989 (propagated-inputs
11990 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11991 ("python-dateutil" ,python-dateutil)
11992 ("python-protobuf" ,python-protobuf)
11993 ("python-pycrypto" ,python-pycrypto)))
11994 (home-page "https://github.com/tgalal/python-axolotl")
11995 (synopsis "Python port of libaxolotl-android")
11996 (description "This is a python port of libaxolotl-android. This
11997is a ratcheting forward secrecy protocol that works in synchronous and
11998asynchronous messaging environments.")
11999 (license license:gpl3)))
12000
12001(define-public python2-axolotl
12002 (package-with-python2 python-axolotl))
e2fca490
DM
12003
12004(define-public python-termstyle
12005 (package
12006 (name "python-termstyle")
12007 (version "0.1.11")
12008 (source
12009 (origin
12010 (method url-fetch)
12011 (uri (pypi-uri "termstyle" version))
12012 (sha256
12013 (base32
12014 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12015 (build-system python-build-system)
7917a135
MB
12016 (arguments
12017 '(#:phases
12018 (modify-phases %standard-phases
12019 (replace 'check
12020 (lambda _
12021 (zero? (system* "python" "test3.py")))))))
e2fca490
DM
12022 (home-page "http://github.com/gfxmonk/termstyle")
12023 (synopsis "Console text coloring for Python")
12024 (description "This package provides console text coloring for Python.")
12025 (license license:bsd-3)))
1e6112d8
DM
12026
12027(define-public python-rednose
12028 (package
12029 (name "python-rednose")
12030 (version "1.2.1")
12031 (source
12032 (origin
12033 (method url-fetch)
12034 (uri (pypi-uri "rednose" version))
12035 (sha256
12036 (base32
12037 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
12038 (build-system python-build-system)
12039 (arguments
12040 `(#:phases
12041 (modify-phases %standard-phases
12042 (add-after 'unpack 'fix-deps
12043 (lambda _
12044 ;; See <https://github.com/JBKahn/rednose/issues/12>
12045 (substitute* "setup.py"
12046 (("python-termstyle") "termstyle"))
12047 #t)))))
12048 (propagated-inputs
12049 `(("python-colorama" ,python-colorama)
12050 ("python-termstyle" ,python-termstyle)))
12051 (native-inputs
12052 `(("python-six" ,python-six)
12053 ("python-nose" ,python-nose)))
12054 (home-page "https://github.com/JBKahn/rednose")
12055 (synopsis "Colored output for Python nosetests")
12056 (description "This package provides colored output for the
12057@command{nosetests} command of the Python Nose unit test framework.")
12058 (license license:bsd-3)))
0a7f17f0
DM
12059
12060(define-public python-flask-restplus
12061 (package
12062 (name "python-flask-restplus")
12063 (version "0.9.2")
12064 (source
12065 (origin
12066 (method url-fetch)
12067 (uri (pypi-uri "flask-restplus" version))
12068 (sha256
12069 (base32
12070 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
12071 (build-system python-build-system)
59f74825
MB
12072 (arguments
12073 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
12074 ;; #:phases
12075 ;; (modify-phases %standard-phases
12076 ;; (replace 'check
12077 ;; (lambda _
12078 ;; (zero? (system* "nosetests")))))))
0a7f17f0
DM
12079 (propagated-inputs
12080 `(("python-aniso8601" ,python-aniso8601)
12081 ("python-flask" ,python-flask)
12082 ("python-jsonschema" ,python-jsonschema)
12083 ("python-pytz" ,python-pytz)
12084 ("python-six" ,python-six)))
12085 (native-inputs
12086 `(("python-tzlocal" ,python-tzlocal)
12087 ("python-blinker" ,python-blinker)
12088 ("python-nose" ,python-nose)
12089 ("python-rednose" ,python-rednose)))
12090 (home-page "https://github.com/noirbizarre/flask-restplus")
12091 (synopsis "Framework for documented API development with Flask")
12092 (description "This package provides a framework for API development with
12093the Flask web framework in Python. It is similar to package
12094@code{python-flask-restful} but supports the @code{python-swagger}
12095documentation builder.")
12096 (license license:expat)))
1ed21519
DM
12097
12098(define-public python-sadisplay
12099 (package
12100 (name "python-sadisplay")
12101 (version "0.4.6")
12102 (source
12103 (origin
12104 (method url-fetch)
12105 (uri (pypi-uri "sadisplay" version))
12106 (sha256
12107 (base32
12108 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
12109 (build-system python-build-system)
12110 (propagated-inputs
12111 `(("python-sqlalchemy" ,python-sqlalchemy)))
12112 (native-inputs
12113 `(("python-nose" ,python-nose)))
12114 (home-page "https://bitbucket.org/estin/sadisplay")
12115 (synopsis "SQLAlchemy schema displayer")
12116 (description "This package provides a program to build Entity
12117Relationship diagrams from a SQLAlchemy model (or directly from the
12118database).")
12119 (license license:bsd-3)))
12120
12121(define-public python2-sadisplay
12122 (package-with-python2 python-sadisplay))
444a79b6
DM
12123
12124(define-public python-flask-restful-swagger
12125 (package
12126 (name "python-flask-restful-swagger")
12127 (version "0.19")
12128 (source
12129 (origin
12130 (method url-fetch)
12131 (uri (pypi-uri "flask-restful-swagger" version))
12132 (sha256
12133 (base32
12134 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
12135 (build-system python-build-system)
12136 (propagated-inputs
12137 `(("python-flask-restful" ,python-flask-restful)))
12138 (home-page "https://github.com/rantav/flask-restful-swagger")
12139 (synopsis "Extract Swagger specs from Flask-Restful projects")
12140 (description "This package lets you extract Swagger API documentation
12141specs from your Flask-Restful projects.")
12142 (license license:expat)))
12143
12144(define-public python2-flask-restful-swagger
12145 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
12146
12147(define-public python-argcomplete
12148 (package
12149 (name "python-argcomplete")
12150 (version "1.7.0")
12151 (source
12152 (origin
12153 (method url-fetch)
12154 (uri (pypi-uri "argcomplete" version))
12155 (sha256
12156 (base32
12157 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
12158 (build-system python-build-system)
12159 (home-page "https://github.com/kislyuk/argcomplete")
12160 (synopsis "Shell tab completion for Python argparse")
12161 (description "argcomplete provides extensible command line tab completion
12162of arguments and options for Python scripts using @code{argparse}. It's
12163particularly useful for programs with many options or sub-parsers that can
12164dynamically suggest completions; for example, when browsing resources over the
12165network.")
12166 (license license:asl2.0)))
12167
12168(define-public python2-argcomplete
12169 (package-with-python2 python-argcomplete))