gnu: python-pexpect: Update to 4.2.1.
[jackhill/guix/guix.git] / gnu / packages / python.scm
CommitLineData
a01b6da7
NK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
48b311b1 3;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
8e451885 4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
e99f4211 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
a480bc41 6;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
da6ce3f1 7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
e99f4211 8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
d95a56c6 9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
534db463 10;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
0bdc1671 11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
2b2f2fc1 13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
6a44697d 14;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
02a8a187 15;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
b9893908 16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
264ae686 17;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
1872f1bb 18;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
daeeea71 19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
b31fbea5 20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
88bb4197 21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
b8fdbca3 22;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
0de78c95 23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
9250b0f3 24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
47d0b292 25;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
42c4b246 26;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
6eb7af2a 27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
3f641af0 28;;; Copyright © 2016 David Craven <david@craven.ch>
dddcb25c 29;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
4efb9c54 30;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
b04a52a6 31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
ee5fb7ee 32;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
2f6dd9cd 33;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
d3eff97a 34;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
6c2e82bc 35;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
a01b6da7
NK
36;;;
37;;; This file is part of GNU Guix.
38;;;
39;;; GNU Guix is free software; you can redistribute it and/or modify it
40;;; under the terms of the GNU General Public License as published by
41;;; the Free Software Foundation; either version 3 of the License, or (at
42;;; your option) any later version.
43;;;
44;;; GNU Guix is distributed in the hope that it will be useful, but
45;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47;;; GNU General Public License for more details.
48;;;
49;;; You should have received a copy of the GNU General Public License
50;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51
1ffa7090 52(define-module (gnu packages python)
3f641af0 53 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 54 #:use-module (gnu packages)
8e451885 55 #:use-module (gnu packages algebra)
d79a343b 56 #:use-module (gnu packages adns)
89b2e0b0 57 #:use-module (gnu packages attr)
d96034ed 58 #:use-module (gnu packages backup)
3969ca54 59 #:use-module (gnu packages bash)
1ffa7090 60 #:use-module (gnu packages compression)
4ed20663 61 #:use-module (gnu packages databases)
ddc63a56 62 #:use-module (gnu packages django)
5e1c9367 63 #:use-module (gnu packages file)
4ed20663 64 #:use-module (gnu packages fontutils)
4ed20663
AE
65 #:use-module (gnu packages gcc)
66 #:use-module (gnu packages ghostscript)
6eb7af2a 67 #:use-module (gnu packages gl)
4ed20663 68 #:use-module (gnu packages glib)
6eb7af2a 69 #:use-module (gnu packages gstreamer)
4ed20663 70 #:use-module (gnu packages gtk)
421a80a2 71 #:use-module (gnu packages icu4c)
c937562e 72 #:use-module (gnu packages image)
4ed20663 73 #:use-module (gnu packages imagemagick)
d79a343b 74 #:use-module (gnu packages libevent)
b10ab723 75 #:use-module (gnu packages libffi)
89b2e0b0 76 #:use-module (gnu packages linux)
ed118043 77 #:use-module (gnu packages man)
0da98533 78 #:use-module (gnu packages maths)
4ed20663 79 #:use-module (gnu packages multiprecision)
45203542 80 #:use-module (gnu packages networking)
be7134bf 81 #:use-module (gnu packages ncurses)
b04a52a6 82 #:use-module (gnu packages openstack)
d488d5d6 83 #:use-module (gnu packages password-utils)
c9b1b4f9 84 #:use-module (gnu packages pcre)
4ed20663 85 #:use-module (gnu packages perl)
b10ab723 86 #:use-module (gnu packages pkg-config)
06ff0837 87 #:use-module (gnu packages protobuf)
4ed20663 88 #:use-module (gnu packages readline)
6eb7af2a 89 #:use-module (gnu packages sdl)
c9b1b4f9 90 #:use-module (gnu packages statistics)
8f9ac901 91 #:use-module (gnu packages tex)
1c65314c 92 #:use-module (gnu packages texinfo)
cc2b77df 93 #:use-module (gnu packages tls)
e25f0174 94 #:use-module (gnu packages version-control)
02f8f804 95 #:use-module (gnu packages video)
8d12be1e 96 #:use-module (gnu packages web)
ce0614dd 97 #:use-module (gnu packages base)
26b307e2 98 #:use-module (gnu packages xml)
6fa14469 99 #:use-module (gnu packages xorg)
0bdc1671 100 #:use-module (gnu packages xdisorg)
4ed20663 101 #:use-module (gnu packages zip)
afa181ff 102 #:use-module (gnu packages tcl)
63bcec71 103 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
104 #:use-module (guix packages)
105 #:use-module (guix download)
ea5456c8 106 #:use-module (guix git-download)
11bb85a1 107 #:use-module (guix utils)
acc26ff1 108 #:use-module (guix build-system gnu)
d8c4998f 109 #:use-module (guix build-system cmake)
898238b9 110 #:use-module (guix build-system python)
1c65314c
FB
111 #:use-module (guix build-system trivial)
112 #:use-module (srfi srfi-1))
a01b6da7 113
45848023 114(define-public python-2.7
a01b6da7
NK
115 (package
116 (name "python")
f0499100 117 (version "2.7.12")
a01b6da7
NK
118 (source
119 (origin
120 (method url-fetch)
9b43a0ff 121 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
122 version "/Python-" version ".tar.xz"))
123 (sha256
124 (base32
f0499100 125 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
126 (patches (search-patches "python-2.7-search-paths.patch"
127 "python-2-deterministic-build-info.patch"
15e57f57 128 "python-2.7-site-prefixes.patch"
c3052d6b 129 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
130 (modules '((guix build utils)))
131 ;; suboptimal to delete failing tests here, but if we delete them in the
132 ;; arguments then we need to make sure to strip out that phase when it
133 ;; gets inherited by python and python-minimal.
134 (snippet
135 '(begin
136 (for-each delete-file
137 '("Lib/test/test_compileall.py"
f0499100 138 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
139 "Lib/test/test_distutils.py"
140 "Lib/test/test_import.py"
141 "Lib/test/test_shutil.py"
142 "Lib/test/test_socket.py"
1bb163b0 143 "Lib/test/test_subprocess.py"))
10a42aa2 144 #t))))
02f0c3b2
LC
145 (outputs '("out"
146 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 147 (build-system gnu-build-system)
3fdc99da 148 (arguments
10a42aa2 149 `(;; 356 tests OK.
e7e7a1eb
EF
150 ;; 6 tests failed:
151 ;; test_compileall test_distutils test_import test_shutil test_socket
152 ;; test_subprocess
153 ;; 39 tests skipped:
ff6f33cf
ED
154 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
155 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
156 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
157 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
158 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
159 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
160 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
161 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
162 ;; test_winreg test_winsound test_zipfile64
163 ;; 4 skips unexpected on linux2:
164 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 165 #:test-target "test"
3fdc99da 166 #:configure-flags
6a20289d
LC
167 (list "--enable-shared" ;allow embedding
168 "--with-system-ffi" ;build ctypes
aaf75c89 169 "--with-ensurepip=install" ;install pip and setuptools
6a20289d
LC
170 (string-append "LDFLAGS=-Wl,-rpath="
171 (assoc-ref %outputs "out") "/lib"))
fd982732 172
d2cc9c7c
LC
173 #:modules ((ice-9 ftw) (ice-9 match)
174 (guix build utils) (guix build gnu-build-system))
fd982732 175 #:phases
46472ecd
MW
176 (modify-phases %standard-phases
177 (add-before
178 'configure 'patch-lib-shells
179 (lambda _
180 ;; Filter for existing files, since some may not exist in all
181 ;; versions of python that are built with this recipe.
182 (substitute* (filter file-exists?
183 '("Lib/subprocess.py"
184 "Lib/popen2.py"
185 "Lib/distutils/tests/test_spawn.py"
186 "Lib/test/test_subprocess.py"))
187 (("/bin/sh") (which "sh")))
dedc8320
LC
188
189 ;; Use zero as the timestamp in .pyc files so that builds are
190 ;; deterministic. TODO: Remove it when this variable is set in
191 ;; gnu-build-system.scm.
a665996f 192 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 193 #t))
5b4e2791
LC
194 (add-before 'configure 'do-not-record-configure-flags
195 (lambda* (#:key configure-flags #:allow-other-keys)
196 ;; Remove configure flags from the installed '_sysconfigdata.py'
197 ;; and 'Makefile' so we don't end up keeping references to the
198 ;; build tools.
199 ;;
200 ;; Preserve at least '--with-system-ffi' since otherwise the
201 ;; thing tries to build libffi, fails, and we end up with a
202 ;; Python that lacks ctypes.
203 (substitute* "configure"
204 (("^CONFIG_ARGS=.*$")
205 (format #f "CONFIG_ARGS='~a'\n"
206 (if (member "--with-system-ffi" configure-flags)
207 "--with-system-ffi"
208 ""))))
209 #t))
46472ecd
MW
210 (add-before
211 'check 'pre-check
212 (lambda _
213 ;; 'Lib/test/test_site.py' needs a valid $HOME
214 (setenv "HOME" (getcwd))
215 #t))
216 (add-after
217 'unpack 'set-source-file-times-to-1980
218 ;; XXX One of the tests uses a ZIP library to pack up some of the
219 ;; source tree, and fails with "ZIP does not support timestamps
220 ;; before 1980". Work around this by setting the file times in the
221 ;; source tree to sometime in early 1980.
222 (lambda _
223 (let ((circa-1980 (* 10 366 24 60 60)))
224 (ftw "." (lambda (file stat flag)
225 (utime file circa-1980 circa-1980)
226 #t))
02f0c3b2 227 #t)))
9ffe61b0
LC
228 (add-after 'install 'remove-tests
229 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
230 ;; because these files are used by some libraries out there.
231 (lambda* (#:key outputs #:allow-other-keys)
232 (let ((out (assoc-ref outputs "out")))
233 (match (scandir (string-append out "/lib")
234 (lambda (name)
235 (string-prefix? "python" name)))
236 ((pythonX.Y)
237 (let ((testdir (string-append out "/lib/" pythonX.Y
238 "/test")))
239 (with-directory-excursion testdir
240 (for-each delete-file-recursively
241 (scandir testdir
242 (match-lambda
243 ((or "." "..") #f)
244 (file
245 (not
246 (string-prefix? "test_support."
247 file))))))
248 (call-with-output-file "__init__.py" (const #t))
249 #t)))))))
216c283b
LC
250 (add-before 'strip 'make-libraries-writable
251 (lambda* (#:key outputs #:allow-other-keys)
252 ;; Make .so files writable so they can be stripped.
253 (let ((out (assoc-ref outputs "out")))
254 (for-each (lambda (file)
255 (chmod file #o755))
256 (find-files (string-append out "/lib")
257 "\\.so"))
258 #t)))
02f0c3b2
LC
259 (add-after 'install 'move-tk-inter
260 (lambda* (#:key outputs #:allow-other-keys)
261 ;; When Tkinter support is built move it to a separate output so
262 ;; that the main output doesn't contain a reference to Tcl/Tk.
263 (let ((out (assoc-ref outputs "out"))
264 (tk (assoc-ref outputs "tk")))
265 (when tk
266 (match (find-files out "tkinter.*\\.so")
267 ((tkinter.so)
268 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
269 ;; want it under TK/lib/pythonX.Y/site-packages.
270 (let* ((len (string-length out))
271 (target (string-append
272 tk "/"
273 (string-drop
274 (dirname (dirname tkinter.so))
275 len)
276 "/site-packages")))
277 (install-file tkinter.so target)
278 (delete-file tkinter.so)))))
279 #t))))))
a01b6da7 280 (inputs
3fdc99da
CR
281 `(("bzip2" ,bzip2)
282 ("gdbm" ,gdbm)
b10ab723 283 ("libffi" ,libffi) ; for ctypes
b88e1b0a 284 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 285 ("openssl" ,openssl)
3fdc99da 286 ("readline" ,readline)
afa181ff
LC
287 ("zlib" ,zlib)
288 ("tcl" ,tcl)
289 ("tk" ,tk))) ; for tkinter
b10ab723
CR
290 (native-inputs
291 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
292 (native-search-paths
293 (list (search-path-specification
294 (variable "PYTHONPATH")
af070955 295 (files '("lib/python2.7/site-packages")))))
f0499100 296 (home-page "https://www.python.org")
afa181ff 297 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
298 (description
299 "Python is a remarkably powerful dynamic programming language that
300is used in a wide variety of application domains. Some of its key
301distinguishing features include: clear, readable syntax; strong
302introspection capabilities; intuitive object orientation; natural
303expression of procedural code; full modularity, supporting hierarchical
304packages; exception-based error handling; and very high level dynamic
305data types.")
3f641af0 306 (license license:psfl)))
acc26ff1 307
45848023
HG
308;; Current 2.x version.
309(define-public python-2 python-2.7)
310
72df6680 311(define-public python-3.5
b24d1cfc 312 (package (inherit python-2)
72df6680 313 (version "3.5.2")
717003e3
LC
314 (source (origin
315 (method url-fetch)
316 (uri (string-append "https://www.python.org/ftp/python/"
317 version "/Python-" version ".tar.xz"))
fc1adab1
AK
318 (patches (search-patches
319 "python-fix-tests.patch"
72df6680 320 "python-3.5-fix-tests.patch"
fc1adab1
AK
321 "python-3-deterministic-build-info.patch"
322 "python-3-search-paths.patch"))
717003e3
LC
323 (patch-flags '("-p0"))
324 (sha256
325 (base32
72df6680 326 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
327 (arguments (substitute-keyword-arguments (package-arguments python-2)
328 ((#:tests? _) #t)))
1aebc0cb
AE
329 (native-search-paths
330 (list (search-path-specification
331 (variable "PYTHONPATH")
0e05d01e
SB
332 (files (list (string-append "lib/python"
333 (version-major+minor version)
334 "/site-packages"))))))))
f26a77ff 335
72df6680
LF
336(define-public python-3.4
337 (package (inherit python-3.5)
338 (version "3.4.5")
339 (source (origin
340 (method url-fetch)
341 (uri (string-append "https://www.python.org/ftp/python/"
342 version "/Python-" version ".tar.xz"))
343 (patches (search-patches
344 "python-fix-tests.patch"
345 "python-3.4-fix-tests.patch"
346 "python-3-deterministic-build-info.patch"
347 "python-3-search-paths.patch"))
348 (patch-flags '("-p0"))
349 (sha256
350 (base32
351 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
352
45848023 353;; Current 3.x version.
72df6680 354(define-public python-3 python-3.5)
45848023
HG
355
356;; Current major version.
357(define-public python python-3)
358
95288fcc
LC
359;; Minimal variants of Python, mostly used to break the cycle between Tk and
360;; Python (Tk -> libxcb -> Python.)
361
362(define-public python2-minimal
363 (package (inherit python-2)
364 (name "python-minimal")
02f0c3b2 365 (outputs '("out"))
95288fcc
LC
366 (arguments
367 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
368 ((#:configure-flags cf)
369 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
370 (inputs '()))) ;none of the optional dependencies
371
372(define-public python-minimal
898238b9 373 (package (inherit python)
95288fcc 374 (name "python-minimal")
02f0c3b2 375 (outputs '("out"))
95288fcc 376
d0b73960 377 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
378 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
379 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
380 (inputs `(("libffi" ,libffi)
381 ("openssl" ,openssl)
95288fcc
LC
382 ("zlib" ,zlib)))))
383
64cb064c
LC
384(define* (wrap-python3 python
385 #:optional
386 (name (string-append (package-name python) "-wrapper")))
898238b9 387 (package (inherit python)
95288fcc 388 (name name)
898238b9
AE
389 (source #f)
390 (build-system trivial-build-system)
02f0c3b2 391 (outputs '("out"))
3969ca54 392 (inputs `(("bash" ,bash)))
3c0f2329 393 (propagated-inputs `(("python" ,python)))
898238b9
AE
394 (arguments
395 `(#:modules ((guix build utils))
396 #:builder
397 (begin
398 (use-modules (guix build utils))
399 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
400 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
401 (mkdir-p bin)
402 (for-each
403 (lambda (old new)
404 (symlink (string-append python old)
405 (string-append bin "/" new)))
3969ca54
SB
406 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
407 `("python" ,"pydoc" ,"idle" ,"pip"))
408 ;; python-config outputs search paths based upon its location,
409 ;; use a bash wrapper to avoid changing its outputs.
410 (let ((bash (string-append (assoc-ref %build-inputs "bash")
411 "/bin/bash"))
412 (old (string-append python "python3-config"))
413 (new (string-append bin "/python-config")))
414 (with-output-to-file new
415 (lambda ()
416 (format #t "#!~a~%" bash)
417 (format #t "exec \"~a\" \"$@\"~%" old)
418 (chmod new #o755)
419 #t)))))))
0d56e3e1
LC
420 (synopsis "Wrapper for the Python 3 commands")
421 (description
422 "This package provides wrappers for the commands of Python@tie{}3.x such
423that they can be invoked under their usual name---e.g., @command{python}
424instead of @command{python3}.")))
425
95288fcc
LC
426(define-public python-wrapper (wrap-python3 python))
427(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 428
aaf625b8
RW
429(define-public python-psutil
430 (package
431 (name "python-psutil")
88535a44 432 (version "4.3.0")
aaf625b8
RW
433 (source
434 (origin
435 (method url-fetch)
f56777be 436 (uri (pypi-uri "psutil" version))
aaf625b8
RW
437 (sha256
438 (base32
88535a44 439 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 440 (build-system python-build-system)
fb08c4fe
MB
441 (arguments
442 ;; FIXME: some tests does not return and times out.
443 '(#:tests? #f))
88535a44 444 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
445 (synopsis "Library for retrieving information on running processes")
446 (description
447 "psutil (Python system and process utilities) is a library for retrieving
448information on running processes and system utilization (CPU, memory, disks,
449network) in Python. It is useful mainly for system monitoring, profiling and
450limiting process resources and management of running processes. It implements
451many functionalities offered by command line tools such as: ps, top, lsof,
452netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
453pidof, tty, taskset, pmap.")
3f641af0 454 (license license:bsd-3)))
aaf625b8
RW
455
456(define-public python2-psutil
457 (package-with-python2 python-psutil))
898238b9 458
f9da1d8a
ED
459(define-public python-passlib
460 (package
461 (name "python-passlib")
1c9f78ec 462 (version "1.7.0")
f9da1d8a
ED
463 (source
464 (origin
465 (method url-fetch)
690e8c66 466 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
467 (sha256
468 (base32
1c9f78ec 469 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
f9da1d8a
ED
470 (build-system python-build-system)
471 (native-inputs
f3b98f4f 472 `(("python-nose" ,python-nose)))
f22efa01 473 (propagated-inputs
f9da1d8a
ED
474 `(("python-py-bcrypt" ,python-py-bcrypt)))
475 (arguments
476 `(#:phases
477 (alist-cons-before
478 'check 'set-PYTHON_EGG_CACHE
479 ;; some tests require access to "$HOME/.cython"
480 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
481 %standard-phases)))
482 (home-page "https://bitbucket.org/ecollins/passlib")
483 (synopsis
484 "Comprehensive password hashing framework")
485 (description
486 "Passlib is a password hashing library for Python 2 & 3, which provides
487cross-platform implementations of over 30 password hashing algorithms, as well
488as a framework for managing existing password hashes. It's designed to be
489useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
490to providing full-strength password hashing for multi-user application.")
3f641af0 491 (license license:bsd-3)))
f9da1d8a
ED
492
493(define-public python2-passlib
494 (package-with-python2 python-passlib))
495
feb0d9c3
ED
496(define-public python-py-bcrypt
497 (package
498 (name "python-py-bcrypt")
499 (version "0.4")
500 (source
501 (origin
502 (method url-fetch)
503 (uri (string-append
504 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
505 version
506 ".tar.gz"))
507 (sha256
508 (base32
509 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
510 (build-system python-build-system)
feb0d9c3
ED
511 (home-page "https://code.google.com/p/py-bcrypt")
512 (synopsis
513 "Bcrypt password hashing and key derivation")
514 (description
515 "A python wrapper of OpenBSD's Blowfish password hashing code. This
516system hashes passwords using a version of Bruce Schneier's Blowfish block
517cipher with modifications designed to raise the cost of off-line password
518cracking and frustrate fast hardware implementation. The computation cost of
519the algorithm is parametised, so it can be increased as computers get faster.
520The intent is to make a compromise of a password database less likely to
521result in an attacker gaining knowledge of the plaintext passwords (e.g. using
522John the Ripper).")
523 ;; "sha2.c" is under BSD-3;
524 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
525 ;; the rest is under ISC.
3f641af0 526 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
527
528(define-public python2-py-bcrypt
529 (package-with-python2 python-py-bcrypt))
530
531
429fdea1
ED
532(define-public python-paramiko
533 (package
534 (name "python-paramiko")
81b9bbbd 535 (version "1.16.0")
429fdea1
ED
536 (source
537 (origin
538 (method url-fetch)
81b9bbbd 539 (uri (pypi-uri "paramiko" version))
429fdea1
ED
540 (sha256
541 (base32
81b9bbbd 542 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1 543 (build-system python-build-system)
49910e6a
MB
544 (arguments
545 '(;; FIXME: One test fails with "EOFError not raised by connect".
546 #:tests? #f))
547 ;; #:phases
548 ;; (modify-phases %standard-phases
549 ;; (replace 'check
550 ;; (lambda _
551 ;; (zero? (system* "python" "test.py")))))))
a3fc12da 552 (propagated-inputs
f22efa01
HG
553 `(("python-pycrypto" ,python-pycrypto)
554 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
555 (home-page "http://www.paramiko.org/")
556 (synopsis "SSHv2 protocol library")
557 (description "Paramiko is a python implementation of the SSHv2 protocol,
558providing both client and server functionality. While it leverages a Python C
559extension for low level cryptography (PyCrypto), Paramiko itself is a pure
560Python interface around SSH networking concepts.")
3f641af0 561 (license license:lgpl2.1+)))
429fdea1
ED
562
563(define-public python2-paramiko
564 (package-with-python2 python-paramiko))
565
566
de73dbf6
ED
567(define-public python-httplib2
568 (package
569 (name "python-httplib2")
286f1bac 570 (version "0.9.2")
de73dbf6
ED
571 (source
572 (origin
573 (method url-fetch)
286f1bac 574 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
575 (sha256
576 (base32
286f1bac 577 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 578 (build-system python-build-system)
286f1bac 579 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
580 (synopsis "Comprehensive HTTP client library")
581 (description
582 "A comprehensive HTTP client library supporting many features left out of
583other HTTP libraries.")
584 (license license:expat)))
585
586(define-public python2-httplib2
587 (package-with-python2 python-httplib2))
588
67039875
ED
589(define-public python-ecdsa
590 (package
591 (name "python-ecdsa")
592 (version "0.13")
593 (source
594 (origin
595 (method url-fetch)
596 (uri (string-append
597 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
598 version
599 ".tar.gz"))
600 (sha256
601 (base32
602 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
603 (build-system python-build-system)
67039875
ED
604 (inputs
605 `(("openssl" ,openssl)))
606 (home-page
607 "http://github.com/warner/python-ecdsa")
608 (synopsis
609 "ECDSA cryptographic signature library (pure python)")
610 (description
611 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
612Curve Digital Signature Algorithm), implemented purely in Python. With this
613library, you can quickly create keypairs (signing key and verifying key), sign
614messages, and verify the signatures. The keys and signatures are very short,
615making them easy to handle and incorporate into other protocols.")
616 (license license:expat)))
617
618(define-public python2-ecdsa
619 (package-with-python2 python-ecdsa))
620
52323f32
ED
621(define-public python-ccm
622 (package
623 (name "python-ccm")
db5567f7 624 (version "2.1.6")
52323f32
ED
625 (source
626 (origin
627 (method url-fetch)
db5567f7 628 (uri (pypi-uri "ccm" version))
52323f32
ED
629 (sha256
630 (base32
db5567f7 631 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 632 (build-system python-build-system)
f22efa01 633 (propagated-inputs
52323f32 634 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
635 ;; Not listed in setup.py, but used in ccmlib/node.py for full
636 ;; functionality
637 ("python-psutil" ,python-psutil)
52323f32
ED
638 ("python-six" ,python-six)))
639 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
640 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
641localhost")
642 (description "Cassandra Cluster Manager is a development tool for testing
643local Cassandra clusters. It creates, launches and removes Cassandra clusters
644on localhost.")
3f641af0 645 (license license:asl2.0)))
52323f32
ED
646
647(define-public python2-ccm
648 (package-with-python2 python-ccm))
649
89114f39 650(define-public python-pytz
acc26ff1 651 (package
89114f39 652 (name "python-pytz")
61c9babb 653 (version "2016.3")
acc26ff1
CR
654 (source
655 (origin
656 (method url-fetch)
61c9babb 657 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
658 (sha256
659 (base32
61c9babb 660 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 661 (build-system python-build-system)
8498b8cf 662 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 663 (home-page "http://pythonhosted.org/pytz")
9e771e3b 664 (synopsis "Python timezone library")
acc26ff1
CR
665 (description
666 "This library allows accurate and cross platform timezone calculations
667using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 668 (license license:expat)))
5ace6e2f 669
89114f39 670(define-public python2-pytz
11bb85a1 671 (package-with-python2 python-pytz))
89114f39 672
fc50e9c6 673
89114f39 674(define-public python-babel
5ace6e2f 675 (package
89114f39 676 (name "python-babel")
3f37db6b 677 (version "2.3.2")
5ace6e2f
CR
678 (source
679 (origin
680 (method url-fetch)
b850a6d8 681 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
682 (sha256
683 (base32
3f37db6b 684 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f 685 (build-system python-build-system)
f22efa01 686 (propagated-inputs
f3b98f4f 687 `(("python-pytz" ,python-pytz)))
8498b8cf 688 (arguments `(#:tests? #f)) ; no test target
e1804763 689 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
690 (synopsis
691 "Tools for internationalizing Python applications")
692 (description
693 "Babel is composed of two major parts:
694- tools to build and work with gettext message catalogs
695- a Python interface to the CLDR (Common Locale Data Repository), providing
696access to various locale display names, localized number and date formatting,
697etc. ")
3f641af0 698 (license license:bsd-3)))
89114f39
AE
699
700(define-public python2-babel
11bb85a1 701 (package-with-python2 python-babel))
73adf220 702
ed377cc6
RW
703(define-public python2-backport-ssl-match-hostname
704 (package
705 (name "python2-backport-ssl-match-hostname")
f2d06d46 706 (version "3.5.0.1")
ed377cc6
RW
707 (source
708 (origin
709 (method url-fetch)
710 (uri (string-append
711 "https://pypi.python.org/packages/source/b/"
712 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
713 version ".tar.gz"))
714 (sha256
715 (base32
f2d06d46 716 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 717 (build-system python-build-system)
f2d06d46
EF
718 (arguments
719 `(#:python ,python-2
720 #:tests? #f)) ; no test target
f2d06d46
EF
721 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
722 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
723 (description
724 "This backport brings the ssl.match_hostname() function to users of
725earlier versions of Python. The function checks the hostname in the
726certificate returned by the server to which a connection has been established,
727and verifies that it matches the intended target hostname.")
3f641af0 728 (license license:psfl)))
ed377cc6 729
ef5cbf9b
RW
730(define-public python-h5py
731 (package
732 (name "python-h5py")
fe147c41 733 (version "2.6.0")
ef5cbf9b
RW
734 (source
735 (origin
736 (method url-fetch)
fe147c41 737 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
738 (sha256
739 (base32
fe147c41 740 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 741 (build-system python-build-system)
797e1401
RW
742 (arguments
743 `(#:tests? #f ; no test target
744 #:phases
745 (modify-phases %standard-phases
746 (add-after 'unpack 'fix-hdf5-paths
747 (lambda* (#:key inputs #:allow-other-keys)
748 (let ((prefix (assoc-ref inputs "hdf5")))
749 (substitute* "setup_build.py"
750 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
751 (string-append "['" prefix "/lib" "']"))
752 (("'/opt/local/include', '/usr/local/include'")
753 (string-append "'" prefix "/include" "'")))
754 (substitute* "setup_configure.py"
755 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
756 (string-append "['" prefix "/lib" "']")))
757 #t))))))
3c4010b1 758 (propagated-inputs
69866690
HG
759 `(("python-six" ,python-six)
760 ("python-numpy" ,python-numpy)))
ef5cbf9b 761 (inputs
69866690 762 `(("hdf5" ,hdf5)))
ef5cbf9b 763 (native-inputs
fe147c41
EF
764 `(("python-cython" ,python-cython)
765 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
766 (home-page "http://www.h5py.org/")
767 (synopsis "Read and write HDF5 files from Python")
768 (description
769 "The h5py package provides both a high- and low-level interface to the
770HDF5 library from Python. The low-level interface is intended to be a
771complete wrapping of the HDF5 API, while the high-level component supports
772access to HDF5 files, datasets and groups using established Python and NumPy
773concepts.")
9820a028 774 (license license:bsd-3)))
ef5cbf9b
RW
775
776(define-public python2-h5py
9820a028 777 (package-with-python2 python-h5py))
ef5cbf9b 778
c1448c69
EB
779(define-public python-lockfile
780 (package
781 (name "python-lockfile")
692add53 782 (version "0.12.2")
c1448c69
EB
783 (source
784 (origin
785 (method url-fetch)
786 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
787 "lockfile-" version ".tar.gz"))
788 (sha256
789 (base32
692add53 790 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
791 (build-system python-build-system)
792 (arguments '(#:test-target "check"))
692add53
BW
793 (native-inputs
794 `(("python-pbr" ,python-pbr)))
6a8f26a4 795 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
796 (synopsis "Platform-independent file locking module")
797 (description
798 "The lockfile package exports a LockFile class which provides a simple
799API for locking files.")
f210e944 800 (license license:expat)))
c1448c69
EB
801
802(define-public python2-lockfile
f210e944 803 (package-with-python2 python-lockfile))
c1448c69 804
5a1a4bf6
EB
805(define-public python-mock
806 (package
807 (name "python-mock")
808 (version "1.0.1")
809 (source
810 (origin
811 (method url-fetch)
812 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
813 "mock-" version ".tar.gz"))
814 (sha256
815 (base32
816 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
817 (build-system python-build-system)
818 (arguments '(#:test-target "check"))
07af3e5e 819 (home-page "http://code.google.com/p/mock/")
9e771e3b 820 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
821 (description
822 "Mock is a library for testing in Python. It allows you to replace parts
823of your system under test with mock objects and make assertions about how they
824have been used.")
bd3fa666 825 (license license:expat)))
5a1a4bf6
EB
826
827(define-public python2-mock
828 (package-with-python2 python-mock))
829
fc50e9c6 830
73adf220
AE
831(define-public python-setuptools
832 (package
833 (name "python-setuptools")
d660f7be 834 (version "31.0.0")
73adf220
AE
835 (source
836 (origin
837 (method url-fetch)
d660f7be 838 (uri (pypi-uri "setuptools" version))
73adf220
AE
839 (sha256
840 (base32
d660f7be 841 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
842 (modules '((guix build utils)))
843 (snippet
844 '(begin
845 ;; Remove included binaries which are used to build self-extracting
846 ;; installers for Windows.
847 ;; TODO: Find some way to build them ourself so we can include them.
848 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
849 #t))))
73adf220 850 (build-system python-build-system)
d3d656c5
AE
851 ;; FIXME: Tests require pytest, which itself relies on setuptools.
852 ;; One could bootstrap with an internal untested setuptools.
73adf220 853 (arguments
824af8ca 854 `(#:tests? #f))
73adf220
AE
855 (home-page "https://pypi.python.org/pypi/setuptools")
856 (synopsis
857 "Library designed to facilitate packaging Python projects")
858 (description
859 "Setuptools is a fully-featured, stable library designed to facilitate
860packaging Python projects, where packaging includes:
861Python package and module definitions,
862distribution package metadata,
863test hooks,
864project installation,
865platform-specific details,
866Python 3 support.")
d660f7be
MB
867 ;; TODO: setuptools now bundles the following libraries:
868 ;; packaging, pyparsing, six and appdirs. How to unbundle?
869 (license (list license:psfl ; setuptools itself
870 license:expat ; six, appdirs, pyparsing
871 license:asl2.0 ; packaging is dual ASL2/BSD-2
872 license:bsd-2))))
73adf220
AE
873
874(define-public python2-setuptools
875 (package-with-python2 python-setuptools))
fc50e9c6
AE
876
877
cafc3f5a
EB
878(define-public python-pycrypto
879 (package
880 (name "python-pycrypto")
881 (version "2.6.1")
882 (source
883 (origin
884 (method url-fetch)
885 (uri (string-append "https://pypi.python.org/packages/source/p/"
886 "pycrypto/pycrypto-" version ".tar.gz"))
887 (sha256
888 (base32
889 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
890 (build-system python-build-system)
cafc3f5a
EB
891 (inputs
892 `(("python" ,python)
893 ("gmp" ,gmp)))
894 (arguments
895 `(#:phases
896 (alist-cons-before
897 'build 'set-build-env
898 ;; pycrypto runs an autoconf configure script behind the scenes
899 (lambda _
900 (setenv "CONFIG_SHELL" (which "bash")))
901 %standard-phases)))
902 (home-page "http://www.pycrypto.org/")
903 (synopsis "Cryptographic modules for Python")
904 (description
905 "Pycrypto is a collection of both secure hash functions (such as SHA256
906and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 907etc.). The package is structured to make adding new modules easy.")
3f641af0 908 (license license:public-domain)))
cafc3f5a 909
345f0611 910(define-public python2-pycrypto
1c0059da
EF
911 (let ((pycrypto (package-with-python2 python-pycrypto)))
912 (package (inherit pycrypto)
913 (inputs
914 `(("python" ,python-2)
915 ,@(alist-delete
916 "python"
917 (package-inputs pycrypto)))))))
345f0611 918
cafc3f5a
EB
919(define-public python-keyring
920 (package
921 (name "python-keyring")
13f3ff35 922 (version "8.7")
cafc3f5a
EB
923 (source
924 (origin
925 (method url-fetch)
664e6c3a 926 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
927 (sha256
928 (base32
13f3ff35 929 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
930 (build-system python-build-system)
931 (native-inputs
13f3ff35 932 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 933 (propagated-inputs
cafc3f5a
EB
934 `(("python-pycrypto" ,python-pycrypto)))
935 (arguments
664e6c3a 936 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 937 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
938 (synopsis "Store and access your passwords safely")
939 (description
940 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 941service from python. It can be used in any application that needs safe
cafc3f5a
EB
942password storage.")
943 ;; "MIT" and PSF dual license
f210e944 944 (license license:x11)))
cafc3f5a 945
d7af1069 946(define-public python2-keyring
f210e944 947 (package-with-python2 python-keyring))
d7af1069 948
a480bc41
EB
949(define-public python-six
950 (package
951 (name "python-six")
b6ab89ef 952 (version "1.10.0")
a480bc41
EB
953 (source
954 (origin
955 (method url-fetch)
b6ab89ef 956 (uri (pypi-uri "six" version))
a480bc41
EB
957 (sha256
958 (base32
b6ab89ef 959 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 960 (build-system python-build-system)
4fd129ee
MB
961 (native-inputs
962 `(("python-py" ,python-py)
963 ("python-pytest" ,python-pytest)))
a480bc41
EB
964 (home-page "http://pypi.python.org/pypi/six/")
965 (synopsis "Python 2 and 3 compatibility utilities")
966 (description
35b9e423 967 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
968functions for smoothing over the differences between the Python versions with
969the goal of writing Python code that is compatible on both Python versions.
35b9e423 970Six supports every Python version since 2.5. It is contained in only one
a480bc41 971Python file, so it can be easily copied into your project.")
3f641af0 972 (license license:x11)))
a480bc41 973
0c20025c
AE
974(define-public python2-six
975 (package-with-python2 python-six))
976
22d7360b 977(define-public python-dateutil
cafc3f5a
EB
978 (package
979 (name "python-dateutil")
394b8060 980 (version "2.5.2")
cafc3f5a
EB
981 (source
982 (origin
983 (method url-fetch)
394b8060 984 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
985 (sha256
986 (base32
394b8060 987 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a 988 (build-system python-build-system)
f22efa01 989 (propagated-inputs
394b8060 990 `(("python-six" ,python-six)))
b5a5fb19 991 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
992 (synopsis "Extensions to the standard datetime module")
993 (description
994 "The dateutil module provides powerful extensions to the standard
995datetime module, available in Python 2.3+.")
f210e944 996 (license license:bsd-3)))
cafc3f5a 997
fc50e9c6
AE
998(define-public python2-dateutil
999 (package-with-python2 python-dateutil))
1d08c01f 1000
cafc3f5a
EB
1001(define-public python-parsedatetime
1002 (package
1003 (name "python-parsedatetime")
eebf6f01 1004 (version "2.1")
cafc3f5a
EB
1005 (source
1006 (origin
1007 (method url-fetch)
eebf6f01 1008 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1009 (sha256
1010 (base32
eebf6f01 1011 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1012 (build-system python-build-system)
1013 (native-inputs
eebf6f01
EF
1014 `(("python-nose" ,python-nose)
1015 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1016 (home-page "http://github.com/bear/parsedatetime/")
1017 (synopsis
1018 "Parse human-readable date/time text")
1019 (description
e881752c 1020 "Parse human-readable date/time text.")
f210e944 1021 (license license:asl2.0)))
cafc3f5a 1022
38b8f9b2 1023(define-public python2-parsedatetime
f210e944 1024 (package-with-python2 python-parsedatetime))
38b8f9b2 1025
d072efcb
RW
1026(define-public python-pandas
1027 (package
1028 (name "python-pandas")
7d0c3c8d 1029 (version "0.18.1")
d072efcb
RW
1030 (source
1031 (origin
1b96f069 1032 (method url-fetch)
7d0c3c8d
EF
1033 (uri (string-append
1034 "https://pypi.python.org/packages/11/09/"
1035 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1036 "pandas-" version ".tar.gz"))
1b96f069 1037 (sha256
7d0c3c8d 1038 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1039 (build-system python-build-system)
d072efcb 1040 (propagated-inputs
f22efa01
HG
1041 `(("python-numpy" ,python-numpy)
1042 ("python-pytz" ,python-pytz)
22d7360b 1043 ("python-dateutil" ,python-dateutil)))
d072efcb 1044 (native-inputs
abcc7a0e
HG
1045 `(("python-nose" ,python-nose)
1046 ("python-cython" ,python-cython)))
d072efcb
RW
1047 (home-page "http://pandas.pydata.org")
1048 (synopsis "Data structures for data analysis, time series, and statistics")
1049 (description
1050 "Pandas is a Python package providing fast, flexible, and expressive data
1051structures designed to make working with structured (tabular,
1052multidimensional, potentially heterogeneous) and time series data both easy
1053and intuitive. It aims to be the fundamental high-level building block for
1054doing practical, real world data analysis in Python.")
f210e944 1055 (license license:bsd-3)))
d072efcb
RW
1056
1057(define-public python2-pandas
f210e944 1058 (package-with-python2 python-pandas))
d072efcb 1059
cafc3f5a
EB
1060(define-public python-tzlocal
1061 (package
1062 (name "python-tzlocal")
ed80839b 1063 (version "1.2.2")
cafc3f5a
EB
1064 (source
1065 (origin
1066 (method url-fetch)
226d3331 1067 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1068 (sha256
1069 (base32
ed80839b 1070 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1071 (build-system python-build-system)
f22efa01
HG
1072 (propagated-inputs
1073 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1074 (home-page "https://github.com/regebro/tzlocal")
1075 (synopsis
35b9e423 1076 "Local timezone information for Python")
cafc3f5a
EB
1077 (description
1078 "Tzlocal returns a tzinfo object with the local timezone information.
1079This module attempts to fix a glaring hole in pytz, that there is no way to
1080get the local timezone information, unless you know the zoneinfo name, and
1081under several distributions that's hard or impossible to figure out.")
3f641af0 1082 (license license:cc0)))
cafc3f5a 1083
1d08c01f
AE
1084(define-public python2-pysqlite
1085 (package
1086 (name "python2-pysqlite")
fe476868 1087 (version "2.8.1")
1d08c01f
AE
1088 (source
1089 (origin
1090 (method url-fetch)
fe476868 1091 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1092 (sha256
1093 (base32
fe476868 1094 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1095 (build-system python-build-system)
1096 (inputs
1097 `(("sqlite" ,sqlite)))
1098 (arguments
1099 `(#:python ,python-2 ; incompatible with Python 3
1100 #:tests? #f)) ; no test target
fe476868 1101 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1102 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1103 (description
1104 "Pysqlite provides SQLite bindings for Python that comply to the
1105Database API 2.0T.")
ed0cdf83 1106 (license license:zlib)))
1d08c01f 1107
2875caf5
AE
1108
1109(define-public python2-mechanize
1110 (package
1111 (name "python2-mechanize")
1112 (version "0.2.5")
1113 (source
1114 (origin
1115 (method url-fetch)
1116 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1117 version ".tar.gz"))
1118 (sha256
1119 (base32
1120 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1121 (build-system python-build-system)
2875caf5
AE
1122 (arguments
1123 `(#:python ,python-2 ; apparently incompatible with Python 3
1124 #:tests? #f))
1125 ;; test fails with message
1126 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1127 ;; (python-3.3.2) or
1128 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1129 ;; (python-2.7.5).
1130 ;; The source code is from March 2011 and probably not up-to-date
1131 ;; with respect to python unit tests.
1132 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1133 (synopsis
1134 "Stateful programmatic web browsing in Python")
1135 (description
1136 "Mechanize implements stateful programmatic web browsing in Python,
1137after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1138 (license (license:non-copyleft
1139 "file://COPYING"
1140 "See COPYING in the distribution."))))
2875caf5 1141
0352532e
AE
1142
1143(define-public python-simplejson
1144 (package
1145 (name "python-simplejson")
b2e6e150 1146 (version "3.10.0")
0352532e
AE
1147 (source
1148 (origin
1149 (method url-fetch)
988d1bad 1150 (uri (pypi-uri "simplejson" version))
0352532e
AE
1151 (sha256
1152 (base32
b2e6e150 1153 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1154 (build-system python-build-system)
1155 (home-page "http://simplejson.readthedocs.org/en/latest/")
1156 (synopsis
1157 "Json library for Python")
1158 (description
e881752c
AK
1159 "JSON (JavaScript Object Notation) is a subset of JavaScript
1160syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1161format.
0352532e
AE
1162
1163Simplejson exposes an API familiar to users of the standard library marshal
1164and pickle modules. It is the externally maintained version of the json
1165library contained in Python 2.6, but maintains compatibility with Python 2.5
1166and (currently) has significant performance advantages, even without using
1167the optional C extension for speedups. Simplejson is also supported on
1168Python 3.3+.")
3f641af0 1169 (license license:x11)))
0352532e
AE
1170
1171(define-public python2-simplejson
1172 (package-with-python2 python-simplejson))
421a80a2
AE
1173
1174
ed07b08d 1175(define-public python-pyicu
421a80a2 1176 (package
ed07b08d 1177 (name "python-pyicu")
d3b29319 1178 (version "1.9.2")
421a80a2
AE
1179 (source
1180 (origin
1181 (method url-fetch)
1182 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1183 version ".tar.gz"))
1184 (sha256
1185 (base32
d3b29319 1186 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1187 (build-system python-build-system)
1188 (inputs
1189 `(("icu4c" ,icu4c)))
421a80a2 1190 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1191 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1192 (description
1193 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1194 (license license:x11)))
ed07b08d
LF
1195
1196(define-public python2-pyicu
f210e944 1197 (package-with-python2 python-pyicu))
cc20a22a
LC
1198
1199(define-public python2-dogtail
1200 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1201 ;; spaces in indentation" with Python 3.
1202 (package
1203 (name "python2-dogtail")
1204 (version "0.8.2")
1205 (source (origin
1206 (method url-fetch)
1207 (uri (string-append
1208 "https://fedorahosted.org/released/dogtail/dogtail-"
1209 version ".tar.gz"))
1210 (sha256
1211 (base32
1212 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1213 (build-system python-build-system)
1214 (arguments `(#:python ,python-2
1215 #:tests? #f)) ; invalid command "test"
1216 (home-page "https://fedorahosted.org/dogtail/")
1217 (synopsis "GUI test tool and automation framework written in ​Python")
1218 (description
35b9e423 1219 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1220It uses Accessibility (a11y) technologies to communicate with desktop
1221applications. dogtail scripts are written in Python and executed like any
1222other Python program.")
3f641af0 1223 (license license:gpl2+)))
515e6878 1224
011b18c3
LC
1225(define-public python2-empy
1226 (package
1227 (name "python2-empy")
1228 (version "3.3")
1229 (source (origin
1230 (method url-fetch)
1231 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1232 version ".tar.gz"))
1233 (sha256
1234 (base32
1235 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1236 (build-system python-build-system)
1237 (arguments
1238 `(#:python ,python-2
1239 #:phases (alist-replace
1240 'check
1241 (lambda _
1242 (zero? (system* "./test.sh")))
1243 %standard-phases)))
1244 (home-page "http://www.alcyone.com/software/empy/")
1245 (synopsis "Templating system for Python")
1246 (description
1247 "EmPy is a system for embedding Python expressions and statements in
1248template text; it takes an EmPy source file, processes it, and produces
1249output. This is accomplished via expansions, which are special signals to the
1cd4027c 1250EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1251EmPy can expand arbitrary Python expressions and statements in this way, as
1252well as a variety of special forms. Textual data not explicitly delimited in
1253this way is sent unaffected to the output, allowing Python to be used in
1254effect as a markup language. Also supported are callbacks via hooks,
1255recording and playback via diversions, and dynamic, chainable filters. The
1256system is highly configurable via command line options and embedded
1257commands.")
3f641af0 1258 (license license:lgpl2.1+)))
011b18c3 1259
8deeda0c
LC
1260(define-public python2-element-tree
1261 (package
1262 (name "python2-element-tree")
1263 (version "1.2.6")
1264 (source (origin
1265 (method url-fetch)
1266 (uri (string-append
1267 "http://effbot.org/media/downloads/elementtree-"
1268 version "-20050316.tar.gz"))
1269 (sha256
1270 (base32
1271 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1272 (build-system python-build-system)
1273 (arguments
1274 `(#:python ,python-2 ; seems to be part of Python 3
1275 #:tests? #f)) ; no 'test' sub-command
1276 (synopsis "Toolkit for XML processing in Python")
1277 (description
1278 "ElementTree is a Python library supporting lightweight XML processing.")
1279 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1280 (license (license:x11-style
1281 "http://docs.python.org/2/license.html"
1282 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1283
1284(define-public python2-pybugz
1285 (package
1286 (name "python2-pybugz")
1287 (version "0.6.11")
1288 (source (origin
1289 (method url-fetch)
1290 (uri (string-append
1291 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1292 version ".tar.gz"))
1293 (sha256
1294 (base32
6f194a1e 1295 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1296 (patches (search-patches "pybugz-stty.patch"
1297 "pybugz-encode-error.patch"))))
8deeda0c
LC
1298 (build-system python-build-system)
1299 (arguments
1300 `(#:python ,python-2 ; SyntaxError with Python 3
1301 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1302 (propagated-inputs
1303 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1304 (synopsis "Python and command-line interface to Bugzilla")
1305 (description
1306 "PyBugz is a Python library and command-line tool to query the Bugzilla
1307bug tracking system. It is meant as an aid to speed up interaction with the
1308bug tracker.")
1309 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1310 (license license:gpl2)))
8deeda0c 1311
a480bc41
EB
1312(define-public python-enum34
1313 (package
1314 (name "python-enum34")
d39ae1e5 1315 (version "1.1.0")
a480bc41
EB
1316 (source
1317 (origin
1318 (method url-fetch)
d39ae1e5 1319 (uri (pypi-uri "enum34" version))
a480bc41
EB
1320 (sha256
1321 (base32
d39ae1e5 1322 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1323 (build-system python-build-system)
a480bc41
EB
1324 (arguments
1325 `(#:phases
1326 (alist-replace
1327 'check
1328 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1329 %standard-phases)))
1330 (home-page "https://pypi.python.org/pypi/enum34")
1331 (synopsis "Backported Python 3.4 Enum")
1332 (description
1333 "Enum34 is the new Python stdlib enum module available in Python 3.4
1334backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1335 (license license:bsd-3)))
a480bc41 1336
820acd1b
LF
1337(define-public python2-enum34
1338 (package-with-python2 python-enum34))
1339
a480bc41
EB
1340(define-public python-parse-type
1341 (package
1342 (name "python-parse-type")
1343 (version "0.3.4")
1344 (source
1345 (origin
1346 (method url-fetch)
1347 (uri (string-append "https://pypi.python.org/packages/source/p/"
1348 "parse_type/parse_type-" version ".tar.gz"))
1349 (sha256
1350 (base32
1351 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1352 (build-system python-build-system)
f22efa01 1353 (propagated-inputs
f3b98f4f 1354 `(("python-six" ,python-six)
68f1cdec 1355 ("python-parse" ,python-parse)))
a480bc41
EB
1356 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1357 (home-page "https://github.com/jenisys/parse_type")
1358 (synopsis "Extended parse module")
1359 (description
1360 "Parse_type extends the python parse module.")
3f641af0 1361 (license license:bsd-3)))
a480bc41
EB
1362
1363(define-public python-parse
1364 (package
1365 (name "python-parse")
eb3d3503 1366 (version "1.6.6")
a480bc41
EB
1367 (source
1368 (origin
1369 (method url-fetch)
eb3d3503 1370 (uri (pypi-uri "parse" version))
a480bc41
EB
1371 (sha256
1372 (base32
aa6c09ed
EF
1373 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1374 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1375 (build-system python-build-system)
1376 (arguments
1377 `(#:phases
f9a65318
EF
1378 (modify-phases %standard-phases
1379 (replace 'check
1380 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1381 (home-page "https://github.com/r1chardj0n3s/parse")
1382 (synopsis "Parse strings")
1383 (description
1384 "Parse strings using a specification based on the Python format()
1385syntax.")
3f641af0 1386 (license license:x11)))
a480bc41 1387
d3eff97a
JL
1388(define-public python-polib
1389 (package
1390 (name "python-polib")
1391 (version "1.0.8")
1392 (source (origin
1393 (method url-fetch)
1394 (uri (pypi-uri "polib" version))
1395 (sha256
1396 (base32
1397 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1398 (build-system python-build-system)
1399 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1400 (synopsis "Manipulate, create and modify gettext files")
1401 (description "Polib can manipulate any gettext format (po, pot and mo)
1402files. It can be used to create po files from scratch or to modify
1403existing ones.")
1404 (license license:expat)))
1405
1406(define-public python2-polib
1407 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1408 (package
1409 (inherit base)
1410 (arguments `(,@(package-arguments base)
1411 ;; Tests don't work with python2.
1412 #:tests? #f)))))
a480bc41 1413
515e6878
LC
1414(define-public scons
1415 (package
1416 (name "scons")
a3f61425 1417 (version "2.3.4")
515e6878
LC
1418 (source (origin
1419 (method url-fetch)
de67e922
LF
1420 (uri (string-append "mirror://sourceforge/scons/scons/" version
1421 "/scons-" version ".tar.gz"))
515e6878
LC
1422 (sha256
1423 (base32
a3f61425 1424 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1425 (build-system python-build-system)
1426 (arguments
1427 ;; With Python 3.x, fails to build with a syntax error.
1428 `(#:python ,python-2
b3e8b4bd 1429 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1430 #:tests? #f)) ; no 'python setup.py test' command
1431 (home-page "http://scons.org/")
1432 (synopsis "Software construction tool written in Python")
1433 (description
1434 "SCons is a software construction tool. Think of SCons as an improved,
1435cross-platform substitute for the classic Make utility with integrated
1436functionality similar to autoconf/automake and compiler caches such as ccache.
1437In short, SCons is an easier, more reliable and faster way to build
1438software.")
3f641af0 1439 (license license:x11)))
011b18c3 1440
c15a5c0e
DT
1441(define-public python-extras
1442 (package
1443 (name "python-extras")
1444 (version "0.0.3")
1445 (source
1446 (origin
1447 (method url-fetch)
1448 (uri (string-append
1449 "https://pypi.python.org/packages/source/e/extras/extras-"
1450 version ".tar.gz"))
1451 (sha256
1452 (base32
1453 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1454 (build-system python-build-system)
c15a5c0e
DT
1455 (arguments
1456 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1457 '(#:tests? #f))
1458 (home-page "https://github.com/testing-cabal/extras")
1459 (synopsis "Useful extensions to the Python standard library")
1460 (description
1461 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1462 (license license:expat)))
c15a5c0e
DT
1463
1464(define-public python2-extras
1465 (package-with-python2 python-extras))
1466
56ea0efd
DT
1467(define-public python-mimeparse
1468 (package
1469 (name "python-mimeparse")
1470 (version "0.1.4")
1471 (source
1472 (origin
1473 (method url-fetch)
1474 (uri (string-append
1475 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1476 version ".tar.gz"))
1477 (sha256
1478 (base32
1479 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1480 (build-system python-build-system)
56ea0efd
DT
1481 (arguments
1482 '(#:tests? #f)) ; no setup.py test command
1483 (home-page
1484 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1485 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1486 (description
1487 "Mimeparse provides basic functions for parsing MIME type names and
1488matching them against a list of media-ranges.")
bd3fa666 1489 (license license:expat)))
56ea0efd
DT
1490
1491(define-public python2-mimeparse
1492 (package-with-python2 python-mimeparse))
1493
4435427e
DT
1494(define-public python-nose
1495 (package
1496 (name "python-nose")
f7cb9841 1497 (version "1.3.7")
4435427e
DT
1498 (source
1499 (origin
1500 (method url-fetch)
f7cb9841 1501 (uri (pypi-uri "nose" version))
4435427e
DT
1502 (sha256
1503 (base32
f7cb9841 1504 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1505 (build-system python-build-system)
4435427e
DT
1506 (arguments
1507 '(#:tests? #f)) ; FIXME: test suite fails
1508 (home-page "http://readthedocs.org/docs/nose/")
1509 (synopsis "Python testing library")
1510 (description
1511 "Nose extends the unittest library to make testing easier.")
3f641af0 1512 (license license:lgpl2.0+)))
4435427e
DT
1513
1514(define-public python2-nose
1515 (package-with-python2 python-nose))
1516
0aea283a
EF
1517(define-public python-nose2
1518 (package
1519 (name "python-nose2")
1520 (version "0.6.5")
1521 (source
1522 (origin
1523 (method url-fetch)
1524 (uri (pypi-uri "nose2" version))
1525 (sha256
1526 (base32
1527 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1528 (build-system python-build-system)
1529 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1530 (propagated-inputs
0aea283a
EF
1531 `(("python-cov-core" ,python-cov-core)
1532 ("python-pytest-cov" ,python-pytest-cov)
1533 ("python-six" ,python-six)))
1534 (home-page "https://github.com/nose-devs/nose2")
1535 (synopsis "Next generation of nicer testing for Python")
1536 (description
1537 "Nose2 is the next generation of nicer testing for Python, based on the
1538plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1539better plugin api, being easier for users to configure, and simplifying internal
1540interfaces and processes.")
1541 (license license:bsd-2)))
1542
1543(define-public python2-nose2
1544 (package-with-python2 python-nose2))
1545
6cd9c356
DT
1546(define-public python-unittest2
1547 (package
1548 (name "python-unittest2")
1549 (version "0.5.1")
1550 (source
1551 (origin
1552 (method url-fetch)
1553 (uri (string-append
1554 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1555 version ".tar.gz"))
1556 (sha256
1557 (base32
1558 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1559 (build-system python-build-system)
6cd9c356
DT
1560 (home-page "http://pypi.python.org/pypi/unittest2")
1561 (synopsis "Python unit testing library")
1562 (description
1563 "Unittest2 is a replacement for the unittest module in the Python
1564standard library.")
3f641af0 1565 (license license:psfl)))
6cd9c356
DT
1566
1567(define-public python2-unittest2
1568 (package (inherit python-unittest2)
1569 (name "python2-unittest2")
1570 (version "0.5.1")
1571 (source
1572 (origin
1573 (method url-fetch)
1574 (uri (string-append
1575 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1576 version ".tar.gz"))
1577 (sha256
1578 (base32
1579 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1580 (arguments
1581 `(#:python ,python-2
1582 #:tests? #f)))) ; no setup.py test command
1583
02f8f804 1584(define-public python-pafy
1585 (package
1586 (name "python-pafy")
1587 (version "0.5.2")
1588 (source
1589 (origin
1590 (method url-fetch)
1591 (uri (pypi-uri "pafy" version))
1592 (sha256
1593 (base32
1594 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1595 (build-system python-build-system)
ed3fee5f 1596 (arguments
1597 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1598 (propagated-inputs
1599 ;; Youtube-dl is a python package which is imported in the file
1600 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1601 `(("youtube-dl" ,youtube-dl)))
1602 (home-page "https://np1.github.io/pafy/")
1603 (synopsis "Retrieve YouTube content and metadata")
1604 (description
1605 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1606 (license license:lgpl3+)))
1607
542ad60f
DT
1608(define-public python-py
1609 (package
1610 (name "python-py")
71c8a804 1611 (version "1.4.31")
542ad60f
DT
1612 (source
1613 (origin
1614 (method url-fetch)
71c8a804 1615 (uri (pypi-uri "py" version))
542ad60f
DT
1616 (sha256
1617 (base32
71c8a804 1618 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f 1619 (build-system python-build-system)
dcb0da7b
MB
1620 (arguments
1621 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1622 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1623 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1624 ;; Is this module globally installed?"
1625 '(#:tests? #f))
542ad60f
DT
1626 (home-page "http://pylib.readthedocs.org/")
1627 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1628 (description
1629 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1630code introspection, and logging.")
bd3fa666 1631 (license license:expat)))
542ad60f
DT
1632
1633(define-public python2-py
1634 (package-with-python2 python-py))
1635
855d4761
DT
1636(define-public python-pytest
1637 (package
1638 (name "python-pytest")
61a4332d 1639 (version "2.7.3")
855d4761
DT
1640 (source
1641 (origin
1642 (method url-fetch)
1643 (uri (string-append
1644 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1645 version ".tar.gz"))
1646 (sha256
1647 (base32
61a4332d 1648 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1649 (modules '((guix build utils)))
1650 (snippet
1651 ;; One of the tests involves the /usr directory, so it fails.
1652 '(substitute* "testing/test_argcomplete.py"
1653 (("def test_remove_dir_prefix\\(self\\):")
1654 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1655 (build-system python-build-system)
482d9591
HG
1656 (propagated-inputs
1657 `(("python-py" ,python-py)))
e7881f3d 1658 (native-inputs
482d9591 1659 `(("python-nose" ,python-nose)
855d4761
DT
1660 ("python-mock" ,python-mock)))
1661 (home-page "http://pytest.org")
1662 (synopsis "Python testing library")
1663 (description
1664 "Pytest is a testing tool that provides auto-discovery of test modules
1665and functions, detailed info on failing assert statements, modular fixtures,
1666and many external plugins.")
bd3fa666 1667 (license license:expat)))
855d4761
DT
1668
1669(define-public python2-pytest
1670 (package-with-python2 python-pytest))
1671
fca4ff35
LF
1672;; This package is used by Borg until we can upgrade all our Python packages to
1673;; use a more recent pytest.
1674(define-public python-pytest-2.9.2
1675 (package
1676 (inherit python-pytest)
1677 (name "python-pytest")
1678 (version "2.9.2")
1679 (source (origin
1680 (method url-fetch)
1681 (uri (pypi-uri "pytest" version))
1682 (sha256
1683 (base32
1684 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1685 (arguments
1686 `(#:phases
1687 (modify-phases %standard-phases
1688 (add-before 'check 'disable-invalid-test
1689 (lambda _
1690 (substitute* "testing/test_argcomplete.py"
1691 (("def test_remove_dir_prefix" line)
1692 (string-append "@pytest.mark.skip"
1693 "(reason=\"Assumes that /usr exists.\")\n "
1694 line)))
1695 #t)))))))
1696
358c3d61
EF
1697(define-public python-pytest-cov
1698 (package
1699 (name "python-pytest-cov")
545f4a1c 1700 (version "2.2.1")
358c3d61
EF
1701 (source
1702 (origin
1703 (method url-fetch)
1704 (uri (pypi-uri "pytest-cov" version))
1705 (sha256
545f4a1c
EF
1706 (base32
1707 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1708 (build-system python-build-system)
ce40b383
HG
1709 (arguments
1710 `(#:phases
1711 (modify-phases %standard-phases
1712 (replace 'check
1713 (lambda _
1714 ;; options taken from tox.ini
1715 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1716 ;; with "Duplicate implicit target name"
1717 (zero? (system* "python" "./setup.py" "check"
1718 "--strict" "--metadata")))))))
f22efa01 1719 (propagated-inputs
10468636
EF
1720 `(("python-coverage" ,python-coverage)
1721 ("python-pytest" ,python-pytest)))
10468636
EF
1722 (home-page "https://github.com/pytest-dev/pytest-cov")
1723 (synopsis "Pytest plugin for measuring coverage")
1724 (description
1725 "Pytest-cov produces coverage reports. It supports centralised testing and
1726distributed testing in both @code{load} and @code{each} modes. It also
1727supports coverage of subprocesses.")
f210e944 1728 (license license:expat)))
358c3d61
EF
1729
1730(define-public python2-pytest-cov
f210e944 1731 (package-with-python2 python-pytest-cov))
358c3d61 1732
6784f2e3
RW
1733(define-public python-pytest-runner
1734 (package
1735 (name "python-pytest-runner")
1736 (version "2.6.2")
1737 (source
1738 (origin
1739 (method url-fetch)
54cd239b 1740 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1741 (sha256
1742 (base32
1743 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1744 (build-system python-build-system)
1745 (arguments
1746 `(#:phases
1747 (modify-phases %standard-phases
1748 ;; The fancy way of setting the version with setuptools_scm does not
1749 ;; seem to work here.
1750 (add-after 'unpack 'set-version
1751 (lambda _
1752 (substitute* "docs/conf.py"
1753 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1754 (string-append "version = \"" ,version "\"")))
1755 #t)))))
1756 (native-inputs
1757 `(("python-pytest" ,python-pytest)
1758 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1759 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1760 (synopsis "Invoke py.test as a distutils command")
1761 (description
1762 "This package provides a @command{pytest-runner} command that
1763@file{setup.py} files can use to run tests.")
f210e944 1764 (license license:expat)))
54cd239b
EF
1765
1766(define-public python2-pytest-runner
f210e944 1767 (package-with-python2 python-pytest-runner))
6784f2e3 1768
44547e51
EF
1769(define-public python-pytest-mock
1770 (package
1771 (name "python-pytest-mock")
1772 (version "1.2")
1773 (source
1774 (origin
1775 (method url-fetch)
1776 (uri (pypi-uri "pytest-mock" version ".zip"))
1777 (sha256
1778 (base32
1779 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1780 (build-system python-build-system)
1781 (native-inputs
1782 `(("unzip" ,unzip)))
f22efa01 1783 (propagated-inputs
d5e41cf2 1784 `(("python-pytest" ,python-pytest)))
44547e51
EF
1785 (home-page "https://github.com/pytest-dev/pytest-mock/")
1786 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1787 (description
1788 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1789around the patching API provided by the @code{mock} package, but with the
1790benefit of not having to worry about undoing patches at the end of a test.
1791The mocker fixture has the same API as @code{mock.patch}, supporting the
1792same arguments.")
1793 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1794 (license license:expat)))
1795
1796(define-public python2-pytest-mock
1797 (let ((base (package-with-python2
1798 (strip-python2-variant python-pytest-mock))))
1799 (package (inherit base)
f22efa01 1800 (propagated-inputs
44547e51 1801 `(("python2-mock" ,python2-mock)
f22efa01 1802 ,@(package-propagated-inputs base))))))
44547e51 1803
8fa58fc9
CAW
1804(define-public python-pytest-xdist
1805 (package
1806 (name "python-pytest-xdist")
1807 (version "1.14")
1808 (source
1809 (origin
1810 (method url-fetch)
1811 (uri (pypi-uri "pytest-xdist" version ".zip"))
1812 (sha256
1813 (base32
de585a7e
HG
1814 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1815 (modules '((guix build utils)))
1816 (snippet
1817 '(begin
1818 ;; Remove pre-compiled .pyc files from source.
1819 (for-each delete-file-recursively
1820 (find-files "." "__pycache__" #:directories? #t))
1821 (for-each delete-file (find-files "." "\\.pyc$"))
1822 #t))))
8fa58fc9 1823 (build-system python-build-system)
4eb385fb
MB
1824 (arguments
1825 '(#:tests? #f)) ;FIXME: Some tests are failing.
1826 ;; #:phases
1827 ;; (modify-phases %standard-phases
1828 ;; (delete 'check)
1829 ;; (add-after 'install 'check
1830 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
1831 ;; (add-installed-pythonpath inputs outputs)
1832 ;; (zero? (system* "py.test" "-v")))))
8fa58fc9
CAW
1833 (native-inputs
1834 `(("unzip" ,unzip)
8fa58fc9 1835 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1836 (propagated-inputs
c4516ad2 1837 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
1838 ("python-pytest" ,python-pytest)
1839 ("python-py" ,python-py)))
1840 (home-page
1841 "https://github.com/pytest-dev/pytest-xdist")
1842 (synopsis
1843 "Plugin for py.test with distributed testing and loop-on-failing modes")
1844 (description
1845 "The pytest-xdist plugin extends py.test with some unique test execution
1846modes: parallelization, running tests in boxed subprocesses, the ability
1847to run tests repeatedly when failed, and the ability to run tests on multiple
1848Python interpreters or platforms. It uses rsync to copy the existing
1849program code to a remote location, executes there, and then syncs the
1850result back.")
f210e944 1851 (license license:expat)))
8fa58fc9
CAW
1852
1853(define-public python2-pytest-xdist
f210e944 1854 (package-with-python2 python-pytest-xdist))
8fa58fc9 1855
84d24017
DT
1856(define-public python-scripttest
1857 (package
1858 (name "python-scripttest")
1859 (version "1.3")
1860 (source
1861 (origin
1862 (method url-fetch)
1863 (uri (string-append
1864 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1865 version ".tar.gz"))
1866 (sha256
1867 (base32
1868 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1869 (build-system python-build-system)
521b7772 1870 (native-inputs
f3b98f4f 1871 `(("python-pytest" ,python-pytest)))
84d24017
DT
1872 (home-page "http://pythonpaste.org/scripttest/")
1873 (synopsis "Python library to test command-line scripts")
1874 (description "Scripttest is a Python helper library for testing
1875interactive command-line applications. With it you can run a script in a
1876subprocess and see the output as well as any file modifications.")
bd3fa666 1877 (license license:expat)))
84d24017
DT
1878
1879(define-public python2-scripttest
1880 (package-with-python2 python-scripttest))
1881
d8fa80e1
DT
1882(define-public python-testtools
1883 (package
1884 (name "python-testtools")
1885 (version "1.0.0")
1886 (source
1887 (origin
1888 (method url-fetch)
1889 (uri (string-append
1890 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1891 version ".tar.gz"))
1892 (sha256
1893 (base32
1894 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1895 (build-system python-build-system)
0e88cbf8 1896 (propagated-inputs
f22efa01
HG
1897 `(("python-mimeparse" ,python-mimeparse)
1898 ("python-extras" ,python-extras)))
d8fa80e1
DT
1899 (home-page "https://github.com/testing-cabal/testtools")
1900 (synopsis
1901 "Extensions to the Python standard library unit testing framework")
1902 (description
1903 "Testtools extends the Python standard library unit testing framework to
1904provide matchers, more debugging information, and cross-Python
1905compatibility.")
3f641af0 1906 (license license:psfl)))
d8fa80e1
DT
1907
1908(define-public python2-testtools
1909 (package-with-python2 python-testtools))
1910
5bf3afea
DT
1911(define-public python-testscenarios
1912 (package
1913 (name "python-testscenarios")
1914 (version "0.4")
1915 (source
1916 (origin
1917 (method url-fetch)
1918 (uri (string-append
1919 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1920 version ".tar.gz"))
1921 (sha256
1922 (base32
1923 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1924 (build-system python-build-system)
f22efa01 1925 (propagated-inputs
8e73d3ba 1926 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
1927 (home-page "https://launchpad.net/testscenarios")
1928 (synopsis "Pyunit extension for dependency injection")
1929 (description
1930 "Testscenarios provides clean dependency injection for Python unittest
1931style tests.")
3f641af0 1932 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1933
1934(define-public python2-testscenarios
1935 (package-with-python2 python-testscenarios))
1936
dac79ecc
DT
1937(define-public python-testresources
1938 (package
1939 (name "python-testresources")
1940 (version "0.2.7")
1941 (source
1942 (origin
1943 (method url-fetch)
1944 (uri (string-append
1945 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1946 version ".tar.gz"))
1947 (sha256
1948 (base32
1949 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1950 (build-system python-build-system)
dac79ecc
DT
1951 (home-page "https://launchpad.net/testresources")
1952 (synopsis
1953 "Pyunit extension for managing test resources")
1954 (description
1955 "Testresources is an extension to Python's unittest to allow declarative
1956use of resources by test cases.")
3f641af0 1957 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
1958
1959(define-public python2-testresources
1960 (package-with-python2 python-testresources))
1961
070ab058
DT
1962(define-public python-subunit
1963 (package
1964 (name "python-subunit")
1965 (version "0.0.21")
1966 (source
1967 (origin
1968 (method url-fetch)
1969 (uri (string-append
1970 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1971 version ".tar.gz"))
1972 (sha256
1973 (base32
1974 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1975 (build-system python-build-system)
f22efa01 1976 (propagated-inputs
b52ad371
HG
1977 `(("python-extras" ,python-extras)
1978 ("python-mimeparse" ,python-mimeparse)))
1979 (native-inputs
1980 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
1981 (home-page "http://launchpad.net/subunit")
1982 (synopsis "Python implementation of the subunit protocol")
1983 (description
1984 "Python-subunit is a Python implementation of the subunit test streaming
1985protocol.")
3f641af0 1986 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
1987
1988(define-public python2-subunit
1989 (package-with-python2 python-subunit))
1990
d2a8db92
HG
1991;; Recent versions of python-fixtures and python-testrepository need
1992;; python-pbr for packaging, which itself needs these two packages for
1993;; testing.
1994;; To fix this circular dependency, we use a build of python-pbr, based on the
1995;; same source, just without any test dependencies and with tests disabled.
1996;; python-pbr-minmal is then used to package python-fixtures and
1997;; python-testrepository.
1998;; Strictly speaking we currently could remove the test-requirements from the
1999;; normal python-pbr package (and save this package) since test are disabled
2000;; there anyway. But this may change in future.
2001(define python-pbr-minimal
cd49454b 2002 (package
d2a8db92
HG
2003 (name "python-pbr-minimal")
2004 (version "1.8.1")
7787ef76
CR
2005 (source
2006 (origin
2007 (method url-fetch)
d2a8db92 2008 (uri (pypi-uri "pbr" version))
7787ef76
CR
2009 (sha256
2010 (base32
d2a8db92 2011 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
7787ef76
CR
2012 (build-system python-build-system)
2013 (arguments
d2a8db92
HG
2014 `(#:tests? #f))
2015 (home-page "http://docs.openstack.org/developer/pbr/")
2016 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2017 (description
d2a8db92 2018 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2019 (license license:asl2.0)))
7787ef76 2020
d2a8db92
HG
2021(define python2-pbr-minimal
2022 (package-with-python2 python-pbr-minimal))
7787ef76 2023
1ef09c0c 2024(define-public python-pbr
e25f0174 2025 (package
d2a8db92 2026 (inherit python-pbr-minimal)
e25f0174 2027 (name "python-pbr")
e25f0174
BW
2028 (arguments
2029 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2030 (propagated-inputs
d2a8db92
HG
2031 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2032 (native-inputs
e25f0174 2033 `(("python-fixtures" ,python-fixtures)
d2a8db92 2034 ;; discover, coverage, hacking, subunit
e25f0174 2035 ("python-mock" ,python-mock)
d2a8db92 2036 ("python-six" ,python-six)
e25f0174
BW
2037 ("python-sphinx" ,python-sphinx)
2038 ("python-testrepository" ,python-testrepository)
2039 ("python-testresources" ,python-testresources)
2040 ("python-testscenarios" ,python-testscenarios)
2041 ("python-testtools" ,python-testtools)
2042 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2043 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2044 (description
2045 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2046and sensible default behaviors into your setuptools run. It will set
2047versions, process requirements files and generate AUTHORS and ChangeLog file
2048from git information.
2049")))
1ef09c0c
BW
2050
2051(define-public python2-pbr
e25f0174 2052 (package-with-python2 python-pbr))
1ef09c0c 2053
7787ef76
CR
2054(define-public python-fixtures
2055 (package
2056 (name "python-fixtures")
13fcc6df 2057 (version "1.4.0")
7787ef76
CR
2058 (source
2059 (origin
2060 (method url-fetch)
13fcc6df 2061 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2062 (sha256
2063 (base32
13fcc6df 2064 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76 2065 (build-system python-build-system)
f6c1ef18
MB
2066 (arguments
2067 '(#:phases
2068 (modify-phases %standard-phases
2069 (replace 'check
2070 (lambda _
2071 (zero? (system* "python" "-m" "testtools.run"
2072 "fixtures.test_suite")))))))
7787ef76 2073 (propagated-inputs
ae92cadd 2074 `(("python-six" ,python-six)))
e7881f3d 2075 (native-inputs
f6c1ef18
MB
2076 `(("python-mock" ,python-mock)
2077 ("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2078 ("python-testtools" ,python-testtools)))
7787ef76
CR
2079 (home-page "https://launchpad.net/python-fixtures")
2080 (synopsis "Python test fixture library")
2081 (description
2082 "Fixtures provides a way to create reusable state, useful when writing
2083Python tests.")
3f641af0 2084 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2085
cd49454b
DT
2086(define-public python2-fixtures
2087 (package-with-python2 python-fixtures))
2088
b24a0c00
DT
2089(define-public python-testrepository
2090 (package
2091 (name "python-testrepository")
2092 (version "0.0.20")
2093 (source
2094 (origin
2095 (method url-fetch)
2096 (uri (string-append
2097 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2098 version ".tar.gz"))
2099 (sha256
2100 (base32
2101 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2102 (build-system python-build-system)
90110ef9
MB
2103 (arguments
2104 ;; FIXME: Many tests are failing.
2105 '(#:tests? #f))
05de40c5 2106 (propagated-inputs
b2e66edf
HG
2107 `(("python-fixtures" ,python-fixtures)
2108 ("python-subunit" ,python-subunit)
b52ad371
HG
2109 ("python-testtools" ,python-testtools)))
2110 (native-inputs
2111 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2112 ("python-mimeparse" ,python-mimeparse)))
2113 (home-page "https://launchpad.net/testrepository")
2114 (synopsis "Database for Python test results")
2115 (description "Testrepository provides a database of test results which can
2116be used as part of a developer's workflow to check things such as what tests
2117have failed since the last commit or what tests are currently failing.")
3f641af0 2118 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2119
2120(define-public python2-testrepository
2121 (package-with-python2 python-testrepository))
2122
243a009a
DT
2123(define-public python-coverage
2124 (package
2125 (name "python-coverage")
4d4cf3dd 2126 (version "4.1")
243a009a
DT
2127 (source
2128 (origin
2129 (method url-fetch)
82a3c582 2130 (uri (pypi-uri "coverage" version))
243a009a
DT
2131 (sha256
2132 (base32
4d4cf3dd 2133 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2134 (build-system python-build-system)
bd10e677
MB
2135 (arguments
2136 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2137 '(#:tests? #f))
243a009a
DT
2138 (home-page "http://nedbatchelder.com/code/coverage")
2139 (synopsis "Code coverage measurement for Python")
2140 (description
2141 "Coverage measures code coverage, typically during test execution. It
2142uses the code analysis tools and tracing hooks provided in the Python standard
2143library to determine which lines are executable, and which have been
2144executed.")
3f641af0 2145 (license license:bsd-3)))
243a009a
DT
2146
2147(define-public python2-coverage
2148 (package-with-python2 python-coverage))
2149
12f839fd
EF
2150(define-public python-cov-core
2151 (package
2152 (name "python-cov-core")
2153 (version "1.15.0")
2154 (source
2155 (origin
2156 (method url-fetch)
2157 (uri (pypi-uri "cov-core" version))
2158 (sha256
2159 (base32
2160 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2161 (build-system python-build-system)
f78e1c27 2162 (propagated-inputs
12f839fd
EF
2163 `(("python-coverage" ,python-coverage)))
2164 (home-page "https://github.com/schlamar/cov-core")
2165 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2166 (description
2167 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2168It is useful for developing coverage plugins for these testing frameworks.")
f210e944 2169 (license license:expat)))
12f839fd
EF
2170
2171(define-public python2-cov-core
f210e944 2172 (package-with-python2 python-cov-core))
12f839fd 2173
041358fb
DT
2174(define-public python-discover
2175 (package
2176 (name "python-discover")
2177 (version "0.4.0")
2178 (source
2179 (origin
2180 (method url-fetch)
2181 (uri (string-append
2182 "https://pypi.python.org/packages/source/d/discover/discover-"
2183 version ".tar.gz"))
2184 (sha256
2185 (base32
2186 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2187 (build-system python-build-system)
041358fb
DT
2188 (home-page "http://pypi.python.org/pypi/discover/")
2189 (synopsis
2190 "Python test discovery for unittest")
2191 (description
2192 "Discover provides test discovery for unittest, a feature that has been
e881752c 2193backported from Python 2.7 for Python 2.4+.")
3f641af0 2194 (license license:bsd-3)))
041358fb
DT
2195
2196(define-public python2-discover
2197 (package-with-python2 python-discover))
2198
a480bc41
EB
2199(define-public behave
2200 (package
2201 (name "behave")
287cfd1a 2202 (version "1.2.5")
a480bc41
EB
2203 (source (origin
2204 (method url-fetch)
287cfd1a 2205 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2206 (sha256
2207 (base32
287cfd1a 2208 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2209 (build-system python-build-system)
f22efa01 2210 (propagated-inputs
f3b98f4f 2211 `(("python-six" ,python-six)
a480bc41
EB
2212 ("python-parse" ,python-parse)
2213 ("python-parse-type" ,python-parse-type)))
2214 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2215 ;PyHamcrest>=1.8
2216 (home-page "http://github.com/behave/behave")
2217 (synopsis "Python behavior-driven development")
2218 (description
2219 "Behave is a tool for behavior-driven development in python.
2220Behavior-driven development (or BDD) is an agile software development
2221technique that encourages collaboration between developers, QA and
2222non-technical or business participants in a software project. Behave uses
2223tests written in a natural language style, backed up by Python code.")
3f641af0 2224 (license license:x11)))
c7303d3c
DT
2225
2226(define-public python-exif-read
2227 (package
2228 (name "python-exif-read")
2a2d0981 2229 (version "2.1.2")
c7303d3c
DT
2230 (source (origin
2231 (method url-fetch)
2a2d0981 2232 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2233 (sha256
2234 (base32
2a2d0981 2235 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2236 (build-system python-build-system)
c7303d3c
DT
2237 (arguments `(#:tests? #f)) ; no tests
2238 (home-page "https://github.com/ianare/exif-py")
2239 (synopsis "Python library to extract EXIF data from image files")
2240 (description
2241 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2242files.")
3f641af0 2243 (license license:bsd-3)))
c7303d3c
DT
2244
2245(define-public python2-exif-read
2246 (package-with-python2 python-exif-read))
d5f89b22
DT
2247
2248(define-public python-pyld
2249 (package
2250 (name "python-pyld")
8957af32 2251 (version "0.7.1")
d5f89b22
DT
2252 (source (origin
2253 (method url-fetch)
af1ab773 2254 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2255 (sha256
2256 (base32
8957af32 2257 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2258 (build-system python-build-system)
d5f89b22
DT
2259 (arguments `(#:tests? #f)) ; no tests
2260 (home-page "http://github.com/digitalbazaar/pyld")
2261 (synopsis "Python implementation of the JSON-LD specification")
2262 (description
2263 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2264 (license license:bsd-3)))
d5f89b22
DT
2265
2266(define-public python2-pyld
2267 (package-with-python2 python-pyld))
3a1f9a68
DT
2268
2269(define-public python-certifi
2270 (package
2271 (name "python-certifi")
b2a2232c 2272 (version "2016.8.31")
3a1f9a68
DT
2273 (source (origin
2274 (method url-fetch)
9a41f443 2275 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2276 (sha256
2277 (base32
b2a2232c 2278 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68 2279 (build-system python-build-system)
3a1f9a68
DT
2280 (arguments `(#:tests? #f)) ; no tests
2281 (home-page "http://python-requests.org/")
2282 (synopsis "Python CA certificate bundle")
2283 (description
2284 "Certifi is a Python library that contains a CA certificate bundle, which
2285is used by the Requests library to verify HTTPS requests.")
3f641af0 2286 (license license:asl2.0)))
3a1f9a68
DT
2287
2288(define-public python2-certifi
2289 (package-with-python2 python-certifi))
e6cfbd36 2290
12c270dd
RW
2291(define-public python-click
2292 (package
2293 (name "python-click")
43accb58 2294 (version "6.6")
12c270dd
RW
2295 (source
2296 (origin
2297 (method url-fetch)
375f224b 2298 (uri (pypi-uri "click" version))
12c270dd 2299 (sha256
43accb58
LF
2300 (base32
2301 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2302 (build-system python-build-system)
e2ab5a09
BW
2303 (arguments
2304 `(#:phases
2305 (modify-phases %standard-phases
2306 (add-after 'unpack 'fix-paths
2307 (lambda* (#:key inputs #:allow-other-keys)
2308 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2309 "cross-libc" "libc"))))
2310 (substitute* "click/_unicodefun.py"
2311 (("'locale'")
2312 (string-append "'" glibc "/bin/locale'"))))
97be1bc2
MB
2313 #t))
2314 (replace 'check
2315 (lambda _
2316 (zero? (system* "make" "test")))))))
2317 (native-inputs
2318 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2319 (home-page "http://click.pocoo.org")
2320 (synopsis "Command line library for Python")
2321 (description
2322 "Click is a Python package for creating command line interfaces in a
2323composable way with as little code as necessary. Its name stands for
2324\"Command Line Interface Creation Kit\". It's highly configurable but comes
2325with sensible defaults out of the box.")
3f641af0 2326 (license license:bsd-3)))
12c270dd
RW
2327
2328(define-public python2-click
2329 (package-with-python2 python-click))
2330
addc808d
EF
2331(define-public python-wheel
2332 (package
2333 (name "python-wheel")
40981b5c 2334 (version "0.29.0")
e1ba0749
EF
2335 (source
2336 (origin
2337 (method url-fetch)
2338 (uri (pypi-uri "wheel" version))
2339 (sha256
2340 (base32
40981b5c 2341 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2342 (build-system python-build-system)
2343 (native-inputs
f3b98f4f 2344 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2345 ("python-pytest-cov" ,python-pytest-cov)))
2346 (home-page "https://bitbucket.org/pypa/wheel/")
2347 (synopsis "Format for built Python packages")
2348 (description
2349 "A wheel is a ZIP-format archive with a specially formatted filename and
2350the @code{.whl} extension. It is designed to contain all the files for a PEP
2351376 compatible install in a way that is very close to the on-disk format. Many
2352packages will be properly installed with only the @code{Unpack} step and the
2353unpacked archive preserves enough information to @code{Spread} (copy data and
2354scripts to their final locations) at any later time. Wheel files can be
2355installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2356 (license license:expat)
2357 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2358
2359(define-public python2-wheel
8ad4ae20
LF
2360 (let ((wheel (package-with-python2
2361 (strip-python2-variant python-wheel))))
264ae686 2362 (package (inherit wheel)
8ad4ae20
LF
2363 (native-inputs `(("python2-functools32" ,python2-functools32)
2364 ,@(package-native-inputs wheel))))))
2365
addc808d 2366
ae641128 2367(define-public python-requests
e6cfbd36 2368 (package
ae641128 2369 (name "python-requests")
74a066f9 2370 (version "2.9.1")
e6cfbd36
DT
2371 (source (origin
2372 (method url-fetch)
5d691657 2373 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2374 (sha256
2375 (base32
74a066f9 2376 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
cff0ccf9 2377 ;; TODO: unbundle urllib3 and chardet.
e6cfbd36 2378 (build-system python-build-system)
cff0ccf9
MB
2379 (arguments
2380 ;; FIXME: Some tests require network access.
2381 '(#:tests? #f))
e6cfbd36
DT
2382 (home-page "http://python-requests.org/")
2383 (synopsis "Python HTTP library")
2384 (description
2385 "Requests is a Python HTTP client library. It aims to be easier to use
2386than Python’s urllib2 library.")
3f641af0 2387 (license license:asl2.0)))
864b5211 2388
e9005180
DT
2389;; Some software requires an older version of Requests, notably Docker
2390;; Compose.
2391(define-public python-requests-2.7
2392 (package (inherit python-requests)
2393 (version "2.7.0")
2394 (source (origin
2395 (method url-fetch)
2396 (uri (pypi-uri "requests" version))
2397 (sha256
2398 (base32
2399 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2400
ae641128 2401(define-public python2-requests
8ad4ae20 2402 (package-with-python2 python-requests))
ae641128 2403
ea521b42
DT
2404(define-public python-vcversioner
2405 (package
2406 (name "python-vcversioner")
538fe019 2407 (version "2.16.0.0")
ea521b42
DT
2408 (source
2409 (origin
2410 (method url-fetch)
2411 (uri (pypi-uri "vcversioner" version))
2412 (sha256
2413 (base32
538fe019 2414 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2415 (build-system python-build-system)
ea521b42
DT
2416 (synopsis "Python library for version number discovery")
2417 (description "Vcversioner is a Python library that inspects tagging
2418information in a variety of version control systems in order to discover
2419version numbers.")
2420 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2421 (license license:isc)))
ea521b42
DT
2422
2423(define-public python2-vcversioner
f210e944 2424 (package-with-python2 python-vcversioner))
ae641128 2425
864b5211
DT
2426(define-public python-jsonschema
2427 (package
2428 (name "python-jsonschema")
b3667afb 2429 (version "2.5.1")
864b5211
DT
2430 (source (origin
2431 (method url-fetch)
2432 (uri
2433 (string-append
2434 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2435 version ".tar.gz"))
2436 (sha256
2437 (base32
b3667afb 2438 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2439 (build-system python-build-system)
8bcd6b91
EF
2440 (arguments
2441 '(#:phases
2442 (modify-phases %standard-phases
2443 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2444 (native-inputs
8bcd6b91
EF
2445 `(("python-nose" ,python-nose)
2446 ("python-vcversioner" ,python-vcversioner)))
2447 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2448 (synopsis "Implementation of JSON Schema for Python")
2449 (description
2450 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2451 (license license:expat)
2452 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2453
2454(define-public python2-jsonschema
a14600ec
LF
2455 (let ((jsonschema (package-with-python2
2456 (strip-python2-variant python-jsonschema))))
264ae686 2457 (package (inherit jsonschema)
eaba9d66 2458 (native-inputs
8bcd6b91 2459 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2460 ,@(package-native-inputs jsonschema)))
2461 (propagated-inputs
2462 `(("python2-functools32" ,python2-functools32))))))
850189b8
DT
2463
2464(define-public python-unidecode
2465 (package
2466 (name "python-unidecode")
8925d4f3 2467 (version "0.04.18")
850189b8
DT
2468 (source (origin
2469 (method url-fetch)
8925d4f3 2470 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2471 (sha256
2472 (base32
8925d4f3 2473 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8 2474 (build-system python-build-system)
850189b8
DT
2475 (home-page "https://pypi.python.org/pypi/Unidecode")
2476 (synopsis "ASCII transliterations of Unicode text")
2477 (description
2478 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2479useful when integrating with legacy code that doesn't support Unicode, or for
2480ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2481machine identifiers from human-readable Unicode strings that should still be
2482somewhat intelligeble.")
3f641af0 2483 (license license:gpl2+)))
850189b8
DT
2484
2485(define-public python2-unidecode
2486 (package-with-python2 python-unidecode))
6d45fef4
DT
2487
2488(define-public python-pyjwt
2489 (package
2490 (name "python-pyjwt")
eb31d4b4 2491 (version "1.4.0")
6d45fef4
DT
2492 (source
2493 (origin
2494 (method url-fetch)
eb31d4b4 2495 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2496 (sha256
2497 (base32
eb31d4b4 2498 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2499 (build-system python-build-system)
eb31d4b4 2500 (native-inputs
130fe994
HG
2501 `(("python-pytest" ,python-pytest)
2502 ("python-pytest-cov" ,python-pytest-cov)
2503 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2504 (home-page "http://github.com/progrium/pyjwt")
2505 (synopsis "JSON Web Token implementation in Python")
2506 (description
2507 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2508 (license license:expat)))
6d45fef4
DT
2509
2510(define-public python2-pyjwt
2511 (package-with-python2 python-pyjwt))
2512
2cec1f6f
DT
2513(define-public python-oauthlib
2514 (package
2515 (name "python-oauthlib")
bde2171d 2516 (version "1.0.3")
2cec1f6f
DT
2517 (source (origin
2518 (method url-fetch)
bde2171d 2519 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2520 (sha256
2521 (base32
bde2171d 2522 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2523 (build-system python-build-system)
bde2171d 2524 (native-inputs
bb06aa34 2525 `(("python-nose" ,python-nose)
c616b5d3 2526 ("python-mock" ,python-mock)
bde2171d 2527 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2528 ("python-pyjwt" ,python-pyjwt)
2529 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2530 (home-page "https://github.com/idan/oauthlib")
2531 (synopsis "OAuth implementation for Python")
2532 (description
2533 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2534OAuth request-signing logic.")
3f641af0 2535 (license license:bsd-3)
59f151ec 2536 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2537
2538(define-public python2-oauthlib
59f151ec 2539 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2540 (package
2541 (inherit base)
00e10c6e 2542 (native-inputs `(("python2-unittest2" ,python2-unittest2)
59f151ec 2543 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2544
2545(define-public python-itsdangerous
2546 (package
2547 (name "python-itsdangerous")
2548 (version "0.24")
2549 (source
2550 (origin
2551 (method url-fetch)
2552 (uri (string-append
2553 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2554 version ".tar.gz"))
2555 (sha256
2556 (base32
2557 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2558 (build-system python-build-system)
ec5dbb5c
DT
2559 (home-page "http://github.com/mitsuhiko/itsdangerous")
2560 (synopsis "Python library for passing data to/from untrusted environments")
2561 (description
2562 "Itsdangerous provides various helpers to pass trusted data to untrusted
2563environments and back.")
f210e944 2564 (license license:bsd-3)))
ec5dbb5c
DT
2565
2566(define-public python2-itsdangerous
f210e944 2567 (package-with-python2 python-itsdangerous))
5731cae3 2568
8d12be1e
RW
2569(define-public python-pyyaml
2570 (package
2571 (name "python-pyyaml")
2572 (version "3.11")
2573 (source
2574 (origin
2575 (method url-fetch)
2576 (uri (string-append
2577 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2578 version ".tar.gz"))
2579 (sha256
2580 (base32
2581 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2582 (build-system python-build-system)
2583 (inputs
2584 `(("libyaml" ,libyaml)))
8d12be1e
RW
2585 (home-page "http://pyyaml.org/wiki/PyYAML")
2586 (synopsis "YAML parser and emitter for Python")
2587 (description
2588 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2589complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2590API, and sensible error messages. PyYAML supports standard YAML tags and
2591provides Python-specific tags that allow to represent an arbitrary Python
2592object.")
2593 (license license:expat)))
2594
2595(define-public python2-pyyaml
2596 (package-with-python2 python-pyyaml))
2597
5731cae3
DT
2598(define-public python-virtualenv
2599 (package
2600 (name "python-virtualenv")
58d04dba 2601 (version "15.0.3")
5731cae3
DT
2602 (source
2603 (origin
2604 (method url-fetch)
17804240 2605 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2606 (sha256
2607 (base32
58d04dba 2608 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2609 (build-system python-build-system)
17804240
EF
2610 (arguments
2611 `(#:phases
2612 (modify-phases %standard-phases
58d04dba
RW
2613 (replace 'check
2614 (lambda _
2615 ;; Disable failing test. See upstream bug report
2616 ;; https://github.com/pypa/virtualenv/issues/957
2617 (substitute* "tests/test_virtualenv.py"
2618 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2619 (zero? (system* "py.test")))))))
e7881f3d 2620 (native-inputs
f3b98f4f 2621 `(("python-mock" ,python-mock)
17804240 2622 ("python-pytest" ,python-pytest)))
5731cae3
DT
2623 (home-page "https://virtualenv.pypa.io/")
2624 (synopsis "Virtual Python environment builder")
2625 (description
2626 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2627 (license license:expat)))
5731cae3
DT
2628
2629(define-public python2-virtualenv
2630 (package-with-python2 python-virtualenv))
8176d4d5
DT
2631
2632(define-public python-markupsafe
2633 (package
2634 (name "python-markupsafe")
2635 (version "0.23")
2636 (source
2637 (origin
2638 (method url-fetch)
2639 (uri (string-append
2640 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2641 version ".tar.gz"))
2642 (sha256
2643 (base32
2644 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2645 (build-system python-build-system)
8176d4d5
DT
2646 (home-page "http://github.com/mitsuhiko/markupsafe")
2647 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2648 (description
2649 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2650for Python.")
3f641af0 2651 (license license:bsd-3)))
8176d4d5
DT
2652
2653(define-public python2-markupsafe
2654 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2655
2656(define-public python-jinja2
2657 (package
2658 (name "python-jinja2")
e98149b3 2659 (version "2.8")
fe34f0d1
DT
2660 (source
2661 (origin
2662 (method url-fetch)
e98149b3 2663 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2664 (sha256
2665 (base32
e98149b3 2666 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2667 (build-system python-build-system)
f22efa01 2668 (propagated-inputs
f3b98f4f 2669 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2670 (home-page "http://jinja.pocoo.org/")
2671 (synopsis "Python template engine")
2672 (description
2673 "Jinja2 is a small but fast and easy to use stand-alone template engine
2674written in pure Python.")
3f641af0 2675 (license license:bsd-3)))
fe34f0d1
DT
2676
2677(define-public python2-jinja2
2678 (package-with-python2 python-jinja2))
3580ab8b 2679
f7d17ac7
EE
2680(define-public python-pystache
2681 (package
2682 (name "python-pystache")
2683 (version "0.5.4")
2684 (source (origin
2685 (method url-fetch)
2686 (uri (pypi-uri "pystache" version))
2687 (sha256
2688 (base32
2689 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2690 (build-system python-build-system)
8bd5164b
MB
2691 (arguments
2692 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
f7d17ac7
EE
2693 (home-page "http://defunkt.io/pystache/")
2694 (synopsis "Python logic-less template engine")
2695 (description
2696 "Pystache is a Python implementation of the framework agnostic,
2697logic-free templating system Mustache.")
8bd5164b
MB
2698 (license license:expat)
2699 (properties `((python2-variant . ,(delay python2-pystache))))))
f7d17ac7
EE
2700
2701(define-public python2-pystache
8bd5164b
MB
2702 (package (inherit (package-with-python2
2703 (strip-python2-variant python-pystache)))
2704 (arguments
2705 `(#:python ,python-2
2706 #:phases
2707 (modify-phases %standard-phases
2708 (replace 'check
2709 (lambda _
2710 (zero? (system* "python" "test_pystache.py")))))))))
f7d17ac7 2711
1285119b
RW
2712(define-public python-joblib
2713 (package
2714 (name "python-joblib")
f34ef331 2715 (version "0.10.3")
1285119b
RW
2716 (source (origin
2717 (method url-fetch)
f34ef331 2718 (uri (pypi-uri "joblib" version))
1285119b
RW
2719 (sha256
2720 (base32
6aa5f1ca
HG
2721 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2722 (modules '((guix build utils)))
2723 (snippet
2724 '(begin
2725 ;; Remove pre-compiled .pyc files from source.
2726 (for-each delete-file-recursively
2727 (find-files "." "__pycache__" #:directories? #t))
2728 (for-each delete-file (find-files "." "\\.pyc$"))
2729 #t))))
1285119b 2730 (build-system python-build-system)
a8dd960a
RW
2731 (arguments
2732 `(#:phases
2733 (modify-phases %standard-phases
2734 (add-before 'check 'disable-failing-tests
2735 (lambda _
2736 ;; This numpydoc tests fails for unknown reasons
2737 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2738 ;; This numpydoc test depends on matplotlib, which is not a
2739 ;; required input.
2740 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2741 ;; These tests fail to execute sys.executable
2742 (substitute* "joblib/test/test_parallel.py"
2743 (("import nose" line)
2744 (string-append "from nose.plugins.skip import SkipTest\n" line))
2745 (("def test_nested_parallel_warnings" line)
2746 (string-append "@SkipTest\n" line))
2747 (("def test_parallel_with_interactively_defined_functions" line)
2748 (string-append "@SkipTest\n" line)))
2749 #t)))))
f052ec9a 2750 ;; Provide nose to enable tests command
1285119b 2751 (native-inputs
f3b98f4f 2752 `(("python-nose" ,python-nose)
f34ef331
RW
2753 ("python-sphinx" ,python-sphinx)
2754 ("python-docutils" ,python-docutils)
2755 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2756 (home-page "http://pythonhosted.org/joblib/")
2757 (synopsis "Using Python functions as pipeline jobs")
2758 (description
2759 "Joblib is a set of tools to provide lightweight pipelining in Python.
2760In particular, joblib offers: transparent disk-caching of the output values
2761and lazy re-evaluation (memoize pattern), easy simple parallel computing
2762logging and tracing of the execution.")
3f641af0 2763 (license license:bsd-3)))
1285119b
RW
2764
2765(define-public python2-joblib
2766 (package-with-python2 python-joblib))
2767
3580ab8b
DT
2768(define-public python-docutils
2769 (package
2770 (name "python-docutils")
2771 (version "0.12")
2772 (source
2773 (origin
2774 (method url-fetch)
2775 (uri (string-append
2776 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2777 version ".tar.gz"))
2778 (sha256
2779 (base32
2780 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2781 (build-system python-build-system)
3580ab8b
DT
2782 (arguments
2783 '(#:tests? #f)) ; no setup.py test command
2784 (home-page "http://docutils.sourceforge.net/")
2785 (synopsis "Python Documentation Utilities")
2786 (description
2787 "Docutils is a modular system for processing documentation into useful
2788formats, such as HTML, XML, and LaTeX. For input Docutils supports
2789reStructuredText.")
2790 ;; Most of the source code is public domain, but some source files are
2791 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2792 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2793
2794(define-public python2-docutils
2795 (package-with-python2 python-docutils))
fb35b7c0
DT
2796
2797(define-public python-pygments
2798 (package
2799 (name "python-pygments")
9f442285 2800 (version "2.0.2")
fb35b7c0
DT
2801 (source
2802 (origin
2803 (method url-fetch)
9f442285 2804 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2805 (sha256
2806 (base32
9f442285 2807 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0 2808 (build-system python-build-system)
995cb99e
MB
2809 (arguments
2810 ;; FIXME: Tests require sphinx, which depends on this.
2811 '(#:tests? #f))
fb35b7c0
DT
2812 (home-page "http://pygments.org/")
2813 (synopsis "Syntax highlighting")
2814 (description
2815 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2816 (license license:bsd-2)))
fb35b7c0
DT
2817
2818(define-public python2-pygments
2819 (package-with-python2 python-pygments))
9dd6078d
DT
2820
2821(define-public python-sphinx
2822 (package
2823 (name "python-sphinx")
2824 (version "1.2.3")
2825 (source
2826 (origin
2827 (method url-fetch)
2828 (uri (string-append
2829 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2830 version ".tar.gz"))
2831 (sha256
2832 (base32
2833 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2834 (build-system python-build-system)
03cb5f9e
MB
2835 (arguments
2836 ;; FIXME: Missing dependencies.
2837 '(#:tests? #f))
f22efa01 2838 (propagated-inputs
f3b98f4f 2839 `(("python-jinja2" ,python-jinja2)
9dd6078d
DT
2840 ("python-docutils" ,python-docutils)
2841 ("python-pygments" ,python-pygments)))
2842 (home-page "http://sphinx-doc.org/")
2843 (synopsis "Python documentation generator")
2844 (description "Sphinx is a tool that makes it easy to create documentation
2845for Python projects or other documents consisting of multiple reStructuredText
2846sources.")
3f641af0 2847 (license license:bsd-3)))
9dd6078d
DT
2848
2849(define-public python2-sphinx
2850 (package-with-python2 python-sphinx))
6888830b 2851
ad320b20
RW
2852(define-public python-sphinx-rtd-theme
2853 (package
2854 (name "python-sphinx-rtd-theme")
2855 (version "0.1.6")
2856 (source
2857 (origin
2858 (method url-fetch)
2859 (uri (string-append "https://pypi.python.org/packages/source/s/"
2860 "sphinx_rtd_theme/sphinx_rtd_theme-"
2861 version ".tar.gz"))
2862 (sha256
2863 (base32
2864 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2865 (build-system python-build-system)
9d3a15b4
LF
2866 (propagated-inputs
2867 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
2868 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2869 (synopsis "ReadTheDocs.org theme for Sphinx")
2870 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2871 (license license:expat)))
ad320b20
RW
2872
2873(define-public python2-sphinx-rtd-theme
2874 (package-with-python2 python-sphinx-rtd-theme))
2875
fe94cf0c
HG
2876(define-public python-rst.linker
2877 (package
2878 (name "python-rst.linker")
2879 (version "1.7")
2880 (source
2881 (origin
2882 (method url-fetch)
2883 (uri (pypi-uri "rst.linker" version))
2884 (sha256
2885 (base32
2886 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2887 (build-system python-build-system)
2888 (propagated-inputs
22d7360b 2889 `(("python-dateutil" ,python-dateutil)
fe94cf0c
HG
2890 ("python-six" ,python-six)))
2891 (native-inputs
2892 `(("python-setuptools-scm" ,python-setuptools-scm)))
2893 ;; Test would require path.py, which would introduce a cyclic dependence.
2894 (arguments `(#:tests? #f))
2895 ;; Note: As of version 1.7 the documentation is not worth building.
2896 (home-page "https://github.com/jaraco/rst.linker")
2897 (synopsis "Sphinx plugin to add links and timestamps")
2898 (description "rst.linker allows to automatically replace text by a
2899reStructuredText external reference or timestamps. It's primary purpose is to
2900augment the changelog, but it can be used for other documents, too.")
2901 (license license:expat)))
2902
2903(define-public python2-rst.linker
2904 (package-with-python2 python-rst.linker))
2905
f4de5b3b
CAW
2906(define-public python-feedgenerator
2907 (package
2908 (name "python-feedgenerator")
f0412aa2 2909 (version "1.8")
f4de5b3b 2910 (source
f4de5b3b 2911 (origin
f0412aa2
EF
2912 (method url-fetch)
2913 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2914 (sha256
2915 (base32
7c88bcf4
HG
2916 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
2917 (modules '((guix build utils)))
2918 (snippet
2919 '(begin
2920 ;; Remove pre-compiled .pyc files from source.
2921 (for-each delete-file-recursively
2922 (find-files "." "__pycache__" #:directories? #t))
2923 (for-each delete-file (find-files "." "\\.pyc$"))
2924 #t))))
f4de5b3b 2925 (build-system python-build-system)
dae73d9b 2926 (propagated-inputs
f3b98f4f 2927 `(("python-pytz" ,python-pytz)
f4de5b3b 2928 ("python-six" ,python-six)))
f0412aa2 2929 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2930 (synopsis
2931 "Standalone version of Django's Atom/RSS feed generator")
2932 (description
2933 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2934which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2935 (license license:bsd-3)))
f4de5b3b
CAW
2936
2937(define-public python2-feedgenerator
2938 (package-with-python2 python-feedgenerator))
2939
59ad30e3
CAW
2940(define-public python-blinker
2941 (package
2942 (name "python-blinker")
7fb9ff4d 2943 (version "1.4")
59ad30e3
CAW
2944 (source
2945 (origin
2946 (method url-fetch)
7fb9ff4d 2947 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2948 (sha256
2949 (base32
7fb9ff4d 2950 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 2951 (build-system python-build-system)
59ad30e3
CAW
2952 (home-page "http://pythonhosted.org/blinker/")
2953 (synopsis "Fast, simple object-to-object and broadcast signaling")
2954 (description
2955 "Blinker provides a fast dispatching system that allows any number of
2956interested parties to subscribe to events, or \"signals\".")
2957 (license license:expat)))
2958
2959(define-public python2-blinker
2960 (package-with-python2 python-blinker))
2961
b8050e71
CAW
2962(define-public pelican
2963 (package
2964 (name "pelican")
11f97c27 2965 (version "3.6.3")
b8050e71
CAW
2966 (source
2967 (origin
2968 (method url-fetch)
11f97c27 2969 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2970 (sha256
2971 (base32
11f97c27 2972 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2973 (build-system python-build-system)
f22efa01 2974 (propagated-inputs
b8050e71
CAW
2975 `(("python-feedgenerator" ,python-feedgenerator)
2976 ("python-jinja2" ,python-jinja2)
2977 ("python-pygments" ,python-pygments)
2978 ("python-docutils" ,python-docutils)
2979 ("python-pytz" ,python-pytz)
2980 ("python-blinker" ,python-blinker)
2981 ("python-unidecode" ,python-unidecode)
2982 ("python-six" ,python-six)
22d7360b 2983 ("python-dateutil" ,python-dateutil)))
b8050e71
CAW
2984 (home-page "http://getpelican.com/")
2985 (arguments
2986 `(;; XXX Requires a lot more packages to do unit tests :P
2987 #:tests? #f
2988 #:phases (modify-phases %standard-phases
2989 (add-before
2990 'install 'adjust-requires
2991 ;; Since feedgenerator is installed from git, it doesn't
2992 ;; conform to the version requirements.
2993 ;;
2994 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2995 ;; version requirement so setuptools doesn't get confused.
2996 (lambda _
2997 (substitute* "setup.py"
2998 (("['\"]feedgenerator.*?['\"]")
2999 "'feedgenerator'")))))))
3000 (synopsis "Python-based static site publishing system")
3001 (description
3002 "Pelican is a tool to generate a static blog from reStructuredText,
3003Markdown input files, and more. Pelican uses Jinja2 for templating
3004and is very extensible.")
3f641af0 3005 (license license:agpl3+)))
b8050e71 3006
240ca4aa
RW
3007(define-public python-scikit-learn
3008 (package
3009 (name "python-scikit-learn")
be0a4c26 3010 (version "0.16.1")
240ca4aa
RW
3011 (source
3012 (origin
3013 (method url-fetch)
3014 (uri (string-append
3015 "https://github.com/scikit-learn/scikit-learn/archive/"
3016 version ".tar.gz"))
7e21b9fb 3017 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3018 (sha256
3019 (base32
be0a4c26 3020 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
3021 (build-system python-build-system)
3022 (arguments
3023 `(#:phases
3024 (alist-cons-before
2f6b3d2e
RW
3025 'check 'set-HOME
3026 ;; some tests require access to "$HOME"
3027 (lambda _ (setenv "HOME" "/tmp"))
3028 ;; Tests can only be run after the library has been installed and not
3029 ;; within the source directory.
3030 (alist-cons-after
3031 'install 'check
3032 (lambda _
3033 (with-directory-excursion "/tmp"
3034 ;; With Python 3 one test of 3334 fails
3035 ;; (sklearn.tests.test_common.test_transformers); see
3036 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
3037 (system* "nosetests" "-v" "sklearn")))
3038 (alist-delete 'check %standard-phases)))))
240ca4aa 3039 (inputs
328bb95d
HG
3040 `(("openblas" ,openblas)))
3041 (native-inputs
3042 `(("python-nose" ,python-nose)))
240ca4aa
RW
3043 (propagated-inputs
3044 `(("python-numpy" ,python-numpy)
3045 ("python-scipy" ,python-scipy)))
3046 (home-page "http://scikit-learn.org/")
3047 (synopsis "Machine Learning in Python")
3048 (description
3049 "Scikit-learn provides simple and efficient tools for data
3050mining and data analysis.")
1b5241c5 3051 (license license:bsd-3)))
240ca4aa
RW
3052
3053(define-public python2-scikit-learn
1b5241c5 3054 (package-with-python2 python-scikit-learn))
240ca4aa 3055
12f8f9bb
RW
3056(define-public python-scikit-image
3057 (package
3058 (name "python-scikit-image")
3059 (version "0.11.3")
3060 (source
3061 (origin
3062 (method url-fetch)
3063 (uri (string-append
3064 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3065 version ".tar.gz"))
3066 (sha256
3067 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3068 (build-system python-build-system)
9026e689
MB
3069 (arguments
3070 ;; TODO: Some tests require running X11 server. Disable them?
3071 '(#:tests? #f))
b83e2333 3072 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3073 (propagated-inputs
3074 `(("python-matplotlib" ,python-matplotlib)
3075 ("python-networkx" ,python-networkx)
12f8f9bb 3076 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3077 ("python-pillow" ,python-pillow)))
3078 (native-inputs
b83e2333
HG
3079 `(("python-numpy" ,python-numpy)
3080 ("python-cython" ,python-cython)
3081 ("python-six" ,python-six)))
12f8f9bb
RW
3082 (home-page "http://scikit-image.org/")
3083 (synopsis "Image processing in Python")
3084 (description
e881752c 3085 "Scikit-image is a collection of algorithms for image processing.")
12733594 3086 (license license:bsd-3)))
12f8f9bb
RW
3087
3088(define-public python2-scikit-image
12733594 3089 (package-with-python2 python-scikit-image))
12f8f9bb 3090
5394a6a6
RW
3091(define-public python-redis
3092 (package
3093 (name "python-redis")
3094 (version "2.10.3")
3095 (source
3096 (origin
3097 (method url-fetch)
3098 (uri (string-append
3099 "https://pypi.python.org/packages/source/r/redis/redis-"
3100 version ".tar.gz"))
3101 (sha256
3102 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3103 (build-system python-build-system)
3104 ;; Tests require a running Redis server
3105 (arguments '(#:tests? #f))
cf8124b0
HG
3106 ;; As long as we are not running test, we do not need this input :-)
3107 ;;(native-inputs
3108 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3109 (home-page "https://github.com/andymccurdy/redis-py")
3110 (synopsis "Redis Python client")
3111 (description
3112 "This package provides a Python interface to the Redis key-value store.")
3113 (license license:expat)))
3114
3115(define-public python2-redis
3116 (package-with-python2 python-redis))
3117
748cef5b
RW
3118(define-public python-rq
3119 (package
3120 (name "python-rq")
3121 (version "0.5.2")
3122 (source
3123 (origin
3124 (method url-fetch)
3125 (uri (string-append
3126 "https://pypi.python.org/packages/source/r/rq/rq-"
3127 version ".tar.gz"))
3128 (sha256
3129 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3130 (build-system python-build-system)
3131 (propagated-inputs
3132 `(("python-click" ,python-click)
3133 ("python-redis" ,python-redis)))
748cef5b
RW
3134 (home-page "http://python-rq.org/")
3135 (synopsis "Simple job queues for Python")
3136 (description
3137 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3138processing them in the background with workers. It is backed by Redis and it
3139is designed to have a low barrier to entry.")
3f641af0 3140 (license license:bsd-2)))
748cef5b
RW
3141
3142(define-public python2-rq
3143 (package-with-python2 python-rq))
3144
6888830b
FB
3145(define-public python-cython
3146 (package
3147 (name "python-cython")
dd22efef 3148 (version "0.24.1")
6888830b
FB
3149 (source
3150 (origin
3151 (method url-fetch)
56918e26 3152 (uri (pypi-uri "Cython" version))
6888830b
FB
3153 (sha256
3154 (base32
dd22efef 3155 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3156 (build-system python-build-system)
3157 ;; we need the full python package and not just the python-wrapper
3158 ;; because we need libpython3.3m.so
3159 (inputs
3160 `(("python" ,python)))
3161 (arguments
3162 `(#:phases
b92f651b
EF
3163 (modify-phases %standard-phases
3164 (add-before 'check 'set-HOME
3165 ;; some tests require access to "$HOME/.cython"
3166 (lambda _ (setenv "HOME" "/tmp")))
3167 (replace 'check
3168 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3169 (home-page "http://cython.org/")
3170 (synopsis "C extensions for Python")
3171 (description "Cython is an optimising static compiler for both the Python
3172programming language and the extended Cython programming language. It makes
3173writing C extensions for Python as easy as Python itself.")
3f641af0 3174 (license license:asl2.0)
48b311b1 3175 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3176
3177(define-public python2-cython
48b311b1
LC
3178 (package (inherit (package-with-python2
3179 (strip-python2-variant python-cython)))
6888830b
FB
3180 (name "python2-cython")
3181 (inputs
3182 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3183
ee5fb7ee
AV
3184;; The RPython toolchain currently does not support Python 3.
3185(define-public python2-rpython
3186 (package
3187 (name "python2-rpython")
3188 (version "0.1.4")
3189 (source
3190 (origin
3191 (method url-fetch)
3192 (uri (pypi-uri "rpython" version))
3193 (sha256
3194 (base32
3195 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3196 (build-system python-build-system)
3197 (arguments `(#:python ,python-2))
3198 (native-inputs
f3b98f4f 3199 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3200 (home-page "https://rpython.readthedocs.org")
3201 (synopsis "Framework for implementing interpreters and virtual machines")
3202 (description "RPython is a translation and support framework for
3203producing implementations of dynamic languages, emphasizing a clean separation
3204between language specification and implementation aspects.")
3205 (license license:expat)))
3206
0da98533
FB
3207;; This version of numpy is missing the documentation and is only used to
3208;; build matplotlib which is required to build numpy's documentation.
3209(define python-numpy-bootstrap
3210 (package
3211 (name "python-numpy-bootstrap")
ef9b4c04 3212 (version "1.10.4")
0da98533
FB
3213 (source
3214 (origin
3215 (method url-fetch)
de67e922 3216 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3217 "/numpy-" version ".tar.gz"))
3218 (sha256
3219 (base32
ef9b4c04 3220 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3221 (build-system python-build-system)
3222 (inputs
328bb95d 3223 `(("openblas" ,openblas)
cba256f8 3224 ("lapack" ,lapack)))
0da98533 3225 (native-inputs
2efabc55
HG
3226 `(("python-nose" ,python-nose)
3227 ("gfortran" ,gfortran)))
0da98533
FB
3228 (arguments
3229 `(#:phases
2efabc55
HG
3230 (modify-phases %standard-phases
3231 (add-before 'build 'set-environment-variables
3232 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3233 (call-with-output-file "site.cfg"
3234 (lambda (port)
cba256f8
RW
3235 (format port
3236 "[openblas]
dbdfe515
RW
3237libraries = openblas
3238library_dirs = ~a/lib
3239include_dirs = ~a/include
cba256f8 3240
2efabc55
HG
3241# backslash-n to make emacs happy
3242\n[lapack]
cba256f8
RW
3243lapack_libs = lapack
3244library_dirs = ~a/lib
3245include_dirs = ~a/include
3246"
3247 (assoc-ref inputs "openblas")
3248 (assoc-ref inputs "openblas")
3249 (assoc-ref inputs "lapack")
3250 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3251 ;; Use "gcc" executable, not "cc".
3252 (substitute* "numpy/distutils/system_info.py"
3253 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3254 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3255 #t))
6a843168
FB
3256 ;; Tests can only be run after the library has been installed and not
3257 ;; within the source directory.
2efabc55
HG
3258 (delete 'check)
3259 (add-after 'install 'check
3260 (lambda* (#:key outputs inputs #:allow-other-keys)
3261 ;; Make installed package available for running the tests
3262 (add-installed-pythonpath inputs outputs)
6a843168 3263 (with-directory-excursion "/tmp"
89b5c60e 3264 (zero? (system* "python" "-c"
2efabc55 3265 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3266 (home-page "http://www.numpy.org/")
3267 (synopsis "Fundamental package for scientific computing with Python")
3268 (description "NumPy is the fundamental package for scientific computing
e881752c 3269with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3270object, sophisticated (broadcasting) functions, tools for integrating C/C++
3271and Fortran code, useful linear algebra, Fourier transform, and random number
3272capabilities.")
3f641af0 3273 (license license:bsd-3)))
0da98533
FB
3274
3275(define python2-numpy-bootstrap
3276 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3277
3a1bfe18
RW
3278(define-public python2-fastlmm
3279 (package
3280 (name "python2-fastlmm")
b074e7d4 3281 (version "0.2.21")
3a1bfe18
RW
3282 (source
3283 (origin
3284 (method url-fetch)
b074e7d4 3285 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3286 (sha256
3287 (base32
b074e7d4 3288 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3289 (build-system python-build-system)
3290 (arguments
3291 `(#:python ,python-2)) ; only Python 2.7 is supported
3292 (propagated-inputs
3293 `(("python2-numpy" ,python2-numpy)
3294 ("python2-scipy" ,python2-scipy)
3295 ("python2-matplotlib" ,python2-matplotlib)
3296 ("python2-pandas" ,python2-pandas)
3297 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3298 ("python2-pysnptools" ,python2-pysnptools)))
3299 (native-inputs
3300 `(("unzip" ,unzip)
2efabc55 3301 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3302 ("python2-mock" ,python2-mock)
3303 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3304 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3305 (synopsis "Perform genome-wide association studies on large data sets")
3306 (description
3307 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3308Models, is a program for performing both single-SNP and SNP-set genome-wide
3309association studies (GWAS) on extremely large data sets.")
3f641af0 3310 (license license:asl2.0)))
3a1bfe18 3311
2ee8869a
FB
3312(define-public python-numpy
3313 (package (inherit python-numpy-bootstrap)
3314 (name "python-numpy")
3315 (outputs '("out" "doc"))
89b5c60e 3316 (inputs
b0aa6ede
HG
3317 `(("which" ,which)
3318 ,@(package-inputs python-numpy-bootstrap)))
2efabc55
HG
3319 (propagated-inputs
3320 `(("python-matplotlib" ,python-matplotlib)
2ee8869a 3321 ("python-pyparsing" ,python-pyparsing)
b0aa6ede 3322 ,@(package-propagated-inputs python-numpy-bootstrap)))
2ee8869a
FB
3323 (native-inputs
3324 `(("pkg-config" ,pkg-config)
2efabc55
HG
3325 ("python-sphinx" ,python-sphinx)
3326 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3327 ("texlive" ,texlive)
3328 ("texinfo" ,texinfo)
3329 ("perl" ,perl)
3330 ,@(package-native-inputs python-numpy-bootstrap)))
3331 (arguments
89b5c60e 3332 `(,@(substitute-keyword-arguments
2ee8869a
FB
3333 (package-arguments python-numpy-bootstrap)
3334 ((#:phases phases)
3335 `(alist-cons-after
3336 'install 'install-doc
2efabc55
HG
3337 (lambda* (#:key inputs outputs #:allow-other-keys)
3338 ;; Make installed package available for building the
3339 ;; documentation
3340 (add-installed-pythonpath inputs outputs)
2ee8869a 3341 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3342 (doc (string-append
3343 data "/doc/" ,name "-"
2ee8869a
FB
3344 ,(package-version python-numpy-bootstrap)))
3345 (info (string-append data "/info"))
3346 (html (string-append doc "/html"))
3347 (pyver ,(string-append "PYVER=")))
3348 (with-directory-excursion "doc"
3349 (mkdir-p html)
3350 (system* "make" "html" pyver)
3351 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3352 (system* "make" "-C" "build/latex"
2ee8869a
FB
3353 "all-pdf" "PAPER=a4" pyver)
3354 ;; FIXME: Generation of the info file fails.
3355 ;; (system* "make" "info" pyver)
3356 ;; (mkdir-p info)
3357 ;; (copy-file "build/texinfo/numpy.info"
3358 ;; (string-append info "/numpy.info"))
3359 (for-each (lambda (file)
3360 (copy-file (string-append "build/latex" file)
3361 (string-append doc file)))
3362 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3363 (with-directory-excursion "build/html"
3364 (for-each (lambda (file)
3365 (let* ((dir (dirname file))
3366 (tgt-dir (string-append html "/" dir)))
3367 (unless (equal? "." dir)
3368 (mkdir-p tgt-dir))
96c46210 3369 (install-file file html)))
2ee8869a
FB
3370 (find-files "." ".*"))))))
3371 ,phases)))))))
3372
764c077b 3373(define-public python2-numpy
57b7b8cd 3374 (package-with-python2 python-numpy))
2ee8869a 3375
15bfe6d6
FB
3376(define-public python-pyparsing
3377 (package
3378 (name "python-pyparsing")
e0669289 3379 (version "2.0.3")
15bfe6d6
FB
3380 (source
3381 (origin
3382 (method url-fetch)
de67e922
LF
3383 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3384 "/pyparsing-" version
15bfe6d6
FB
3385 "/pyparsing-" version ".tar.gz"))
3386 (sha256
3387 (base32
e0669289 3388 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3389 (build-system python-build-system)
3390 (outputs '("out" "doc"))
3391 (arguments
3392 `(#:tests? #f ; no test target
3393 #:modules ((guix build python-build-system)
3394 (guix build utils))
3395 #:phases
3396 (alist-cons-after
3397 'install 'install-doc
3398 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3399 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3400 "/share/doc/" ,name "-" ,version))
3401 (html-doc (string-append doc "/html"))
3402 (examples (string-append doc "/examples")))
3403 (mkdir-p html-doc)
3404 (mkdir-p examples)
89b5c60e 3405 (for-each
15bfe6d6 3406 (lambda (dir tgt)
89b5c60e 3407 (map (lambda (file)
96c46210 3408 (install-file file tgt))
15bfe6d6
FB
3409 (find-files dir ".*")))
3410 (list "docs" "htmldoc" "examples")
3411 (list doc html-doc examples))))
3412 %standard-phases)))
3413 (home-page "http://pyparsing.wikispaces.com")
3414 (synopsis "Python parsing class library")
3415 (description
3416 "The pyparsing module is an alternative approach to creating and
3417executing simple grammars, vs. the traditional lex/yacc approach, or the use
3418of regular expressions. The pyparsing module provides a library of classes
3419that client code uses to construct the grammar directly in Python code.")
bd3fa666 3420 (license license:expat)))
15bfe6d6
FB
3421
3422(define-public python2-pyparsing
3423 (package-with-python2 python-pyparsing))
3424
ec00de35
FB
3425(define-public python-numpydoc
3426 (package
3427 (name "python-numpydoc")
3428 (version "0.5")
3429 (source
3430 (origin
3431 (method url-fetch)
89b5c60e 3432 (uri (string-append
ec00de35
FB
3433 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3434 version ".tar.gz"))
3435 (sha256
3436 (base32
5e4d8f67
AE
3437 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3438 (modules '((guix build utils)))
3439 (snippet
3440 '(begin
3441 ;; Drop a test requiring matplotlib, which we cannot add as an
3442 ;; input since it would create a circular dependency: Extend the
3443 ;; test for Python 3, where it is already dropped, to Python 2.
3444 (substitute* "numpydoc/tests/test_plot_directive.py"
3445 (("3") "2"))))))
ec00de35 3446 (build-system python-build-system)
fe4a8da4 3447 (propagated-inputs
213d1745
HG
3448 `(("python-sphinx" ,python-sphinx)))
3449 (native-inputs
3450 `(("python-nose" ,python-nose)))
ec00de35
FB
3451 (home-page "https://pypi.python.org/pypi/numpydoc")
3452 (synopsis
3453 "Numpy's Sphinx extensions")
3454 (description
3455 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3456 (license license:bsd-2)))
ec00de35
FB
3457
3458(define-public python2-numpydoc
5e4d8f67 3459 (package-with-python2 python-numpydoc))
1c65314c 3460
1e656049
RW
3461(define-public python-numexpr
3462 (package
3463 (name "python-numexpr")
26112c0a 3464 (version "2.6.0")
1e656049
RW
3465 (source
3466 (origin
3467 (method url-fetch)
26112c0a 3468 (uri (pypi-uri "numexpr" version))
1e656049
RW
3469 (sha256
3470 (base32
26112c0a 3471 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3472 (build-system python-build-system)
3473 (arguments `(#:tests? #f)) ; no tests included
3474 (propagated-inputs
3475 `(("python-numpy" ,python-numpy)))
3476 (home-page "https://github.com/pydata/numexpr")
3477 (synopsis "Fast numerical expression evaluator for NumPy")
3478 (description
3479 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3480expressions that operate on arrays are accelerated and use less memory than
3481doing the same calculation in Python. In addition, its multi-threaded
3482capabilities can make use of all your cores, which may accelerate
3483computations, most specially if they are not memory-bounded (e.g. those using
3484transcendental functions).")
f210e944 3485 (license license:expat)))
1e656049
RW
3486
3487(define-public python2-numexpr
f210e944 3488 (package-with-python2 python-numexpr))
1e656049 3489
1c65314c
FB
3490(define-public python-matplotlib
3491 (package
3492 (name "python-matplotlib")
1bbc659f 3493 (version "1.4.3")
1c65314c
FB
3494 (source
3495 (origin
3496 (method url-fetch)
de67e922
LF
3497 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3498 "/matplotlib-" version
1c65314c
FB
3499 "/matplotlib-" version ".tar.gz"))
3500 (sha256
3501 (base32
1bbc659f 3502 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3503 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3504 (build-system python-build-system)
3505 (outputs '("out" "doc"))
25f9a068
FB
3506 (propagated-inputs ; the following packages are all needed at run time
3507 `(("python-pyparsing" ,python-pyparsing)
3508 ("python-pygobject" ,python-pygobject)
3509 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3510 ("python-tkinter" ,python "tk")
22d7360b 3511 ("python-dateutil" ,python-dateutil)
ca33a3ad
HG
3512 ("python-numpy" ,python-numpy-bootstrap)
3513 ("python-pillow" ,python-pillow)
3514 ("python-pytz" ,python-pytz)
3515 ("python-six" ,python-six)
25f9a068
FB
3516 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3517 ;; from 'gtk+') provides the required 'typelib' files used by
3518 ;; 'gobject-introspection'. The location of these files is set with the
3519 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3520 ;; is done automatically by a 'native-search-path' procedure. However,
3521 ;; at run-time the user must set this variable as follows:
3522 ;;
3523 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3524 ("gtk+" ,gtk+)
3525 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3526 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3527 ;; object. For this reason we need to import both libraries.
3528 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3529 ("python-pycairo" ,python-pycairo)
3530 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3531 (inputs
ca33a3ad 3532 `(("libpng" ,libpng)
1c65314c
FB
3533 ("imagemagick" ,imagemagick)
3534 ("freetype" ,freetype)
25f9a068
FB
3535 ("cairo" ,cairo)
3536 ("glib" ,glib)
1c65314c 3537 ;; FIXME: Add backends when available.
1c65314c
FB
3538 ;("python-wxpython" ,python-wxpython)
3539 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3540 ("tcl" ,tcl)
3541 ("tk" ,tk)))
1c65314c
FB
3542 (native-inputs
3543 `(("pkg-config" ,pkg-config)
ca33a3ad
HG
3544 ("python-sphinx" ,python-sphinx)
3545 ("python-numpydoc" ,python-numpydoc)
3546 ("python-nose" ,python-nose)
3547 ("python-mock" ,python-mock)
1c65314c
FB
3548 ("texlive" ,texlive)
3549 ("texinfo" ,texinfo)))
3550 (arguments
3551 `(#:phases
25f9a068
FB
3552 (alist-cons-before
3553 'build 'configure-environment
3554 (lambda* (#:key outputs inputs #:allow-other-keys)
3555 (let ((cairo (assoc-ref inputs "cairo"))
3556 (gtk+ (assoc-ref inputs "gtk+")))
3557 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3558 ;; has not effect.
25f9a068
FB
3559 (setenv "LD_LIBRARY_PATH"
3560 (string-append cairo "/lib:" gtk+ "/lib"))
3561 (setenv "HOME" (getcwd))
3562 (call-with-output-file "setup.cfg"
3563 (lambda (port)
1bbc659f
FB
3564 (format port "[directories]~%
3565basedirlist = ~a,~a~%
57b7b8cd 3566 [rc_options]~%
1bbc659f
FB
3567backend = TkAgg~%"
3568 (assoc-ref inputs "tcl")
3569 (assoc-ref inputs "tk"))))))
25f9a068
FB
3570 (alist-cons-after
3571 'install 'install-doc
ca33a3ad 3572 (lambda* (#:key inputs outputs #:allow-other-keys)
25f9a068
FB
3573 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3574 (doc (string-append data "/doc/" ,name "-" ,version))
3575 (info (string-append data "/info"))
3576 (html (string-append doc "/html")))
ca33a3ad
HG
3577 ;; Make installed package available for building the
3578 ;; documentation
3579 (add-installed-pythonpath inputs outputs)
25f9a068 3580 (with-directory-excursion "doc"
25f9a068
FB
3581 ;; Produce pdf in 'A4' format.
3582 (substitute* (find-files "." "conf\\.py")
3583 (("latex_paper_size = 'letter'")
3584 "latex_paper_size = 'a4'"))
3585 (mkdir-p html)
3586 (mkdir-p info)
3587 ;; The doc recommends to run the 'html' target twice.
3588 (system* "python" "make.py" "html")
3589 (system* "python" "make.py" "html")
18b31516 3590 (copy-recursively "build/html" html)
25f9a068
FB
3591 (system* "python" "make.py" "latex")
3592 (system* "python" "make.py" "texinfo")
18b31516
FB
3593 (symlink (string-append html "/_images")
3594 (string-append info "/matplotlib-figures"))
3595 (with-directory-excursion "build/texinfo"
3596 (substitute* "matplotlib.texi"
3597 (("@image\\{([^,]*)" all file)
3598 (string-append "@image{matplotlib-figures/" file)))
3599 (symlink (string-append html "/_images")
3600 "./matplotlib-figures")
3601 (system* "makeinfo" "--no-split"
3602 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3603 (copy-file "build/texinfo/matplotlib.info"
3604 (string-append info "/matplotlib.info"))
3605 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3606 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3607 %standard-phases))))
1c65314c
FB
3608 (home-page "http://matplotlib.org")
3609 (synopsis "2D plotting library for Python")
3610 (description
3611 "Matplotlib is a Python 2D plotting library which produces publication
3612quality figures in a variety of hardcopy formats and interactive environments
3613across platforms. Matplotlib can be used in Python scripts, the python and
3614ipython shell, web application servers, and six graphical user interface
3615toolkits.")
3f641af0 3616 (license license:psfl)
57b7b8cd 3617 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3618
764c077b 3619(define-public python2-matplotlib
57b7b8cd
LC
3620 (let ((matplotlib (package-with-python2
3621 (strip-python2-variant python-matplotlib))))
764c077b 3622 (package (inherit matplotlib)
88c26834
AE
3623 ;; Make sure to use special packages for Python 2 instead
3624 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3625 (propagated-inputs
7ca0dbc3 3626 `(("python2-pycairo" ,python2-pycairo)
764c077b 3627 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3628 ("python2-tkinter" ,python-2 "tk")
3629 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3630 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3631
0dde6232
RW
3632(define-public python2-pysnptools
3633 (package
3634 (name "python2-pysnptools")
a800018e 3635 (version "0.3.9")
0dde6232
RW
3636 (source
3637 (origin
3638 (method url-fetch)
3f2e9675 3639 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3640 (sha256
3641 (base32
a800018e 3642 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3643 (build-system python-build-system)
3644 (arguments
3645 `(#:python ,python-2)) ; only Python 2.7 is supported
3646 (propagated-inputs
3647 `(("python2-numpy" ,python2-numpy)
3648 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
3649 ("python2-pandas" ,python2-pandas)))
3650 (native-inputs
3651 `(("python2-cython" ,python2-cython)))
0dde6232 3652 (native-inputs
f3b98f4f 3653 `(("unzip" ,unzip)))
0dde6232
RW
3654 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3655 (synopsis "Library for reading and manipulating genetic data")
3656 (description
3657 "PySnpTools is a library for reading and manipulating genetic data. It
3658can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3659those files. It can also efficiently manipulate ranges of integers using set
3660operators such as union, intersection, and difference.")
3f641af0 3661 (license license:asl2.0)))
0dde6232 3662
c9b1b4f9
RW
3663(define-public python-rpy2
3664 (package
3665 (name "python-rpy2")
ec3bcbc7 3666 (version "2.7.6")
c9b1b4f9
RW
3667 (source
3668 (origin
3669 (method url-fetch)
ec3bcbc7 3670 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3671 (sha256
3672 (base32
ec3bcbc7 3673 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 3674 (build-system python-build-system)
444464ec
MB
3675 (arguments
3676 '(#:phases
3677 (modify-phases %standard-phases
3678 (delete 'check)
3679 (add-after 'install 'check
3680 (lambda* (#:key outputs inputs #:allow-other-keys)
3681 ;; It's easier to run tests after install.
3682 ;; Make installed package available for running the tests
3683 (add-installed-pythonpath inputs outputs)
3684 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
482d9591
HG
3685 (propagated-inputs
3686 `(("python-six" ,python-six)))
c9b1b4f9 3687 (inputs
482d9591 3688 `(("readline" ,readline)
c9b1b4f9
RW
3689 ("icu4c" ,icu4c)
3690 ("pcre" ,pcre)
3691 ("r" ,r)))
3692 (native-inputs
f3b98f4f 3693 `(("zlib" ,zlib)))
c9b1b4f9
RW
3694 (home-page "http://rpy.sourceforge.net/")
3695 (synopsis "Python interface to the R language")
3696 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3697low-level interface to R from Python, a proposed high-level interface,
3698including wrappers to graphical libraries, as well as R-like structures and
3699functions.")
3f641af0 3700 (license license:gpl3+)))
c9b1b4f9
RW
3701
3702(define-public python2-rpy2
3703 (let ((rpy2 (package-with-python2 python-rpy2)))
3704 (package (inherit rpy2)
3705 (native-inputs
3706 `(("python2-singledispatch" ,python2-singledispatch)
3707 ,@(package-native-inputs rpy2))))))
3708
bb986599
FB
3709(define-public python-scipy
3710 (package
3711 (name "python-scipy")
ba8a0824 3712 (version "0.16.0")
bb986599
FB
3713 (source
3714 (origin
3715 (method url-fetch)
de67e922
LF
3716; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3717 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3718 "/scipy-" version ".tar.xz"))
bb986599
FB
3719 (sha256
3720 (base32
ba8a0824 3721 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3722 (build-system python-build-system)
dd86c0d1 3723 (propagated-inputs
bb986599
FB
3724 `(("python-numpy" ,python-numpy)
3725 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3726 ("python-pyparsing" ,python-pyparsing)))
3727 (inputs
3728 `(("lapack" ,lapack)
719b01c1 3729 ("openblas" ,openblas)))
bb986599 3730 (native-inputs
dd86c0d1
RW
3731 `(("python-nose" ,python-nose)
3732 ("python-sphinx" ,python-sphinx)
5248d49e 3733 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3734 ("gfortran" ,gfortran)
bb986599
FB
3735 ("texlive" ,texlive)
3736 ("perl" ,perl)))
3737 (outputs '("out" "doc"))
3738 (arguments
3739 `(#:phases
3740 (alist-cons-before
719b01c1 3741 'build 'configure-openblas
bb986599 3742 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3743 (call-with-output-file "site.cfg"
3744 (lambda (port)
3745 (format port
3746 "[blas]
3747libraries = openblas
3748library_dirs = ~a/lib
3749include_dirs = ~a/include
d548e6aa
HG
3750
3751# backslash-n to make emacs happy
3752\n[atlas]
719b01c1
RW
3753library_dirs = ~a/lib
3754atlas_libs = openblas
3755"
3756 (assoc-ref inputs "openblas")
3757 (assoc-ref inputs "openblas")
3758 (assoc-ref inputs "openblas"))))
3759 #t)
bb986599
FB
3760 (alist-cons-after
3761 'install 'install-doc
d548e6aa 3762 (lambda* (#:key inputs outputs #:allow-other-keys)
bb986599
FB
3763 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3764 (doc (string-append data "/doc/" ,name "-" ,version))
3765 (html (string-append doc "/html"))
3766 (pyver ,(string-append "PYVER=")))
d548e6aa
HG
3767 ;; Make installed package available for building the
3768 ;; documentation
3769 (add-installed-pythonpath inputs outputs)
bb986599 3770 (with-directory-excursion "doc"
bb986599
FB
3771 ;; Fix generation of images for mathematical expressions.
3772 (substitute* (find-files "source" "conf\\.py")
3773 (("pngmath_use_preview = True")
3774 "pngmath_use_preview = False"))
3775 (mkdir-p html)
3776 (system* "make" "html" pyver)
3777 (system* "make" "latex" "PAPER=a4" pyver)
3778 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3779 (copy-file "build/latex/scipy-ref.pdf"
3780 (string-append doc "/scipy-ref.pdf"))
3781 (with-directory-excursion "build/html"
3782 (for-each (lambda (file)
3783 (let* ((dir (dirname file))
3784 (tgt-dir (string-append html "/" dir)))
96c46210 3785 (install-file file html)))
bb986599
FB
3786 (find-files "." ".*"))))))
3787 ;; Tests can only be run after the library has been installed and not
3788 ;; within the source directory.
3789 (alist-cons-after
3790 'install 'check
89b5c60e 3791 (lambda _
bb986599
FB
3792 (with-directory-excursion "/tmp"
3793 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3794 (alist-delete
3795 'check
4f9ff21e
RW
3796 (alist-cons-after
3797 'unpack 'fix-tests
3798 (lambda _
3799 (substitute* "scipy/integrate/tests/test_quadpack.py"
3800 (("libm.so") "libm.so.6"))
3801 #t)
3802 %standard-phases)))))))
bb986599
FB
3803 (home-page "http://www.scipy.org/")
3804 (synopsis "The Scipy library provides efficient numerical routines")
3805 (description "The SciPy library is one of the core packages that make up
3806the SciPy stack. It provides many user-friendly and efficient numerical
3807routines such as routines for numerical integration and optimization.")
3f641af0 3808 (license license:bsd-3)))
bb986599 3809
764c077b 3810(define-public python2-scipy
57b7b8cd 3811 (package-with-python2 python-scipy))
bb986599 3812
73acc193 3813(define-public python-socksipy-branch
3814 (package
3815 (name "python-socksipy-branch")
3816 (version "1.01")
3817 (source
3818 (origin
3819 (method url-fetch)
3820 (uri (pypi-uri "SocksiPy-branch" version))
3821 (sha256
3822 (base32
3823 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3824 (build-system python-build-system)
3825 (arguments
3826 `(#:tests? #f)) ; There are no tests
3827 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3828 (synopsis "Python SOCKS module")
3829 (description
3830 "SocksiPy - A Python SOCKS client module. It provides a
3831socket-like interface that supports connections to any TCP
3832service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3833The original version was developed by Dan Haim, this is a
3834branch created by Mario Vilas to address some open issues,
3835as the original project seems to have been abandoned circa 2007.")
3836 (license license:bsd-3)))
3837
3838(define-public python2-socksipy-branch
3839 (package-with-python2 python-socksipy-branch))
3840
94914805
EB
3841(define-public python-sqlalchemy
3842 (package
3843 (name "python-sqlalchemy")
a4ba286b 3844 (version "1.0.12")
94914805
EB
3845 (source
3846 (origin
3847 (method url-fetch)
3848 (uri (string-append "https://pypi.python.org/packages/source/S/"
3849 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3850 (sha256
3851 (base32
a4ba286b 3852 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3853 (build-system python-build-system)
3854 (native-inputs
3855 `(("python-cython" ,python-cython) ;for c extensions
3856 ("python-pytest" ,python-pytest)
3857 ("python-mock" ,python-mock))) ;for tests
3858 (arguments
3859 `(#:phases (alist-replace
3860 'check
3861 (lambda _ (zero? (system* "py.test")))
3862 %standard-phases)))
3863 (home-page "http://www.sqlalchemy.org")
3864 (synopsis "Database abstraction library")
3865 (description
3866 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3867gives application developers the full power and flexibility of SQL. It
3868provides a full suite of well known enterprise-level persistence patterns,
3869designed for efficient and high-performing database access, adapted into a
3870simple and Pythonic domain language.")
3f641af0 3871 (license license:x11)))
94914805
EB
3872
3873(define-public python2-sqlalchemy
3874 (package-with-python2 python-sqlalchemy))
c937562e 3875
4a093330
DM
3876(define-public python-pycodestyle
3877 (package
3878 (name "python-pycodestyle")
3879 (version "2.0.0")
3880 (source
3881 (origin
3882 (method url-fetch)
3883 (uri (pypi-uri "pycodestyle" version))
3884 (sha256
3885 (base32
3886 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3887 (build-system python-build-system)
3888 (home-page "https://pycodestyle.readthedocs.io/")
3889 (synopsis "Python style guide checker")
3890 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3891Python code against some of the style conventions in
3892@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 3893 (license license:expat)))
4a093330
DM
3894
3895(define-public python2-pycodestyle
f210e944 3896 (package-with-python2 python-pycodestyle))
b91912c4
DM
3897
3898(define-public python-orderedmultidict
3899 (package
3900 (name "python-orderedmultidict")
3901 (version "0.7.10")
3902 (source
3903 (origin
3904 (method url-fetch)
3905 (uri (pypi-uri "orderedmultidict" version))
3906 (sha256
3907 (base32
3908 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3909 (build-system python-build-system)
3910 (arguments
3911 `(#:phases
3912 (modify-phases %standard-phases
3913 (add-after 'unpack 'fix-tests
3914 (lambda _
3915 ;; The package uses nosetest for running the tests.
3916 ;; Adding this initfile allows to run the test suite
3917 ;; without requiring nosetest.
3918 (zero? (system* "touch" "tests/__init__.py")))))))
3919 (propagated-inputs
3920 `(("python-six" ,python-six)))
3921 (native-inputs
3922 `(("python-pycodestyle" ,python-pycodestyle)))
3923 (home-page "https://github.com/gruns/orderedmultidict")
3924 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3925 (description "This package contains a library for ordered multivalue
3926dictionaries. A multivalue dictionary is a dictionary that can store
3927multiple values for the same key. An ordered multivalue dictionary is a
3928multivalue dictionary that retains the order of insertions and deletions.")
f210e944 3929 (license license:unlicense)))
b91912c4
DM
3930
3931(define-public python2-orderedmultidict
f210e944 3932 (package-with-python2 python-orderedmultidict))
9dede065
DM
3933
3934(define-public python-furl
3935 (package
3936 (name "python-furl")
3937 (version "0.5.6")
3938 (source
3939 (origin
3940 (method url-fetch)
3941 (uri (pypi-uri "furl" version))
3942 (sha256
3943 (base32
3944 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3945 (build-system python-build-system)
3946 (propagated-inputs
3947 `(("python-six" ,python-six)
3948 ("python-orderedmultidict" ,python-orderedmultidict)))
3949 (native-inputs
3950 `(("python-pycodestyle" ,python-pycodestyle)))
3951 (home-page "https://github.com/gruns/furl")
3952 (synopsis "URL manipulation in Python")
3953 (description "Furl provides an easy-to-use alternative to the
3954@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 3955 (license license:unlicense)))
9dede065
DM
3956
3957(define-public python2-furl
f210e944 3958 (package-with-python2 python-furl))
462bf271
DM
3959
3960(define-public python-flask-babel
3961 (package
3962 (name "python-flask-babel")
3963 (version "0.11.1")
3964 (source
3965 (origin
3966 (method url-fetch)
3967 (uri (pypi-uri "Flask-Babel" version))
3968 (sha256
3969 (base32
3970 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3971 (build-system python-build-system)
3972 (propagated-inputs
3973 `(("python-flask" ,python-flask)
3974 ("python-babel" ,python-babel)
3975 ("python-jinja2" ,python-jinja2)
3976 ("python-pytz" ,python-pytz)))
3977 (home-page "https://github.com/python-babel/flask-babel")
3978 (synopsis "Add i18n/l10n support to Flask applications")
3979 (description "This package implements internationalization and localization
3980support for Flask. This is based on the Python babel module as well as pytz -
3981both of which are installed automatically if you install this library.")
f210e944 3982 (license license:bsd-3)))
462bf271
DM
3983
3984(define-public python2-flask-babel
f210e944 3985 (package-with-python2 python-flask-babel))
4a093330 3986
de2966cf
EF
3987(define-public python-sqlalchemy-utils
3988 (package
3989 (name "python-sqlalchemy-utils")
bb4b1706 3990 (version "0.32.11")
de2966cf
EF
3991 (source
3992 (origin
3993 (method url-fetch)
3994 (uri (pypi-uri "SQLAlchemy-Utils" version))
3995 (sha256
3996 (base32
bb4b1706 3997 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
de2966cf 3998 (build-system python-build-system)
35d56b7b
MB
3999 (arguments
4000 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4001 ;; #:phases
4002 ;; (modify-phases %standard-phases
4003 ;; (replace 'check
4004 ;; (lambda _
4005 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
c22b4f87 4006 (propagated-inputs
de2966cf
EF
4007 `(("python-six" ,python-six)
4008 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb 4009 (native-inputs
22d7360b 4010 `(("python-dateutil" ,python-dateutil)
35d56b7b
MB
4011 ("python-flexmock" ,python-flexmock)
4012 ("python-psycopg2" ,python-psycopg2)
4013 ("python-pytest" ,python-pytest)
4014 ("python-pytz" ,python-pytz)))
de2966cf
EF
4015 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4016 (synopsis "Various utility functions for SQLAlchemy")
4017 (description
4018 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4019for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4020
4021You might also want to install the following optional dependencies:
4022@enumerate
4023@item @code{python-passlib}
4024@item @code{python-babel}
4025@item @code{python-cryptography}
4026@item @code{python-pytz}
4027@item @code{python-psycopg2}
4028@item @code{python-furl}
4029@item @code{python-flask-babel}
4030@end enumerate
4031")
de2966cf
EF
4032 (license license:bsd-3)))
4033
4034(define-public python2-sqlalchemy-utils
f210e944 4035 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4036
af5a4602
CAW
4037(define-public python-alembic
4038 (package
4039 (name "python-alembic")
bb484529 4040 (version "0.8.7")
af5a4602
CAW
4041 (source
4042 (origin
4043 (method url-fetch)
4044 (uri (pypi-uri "alembic" version))
4045 (sha256
4046 (base32
bb484529 4047 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
4048 (build-system python-build-system)
4049 (native-inputs
4050 `(("python-mock" ,python-mock)
4051 ("python-pytest-cov" ,python-pytest-cov)))
4052 (propagated-inputs
4053 `(("python-sqlalchemy" ,python-sqlalchemy)
4054 ("python-mako" ,python-mako)
4055 ("python-editor" ,python-editor)))
4056 (home-page "http://bitbucket.org/zzzeek/alembic")
4057 (synopsis
4058 "Database migration tool for SQLAlchemy")
4059 (description
4060 "Alembic is a lightweight database migration tool for usage with the
4061SQLAlchemy Database Toolkit for Python.")
f210e944 4062 (license license:expat)))
af5a4602
CAW
4063
4064(define-public python2-alembic
f210e944 4065 (package-with-python2 python-alembic))
af5a4602 4066
1671c07c
EB
4067(define-public python-distutils-extra
4068 (package
4069 (name "python-distutils-extra")
4070 (version "2.38")
4071 (source
4072 (origin
4073 (method url-fetch)
4074 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4075 version "/+download/python-distutils-extra-"
4076 version ".tar.gz"))
4077 (sha256
4078 (base32
4079 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4080 (build-system python-build-system)
1671c07c
EB
4081 (home-page "https://launchpad.net/python-distutils-extra/")
4082 (synopsis "Enhancements to Python's distutils")
4083 (description
4084 "The python-distutils-extra module enables you to easily integrate
4085gettext support, themed icons, and scrollkeeper-based documentation into
4086Python's distutils.")
3f641af0 4087 (license license:gpl2)))
1671c07c
EB
4088
4089(define-public python2-distutils-extra
4090 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4091
4092(define-public python2-elib.intl
4093 (package
4094 (name "python2-elib.intl")
4095 (version "0.0.3")
4096 (source
4097 (origin
4098 ;; This project doesn't tag releases or publish tarballs, so we take
4099 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4100 (method git-fetch)
4101 (uri (git-reference
4102 (url "https://github.com/dieterv/elib.intl.git")
4103 (commit "d09997cfef")))
4104 (sha256
4105 (base32
4106 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4107 (build-system python-build-system)
ea5456c8
EB
4108 (arguments
4109 ;; incompatible with Python 3 (exception syntax)
4110 `(#:python ,python-2
b41a05ce 4111 #:tests? #f))
ea5456c8
EB
4112 (home-page "https://github.com/dieterv/elib.intl")
4113 (synopsis "Enhanced internationalization for Python")
4114 (description
4115 "The elib.intl module provides enhanced internationalization (I18N)
4116services for your Python modules and applications.")
3f641af0 4117 (license license:lgpl3+)))
ea5456c8 4118
c937562e
EB
4119(define-public python-pillow
4120 (package
4121 (name "python-pillow")
aba5182c 4122 (version "3.3.3")
c937562e
EB
4123 (source
4124 (origin
4125 (method url-fetch)
f1d9231d 4126 (uri (pypi-uri "Pillow" version))
c937562e
EB
4127 (sha256
4128 (base32
aba5182c 4129 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4130 (build-system python-build-system)
4131 (native-inputs
f3b98f4f 4132 `(("python-nose" ,python-nose)))
c937562e 4133 (inputs
5ff408d9
SB
4134 `(("freetype" ,freetype)
4135 ("lcms" ,lcms)
c937562e
EB
4136 ("zlib" ,zlib)
4137 ("libjpeg" ,libjpeg)
4138 ("openjpeg" ,openjpeg)
5ff408d9
SB
4139 ("libtiff" ,libtiff)
4140 ("libwebp" ,libwebp)))
c937562e 4141 (arguments
e5358a6b 4142 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4143 (add-after
4144 'install 'check-installed
6151120a 4145 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4146 (begin
4147 (setenv "HOME" (getcwd))
6151120a
HG
4148 ;; Make installed package available for running the
4149 ;; tests
4150 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4151 (and (zero? (system* "python" "selftest.py"
4152 "--installed"))
4153 (zero? (system* "python" "test-installed.py"))))))
4154 (delete 'check))))
c937562e
EB
4155 (home-page "https://pypi.python.org/pypi/Pillow")
4156 (synopsis "Fork of the Python Imaging Library")
4157 (description
4158 "The Python Imaging Library adds image processing capabilities to your
4159Python interpreter. This library provides extensive file format support, an
4160efficient internal representation, and fairly powerful image processing
4161capabilities. The core image library is designed for fast access to data
4162stored in a few basic pixel formats. It should provide a solid foundation for
4163a general image processing tool.")
3f641af0 4164 (license (license:x11-style
c937562e
EB
4165 "http://www.pythonware.com/products/pil/license.htm"
4166 "The PIL Software License"))))
4167
4168(define-public python2-pillow
4169 (package-with-python2 python-pillow))
bb986599 4170
a415f036
FB
4171(define-public python-pycparser
4172 (package
4173 (name "python-pycparser")
38eb6919 4174 (version "2.14")
a415f036
FB
4175 (source
4176 (origin
4177 (method url-fetch)
38eb6919 4178 (uri (pypi-uri "pycparser" version))
a415f036
FB
4179 (sha256
4180 (base32
38eb6919 4181 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4182 (outputs '("out" "doc"))
4183 (build-system python-build-system)
4184 (native-inputs
f3b98f4f 4185 `(("pkg-config" ,pkg-config)))
a415f036 4186 (arguments
89b5c60e 4187 `(#:phases
a415f036
FB
4188 (alist-replace
4189 'check
4190 (lambda _
4191 (with-directory-excursion "tests"
4192 (zero? (system* "python" "all_tests.py"))))
4193 (alist-cons-after
4194 'install 'install-doc
4195 (lambda* (#:key outputs #:allow-other-keys)
4196 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4197 (doc (string-append data "/doc/" ,name "-" ,version))
4198 (examples (string-append doc "/examples")))
4199 (mkdir-p examples)
4200 (for-each (lambda (file)
4201 (copy-file (string-append "." file)
4202 (string-append doc file)))
4203 '("/README.rst" "/CHANGES" "/LICENSE"))
4204 (copy-recursively "examples" examples)))
4205 %standard-phases))))
4206 (home-page "https://github.com/eliben/pycparser")
4207 (synopsis "C parser in Python")
4208 (description
4209 "Pycparser is a complete parser of the C language, written in pure Python
4210using the PLY parsing library. It parses C code into an AST and can serve as
4211a front-end for C compilers or analysis tools.")
3f641af0 4212 (license license:bsd-3)))
a415f036
FB
4213
4214(define-public python2-pycparser
4215 (package-with-python2 python-pycparser))
57c3f716
FB
4216
4217(define-public python-cffi
4218 (package
4219 (name "python-cffi")
2d3a437c 4220 (version "1.4.2")
57c3f716
FB
4221 (source
4222 (origin
4223 (method url-fetch)
2d3a437c 4224 (uri (pypi-uri "cffi" version))
89b5c60e 4225 (sha256
2d3a437c 4226 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4227 (build-system python-build-system)
4228 (outputs '("out" "doc"))
4229 (inputs
4230 `(("libffi" ,libffi)))
4231 (propagated-inputs ; required at run-time
4232 `(("python-pycparser" ,python-pycparser)))
4233 (native-inputs
4234 `(("pkg-config" ,pkg-config)
4235 ("python-sphinx" ,python-sphinx)
f3b98f4f 4236 ("python-pytest" ,python-pytest)))
57c3f716 4237 (arguments
4179f952 4238 `(#:phases
57c3f716
FB
4239 (alist-cons-after
4240 'install 'install-doc
4241 (lambda* (#:key outputs #:allow-other-keys)
4242 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4243 (doc (string-append data "/doc/" ,name "-" ,version))
4244 (html (string-append doc "/html")))
4245 (with-directory-excursion "doc"
4246 (system* "make" "html")
4247 (mkdir-p html)
4248 (copy-recursively "build/html" html))
4249 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4250 %standard-phases)))
4251 (home-page "http://cffi.readthedocs.org")
4252 (synopsis "Foreign function interface for Python")
4253 (description
4254 "Foreign Function Interface for Python calling C code.")
bd3fa666 4255 (license license:expat)))
57c3f716
FB
4256
4257(define-public python2-cffi
4258 (package-with-python2 python-cffi))
6fa14469
FB
4259
4260(define-public python-xcffib
4261 (package
4262 (name "python-xcffib")
4263 (version "0.1.9")
4264 (source
4265 (origin
4266 (method url-fetch)
4267 (uri (string-append "https://pypi.python.org/packages/source/x/"
4268 "xcffib/xcffib-" version ".tar.gz"))
4269 (sha256
4270 (base32
4271 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4272 (build-system python-build-system)
4273 (inputs
482d9591 4274 `(("libxcb" ,libxcb)))
6fa14469 4275 (propagated-inputs
482d9591
HG
4276 `(("python-cffi" ,python-cffi) ; used at run time
4277 ("python-six" ,python-six)))
6fa14469 4278 (arguments
e2816ac7
MB
4279 `(;; FIXME: Tests cannot load libxcb.so.1
4280 #:tests? #f
4281 #:phases
c8cd850c
MB
4282 (modify-phases %standard-phases
4283 (add-after 'install 'install-doc
4284 (lambda* (#:key outputs #:allow-other-keys)
4285 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4286 "/doc/" ,name "-" ,version)))
4287 (mkdir-p doc)
4288 (copy-file "README.md"
4289 (string-append doc "/README.md"))
4290 #t))))))
6fa14469
FB
4291 (home-page "https://github.com/tych0/xcffib")
4292 (synopsis "XCB Python bindings")
4293 (description
4294 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4295support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4296 (license license:expat)))
6fa14469
FB
4297
4298(define-public python2-xcffib
4299 (package-with-python2 python-xcffib))
4300
9e099723
FB
4301(define-public python-cairocffi
4302 (package
4303 (name "python-cairocffi")
4304 (version "0.6")
4305 (source
4306 (origin
4307 (method url-fetch)
4308 ;; The archive on pypi is missing the 'utils' directory!
4309 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4310 version ".tar.gz"))
f586c877 4311 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4312 (sha256
4313 (base32
4314 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4315 (build-system python-build-system)
4316 (outputs '("out" "doc"))
4317 (inputs
4318 `(("gdk-pixbuf" ,gdk-pixbuf)
4319 ("cairo" ,cairo)))
4320 (native-inputs
4321 `(("pkg-config" ,pkg-config)
4322 ("python-sphinx" ,python-sphinx)
f3b98f4f 4323 ("python-docutils" ,python-docutils)))
9e099723
FB
4324 (propagated-inputs
4325 `(("python-xcffib" ,python-xcffib))) ; used at run time
4326 (arguments
a792e1aa
MB
4327 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4328 #:tests? #f
4329 #:phases
6734c7ba
MB
4330 (modify-phases %standard-phases
4331 (add-after 'install 'install-doc
4332 (lambda* (#:key inputs outputs #:allow-other-keys)
4333 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4334 (doc (string-append data "/doc/" ,name "-" ,version))
4335 (html (string-append doc "/html")))
4336 (setenv "LD_LIBRARY_PATH"
4337 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4338 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4339 (setenv "LANG" "en_US.UTF-8")
4340 (mkdir-p html)
4341 (for-each (lambda (file)
4342 (copy-file (string-append "." file)
4343 (string-append doc file)))
4344 '("/README.rst" "/CHANGES" "/LICENSE"))
4345 (system* "python" "setup.py" "build_sphinx")
4346 (copy-recursively "docs/_build/html" html)
4347 #t))))))
9e099723
FB
4348 (home-page "https://github.com/SimonSapin/cairocffi")
4349 (synopsis "Python bindings and object-oriented API for Cairo")
4350 (description
4351 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4352Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4353graphics library with support for multiple backends including image buffers,
4354PNG, PostScript, PDF, and SVG file output.")
3f641af0 4355 (license license:bsd-3)))
9e099723
FB
4356
4357(define-public python2-cairocffi
4358 (package-with-python2 python-cairocffi))
4359
3cff95cb
RW
4360(define-public python-decorator
4361 (package
4362 (name "python-decorator")
eb6e2e81 4363 (version "4.0.9")
3cff95cb
RW
4364 (source
4365 (origin
4366 (method url-fetch)
e21338be 4367 (uri (pypi-uri "decorator" version))
3cff95cb 4368 (sha256
eb6e2e81 4369 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4370 (build-system python-build-system)
4371 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4372 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4373 (synopsis "Python module to simplify usage of decorators")
4374 (description
4375 "The aim of the decorator module is to simplify the usage of decorators
4376for the average programmer, and to popularize decorators usage giving examples
4377of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4378etc. The core of this module is a decorator factory.")
4379 (license license:expat)))
4380
4381(define-public python2-decorator
4382 (package-with-python2 python-decorator))
4383
2c0499ad
RW
4384(define-public python-drmaa
4385 (package
4386 (name "python-drmaa")
4387 (version "0.7.6")
4388 (source
4389 (origin
4390 (method url-fetch)
4391 (uri (string-append
4392 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4393 version ".tar.gz"))
4394 (sha256
4395 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4396 (build-system python-build-system)
4397 ;; The test suite requires libdrmaa which is provided by the cluster
4398 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4399 ;; should be set to the path of the libdrmaa library.
4400 (arguments '(#:tests? #f))
4401 (native-inputs
f3b98f4f 4402 `(("python-nose" ,python-nose)))
2c0499ad
RW
4403 (home-page "https://pypi.python.org/pypi/drmaa")
4404 (synopsis "Python bindings for the DRMAA library")
4405 (description
4406 "A Python package for Distributed Resource Management (DRM) job
4407submission and control. This package is an implementation of the DRMAA 1.0
4408Python language binding specification.")
3f641af0 4409 (license license:bsd-3)))
2c0499ad
RW
4410
4411(define-public python2-drmaa
4412 (package-with-python2 python-drmaa))
4413
d05c6da0
RW
4414(define-public python-gridmap
4415 (package
4416 (name "python-gridmap")
4417 (version "0.13.0")
4418 (source
4419 (origin
4420 (method url-fetch)
4421 (uri (string-append
4422 "https://github.com/pygridtools/gridmap/archive/v"
4423 version ".tar.gz"))
4424 (file-name (string-append name "-" version ".tar.gz"))
4425 (sha256
4426 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4427 (build-system python-build-system)
ad348f9f
MB
4428 (arguments
4429 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
f22efa01 4430 (propagated-inputs
d05c6da0
RW
4431 `(("python-psutil" ,python-psutil)
4432 ("python-drmaa" ,python-drmaa)
4433 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4434 (home-page "https://github.com/pygridtools/gridmap")
4435 (synopsis "Create jobs on a cluster directly from Python")
4436 (description
4437 "Gridmap is a Python package to allow you to easily create jobs on the
4438cluster directly from Python. You can directly map Python functions onto the
4439cluster without needing to write any wrapper code yourself.")
3f641af0 4440 (license license:gpl3+)))
d05c6da0
RW
4441
4442(define-public python2-gridmap
4443 (package-with-python2 python-gridmap))
4444
cb6d5c54
RW
4445(define-public python-pexpect
4446 (package
4447 (name "python-pexpect")
ed118043 4448 (version "4.2.1")
cb6d5c54
RW
4449 (source
4450 (origin
4451 (method url-fetch)
ed118043 4452 (uri (pypi-uri "pexpect" version))
cb6d5c54 4453 (sha256
ed118043 4454 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
cb6d5c54
RW
4455 (build-system python-build-system)
4456 (arguments
4457 `(#:phases
4458 (modify-phases %standard-phases
ed118043
MB
4459 (add-before 'check 'prepare-tests
4460 (lambda _
4461 (substitute* (find-files "tests")
4462 (("/bin/ls") (which "ls"))
4463 (("/bin/echo") (which "echo"))
4464 (("/bin/which") (which "which"))
4465 ;; Many tests try to use the /bin directory which
4466 ;; is not present in the build environment.
4467 ;; Use one that's non-empty and unlikely to change.
4468 (("/bin'") "/dev'"))
4469 ;; XXX: Socket connection test gets "Connection reset by peer".
4470 ;; Why does it not work? Delete for now.
4471 (delete-file "tests/test_socket.py")
4472 #t))
cb6d5c54
RW
4473 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4474 (native-inputs
ed118043
MB
4475 `(("python-nose" ,python-nose)
4476 ("python-pytest" ,python-pytest)
4477 ("man-db" ,man-db)
4478 ("which" ,which)))
4479 (propagated-inputs
4480 `(("python-ptyprocess" ,python-ptyprocess)))
cb6d5c54
RW
4481 (home-page "http://pexpect.readthedocs.org/")
4482 (synopsis "Controlling interactive console applications")
4483 (description
4484 "Pexpect is a pure Python module for spawning child applications;
4485controlling them; and responding to expected patterns in their output.
4486Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4487child application and control it as if a human were typing commands.")
3f641af0 4488 (license license:isc)))
cb6d5c54
RW
4489
4490(define-public python2-pexpect
4491 (package-with-python2 python-pexpect))
4492
229ad120
RW
4493(define-public python-setuptools-scm
4494 (package
4495 (name "python-setuptools-scm")
42d6d0d0 4496 (version "1.11.1")
229ad120
RW
4497 (source (origin
4498 (method url-fetch)
383af6b0 4499 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4500 (sha256
4501 (base32
42d6d0d0 4502 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120
RW
4503 (build-system python-build-system)
4504 (home-page "https://github.com/pypa/setuptools_scm/")
4505 (synopsis "Manage Python package versions in SCM metadata")
4506 (description
383af6b0 4507 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4508@dfn{software configuration management} (SCM) metadata instead of declaring
4509them as the version argument or in a SCM managed file.")
4510 (license license:expat)))
4511
4512(define-public python2-setuptools-scm
4513 (package-with-python2 python-setuptools-scm))
4514
b74270ee
RW
4515(define-public python-pathpy
4516 (package
4517 (name "python-pathpy")
4518 (version "8.1.1")
4519 (source
4520 (origin
4521 (method url-fetch)
4522 (uri (string-append "https://pypi.python.org/packages/source/p/"
4523 "path.py/path.py-" version ".tar.gz"))
4524 (sha256
4525 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4526 (outputs '("out" "doc"))
b74270ee
RW
4527 (build-system python-build-system)
4528 (propagated-inputs
4529 `(("python-appdirs" ,python-appdirs)))
4530 (native-inputs
f3b98f4f 4531 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4532 ("python-sphinx" ,python-sphinx)
4533 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4534 ("python-pytest" ,python-pytest)
4535 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4536 (arguments
4537 `(#:phases
4538 (modify-phases %standard-phases
4539 (add-after 'build 'build-doc
4540 (lambda _
4541 (setenv "LANG" "en_US.UTF-8")
4542 (zero? (system* "python" "setup.py" "build_sphinx"))))
4543 (add-after 'install 'install-doc
4544 (lambda* (#:key outputs #:allow-other-keys)
4545 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4546 (doc (string-append data "/doc/" ,name "-" ,version))
4547 (html (string-append doc "/html")))
4548 (mkdir-p html)
4549 (for-each (lambda (file)
4550 (copy-file file (string-append doc "/" file)))
4551 '("README.rst" "CHANGES.rst"))
4552 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4553 (home-page "http://github.com/jaraco/path.py")
4554 (synopsis "Python module wrapper for built-in os.path")
4555 (description
4556 "@code{path.py} implements path objects as first-class entities, allowing
4557common operations on files to be invoked on those path objects directly.")
4558 (license license:expat)))
4559
4560(define-public python2-pathpy
4561 (package-with-python2 python-pathpy))
4562
0d34e01b
RW
4563(define-public python-pickleshare
4564 (package
4565 (name "python-pickleshare")
4566 (version "0.5")
4567 (source
4568 (origin
4569 (method url-fetch)
4570 (uri (string-append "https://pypi.python.org/packages/source/p/"
4571 "pickleshare/pickleshare-" version ".tar.gz"))
4572 (sha256
4573 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4574 (build-system python-build-system)
4575 (propagated-inputs
4576 `(("python-pathpy" ,python-pathpy)))
4577 (home-page "https://github.com/vivainio/pickleshare")
4578 (synopsis "Tiny key value database with concurrency support")
4579 (description
4580 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4581Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4582shelve, many processes can access the database simultaneously. Changing a
4583value in database is immediately visible to other processes accessing the same
4584database. Concurrency is possible because the values are stored in separate
4585files. Hence the “database” is a directory where all files are governed by
4586PickleShare.")
4587 (license license:expat)))
4588
4589(define-public python2-pickleshare
4590 (package-with-python2 python-pickleshare))
4591
cd6e5189
RW
4592(define-public python-simplegeneric
4593 (package
4594 (name "python-simplegeneric")
4595 (version "0.8.1")
4596 (source
4597 (origin
4598 (method url-fetch)
4599 (uri (string-append "https://pypi.python.org/packages/source/s/"
4600 "simplegeneric/simplegeneric-" version ".zip"))
4601 (sha256
4602 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4603 (build-system python-build-system)
4604 (native-inputs
f3b98f4f 4605 `(("unzip" ,unzip)))
cd6e5189
RW
4606 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4607 (synopsis "Python module for simple generic functions")
4608 (description
4609 "The simplegeneric module lets you define simple single-dispatch generic
4610functions, akin to Python’s built-in generic functions like @code{len()},
4611@code{iter()} and so on. However, instead of using specially-named methods,
4612these generic functions use simple lookup tables, akin to those used by
4613e.g. @code{pickle.dump()} and other generic functions found in the Python
4614standard library.")
3f641af0 4615 (license license:zpl2.1)))
cd6e5189
RW
4616
4617(define-public python2-simplegeneric
4618 (package-with-python2 python-simplegeneric))
4619
ddc7d8ed 4620(define-public python-ipython-genutils
c4abbac3 4621 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
4622 (package
4623 (name "python-ipython-genutils")
4624 (version "0.1.0")
4625 (source
4626 (origin
4627 (method url-fetch)
4628 (uri (string-append "https://pypi.python.org/packages/source/i/"
4629 "ipython_genutils/ipython_genutils-"
4630 version ".tar.gz"))
4631 (sha256
4632 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4633 (build-system python-build-system)
4634 (arguments `(#:tests? #f)) ; no tests
4635 (home-page "http://ipython.org")
4636 (synopsis "Vestigial utilities from IPython")
4637 (description
c4abbac3
HG
4638 "This package provides retired utilities from IPython. No packages
4639outside IPython/Jupyter should depend on it.
4640
4641This package shouldn't exist. It contains some common utilities shared by
4642Jupyter and IPython projects during The Big Split. As soon as possible, those
4643packages will remove their dependency on this, and this package will go
4644away.")
3f641af0 4645 (license license:bsd-3)))
ddc7d8ed
RW
4646
4647(define-public python2-ipython-genutils
4648 (package-with-python2 python-ipython-genutils))
4649
2b10eb48
RW
4650(define-public python-traitlets
4651 (package
4652 (name "python-traitlets")
a5ba1481 4653 (version "4.2.0")
2b10eb48
RW
4654 (source
4655 (origin
4656 (method url-fetch)
cc0c4fde 4657 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4658 (sha256
4659 (base32
a5ba1481 4660 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4661 (build-system python-build-system)
4662 (arguments
4663 `(#:phases
4664 (modify-phases %standard-phases
4665 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4666 (propagated-inputs
4667 `(("python-ipython-genutils" ,python-ipython-genutils)
4668 ("python-decorator" ,python-decorator)))
4669 (native-inputs
cc0c4fde
EF
4670 `(("python-mock" ,python-mock)
4671 ("python-nose" ,python-nose)))
2b10eb48
RW
4672 (home-page "http://ipython.org")
4673 (synopsis "Configuration system for Python applications")
4674 (description
4675 "Traitlets is a framework that lets Python classes have attributes with
4676type checking, dynamically calculated default values, and ‘on change’
4677callbacks. The package also includes a mechanism to use traitlets for
4678configuration, loading values from files or from command line arguments. This
4679is a distinct layer on top of traitlets, so you can use traitlets in your code
4680without using the configuration machinery.")
3f641af0 4681 (license license:bsd-3)))
2b10eb48
RW
4682
4683(define-public python2-traitlets
4684 (package-with-python2 python-traitlets))
4685
4263b06f
RW
4686(define-public python-jupyter-core
4687 (package
4688 (name "python-jupyter-core")
4689 (version "4.2.0")
4690 (source
4691 (origin
4692 (method url-fetch)
4693 (uri (string-append (pypi-uri "jupyter_core" version)))
4694 (sha256
4695 (base32
4696 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4697 (build-system python-build-system)
4698 ;; FIXME: not sure how to run the tests
4699 (arguments `(#:tests? #f))
4700 (propagated-inputs
4701 `(("python-traitlets" ,python-traitlets)))
4702 (home-page "http://jupyter.org/")
4703 (synopsis "Jupyter base package")
4704 (description
4705 "Jupyter core is the base package on which Jupyter projects rely.")
4706 (license license:bsd-3)))
4707
4708(define-public python2-jupyter-core
4709 (package-with-python2 python-jupyter-core))
4710
9ff01f2d
RW
4711(define-public python-jupyter-client
4712 (package
4713 (name "python-jupyter-client")
4714 (version "4.4.0")
4715 (source
4716 (origin
4717 (method url-fetch)
4718 (uri (pypi-uri "jupyter_client" version))
4719 (sha256
4720 (base32
4721 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4722 (build-system python-build-system)
4723 ;; Tests fail because of missing native python kernel which I assume is
4724 ;; provided by the ipython package, which we cannot use because it would
4725 ;; cause a dependency cycle.
4726 (arguments `(#:tests? #f))
4727 (propagated-inputs
4728 `(("python-pyzmq" ,python-pyzmq)
4729 ("python-traitlets" ,python-traitlets)
4730 ("python-jupyter-core" ,python-jupyter-core)))
4731 (home-page "http://jupyter.org/")
4732 (synopsis "Jupyter protocol implementation and client libraries")
4733 (description
4734 "The @code{jupyter_client} package contains the reference implementation
4735of the Jupyter protocol. It also provides client and kernel management APIs
4736for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4737installing @code{kernelspec}s for use with Jupyter frontends.")
4738 (license license:bsd-3)))
4739
4740(define-public python2-jupyter-client
4741 (package-with-python2 python-jupyter-client))
4742
ab526102
RW
4743(define-public python-ipykernel
4744 (package
4745 (name "python-ipykernel")
4746 (version "4.5.0")
4747 (source
4748 (origin
4749 (method url-fetch)
4750 (uri (pypi-uri "ipykernel" version))
4751 (sha256
4752 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4753 (build-system python-build-system)
4754 ;; The tests load a submodule of IPython. However, IPython itself depends
4755 ;; on ipykernel.
4756 (arguments `(#:tests? #f))
4757 (propagated-inputs
4758 ;; imported at runtime during connect
4759 `(("python-jupyter-client" ,python-jupyter-client)))
4760 (home-page "http://ipython.org")
4761 (synopsis "IPython Kernel for Jupyter")
4762 (description
4763 "This package provides the IPython kernel for Jupyter.")
4764 (license license:bsd-3)))
4765
4766(define-public python2-ipykernel
4767 (package-with-python2 python-ipykernel))
4768
5ff6effc
RW
4769(define-public python-testpath
4770 (package
4771 (name "python-testpath")
4772 (version "0.2")
4773 (source
4774 (origin
4775 (method url-fetch)
4776 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4777 version ".tar.gz"))
4778 (file-name (string-append name "-" version ".tar.gz"))
4779 (sha256
4780 (base32
4781 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4782 (build-system python-build-system)
4783 (arguments
4784 `(#:tests? #f ; this package does not even have a setup.py
4785 #:phases
4786 (modify-phases %standard-phases
4787 (delete 'install)
4788 (replace 'build
4789 (lambda* (#:key inputs outputs #:allow-other-keys)
4790 (let ((dir (string-append
4791 (assoc-ref outputs "out")
4792 "/lib/python"
4793 (string-take (string-take-right
4794 (assoc-ref inputs "python") 5) 3)
4795 "/site-packages/testpath")))
4796 (mkdir-p dir)
4797 (copy-recursively "testpath" dir))
4798 #t)))))
4799 (home-page "https://github.com/takluyver/testpath")
4800 (synopsis "Test utilities for code working with files and commands")
4801 (description
4802 "Testpath is a collection of utilities for Python code working with files
4803and commands. It contains functions to check things on the filesystem, and
4804tools for mocking system commands and recording calls to those.")
4805 (license license:expat)))
4806
4807(define-public python2-testpath
4808 (package-with-python2 python-testpath))
4809
ae1ab9fe
FB
4810(define-public python-ipython
4811 (package
4812 (name "python-ipython")
4dbc8ec4 4813 (version "4.0.3")
ae1ab9fe
FB
4814 (source
4815 (origin
fceac880 4816 (method url-fetch)
accd5f99 4817 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 4818 (sha256
4dbc8ec4 4819 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
ae1ab9fe
FB
4820 (build-system python-build-system)
4821 (outputs '("out" "doc"))
3a0b1b9a
FB
4822 (propagated-inputs
4823 `(("python-pyzmq" ,python-pyzmq)
accd5f99 4824 ("python-terminado" ,python-terminado)
ae1ab9fe 4825 ("python-matplotlib" ,python-matplotlib)
5d26e542 4826 ("python-numpy" ,python-numpy)
ae1ab9fe 4827 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4828 ("python-jinja2" ,python-jinja2)
4829 ("python-mistune" ,python-mistune)
accd5f99
RW
4830 ("python-pexpect" ,python-pexpect)
4831 ("python-pickleshare" ,python-pickleshare)
4832 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 4833 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
4834 ("python-traitlets" ,python-traitlets)
4835 ("python-ipykernel" ,python-ipykernel)
4836 ("python-pygments" ,python-pygments)))
4837 (inputs
4838 `(("readline" ,readline)
4839 ("which" ,which)))
ae1ab9fe
FB
4840 (native-inputs
4841 `(("pkg-config" ,pkg-config)
accd5f99
RW
4842 ("python-requests" ,python-requests) ;; for tests
4843 ("python-testpath" ,python-testpath)
4844 ("python-nose" ,python-nose)
ae1ab9fe
FB
4845 ("python-sphinx" ,python-sphinx)
4846 ("texlive" ,texlive)
f3b98f4f 4847 ("texinfo" ,texinfo)))
ae1ab9fe 4848 (arguments
89b5c60e 4849 `(#:phases
3a0b1b9a
FB
4850 (modify-phases %standard-phases
4851 (add-after
4852 'install 'install-doc
4853 (lambda* (#:key inputs outputs #:allow-other-keys)
4854 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4855 (doc (string-append data "/doc/" ,name "-" ,version))
4856 (html (string-append doc "/html"))
4857 (man1 (string-append data "/man/man1"))
4858 (info (string-append data "/info"))
4859 (examples (string-append doc "/examples")))
afd3d931 4860 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
4861 ;; Make installed package available for running the tests
4862 (add-installed-pythonpath inputs outputs)
3a0b1b9a 4863 (with-directory-excursion "docs"
accd5f99
RW
4864 ;; FIXME: pdf fails to build
4865 ;;(system* "make" "pdf" "PAPER=a4")
4866 (system* "make" "html")
3a0b1b9a
FB
4867 (system* "make" "info"))
4868 (copy-recursively "docs/man" man1)
4869 (copy-recursively "examples" examples)
accd5f99 4870 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
4871 ;; (copy-file "docs/build/latex/ipython.pdf"
4872 ;; (string-append doc "/ipython.pdf"))
4873 (mkdir-p info)
4874 (copy-file "docs/build/texinfo/ipython.info"
4875 (string-append info "/ipython.info"))
4876 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4877 ;; Tests can only be run after the library has been installed and not
4878 ;; within the source directory.
4879 (delete 'check)
4880 (add-after
4881 'install 'check
eee5cd04 4882 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
4883 (if tests?
4884 (with-directory-excursion "/tmp"
eee5cd04
HG
4885 ;; Make installed package available for running the tests
4886 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
4887 (setenv "HOME" "/tmp/") ;; required by a test
4888 (zero? (system* (string-append (assoc-ref outputs "out")
4889 "/bin/iptest"))))
4890 #t)))
4891 (add-before
4892 'install 'fix-tests
4893 (lambda* (#:key inputs #:allow-other-keys)
4894 (substitute* "./IPython/utils/_process_posix.py"
4895 (("/usr/bin/env', 'which") (which "which")))
4896 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4897 (("#!/usr/bin/env python")
4898 (string-append "#!" (which "python"))))
4899 ;; Disable 1 failing test
4900 (substitute* "./IPython/core/tests/test_magic.py"
4901 (("def test_dirops\\(\\):" all)
4902 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4903 (home-page "http://ipython.org")
4904 (synopsis "IPython is a tool for interactive computing in Python")
4905 (description
4906 "IPython provides a rich architecture for interactive computing with:
4907Powerful interactive shells, a browser-based notebook, support for interactive
4908data visualization, embeddable interpreters and tools for parallel
4909computing.")
135ba811
EF
4910 (license license:bsd-3)
4911 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4912
4913(define-public python2-ipython
135ba811 4914 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4915 (package
4916 (inherit ipython)
4917 ;; FIXME: some tests are failing
4918 (arguments
4919 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4920 ;; FIXME: add pyreadline once available.
e62600fe 4921 (native-inputs
135ba811 4922 `(("python2-mock" ,python2-mock)
77a6932a 4923 ,@(package-native-inputs ipython))))))
03411993
AE
4924
4925(define-public python-isodate
4926 (package
4927 (name "python-isodate")
b6785c2e 4928 (version "0.5.4")
03411993
AE
4929 (source
4930 (origin
4931 (method url-fetch)
b6785c2e 4932 (uri (pypi-uri "isodate" version))
03411993
AE
4933 (sha256
4934 (base32
b6785c2e 4935 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 4936 (build-system python-build-system)
03411993
AE
4937 (home-page
4938 "http://cheeseshop.python.org/pypi/isodate")
4939 (synopsis
4940 "Python date parser and formatter")
4941 (description
4942 "Python-isodate is a python module for parsing and formatting
4943ISO 8601 dates, time and duration.")
3f641af0 4944 (license license:bsd-3)))
03411993
AE
4945
4946(define-public python2-isodate
4947 (package-with-python2 python-isodate))
673ab897
AE
4948
4949(define-public python-html5lib
4950 (package
4951 (name "python-html5lib")
a14061aa 4952 (version "1.0b10")
673ab897
AE
4953 (source
4954 (origin
4955 (method url-fetch)
fee04c19 4956 (uri (pypi-uri "html5lib" version))
673ab897
AE
4957 (sha256
4958 (base32
a14061aa 4959 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 4960 (build-system python-build-system)
3dd75476 4961 (propagated-inputs
4eb6ed28
MB
4962 `(("python-six" ,python-six)
4963 ("python-webencodings" ,python-webencodings)))
673ab897
AE
4964 (arguments
4965 `(#:test-target "check"))
4966 (home-page
4967 "https://github.com/html5lib/html5lib-python")
4968 (synopsis
4969 "Python HTML parser based on the WHATWG HTML specifcation")
4970 (description
4971 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4972and written in Python.")
bd3fa666 4973 (license license:expat)))
673ab897
AE
4974
4975(define-public python2-html5lib
4976 (package-with-python2 python-html5lib))
e99f4211 4977
8ee62c97
RW
4978;; Needed for python-bleach, a dependency of python-notebook
4979(define-public python-html5lib-0.9
4980 (package
4981 (inherit python-html5lib)
4982 (version "0.999")
4983 (source
4984 (origin
4985 (method url-fetch)
4986 (uri (pypi-uri "html5lib" version))
4987 (sha256
4988 (base32
4989 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4990
4991(define-public python2-html5lib-0.9
4992 (package-with-python2 python-html5lib-0.9))
4993
adbca19e
MB
4994(define-public python-webencodings
4995 (package
4996 (name "python-webencodings")
4997 (version "0.5")
4998 (source (origin
4999 (method url-fetch)
5000 (uri (pypi-uri "webencodings" version))
5001 (sha256
5002 (base32
5003 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5004 (build-system python-build-system)
5005 (arguments
5006 '(#:phases
5007 (modify-phases %standard-phases
5008 (replace 'check
5009 (lambda _
5010 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5011 (native-inputs
5012 `(("python-pytest" ,python-pytest)))
5013 (home-page "https://github.com/SimonSapin/python-webencodings")
5014 (synopsis "Character encoding aliases for legacy web content")
5015 (description
5016 "In order to be compatible with legacy web content when interpreting
5017something like @code{Content-Type: text/html; charset=latin1}, tools need
5018to use a particular set of aliases for encoding labels as well as some
5019overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5020the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5021or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5022The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5023defines all such details so that implementations do not have to
5024reverse-engineer each other.
5025
5026This module implements the Encoding standard and has encoding labels and
5027BOM detection, but the actual implementation for encoders and decoders
5028is Python’s.")
5029 (license license:bsd-3)))
5030
5031(define-public python2-webencodings
5032 (package-with-python2 python-webencodings))
5033
e99f4211
MW
5034(define-public python-urwid
5035 (package
5036 (name "python-urwid")
51ff41f6 5037 (version "1.3.1")
e99f4211
MW
5038 (source
5039 (origin
5040 (method url-fetch)
b97c1bfd 5041 (uri (pypi-uri "urwid" version))
e99f4211
MW
5042 (sha256
5043 (base32
51ff41f6 5044 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5045 (build-system python-build-system)
b97c1bfd
LF
5046 (arguments
5047 `(#:phases
5048 (modify-phases %standard-phases
5049 ;; Disable failing test. Bug filed upstream:
5050 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5051 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5052 (add-after 'unpack 'disable-failing-test
5053 (lambda _
5054 (substitute* "urwid/tests/test_event_loops.py"
5055 (("test_remove_watch_file")
5056 "disable_remove_watch_file")))))))
e99f4211
MW
5057 (home-page "http://urwid.org")
5058 (synopsis "Console user interface library for Python")
5059 (description
5060 "Urwid is a curses-based UI/widget library for Python. It includes many
5061features useful for text console applications.")
3f641af0 5062 (license license:lgpl2.1+)))
e99f4211
MW
5063
5064(define-public python2-urwid
5065 (package-with-python2 python-urwid))
d95a56c6 5066
47d0b292
TS
5067(define-public python-urwidtrees
5068 (package
5069 (name "python-urwidtrees")
37ec4623 5070 (version "1.0.2")
47d0b292
TS
5071 (source
5072 (origin
5073 (method url-fetch)
37ec4623
TS
5074 ;; package author intends on distributing via github rather than pypi:
5075 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5076 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5077 version ".tar.gz"))
5078 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5079 (sha256
5080 (base32
37ec4623 5081 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5082 (build-system python-build-system)
5083 (arguments
5084 '(#:tests? #f)) ; no tests
f22efa01 5085 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5086 (home-page "https://github.com/pazz/urwidtrees")
5087 (synopsis "Tree widgets for urwid")
5088 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5089toolkit. Use it to build trees of widgets.")
3f641af0 5090 (license license:gpl3+)))
47d0b292
TS
5091
5092(define-public python2-urwidtrees
5093 (package-with-python2 python-urwidtrees))
5094
d95a56c6
PAR
5095(define-public python-dbus
5096 (package
5097 (name "python-dbus")
5098 (version "1.2.0")
5099 (source
5100 (origin
5101 (method url-fetch)
5102 (uri (string-append
5cc3096c 5103 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5104 version ".tar.gz"))
5105 (sha256
5106 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5107 (build-system gnu-build-system)
6717c879
SB
5108 (arguments
5109 '(#:phases
5110 (modify-phases %standard-phases
5111 (add-before
5112 'check 'pre-check
5113 (lambda _
5114 ;; XXX: For the missing '/etc/machine-id'.
5115 (substitute* "test/run-test.sh"
5116 (("DBUS_FATAL_WARNINGS=1")
5117 "DBUS_FATAL_WARNINGS=0"))
5118 #t)))))
d95a56c6
PAR
5119 (native-inputs
5120 `(("pkg-config" ,pkg-config)))
5121 (inputs
5122 `(("python" ,python)
2e88d113 5123 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5124 (synopsis "Python bindings for D-bus")
5125 (description "python-dbus provides bindings for libdbus, the reference
5126implementation of D-Bus.")
5127 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5128 (license license:expat)))
b52af02b
MW
5129
5130(define-public python2-dbus
5131 (package (inherit python-dbus)
5132 (name "python2-dbus")
5133 (inputs `(("python" ,python-2)
5134 ,@(alist-delete "python"
5135 (package-inputs python-dbus)
5136 equal?)))
5137 ;; FIXME: on Python 2, the test_utf8 fails with:
5138 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5139 (arguments `(#:tests? #f))))
a6ac8332
AE
5140
5141(define-public python-apsw
5142 (package
5143 (name "python-apsw")
917708c2 5144 (version "3.9.2-r1")
a6ac8332
AE
5145 (source
5146 (origin
5147 (method url-fetch)
917708c2 5148 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5149 (sha256
5150 (base32
917708c2 5151 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5152 (build-system python-build-system)
5153 (inputs
f3b98f4f 5154 `(("sqlite" ,sqlite)))
a6ac8332
AE
5155 (arguments
5156 `(#:phases
5157 ;; swap check and install phases
5158 (alist-cons-after
5159 'install 'check
5160 (assoc-ref %standard-phases 'check)
5161 (alist-delete
5162 'check
5163 %standard-phases))))
5164 (home-page "https://github.com/rogerbinns/apsw/")
5165 (synopsis "Another Python SQLite Wrapper")
5166 (description "APSW is a Python wrapper for the SQLite
5167embedded relational database engine. In contrast to other wrappers such as
5168pysqlite it focuses on being a minimal layer over SQLite attempting just to
5169translate the complete SQLite API into Python.")
abde5f37 5170 (license license:zlib)))
a6ac8332
AE
5171
5172(define-public python2-apsw
5173 (package-with-python2 python-apsw))
26b307e2
AE
5174
5175(define-public python-lxml
5176 (package
5177 (name "python-lxml")
d58a3203 5178 (version "3.6.0")
26b307e2
AE
5179 (source
5180 (origin
5181 (method url-fetch)
97bbc480 5182 (uri (pypi-uri "lxml" version))
26b307e2 5183 (sha256
d58a3203
EF
5184 (base32
5185 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5186 (build-system python-build-system)
5187 (inputs
5188 `(("libxml2" ,libxml2)
f3b98f4f 5189 ("libxslt" ,libxslt)))
26b307e2
AE
5190 (home-page "http://lxml.de/")
5191 (synopsis
5192 "Python XML processing library")
5193 (description
5194 "The lxml XML toolkit is a Pythonic binding for the C libraries
5195libxml2 and libxslt.")
3f641af0 5196 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5197
5198(define-public python2-lxml
5199 (package-with-python2 python-lxml))
4ed20663 5200
b32a1e47
CAW
5201;; beautifulsoup4 has a totally different namespace than 3.x,
5202;; and pypi seems to put it under its own name, so I guess we should too
5203(define-public python-beautifulsoup4
5204 (package
5205 (name "python-beautifulsoup4")
67fd4a12 5206 (version "4.5.1")
b32a1e47
CAW
5207 (source
5208 (origin
5209 (method url-fetch)
5210 (uri (pypi-uri "beautifulsoup4" version))
5211 (sha256
5212 (base32
67fd4a12 5213 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5214 (build-system python-build-system)
5f37f0b6
LF
5215 (arguments
5216 `(#:phases
5217 (modify-phases %standard-phases
5218 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5219 ;; must use this conversion script when building with Python 3. The
5220 ;; conversion script also runs the tests.
5221 ;; For more information, see the file 'convert-py3k' in the source
5222 ;; distribution.
5223 (replace 'check
5224 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5225 (home-page
5226 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5227 (synopsis
5228 "Python screen-scraping library")
5229 (description
5230 "Beautiful Soup is a Python library designed for rapidly setting up
5231screen-scraping projects. It offers Pythonic idioms for navigating,
5232searching, and modifying a parse tree, providing a toolkit for
5233dissecting a document and extracting what you need. It automatically
5234converts incoming documents to Unicode and outgoing documents to UTF-8.")
f210e944 5235 (license license:expat)))
b32a1e47
CAW
5236
5237(define-public python2-beautifulsoup4
5238 (package
5239 (inherit (package-with-python2
5240 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5241 (arguments `(#:python ,python-2))))
b32a1e47 5242
092e86f5
AE
5243(define-public python2-cssutils
5244 (package
5245 (name "python2-cssutils")
58d1d816 5246 (version "1.0.1")
092e86f5
AE
5247 (source
5248 (origin
5249 (method url-fetch)
58d1d816 5250 (uri (pypi-uri "cssutils" version))
092e86f5 5251 (sha256
58d1d816
EF
5252 (base32
5253 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5254 (build-system python-build-system)
5255 (native-inputs
5256 `(("python2-mock" ,python2-mock) ; for the tests
5257 ("unzip" ,unzip))) ; for unpacking the source
092e86f5
AE
5258 (arguments
5259 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5260 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5261 ))
092e86f5
AE
5262 (home-page "http://cthedot.de/cssutils/")
5263 (synopsis
5264 "CSS Cascading Style Sheets library for Python")
5265 (description
5266 "Cssutils is a Python package for parsing and building CSS
5267Cascading Style Sheets. Currently it provides a DOM only and no rendering
5268options.")
3f641af0 5269 (license license:lgpl3+)))
880ff77c
AE
5270
5271(define-public python-cssselect
5272 (package
5273 (name "python-cssselect")
d5ccd9ab 5274 (version "0.9.2")
880ff77c
AE
5275 (source
5276 (origin
5277 (method url-fetch)
d5ccd9ab 5278 (uri (pypi-uri "cssselect" version))
880ff77c 5279 (sha256
d5ccd9ab
EF
5280 (base32
5281 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5282 (build-system python-build-system)
880ff77c
AE
5283 (arguments
5284 ;; tests fail with message
5285 ;; AttributeError: 'module' object has no attribute 'tests'
5286 `(#:tests? #f))
5287 (home-page
5288 "https://pythonhosted.org/cssselect/")
5289 (synopsis
5290 "CSS3 selector parser and translator to XPath 1.0")
5291 (description
5292 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5293them to XPath 1.0 expressions. Such expressions can be used in lxml or
5294another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5295 (license license:bsd-3)))
880ff77c
AE
5296
5297(define-public python2-cssselect
5298 (package-with-python2 python-cssselect))
60357f99
AE
5299
5300(define-public python-netifaces
5301 (package
5302 (name "python-netifaces")
5303 (version "0.10.4")
5304 (source
5305 (origin
5306 (method url-fetch)
5307 (uri (string-append
5308 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5309 version
5310 ".tar.gz"))
5311 (sha256
5312 (base32
5313 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5314 (build-system python-build-system)
60357f99
AE
5315 (home-page
5316 "https://bitbucket.org/al45tair/netifaces")
5317 (synopsis
5318 "Python module for portable network interface information")
5319 (description
5320 "Netifaces is a Python module providing information on network
5321interfaces in an easy and portable manner.")
5322 (license license:expat)))
5323
5324(define-public python2-netifaces
5325 (package-with-python2 python-netifaces))
92cb152b 5326
32f77c04
RW
5327(define-public python-networkx
5328 (package
5329 (name "python-networkx")
a4d9609c 5330 (version "1.11")
32f77c04
RW
5331 (source
5332 (origin
5333 (method url-fetch)
a4d9609c 5334 (uri (pypi-uri "networkx" version))
32f77c04 5335 (sha256
a4d9609c 5336 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5337 (build-system python-build-system)
5338 ;; python-decorator is needed at runtime
5339 (propagated-inputs
5340 `(("python-decorator" ,python-decorator)))
5341 (native-inputs
f3b98f4f 5342 `(("python-nose" ,python-nose)))
32f77c04
RW
5343 (home-page "http://networkx.github.io/")
5344 (synopsis "Python module for creating and manipulating graphs and networks")
5345 (description
5346 "NetworkX is a Python package for the creation, manipulation, and study
5347of the structure, dynamics, and functions of complex networks.")
3f641af0 5348 (license license:bsd-3)))
32f77c04
RW
5349
5350(define-public python2-networkx
5351 (package-with-python2 python-networkx))
5352
92cb152b
RW
5353(define-public snakemake
5354 (package
5355 (name "snakemake")
7b93d866 5356 (version "3.9.0")
92cb152b
RW
5357 (source
5358 (origin
5359 (method url-fetch)
7b93d866 5360 (uri (pypi-uri "snakemake" version))
92cb152b 5361 (sha256
7b93d866 5362 (base32 "1d48ql0010v9ls6mac7fz6j391gm4h74a64hqgw89s0vfqgdyzdl"))))
92cb152b 5363 (build-system python-build-system)
7b93d866
MB
5364 (arguments
5365 ;; TODO: Package missing test dependencies.
5366 '(#:tests? #f))
5367 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
5368 (synopsis "Python-based execution environment for make-like workflows")
5369 (description
5370 "Snakemake aims to reduce the complexity of creating workflows by
5371providing a clean and modern domain specific specification language (DSL) in
5372Python style, together with a fast and comfortable execution environment.")
5373 (license license:expat)))
a1920bc9 5374
35de1fbd
RW
5375(define-public python-seaborn
5376 (package
5377 (name "python-seaborn")
fc899d4f 5378 (version "0.7.0")
35de1fbd
RW
5379 (source
5380 (origin
5381 (method url-fetch)
fc899d4f 5382 (uri (pypi-uri "seaborn" version))
35de1fbd 5383 (sha256
fc899d4f 5384 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd 5385 (build-system python-build-system)
6f976df6
MB
5386 (arguments
5387 '(#:tests? #f)) ; Tests requires a running X11 server.
35de1fbd
RW
5388 (propagated-inputs
5389 `(("python-pandas" ,python-pandas)
5390 ("python-matplotlib" ,python-matplotlib)
5391 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5392 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5393 (synopsis "Statistical data visualization")
5394 (description
5395 "Seaborn is a library for making attractive and informative statistical
5396graphics in Python. It is built on top of matplotlib and tightly integrated
5397with the PyData stack, including support for numpy and pandas data structures
5398and statistical routines from scipy and statsmodels.")
3f641af0 5399 (license license:bsd-3)
fc899d4f 5400 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5401
5402(define-public python2-seaborn
fc899d4f
EF
5403 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5404 (package
5405 (inherit base)
5406 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5407 ,@(package-propagated-inputs base))))))
35de1fbd 5408
90fc547f
RW
5409(define-public python-sympy
5410 (package
5411 (name "python-sympy")
5412 (version "0.7.6")
5413 (source
5414 (origin
5415 (method url-fetch)
5416 (uri (string-append
5417 "https://github.com/sympy/sympy/releases/download/sympy-"
5418 version "/sympy-" version ".tar.gz"))
5419 (sha256
5420 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5421 (build-system python-build-system)
90fc547f
RW
5422 (home-page "http://www.sympy.org/")
5423 (synopsis "Python library for symbolic mathematics")
5424 (description
5425 "SymPy is a Python library for symbolic mathematics. It aims to become a
5426full-featured computer algebra system (CAS) while keeping the code as simple
5427as possible in order to be comprehensible and easily extensible.")
3f641af0 5428 (license license:bsd-3)))
90fc547f
RW
5429
5430(define-public python2-sympy
5431 (package-with-python2 python-sympy))
5432
e8c9b010
SR
5433(define-public python-q
5434 (package
5435 (name "python-q")
5436 (version "2.6")
5437 (source
5438 (origin
5439 (method url-fetch)
5440 (uri (pypi-uri "q" version))
5441 (sha256
5442 (base32
5443 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5444 (build-system python-build-system)
5445 (home-page "https://github.com/zestyping/q")
5446 (synopsis "Quick-and-dirty debugging output for tired programmers")
5447 (description
5448 "q is a Python module for \"print\" style of debugging Python code. It
5449provides convenient short API for print out of values, tracebacks, and
5450falling into the Python interpreter.")
f210e944 5451 (license license:asl2.0)))
e8c9b010
SR
5452
5453(define-public python2-q
f210e944 5454 (package-with-python2 python-q))
e8c9b010 5455
a1920bc9
FB
5456(define-public python-testlib
5457 (package
5458 (name "python-testlib")
5459 (version "0.6.5")
5460 (source
5461 (origin
5462 (method url-fetch)
5463 (uri (string-append
5464 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5465 version ".zip"))
5466 (sha256
5467 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5468 (build-system python-build-system)
a1920bc9 5469 (native-inputs
632735f2 5470 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
5471 (synopsis "Python micro test suite harness")
5472 (description "A micro unittest suite harness for Python.")
5473 (home-page "https://github.com/trentm/testlib")
1cb9c006 5474 (license license:expat)))
a1920bc9
FB
5475
5476(define-public python2-testlib
5477 (package-with-python2 python-testlib))
db62afa5
LC
5478
5479(define-public python2-xlib
5480 (package
5481 (name "python2-xlib")
5482 (version "0.14")
5483 (source (origin
5484 (method url-fetch)
de67e922
LF
5485 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5486 "/" version "/"
db62afa5
LC
5487 "python-xlib-" version ".tar.gz"))
5488 (sha256
5489 (base32
5490 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5491 (build-system python-build-system)
5492 (arguments
5493 `(#:python ,python-2 ;Python 2 only
5494 #:tests? #f)) ;no tests
db62afa5
LC
5495 (home-page "http://python-xlib.sourceforge.net/")
5496 (synopsis "Python X11 client library")
5497 (description
5498 "The Python X Library is intended to be a fully functional X client
5499library for Python programs. It is useful to implement low-level X clients.
5500It is written entirely in Python.")
3f641af0 5501 (license license:gpl2+)))
0234ca06
DT
5502
5503(define-public python-singledispatch
5504 (package
5505 (name "python-singledispatch")
5506 (version "3.4.0.3")
5507 (source
5508 (origin
5509 (method url-fetch)
bdb67d84 5510 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5511 (sha256
5512 (base32
5513 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5514 (build-system python-build-system)
5e1c9d24
HG
5515 (native-inputs
5516 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
5517 (home-page
5518 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5519 (synopsis "Backport of singledispatch feature from Python 3.4")
5520 (description
5521 "This library brings functools.singledispatch from Python 3.4 to Python
55222.6-3.3.")
5523 (license license:expat)))
5524
5525(define-public python2-singledispatch
5526 (package-with-python2 python-singledispatch))
feaae484 5527
310d218f
RW
5528(define-public python-tornado
5529 (package
5530 (name "python-tornado")
a724924b 5531 (version "4.3")
310d218f
RW
5532 (source
5533 (origin
5534 (method url-fetch)
a724924b 5535 (uri (pypi-uri "tornado" version))
310d218f 5536 (sha256
a724924b 5537 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5538 (build-system python-build-system)
3fe2c209
MB
5539 (arguments
5540 '(;; FIXME: Two tests error out with:
5541 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
5542 ;; #:phases
5543 ;; (modify-phases %standard-phases
5544 ;; (replace 'check
5545 ;; (lambda _
5546 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
5547 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
5548 ;; (zero? (system* "python" "-m" "tornado.test")))))
5549 #:tests? #f))
310d218f 5550 (native-inputs
b455439b 5551 `(("python-certifi" ,python-certifi)))
f22efa01 5552 (propagated-inputs
b455439b 5553 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5554 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5555 (synopsis "Python web framework and asynchronous networking library")
5556 (description
5557 "Tornado is a Python web framework and asynchronous networking library,
5558originally developed at FriendFeed. By using non-blocking network I/O,
5559Tornado can scale to tens of thousands of open connections, making it ideal
5560for long polling, WebSockets, and other applications that require a long-lived
5561connection to each user.")
3f641af0 5562 (license license:asl2.0)
b455439b 5563 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5564
5565(define-public python2-tornado
b455439b 5566 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 5567 (package (inherit tornado)
f22efa01 5568 (propagated-inputs
310d218f
RW
5569 `(("python2-backport-ssl-match-hostname"
5570 ,python2-backport-ssl-match-hostname)
b455439b 5571 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 5572 ,@(package-propagated-inputs tornado))))))
310d218f 5573
6b59fc10
EF
5574;; the python- version can be removed with python-3.5
5575(define-public python-backports-abc
5576 (package
5577 (name "python-backports-abc")
5578 (version "0.4")
5579 (source
5580 (origin
5581 (method url-fetch)
5582 (uri (pypi-uri "backports_abc" version))
5583 (sha256
5584 (base32
5585 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5586 (build-system python-build-system)
6b59fc10 5587 (home-page "https://github.com/cython/backports_abc")
66e07664 5588 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5589 (description
5590 "Python-backports-abc provides a backport of additions to the
5591'collections.abc' module in Python-3.5.")
3f641af0 5592 (license license:psfl)))
6b59fc10
EF
5593
5594(define-public python2-backports-abc
5595 (package-with-python2 python-backports-abc))
5596
feaae484
SB
5597(define-public python-waf
5598 (package
5599 (name "python-waf")
7dd55dfe 5600 (version "1.9.5")
feaae484
SB
5601 (source (origin
5602 (method url-fetch)
bae67829 5603 (uri (string-append "https://waf.io/"
feaae484
SB
5604 "waf-" version ".tar.bz2"))
5605 (sha256
5606 (base32
7dd55dfe 5607 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5608 (build-system python-build-system)
5609 (arguments
5610 '(#:phases
5611 (modify-phases %standard-phases
5612 (replace 'build
7dd55dfe
EF
5613 (lambda _
5614 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5615 (replace 'check
7dd55dfe
EF
5616 (lambda _
5617 (zero? (system* "python" "waf" "--version"))))
feaae484 5618 (replace 'install
7dd55dfe
EF
5619 (lambda _
5620 (copy-file "waf" %output))))))
5621 (home-page "http://waf.io/")
feaae484
SB
5622 (synopsis "Python-based build system")
5623 (description
5624 "Waf is a Python-based framework for configuring, compiling and installing
5625applications.")
3f641af0 5626 (license license:bsd-3)))
feaae484
SB
5627
5628(define-public python2-waf
5629 (package-with-python2 python-waf))
45203542
RW
5630
5631(define-public python-pyzmq
5632 (package
5633 (name "python-pyzmq")
3655ee76 5634 (version "15.1.0")
45203542
RW
5635 (source
5636 (origin
5637 (method url-fetch)
3655ee76 5638 (uri (pypi-uri "pyzmq" version))
45203542 5639 (sha256
3655ee76 5640 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5641 (build-system python-build-system)
5642 (arguments
5643 `(#:configure-flags
5644 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5645 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5646 ;; --inplace' for 'python setup.py test' to work.
5647 #:tests? #f))
5648 (inputs
5649 `(("zeromq" ,zeromq)))
5650 (native-inputs
5651 `(("pkg-config" ,pkg-config)
f3b98f4f 5652 ("python-nose" ,python-nose)))
45203542
RW
5653 (home-page "http://github.com/zeromq/pyzmq")
5654 (synopsis "Python bindings for 0MQ")
5655 (description
5656 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5657 (license license:bsd-4)))
45203542
RW
5658
5659(define-public python2-pyzmq
5660 (package-with-python2 python-pyzmq))
d889e6c4
CR
5661
5662(define-public python-pep8
5663 (package
5664 (name "python-pep8")
db251311 5665 (version "1.7.0")
d889e6c4
CR
5666 (source
5667 (origin
5668 (method url-fetch)
db251311 5669 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5670 (sha256
5671 (base32
db251311 5672 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 5673 (build-system python-build-system)
d889e6c4
CR
5674 (home-page "http://pep8.readthedocs.org/")
5675 (synopsis "Python style guide checker")
5676 (description
5677 "This tools checks Python code against some of the style conventions in
5678PEP 8.")
5679 (license license:expat)))
5680
5681(define-public python2-pep8
5682 (package-with-python2 python-pep8))
e31d7f44
CR
5683
5684(define-public python-pyflakes
5685 (package
5686 (name "python-pyflakes")
2abc3972 5687 (version "1.0.0")
e31d7f44
CR
5688 (source
5689 (origin
5690 (method url-fetch)
2abc3972 5691 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5692 (sha256
5693 (base32
2abc3972 5694 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 5695 (build-system python-build-system)
e31d7f44
CR
5696 (home-page
5697 "https://github.com/pyflakes/pyflakes")
5698 (synopsis "Passive checker of Python programs")
5699 (description
5700 "Pyflakes statically checks Python source code for common errors.")
5701 (license license:expat)))
a59e017c 5702
7261d9eb
CR
5703(define-public python2-pyflakes
5704 (package-with-python2 python-pyflakes))
5705
a59e017c
CR
5706(define-public python-mccabe
5707 (package
5708 (name "python-mccabe")
c6ebd40d 5709 (version "0.4.0")
a59e017c
CR
5710 (source
5711 (origin
5712 (method url-fetch)
c6ebd40d 5713 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5714 (sha256
5715 (base32
c6ebd40d 5716 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 5717 (build-system python-build-system)
328bb95d 5718 (native-inputs
c6ebd40d 5719 `(("python-pytest" ,python-pytest)
f3b98f4f 5720 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
5721 (home-page "https://github.com/flintwork/mccabe")
5722 (synopsis "McCabe checker, plugin for flake8")
5723 (description
5724 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5725complexity of Python source code.")
7362371d 5726 (license license:expat)))
a59e017c
CR
5727
5728(define-public python2-mccabe
5729 (package-with-python2 python-mccabe))
e8df8f47 5730
7477fbb1
CR
5731(define-public python-mccabe-0.2.1
5732 (package (inherit python-mccabe)
5733 (version "0.2.1")
5734 (source
5735 (origin
5736 (method url-fetch)
5737 (uri (pypi-uri "mccabe" version))
5738 (sha256
5739 (base32
f3b98f4f 5740 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
5741
5742(define-public python2-mccabe-0.2.1
5743 (package-with-python2 python-mccabe-0.2.1))
5744
e8df8f47
CR
5745;; Flake8 2.4.1 requires an older version of pep8.
5746;; This should be removed ASAP.
5747(define-public python-pep8-1.5.7
5748 (package (inherit python-pep8)
5749 (version "1.5.7")
5750 (source
5751 (origin
5752 (method url-fetch)
5753 (uri (string-append
5754 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5755 version
5756 ".tar.gz"))
5757 (sha256
5758 (base32
73e3060d
MB
5759 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5760 (arguments
5761 ;; XXX Tests not compatible with Python 3.5.
5762 '(#:tests? #f))))
e8df8f47
CR
5763
5764(define-public python2-pep8-1.5.7
5765 (package-with-python2 python-pep8-1.5.7))
5766
5767;; Flake8 2.4.1 requires an older version of pyflakes.
5768;; This should be removed ASAP.
5769(define-public python-pyflakes-0.8.1
5770 (package (inherit python-pyflakes)
5771 (version "0.8.1")
5772 (source
5773 (origin
5774 (method url-fetch)
5775 (uri (string-append
5776 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5777 version
5778 ".tar.gz"))
5779 (sha256
5780 (base32
0d84e1ef
MB
5781 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5782 (arguments
5783 ;; XXX Tests not compatible with Python 3.5.
5784 '(#:tests? #f))))
e8df8f47
CR
5785
5786(define-public python2-pyflakes-0.8.1
7261d9eb 5787 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5788
5789(define-public python-flake8
5790 (package
5791 (name "python-flake8")
43789136 5792 (version "2.5.4")
e8df8f47
CR
5793 (source
5794 (origin
5795 (method url-fetch)
1b995533 5796 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5797 (sha256
5798 (base32
011271c7
HG
5799 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5800 (modules '((guix build utils)))
5801 (snippet
5802 '(begin
5803 ;; Remove pre-compiled .pyc files from source.
5804 (for-each delete-file-recursively
5805 (find-files "." "__pycache__" #:directories? #t))
5806 (for-each delete-file (find-files "." "\\.pyc$"))
5807 #t))))
e8df8f47 5808 (build-system python-build-system)
482d9591 5809 (propagated-inputs
f3b98f4f 5810 `(("python-pep8" ,python-pep8)
43789136 5811 ("python-pyflakes" ,python-pyflakes)
482d9591 5812 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
5813 (native-inputs
5814 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
5815 ("python-nose" ,python-nose)))
5816 (home-page "https://gitlab.com/pycqa/flake8")
5817 (synopsis
5818 "The modular source code checker: pep8, pyflakes and co")
5819 (description
5820 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5821 (license license:expat)))
5822
5823(define-public python2-flake8
5824 (package-with-python2 python-flake8))
61b9ac53 5825
abf21efc
CR
5826;; This will only be needed by the python-hacking package and will not be
5827;; necessary once python-hacking > 0.10.2 is released.
5828(define-public python-flake8-2.2.4
5829 (package (inherit python-flake8)
482d9591 5830 (propagated-inputs
f3b98f4f 5831 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 5832 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 5833 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 5834 (native-inputs
482d9591 5835 `(("python-mock" ,python-mock)
abf21efc
CR
5836 ("python-nose" ,python-nose)))
5837 (version "2.2.4")
5838 (source
5839 (origin
5840 (method url-fetch)
5841 (uri (pypi-uri "flake8" version))
5842 (sha256
5843 (base32
b9c8ccce
HG
5844 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
5845 (modules '((guix build utils)))
5846 (snippet
5847 '(begin
5848 ;; Remove pre-compiled .pyc files from source.
5849 (for-each delete-file-recursively
5850 (find-files "." "__pycache__" #:directories? #t))
5851 (for-each delete-file (find-files "." "\\.pyc$"))
a717e8a6
MB
5852 #t))))
5853 (arguments
5854 ;; XXX Fails with Python 3.5.
5855 '(#:tests? #f))))
abf21efc
CR
5856
5857(define-public python2-flake8-2.2.4
5858 (package-with-python2 python-flake8-2.2.4))
5859
61b9ac53
FB
5860(define-public python-mistune
5861 (package
5862 (name "python-mistune")
5863 (version "0.7")
5864 (source
5865 (origin
5866 (method url-fetch)
5867 (uri (string-append
5868 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5869 version
5870 ".tar.gz"))
5871 (sha256
5872 (base32
5873 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5874 (build-system python-build-system)
328bb95d 5875 (native-inputs
f3b98f4f 5876 `(("python-nose" ,python-nose)
61b9ac53
FB
5877 ("python-cython" ,python-cython)))
5878 (home-page "https://github.com/lepture/mistune")
5879 (synopsis "Markdown parser in pure Python")
5880 (description "This package provides a fast markdown parser in pure
5881Python.")
3f641af0 5882 (license license:bsd-3)))
61b9ac53
FB
5883
5884(define-public python2-mistune
5885 (package-with-python2 python-mistune))
6d992d07 5886
b9893908
EE
5887(define-public python-markdown
5888 (package
5889 (name "python-markdown")
5890 (version "2.6.5")
5891 (source
5892 (origin
5893 (method url-fetch)
5894 (uri (pypi-uri "Markdown" version))
5895 (sha256
5896 (base32
5897 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5898 (build-system python-build-system)
5899 (arguments
5900 `(#:phases
5901 (modify-phases %standard-phases
5902 (replace 'check
5903 (lambda _
5904 (zero? (system* "python" "run-tests.py")))))))
5905 (native-inputs
5906 `(("python-nose" ,python-nose)
5907 ("python-pyyaml" ,python-pyyaml)))
5908 (home-page "https://pythonhosted.org/Markdown/")
5909 (synopsis "Python implementation of Markdown")
5910 (description
5911 "This package provides a Python implementation of John Gruber's
5912Markdown. The library features international input, various Markdown
5913extensions, and several HTML output formats. A command line wrapper
5914markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5915 (license license:bsd-3)))
b9893908
EE
5916
5917(define-public python2-markdown
5918 (package-with-python2 python-markdown))
5919
6d992d07
FB
5920(define-public python-ptyprocess
5921 (package
5922 (name "python-ptyprocess")
5923 (version "0.5")
5924 (source
5925 (origin
5926 (method url-fetch)
5927 (uri (string-append
5928 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5929 version ".tar.gz"))
5930 (sha256
5931 (base32
5932 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5933 (build-system python-build-system)
328bb95d 5934 (native-inputs
f3b98f4f 5935 `(("python-nose" ,python-nose)))
6d992d07
FB
5936 (arguments
5937 `(#:phases
5938 (modify-phases %standard-phases
5939 (replace 'check
5940 (lambda _
5941 (zero? (system* "nosetests")))))))
5942 (home-page "https://github.com/pexpect/ptyprocess")
5943 (synopsis "Run a subprocess in a pseudo terminal")
5944 (description
5945 "This package provides a Python library used to launch a subprocess in a
5946pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5947 (license license:isc)))
6d992d07
FB
5948
5949(define-public python2-ptyprocess
5950 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5951
5952(define-public python-terminado
5953 (package
5954 (name "python-terminado")
783fb0a3 5955 (version "0.6")
4aadb1df
FB
5956 (source
5957 (origin
5958 (method url-fetch)
783fb0a3 5959 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5960 (sha256
5961 (base32
783fb0a3 5962 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5963 (build-system python-build-system)
5964 (propagated-inputs
5965 `(("python-tornado" ,python-tornado)
5966 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5967 (native-inputs
5968 `(("python-nose" ,python-nose)))
4aadb1df
FB
5969 (arguments
5970 `(#:phases
5971 (modify-phases %standard-phases
5972 (replace 'check
5973 (lambda _
5974 (zero? (system* "nosetests")))))))
5975 (home-page "https://github.com/takluyver/terminado")
5976 (synopsis "Terminals served to term.js using Tornado websockets")
5977 (description "This package provides a Tornado websocket backend for the
5978term.js Javascript terminal emulator library.")
3f641af0 5979 (license license:bsd-2)
783fb0a3 5980 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5981
5982(define-public python2-terminado
783fb0a3 5983 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5984 (package (inherit terminado)
783fb0a3
EF
5985 (propagated-inputs
5986 `(("python2-backport-ssl-match-hostname"
5987 ,python2-backport-ssl-match-hostname)
00e10c6e 5988 ,@(package-propagated-inputs terminado))))))
5faa5ce4 5989
d582eaac
SB
5990(define-public python-fonttools
5991 (package
5992 (name "python-fonttools")
5993 (version "2.5")
5994 (source (origin
5995 (method url-fetch)
5996 (uri (string-append
5997 "https://pypi.python.org/packages/source/F/FontTools/"
5998 "fonttools-" version ".tar.gz"))
5999 (sha256
6000 (base32
6001 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6002 (build-system python-build-system)
9e8c6a37
HG
6003 (arguments
6004 '(#:test-target "check"
6005 #:phases
6006 (modify-phases %standard-phases
6007 (add-after 'unpack 'patch-setuppy
6008 ;; Remove the undocumented "extra_path" argument, which adds an
6009 ;; intervening directories between site-packages and the package
6010 ;; directory.
6011 (lambda _
6012 (substitute* "setup.py"
6013 (("^[ \t]*extra_path *= *'FontTools',") ""))
6014 #t)))))
d582eaac
SB
6015 (home-page "http://github.com/behdad/fonttools")
6016 (synopsis "Tools to manipulate font files")
6017 (description
6018 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 6019supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
6020of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6021also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6022from an XML-based format.")
3f641af0
DC
6023 (license (license:non-copyleft
6024 "file://LICENSE.txt"
6025 "See LICENSE.txt in the distribution."))))
d582eaac
SB
6026
6027(define-public python2-fonttools
6028 (package-with-python2 python-fonttools))
75710da6 6029
5faa5ce4
RW
6030(define-public python-ly
6031 (package
6032 (name "python-ly")
5135354f 6033 (version "0.9.4")
5faa5ce4
RW
6034 (source
6035 (origin
6036 (method url-fetch)
5135354f
RW
6037 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6038 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6039 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
6040 (sha256
6041 (base32
5135354f 6042 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6043 (build-system python-build-system)
972cf9be
MB
6044 (arguments
6045 ;; FIXME: Some tests need network access.
6046 '(#:tests? #f))
5faa5ce4
RW
6047 (synopsis "Tool and library for manipulating LilyPond files")
6048 (description "This package provides a Python library to parse, manipulate
6049or create documents in LilyPond format. A command line program ly is also
6050provided that can be used to do various manipulations with LilyPond files.")
6051 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6052 (license license:gpl2+)))
7e7b27d9
CR
6053
6054(define-public python-appdirs
6055 (package
6056 (name "python-appdirs")
6057 (version "1.4.0")
6058 (source
6059 (origin
6060 (method url-fetch)
6061 (uri (string-append
6062 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6063 version
6064 ".tar.gz"))
6065 (sha256
6066 (base32
6067 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6068 (build-system python-build-system)
7e7b27d9
CR
6069 (home-page "http://github.com/ActiveState/appdirs")
6070 (synopsis
6071 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6072 (description
6073 "This module provides a portable way of finding out where user data
6074should be stored on various operating systems.")
6075 (license license:expat)))
6076
6077(define-public python2-appdirs
6078 (package-with-python2 python-appdirs))
89b2e0b0
LF
6079
6080(define-public python-llfuse
6081 (package
6082 (name "python-llfuse")
e36ace36 6083 (version "1.1.1")
89b2e0b0
LF
6084 (source (origin
6085 (method url-fetch)
6086 (uri (string-append
6087 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6088 "llfuse-" version ".tar.bz2"))
6089 (sha256
6090 (base32
e36ace36 6091 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6092 (build-system python-build-system)
6093 (inputs
6094 `(("fuse" ,fuse)
6095 ("attr" ,attr)))
6096 (native-inputs
f3b98f4f 6097 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6098 (synopsis "Python bindings for FUSE")
6099 (description
6100 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6101 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6102 (license license:lgpl2.0+)
cd0569c4 6103 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6104
6105(define-public python2-llfuse
cd0569c4
LF
6106 (package (inherit (package-with-python2
6107 (strip-python2-variant python-llfuse)))
6108 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6109
6110;; For attic-0.16
6111(define-public python-llfuse-0.41
6112 (package (inherit python-llfuse)
229b3661 6113 (version "0.41.1")
cd0569c4
LF
6114 (source (origin
6115 (method url-fetch)
6116 (uri (string-append
6117 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6118 "llfuse-" version ".tar.bz2"))
6119 (sha256
6120 (base32
229b3661 6121 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6122 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6123 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6124 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6125
6126(define-public python-msgpack
6127 (package
6128 (name "python-msgpack")
aed625bd 6129 (version "0.4.8")
641c9871
LF
6130 (source (origin
6131 (method url-fetch)
ae831df4 6132 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6133 (sha256
6134 (base32
aed625bd 6135 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6136 (build-system python-build-system)
641c9871
LF
6137 (synopsis "MessagePack (de)serializer")
6138 (description "MessagePack is a fast, compact binary serialization format,
6139suitable for similar data to JSON. This package provides CPython bindings for
6140reading and writing MessagePack data.")
6141 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6142 (license license:asl2.0)))
bd74be7b
LF
6143
6144(define-public python2-msgpack
f210e944 6145 (package-with-python2 python-msgpack))
641c9871 6146
6e5e39f4
CR
6147(define-public python-netaddr
6148 (package
6149 (name "python-netaddr")
6150 (version "0.7.18")
6151 (source
6152 (origin
6153 (method url-fetch)
6154 (uri (string-append
6155 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6156 version
6157 ".tar.gz"))
6158 (sha256
6159 (base32
6160 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6161 (build-system python-build-system)
6162 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6163 (home-page "https://github.com/drkjam/netaddr/")
6164 (synopsis "Pythonic manipulation of network addresses")
6165 (description
6166 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6167and MAC network addresses.")
3f641af0 6168 (license license:bsd-3)))
6e5e39f4
CR
6169
6170(define-public python2-netaddr
6171 (package-with-python2 python-netaddr))
8c692a52
CR
6172
6173(define-public python-wrapt
6174 (package
6175 (name "python-wrapt")
6176 (version "1.10.5")
6177 (source
6178 (origin
6179 (method url-fetch)
6180 (uri (string-append
6181 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6182 version
6183 ".tar.gz"))
6184 (sha256
6185 (base32
6186 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6187 (build-system python-build-system)
6188 (arguments
6189 ;; Tests are not included in the tarball, they are only available in the
6190 ;; git repository.
6191 `(#:tests? #f))
8c692a52
CR
6192 (home-page "https://github.com/GrahamDumpleton/wrapt")
6193 (synopsis "Module for decorators, wrappers and monkey patching")
6194 (description
6195 "The aim of the wrapt module is to provide a transparent object proxy for
6196 Python, which can be used as the basis for the construction of function
6197 wrappers and decorator functions.")
3f641af0 6198 (license license:bsd-2)))
8c692a52
CR
6199
6200(define-public python2-wrapt
6201 (package-with-python2 python-wrapt))
b85c85be
CR
6202
6203(define-public python-iso8601
6204 (package
6205 (name "python-iso8601")
fe84bc9a 6206 (version "0.1.11")
b85c85be
CR
6207 (source
6208 (origin
6209 (method url-fetch)
fe84bc9a 6210 (uri (pypi-uri "iso8601" version))
b85c85be 6211 (sha256
fe84bc9a
EF
6212 (base32
6213 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6214 (build-system python-build-system)
63b02364
MB
6215 (native-inputs
6216 `(("python-pytest" ,python-pytest)))
b85c85be
CR
6217 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6218 (synopsis "Module to parse ISO 8601 dates")
6219 (description
6220 "This module parses the most common forms of ISO 8601 date strings (e.g.
6221@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6222 (license license:expat)))
6223
6224(define-public python2-iso8601
6225 (package-with-python2 python-iso8601))
5e412b63
CR
6226
6227(define-public python-monotonic
6228 (package
6229 (name "python-monotonic")
6230 (version "0.3")
6231 (source
6232 (origin
6233 (method url-fetch)
6234 (uri (string-append
6235 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6236 version
6237 ".tar.gz"))
6238 (sha256
6239 (base32
6240 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6241 (build-system python-build-system)
5e412b63
CR
6242 (home-page "https://github.com/atdt/monotonic")
6243 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6244 (description
6245 "This module provides a monotonic() function which returns the value (in
6246fractional seconds) of a clock which never goes backwards.")
3f641af0 6247 (license license:asl2.0)))
5e412b63
CR
6248
6249(define-public python2-monotonic
6250 (package-with-python2 python-monotonic))
de34afac
CR
6251
6252(define-public python-webob
6253 (package
6254 (name "python-webob")
b8834c21 6255 (version "1.5.1")
de34afac
CR
6256 (source
6257 (origin
6258 (method url-fetch)
b8834c21 6259 (uri (pypi-uri "WebOb" version))
de34afac
CR
6260 (sha256
6261 (base32
b8834c21 6262 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6263 (build-system python-build-system)
328bb95d 6264 (native-inputs
f3b98f4f 6265 `(("python-nose" ,python-nose)))
de34afac
CR
6266 (home-page "http://webob.org/")
6267 (synopsis "WSGI request and response object")
6268 (description
6269 "WebOb provides wrappers around the WSGI request environment, and an
6270object to help create WSGI responses.")
6271 (license license:expat)))
6272
6273(define-public python2-webob
6274 (package-with-python2 python-webob))
350ba0a3 6275
02a8a187
BW
6276(define-public python-xlrd
6277 (package
6278 (name "python-xlrd")
c2ad4d70 6279 (version "1.0.0")
02a8a187
BW
6280 (source (origin
6281 (method url-fetch)
e775f48e 6282 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6283 (sha256
6284 (base32
c2ad4d70 6285 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6286 (build-system python-build-system)
6287 (arguments
6288 `(#:phases
6289 (modify-phases %standard-phases
c2ad4d70 6290 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6291 ;; run tests instead for now.
6292 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6293 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6294 (home-page "http://www.python-excel.org/")
6295 (synopsis "Library for extracting data from Excel files")
6296 (description "This packages provides a library to extract data from
c598e35c 6297spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6298@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6299Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6300 (license license:bsd-3)))
02a8a187
BW
6301
6302(define-public python2-xlrd
6303 (package-with-python2 python-xlrd))
6304
350ba0a3
CR
6305(define-public python-prettytable
6306 (package
6307 (name "python-prettytable")
6308 (version "0.7.2")
6309 (source
6310 (origin
6311 (method url-fetch)
6312 (uri (string-append
6313 "https://pypi.python.org/packages/source/P/PrettyTable/"
6314 "prettytable-" version ".tar.bz2"))
6315 (sha256
6316 (base32
6317 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6318 (build-system python-build-system)
350ba0a3
CR
6319 (home-page "http://code.google.com/p/prettytable/")
6320 (synopsis "Display tabular data in an ASCII table format")
6321 (description
6322 "A library designed to represent tabular data in visually appealing ASCII
6323tables. PrettyTable allows for selection of which columns are to be printed,
6324independent alignment of columns (left or right justified or centred) and
6325printing of sub-tables by specifying a row range.")
3f641af0 6326 (license license:bsd-3)))
350ba0a3
CR
6327
6328(define-public python2-prettytable
6329 (package-with-python2 python-prettytable))
7a8ac75a 6330
9f8ee3fe
RW
6331(define-public python-tables
6332 (package
6333 (name "python-tables")
6334 (version "3.2.2")
6335 (source
6336 (origin
6337 (method url-fetch)
6338 (uri (pypi-uri "tables" version))
6339 (sha256
6340 (base32
bac23672
HG
6341 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6342 (modules '((guix build utils)))
6343 (snippet
6344 '(begin
6345 ;; Remove pre-compiled .pyc files from source.
6346 (for-each delete-file-recursively
6347 (find-files "." "__pycache__" #:directories? #t))
6348 (for-each delete-file (find-files "." "\\.pyc$"))
6349 #t))))
9f8ee3fe
RW
6350 (build-system python-build-system)
6351 (arguments
6352 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6353 ;; or "check", so we must override the build and check phases.
6354 #:phases
6355 (modify-phases %standard-phases
6356 (add-after 'unpack 'use-gcc
6357 (lambda _
6358 (substitute* "setup.py"
6359 (("compiler = new_compiler\\(\\)" line)
6360 (string-append line
6361 "\ncompiler.set_executables(compiler='gcc',"
6362 "compiler_so='gcc',"
6363 "linker_exe='gcc',"
6364 "linker_so='gcc -shared')")))
6365 #t))
6366 (replace 'build
6367 (lambda* (#:key inputs #:allow-other-keys)
6368 (zero? (system* "python" "setup.py" "build"
6369 (string-append "--hdf5="
6370 (assoc-ref inputs "hdf5"))))))
6371 (replace 'check
6372 (lambda* (#:key inputs #:allow-other-keys)
6373 (zero? (system* "python" "setup.py" "check"
6374 (string-append "--hdf5="
6375 (assoc-ref inputs "hdf5")))))))))
6376 (propagated-inputs
6377 `(("python-numexpr" ,python-numexpr)
6378 ("python-numpy" ,python-numpy)))
6379 (native-inputs
f3b98f4f 6380 `(("python-cython" ,python-cython)
9f8ee3fe
RW
6381 ("pkg-config" ,pkg-config)))
6382 (inputs
6383 `(("hdf5" ,hdf5)
6384 ("bzip2" ,bzip2)
6385 ("zlib" ,zlib)))
6386 (home-page "http://www.pytables.org/")
6387 (synopsis "Hierarchical datasets for Python")
6388 (description "PyTables is a package for managing hierarchical datasets and
6389designed to efficently cope with extremely large amounts of data.")
3f641af0 6390 (license license:bsd-3)))
9f8ee3fe
RW
6391
6392(define-public python2-tables
6393 (package-with-python2 python-tables))
6394
7a8ac75a
RW
6395(define-public python-pyasn1
6396 (package
6397 (name "python-pyasn1")
caa0edb3 6398 (version "0.1.9")
7a8ac75a
RW
6399 (source
6400 (origin
6401 (method url-fetch)
caa0edb3 6402 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6403 (sha256
6404 (base32
caa0edb3 6405 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6406 (build-system python-build-system)
6407 (home-page "http://pyasn1.sourceforge.net/")
6408 (synopsis "ASN.1 types and codecs")
6409 (description
6410 "This is an implementation of ASN.1 types and codecs in Python. It is
6411suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6412 (license license:bsd-2)))
7a8ac75a
RW
6413
6414(define-public python2-pyasn1
6415 (package-with-python2 python-pyasn1))
9a49a535 6416
5988c299
EF
6417(define-public python-pyasn1-modules
6418 (package
6419 (name "python-pyasn1-modules")
6420 (version "0.0.8")
6421 (source
6422 (origin
6423 (method url-fetch)
6424 (uri (pypi-uri "pyasn1-modules" version))
6425 (sha256
6426 (base32
6427 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6428 (build-system python-build-system)
5988c299
EF
6429 (propagated-inputs
6430 `(("python-pyasn1" ,python-pyasn1)))
6431 (home-page "http://sourceforge.net/projects/pyasn1/")
6432 (synopsis "ASN.1 codec implementations")
6433 (description
6434 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6435implementations of ASN.1-based codecs and protocols.")
3f641af0 6436 (license license:bsd-3)))
5988c299
EF
6437
6438(define-public python2-pyasn1-modules
6439 (package-with-python2 python-pyasn1-modules))
6440
520af157 6441(define-public python-ipaddress
9a49a535 6442 (package
520af157
DC
6443 (name "python-ipaddress")
6444 (version "1.0.16")
6445 (source (origin
6446 (method url-fetch)
6447 (uri (pypi-uri "ipaddress" version))
6448 (sha256
6449 (base32
6450 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6451 (build-system python-build-system)
9a49a535
RW
6452 (home-page "https://github.com/phihag/ipaddress")
6453 (synopsis "IP address manipulation library")
6454 (description
520af157
DC
6455 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6456 in Python. This library is used to create, poke at, and manipulate IPv4 and
6457 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6458 module to older versions of Python.")
f210e944 6459 (license license:psfl)))
520af157
DC
6460
6461(define-public python2-ipaddress
f210e944 6462 (package-with-python2 python-ipaddress))
3f00e078 6463
4a238186
HG
6464(define-public python2-ipaddr
6465 (package
6466 (name "python2-ipaddr")
6467 (version "2.1.11")
6468 (source
6469 (origin
6470 (method url-fetch)
6471 (uri (pypi-uri "ipaddr" version))
6472 (sha256
6473 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6474 (build-system python-build-system)
6475 (arguments
6476 `(#:python ,python-2 ;version 2 only
6477 #:phases
6478 (modify-phases %standard-phases
6479 (replace 'check
6480 (lambda* _
6481 (zero? (system* "python" "ipaddr_test.py")))))))
6482 (home-page "https://github.com/google/ipaddr-py")
6483 (synopsis "IP address manipulation library")
6484 (description
6485 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6486IPv6 addresses and networks.
6487
6488For new implementations you may prefer to use the standard module
6489@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6490versions of Python.")
3f641af0 6491 (license license:asl2.0)))
4a238186 6492
3f00e078
RW
6493(define-public python-idna
6494 (package
6495 (name "python-idna")
6496 (version "2.0")
6497 (source
6498 (origin
6499 (method url-fetch)
6500 (uri (string-append "https://pypi.python.org/packages/source/i/"
6501 "idna/idna-" version ".tar.gz"))
6502 (sha256
6503 (base32
6504 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6505 (build-system python-build-system)
3f00e078
RW
6506 (home-page "https://github.com/kjd/idna")
6507 (synopsis "Internationalized domain names in applications")
6508 (description
6509 "This is a library to support the Internationalised Domain Names in
6510Applications (IDNA) protocol as specified in RFC 5891. This version of the
6511protocol is often referred to as “IDNA2008” and can produce different results
6512from the earlier standard from 2003. The library is also intended to act as a
6513suitable drop-in replacement for the “encodings.idna” module that comes with
6514the Python standard library but currently only supports the older 2003
6515specification.")
3f641af0 6516 (license license:bsd-4)))
3f00e078
RW
6517
6518(define-public python2-idna
6519 (package-with-python2 python-idna))
36ebf972
RW
6520
6521(define-public python-pretend
6522 (package
6523 (name "python-pretend")
6524 (version "1.0.8")
6525 (source
6526 (origin
6527 (method url-fetch)
6528 (uri (string-append "https://pypi.python.org/packages/source/p/"
6529 "pretend/pretend-" version ".tar.gz"))
6530 (sha256
6531 (base32
6532 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6533 (build-system python-build-system)
36ebf972
RW
6534 (home-page "https://github.com/alex/pretend")
6535 (synopsis "Library for stubbing in Python")
6536 (description
6537 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6538technique for writing tests. You may hear the term mixed up with mocks,
6539fakes, or doubles. Basically, a stub is an object that returns pre-canned
6540responses, rather than doing any computation.")
3f641af0 6541 (license license:bsd-3)))
36ebf972
RW
6542
6543(define-public python2-pretend
6544 (package-with-python2 python-pretend))
aa759a51
RW
6545
6546(define-public python-cryptography-vectors
6547 (package
6548 (name "python-cryptography-vectors")
a6c47905 6549 (version "1.6")
aa759a51
RW
6550 (source
6551 (origin
6552 (method url-fetch)
9c509ca9 6553 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6554 (sha256
6555 (base32
a6c47905 6556 "0xgn3yvlmv5rs92wgjj39qscr6s7mwbbsx7j683sfa6ijmyb1k01"))))
aa759a51 6557 (build-system python-build-system)
aa759a51 6558 (home-page "https://github.com/pyca/cryptography")
66e07664 6559 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6560 (description
6561 "This package contains test vectors for the cryptography package.")
6562 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6563 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6564
6565(define-public python2-cryptography-vectors
6566 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6567
6568(define-public python-cryptography
6569 (package
6570 (name "python-cryptography")
a6c47905 6571 (version "1.6")
88b47cb0
RW
6572 (source
6573 (origin
6574 (method url-fetch)
9c509ca9 6575 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6576 (sha256
6577 (base32
a6c47905 6578 "0gwvmz6w5ml0bjbgmdiscsv5i948lrjd381z7h9qkz6kr398c3ad"))))
88b47cb0 6579 (build-system python-build-system)
470613f9
LF
6580 (arguments
6581 `(#:phases
6582 (modify-phases %standard-phases
6583 (add-before 'check 'disable-failing-test
6584 (lambda _
6585 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6586 ;; versions of python-cryptography:
6587 ;; https://github.com/pyca/cryptography/issues/3196
6588 ;; TODO: Try re-enabling the test when upgrading
6589 ;; python-cryptography.
6590 (substitute* "tests/hazmat/backends/test_openssl.py"
6591 (("def test_numeric_string_x509_name_entry")
6592 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6593 #t)))))
88b47cb0
RW
6594 (inputs
6595 `(("openssl" ,openssl)))
6596 (propagated-inputs
6597 `(("python-cffi" ,python-cffi)
6598 ("python-six" ,python-six)
6599 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6600 ("python-idna" ,python-idna)
6601 ("python-iso8601" ,python-iso8601)))
6602 (native-inputs
6603 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6604 ("python-hypothesis" ,python-hypothesis)
88b47cb0 6605 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6606 ("python-pyasn1" ,python-pyasn1)
6607 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
6608 ("python-pytz" ,python-pytz)
6609 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
6610 (home-page "https://github.com/pyca/cryptography")
6611 (synopsis "Cryptographic recipes and primitives for Python")
6612 (description
6613 "cryptography is a package which provides cryptographic recipes and
6614primitives to Python developers. It aims to be the “cryptographic standard
6615library” for Python. The package includes both high level recipes, and low
6616level interfaces to common cryptographic algorithms such as symmetric ciphers,
6617message digests and key derivation functions.")
6618 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6619 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6620 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6621
6622(define-public python2-cryptography
519e2f4f
LF
6623 (let ((crypto (package-with-python2
6624 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6625 (package (inherit crypto)
6626 (propagated-inputs
6627 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6628 ("python2-backport-ssl-match-hostname"
6629 ,python2-backport-ssl-match-hostname)
68f1cdec 6630 ("python2-enum34" ,python2-enum34)
88b47cb0 6631 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6632
6633(define-public python-pyopenssl
6634 (package
6635 (name "python-pyopenssl")
61684de2 6636 (version "16.2.0")
5af999b8
RW
6637 (source
6638 (origin
6639 (method url-fetch)
eb68d268 6640 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6641 (sha256
6642 (base32
61684de2 6643 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))))
5af999b8 6644 (build-system python-build-system)
30e0229a
MB
6645 (arguments
6646 ;; FIXME: Some tests fail with "NameError: name 'long' is not defined".
6647 '(#:tests? #f))
5af999b8
RW
6648 (propagated-inputs
6649 `(("python-cryptography" ,python-cryptography)
6650 ("python-six" ,python-six)))
6651 (inputs
6652 `(("openssl" ,openssl)))
30e0229a
MB
6653 (native-inputs
6654 `(("python-pytest" ,python-pytest)))
5af999b8
RW
6655 (home-page "https://github.com/pyca/pyopenssl")
6656 (synopsis "Python wrapper module around the OpenSSL library")
6657 (description
6658 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6659library.")
3f641af0 6660 (license license:asl2.0)))
5af999b8
RW
6661
6662(define-public python2-pyopenssl
519e2f4f 6663 (package-with-python2 python-pyopenssl))
643725a1
CR
6664
6665(define-public python-pip
6666 (package
6667 (name "python-pip")
6fb54e3b 6668 (version "8.0.2")
643725a1
CR
6669 (source
6670 (origin
6671 (method url-fetch)
6fb54e3b 6672 (uri (pypi-uri "pip" version))
643725a1
CR
6673 (sha256
6674 (base32
6fb54e3b 6675 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1 6676 (build-system python-build-system)
05e2e4cf
HG
6677 (native-inputs
6678 `(;; Tests
6679 ("python-virtualenv" ,python-virtualenv)
643725a1
CR
6680 ("python-mock" ,python-mock)
6681 ("python-pytest" ,python-pytest)
6682 ("python-scripttest" ,python-scripttest)))
6683 (home-page "https://pip.pypa.io/")
6684 (synopsis
6685 "Package manager for Python software")
6686 (description
6687 "Pip is a package manager for Python software, that finds packages on the
6688Python Package Index (PyPI).")
6689 (license license:expat)))
6690
6691(define-public python2-pip
6692 (package-with-python2 python-pip))
d8c4998f
LC
6693
6694(define-public python-tlsh
6695 (package
6696 (name "python-tlsh")
99b00dc7 6697 (version "3.4.4")
d8c4998f
LC
6698 (home-page "https://github.com/trendmicro/tlsh")
6699 (source (origin
99b00dc7
EF
6700 (method url-fetch)
6701 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6702 version ".tar.gz"))
d8c4998f
LC
6703 (sha256
6704 (base32
99b00dc7
EF
6705 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6706 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6707 (build-system cmake-build-system)
6708 (arguments
6709 '(#:out-of-source? #f
6710 #:phases (modify-phases %standard-phases
6711 (replace
6712 'install
6713 (lambda* (#:key outputs #:allow-other-keys)
6714 ;; Build and install the Python bindings. The underlying
6715 ;; C++ library is apparently not meant to be installed.
6716 (let ((out (assoc-ref outputs "out")))
6717 (with-directory-excursion "py_ext"
6718 (and (system* "python" "setup.py" "build")
6719 (system* "python" "setup.py" "install"
6720 (string-append "--prefix=" out))))))))))
6721 (inputs `(("python" ,python-wrapper))) ;for the bindings
6722 (synopsis "Fuzzy matching library for Python")
6723 (description
6724 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6725Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6726value which can be used for similarity comparisons. Similar objects have
6727similar hash values, which allows for the detection of similar objects by
6728comparing their hash values. The byte stream should have a sufficient amount
6729of complexity; for example, a byte stream of identical bytes will not generate
6730a hash value.")
3f641af0 6731 (license license:asl2.0)))
d8c4998f
LC
6732
6733(define-public python2-tlsh
6734 (package
6735 (inherit python-tlsh)
6736 (name "python2-tlsh")
6737 (inputs `(("python" ,python-2)))))
d96034ed 6738
67f66812
BW
6739(define-public python-termcolor
6740 (package
6741 (name "python-termcolor")
6742 (version "1.1.0")
6743 (source
6744 (origin
6745 (method url-fetch)
6746 (uri (pypi-uri "python-termcolor" version))
6747 (sha256
6748 (base32
6749 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6750 (build-system python-build-system)
6751 (arguments
6752 ;; There are no tests.
6753 `(#:tests? #f))
6754 (home-page "http://pypi.python.org/pypi/termcolor")
6755 (synopsis "ANSII Color formatting for terminal output")
6756 (description
6757 "This package provides ANSII Color formatting for output in terminals.")
6758 (license license:expat)))
6759
6760(define-public python2-termcolor
6761 (package-with-python2 python-termcolor))
6762
d96034ed
LC
6763(define-public python-libarchive-c
6764 (package
6765 (name "python-libarchive-c")
03fd001c 6766 (version "2.2")
d96034ed
LC
6767 (source (origin
6768 (method url-fetch)
03fd001c 6769 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6770 (sha256
6771 (base32
03fd001c 6772 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6773 (build-system python-build-system)
6774 (arguments
6775 '(#:phases (modify-phases %standard-phases
6776 (add-before
6777 'build 'reference-libarchive
6778 (lambda* (#:key inputs #:allow-other-keys)
6779 ;; Retain the absolute file name of libarchive.so.
6780 (let ((libarchive (assoc-ref inputs "libarchive")))
6781 (substitute* "libarchive/ffi.py"
6782 (("find_library\\('archive'\\)")
6783 (string-append "'" libarchive
b41a05ce 6784 "/lib/libarchive.so'")))))))))
d96034ed 6785 (inputs
f3b98f4f 6786 `(("libarchive" ,libarchive)))
d96034ed
LC
6787 (home-page "https://github.com/Changaco/python-libarchive-c")
6788 (synopsis "Python interface to libarchive")
6789 (description
6790 "This package provides Python bindings to libarchive, a C library to
6791access possibly compressed archives in many different formats. It uses
6792Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6793 (license license:lgpl2.0+)))
d96034ed
LC
6794
6795(define-public python2-libarchive-c
6796 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6797
6798(define-public python-file
6799 (package
6800 (inherit file)
6801 (name "python-file")
7ffa5d4a
LF
6802 (source (origin
6803 (inherit (package-source file))
6804 ;; This patch should not be applied to python2-file.
6805 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
6806 (build-system python-build-system)
6807 (arguments
6808 '(#:tests? #f ;no tests
00bf74be 6809 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
6810 #:phases (modify-phases %standard-phases
6811 (add-before 'build 'change-directory
6812 (lambda _
6813 (chdir "python")
6814 #t))
6815 (add-before 'build 'set-library-file-name
6816 (lambda* (#:key inputs #:allow-other-keys)
6817 (let ((file (assoc-ref inputs "file")))
6818 (substitute* "magic.py"
6819 (("find_library\\('magic'\\)")
6820 (string-append "'" file "/lib/libmagic.so'")))
6821 #t))))))
6822 (inputs `(("file" ,file)))
6823 (self-native-input? #f)
daeeea71
CM
6824 (synopsis "Python bindings to the libmagic file type guesser. Note that
6825this module and the python-magic module both provide a \"magic.py\" file;
6826these two modules, which are different and were developed separately, both
f210e944 6827serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6828
6829(define-public python2-file
f210e944 6830 (package-with-python2 python-file))
85d4aeac
LC
6831
6832(define-public python-debian
6833 (package
6834 (name "python-debian")
6835 (version "0.1.23")
6836 (source
6837 (origin
6838 (method url-fetch)
6839 (uri (string-append
6840 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6841 version ".tar.gz"))
6842 (sha256
6843 (base32
6844 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6845 (build-system python-build-system)
f22efa01 6846 (propagated-inputs
85d4aeac 6847 `(("python-six" ,python-six)))
85d4aeac
LC
6848 (home-page "http://packages.debian.org/sid/python-debian")
6849 (synopsis "Debian package related modules")
6850 (description
5c7bdc9a
LC
6851 ;; XXX: Use @enumerate instead of @itemize to work around
6852 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6853 "This package provides Python modules that abstract many formats of
6854Debian-related files, such as:
6855
5c7bdc9a 6856@enumerate
85d4aeac
LC
6857@item Debtags information;
6858@item @file{debian/changelog} files;
6859@item packages files, pdiffs;
6860@item control files of single or multiple RFC822-style paragraphs---e.g.
6861 @file{debian/control}, @file{.changes}, @file{.dsc};
6862@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6863 contained files and meta-information.
5c7bdc9a 6864@end enumerate\n")
85d4aeac
LC
6865
6866 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6867 (license license:gpl3+)))
85d4aeac
LC
6868
6869(define-public python2-debian
6870 (package-with-python2 python-debian))
816a6538 6871
2d321bb2
RW
6872(define-public python-nbformat
6873 (package
6874 (name "python-nbformat")
6875 (version "4.1.0")
6876 (source
6877 (origin
6878 (method url-fetch)
6879 (uri (pypi-uri "nbformat" version))
6880 (sha256
6881 (base32
6882 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6883 (build-system python-build-system)
6884 (arguments `(#:tests? #f)) ; no test target
6885 (propagated-inputs
6886 `(("python-ipython-genutils" ,python-ipython-genutils)
6887 ("python-jsonschema" ,python-jsonschema)
6888 ("python-jupyter-core" ,python-jupyter-core)
6889 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
6890 (home-page "http://jupyter.org")
6891 (synopsis "Jupyter Notebook format")
6892 (description "This package provides the reference implementation of the
6893Jupyter Notebook format and Python APIs for working with notebooks.")
6894 (license license:bsd-3)))
6895
6896(define-public python2-nbformat
6897 (package-with-python2 python-nbformat))
6898
55436048
RW
6899(define-public python-bleach
6900 (package
6901 (name "python-bleach")
6902 (version "1.4.3")
6903 (source
6904 (origin
6905 (method url-fetch)
6906 (uri (pypi-uri "bleach" version))
6907 (sha256
6908 (base32
6909 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6910 (build-system python-build-system)
6911 (propagated-inputs
6912 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
6913 ("python-six" ,python-six)))
6914 (native-inputs
6915 `(("python-nose" ,python-nose)))
6916 (home-page "http://github.com/jsocol/bleach")
6917 (synopsis "Whitelist-based HTML-sanitizing tool")
6918 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6919 (license license:asl2.0)))
6920
6921(define-public python2-bleach
6922 (package-with-python2 python-bleach))
6923
60590a3a
RW
6924(define-public python-entrypoints
6925 (package
6926 (name "python-entrypoints")
6927 (version "0.2.2")
6928 (source
6929 (origin
6930 (method url-fetch)
6931 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6932 version ".tar.gz"))
6933 (file-name (string-append name "-" version ".tar.gz"))
6934 (sha256
6935 (base32
6936 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6937 (build-system python-build-system)
6938 ;; The package does not come with a setup.py file, so we have to generate
6939 ;; one ourselves.
6940 (arguments
6941 `(#:tests? #f
6942 #:phases
6943 (modify-phases %standard-phases
6944 (add-after 'unpack 'create-setup.py
6945 (lambda _
6946 (call-with-output-file "setup.py"
6947 (lambda (port)
6948 (format port "\
6949from setuptools import setup
6950setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6951" ,version))))))))
6952 (home-page "https://github.com/takluyver/entrypoints")
6953 (synopsis "Discover and load entry points from installed Python packages")
6954 (description "Entry points are a way for Python packages to advertise
6955objects with some common interface. The most common examples are
6956@code{console_scripts} entry points, which define shell commands by
6957identifying a Python function to run. The @code{entrypoints} module contains
6958functions to find and load entry points.")
6959 (license license:expat)))
6960
6961(define-public python2-entrypoints
6962 (package-with-python2 python-entrypoints))
6963
c60898a8
RW
6964(define-public python-nbconvert
6965 (package
6966 (name "python-nbconvert")
6967 (version "5.0.0b1")
6968 (source
6969 (origin
6970 (method url-fetch)
6971 (uri (pypi-uri "nbconvert" version))
6972 (sha256
6973 (base32
6974 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6975 (build-system python-build-system)
497355dc
MB
6976 (arguments
6977 `(;; The "bdist_egg" target is disabled by default, causing the installation
6978 ;; to fail.
6979 #:configure-flags (list "bdist_egg")
6980 ;; FIXME: 5 failures, 40 errors.
6981 #:tests? #f))
6982 ;; #:phases
6983 ;; (modify-phases %standard-phases
6984 ;; (replace 'check
6985 ;; (lambda _
6986 ;; (zero? (system* "py.test" "-v")))))
6987 (native-inputs
6988 `(("python-pytest" ,python-pytest)))
c60898a8
RW
6989 (propagated-inputs
6990 `(("python-bleach" ,python-bleach)
6991 ("python-entrypoints" ,python-entrypoints)
6992 ("python-jinja2" ,python-jinja2)
6993 ("python-jupyter-core" ,python-jupyter-core)
6994 ("python-mistune" ,python-mistune)
6995 ("python-nbformat" ,python-nbformat)
6996 ("python-pygments" ,python-pygments)
c60898a8
RW
6997 ("python-traitlets" ,python-traitlets)))
6998 (home-page "http://jupyter.org")
6999 (synopsis "Converting Jupyter Notebooks")
7000 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7001notebooks to various other formats via Jinja templates. It allows you to
7002convert an @code{.ipynb} notebook file into various static formats including:
7003
7004@enumerate
7005@item HTML
7006@item LaTeX
7007@item PDF
7008@item Reveal JS
7009@item Markdown (md)
7010@item ReStructured Text (rst)
7011@item executable script
7012@end enumerate\n")
7013 (license license:bsd-3)))
7014
7015(define-public python2-nbconvert
7016 (package-with-python2 python-nbconvert))
7017
a0d62280
RW
7018(define-public python-notebook
7019 (package
7020 (name "python-notebook")
7021 (version "4.2.3")
7022 (source (origin
7023 (method url-fetch)
7024 (uri (pypi-uri "notebook" version))
7025 (sha256
7026 (base32
7027 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7028 (build-system python-build-system)
7029 (arguments
7030 `(#:phases
7031 (modify-phases %standard-phases
7032 (replace 'check
7033 (lambda _
7034 ;; HOME must be set for tests
7035 (setenv "HOME" "/tmp")
7036 (zero? (system* "nosetests")))))))
7037 (propagated-inputs
7038 `(("python-jupyter-core" ,python-jupyter-core)
7039 ("python-nbformat" ,python-nbformat)
7040 ("python-nbconvert" ,python-nbconvert)
7041 ("python-ipython" ,python-ipython)))
7042 (native-inputs
7043 `(("python-nose" ,python-nose)
7044 ("python-sphinx" ,python-sphinx)
7045 ("python-requests" ,python-requests)))
7046 (home-page "http://jupyter.org/")
7047 (synopsis "Web-based notebook environment for interactive computing")
7048 (description
7049 "The Jupyter HTML notebook is a web-based notebook environment for
7050interactive computing.")
3a735ecf 7051 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
7052 (license license:bsd-3)))
7053
7054(define-public python2-notebook
3a735ecf
HG
7055 (let ((base (package-with-python2
7056 (strip-python2-variant python-notebook))))
7057 (package (inherit base)
7058 (native-inputs
7059 `(("python2-mock" ,python2-mock)
7060 ,@(package-native-inputs base)))
7061 (arguments
7062 (substitute-keyword-arguments (package-arguments base)
7063 ((#:phases phases)
7064 `(modify-phases ,phases
7065 (add-before 'check 'disable-test-case
7066 ;; The test requires network access to localhost. Curiously it
7067 ;; fails with Python 2 only. Simply make the test-case return
7068 ;; immediately.
7069 (lambda _
7070 (substitute*
7071 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7072 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7073
d55724ed
RW
7074(define-public python-widgetsnbextension
7075 (package
7076 (name "python-widgetsnbextension")
7077 (version "1.2.6")
7078 (source
7079 (origin
7080 (method url-fetch)
7081 (uri (pypi-uri "widgetsnbextension" version))
7082 (sha256
7083 (base32
7084 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7085 (build-system python-build-system)
7086 (propagated-inputs
7087 `(("python-notebook" ,python-notebook)))
7088 (native-inputs
f3b98f4f 7089 `(("python-nose" ,python-nose)))
d55724ed
RW
7090 (home-page "http://ipython.org")
7091 (synopsis "IPython HTML widgets for Jupyter")
7092 (description "This package provides interactive HTML widgets for Jupyter
7093notebooks.")
7094 (license license:bsd-3)))
7095
7096(define-public python2-widgetsnbextension
7097 (package-with-python2 python-widgetsnbextension))
7098
4fe2e344
RW
7099(define-public python-ipywidgets
7100 (package
7101 (name "python-ipywidgets")
7102 (version "5.2.2")
7103 (source
7104 (origin
7105 (method url-fetch)
7106 (uri (pypi-uri "ipywidgets" version))
7107 (sha256
7108 (base32
7109 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7110 (build-system python-build-system)
7111 ;; FIXME: it's not clear how to run the tests.
7112 (arguments `(#:tests? #f))
7113 (propagated-inputs
7114 `(("python-ipykernel" ,python-ipykernel)
7115 ("python-ipython" ,python-ipython)
4fe2e344
RW
7116 ("python-traitlets" ,python-traitlets)
7117 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7118 (home-page "http://ipython.org")
7119 (synopsis "IPython HTML widgets for Jupyter")
7120 (description "Ipywidgets are interactive HTML widgets for Jupyter
7121notebooks and the IPython kernel. Notebooks come alive when interactive
7122widgets are used. Users gain control of their data and can visualize changes
7123in the data.")
7124 (license license:bsd-3)))
7125
7126(define-public python2-ipywidgets
7127 (package-with-python2 python-ipywidgets))
7128
8ceebf8f
RW
7129(define-public python-jupyter-console
7130 (package
7131 (name "python-jupyter-console")
7132 (version "5.0.0")
7133 (source
7134 (origin
7135 (method url-fetch)
7136 (uri (pypi-uri "jupyter_console" version))
7137 (sha256
7138 (base32
7139 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7140 (build-system python-build-system)
7141 ;; FIXME: it's not clear how to run the tests.
7142 (arguments `(#:tests? #f))
7143 (propagated-inputs
7144 `(("python-ipykernel" ,python-ipykernel)
7145 ("python-ipython" ,python-ipython)
7146 ("python-jupyter-client" ,python-jupyter-client)
7147 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7148 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7149 (home-page "https://jupyter.org")
7150 (synopsis "Jupyter terminal console")
7151 (description "This package provides a terminal-based console frontend for
7152Jupyter kernels. It also allows for console-based interaction with non-Python
7153Jupyter kernels such as IJulia and IRKernel.")
7154 (license license:bsd-3)))
7155
7156(define-public python2-jupyter-console
7157 (package-with-python2 python-jupyter-console))
7158
c27ae827
RW
7159(define-public jupyter
7160 (package
7161 (name "jupyter")
7162 (version "1.0.0")
7163 (source
7164 (origin
7165 (method url-fetch)
7166 (uri (pypi-uri "jupyter" version))
7167 (sha256
7168 (base32
7169 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7170 (build-system python-build-system)
7171 ;; FIXME: it's not clear how to run the tests.
7172 (arguments `(#:tests? #f))
7173 (propagated-inputs
7174 `(("python-ipykernel" ,python-ipykernel)
7175 ("python-ipywidgets" ,python-ipywidgets)
7176 ("python-jupyter-console" ,python-jupyter-console)
7177 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7178 ("python-notebook" ,python-notebook)))
c27ae827
RW
7179 (home-page "http://jupyter.org")
7180 (synopsis "Web application for interactive documents")
7181 (description
7182 "The Jupyter Notebook is a web application that allows you to create and
7183share documents that contain live code, equations, visualizations and
7184explanatory text. Uses include: data cleaning and transformation, numerical
7185simulation, statistical modeling, machine learning and much more.")
7186 (license license:bsd-3)))
7187
816a6538
LC
7188(define-public python-chardet
7189 (package
7190 (name "python-chardet")
7191 (version "2.3.0")
7192 (source
7193 (origin
7194 (method url-fetch)
7195 (uri (string-append
7196 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7197 version
7198 ".tar.gz"))
7199 (sha256
7200 (base32
7201 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7202 (build-system python-build-system)
816a6538
LC
7203 (home-page "https://github.com/chardet/chardet")
7204 (synopsis "Universal encoding detector for Python 2 and 3")
7205 (description
7206 "This package provides @code{chardet}, a Python module that can
7207automatically detect a wide range of file encodings.")
3f641af0 7208 (license license:lgpl2.1+)))
816a6538
LC
7209
7210(define-public python2-chardet
7211 (package-with-python2 python-chardet))
2fc5f186 7212
1872f1bb
KM
7213(define-public python-docopt
7214 (package
7215 (name "python-docopt")
7216 (version "0.6.2")
7217 (source
7218 (origin
7219 (method url-fetch)
7220 ;; The release on PyPI does not include tests.
7221 (uri (string-append
7222 "https://github.com/docopt/docopt/archive/"
7223 version ".tar.gz"))
7224 (file-name (string-append name "-" version ".tar.gz"))
7225 (sha256
7226 (base32
7227 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7228 (build-system python-build-system)
7229 (native-inputs
f3b98f4f 7230 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7231 (arguments
7232 `(#:phases (alist-replace
7233 'check
7234 (lambda _ (zero? (system* "py.test")))
7235 %standard-phases)))
7236 (home-page "http://docopt.org")
7237 (synopsis "Command-line interface description language for Python")
7238 (description "This library allows the user to define a command-line
7239interface from a program's help message rather than specifying it
7240programatically with command-line parsers like @code{getopt} and
7241@code{argparse}.")
7242 (license license:expat)))
7243
7244(define-public python2-docopt
7245 (package-with-python2 python-docopt))
7246
2fc5f186
LF
7247(define-public python-zope-event
7248 (package
7249 (name "python-zope-event")
7250 (version "4.1.0")
7251 (source
7252 (origin
7253 (method url-fetch)
7254 (uri (string-append "https://pypi.python.org/packages/source/z"
7255 "/zope.event/zope.event-" version ".tar.gz"))
7256 (sha256
7257 (base32
7258 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7259 (build-system python-build-system)
2fc5f186
LF
7260 (home-page "http://pypi.python.org/pypi/zope.event")
7261 (synopsis "Event publishing system for Python")
7262 (description "Zope.event provides an event publishing API, intended for
7263use by applications which are unaware of any subscribers to their events. It
7264is a simple event-dispatching system on which more sophisticated event
7265dispatching systems can be built.")
3f641af0 7266 (license license:zpl2.1)))
2fc5f186
LF
7267
7268(define-public python2-zope-event
7269 (package-with-python2 python-zope-event))
97abe268
LF
7270
7271(define-public python-zope-interface
7272 (package
7273 (name "python-zope-interface")
7274 (version "4.1.3")
7275 (source
7276 (origin
7277 (method url-fetch)
7278 (uri (string-append "https://pypi.python.org/packages/source/z"
7279 "/zope.interface/zope.interface-" version ".tar.gz"))
7280 (sha256
7281 (base32
7282 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7283 (build-system python-build-system)
38d480a8 7284 (native-inputs
97abe268
LF
7285 `(("python-zope-event" ,python-zope-event)))
7286 (home-page "https://github.com/zopefoundation/zope.interface")
7287 (synopsis "Python implementation of the \"design by contract\"
7288methodology")
7289 (description "Zope.interface provides an implementation of \"object
7290interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7291conforming to a given API or contract.")
3f641af0 7292 (license license:zpl2.1)))
97abe268
LF
7293
7294(define-public python2-zope-interface
7295 (package-with-python2 python-zope-interface))
81f2373c
LF
7296
7297(define-public python-zope-exceptions
7298 (package
7299 (name "python-zope-exceptions")
7300 (version "4.0.8")
7301 (source
7302 (origin
7303 (method url-fetch)
7304 (uri (string-append "https://pypi.python.org/packages/source/z"
7305 "/zope.exceptions/zope.exceptions-"
7306 version ".tar.gz"))
7307 (sha256
7308 (base32
7309 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7310 (build-system python-build-system)
7311 (arguments
7312 '(#:tests? #f)) ; circular dependency with zope.testrunner
7313 (propagated-inputs
7314 `(("python-zope-interface" ,python-zope-interface)))
7315 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7316 (synopsis "Zope exceptions")
7317 (description "Zope.exceptions provides general-purpose exception types
7318that have uses outside of the Zope framework.")
3f641af0 7319 (license license:zpl2.1)))
81f2373c
LF
7320
7321(define-public python2-zope-exceptions
7322 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7323
7324(define-public python-zope-testing
7325 (package
7326 (name "python-zope-testing")
7327 (version "4.5.0")
7328 (source
7329 (origin
7330 (method url-fetch)
7331 (uri (string-append "https://pypi.python.org/packages/source/z"
7332 "/zope.testing/zope.testing-" version ".tar.gz"))
7333 (sha256
7334 (base32
b02f7a21
HG
7335 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7336 (modules '((guix build utils)))
7337 (snippet
7338 '(begin
7339 ;; Remove pre-compiled .pyc files backup files from source.
7340 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7341 #t))))
900e3c0e
LF
7342 (build-system python-build-system)
7343 (native-inputs
7344 `(("python-zope-exceptions" ,python-zope-exceptions)))
7345 (propagated-inputs
7346 `(("python-zope-interface" ,python-zope-interface)))
7347 (home-page "http://pypi.python.org/pypi/zope.testing")
7348 (synopsis "Zope testing helpers")
7349 (description "Zope.testing provides a number of testing utilities for HTML
7350forms, HTTP servers, regular expressions, and more.")
3f641af0 7351 (license license:zpl2.1)))
900e3c0e
LF
7352
7353(define-public python2-zope-testing
7354 (package-with-python2 python-zope-testing))
01614c4f
LF
7355
7356(define-public python-zope-testrunner
7357 (package
7358 (name "python-zope-testrunner")
7359 (version "4.4.9")
7360 (source
7361 (origin
7362 (method url-fetch)
7363 (uri (string-append "https://pypi.python.org/packages/source/z"
7364 "/zope.testrunner/zope.testrunner-"
7365 version ".zip"))
7366 (sha256
7367 (base32
7368 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7369 (build-system python-build-system)
385871e5
MB
7370 (arguments
7371 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
7372 (native-inputs
7373 `(("python-six" ,python-six)
e408ffc3 7374 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
7375 ("python-zope-exceptions" ,python-zope-exceptions)
7376 ("python-zope-testing" ,python-zope-testing)
7377 ("unzip" ,unzip)))
7378 (propagated-inputs
7379 `(("python-zope-interface" ,python-zope-interface)))
7380 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7381 (synopsis "Zope testrunner script")
7382 (description "Zope.testrunner provides a script for running Python
7383tests.")
3f641af0 7384 (license license:zpl2.1)))
01614c4f
LF
7385
7386(define-public python2-zope-testrunner
7387 (let ((base (package-with-python2 python-zope-testrunner)))
7388 (package
7389 (inherit base)
7390 (native-inputs
7391 (append (package-native-inputs base)
7392 `(("python2-subunit" ,python2-subunit)
7393 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7394
7395(define-public python-zope-i18nmessageid
7396 (package
7397 (name "python-zope-i18nmessageid")
7398 (version "4.0.3")
7399 (source
7400 (origin
7401 (method url-fetch)
7402 (uri (string-append
7403 "https://pypi.python.org/packages/source/z"
7404 "/zope.i18nmessageid/zope.i18nmessageid-"
7405 version ".tar.gz"))
7406 (sha256
7407 (base32
7408 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7409 (build-system python-build-system)
6a5c710c
LF
7410 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7411 (synopsis "Message identifiers for internationalization")
7412 (description "Zope.i18nmessageid provides facilities for declaring
7413internationalized messages within program source text.")
3f641af0 7414 (license license:zpl2.1)))
6a5c710c
LF
7415
7416(define-public python2-zope-i18nmessageid
7417 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7418
7419(define-public python-zope-schema
7420 (package
7421 (name "python-zope-schema")
7422 (version "4.4.2")
7423 (source
7424 (origin
7425 (method url-fetch)
7426 (uri (string-append "https://pypi.python.org/packages/source/z"
7427 "/zope.schema/zope.schema-" version ".tar.gz"))
7428 (sha256
7429 (base32
7430 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7431 (build-system python-build-system)
22dba2ef
MB
7432 (arguments
7433 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
7434 (propagated-inputs
7435 `(("python-zope-event" ,python-zope-event)
2b9e4bea 7436 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
7437 ("python-zope-interface" ,python-zope-interface)))
7438 (native-inputs
47f77210
HG
7439 `(("python-zope-testing" ,python-zope-testing)
7440 ("python-coverage" ,python-coverage)
7441 ("python-nose" ,python-nose)))
71fb09f3
LF
7442 (home-page "http://pypi.python.org/pypi/zope.schema")
7443 (synopsis "Zope data schemas")
7444 (description "Zope.scheme provides extensions to zope.interface for
7445defining data schemas.")
3f641af0 7446 (license license:zpl2.1)))
71fb09f3
LF
7447
7448(define-public python2-zope-schema
7449 (package-with-python2 python-zope-schema))
fbac9b17
LF
7450
7451(define-public python-zope-configuration
7452 (package
7453 (name "python-zope-configuration")
7454 (version "4.0.3")
7455 (source (origin
7456 (method url-fetch)
7457 (uri (string-append "https://pypi.python.org/packages/source/z"
7458 "/zope.configuration/zope.configuration-"
7459 version ".tar.gz"))
7460 (sha256
7461 (base32
7462 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7463 (build-system python-build-system)
7e8b1bfa
MB
7464 (arguments
7465 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
7466 (propagated-inputs
7467 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7468 ("python-zope-schema" ,python-zope-schema)))
7469 (home-page "http://pypi.python.org/pypi/zope.configuration")
7470 (synopsis "Zope Configuration Markup Language")
7471 (description "Zope.configuration implements ZCML, the Zope Configuration
7472Markup Language.")
3f641af0 7473 (license license:zpl2.1)))
fbac9b17
LF
7474
7475(define-public python2-zope-configuration
7476 (package-with-python2 python-zope-configuration))
2ad52086
LF
7477
7478(define-public python-zope-proxy
7479 (package
7480 (name "python-zope-proxy")
7481 (version "4.1.6")
7482 (source
7483 (origin
7484 (method url-fetch)
7485 (uri (string-append "https://pypi.python.org/packages/source/z"
7486 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7487 (sha256
7488 (base32
7489 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7490 (build-system python-build-system)
66b3aadb
MB
7491 (arguments
7492 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
7493 (propagated-inputs
7494 `(("python-zope-interface" ,python-zope-interface)))
7495 (home-page "http://pypi.python.org/pypi/zope.proxy")
7496 (synopsis "Generic, transparent proxies")
7497 (description "Zope.proxy provides generic, transparent proxies for Python.
7498Proxies are special objects which serve as mostly-transparent wrappers around
7499another object, intervening in the apparent behavior of the wrapped object
7500only when necessary to apply the policy (e.g., access checking, location
7501brokering, etc.) for which the proxy is responsible.")
3f641af0 7502 (license license:zpl2.1)))
2ad52086
LF
7503
7504(define-public python2-zope-proxy
7505 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7506
7507(define-public python-zope-location
7508 (package
7509 (name "python-zope-location")
7510 (version "4.0.3")
7511 (source
7512 (origin
7513 (method url-fetch)
7514 (uri (string-append "https://pypi.python.org/packages/source/z"
7515 "/zope.location/zope.location-" version ".tar.gz"))
7516 (sha256
7517 (base32
7518 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7519 (build-system python-build-system)
40bb8e07
MB
7520 (arguments
7521 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 7522 (propagated-inputs
f404b5ea
LF
7523 `(("python-zope-proxy" ,python-zope-proxy)
7524 ("python-zope-schema" ,python-zope-schema)))
7525 (home-page "http://pypi.python.org/pypi/zope.location/")
7526 (synopsis "Zope location library")
7527 (description "Zope.location implements the concept of \"locations\" in
7528Zope3, which are are special objects that have a structural location.")
3f641af0 7529 (license license:zpl2.1)))
f404b5ea
LF
7530
7531(define-public python2-zope-location
7532 (package-with-python2 python-zope-location))
d4b77f36
LF
7533
7534(define-public python-zope-security
7535 (package
7536 (name "python-zope-security")
7537 (version "4.0.3")
7538 (source
7539 (origin
7540 (method url-fetch)
7541 (uri (string-append "https://pypi.python.org/packages/source/z"
7542 "/zope.security/zope.security-" version ".tar.gz"))
7543 (sha256
7544 (base32
7545 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7546 (build-system python-build-system)
a74f9b12
MB
7547 (arguments
7548 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
7549 (propagated-inputs
7550 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 7551 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 7552 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
7553 (native-inputs
7554 `(("python-six" ,python-six)
7555 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
7556 ("python-zope-configuration" ,python-zope-configuration)
7557 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
7558 ("python-zope-testrunner" ,python-zope-testrunner)
7559 ("python-zope-testing" ,python-zope-testing)))
7560 (home-page "http://pypi.python.org/pypi/zope.security")
7561 (synopsis "Zope security framework")
7562 (description "Zope.security provides a generic mechanism to implement
7563security policies on Python objects.")
3f641af0 7564 (license license:zpl2.1)))
d4b77f36
LF
7565
7566(define-public python2-zope-security
04417662
EF
7567 (let ((zope-security (package-with-python2 python-zope-security)))
7568 (package (inherit zope-security)
7569 (propagated-inputs
7570 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7571 ,@(alist-delete
7572 "python-zope-testrunner"
7573 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7574
7575(define-public python-zope-component
7576 (package
7577 (name "python-zope-component")
7578 (version "4.2.2")
7579 (source
7580 (origin
7581 (method url-fetch)
7582 (uri (string-append "https://pypi.python.org/packages/source/z"
7583 "/zope.component/zope.component-" version ".tar.gz"))
7584 (sha256
7585 (base32
7586 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7587 (build-system python-build-system)
7588 (arguments
7589 ;; Skip tests due to circular dependency with python-zope-security.
7590 '(#:tests? #f))
7591 (native-inputs
7592 `(("python-zope-testing" ,python-zope-testing)))
7593 (propagated-inputs
7594 `(("python-zope-event" ,python-zope-event)
7595 ("python-zope-interface" ,python-zope-interface)
7596 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7597 ("python-zope-configuration" ,python-zope-configuration)))
7598 (home-page "https://github.com/zopefoundation/zope.component")
7599 (synopsis "Zope Component Architecture")
7600 (description "Zope.component represents the core of the Zope Component
7601Architecture. Together with the zope.interface package, it provides
7602facilities for defining, registering and looking up components.")
3f641af0 7603 (license license:zpl2.1)))
a6b61b27
LF
7604
7605(define-public python2-zope-component
7606 (package-with-python2 python-zope-component))
3859ac12 7607
1ae44b80 7608(define-public python-pythondialog
b5f218be 7609 (package
1ae44b80 7610 (name "python-pythondialog")
42c4b246 7611 (version "3.4.0")
b5f218be
LF
7612 (source
7613 (origin
7614 (method url-fetch)
1ae44b80 7615 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7616 (sha256
7617 (base32
1ae44b80 7618 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7619 (build-system python-build-system)
7620 (arguments
7621 `(#:phases
7622 (modify-phases %standard-phases
7623 (add-after 'unpack 'patch-path
7624 (lambda* (#:key inputs #:allow-other-keys)
7625 (let* ((dialog (assoc-ref inputs "dialog")))
7626 ;; Since this library really wants to grovel the search path, we
7627 ;; must hardcode dialog's store path into it.
7628 (substitute* "dialog.py"
7629 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7630 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7631 #t))))
b5f218be
LF
7632 #:tests? #f)) ; no test suite
7633 (propagated-inputs
7634 `(("dialog" ,dialog)))
7635 (home-page "http://pythondialog.sourceforge.net/")
7636 (synopsis "Python interface to the UNIX dialog utility")
7637 (description "A Python wrapper for the dialog utility. Its purpose is to
7638provide an easy to use, pythonic and comprehensive Python interface to dialog.
7639This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7640 (license license:lgpl2.1)
1ae44b80
LF
7641 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7642
7643(define-public python2-pythondialog
7644 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7645 (package
7646 (inherit base)
7647 (version (package-version python-pythondialog))
7648 (source (origin
7649 (method url-fetch)
7650 (uri (pypi-uri "python2-pythondialog" version))
7651 (sha256
7652 (base32
7653 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7654
3859ac12
LF
7655(define-public python-pyrfc3339
7656 (package
7657 (name "python-pyrfc3339")
d9aa097b 7658 (version "1.0")
3859ac12
LF
7659 (source
7660 (origin
7661 (method url-fetch)
d9aa097b 7662 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7663 (sha256
7664 (base32
d9aa097b 7665 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7666 (build-system python-build-system)
7667 (propagated-inputs
7668 `(("python-pytz" ,python-pytz)))
7669 (native-inputs
f3b98f4f 7670 `(("python-nose" ,python-nose)))
3859ac12
LF
7671 (home-page "https://github.com/kurtraschke/pyRFC3339")
7672 (synopsis "Python timestamp library")
7673 (description "Python library for generating and parsing RFC 3339-compliant
7674timestamps.")
7675 (license license:expat)))
7676
7677(define-public python2-pyrfc3339
7678 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7679
7680(define-public python-werkzeug
7681 (package
7682 (name "python-werkzeug")
0580e383 7683 (version "0.11.11")
5eea2005
LF
7684 (source
7685 (origin
7686 (method url-fetch)
4b47cbfa 7687 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7688 (sha256
7689 (base32
0580e383 7690 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7691 (build-system python-build-system)
7692 (native-inputs
7693 `(("python-pytest" ,python-pytest)))
7694 (home-page "http://werkzeug.pocoo.org/")
7695 (synopsis "Utilities for WSGI applications")
7696 (description "One of the most advanced WSGI utility modules. It includes a
7697powerful debugger, full-featured request and response objects, HTTP utilities to
7698handle entity tags, cache control headers, HTTP dates, cookie handling, file
7699uploads, a powerful URL routing system and a bunch of community-contributed
7700addon modules.")
3f641af0 7701 (license license:x11)))
5eea2005
LF
7702
7703(define-public python2-werkzeug
7704 (package-with-python2 python-werkzeug))
99fffa8a
LF
7705
7706(define-public python-configobj
7707 (package
7708 (name "python-configobj")
7709 (version "5.0.6")
7710 (source (origin
7711 (method url-fetch)
7712 (uri (string-append
7713 "https://pypi.python.org/packages/source/c/configobj/"
7714 "configobj-" version ".tar.gz"))
7715 (sha256
7716 (base32
7717 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7718 ;; Patch setup.py so it looks for python-setuptools, which is
7719 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7720 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 7721 (build-system python-build-system)
861f70c9 7722 (propagated-inputs
f3b98f4f 7723 `(("python-six" ,python-six)))
99fffa8a
LF
7724 (synopsis "Config file reading, writing and validation")
7725 (description "ConfigObj is a simple but powerful config file reader and
7726writer: an ini file round tripper. Its main feature is that it is very easy to
7727use, with a straightforward programmer’s interface and a simple syntax for
7728config files.")
7729 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7730 (license license:bsd-3)))
99fffa8a
LF
7731
7732(define-public python2-configobj
7733 (package-with-python2 python-configobj))
79e8a291
LF
7734
7735(define-public python-configargparse
7736 (package
7737 (name "python-configargparse")
7738 (version "0.10.0")
7739 (source (origin
7740 (method url-fetch)
7741 (uri (string-append
7742 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7743 "ConfigArgParse-" version ".tar.gz"))
7744 (sha256
7745 (base32
7746 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7747 (build-system python-build-system)
7748 (arguments
7749 ;; FIXME: Bug in test suite filed upstream:
7750 ;; https://github.com/bw2/ConfigArgParse/issues/32
7751 '(#:tests? #f))
7752 (synopsis "Replacement for argparse")
7753 (description "A drop-in replacement for argparse that allows options to also
7754be set via config files and/or environment variables.")
7755 (home-page "https://github.com/bw2/ConfigArgParse")
7756 (license license:expat)))
7757
7758(define-public python2-configargparse
7759 (package-with-python2 python-configargparse))
ab41f979
LF
7760
7761(define-public python-ndg-httpsclient
7762 (package
7763 (name "python-ndg-httpsclient")
7764 (version "0.4.0")
7765 (source (origin
7766 (method url-fetch)
7767 (uri (string-append
7768 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7769 "ndg_httpsclient-" version ".tar.gz"))
7770 (sha256
7771 (base32
7772 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7773 (build-system python-build-system)
a39cc016
LF
7774 (arguments
7775 '(;; The tests appear to require networking.
7776 #:tests? #f))
ab41f979
LF
7777 (propagated-inputs
7778 `(("python-pyopenssl" ,python-pyopenssl)))
7779 (synopsis "HTTPS support for Python's httplib and urllib2")
7780 (description "This is a HTTPS client implementation for httplib and urllib2
7781based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7782over the default provided with Python and importantly enables full verification
7783of the SSL peer.")
7784 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7785 (license license:bsd-3)))
ab41f979
LF
7786
7787;; python2-openssl requires special care, so package-with-python2 is
7788;; insufficient.
7789(define-public python2-ndg-httpsclient
7790 (package (inherit python-ndg-httpsclient)
7791 (name "python2-ndg-httpsclient")
7792 (arguments `(#:python ,python-2))
7793 (propagated-inputs
7794 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7795
7796(define-public python-contextlib2
7797 (package
7798 (name "python-contextlib2")
7799 (version "0.4.0")
7800 (source
7801 (origin
7802 (method url-fetch)
7803 (uri (pypi-uri "contextlib2" version))
7804 (sha256
7805 (base32
7806 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7807 (build-system python-build-system)
7808 (arguments
7809 `(#:phases
7810 (modify-phases %standard-phases
7811 (replace 'check
7812 (lambda _ (zero?
7813 (system*
b3546174 7814 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7815 (home-page "http://contextlib2.readthedocs.org/")
7816 (synopsis "Tools for decorators and context managers")
7817 (description "This module is primarily a backport of the Python
78183.2 contextlib to earlier Python versions. Like contextlib, it
7819provides utilities for common tasks involving decorators and context
7820managers. It also contains additional features that are not part of
7821the standard library.")
3f641af0 7822 (license license:psfl)))
03f964a5
CM
7823
7824(define-public python2-contextlib2
7825 (package-with-python2 python-contextlib2))
210bf497
DT
7826
7827(define-public python-texttable
7828 (package
7829 (name "python-texttable")
7830 (version "0.8.4")
7831 (source
7832 (origin
7833 (method url-fetch)
7834 (uri (pypi-uri "texttable" version))
7835 (sha256
7836 (base32
7837 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7838 (build-system python-build-system)
7839 (arguments '(#:tests? #f)) ; no tests
7840 (home-page "https://github.com/foutaise/texttable/")
7841 (synopsis "Python module for creating simple ASCII tables")
7842 (description "Texttable is a Python module for creating simple ASCII
7843tables.")
3f641af0 7844 (license license:lgpl2.1+)))
210bf497
DT
7845
7846(define-public python2-texttable
7847 (package-with-python2 python-texttable))
67c52bb3
DT
7848
7849(define-public python-websocket-client
7850 (package
7851 (name "python-websocket-client")
6b810897 7852 (version "0.37.0")
67c52bb3
DT
7853 (source
7854 (origin
7855 (method url-fetch)
6b810897 7856 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7857 (sha256
7858 (base32
6b810897 7859 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 7860 (build-system python-build-system)
a5333f7c
HG
7861 (propagated-inputs
7862 `(("python-six" ,python-six)))
67c52bb3
DT
7863 (home-page "https://github.com/liris/websocket-client")
7864 (synopsis "WebSocket client for Python")
7865 (description "The Websocket-client module provides the low level APIs for
7866WebSocket usage in Python programs.")
3f641af0 7867 (license license:lgpl2.1+)))
67c52bb3
DT
7868
7869(define-public python2-websocket-client
7870 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7871
7872(define-public python-atomicwrites
7873 (package
7874 (name "python-atomicwrites")
4e92d76a 7875 (version "1.1.0")
5c6eea2a
LF
7876 (source (origin
7877 (method url-fetch)
7878 (uri (pypi-uri "atomicwrites" version))
7879 (sha256
7880 (base32
4e92d76a 7881 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7882 (build-system python-build-system)
7883 (synopsis "Atomic file writes in Python")
7884 (description "Library for atomic file writes using platform dependent tools
8f65585b 7885for atomic file system operations.")
5c6eea2a 7886 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 7887 (license license:expat)))
9bb6d184
LF
7888
7889(define-public python2-atomicwrites
f210e944 7890 (package-with-python2 python-atomicwrites))
561bb3cb
LF
7891
7892(define-public python-requests-toolbelt
7893 (package
7894 (name "python-requests-toolbelt")
c02af1c8 7895 (version "0.6.2")
561bb3cb
LF
7896 (source (origin
7897 (method url-fetch)
c02af1c8
LF
7898 (uri (string-append
7899 "https://pypi.python.org/packages/"
7900 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7901 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7902 (sha256
7903 (base32
c02af1c8 7904 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 7905 (build-system python-build-system)
759aadd4
LF
7906 (native-inputs
7907 `(("python-betamax" ,python-betamax)
7908 ("python-mock" ,python-mock)
7909 ("python-pytest" ,python-pytest)))
561bb3cb
LF
7910 (propagated-inputs
7911 `(("python-requests" ,python-requests)))
7912 (synopsis "Extensions to python-requests")
7913 (description "This is a toolbelt of useful classes and functions to be used
7914with python-requests.")
7915 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7916 (license license:asl2.0)))
d1deb90b
LF
7917
7918(define-public python-click-threading
7919 (package
7920 (name "python-click-threading")
3d2e0dbc 7921 (version "0.2.0")
d1deb90b
LF
7922 (source (origin
7923 (method url-fetch)
3d2e0dbc
LF
7924 (uri (string-append
7925 "https://pypi.python.org/packages/"
7926 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7927 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7928 (sha256
7929 (base32
3d2e0dbc 7930 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7931 (build-system python-build-system)
7932 (propagated-inputs
7933 `(("python-click" ,python-click)))
7934 (synopsis "Utilities for multithreading in Click")
7935 (description "This package provides utilities for multithreading in Click
7936applications.")
7937 (home-page "https://github.com/click-contrib/click-threading")
7938 (license license:expat)))
7b17cab9
LF
7939
7940(define-public python-click-log
7941 (package
7942 (name "python-click-log")
a9da8fec 7943 (version "0.1.3")
7b17cab9
LF
7944 (source (origin
7945 (method url-fetch)
7946 (uri (pypi-uri "click-log" version))
7947 (sha256
7948 (base32
a9da8fec 7949 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7950 (build-system python-build-system)
7951 (propagated-inputs
7952 `(("python-click" ,python-click)))
7953 (synopsis "Logging for click applications")
7954 (description "This package provides a Python library for logging Click
7955applications.")
7956 (home-page "https://github.com/click-contrib/click-log")
7957 (license license:expat)))
7b3a4ee4
LF
7958
7959(define-public python-apipkg
7960 (package
7961 (name "python-apipkg")
7962 (version "1.4")
7963 (source (origin
7964 (method url-fetch)
7965 (uri (pypi-uri "apipkg" version))
7966 (sha256
7967 (base32
7968 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7969 (build-system python-build-system)
328bb95d 7970 (native-inputs
7b3a4ee4
LF
7971 `(("python-pytest" ,python-pytest)))
7972 (synopsis "Namespace control and lazy-import mechanism")
7973 (description "With apipkg you can control the exported namespace of a Python
7974package and greatly reduce the number of imports for your users. It is a small
7975pure Python module that works on virtually all Python versions.")
7976 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 7977 (license license:expat)))
e08739c3
CAW
7978
7979(define-public python2-apipkg
f210e944 7980 (package-with-python2 python-apipkg))
848964fe
LF
7981
7982(define-public python-execnet
7983 (package
7984 (name "python-execnet")
7985 (version "1.4.1")
7986 (source (origin
7987 (method url-fetch)
7988 (uri (pypi-uri "execnet" version))
7989 (sha256
7990 (base32
7991 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7992 (build-system python-build-system)
ca0eee9d
LF
7993 (arguments
7994 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7995 ;; The two test failures are caused by the lack of an `ssh` executable.
7996 ;; The test suite can be run with pytest after the 'install' phase.
7997 #:tests? #f))
848964fe 7998 (native-inputs
ca0eee9d
LF
7999 `(("python-pytest" ,python-pytest)
8000 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 8001 (propagated-inputs
848964fe
LF
8002 `(("python-apipkg" ,python-apipkg)))
8003 (synopsis "Rapid multi-Python deployment")
8004 (description "Execnet provides a share-nothing model with
8005channel-send/receive communication for distributing execution across many
8006Python interpreters across version, platform and network barriers. It has a
8007minimal and fast API targetting the following uses:
8008@enumerate
8009@item distribute tasks to (many) local or remote CPUs
8010@item write and deploy hybrid multi-process applications
8011@item write scripts to administer multiple environments
8012@end enumerate")
8013 (home-page "http://codespeak.net/execnet/")
f210e944 8014 (license license:expat)))
16c84f90
CAW
8015
8016(define-public python2-execnet
f210e944 8017 (package-with-python2 python-execnet))
6720dbb4
LF
8018
8019;;; The software provided by this package was integrated into pytest 2.8.
8020(define-public python-pytest-cache
8021 (package
8022 (name "python-pytest-cache")
8023 (version "1.0")
8024 (source (origin
8025 (method url-fetch)
8026 (uri (pypi-uri "pytest-cache" version))
8027 (sha256
8028 (base32
8029 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8030 (build-system python-build-system)
f22efa01 8031 (propagated-inputs
630d938f
EF
8032 `(("python-apipkg" ,python-apipkg)
8033 ("python-execnet" ,python-execnet)
8034 ("python-py" ,python-py)
8035 ("python-pytest" ,python-pytest)))
6720dbb4
LF
8036 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8037 (description "The pytest-cache plugin provides tools to rerun failures from
8038the last py.test invocation.")
8039 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 8040 (license license:expat)))
0adc21c2
EF
8041
8042(define-public python2-pytest-cache
f210e944 8043 (package-with-python2 python-pytest-cache))
d7e729fe
LF
8044
8045(define-public python-pytest-localserver
8046 (package
8047 (name "python-pytest-localserver")
29f20168 8048 (version "0.3.5")
d7e729fe
LF
8049 (source (origin
8050 (method url-fetch)
29f20168 8051 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8052 (sha256
8053 (base32
29f20168 8054 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8055 (build-system python-build-system)
8056 (arguments
8057 `(#:phases (modify-phases %standard-phases
8058 (replace 'check
8059 (lambda _
8060 (zero? (system* "py.test" "--genscript=runtests.py"))
8061 (zero? (system* "py.test")))))))
8062 (native-inputs
d7e729fe
LF
8063 `(("python-pytest" ,python-pytest)
8064 ("python-requests" ,python-requests)
9ba40f05 8065 ("python-six" ,python-six)))
f22efa01 8066 (propagated-inputs
9ba40f05 8067 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8068 (synopsis "Py.test plugin to test server connections locally")
8069 (description "Pytest-localserver is a plugin for the pytest testing
8070framework which enables you to test server connections locally.")
8071 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8072 (license license:expat)))
28cecbb7
LF
8073
8074(define-public python-wsgi-intercept
8075 (package
8076 (name "python-wsgi-intercept")
909fbd2b 8077 (version "1.2.2")
28cecbb7
LF
8078 (source (origin
8079 (method url-fetch)
909fbd2b
LF
8080 (uri (string-append
8081 "https://pypi.python.org/packages/"
8082 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8083 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8084 (sha256
8085 (base32
909fbd2b 8086 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8087 (build-system python-build-system)
b9fc496f
HG
8088 (propagated-inputs
8089 `(("python-six" ,python-six)))
28cecbb7 8090 (native-inputs
9d813ec1 8091 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8092 ("python-httplib2" ,python-httplib2)
8093 ("python-requests" ,python-requests)
8757f050 8094 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8095 (synopsis "Puts a WSGI application in place of a real URI for testing")
8096 (description "Wsgi_intercept installs a WSGI application in place of a real
8097URI for testing. Testing a WSGI application normally involves starting a
8098server at a local host and port, then pointing your test code to that address.
8099Instead, this library lets you intercept calls to any specific host/port
8100combination and redirect them into a WSGI application importable by your test
8101program. Thus, you can avoid spawning multiple processes or threads to test
8102your Web app.")
8103 (home-page "https://github.com/cdent/wsgi-intercept")
8104 (license license:expat)))
89b8a551
LF
8105
8106(define-public python-pytest-xprocess
8107 (package
8108 (name "python-pytest-xprocess")
8109 (version "0.9.1")
8110 (source (origin
8111 (method url-fetch)
8112 (uri (pypi-uri "pytest-xprocess" version))
8113 (sha256
8114 (base32
8115 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8116 (build-system python-build-system)
8117 (propagated-inputs
8118 `(("python-pytest" ,python-pytest)
8119 ("python-pytest-cache" ,python-pytest-cache)
8120 ("python-psutil" ,python-psutil)))
8121 (synopsis "Pytest plugin to manage external processes across test runs")
8122 (description "Pytest-xprocess is an experimental py.test plugin for managing
8123processes across test runs.")
8124 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8125 (license license:expat)))
5c299bf0
LF
8126
8127(define-public python-icalendar
8128 (package
8129 (name "python-icalendar")
25291aca 8130 (version "3.11")
5c299bf0
LF
8131 (source (origin
8132 (method url-fetch)
8133 (uri (pypi-uri "icalendar" version))
8134 (sha256
8135 (base32
25291aca 8136 "01v2f3swd5s72x65cdihw83dx1z799b4i49a6ncg7vqmcm20wapd"))))
5c299bf0
LF
8137 (build-system python-build-system)
8138 (propagated-inputs
22d7360b 8139 `(("python-dateutil" ,python-dateutil)
5c299bf0
LF
8140 ("python-pytz" ,python-pytz)))
8141 (synopsis "Python library for parsing iCalendar files")
8142 (description "The icalendar package is a parser/generator of iCalendar
8143files for use with Python.")
8144 (home-page "https://github.com/collective/icalendar")
3f641af0 8145 (license license:bsd-2)))
6bbbb53e
LF
8146
8147(define-public python-sphinxcontrib-newsfeed
8148 (package
8149 (name "python-sphinxcontrib-newsfeed")
8150 (version "0.1.4")
8151 (source (origin
8152 (method url-fetch)
8153 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8154 (sha256
8155 (base32
8156 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8157 (build-system python-build-system)
8158 (propagated-inputs
251ed7f2 8159 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8160 (synopsis "News Feed extension for Sphinx")
8161 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8162Blog, News or Announcements section to a Sphinx website.")
8163 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8164 (license license:bsd-2)))
2216e15c
SB
8165
8166(define-public python-args
8167 (package
8168 (name "python-args")
8169 (version "0.1.0")
8170 (source (origin
8171 (method url-fetch)
8172 (uri (pypi-uri "args" version))
8173 (sha256
8174 (base32
8175 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8176 (build-system python-build-system)
2216e15c
SB
8177 (home-page "https://github.com/kennethreitz/args")
8178 (synopsis "Command-line argument parser")
8179 (description
8180 "This library provides a Python module to parse command-line arguments.")
3f641af0 8181 (license license:bsd-3)))
2216e15c
SB
8182
8183(define-public python2-args
8184 (package-with-python2 python-args))
c06a3de9
SB
8185
8186(define-public python-clint
8187 (package
8188 (name "python-clint")
8189 (version "0.5.1")
8190 (source (origin
8191 (method url-fetch)
8192 (uri (pypi-uri "clint" version))
8193 (sha256
8194 (base32
8195 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8196 (build-system python-build-system)
6145b604
MB
8197 (arguments
8198 '(#:phases
8199 (modify-phases %standard-phases
8200 (replace 'check
8201 (lambda _
8202 (zero? (system* "py.test" "-v")))))))
8203 (native-inputs
8204 `(("python-pytest" ,python-pytest)))
f22efa01 8205 (propagated-inputs
f3b98f4f 8206 `(("python-args" ,python-args)))
c06a3de9
SB
8207 (home-page "https://github.com/kennethreitz/clint")
8208 (synopsis "Command-line interface tools")
8209 (description
8210 "Clint is a Python module filled with a set of tools for developing
8211command-line applications, including tools for colored and indented
8212output, progress bar display, and pipes.")
3f641af0 8213 (license license:isc)))
c06a3de9
SB
8214
8215(define-public python2-clint
8216 (package-with-python2 python-clint))
4ecdeef8
SB
8217
8218(define-public python-astor
8219 (package
8220 (name "python-astor")
8221 (version "0.5")
8222 (source (origin
8223 (method url-fetch)
8224 (uri (pypi-uri "astor" version))
8225 (sha256
8226 (base32
8227 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8228 (build-system python-build-system)
4ecdeef8
SB
8229 (home-page "https://github.com/berkerpeksag/astor")
8230 (synopsis "Read and write Python ASTs")
8231 (description
8232 "Astor is designed to allow easy manipulation of Python source via the
8233Abstract Syntax Tree.")
3f641af0 8234 (license license:bsd-3)))
4ecdeef8
SB
8235
8236(define-public python2-astor
8237 (package-with-python2 python-astor))
e224b7d0
SB
8238
8239(define-public python-rply
8240 (package
8241 (name "python-rply")
8242 (version "0.7.4")
8243 (source (origin
8244 (method url-fetch)
8245 (uri (pypi-uri "rply" version))
8246 (sha256
8247 (base32
8248 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8249 (build-system python-build-system)
f22efa01 8250 (propagated-inputs
f3b98f4f 8251 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
8252 (home-page "https://github.com/alex/rply")
8253 (synopsis "Parser generator for Python")
8254 (description
8255 "This package provides a pure Python based parser generator, that also
8256works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8257with a new public API, and RPython support.")
3f641af0 8258 (license license:bsd-3)))
e224b7d0
SB
8259
8260(define-public python2-rply
8261 (package-with-python2 python-rply))
c3e919d7
SB
8262
8263(define-public python-hy
8264 (package
8265 (name "python-hy")
8266 (version "0.11.1")
8267 (source (origin
8268 (method url-fetch)
8269 (uri (pypi-uri "hy" version))
8270 (sha256
8271 (base32
8272 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8273 (build-system python-build-system)
15c37077
MB
8274 (arguments
8275 '(#:phases
8276 (modify-phases %standard-phases
8277 (replace 'check
8278 (lambda _
8279 ;; Tests require write access to HOME.
8280 (setenv "HOME" "/tmp")
8281 (zero? (system* "nosetests")))))))
8282 (native-inputs
8283 `(("python-coverage" ,python-coverage)
8284 ("python-nose" ,python-nose)))
f22efa01 8285 (propagated-inputs
c3e919d7
SB
8286 `(("python-astor" ,python-astor)
8287 ("python-clint" ,python-clint)
f3b98f4f 8288 ("python-rply" ,python-rply)))
c3e919d7
SB
8289 (home-page "http://hylang.org/")
8290 (synopsis "Lisp frontend to Python")
8291 (description
8292 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8293its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8294Python at your fingertips, in Lisp form.")
8295 (license license:expat)))
8296
8297(define-public python2-hy
8298 (package-with-python2 python-hy))
7a5b944e 8299
81f7f297
EF
8300(define-public python-rauth
8301 (package
8302 (name "python-rauth")
8303 (version "0.7.2")
8304 (source
8305 (origin
8306 (method url-fetch)
8307 (uri (pypi-uri "rauth" version))
8308 (sha256
8309 (base32
8310 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8311 (build-system python-build-system)
8312 (arguments
8313 `(#:test-target "check"))
f22efa01 8314 (propagated-inputs
81f7f297
EF
8315 `(("python-requests" ,python-requests)))
8316 (home-page "https://github.com/litl/rauth")
8317 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8318 (description
8319 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8320provides service wrappers for convenient connection initialization and
8321authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8322 (license license:expat)
8323 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8324
8325(define-public python2-rauth
0848d8d3
EF
8326 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8327 (package
8328 (inherit base)
00e10c6e 8329 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 8330 ,@(package-native-inputs base))))))
81f7f297 8331
1abe448d
EF
8332(define-public python2-functools32
8333 (package
8334 (name "python2-functools32")
8335 (version "3.2.3-2")
8336 (source
8337 (origin
8338 (method url-fetch)
8339 (uri (pypi-uri "functools32" version))
8340 (sha256
8341 (base32
8342 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8343 (build-system python-build-system)
8344 (arguments
8345 `(#:python ,python-2
8346 #:tests? #f)) ; no test target
1abe448d
EF
8347 (home-page "https://github.com/MiCHiLU/python-functools32")
8348 (synopsis
8349 "Backport of the functools module from Python 3.2.3")
8350 (description
8351 "This package is a backport of the @code{functools} module from Python
83523.2.3 for use with older versions of Python and PyPy.")
8353 (license license:expat)))
8354
877889f3 8355(define-public python2-futures
7a5b944e 8356 (package
877889f3 8357 (name "python2-futures")
7a5b944e
EF
8358 (version "3.0.3")
8359 (source
8360 (origin
8361 (method url-fetch)
8362 (uri (pypi-uri "futures" version))
8363 (sha256
8364 (base32
8365 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8366 (build-system python-build-system)
877889f3 8367 (arguments `(#:python ,python-2))
7a5b944e
EF
8368 (home-page "https://github.com/agronholm/pythonfutures")
8369 (synopsis
8370 "Backport of the concurrent.futures package from Python 3.2")
8371 (description
8372 "The concurrent.futures module provides a high-level interface for
8373asynchronously executing callables. This package backports the
8374concurrent.futures package from Python 3.2")
3f641af0 8375 (license license:bsd-3)))
7a5b944e 8376
5cb2fe44
EF
8377(define-public python-promise
8378 (package
8379 (name "python-promise")
8380 (version "0.4.2")
8381 (source
8382 (origin
8383 (method url-fetch)
8384 (uri (pypi-uri "promise" version))
8385 (sha256
8386 (base32
8387 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8388 (build-system python-build-system)
8389 ;; Tests wants python-futures, which is a python2 only program, and
8390 ;; can't be found by python-promise at test time.
8391 (arguments `(#:tests? #f))
8392 (home-page "https://github.com/syrusakbary/promise")
8393 (synopsis "Promises/A+ implementation for Python")
8394 (description
8395 "Promises/A+ implementation for Python")
8396 (properties `((python2-variant . ,(delay python2-promise))))
8397 (license license:expat)))
8398
8399(define-public python2-promise
8400 (let ((promise (package-with-python2
8401 (strip-python2-variant python-promise))))
8402 (package (inherit promise)
8403 (arguments (substitute-keyword-arguments (package-arguments promise)
8404 ((#:tests? _) #t)))
8405 (native-inputs
8406 `(("python2-futures" ,python2-futures)
8407 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
8408 ,@(package-native-inputs promise))))))
8409
c18f6368
EF
8410(define-public python-urllib3
8411 (package
8412 (name "python-urllib3")
6178274d 8413 (version "1.18.1")
c18f6368
EF
8414 (source
8415 (origin
8416 (method url-fetch)
8417 (uri (pypi-uri "urllib3" version))
8418 (sha256
8419 (base32
6178274d 8420 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8421 (build-system python-build-system)
8422 (arguments `(#:tests? #f))
8423 (native-inputs
f3b98f4f 8424 `(;; some packages for tests
c18f6368
EF
8425 ("python-nose" ,python-nose)
8426 ("python-mock" ,python-mock)
8427 ("python-tornado" ,python-tornado)))
8428 (propagated-inputs
8322749a 8429 `(;; extra packages for https security
c18f6368
EF
8430 ("python-certifi" ,python-certifi)
8431 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8432 ("python-pyasn1" ,python-pyasn1)
8433 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8434 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8435 (synopsis "HTTP library with thread-safe connection pooling")
8436 (description
8437 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8438can reuse the same socket connection for multiple requests, it can POST files,
8439supports url redirection and retries, and also gzip and deflate decoding.")
8440 (license license:expat)))
8441
8442(define-public python2-urllib3
8443 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8444
8445(define-public python-colorama
8446 (package
8447 (name "python-colorama")
8448 (version "0.3.3")
8449 (source
8450 (origin
8451 (method url-fetch)
8452 (uri (pypi-uri "colorama" version))
8453 (sha256
8454 (base32
8455 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8456 (build-system python-build-system)
2b2f2fc1
DT
8457 (synopsis "colored terminal text rendering for Python")
8458 (description "Colorama is a Python library for rendering colored terminal
8459text.")
8460 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8461 (license license:bsd-3)))
2b2f2fc1
DT
8462
8463(define-public python2-colorama
8464 (package-with-python2 python-colorama))
f5bcec6e
DT
8465
8466(define-public python-rsa
8467 (package
8468 (name "python-rsa")
ecd68c53 8469 (version "3.4.2")
f5bcec6e
DT
8470 (source
8471 (origin
8472 (method url-fetch)
8473 (uri (pypi-uri "rsa" version))
8474 (sha256
8475 (base32
ecd68c53 8476 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 8477 (build-system python-build-system)
f22efa01 8478 (propagated-inputs
f3b98f4f 8479 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
8480 (synopsis "Pure-Python RSA implementation")
8481 (description "Python-RSA is a pure-Python RSA implementation. It supports
8482encryption and decryption, signing and verifying signatures, and key
8483generation according to PKCS#1 version 1.5. It can be used as a Python
8484library as well as on the command line.")
8485 (home-page "http://stuvel.eu/rsa")
3f641af0 8486 (license license:asl2.0)))
f5bcec6e
DT
8487
8488(define-public python2-rsa
8489 (package-with-python2 python-rsa))
c0aacfa5
DT
8490
8491(define-public python-pluggy
8492 (package
8493 (name "python-pluggy")
8494 (version "0.3.1")
8495 (source
8496 (origin
8497 (method url-fetch)
8498 (uri (pypi-uri "pluggy" version))
8499 (sha256
8500 (base32
8501 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8502 (build-system python-build-system)
c0aacfa5
DT
8503 (synopsis "Plugin and hook calling mechanism for Python")
8504 (description "Pluggy is an extraction of the plugin manager as used by
8505Pytest but stripped of Pytest specific details.")
8506 (home-page "https://pypi.python.org/pypi/pluggy")
8507 (license license:expat)))
8508
8509(define-public python2-pluggy
8510 (package-with-python2 python-pluggy))
a4af21ca
DT
8511
8512(define-public python-tox
8513 (package
8514 (name "python-tox")
8515 (version "2.3.1")
8516 (source
8517 (origin
8518 (method url-fetch)
8519 (uri (pypi-uri "tox" version))
8520 (sha256
8521 (base32
8522 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8523 (build-system python-build-system)
8524 (arguments
7ba07edf
HG
8525 ;; FIXME: Tests require pytest-timeout, which itself requires
8526 ;; pytest>=2.8.0 for installation.
a4af21ca 8527 '(#:tests? #f))
482d9591
HG
8528 (propagated-inputs
8529 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 8530 ("python-py" ,python-py)
482d9591 8531 ("python-virtualenv" ,python-virtualenv)))
328bb95d 8532 (native-inputs
7ba07edf
HG
8533 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8534 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
8535 (home-page "http://tox.testrun.org/")
8536 (synopsis "Virtualenv-based automation of test activities")
8537 (description "Tox is a generic virtualenv management and test command line
8538tool. It can be used to check that a package installs correctly with
8539different Python versions and interpreters, or run tests in each type of
8540supported environment, or act as a frontend to continuous integration
8541servers.")
8542 (license license:expat)))
8543
8544(define-public python2-tox
8545 (package-with-python2 python-tox))
ba9da248
DT
8546
8547(define-public python-jmespath
8548 (package
8549 (name "python-jmespath")
8550 (version "0.9.0")
8551 (source
8552 (origin
8553 (method url-fetch)
8554 (uri (pypi-uri "jmespath" version))
8555 (sha256
8556 (base32
8557 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8558 (build-system python-build-system)
52a75a83
MB
8559 (native-inputs
8560 `(("python-nose" ,python-nose)))
ba9da248
DT
8561 (synopsis "JSON Matching Expressions")
8562 (description "JMESPath (pronounced “james path”) is a Python library that
8563allows one to declaratively specify how to extract elements from a JSON
8564document.")
8565 (home-page "https://github.com/jmespath/jmespath.py")
8566 (license license:expat)))
8567
8568(define-public python2-jmespath
8569 (package-with-python2 python-jmespath))
935fcd5c
DT
8570
8571(define-public python-botocore
8572 (package
8573 (name "python-botocore")
e09f952d 8574 (version "1.4.62")
935fcd5c
DT
8575 (source
8576 (origin
8577 (method url-fetch)
8578 (uri (pypi-uri "botocore" version))
8579 (sha256
8580 (base32
e09f952d 8581 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c 8582 (build-system python-build-system)
877fdac9
MB
8583 (arguments
8584 ;; FIXME: Many tests are failing.
8585 '(#:tests? #f))
482d9591 8586 (propagated-inputs
22d7360b 8587 `(("python-dateutil" ,python-dateutil)
935fcd5c 8588 ("python-docutils" ,python-docutils)
482d9591 8589 ("python-jmespath" ,python-jmespath)))
8fa6890b 8590 (native-inputs
482d9591 8591 `(("python-mock" ,python-mock)
935fcd5c 8592 ("python-nose" ,python-nose)
482d9591 8593 ("behave" ,behave)
935fcd5c 8594 ("python-tox" ,python-tox)
482d9591 8595 ("python-wheel" ,python-wheel)))
935fcd5c
DT
8596 (home-page "https://github.com/boto/botocore")
8597 (synopsis "Low-level interface to AWS")
8598 (description "Botocore is a Python library that provides a low-level
8599interface to the Amazon Web Services (AWS) API.")
3f641af0 8600 (license license:asl2.0)))
935fcd5c
DT
8601
8602(define-public python2-botocore
8603 (package-with-python2 python-botocore))
f861b8b8
DT
8604
8605(define-public awscli
8606 (package
8607 (name "awscli")
d5ccf71e 8608 (version "1.11.5")
f861b8b8
DT
8609 (source
8610 (origin
8611 (method url-fetch)
d5ccf71e 8612 (uri (pypi-uri name version))
f861b8b8
DT
8613 (sha256
8614 (base32
d5ccf71e 8615 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8 8616 (build-system python-build-system)
482d9591 8617 (propagated-inputs
f861b8b8 8618 `(("python-colorama" ,python-colorama)
482d9591
HG
8619 ("python-botocore" ,python-botocore)
8620 ("python-s3transfer" ,python-s3transfer)
f861b8b8 8621 ("python-docutils" ,python-docutils)
482d9591 8622 ("python-rsa" ,python-rsa)))
d4649177 8623 (native-inputs
482d9591 8624 `(("python-mock" ,python-mock)
f861b8b8 8625 ("python-nose" ,python-nose)
f861b8b8
DT
8626 ("python-sphinx" ,python-sphinx)
8627 ("python-tox" ,python-tox)
482d9591 8628 ("python-wheel" ,python-wheel)))
f861b8b8
DT
8629 (home-page "http://aws.amazon.com/cli/")
8630 (synopsis "Command line client for AWS")
8631 (description "AWS CLI provides a unified command line interface to the
8632Amazon Web Services (AWS) API.")
3f641af0 8633 (license license:asl2.0)))
6a44697d
LF
8634
8635(define-public python-hypothesis
8636 (package
8637 (name "python-hypothesis")
bea6d94d 8638 (version "3.1.0")
6a44697d
LF
8639 (source (origin
8640 (method url-fetch)
8641 (uri (pypi-uri "hypothesis" version))
8642 (sha256
8643 (base32
bea6d94d 8644 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8645 (build-system python-build-system)
bd100c71 8646 (native-inputs
6a44697d
LF
8647 `(("python-flake8" ,python-flake8)
8648 ("python-pytest" ,python-pytest)))
8649 (synopsis "Library for property based testing")
8650 (description "Hypothesis is a library for testing your Python code against a
8651much larger range of examples than you would ever want to write by hand. It’s
8652based on the Haskell library, Quickcheck, and is designed to integrate
8653seamlessly into your existing Python unit testing work flow.")
8654 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8655 (license license:mpl2.0)
6f068e08 8656 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8657
8658(define-public python2-hypothesis
6f068e08
EF
8659 (let ((hypothesis (package-with-python2
8660 (strip-python2-variant python-hypothesis))))
8661 (package (inherit hypothesis)
8662 (native-inputs
bd100c71
MB
8663 `(("python2-enum34" ,python2-enum34)
8664 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
8665
8666(define-public python-pytest-subtesthack
8667 (package
8668 (name "python-pytest-subtesthack")
8669 (version "0.1.1")
8670 (source (origin
8671 (method url-fetch)
8672 (uri (pypi-uri "pytest-subtesthack" version))
8673 (sha256
8674 (base32
8675 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8676 (build-system python-build-system)
7517e73c
LF
8677 (propagated-inputs
8678 `(("python-pytest" ,python-pytest)))
8679 (synopsis "Set-up and tear-down fixtures for unit tests")
8680 (description "This plugin allows you to set up and tear down fixtures within
8681unit test functions that use @code{py.test}. This is useful for using
8682@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8683function multiple times, without setting up or tearing down fixture state as is
8684normally the case.")
8685 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8686 (license license:unlicense)))
7517e73c
LF
8687
8688(define-public python2-pytest-subtesthack
8689 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8690
8691(define-public python2-xdo
8692 (package
8693 (name "python2-xdo")
8694 (version "0.2")
8695 (source (origin
8696 (method url-fetch)
8697 (uri (string-append
8698 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8699 "python-xdo_" version ".orig.tar.gz"))
8700 (sha256
8701 (base32
8702 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8703 (build-system python-build-system)
8704 (arguments
8705 `(#:python ,python-2
8706 #:tests? #f)) ; no tests provided
8707 (inputs
8708 `(("xdotool" ,xdotool)
8709 ("libX11" ,libx11)))
8710 (home-page "https://tracker.debian.org/pkg/python-xdo")
8711 (synopsis "Python library for simulating X11 keyboard/mouse input")
8712 (description "Provides bindings to libxdo for manipulating X11 via simulated
8713input. (Note that this is mostly a legacy library; you may wish to look at
8714python-xdo for newer bindings.)")
3f641af0 8715 (license license:bsd-3)))
0bdc1671 8716
cb34dc6c
CAW
8717(define-public python-wtforms
8718 (package
8719 (name "python-wtforms")
8720 (version "2.1")
8721 (source
8722 (origin
8723 (method url-fetch)
8724 (uri (pypi-uri "WTForms" version ".zip"))
8725 (sha256
8726 (base32
8727 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8728 (build-system python-build-system)
13c4d874
EF
8729 (arguments
8730 '(#:phases
8731 (modify-phases %standard-phases
8732 (add-after 'unpack 'remove-django-test
8733 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8734 (lambda _
8735 (substitute*
8736 "tests/runtests.py"
8737 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8738 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8739 #t)))))
cb34dc6c
CAW
8740 (native-inputs
8741 `(("unzip" ,unzip)))
8742 (home-page "http://wtforms.simplecodes.com/")
8743 (synopsis
8744 "Form validation and rendering library for Python web development")
8745 (description
8746 "WTForms is a flexible forms validation and rendering library
8747for Python web development. It is very similar to the web form API
8748available in Django, but is a standalone package.")
f210e944 8749 (license license:bsd-3)))
cb34dc6c
CAW
8750
8751(define-public python2-wtforms
f210e944 8752 (package-with-python2 python-wtforms))
50aaec25
DT
8753
8754(define-public python-mako
8755 (package
8756 (name "python-mako")
8757 (version "1.0.3")
8758 (source
8759 (origin
8760 (method url-fetch)
8761 (uri (pypi-uri "Mako" version))
8762 (sha256
8763 (base32
8764 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8765 (build-system python-build-system)
482d9591
HG
8766 (propagated-inputs
8767 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 8768 (native-inputs
482d9591 8769 `(("python-mock" ,python-mock)
50aaec25
DT
8770 ("python-nose" ,python-nose)))
8771 (home-page "http://www.makotemplates.org/")
8772 (synopsis "Templating language for Python")
8773 (description "Mako is a templating language for Python that compiles
8774templates into Python modules.")
f210e944 8775 (license license:expat)))
50aaec25
DT
8776
8777(define-public python2-mako
f210e944 8778 (package-with-python2 python-mako))
ae00a41f
CAW
8779
8780(define-public python-waitress
8781 (package
8782 (name "python-waitress")
8783 (version "0.8.10")
8784 (source
8785 (origin
8786 (method url-fetch)
8787 (uri (pypi-uri "waitress" version))
8788 (sha256
8789 (base32
8790 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8791 (build-system python-build-system)
8792 (home-page "https://github.com/Pylons/waitress")
8793 (synopsis "Waitress WSGI server")
8794 (description "Waitress is meant to be a production-quality pure-Python WSGI
8795server with very acceptable performance.")
f210e944 8796 (license license:zpl2.1)))
ae00a41f
CAW
8797
8798(define-public python2-waitress
f210e944 8799 (package-with-python2 python-waitress))
778a284b
CAW
8800
8801(define-public python-wsgiproxy2
8802 (package
8803 (name "python-wsgiproxy2")
8804 (version "0.4.2")
8805 (source
8806 (origin
8807 (method url-fetch)
8808 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8809 (sha256
8810 (base32
8811 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8812 (build-system python-build-system)
e359b31a
LF
8813 (arguments
8814 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8815 ;; support Python 3:
8816 ;; https://github.com/benoitc/restkit/issues/140
8817 #:tests? #f))
778a284b
CAW
8818 (native-inputs
8819 `(("unzip" ,unzip)
8820 ("python-nose" ,python-nose)
8821 ("python-coverage" ,python-coverage)))
8822 (propagated-inputs
8823 `(("python-six" ,python-six)
8824 ("python-webob" ,python-webob)))
8825 (home-page
8826 "https://github.com/gawel/WSGIProxy2/")
8827 (synopsis "WSGI Proxy with various http client backends")
8828 (description "WSGI turns HTTP requests into WSGI function calls.
8829WSGIProxy turns WSGI function calls into HTTP requests.
8830It also includes code to sign requests and pass private data,
8831and to spawn subprocesses to handle requests.")
f210e944 8832 (license license:expat)))
778a284b
CAW
8833
8834(define-public python2-wsgiproxy2
f210e944 8835 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
8836
8837(define-public python-pastedeploy
8838 (package
8839 (name "python-pastedeploy")
8840 (version "1.5.2")
8841 (source
8842 (origin
8843 (method url-fetch)
8844 (uri (pypi-uri "PasteDeploy" version))
8845 (sha256
8846 (base32
8847 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8848 (build-system python-build-system)
8849 (native-inputs
8850 `(("python-nose" ,python-nose)))
bb7518b1
CAW
8851 (home-page "http://pythonpaste.org/deploy/")
8852 (synopsis
8853 "Load, configure, and compose WSGI applications and servers")
8854 (description
8855 "This tool provides code to load WSGI applications and servers from URIs;
8856these URIs can refer to Python Eggs for INI-style configuration files. Paste
8857Script provides commands to serve applications based on this configuration
8858file.")
8859 (license license:expat)))
8860
8861(define-public python2-pastedeploy
8862 (package-with-python2 python-pastedeploy))
1cf53652 8863
c4a7904c
CAW
8864(define-public python-paste
8865 (package
8866 (name "python-paste")
8867 (version "2.0.2")
8868 (source
8869 (origin
8870 (method url-fetch)
8871 (uri (pypi-uri "Paste" version))
8872 (sha256
8873 (base32
8874 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8875 (patches (search-patches "python-paste-remove-website-test.patch"
8876 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8877 (build-system python-build-system)
8878 (native-inputs
8879 `(("python-nose" ,python-nose)))
8880 (propagated-inputs
f3b98f4f 8881 `(("python-six" ,python-six)))
c4a7904c
CAW
8882 (arguments
8883 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8884 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8885 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8886 ;; still... things should be better by the next Paste release.)
8887 #:tests? #f))
8888 (home-page "http://pythonpaste.org")
8889 (synopsis
8890 "Python web development tools, focusing on WSGI")
8891 (description
8892 "Paste provides a variety of web development tools and middleware which
8893can be nested together to build web applications. Paste's design closely
8894follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8895 (license license:expat)
8896 (properties `((python2-variant . ,(delay python2-paste))))))
8897
8898(define-public python2-paste
8899 (let ((paste (package-with-python2
8900 (strip-python2-variant python-paste))))
8901 (package
8902 (inherit paste)
8903 (arguments
8904 ;; Tests are back for Python 2!
8905 `(#:tests? #t
8906 ,@(package-arguments paste))))))
8907
a8f20f63
CAW
8908(define-public python-pastescript
8909 (package
8910 (name "python-pastescript")
8911 (version "2.0.2")
8912 (source
8913 (origin
8914 (method url-fetch)
8915 (uri (pypi-uri "PasteScript" version))
8916 (sha256
8917 (base32
8918 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8919 (build-system python-build-system)
8920 (native-inputs
8921 `(("python-nose" ,python-nose)))
8922 (propagated-inputs
f3b98f4f 8923 `(("python-paste" ,python-paste)
a8f20f63
CAW
8924 ("python-pastedeploy" ,python-pastedeploy)))
8925 (home-page "http://pythonpaste.org/script/")
8926 (arguments
8927 '(;; Unfortunately, this requires the latest unittest2,
8928 ;; but that requires traceback2 which requires linecache2 which requires
8929 ;; unittest2. So we're skipping tests for now.
8930 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8931 ;; so in theory we could get around this situation somehow.)
8932 #:tests? #f))
8933 (synopsis
8934 "Pluggable command line tool for serving web applications and more")
8935 (description
8936 "PasteScript is a plugin-friendly command line tool which provides a
8937variety of features, from launching web applications to bootstrapping project
8938layouts.")
8939 (license license:expat)))
8940
8941(define-public python2-pastescript
8942 (package-with-python2 python-pastescript))
8943
1cf53652
CAW
8944(define-public python-pyquery
8945 (package
8946 (name "python-pyquery")
aab76e80 8947 (version "1.2.13")
1cf53652
CAW
8948 (source
8949 (origin
8950 (method url-fetch)
8951 (uri (pypi-uri "pyquery" version))
8952 (sha256
8953 (base32
aab76e80 8954 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652 8955 (build-system python-build-system)
2ddbfa8c
LF
8956 (native-inputs
8957 `(("python-webob" ,python-webob)
8958 ("python-webtest" ,python-webtest)))
1cf53652
CAW
8959 (propagated-inputs
8960 `(("python-lxml" ,python-lxml)
8961 ("python-cssselect" ,python-cssselect)))
8962 (home-page "https://github.com/gawel/pyquery")
8963 (synopsis "Make jQuery-like queries on xml documents")
8964 (description "pyquery allows you to make jQuery queries on xml documents.
8965The API is as much as possible the similar to jQuery. pyquery uses lxml for
8966fast xml and html manipulation.")
f210e944 8967 (license license:bsd-3)))
1cf53652
CAW
8968
8969(define-public python2-pyquery
f210e944 8970 (package-with-python2 python-pyquery))
aa6313d6
CAW
8971
8972(define-public python-webtest
8973 (package
8974 (name "python-webtest")
8975 (version "2.0.20")
8976 (source
8977 (origin
8978 (method url-fetch)
8979 (uri (pypi-uri "WebTest" version))
8980 (sha256
8981 (base32
8982 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8983 (build-system python-build-system)
8984 (arguments
8985 `(;; Unfortunately we have to disable tests!
8986 ;; This release of WebTest is pinned to python-nose < 1.3,
8987 ;; but older versions of python-nose are plagued with the following
8988 ;; bug(s), which rears its ugly head during test execution:
8989 ;; https://github.com/nose-devs/nose/issues/759
8990 ;; https://github.com/nose-devs/nose/pull/811
8991 #:tests? #f))
8992 ;; Commented out code is no good, but in this case, once tests
8993 ;; are ready to be enabled again, we should put the following
8994 ;; in place:
8995 ;; (native-inputs
8996 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8997 ;; ; but see above comment
8998 ;; ("python-coverage" ,python-coverage)
8999 ;; ("python-mock" ,python-mock)
9000 ;; ("python-pastedeploy" ,python-pastedeploy)
9001 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9002 ;; ("python-pyquery" ,python-pyquery)))
9003 (propagated-inputs
9004 `(("python-waitress" ,python-waitress)
9005 ("python-webob" ,python-webob)
9006 ("python-six" ,python-six)
9007 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9008 (home-page "http://webtest.pythonpaste.org/")
9009 (synopsis "Helper to test WSGI applications")
9010 (description "Webtest allows you to test your Python web applications
9011without starting an HTTP server. It supports anything that supports the
9012minimum of WSGI.")
f210e944 9013 (license license:expat)))
aa6313d6
CAW
9014
9015(define-public python2-webtest
f210e944 9016 (package-with-python2 python-webtest))
4cb122cd
CAW
9017
9018(define-public python-anyjson
9019 (package
9020 (name "python-anyjson")
9021 (version "0.3.3")
9022 (source
9023 (origin
9024 (method url-fetch)
9025 (uri (pypi-uri "anyjson" version))
9026 (sha256
9027 (base32
9028 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9029 (build-system python-build-system)
9030 (arguments
9031 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9032 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9033 ;; whatever) so this transformation needs to be done before the tests
9034 ;; can be run. Maybe we could add a build step to transform beforehand
9035 ;; but it could be annoying/difficult.
9036 ;; We can enable tests for the Python 2 version, though, and do below.
9037 #:tests? #f))
9038 (home-page "http://bitbucket.org/runeh/anyjson/")
9039 (synopsis
9040 "Wraps best available JSON implementation in a common interface")
9041 (description
9042 "Anyjson loads whichever is the fastest JSON module installed
9043and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 9044 (license license:bsd-3)
4cb122cd
CAW
9045 (properties `((python2-variant . ,(delay python2-anyjson))))))
9046
9047(define-public python2-anyjson
9048 (let ((anyjson (package-with-python2
9049 (strip-python2-variant python-anyjson))))
9050 (package
9051 (inherit anyjson)
9052 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9053 #:tests? #t
9054 ,@(package-arguments anyjson)))
00e10c6e 9055 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
9056
9057(define-public python-amqp
9058 (package
9059 (name "python-amqp")
9060 (version "1.4.9")
9061 (source
9062 (origin
9063 (method url-fetch)
9064 (uri (pypi-uri "amqp" version))
9065 (sha256
9066 (base32
9067 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9068 (build-system python-build-system)
9069 (native-inputs
9070 `(("python-nose" ,python-nose)
9071 ("python-mock" ,python-mock)))
9072 (home-page "http://github.com/celery/py-amqp")
9073 (synopsis
9074 "Low-level AMQP client for Python (fork of amqplib)")
9075 (description
9076 "This is a fork of amqplib which was originally written by Barry Pederson.
9077It is maintained by the Celery project, and used by kombu as a pure python
9078alternative when librabbitmq is not available.")
3f641af0 9079 (license license:lgpl2.1+)
8dfceab7
CAW
9080 (properties `((python2-variant . ,(delay python2-amqp))))))
9081
9082(define-public python2-amqp
9083 (let ((amqp (package-with-python2
9084 (strip-python2-variant python-amqp))))
9085 (package
9086 (inherit amqp)
9087 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9088 ;; unmaintained. Weirdly, does not do this on the python 3
9089 ;; version?
9090 #:tests? #f
00e10c6e 9091 ,@(package-arguments amqp))))))
7d387305
CAW
9092
9093(define-public python-kombu
9094 (package
9095 (name "python-kombu")
0cb59822 9096 (version "3.0.37")
7d387305
CAW
9097 (source
9098 (origin
9099 (method url-fetch)
9100 (uri (pypi-uri "kombu" version))
9101 (sha256
9102 (base32
0cb59822 9103 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9104 (build-system python-build-system)
9105 (native-inputs
9106 `(("python-mock" ,python-mock)
9107 ("python-nose" ,python-nose)))
9108 (propagated-inputs
9109 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9110 ("python-amqp" ,python-amqp)
9111 ("python-redis" ,python-redis)))
7d387305
CAW
9112 (home-page "http://kombu.readthedocs.org")
9113 (synopsis "Message passing library for Python")
9114 (description "The aim of Kombu is to make messaging in Python as easy as
9115possible by providing an idiomatic high-level interface for the AMQ protocol,
9116and also provide proven and tested solutions to common messaging problems.
9117AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9118message orientation, queuing, routing, reliability and security, for which the
9119RabbitMQ messaging server is the most popular implementation.")
3f641af0 9120 (license license:bsd-3)
7d387305
CAW
9121 (properties `((python2-variant . ,(delay python2-kombu))))))
9122
9123(define-public python2-kombu
9124 (let ((kombu (package-with-python2
9125 (strip-python2-variant python-kombu))))
9126 (package
9127 (inherit kombu)
328bb95d
HG
9128 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9129 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
9130
9131(define-public python-billiard
9132 (package
9133 (name "python-billiard")
a6bb9e44 9134 (version "3.3.0.23")
b6f0b9fb
CAW
9135 (source
9136 (origin
9137 (method url-fetch)
9138 (uri (pypi-uri "billiard" version))
9139 (sha256
9140 (base32
a6bb9e44 9141 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9142 (build-system python-build-system)
9143 (native-inputs
9144 `(("python-nose" ,python-nose)))
9145 (home-page "http://github.com/celery/billiard")
9146 (synopsis
9147 "Python multiprocessing fork with improvements and bugfixes")
9148 (description
9149 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9150multiprocessing package itself is a renamed and updated version of R Oudkerk's
9151pyprocessing package. This standalone variant is intended to be compatible with
9152Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9153 (license license:bsd-3)
b6f0b9fb
CAW
9154 (properties `((python2-variant . ,(delay python2-billiard))))))
9155
9156(define-public python2-billiard
9157 (let ((billiard (package-with-python2
9158 (strip-python2-variant python-billiard))))
9159 (package
9160 (inherit billiard)
00e10c6e 9161 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9162 ("python2-mock" ,python2-mock)
9163 ,@(package-native-inputs billiard))))))
22df6419
CAW
9164
9165(define-public python-celery
9166 (package
9167 (name "python-celery")
9ebe87fe 9168 (version "3.1.24")
22df6419
CAW
9169 (source
9170 (origin
9171 (method url-fetch)
9172 (uri (pypi-uri "celery" version))
9173 (sha256
9174 (base32
9ebe87fe 9175 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9176 (build-system python-build-system)
9ebe87fe
LF
9177 (arguments
9178 `(#:phases
9179 (modify-phases %standard-phases
9180 ;; These tests break with Python 3.5:
9181 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9182 (replace 'check
9183 (lambda _
9184 (zero?
9185 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9186 (native-inputs
9187 `(("python-nose" ,python-nose)))
f22efa01 9188 (propagated-inputs
22df6419
CAW
9189 `(("python-pytz" ,python-pytz)
9190 ("python-billiard" ,python-billiard)
9191 ("python-kombu" ,python-kombu)))
9192 (home-page "http://celeryproject.org")
9193 (synopsis "Distributed Task Queue")
9194 (description "Celery is an asynchronous task queue/job queue based on
9195distributed message passing. It is focused on real-time operation, but
9196supports scheduling as well. The execution units, called tasks, are executed
9197concurrently on a single or more worker servers using multiprocessing,
9198Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9199synchronously (wait until ready).")
3f641af0 9200 (license license:bsd-3)
22df6419
CAW
9201 (properties `((python2-variant . ,(delay python2-celery))))))
9202
9203(define-public python2-celery
9204 (let ((celery (package-with-python2
9205 (strip-python2-variant python-celery))))
9206 (package
9207 (inherit celery)
00e10c6e 9208 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
9209 ("python2-mock" ,python2-mock)
9210 ,@(package-native-inputs celery))))))
97e32948
CAW
9211
9212(define-public python-translitcodec
9213 (package
9214 (name "python-translitcodec")
9215 (version "0.4.0")
9216 (source
9217 (origin
9218 (method url-fetch)
9219 (uri (pypi-uri "translitcodec" version))
9220 (sha256
9221 (base32
9222 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9223 (build-system python-build-system)
9224 (arguments
9225 `(#:tests? #f)) ; no tests provided
9226 (home-page
9227 "https://github.com/claudep/translitcodec")
9228 (synopsis
9229 "Unicode to 8-bit charset transliteration codec")
9230 (description
9231 "This package contains codecs for transliterating ISO 10646 texts into
9232best-effort representations using smaller coded character sets (ASCII,
9233ISO 8859, etc.).")
f210e944 9234 (license license:expat)))
97e32948
CAW
9235
9236(define-public python2-translitcodec
f210e944 9237 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
9238
9239(define-public python-editor
9240 (package
9241 (name "python-editor")
9242 (version "0.5")
9243 (source
9244 (origin
9245 (method url-fetch)
9246 (uri (pypi-uri "python-editor" version))
9247 (sha256
9248 (base32
9249 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9250 (build-system python-build-system)
9251 (home-page
9252 "https://github.com/fmoo/python-editor")
9253 (synopsis
9254 "Programmatically open an editor, capture the result")
9255 (description
9256 "python-editor is a library that provides the editor module for
9257programmatically interfacing with your system's $EDITOR.")
f210e944 9258 (license license:asl2.0)))
0c3b90d4
CAW
9259
9260(define-public python2-editor
f210e944 9261 (package-with-python2 python-editor))
3276517c
LF
9262
9263(define-public python-sphinxcontrib-programoutput
9264 (package
9265 (name "python-sphinxcontrib-programoutput")
9266 (version "0.8")
9267 (source (origin
9268 (method url-fetch)
9269 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9270 (sha256
9271 (base32
9272 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9273 (build-system python-build-system)
9274 (propagated-inputs
a0a09859 9275 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
9276 (synopsis "Sphinx extension to include program output")
9277 (description "A Sphinx extension to literally insert the output of arbitrary
9278commands into documents, helping you to keep your command examples up to date.")
9279 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 9280 (license license:bsd-2)))
3276517c
LF
9281
9282(define-public python2-sphinxcontrib-programoutput
f210e944 9283 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
9284
9285(define-public python-sphinx-repoze-autointerface
9286 (package
9287 (name "python-sphinx-repoze-autointerface")
328ae341 9288 (version "0.8")
548d7165
LF
9289 (source (origin
9290 (method url-fetch)
9291 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9292 (sha256
9293 (base32
328ae341 9294 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9295 (build-system python-build-system)
9296 (propagated-inputs
47c7dc4a 9297 `(("python-sphinx" ,python-sphinx)
548d7165
LF
9298 ("python-zope-interface" ,python-zope-interface)))
9299 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9300 (description "This package defines an extension for the Sphinx documentation
9301system. The extension allows generation of API documentation by
9302introspection of @code{zope.interface} instances in code.")
9303 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9304 (license license:repoze)))
548d7165
LF
9305
9306(define-public python2-sphinx-repoze-autointerface
9307 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9308
9309(define-public python-psycopg2
9310 (package
9311 (name "python-psycopg2")
9312 (version "2.6.1")
9313 (source
9314 (origin
9315 (method url-fetch)
9316 (uri (pypi-uri "psycopg2" version))
9317 (sha256
9318 (base32
9319 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9320 (build-system python-build-system)
9321 (arguments
9322 ;; Tests would require a postgresql database "psycopg2_test"
9323 ;; and a running postgresql database management service.
9324 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9325 (inputs
9326 `(("postgresql" ,postgresql))) ; libpq
9327 (home-page "http://initd.org/psycopg/")
9328 (synopsis "Python PostgreSQL adapter")
9329 (description
9330 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 9331 (license license:lgpl3+)))
b31fbea5
DM
9332
9333(define-public python2-psycopg2
f210e944 9334 (package-with-python2 python-psycopg2))
eed1a61f
LF
9335
9336(define-public python-vobject
9337 (package
9338 (name "python-vobject")
9bed9b15 9339 (version "0.9.2")
eed1a61f
LF
9340 (source (origin
9341 (method url-fetch)
9342 (uri (pypi-uri "vobject" version))
9343 (sha256
9344 (base32
9bed9b15 9345 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 9346 (build-system python-build-system)
a9871b7b
LF
9347 (arguments
9348 '(;; The test suite relies on some non-portable Windows interfaces.
9349 #:tests? #f))
f22efa01 9350 (propagated-inputs
22d7360b 9351 `(("python-dateutil" ,python-dateutil)
eed1a61f
LF
9352 ("python-pyicu" ,python-pyicu)))
9353 (synopsis "Parse and generate vCard and vCalendar files")
9354 (description "Vobject is intended to be a full featured Python package for
9355parsing and generating vCard and vCalendar files. Currently, iCalendar files
9356are supported and well tested. vCard 3.0 files are supported, and all data
9357should be imported, but only a few components are understood in a sophisticated
9358way.")
9359 (home-page "http://eventable.github.io/vobject/")
f210e944 9360 (license license:asl2.0)))
eed1a61f
LF
9361
9362(define-public python2-vobject
f210e944 9363 (package-with-python2 python-vobject))
cedac813
LF
9364
9365(define-public python-munkres
9366 (package
9367 (name "python-munkres")
38e81a2c 9368 (version "1.0.8")
cedac813
LF
9369 (source (origin
9370 (method url-fetch)
9371 (uri (pypi-uri "munkres" version))
9372 (sha256
9373 (base32
38e81a2c 9374 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
9375 (build-system python-build-system)
9376 (arguments
9377 '(#:tests? #f)) ; no test suite
9378 (home-page "http://software.clapper.org/munkres/")
9379 (synopsis "Implementation of the Munkres algorithm")
9380 (description "The Munkres module provides an implementation of the Munkres
9381algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9382useful for solving the Assignment Problem.")
3f641af0 9383 (license license:bsd-3)))
cedac813
LF
9384
9385(define-public python2-munkres
9386 (package-with-python2 python-munkres))
f3b3d78f
LF
9387
9388(define-public python-flask
9389 (package
9390 (name "python-flask")
c6c80104 9391 (version "0.11.1")
f3b3d78f
LF
9392 (source (origin
9393 (method url-fetch)
9394 (uri (pypi-uri "Flask" version))
9395 (sha256
9396 (base32
c6c80104 9397 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
9398 (build-system python-build-system)
9399 (propagated-inputs
9400 `(("python-itsdangerous" ,python-itsdangerous)
9401 ("python-jinja2" ,python-jinja2)
8f35c030 9402 ("python-click" ,python-click)
f3b3d78f
LF
9403 ("python-werkzeug" ,python-werkzeug)))
9404 (home-page "https://github.com/mitsuhiko/flask/")
9405 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9406 (description "Flask is a micro web framework based on the Werkzeug toolkit
9407and Jinja2 template engine. It is called a micro framework because it does not
9408presume or force a developer to use a particular tool or library.")
f210e944 9409 (license license:bsd-3)))
f3b3d78f
LF
9410
9411(define-public python2-flask
f210e944 9412 (package-with-python2 python-flask))
603d665b
LF
9413
9414(define-public python-cookies
9415 (package
9416 (name "python-cookies")
9417 (version "2.2.1")
9418 (source (origin
9419 (method url-fetch)
9420 (uri (pypi-uri "cookies" version))
9421 (sha256
9422 (base32
9423 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9424 (build-system python-build-system)
9425 (arguments
9426 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9427 #:tests? #f))
9428 (native-inputs
9429 `(("python-pytest" ,python2-pytest)))
9430 (synopsis "HTTP cookie parser and renderer")
9431 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9432Python.")
9433 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 9434 (license license:expat)))
603d665b
LF
9435
9436(define-public python2-cookies
f210e944 9437 (package-with-python2 python-cookies))
0efde7d6
LF
9438
9439(define-public python-responses
9440 (package
9441 (name "python-responses")
9442 (version "0.5.1")
9443 (source (origin
9444 (method url-fetch)
9445 (uri (pypi-uri "responses" version))
9446 (sha256
9447 (base32
9448 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9449 (build-system python-build-system)
9450 (arguments
9451 `(;; Test suite is not distributed:
9452 ;; https://github.com/getsentry/responses/issues/38
9453 #:tests? #f))
9454 (native-inputs
d8ea5f2f 9455 `(("python-mock" ,python-mock)))
0efde7d6
LF
9456 (propagated-inputs
9457 `(("python-requests" ,python-requests)
d8ea5f2f 9458 ("python-cookies" ,python-cookies)
0efde7d6
LF
9459 ("python-six" ,python-six)))
9460 (home-page "https://github.com/getsentry/responses")
9461 (synopsis "Utility for mocking out the `requests` Python library")
9462 (description "A utility library for mocking out the `requests` Python
9463library.")
f210e944 9464 (license license:asl2.0)))
0efde7d6
LF
9465
9466(define-public python2-responses
f210e944 9467 (package-with-python2 python-responses))
76b94885 9468
b7afd018
RW
9469(define-public python-whoosh
9470 (package
9471 (name "python-whoosh")
9472 (version "2.7.4")
9473 (source
9474 (origin
9475 (method url-fetch)
9476 (uri (pypi-uri "Whoosh" version))
9477 (sha256
9478 (base32
9479 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9480 (build-system python-build-system)
9481 (native-inputs
f3b98f4f 9482 `(("python-pytest" ,python-pytest)))
b7afd018
RW
9483 (home-page "http://bitbucket.org/mchaput/whoosh")
9484 (synopsis "Full text indexing, search, and spell checking library")
9485 (description
9486 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9487checking library.")
9488 (license license:bsd-2)))
9489
9490(define-public python2-whoosh
9491 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9492 (package (inherit whoosh)
9493 (propagated-inputs
9494 `(("python2-backport-ssl-match-hostname"
9495 ,python2-backport-ssl-match-hostname)
9496 ,@(package-propagated-inputs whoosh))))))
9497
76b94885
LF
9498(define-public python-pathlib
9499 (package
9500 (name "python-pathlib")
9501 (version "1.0.1")
9502 (source (origin
9503 (method url-fetch)
9504 (uri (pypi-uri "pathlib" version))
9505 (sha256
9506 (base32
9507 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9508 (build-system python-build-system)
92a312dc
RW
9509 ;; The tests depend on the internal "test" module, which does not provide
9510 ;; a stable interface.
9511 (arguments `(#:tests? #f))
76b94885 9512 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9513 (synopsis "Object-oriented file system paths")
9514 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9515It offers the following advantages over using string objects:
9516
9517@enumerate
9518@item No more cumbersome use of os and os.path functions. Everything can
9519be done easily through operators, attribute accesses, and method calls.
9520@item Embodies the semantics of different path types. For example,
9521comparing Windows paths ignores casing.
9522@item Well-defined semantics, eliminating any inconsistencies or
9523ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9524@end enumerate
9525
9526Note: In Python 3.4, pathlib is now part of the standard library. For other
9527Python versions please consider python-pathlib2 instead, which tracks the
9528standard library module. This module (python-pathlib) isn't maintained
9529anymore.")
76b94885
LF
9530 (license license:expat)))
9531
9532(define-public python2-pathlib
9533 (package-with-python2 python-pathlib))
25a7db0a 9534
b7703c81
HG
9535(define-public python2-pathlib2
9536 (package
9537 (name "python2-pathlib2")
9538 (version "2.1.0")
9539 (source (origin
9540 (method url-fetch)
9541 (uri (pypi-uri "pathlib2" version))
9542 (sha256
9543 (base32
9544 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9545 (build-system python-build-system)
49a531f5
HG
9546 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9547 ;; version is 3.4 which already includes this package as part of the
9548 ;; standard library.
b7703c81
HG
9549 (arguments
9550 `(#:python ,python-2))
9551 (native-inputs
f3b98f4f 9552 `(("python2-six" ,python2-six)))
b7703c81
HG
9553 (home-page "http://pypi.python.org/pypi/pathlib2/")
9554 (synopsis "Object-oriented file system paths - backport of standard
9555pathlib module")
9556 (description "The goal of pathlib2 is to provide a backport of standard
9557pathlib module which tracks the standard library module, so all the newest
9558features of the standard pathlib can be used also on older Python versions.
9559
9560Pathlib offers a set of classes to handle file system paths. It offers the
9561following advantages over using string objects:
9562
9563@enumerate
9564@item No more cumbersome use of os and os.path functions. Everything can
9565be done easily through operators, attribute accesses, and method calls.
9566@item Embodies the semantics of different path types. For example,
9567comparing Windows paths ignores casing.
9568@item Well-defined semantics, eliminating any inconsistencies or
9569ambiguities (forward vs. backward slashes, etc.).
9570@end enumerate")
9571 (license license:expat)))
9572
25a7db0a
LF
9573(define-public python-jellyfish
9574 (package
9575 (name "python-jellyfish")
8c4964dd 9576 (version "0.5.6")
25a7db0a
LF
9577 (source (origin
9578 (method url-fetch)
9579 (uri (pypi-uri "jellyfish" version))
9580 (sha256
9581 (base32
8c4964dd 9582 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
9583 (build-system python-build-system)
9584 (native-inputs
9585 `(("python-pytest" ,python-pytest)))
9586 (home-page "https://github.com/jamesturk/jellyfish")
9587 (synopsis "Approximate and phonetic matching of strings")
9588 (description "Jellyfish uses a variety of string comparison and phonetic
9589encoding algorithms to do fuzzy string matching.")
3f641af0 9590 (license license:bsd-2)
25a7db0a
LF
9591 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9592
9593(define-public python2-jellyfish
9594 (let ((jellyfish (package-with-python2
9595 (strip-python2-variant python-jellyfish))))
9596 (package (inherit jellyfish)
00e10c6e 9597 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 9598 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9599
9600(define-public python2-unicodecsv
9601 (package
9602 (name "python2-unicodecsv")
9603 (version "0.14.1")
9604 (source (origin
9605 (method url-fetch)
9606 ;; The test suite is not included in the PyPi release.
9607 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9608 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9609 "archive/" version ".tar.gz"))
9610 (file-name (string-append name "-" version ".tar.gz"))
9611 (sha256
9612 (base32
9613 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9614 (build-system python-build-system)
9615 (arguments
9616 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9617 #:python ,python-2))
9618 (native-inputs
f3b98f4f 9619 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
9620 (home-page "https://github.com/jdunck/python-unicodecsv")
9621 (synopsis "Unicode CSV module for Python 2")
9622 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9623module, adding support for Unicode strings.")
3f641af0 9624 (license license:bsd-2)))
064503aa
LF
9625
9626(define-public python-rarfile
9627 (package
9628 (name "python-rarfile")
67824447 9629 (version "2.8")
064503aa
LF
9630 (source (origin
9631 (method url-fetch)
9632 (uri (pypi-uri "rarfile" version))
9633 (sha256
9634 (base32
67824447 9635 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
9636 (build-system python-build-system)
9637 (arguments
9638 '(#:phases
9639 (modify-phases %standard-phases
9640 (replace 'check
9641 ;; Many tests fail, but the installation proceeds.
9642 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9643 (native-inputs
9644 `(("which" ,which))) ; required for tests
9645 (propagated-inputs
9646 `(("libarchive" ,libarchive)))
9647 (home-page "https://github.com/markokr/rarfile")
9648 (synopsis "RAR archive reader for Python")
9649 (description "This is Python module for RAR archive reading. The interface
9650is made as zipfile like as possible.")
3f641af0 9651 (license license:isc)))
064503aa
LF
9652
9653(define-public python2-rarfile
9654 (package-with-python2 python-rarfile))
daeeea71
CM
9655
9656(define-public python-magic
9657 (package
9658 (name "python-magic")
9659 (version "0.4.3")
9660 (source
9661 (origin
9662 (method url-fetch)
9663 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9664 version ".tar.gz"))
9665 (sha256
9666 (base32
9667 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9668 (file-name (string-append name "-" version "-checkout"))))
9669 (build-system python-build-system)
9670 (arguments
9671 ;; The tests are unreliable, so don't run them. The tests fail
9672 ;; under Python3 because they were written for Python2 and
9673 ;; contain import statements that do not work in Python3. One of
9674 ;; the tests fails under Python2 because its assertions are
9675 ;; overly stringent; it relies on comparing output strings which
9676 ;; are brittle and can change depending on the version of
9677 ;; libmagic being used and the system on which the test is
9678 ;; running. In my case, under GuixSD 0.10.0, only one test
9679 ;; failed, and it seems to have failed only because the version
9680 ;; of libmagic that is packaged in Guix outputs a slightly
9681 ;; different (but not wrong) string than the one that the test
9682 ;; expected.
9683 '(#:tests? #f
9684 #:phases (modify-phases %standard-phases
9685 ;; Replace a specific method call with a hard-coded
9686 ;; path to the necessary libmagic.so file in the
9687 ;; store. If we don't do this, then the method call
9688 ;; will fail to find the libmagic.so file, which in
9689 ;; turn will cause any application using
9690 ;; python-magic to fail.
9691 (add-before 'build 'hard-code-path-to-libmagic
9692 (lambda* (#:key inputs #:allow-other-keys)
9693 (let ((file (assoc-ref inputs "file")))
9694 (substitute* "magic.py"
9695 (("ctypes.util.find_library\\('magic'\\)")
9696 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9697 #t)))
9698 (add-before 'install 'disable-egg-compression
9699 (lambda _
9700 (let ((port (open-file "setup.cfg" "a")))
9701 (display "\n[easy_install]\nzip_ok = 0\n"
9702 port)
9703 (close-port port)
9704 #t))))))
daeeea71
CM
9705 (inputs
9706 ;; python-magic needs to be able to find libmagic.so.
9707 `(("file" ,file)))
9708 (home-page "https://github.com/ahupp/python-magic")
9709 (synopsis "File type identification using libmagic")
9710 (description
9711 "This module uses ctypes to access the libmagic file type
9712identification library. It makes use of the local magic database and
9713supports both textual and MIME-type output. Note that this module and
9714the python-file module both provide a \"magic.py\" file; these two
9715modules, which are different and were developed separately, both serve
9716the same purpose: to provide Python bindings for libmagic.")
9717 (license license:expat)))
9718
9719(define-public python2-magic
9720 (package-with-python2 python-magic))
12af303f
CM
9721
9722(define-public python2-s3cmd
9723 (package
9724 (name "python2-s3cmd")
9725 (version "1.6.1")
9726 (source
9727 (origin
9728 (method url-fetch)
de67e922 9729 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9730 "s3cmd-" version ".tar.gz"))
9731 (sha256
9732 (base32
9733 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9734 (build-system python-build-system)
9735 (arguments
9736 ;; s3cmd is written for python2 only and contains no tests.
9737 `(#:python ,python-2
9738 #:tests? #f))
f22efa01 9739 (propagated-inputs
12af303f
CM
9740 `(("python2-dateutil" ,python2-dateutil)
9741 ;; The python-file package also provides a magic.py module.
9742 ;; This is an unfortunate state of affairs; however, s3cmd
9743 ;; fails to install if it cannot find specifically the
9744 ;; python-magic package. Thus we include it, instead of using
9745 ;; python-file. Ironically, s3cmd sometimes works better
9746 ;; without libmagic bindings at all:
9747 ;; https://github.com/s3tools/s3cmd/issues/198
9748 ("python2-magic" ,python2-magic)))
9749 (home-page "http://s3tools.org/s3cmd")
9750 (synopsis "Command line tool for S3-compatible storage services")
9751 (description
9752 "S3cmd is a command line tool for uploading, retrieving and managing data
9753in storage services that are compatible with the Amazon Simple Storage
9754Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9755GnuPG encryption, and more. It also supports management of Amazon's
9756CloudFront content delivery network.")
3f641af0 9757 (license license:gpl2+)))
4323a5f0
AE
9758
9759(define-public python-pkgconfig
9760 (package
9761 (name "python-pkgconfig")
9762 (version "1.1.0")
9763 (source
9764 (origin
9765 (method url-fetch)
9766 (uri (pypi-uri "pkgconfig" version))
9767 (sha256
9768 (base32
9769 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9770 (build-system python-build-system)
9771 (native-inputs
f3b98f4f 9772 `(("python-nose" ,python-nose)))
4323a5f0
AE
9773 (inputs
9774 `(("pkg-config" ,pkg-config)))
9775 (arguments
9776 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9777 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9778 #:tests? #f
4323a5f0
AE
9779 ;; Hard-code the path to pkg-config.
9780 #:phases
9781 (modify-phases %standard-phases
9782 (add-before
9783 'build 'patch
9784 (lambda _
9785 (substitute* "pkgconfig/pkgconfig.py"
9786 (("cmd = 'pkg-config")
9787 (string-append "cmd = '" (which "pkg-config"))))
9788 #t)))))
9789 (home-page "http://github.com/matze/pkgconfig")
9790 (synopsis "Python interface for pkg-config")
9791 (description "This module provides a Python interface to pkg-config. It
9792can be used to find all pkg-config packages, check if a package exists,
9793check if a package meets certain version requirements, query CFLAGS and
9794LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9795 (license license:expat)))
4323a5f0
AE
9796
9797(define-public python2-pkgconfig
9798 (package-with-python2 python-pkgconfig))
9799
2e697322
BW
9800(define-public python-bz2file
9801 (package
9802 (name "python-bz2file")
9803 (version "0.98")
9804 (source
9805 (origin
9806 (method url-fetch)
9807 (uri (pypi-uri "bz2file" version))
9808 (sha256
9809 (base32
9810 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9811 (build-system python-build-system)
9812 (arguments
124df723 9813 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9814 (home-page "https://github.com/nvawda/bz2file")
9815 (synopsis "Read and write bzip2-compressed files")
9816 (description
9817 "Bz2file is a Python library for reading and writing bzip2-compressed
9818files. It contains a drop-in replacement for the I/O interface in the
9819standard library's @code{bz2} module, including features from the latest
9820development version of CPython that are not available in older releases.")
3f641af0 9821 (license license:asl2.0)
2e697322
BW
9822 (properties `((python2-variant . ,(delay python2-bz2file))))))
9823
9824(define-public python2-bz2file
9825 (let ((base (package-with-python2
9826 (strip-python2-variant python-bz2file))))
9827 (package
9828 (inherit base)
124df723 9829 (arguments
752bb447
BW
9830 `(#:python ,python-2
9831 #:phases
124df723
BW
9832 (modify-phases %standard-phases
9833 ;; 'python setup.py test' does not work as of 0.98.
9834 ;; There is only the one test file, so we run it directly.
9835 (replace 'check
9836 (lambda _ (zero? (system* "python"
9837 "test_bz2file.py"))))))))))
2e697322 9838
da4ac1aa
BW
9839(define-public python-future
9840 (package
9841 (name "python-future")
9842 (version "0.15.2")
9843 (source
9844 (origin
9845 (method url-fetch)
9846 (uri (pypi-uri "future" version))
9847 (sha256
9848 (base32
9849 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9850 (build-system python-build-system)
9851 ;; Many tests connect to the network or are otherwise flawed.
9852 ;; https://github.com/PythonCharmers/python-future/issues/210
9853 (arguments
9854 `(#:tests? #f))
9855 (home-page "http://python-future.org")
9856 (synopsis "Single-source support for Python 3 and 2")
9857 (description
9858 "@code{python-future} is the missing compatibility layer between Python 2 and
9859Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9860to support both Python 2 and Python 3 with minimal overhead.")
f210e944 9861 (license license:expat)))
da4ac1aa
BW
9862
9863(define-public python2-future
f210e944 9864 (package-with-python2 python-future))
da4ac1aa 9865
8e451885
AE
9866(define-public python-cysignals
9867 (package
9868 (name "python-cysignals")
9869 (version "1.1.0")
9870 (source
9871 (origin
9872 (method url-fetch)
9873 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9874 (sha256
9875 (base32
9876 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9877 (build-system python-build-system)
9878 (native-inputs
9879 `(("python-cython" ,python-cython)
8e451885
AE
9880 ("python-sphinx" ,python-sphinx)))
9881 (inputs
9882 `(("pari-gp" ,pari-gp)))
9883 (arguments
9884 `(#:modules ((guix build python-build-system)
9885 ((guix build gnu-build-system) #:prefix gnu:)
9886 (guix build utils))
9887 ;; FIXME: Tests are executed after installation and currently fail
9888 ;; when not installing into standard locations; the author is working
9889 ;; on a fix.
9890 #:tests? #f
9891 #:phases
9892 (modify-phases %standard-phases
9893 (add-before
9894 'build 'configure
9895 (assoc-ref gnu:%standard-phases 'configure)))))
9896 (home-page
9897 "https://github.com/sagemath/cysignals")
9898 (synopsis
9899 "Handling of interrupts and signals for Cython")
9900 (description
9901 "The cysignals package provides mechanisms to handle interrupts (and
9902other signals and errors) in Cython code, using two related approaches,
9903for mixed Cython/Python code or external C libraries and pure Cython code,
9904respectively.")
3f641af0 9905 (license license:lgpl3+)))
8e451885
AE
9906
9907(define-public python2-cysignals
9908 (package-with-python2 python-cysignals))
9909
63bcec71
DM
9910(define-public python2-shedskin
9911 (package
9912 (name "python2-shedskin")
9913 (version "0.9.4")
9914 (source
9915 (origin
9916 (method url-fetch)
9917 (uri (string-append "https://github.com/shedskin/shedskin/"
9918 "releases/download/v" version
9919 "/shedskin-" version ".tgz"))
9920 (sha256
9921 (base32
9922 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9923 (build-system python-build-system)
9924 (arguments
9925 `(#:python ,python-2
9926 #:phases (modify-phases %standard-phases
9927 (add-after 'unpack 'fix-resulting-include-libs
9928 (lambda* (#:key inputs #:allow-other-keys)
9929 (let ((libgc (assoc-ref inputs "libgc"))
9930 (pcre (assoc-ref inputs "pcre")))
9931 (substitute* "shedskin/makefile.py"
9932 (("variable == 'CCFLAGS':[ ]*")
9933 (string-append "variable == 'CCFLAGS':\n"
9934 " line += ' -I " pcre "/include"
9935 " -I " libgc "/include'"))
9936 (("variable == 'LFLAGS':[ ]*")
9937 (string-append "variable == 'LFLAGS':\n"
9938 " line += ' -L" pcre "/lib"
9939 " -L " libgc "/lib'")))
9940 #t))))))
63bcec71
DM
9941 (inputs `(("pcre" ,pcre)
9942 ("libgc" ,libgc)))
9943 (home-page "https://shedskin.github.io/")
9944 (synopsis "Experimental Python-2 to C++ Compiler")
9945 (description (string-append "This is an experimental compiler for a subset of
9946Python. It generates C++ code and a Makefile."))
3f641af0 9947 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
9948
9949(define-public python2-rope
9950 (package
9951 (name "python2-rope")
9952 (version "0.10.3")
9953 (source
9954 (origin
9955 (method url-fetch)
9956 (uri (pypi-uri "rope" version))
9957 (sha256
9958 (base32
9959 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9960 (arguments
9961 ;; Rope is currently python-2 only.
9962 ;; https://github.com/python-rope/rope/issues/57
9963 `(#:python ,python-2))
9964 (build-system python-build-system)
9965 (native-inputs
f3b98f4f 9966 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
9967 (home-page "https://github.com/python-rope/rope")
9968 (synopsis "Refactoring library for Python")
9969 (description "Rope is a refactoring library for Python. It facilitates
9970the renaming, moving and extracting of attributes, functions, modules, fields
9971and parameters in Python 2 source code. These refactorings can also be applied
9972to occurences in strings and comments.")
3f641af0 9973 (license license:gpl2)))
6ba8ca17
9974
9975(define-public python-py3status
9976 (package
9977 (name "python-py3status")
d2262d70 9978 (version "3.1")
6ba8ca17
9979 (source
9980 (origin
9981 (method url-fetch)
9982 (uri (pypi-uri "py3status" version))
9983 (sha256
9984 (base32
d2262d70 9985 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 9986 (build-system python-build-system)
8653c1d5
MB
9987 (arguments
9988 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
6ba8ca17
9989 (home-page "https://github.com/ultrabug/py3status")
9990 (synopsis "Extensible i3status wrapper written in Python")
9991 (description "py3status is an i3status wrapper which extends i3status
9992functionality in a modular way, allowing you to extend your panel with your
9993own code, responding to click events and updating clock every second.")
3f641af0 9994 (license license:bsd-3)))
b8fdbca3
HG
9995
9996(define-public python-tblib
9997 (package
9998 (name "python-tblib")
9999 (version "1.3.0")
10000 (source (origin
10001 (method url-fetch)
10002 (uri (pypi-uri "tblib" version))
10003 (sha256 (base32
10004 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10005 (build-system python-build-system)
10006 (arguments
10007 `(#:phases
10008 (modify-phases %standard-phases
10009 (replace 'check
10010 (lambda _
10011 ;; Upstream runs tests after installation and the package itself
10012 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10013 ;; found.
10014 (setenv "PYTHONPATH"
10015 (string-append (getcwd) "/build/lib:"
10016 (getenv "PYTHONPATH")))
10017 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10018 (native-inputs
10019 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
10020 ("python-six" ,python-six)))
10021 (home-page "https://github.com/ionelmc/python-tblib")
10022 (synopsis "Traceback serialization library")
10023 (description
10024 "Traceback serialization allows you to:
10025
10026@enumerate
10027@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10028different processes. This allows better error handling when running code over
10029multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10030
10031@item Parse traceback strings and raise with the parsed tracebacks.
10032@end itemize")
3f641af0 10033 (license license:bsd-3)))
b8fdbca3
HG
10034
10035(define-public python2-tblib
10036 (package-with-python2 python-tblib))
1a024de4
HG
10037
10038(define-public python-sqlparse
10039 (package
10040 (name "python-sqlparse")
10041 (version "0.1.19")
10042 (source (origin
10043 (method url-fetch)
10044 (uri (pypi-uri "sqlparse" version))
10045 (sha256
10046 (base32
10047 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10048 (build-system python-build-system)
10049 (arguments
10050 `(#:phases
10051 (modify-phases %standard-phases
10052 (replace 'check
10053 (lambda* _
10054 ;; setup.py-integrated 2to3 only affects the build files, but
10055 ;; py.test is using the source files. So we need to convert them
10056 ;; manually.
10057 (when (zero? (system* "python3"))
10058 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10059 (zero? (system* "py.test")))))))
10060 (native-inputs
f3b98f4f 10061 `(("python-pytest" ,python-pytest)))
1a024de4
HG
10062 (home-page "https://github.com/andialbrecht/sqlparse")
10063 (synopsis "Non-validating SQL parser")
10064 (description "Sqlparse is a non-validating SQL parser for Python. It
10065provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10066 (license license:bsd-3)))
1a024de4
HG
10067
10068(define-public python2-sqlparse
10069 (package-with-python2 python-sqlparse))
68b9d242
SB
10070
10071(define-public python-greenlet
10072 (package
10073 (name "python-greenlet")
10074 (version "0.4.9")
10075 (source (origin
10076 (method url-fetch)
10077 (uri (pypi-uri "greenlet" version))
10078 (sha256
10079 (base32
10080 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
10081 (build-system python-build-system)
68b9d242
SB
10082 (home-page "https://greenlet.readthedocs.io/")
10083 (synopsis "Lightweight in-process concurrent programming")
10084 (description
10085 "Greenlet package is a spin-off of Stackless, a version of CPython
10086that supports micro-threads called \"tasklets\". Tasklets run
10087pseudo-concurrently (typically in a single or a few OS-level threads) and
10088are synchronized with data exchanges on \"channels\".")
3f641af0 10089 (license (list license:psfl license:expat))))
68b9d242
SB
10090
10091(define-public python2-greenlet
10092 (package-with-python2 python-greenlet))
d79a343b
SB
10093
10094(define-public python-gevent
10095 (package
10096 (name "python-gevent")
10097 (version "1.1.1")
10098 (source (origin
10099 (method url-fetch)
10100 (uri (pypi-uri "gevent" version))
10101 (sha256
10102 (base32
10103 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10104 (modules '((guix build utils)))
10105 (snippet
10106 '(begin
10107 ;; unbunding libev and c-ares
10108 (for-each delete-file-recursively '("libev" "c-ares"))
10109 ;; fixing testsuite
10110 (call-with-output-file "greentest/__init__.py" noop)
10111 (substitute* "greentest/testrunner.py"
10112 (("import util") "from . import util")
10113 (("from util import log") "from .util import log"))))))
10114 (build-system python-build-system)
10115 (propagated-inputs
10116 `(("python-greenlet" ,python-greenlet)))
10117 (native-inputs
f3b98f4f 10118 `(("python-six" ,python-six)))
d79a343b
SB
10119 (inputs
10120 `(("c-ares" ,c-ares)
10121 ("libev" ,libev)))
10122 (home-page "http://www.gevent.org/")
10123 (synopsis "Coroutine-based network library")
10124 (description
10125 "gevent is a coroutine-based Python networking library that uses greenlet
10126to provide a high-level synchronous API on top of the libev event loop.")
10127 (license license:expat)))
10128
10129(define-public python2-gevent
10130 (package-with-python2 python-gevent))
da3aeeb6
SB
10131
10132(define-public python-twisted
10133 (package
10134 (name "python-twisted")
10135 (version "16.2.0")
10136 (source (origin
10137 (method url-fetch)
8ea8e8d3 10138 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
10139 (sha256
10140 (base32
10141 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10142 (build-system python-build-system)
a960e73f
MB
10143 (arguments
10144 '(#:tests? #f)) ; FIXME: Some tests are failing.
10145 ;; #:phases
10146 ;; (modify-phases %standard-phases
10147 ;; (replace 'check
10148 ;; (lambda _
10149 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170
SB
10150 (propagated-inputs
10151 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
10152 (home-page "https://twistedmatrix.com/")
10153 (synopsis "Asynchronous networking framework written in Python")
10154 (description
10155 "Twisted is an extensible framework for Python programming, with special
10156focus on event-based network programming and multiprotocol integration.")
10157 (license license:expat)))
10158
10159(define-public python2-twisted
10160 (package-with-python2 python-twisted))
d0b6fed6 10161
4d3fa5a4
EF
10162(define-public python-pika
10163 (package
10164 (name "python-pika")
10165 (version "0.10.0")
10166 (source
10167 (origin
10168 (method url-fetch)
10169 (uri (pypi-uri "pika" version))
10170 (sha256
10171 (base32
10172 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10173 (build-system python-build-system)
10174 (native-inputs
269d9172
LF
10175 `(("python-pyev" ,python-pyev)
10176 ("python-tornado" ,python-tornado)
10177 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
10178 (home-page "https://pika.readthedocs.org")
10179 (synopsis "Pure Python AMQP Client Library")
10180 (description
10181 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10182Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10183network support library.")
10184 (license license:bsd-3)))
10185
10186(define-public python2-pika
10187 (package-with-python2 python-pika))
10188
d0b6fed6
DM
10189(define-public python-ply
10190 (package
10191 (name "python-ply")
10192 (version "3.8")
10193 (source
10194 (origin
10195 (method url-fetch)
10196 (uri (string-append
10197 "https://pypi.python.org/packages/"
10198 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
10199 "/ply-" version ".tar.gz"))
10200 (sha256
10201 (base32
10202 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
10203 (build-system python-build-system)
10204 (home-page "http://www.dabeaz.com/ply/")
10205 (synopsis "Python Lex & Yacc")
10206 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10207It uses LR parsing and does extensive error checking.")
f210e944 10208 (license license:bsd-3)))
d0b6fed6
DM
10209
10210(define-public python2-ply
f210e944 10211 (package-with-python2 python-ply))
d951bd54
SB
10212
10213(define-public python-tabulate
10214 (package
10215 (name "python-tabulate")
10216 (version "0.7.5")
10217 (source (origin
10218 (method url-fetch)
10219 (uri (pypi-uri "tabulate" version))
10220 (sha256
10221 (base32
10222 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10223 ;; Fix tests
10224 (modules '((guix build utils)))
10225 (snippet '(substitute* '("test/test_cli.py"
10226 "test/test_input.py"
10227 "test/test_output.py"
10228 "test/test_regression.py")
10229 (("from common") "from nose.tools")))))
10230 (build-system python-build-system)
10231 (native-inputs
f3b98f4f 10232 `(;; For testing
d951bd54
SB
10233 ("python-nose" ,python-nose)))
10234 (home-page "https://bitbucket.org/astanin/python-tabulate")
10235 (synopsis "Pretty-print tabular data")
10236 (description
10237 "Tabulate is a library and command-line utility to pretty-print tabular
10238data in Python.")
10239 (license license:expat)))
10240
10241(define-public python2-tabulate
10242 (package-with-python2 python-tabulate))
1c4c8a33
SB
10243
10244(define-public python-kazoo
10245 (package
10246 (name "python-kazoo")
10247 (version "2.2.1")
10248 (source
10249 (origin
10250 (method url-fetch)
10251 (uri (pypi-uri "kazoo" version))
10252 (sha256
10253 (base32
10254 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10255 (build-system python-build-system)
10256 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
10257 (propagated-inputs
10258 `(("python-six" ,python-six)))
1c4c8a33
SB
10259 (home-page "https://kazoo.readthedocs.org")
10260 (synopsis "High-level Zookeeper client library")
10261 (description
10262 "Kazoo is a Python client library for the Apache Zookeeper distributed
10263application service. It is designed to be easy to use and to avoid common
10264programming errors.")
3f641af0 10265 (license license:asl2.0)))
1c4c8a33
SB
10266
10267(define-public python2-kazoo
10268 (package-with-python2 python-kazoo))
45dda35e
SB
10269
10270(define-public python-pykafka
10271 (package
10272 (name "python-pykafka")
10273 (version "2.4.0")
10274 (source (origin
10275 (method url-fetch)
c6bccf71
EF
10276 (uri (string-append
10277 "https://pypi.python.org/packages/8b/3e/"
10278 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10279 "pykafka-" version ".tar.gz"))
45dda35e
SB
10280 (sha256
10281 (base32
10282 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10283 (build-system python-build-system)
10284 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 10285 (propagated-inputs
45dda35e
SB
10286 `(("python-gevent" ,python-gevent)
10287 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10288 ("python-tabulate" ,python-tabulate)))
10289 (inputs
10290 `(("librdkafka" ,librdkafka)))
10291 (home-page "https://pykafka.readthedocs.io/")
10292 (synopsis "Apache Kafka client for Python")
10293 (description
10294 "PyKafka is a client for the Apache Kafka distributed messaging system.
10295It includes Python implementations of Kafka producers and consumers, which
10296are optionally backed by a C extension built on librdkafka.")
3f641af0 10297 (license license:asl2.0)))
45dda35e
SB
10298
10299(define-public python2-pykafka
10300 (package-with-python2 python-pykafka))
a44fd439
DM
10301
10302(define-public python-wcwidth
10303 (package
10304 (name "python-wcwidth")
10305 (version "0.1.6")
10306 (source
10307 (origin
10308 (method url-fetch)
10309 (uri (string-append
10310 "https://pypi.python.org/packages/"
10311 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10312 "wcwidth-" version ".tar.gz"))
10313 (sha256
10314 (base32
10315 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10316 (build-system python-build-system)
10317 (home-page "https://github.com/jquast/wcwidth")
66e07664 10318 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10319 (description "Wcwidth measures the number of terminal column cells of
10320wide-character codes. It is useful for those implementing a terminal emulator,
10321or programs that carefully produce output to be interpreted by one. It is a
10322Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10323specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 10324 (license license:expat)))
a44fd439
DM
10325
10326(define-public python2-wcwidth
f210e944 10327 (package-with-python2 python-wcwidth))
0de78c95
DP
10328
10329(define-public python2-jsonrpclib
10330 (package
10331 (name "python2-jsonrpclib")
10332 (version "0.1.7")
10333 (source (origin
10334 (method url-fetch)
10335 (uri (string-append
10336 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10337 "jsonrpclib-" version ".tar.gz"))
10338 (sha256
10339 (base32
10340 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10341 (build-system python-build-system)
0de78c95
DP
10342 (arguments
10343 `(#:tests? #f
10344 #:python ,python-2))
10345 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10346 (synopsis "Implementation of JSON-RPC specification for Python")
10347 (description
10348 "This library is an implementation of the JSON-RPC specification.
10349It supports both the original 1.0 specification, as well as the
10350new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10351etc.")
3f641af0 10352 (license license:asl2.0)))
9250b0f3
SB
10353
10354(define-public python-chai
10355 (package
10356 (name "python-chai")
10357 (version "1.1.1")
10358 (source (origin
10359 (method url-fetch)
10360 (uri (pypi-uri "chai" version))
10361 (sha256
10362 (base32
10363 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10364 (build-system python-build-system)
9250b0f3
SB
10365 (home-page "https://github.com/agoragames/chai")
10366 (synopsis "Mocking framework for Python")
10367 (description
10368 "Chai provides an api for mocking, stubbing and spying your python
10369objects, patterned after the Mocha library for Ruby.")
3f641af0 10370 (license license:bsd-3)))
9250b0f3
SB
10371
10372(define-public python2-chai
10373 (package-with-python2 python-chai))
10374
ae43baa8
SB
10375(define-public python-arrow
10376 (package
10377 (name "python-arrow")
10378 (version "0.8.0")
10379 (source (origin
10380 (method url-fetch)
10381 (uri (pypi-uri "arrow" version))
10382 (sha256
10383 (base32
10384 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10385 (build-system python-build-system)
10386 (native-inputs
f3b98f4f 10387 `(;; For testing
ae43baa8
SB
10388 ("python-chai" ,python-chai)
10389 ("python-simplejson" ,python-simplejson)))
36aed736 10390 (propagated-inputs
22d7360b 10391 `(("python-dateutil" ,python-dateutil)))
ae43baa8
SB
10392 (home-page "https://github.com/crsmithdev/arrow/")
10393 (synopsis "Dates and times for Python")
10394 (description
10395 "Arrow is a Python library to creating, manipulating, formatting and
10396converting dates, times, and timestamps. It implements and updates the
10397datetime type.")
3f641af0 10398 (license license:asl2.0)))
ae43baa8
SB
10399
10400(define-public python2-arrow
10401 (package-with-python2 python-arrow))
10402
1f2b62a4
SB
10403(define-public python-inflection
10404 (package
10405 (name "python-inflection")
10406 (version "0.3.1")
10407 (source
10408 (origin (method url-fetch)
10409 (uri (pypi-uri "inflection" version))
10410 (sha256
10411 (base32
10412 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10413 (build-system python-build-system)
e9127525
MB
10414 (native-inputs
10415 `(("python-pytest" ,python-pytest)))
1f2b62a4
SB
10416 (home-page "http://github.com/jpvanhal/inflection")
10417 (synopsis "Python string transformation library")
10418 (description
10419 "Inflection is a string transformation library. It singularizes
10420and pluralizes English words, and transforms strings from CamelCase to
10421underscored string.")
10422 (license license:expat)))
10423
10424(define-public python2-inflection
10425 (package-with-python2 python-inflection))
10426
18995566
SB
10427(define-public python-pylev
10428 (package
10429 (name "python-pylev")
10430 (version "1.3.0")
10431 (source (origin
10432 (method url-fetch)
10433 (uri (pypi-uri "pylev" version))
10434 (sha256
10435 (base32
10436 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10437 (build-system python-build-system)
18995566
SB
10438 (home-page "http://github.com/toastdriven/pylev")
10439 (synopsis "Levenshtein distance implementation in Python")
10440 (description "Pure Python Levenshtein implementation, based off the
10441Wikipedia code samples at
10442@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10443 (license license:bsd-3)))
18995566
SB
10444
10445(define-public python2-pylev
10446 (package-with-python2 python-pylev))
10447
f5deff7a
SB
10448(define-public python-cleo
10449 (package
10450 (name "python-cleo")
10451 (version "0.4.1")
10452 (source (origin
10453 (method url-fetch)
10454 (uri (pypi-uri "cleo" version))
10455 (sha256
10456 (base32
10457 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10458 (build-system python-build-system)
10459 (native-inputs
f3b98f4f 10460 `(;; For testing
f5deff7a
SB
10461 ("python-mock" ,python-mock)
10462 ("python-pytest" ,python-pytest)))
9403150a
SB
10463 (propagated-inputs
10464 `(("python-psutil" ,python-psutil)
10465 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10466 (home-page "https://github.com/sdispater/cleo")
10467 (synopsis "Command-line arguments library for Python")
10468 (description
10469 "Cleo allows you to create command-line commands with signature in
10470docstring and colored output.")
10471 (license license:expat)))
10472
10473(define-public python2-cleo
10474 (package-with-python2 python-cleo))
10475
77cadb43
SB
10476(define-public python-lazy-object-proxy
10477 (package
10478 (name "python-lazy-object-proxy")
10479 (version "1.2.2")
10480 (source (origin
10481 (method url-fetch)
10482 (uri (pypi-uri "lazy-object-proxy" version))
10483 (sha256
10484 (base32
10485 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10486 (build-system python-build-system)
77cadb43
SB
10487 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10488 (synopsis "Lazy object proxy for python")
10489 (description
10490 "Lazy object proxy is an object that wraps a callable but defers the call
10491until the object is actually required, and caches the result of said call.")
3f641af0 10492 (license license:bsd-2)))
77cadb43
SB
10493
10494(define-public python2-lazy-object-proxy
10495 (package-with-python2 python-lazy-object-proxy))
10496
5477e05f
SB
10497(define-public python-dnspython
10498 (package
10499 (name "python-dnspython")
6c514128 10500 (version "1.15.0")
5477e05f
SB
10501 (source (origin
10502 (method url-fetch)
10503 (uri (string-append "http://www.dnspython.org/kits/"
10504 version "/dnspython-" version ".tar.gz"))
10505 (sha256
10506 (base32
6c514128 10507 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10508 (build-system python-build-system)
10509 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
10510 (home-page "http://www.dnspython.org")
10511 (synopsis "DNS toolkit for Python")
10512 (description
10513 "dnspython is a DNS toolkit for Python. It supports almost all record
10514types. It can be used for queries, zone transfers, and dynamic updates.
10515It supports TSIG authenticated messages and EDNS0.")
10516 (license license:expat)))
10517
10518(define-public python2-dnspython
10519 (package-with-python2 python-dnspython))
10520
22711e25
SB
10521(define-public python-email-validator
10522 (package
10523 (name "python-email-validator")
10524 (version "1.0.1")
10525 (source
10526 (origin (method url-fetch)
10527 (uri (pypi-uri "email_validator" version))
10528 (sha256
10529 (base32
10530 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10531 (build-system python-build-system)
10532 (arguments
10533 '(#:phases
10534 (modify-phases %standard-phases
10535 (add-before 'build 'use-dnspython
10536 (lambda _
10537 (substitute* "setup.py"
10538 (("dnspython3") "dnspython"))
10539 #t)))))
d42560bd 10540 (propagated-inputs
22711e25 10541 `(("python-dnspython" ,python-dnspython)
d42560bd 10542 ("python-idna" ,python-idna)))
22711e25
SB
10543 (home-page "https://github.com/JoshData/python-email-validator")
10544 (synopsis "Email address validation library for Python")
10545 (description
10546 "This library validates email address syntax and deliverability.")
3f641af0 10547 (license license:cc0)))
22711e25
SB
10548
10549(define-public python2-email-validator
10550 (package-with-python2 python-email-validator))
10551
8987d91e
SB
10552(define-public python-ukpostcodeparser
10553 (package
10554 (name "python-ukpostcodeparser")
10555 (version "1.0.3")
10556 (source (origin
10557 (method url-fetch)
10558 (uri (pypi-uri "UkPostcodeParser" version))
10559 (sha256
10560 (base32
10561 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10562 (build-system python-build-system)
8987d91e
SB
10563 (home-page "https://github.com/hamstah/ukpostcodeparser")
10564 (synopsis "UK Postcode parser for Python")
10565 (description
10566 "This library provides the @code{parse_uk_postcode} function for
10567parsing UK postcodes.")
10568 (license license:expat)))
10569
10570(define-public python2-ukpostcodeparser
10571 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10572
10573(define-public python-fake-factory
10574 (package
10575 (name "python-fake-factory")
7adc698f 10576 (version "0.7.2")
ea92ae01
SB
10577 (source (origin
10578 (method url-fetch)
10579 (uri (pypi-uri "fake-factory" version))
10580 (sha256
10581 (base32
7adc698f 10582 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10583 (build-system python-build-system)
b7f3ea95
MB
10584 (arguments
10585 '(#:phases
10586 (modify-phases %standard-phases
10587 (replace 'check
10588 (lambda _
10589 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
ea92ae01 10590 (native-inputs
f3b98f4f 10591 `(;; For testing
ea92ae01
SB
10592 ("python-email-validator" ,python-email-validator)
10593 ("python-mock" ,python-mock)
10594 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297 10595 (propagated-inputs
22d7360b 10596 `(("python-dateutil" ,python-dateutil)
bbcd7297 10597 ("python-six" ,python-six)))
7adc698f 10598 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10599 (synopsis "Python package that generates fake data")
10600 (description
10601 "Faker is a Python package that generates fake data such as names,
10602addresses, and phone numbers.")
10603 (license license:expat)
10604 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10605
10606(define-public python2-fake-factory
10607 (let ((base (package-with-python2 (strip-python2-variant
10608 python-fake-factory))))
10609 (package
10610 (inherit base)
24c9aa18 10611 (propagated-inputs
ea92ae01 10612 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10613 ,@(package-propagated-inputs base))))))
ea92ae01 10614
b49504fd
SB
10615(define-public python-pyaml
10616 (package
10617 (name "python-pyaml")
10618 (version "15.8.2")
10619 (source (origin
10620 (method url-fetch)
10621 (uri (pypi-uri "pyaml" version))
10622 (sha256
10623 (base32
10624 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10625 (build-system python-build-system)
f620311a
MB
10626 (native-inputs
10627 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
10628 (propagated-inputs
10629 `(("python-pyyaml" ,python-pyyaml)))
10630 (home-page "https://github.com/mk-fg/pretty-yaml")
10631 (synopsis "YAML pretty-print library for Python")
10632 (description
10633 "pyaml is a PyYAML based python module to produce pretty and readable
10634YAML-serialized data.")
3f641af0 10635 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10636
10637(define-public python2-pyaml
10638 (package-with-python2 python-pyaml))
10639
347175a2
SB
10640(define-public python-flexmock
10641 (package
10642 (name "python-flexmock")
10643 (version "0.10.2")
10644 (source (origin
10645 (method url-fetch)
10646 (uri (pypi-uri "flexmock" version))
10647 (sha256
10648 (base32
10649 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10650 (build-system python-build-system)
347175a2
SB
10651 (home-page "https://flexmock.readthedocs.org")
10652 (synopsis "Testing library for Python")
10653 (description
10654 "flexmock is a testing library for Python that makes it easy to create
10655mocks, stubs and fakes.")
3f641af0 10656 (license license:bsd-3)))
347175a2
SB
10657
10658(define-public python2-flexmock
10659 (package-with-python2 python-flexmock))
10660
5a744191
SB
10661(define-public python-orator
10662 (package
10663 (name "python-orator")
10664 (version "0.8.2")
10665 (source (origin
10666 (method url-fetch)
10667 (uri (pypi-uri "orator" version))
10668 (sha256
10669 (base32
10670 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10671 (build-system python-build-system)
10672 (arguments '(#:tests? #f)) ; no tests
b2676030 10673 (propagated-inputs
5a744191
SB
10674 `(("python-arrow" ,python-arrow)
10675 ("python-blinker" ,python-blinker)
10676 ("python-cleo" ,python-cleo)
10677 ("python-fake-factory" ,python-fake-factory)
10678 ("python-inflection" ,python-inflection)
10679 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10680 ("python-pyaml" ,python-pyaml)
5a744191
SB
10681 ("python-simplejson" ,python-simplejson)
10682 ("python-wrapt" ,python-wrapt)))
10683 (home-page "https://orator-orm.com/")
10684 (synopsis "ActiveRecord ORM for Python")
10685 (description
10686 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10687implementation for Python.")
10688 (license license:expat)
10689 (properties `((python2-variant . ,(delay python2-orator))))))
10690
10691(define-public python2-orator
10692 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10693 (package
10694 (inherit base)
06961617 10695 (propagated-inputs
5a744191 10696 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10697 ,@(package-propagated-inputs base))))))
f4155188
DM
10698
10699(define-public python-prompt-toolkit
10700 (package
10701 (name "python-prompt-toolkit")
d15e2ef0 10702 (version "1.0.7")
f4155188
DM
10703 (source
10704 (origin
10705 (method url-fetch)
d15e2ef0 10706 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10707 (sha256
10708 (base32
d15e2ef0 10709 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188 10710 (build-system python-build-system)
bae18710
LF
10711 (arguments
10712 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
10713 (propagated-inputs
10714 `(("python-wcwidth" ,python-wcwidth)
2c199b55 10715 ("python-six" ,python-six)
f22efa01 10716 ("python-pygments" ,python-pygments)))
f4155188
DM
10717 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10718 (synopsis "Library for building command line interfaces in Python")
10719 (description
10720 "Prompt-Toolkit is a library for building interactive command line
10721interfaces in Python. It's like GNU Readline but it also features syntax
10722highlighting while typing, out-of-the-box multi-line input editing, advanced
10723code completion, incremental search, support for Chinese double-width
10724characters, mouse support, and auto suggestions.")
f210e944 10725 (license license:bsd-3)))
f4155188
DM
10726
10727(define-public python2-prompt-toolkit
f210e944 10728 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
10729
10730(define-public python-jedi
10731 (package
10732 (name "python-jedi")
10733 (version "0.9.0")
10734 (source
10735 (origin
10736 (method url-fetch)
10737 (uri (pypi-uri "jedi" version))
10738 (sha256
10739 (base32
10740 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10741 (build-system python-build-system)
bfce8a34
MB
10742 (arguments
10743 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
10744 '(#:tests? #f))
10745 (native-inputs
10746 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
10747 (home-page "https://github.com/davidhalter/jedi")
10748 (synopsis
10749 "Autocompletion for Python that can be used for text editors")
10750 (description
10751 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 10752 (license license:expat)))
a502dfbf
DM
10753
10754(define-public python2-jedi
f210e944 10755 (package-with-python2 python-jedi))
c2f0dc6e
DM
10756
10757(define-public ptpython
10758 (package
10759 (name "ptpython")
10760 (version "0.34")
10761 (source (origin
10762 (method url-fetch)
10763 (uri (pypi-uri "ptpython" version))
10764 (sha256
10765 (base32
10766 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10767 (build-system python-build-system)
f22efa01 10768 (propagated-inputs
c2f0dc6e
DM
10769 `(("python-docopt" ,python-docopt)
10770 ("python-jedi" ,python-jedi)
10771 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 10772 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
10773 (home-page "https://github.com/jonathanslenders/ptpython")
10774 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10775 (description
10776 "ptpython is a Python read-eval-print loop with IDE-like features.
10777It supports syntax highlighting, multiline editing, autocompletion, mouse,
10778color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10779etc.")
3f641af0 10780 (license license:bsd-3)
c2f0dc6e
DM
10781 (properties `((python2-variant . ,(delay ptpython-2))))))
10782
10783(define-public ptpython-2
10784 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10785 (package
10786 (inherit base)
10787 (name "ptpython2"))))
b227f0be 10788
b04a52a6
DJ
10789(define-public python-requests-oauthlib
10790 (package
10791 (name "python-requests-oauthlib")
10792 (version "0.6.2")
10793 (source
10794 (origin
10795 (method url-fetch)
10796 (uri (pypi-uri "requests-oauthlib" version))
10797 (sha256
10798 (base32
10799 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10800 (build-system python-build-system)
10801 (arguments
10802 `(#:phases
10803 (modify-phases %standard-phases
10804 ;; removes tests that require network access
10805 (add-before 'check 'pre-check
10806 (lambda _
10807 (delete-file "tests/test_core.py")
10808 #t)))))
10809 (native-inputs
10810 `(("python-requests-mock" ,python-requests-mock)
10811 ("python-mock" ,python-mock)))
f22efa01 10812 (propagated-inputs
b04a52a6
DJ
10813 `(("python-oauthlib" ,python-oauthlib)
10814 ("python-requests" ,python-requests)))
10815 (home-page
10816 "https://github.com/requests/requests-oauthlib")
10817 (synopsis
10818 "OAuthlib authentication support for Requests")
10819 (description
10820 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10821provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 10822 (license license:isc)))
b04a52a6
DJ
10823
10824(define-public python2-requests-oauthlib
f210e944 10825 (package-with-python2 python-requests-oauthlib))
b04a52a6 10826
b227f0be 10827(define-public python-stem
10828 (package
10829 (name "python-stem")
10830 (version "1.4.1b")
10831 (source
10832 (origin
10833 (method url-fetch)
10834 (uri (pypi-uri "stem" version ".tar.bz2"))
10835 (sha256
10836 (base32
10837 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10838 (build-system python-build-system)
10839 (arguments
10840 `(#:phases
10841 (modify-phases %standard-phases
10842 (replace 'check
10843 (lambda _
10844 (zero? (system* "./run_tests.py" "--unit")))))))
10845 (native-inputs
10846 `(("python-mock" ,python-mock)
10847 ("python-pep8" ,python-pep8)
10848 ("python-pyflakes" ,python-pyflakes)))
f22efa01 10849 (propagated-inputs
b227f0be 10850 `(("python-pycrypto" ,python-pycrypto)))
10851 (home-page "https://stem.torproject.org/")
10852 (synopsis
10853 "Python controller library that allows applications to interact with Tor")
10854 (description
10855 "Stem is a Python controller library for Tor. With it you can use Tor's
10856control protocol to script against the Tor process and read descriptor data
10857relays publish about themselves.")
3f641af0 10858 (license license:lgpl3)))
b227f0be 10859
10860(define-public python2-stem
10861 (package-with-python2 python-stem))
517a6c0c
DM
10862
10863(define-public python-pyserial
10864 (package
10865 (name "python-pyserial")
10866 (version "3.1.1")
10867 (source
10868 (origin
10869 (method url-fetch)
10870 (uri (pypi-uri "pyserial" version))
10871 (sha256
10872 (base32
10873 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10874 (build-system python-build-system)
0a702009
MB
10875 (arguments
10876 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10877 ;; #:phases
10878 ;; (modify-phases %standard-phases
10879 ;; (replace 'check
10880 ;; (lambda _
10881 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
517a6c0c
DM
10882 (home-page
10883 "https://github.com/pyserial/pyserial")
10884 (synopsis "Python Serial Port Bindings")
10885 (description "@code{pyserial} provide serial port bindings for Python. It
10886supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10887and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 10888 (license license:bsd-3)))
517a6c0c
DM
10889
10890(define-public python2-pyserial
f210e944 10891 (package-with-python2 python-pyserial))
6eb7af2a
DJ
10892
10893(define-public python-kivy
10894 (package
10895 (name "python-kivy")
10896 (version "1.9.1")
10897 (source
10898 (origin
10899 (method url-fetch)
10900 (uri (pypi-uri "kivy" version))
10901 (file-name (string-append name "-" version ".tar.gz"))
10902 (sha256
10903 (base32
10904 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10905 (build-system python-build-system)
10906 (arguments
10907 `(#:tests? #f ; Tests require many optional packages
10908 #:phases
10909 (modify-phases %standard-phases
10910 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10911 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10912 (lambda* (#:key inputs #:allow-other-keys)
10913 (setenv "KIVY_SDL2_PATH"
10914 (string-append (assoc-ref inputs "sdl-union")
10915 "/include/SDL2"))
10916 #t)))))
10917 (native-inputs
f2516de2
HG
10918 `(("pkg-config" ,pkg-config)
10919 ("python-cython" ,python-cython)))
6eb7af2a 10920 (inputs
f2516de2 10921 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
10922 ("mesa" ,mesa)
10923 ("sdl-union"
10924 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10925 (home-page "http://kivy.org")
10926 (synopsis
10927 "Multitouch application framework")
10928 (description
10929 "A software library for rapid development of
10930hardware-accelerated multitouch applications.")
10931 (license license:expat)))
10932
10933(define-public python2-kivy
10934 (package-with-python2 python-kivy))
10935
10936(define-public python-kivy-next
10937 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10938 (revision "1"))
10939 (package (inherit python-kivy)
10940 (name "python-kivy-next")
d80a71eb 10941 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
10942 (string-take commit 7)))
10943 (source
10944 (origin
10945 (method git-fetch)
10946 (uri (git-reference
10947 (url "https://github.com/kivy/kivy")
10948 (commit commit)))
10949 (file-name (string-append name "-" version "-checkout"))
10950 (sha256
10951 (base32
10952 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10953
10954(define-public python2-kivy-next
10955 (package-with-python2 python-kivy-next))
8794bd8b
DC
10956
10957(define-public python-binaryornot
10958 (package
10959 (name "python-binaryornot")
10960 (version "0.4.0")
10961 (source (origin
10962 (method url-fetch)
10963 (uri (pypi-uri "binaryornot" version))
10964 (sha256
10965 (base32
10966 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10967 (build-system python-build-system)
f22efa01 10968 (propagated-inputs
8794bd8b
DC
10969 `(("python-chardet" ,python-chardet)
10970 ("python-hypothesis" ,python-hypothesis)))
10971 (home-page "https://github.com/audreyr/binaryornot")
10972 (synopsis "Package to check if a file is binary or text")
10973 (description "Ultra-lightweight pure Python package to check if a file is
10974binary or text.")
10975 (license license:bsd-3)
10976 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10977
10978(define-public python2-binaryornot
10979 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10980 (package (inherit base)
f22efa01 10981 (propagated-inputs
8794bd8b 10982 `(("python2-enum34" ,python2-enum34)
f22efa01 10983 ,@(package-propagated-inputs base))))))
a9ac982a
DC
10984
10985(define-public python-nltk
10986 (package
10987 (name "python-nltk")
10988 (version "3.2.1")
10989 (source (origin
10990 (method url-fetch)
10991 (uri (pypi-uri "nltk" version))
10992 (sha256
10993 (base32
10994 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10995 (build-system python-build-system)
59f12985
LF
10996 (arguments
10997 '(;; The tests require some extra resources to be downloaded.
10998 ;; TODO Try packaging these resources.
10999 #:tests? #f))
a9ac982a
DC
11000 (home-page "http://nltk.org/")
11001 (synopsis "Natural Language Toolkit")
11002 (description "It provides interfaces to over 50 corpora and lexical
11003resources such as WordNet, along with a suite of text processing libraries
11004for classification, tokenization, stemming, tagging, parsing, and semantic
11005reasoning, wrappers for natural language processing libraries.")
f210e944 11006 (license license:asl2.0)))
a9ac982a
DC
11007
11008(define-public python2-nltk
f210e944 11009 (package-with-python2 python-nltk))
691cd90d
DC
11010
11011(define-public python-pymongo
11012 (package
11013 (name "python-pymongo")
11014 (version "3.3.0")
11015 (source (origin
11016 (method url-fetch)
11017 (uri (pypi-uri "pymongo" version))
11018 (sha256
11019 (base32
11020 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11021 (build-system python-build-system)
f22efa01 11022 (propagated-inputs
691cd90d
DC
11023 `(("python-certifi" ,python-certifi)))
11024 (home-page "http://github.com/mongodb/mongo-python-driver")
11025 (synopsis "Python driver for MongoDB")
11026 (description "Python driver for MongoDB.")
f210e944 11027 (license license:asl2.0)))
691cd90d
DC
11028
11029(define-public python2-pymongo
f210e944 11030 (package-with-python2 python-pymongo))
6a6c9d43
DC
11031
11032(define-public python-sh
11033 (package
11034 (name "python-sh")
11035 (version "1.11")
11036 (source (origin
11037 (method url-fetch)
11038 (uri (pypi-uri "sh" version))
11039 (sha256
11040 (base32
11041 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11042 (build-system python-build-system)
11043 (arguments
11044 `(#:tests? #f)) ; no tests
11045 (home-page "https://github.com/amoffat/sh")
11046 (synopsis "Python subprocess interface")
11047 (description "Abstracts process invocation by providing a function
11048interface for programs.")
f210e944 11049 (license license:expat)))
6a6c9d43
DC
11050
11051(define-public python2-sh
f210e944 11052 (package-with-python2 python-sh))
05b59190 11053
25702397
EF
11054(define-public python-consul
11055 (package
11056 (name "python-consul")
11057 (version "0.6.1")
11058 (source
11059 (origin
11060 (method url-fetch)
11061 (uri (pypi-uri "python-consul" version))
11062 (sha256
11063 (base32
11064 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11065 (build-system python-build-system)
11066 (native-inputs
fd1d6de7
HG
11067 `(("python-pytest" ,python-pytest)))
11068 (propagated-inputs
11069 `(("python-requests" ,python-requests)
25702397
EF
11070 ("python-six" ,python-six)))
11071 (home-page "https://github.com/cablehead/python-consul")
11072 (synopsis "Python client for Consul")
11073 (description
11074 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11075discovery, monitoring and configuration.")
11076 (license license:expat)))
11077
11078(define-public python2-consul
f210e944 11079 (package-with-python2 python-consul))
25702397 11080
05b59190
DC
11081(define-public python-schematics
11082 (package
11083 (name "python-schematics")
11084 (version "1.1.1")
11085 (source
11086 (origin
11087 (method url-fetch)
11088 (uri (string-append
11089 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11090 (file-name (string-append name "-" version ".tar.gz"))
11091 (sha256
11092 (base32
11093 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11094 (build-system python-build-system)
f22efa01 11095 (propagated-inputs
05b59190
DC
11096 `(("python-six" ,python-six)))
11097 (arguments
11098 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11099 ; version requirements (eg python-coveralls)
11100 (home-page "https://github.com/schematics/schematics")
11101 (synopsis "Python Data Structures for Humans")
11102 (description "Python Data Structures for Humans.")
f210e944 11103 (license license:bsd-3)))
05b59190
DC
11104
11105(define-public python2-schematics
f210e944 11106 (package-with-python2 python-schematics))
d6907ff7
DC
11107
11108(define-public python-publicsuffix
11109 (package
11110 (name "python-publicsuffix")
11111 (version "1.1.0")
11112 (source (origin
11113 (method url-fetch)
11114 (uri (pypi-uri "publicsuffix" version))
11115 (sha256
11116 (base32
11117 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11118 (build-system python-build-system)
11119 (arguments
11120 `(#:tests? #f)) ; tests use the internet
11121 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11122 (synopsis "Get suffix for a domain name")
11123 (description "Get a public suffix for a domain name using the Public Suffix
11124List.")
f210e944 11125 (license license:expat)))
d6907ff7
DC
11126
11127(define-public python2-publicsuffix
f210e944 11128 (package-with-python2 python-publicsuffix))
b2319996
DC
11129
11130(define-public python-publicsuffix2
11131 (package
11132 (name "python-publicsuffix2")
11133 (version "2.20160621")
11134 (source
11135 (origin
11136 (method url-fetch)
11137 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11138 (sha256
11139 (base32
11140 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11141 (build-system python-build-system)
10797a0a
LF
11142 (arguments
11143 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
11144 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11145 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11146 (description "Get a public suffix for a domain name using the Public Suffix
11147List. Forked from and using the same API as the publicsuffix package.")
f210e944 11148 (license (list license:expat license:mpl2.0))))
b2319996
DC
11149
11150(define-public python2-publicsuffix2
f210e944 11151 (package-with-python2 python-publicsuffix2))
81f1515d
DC
11152
11153(define-public python-url
11154 (package
11155 (name "python-url")
11156 (version "0.2.0")
11157 (source (origin
11158 (method url-fetch)
11159 (uri (pypi-uri "url" version))
11160 (sha256
11161 (base32
11162 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11163 (build-system python-build-system)
f22efa01 11164 (propagated-inputs
81f1515d
DC
11165 `(("python-publicsuffix" ,python-publicsuffix)))
11166 (native-inputs
11167 `(("python-coverage" ,python-coverage)
11168 ("python-nose" ,python-nose)))
11169 (arguments
11170 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11171 (home-page "http://github.com/seomoz/url-py")
11172 (synopsis "URL Parsing")
11173 (description "Library for parsing urls.")
11174 (license license:expat)
11175 (properties `((python2-variant . ,(delay python2-url))))))
11176
11177(define-public python2-url
11178 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11179 (package (inherit base)
f22efa01 11180 (propagated-inputs
f210e944 11181 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
11182
11183(define-public python-freezegun
11184 (package
11185 (name "python-freezegun")
11186 (version "0.3.7")
11187 (source
11188 (origin
11189 (method url-fetch)
11190 (uri (pypi-uri "freezegun" version))
11191 (sha256
11192 (base32
11193 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
11194 (build-system python-build-system)
11195 (native-inputs
11196 `(("python-mock" ,python-mock)
11197 ("python-nose" ,python-nose)
4e096968 11198 ("python-coverage" ,python-coverage)))
f22efa01 11199 (propagated-inputs
4e096968 11200 `(("python-six" ,python-six)
22d7360b 11201 ("python-dateutil" ,python-dateutil)))
974ee2c1
TS
11202 (arguments
11203 `(#:phases (modify-phases %standard-phases
11204 ;; The tests are normally executed via `make test`, but the PyPi
11205 ;; package does not include the Makefile.
11206 (replace 'check
11207 (lambda _
11208 (zero? (system* "nosetests" "./tests/")))))))
11209 (home-page "https://github.com/spulec/freezegun")
11210 (synopsis "Test utility for mocking the datetime module")
11211 (description
11212 "FreezeGun is a library that allows your python tests to travel through
11213time by mocking the datetime module.")
11214 (license license:asl2.0)))
11215
11216(define-public python2-freezegun
f210e944
HG
11217 (package-with-python2 python-freezegun))
11218
dddcb25c
MB
11219
11220(define-public python-odfpy
11221 (package
11222 (name "python-odfpy")
11223 (version "1.3.3")
11224 (source (origin
11225 (method url-fetch)
11226 (uri (pypi-uri "odfpy" version))
11227 (sha256
11228 (base32
11229 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11230 (arguments
11231 `(#:modules ((srfi srfi-1)
11232 (guix build python-build-system)
11233 (guix build utils))
11234 #:phases
11235 (modify-phases %standard-phases
11236 (replace 'check
11237 ;; The test runner invokes python2 and python3 for test*.py.
11238 ;; To avoid having both in inputs, we replicate it here.
11239 (lambda _
11240 (every (lambda (test-file)
11241 (zero? (system* "python" test-file)))
11242 (find-files "tests" "^test.*\\.py$")))))))
11243 (build-system python-build-system)
11244 (home-page "https://github.com/eea/odfpy")
11245 (synopsis "Python API and tools to manipulate OpenDocument files")
11246 (description "Collection of libraries and utility programs written in
11247Python to manipulate OpenDocument 1.2 files.")
11248 (license
11249 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11250 ;; number of files with other licenses.
11251 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11252
11253(define-public python2-odfpy
11254 (package-with-python2 python-odfpy))
b30565bd
MB
11255
11256(define-public python-cachecontrol
11257 (package
11258 (name "python-cachecontrol")
11259 (version "0.11.6")
11260 (source
11261 (origin
11262 (method url-fetch)
11263 ;; Pypi does not have tests.
11264 (uri (string-append
11265 "https://github.com/ionrock/cachecontrol/archive/v"
11266 version ".tar.gz"))
11267 (file-name (string-append name "-" version ".tar.gz"))
11268 (sha256
11269 (base32
11270 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11271 (build-system python-build-system)
11272 (arguments
11273 `(#:phases
11274 (modify-phases %standard-phases
11275 (replace 'check
11276 (lambda _
11277 ;; Drop test that requires internet access.
11278 (delete-file "tests/test_regressions.py")
11279 (setenv "PYTHONPATH"
11280 (string-append (getcwd) "/build/lib:"
11281 (getenv "PYTHONPATH")))
11282 (zero? (system* "py.test" "-vv")))))))
11283 (native-inputs
11284 `(("python-pytest" ,python-pytest)
11285 ("python-redis" ,python-redis)
11286 ("python-webtest" ,python-webtest)
11287 ("python-mock" ,python-mock)))
11288 (propagated-inputs
11289 `(("python-requests" ,python-requests)
11290 ("python-lockfile" ,python-lockfile)))
11291 (home-page "https://github.com/ionrock/cachecontrol")
11292 (synopsis "The httplib2 caching algorithms for use with requests")
11293 (description "CacheControl is a port of the caching algorithms in
11294@code{httplib2} for use with @code{requests} session objects.")
f210e944 11295 (license license:asl2.0)))
b30565bd
MB
11296
11297(define-public python2-cachecontrol
f210e944 11298 (package-with-python2 python-cachecontrol))
243db824
DM
11299
11300(define-public python-lit
11301 (package
11302 (name "python-lit")
11303 (version "0.5.0")
11304 (source
11305 (origin
11306 (method url-fetch)
11307 (uri (pypi-uri "lit" version))
11308 (sha256
11309 (base32
11310 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11311 (build-system python-build-system)
11312 (home-page "http://llvm.org/")
11313 (synopsis "LLVM Software Testing Tool")
11314 (description "@code{lit} is a portable tool for executing LLVM and Clang
11315style test suites, summarizing their results, and providing indication of
11316failures.")
f210e944 11317 (license license:ncsa)))
243db824
DM
11318
11319(define-public python2-lit
f210e944 11320 (package-with-python2 python-lit))
66f95b20
MB
11321
11322(define-public python-pytest-pep8
11323 (package
11324 (name "python-pytest-pep8")
11325 (version "1.0.6")
11326 (source (origin
11327 (method url-fetch)
11328 (uri (pypi-uri "pytest-pep8" version))
11329 (sha256
11330 (base32
11331 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11332 (build-system python-build-system)
11333 (arguments
b41a05ce 11334 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
11335 (native-inputs
11336 `(("python-pytest" ,python-pytest)))
11337 (propagated-inputs
11338 `(("python-pep8" ,python-pep8)))
11339 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11340 (synopsis "Py.test plugin to check PEP8 requirements")
11341 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 11342 (license license:expat)))
66f95b20
MB
11343
11344(define-public python2-pytest-pep8
f210e944 11345 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
11346
11347(define-public python-pytest-flakes
11348 (package
11349 (name "python-pytest-flakes")
11350 (version "1.0.1")
11351 (source (origin
11352 (method url-fetch)
11353 (uri (pypi-uri "pytest-flakes" version))
11354 (sha256
11355 (base32
11356 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11357 (build-system python-build-system)
11358 (arguments
b41a05ce 11359 `(#:phases
df94a6b5
MB
11360 (modify-phases %standard-phases
11361 (delete 'check)
11362 (add-after 'install 'check
05c2fd36
HG
11363 (lambda* (#:key outputs inputs #:allow-other-keys)
11364 ;; It's easier to run tests after install.
11365 ;; Make installed package available for running the tests
11366 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
11367 (zero? (system* "py.test" "-vv")))))))
11368 (native-inputs
11369 `(("python-coverage" ,python-coverage)
11370 ("python-pytest" ,python-pytest)
11371 ("python-pytest-cache" ,python-pytest-cache)
11372 ("python-pytest-pep8" ,python-pytest-pep8)))
11373 (propagated-inputs
11374 `(("python-pyflakes" ,python-pyflakes)))
11375 (home-page "https://github.com/fschulze/pytest-flakes")
11376 (synopsis "Py.test plugin to check source code with pyflakes")
11377 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 11378 (license license:expat)))
df94a6b5
MB
11379
11380(define-public python2-pytest-flakes
f210e944 11381 (package-with-python2 python-pytest-flakes))
5467ea62
MB
11382
11383(define-public python-natsort
11384 (package
11385 (name "python-natsort")
11386 (version "5.0.1")
11387 (source (origin
11388 (method url-fetch)
11389 (uri (pypi-uri "natsort" version))
11390 (sha256
11391 (base32
11392 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11393 (build-system python-build-system)
11394 (arguments
11395 `(#:phases
11396 (modify-phases %standard-phases
11397 (add-before 'check 'set-cachedir
11398 ;; Tests require write access to $HOME by default
11399 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11400 (native-inputs
11401 `(("python-hypothesis" ,python-hypothesis)
11402 ("python-pytest-cache" ,python-pytest-cache)
11403 ("python-pytest-cov" ,python-pytest-cov)
11404 ("python-pytest-flakes" ,python-pytest-flakes)
11405 ("python-pytest-pep8" ,python-pytest-pep8)))
11406 (propagated-inputs ; TODO: Add python-fastnumbers.
11407 `(("python-pyicu" ,python-pyicu)))
11408 (home-page "https://github.com/SethMMorton/natsort")
11409 (synopsis "Natural sorting for python and shell")
11410 (description
11411 "Natsort lets you apply natural sorting on lists instead of
11412lexicographical. If you use the built-in @code{sorted} method in python
11413on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11414returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11415function @code{natsorted} that identifies numbers and sorts them separately
11416from strings. It can also sort version numbers, real numbers, mixed types
11417and more, and comes with a shell command @command{natsort} that exposes this
11418functionality in the command line.")
11419 (license license:expat)
11420 (properties `((python2-variant . ,(delay python2-natsort))))))
11421
11422(define-public python2-natsort
11423 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11424 (package (inherit base)
11425 (native-inputs
00e10c6e 11426 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
11427 ("python2-mock" ,python2-mock)
11428 ("python2-enum34" ,python2-enum34)
11429 ,@(package-native-inputs base))))))
4efb9c54
SR
11430
11431(define-public python-glances
11432 (package
11433 (name "python-glances")
11434 (version "2.7.1")
11435 (source
11436 (origin
11437 (method url-fetch)
11438 (uri (pypi-uri "Glances" version))
11439 (sha256
11440 (base32
11441 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11442 (build-system python-build-system)
f22efa01 11443 (propagated-inputs
4efb9c54
SR
11444 `(("python-psutil" ,python-psutil)))
11445 (home-page
11446 "https://github.com/nicolargo/glances")
11447 (synopsis
11448 "A cross-platform curses-based monitoring tool")
11449 (description
11450 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11451Glances uses the PsUtil library to get information from your system. It monitors
11452CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 11453 (license license:lgpl3+)))
4efb9c54
SR
11454
11455(define-public python2-glances
f210e944 11456 (package-with-python2 python-glances))
05b7a593
EF
11457
11458(define-public python-graphql-core
11459 (package
11460 (name "python-graphql-core")
11461 (version "0.5.3")
11462 (source
11463 (origin
11464 (method url-fetch)
11465 (uri (pypi-uri "graphql-core" version))
11466 (sha256
11467 (base32
11468 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11469 (build-system python-build-system)
11470 (arguments
326f8285
LF
11471 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11472 #:phases
05b7a593
EF
11473 (modify-phases %standard-phases
11474 (add-after 'unpack 'patch-hardcoded-version
11475 (lambda _ (substitute*
11476 "setup.py"
11477 (("'gevent==1.1rc1'") "'gevent'"))
11478 #t)))))
11479 (native-inputs
11480 `(("python-gevent" ,python-gevent)
11481 ("python-mock" ,python-mock)
11482 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 11483 (propagated-inputs
05b7a593
EF
11484 `(("python-promise" ,python-promise)
11485 ("python-six" ,python-six)))
11486 (home-page "https://github.com/graphql-python/graphql-core")
11487 (synopsis "GraphQL implementation for Python")
11488 (description
11489 "GraphQL implementation for Python. GraphQL is a data query language and
11490runtime designed and used to request and deliver data to mobile and web apps.
11491This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11492to Python.")
05b7a593
EF
11493 (license license:expat)))
11494
11495(define-public python2-graphql-core
f210e944 11496 (package-with-python2 python-graphql-core))
7ee51575
EF
11497
11498(define-public python-graphql-relay
11499 (package
11500 (name "python-graphql-relay")
11501 (version "0.4.4")
11502 (source
11503 (origin
11504 (method url-fetch)
11505 (uri (pypi-uri "graphql-relay" version))
11506 (sha256
11507 (base32
11508 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11509 (build-system python-build-system)
11510 (native-inputs
11511 `(("python-pytest" ,python-pytest)))
f22efa01 11512 (propagated-inputs
7ee51575
EF
11513 `(("python-graphql-core" ,python-graphql-core)
11514 ("python-promise" ,python-promise)
11515 ("python-six" ,python-six)))
11516 (home-page "https://github.com/graphql-python/graphql-relay-py")
11517 (synopsis "Relay implementation for Python")
11518 (description
11519 "This is a library to allow the easy creation of Relay-compliant servers
11520using the GraphQL Python reference implementation of a GraphQL server. It
11521should be noted that the code is a exact port of the original
11522@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11523from Facebook.")
7ee51575
EF
11524 (license license:expat)))
11525
11526(define-public python2-graphql-relay
f210e944 11527 (package-with-python2 python-graphql-relay))
ddc63a56
EF
11528
11529(define-public python-graphene
11530 (package
11531 (name "python-graphene")
11532 (version "0.10.2")
11533 (source
11534 (origin
11535 (method url-fetch)
11536 (uri (pypi-uri "graphene" version))
11537 (sha256
11538 (base32
11539 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11540 (build-system python-build-system)
11541 (native-inputs
11542 `(("python-django-filter" ,python-django-filter)
11543 ("python-mock" ,python-mock)
11544 ("python-psycopg2" ,python-psycopg2)
11545 ("python-pytest-django" ,python-pytest-django)
11546 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 11547 (propagated-inputs
ddc63a56
EF
11548 `(("python-graphql-core" ,python-graphql-core)
11549 ("python-graphql-relay" ,python-graphql-relay)
11550 ("python-iso8601" ,python-iso8601)
11551 ("python-promise" ,python-promise)
11552 ("python-six" ,python-six)))
11553 (home-page "http://graphene-python.org/")
11554 (synopsis "GraphQL Framework for Python")
11555 (description
11556 "Graphene is a Python library for building GraphQL schemas/types.
11557A GraphQL schema describes your data model, and provides a GraphQL server
11558with an associated set of resolve methods that know how to fetch data.")
11559 (properties `((python2-variant . ,(delay python2-graphene))))
11560 (license license:expat)))
11561
11562(define-public python2-graphene
11563 (let ((base (package-with-python2
11564 (strip-python2-variant python-graphene))))
11565 (package (inherit base)
11566 (native-inputs
00e10c6e 11567 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 11568 ,@(package-native-inputs base))))))
d488d5d6
EF
11569
11570(define-public python-nautilus
11571 (package
11572 (name "python-nautilus")
11573 (version "0.4.9")
11574 (source
11575 (origin
11576 (method url-fetch)
11577 (uri (pypi-uri "nautilus" version))
11578 (sha256
11579 (base32
11580 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11581 (build-system python-build-system)
11582 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 11583 (propagated-inputs
d488d5d6
EF
11584 `(("python-bcrypt" ,python-bcrypt)
11585 ("python-click" ,python-click)
11586 ("python-consul" ,python-consul)
d488d5d6
EF
11587 ("python-graphene" ,python-graphene)
11588 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
11589 ("python-peewee" ,python-peewee)
11590 ("python-pika" ,python-pika)
d488d5d6
EF
11591 ("python-tornado" ,python-tornado)
11592 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
11593 (native-inputs
11594 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
11595 (home-page "https://github.com/AlecAivazis/nautilus")
11596 (synopsis "Library for creating microservice applications")
11597 (description
11598 "Nautilus is a framework for flux based microservices that looks to
11599provide extendible implementations of common aspects of a cloud so that you can
11600focus on building massively scalable web applications.")
11601 (license license:expat)))
94cffc63 11602
66d3f50a
LF
11603(define-public python-betamax
11604 (package
11605 (name "python-betamax")
11606 (version "0.8.0")
11607 (source
11608 (origin
11609 (method url-fetch)
11610 (uri (pypi-uri "betamax" version))
11611 (sha256
11612 (base32
11613 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11614 (build-system python-build-system)
11615 (arguments
11616 '(;; Many tests fail because they require networking.
11617 #:tests? #f))
c415f763 11618 (propagated-inputs
66d3f50a
LF
11619 `(("python-requests" ,python-requests)))
11620 (home-page "https://github.com/sigmavirus24/betamax")
11621 (synopsis "Record HTTP interactions with python-requests")
11622 (description "Betamax will record your test suite's HTTP interactions and
11623replay them during future tests. It is designed to work with python-requests.")
f210e944 11624 (license license:expat)))
66d3f50a
LF
11625
11626(define-public python2-betamax
f210e944 11627 (package-with-python2 python-betamax))
ca0635b4 11628
94cffc63
LF
11629(define-public python-s3transfer
11630 (package
11631 (name "python-s3transfer")
11632 (version "0.1.8")
11633 (source (origin
11634 (method url-fetch)
11635 (uri (pypi-uri "s3transfer" version))
11636 (sha256
11637 (base32
11638 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11639 (build-system python-build-system)
fad8bf97
LF
11640 (arguments
11641 `(#:phases
11642 (modify-phases %standard-phases
11643 (replace 'check
11644 (lambda _
11645 ;; 7 of the 'integration' tests require network access or login
11646 ;; credentials.
11647 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 11648 (native-inputs
fad8bf97
LF
11649 `(("python-docutils" ,python-docutils)
11650 ("python-mock" ,python-mock)
11651 ("python-nose" ,python-nose)))
f22efa01 11652 (propagated-inputs
94cffc63
LF
11653 `(("python-botocore" ,python-botocore)))
11654 (synopsis "Amazon S3 Transfer Manager")
11655 (description "S3transfer is a Python library for managing Amazon S3
11656transfers.")
11657 (home-page "https://github.com/boto/s3transfer")
11658 (license license:asl2.0)
11659 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11660
11661(define-public python2-s3transfer
11662 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11663 (package
11664 (inherit base)
11665 (native-inputs
11666 `(("python2-futures" ,python2-futures)
94cffc63 11667 ,@(package-native-inputs base))))))
8ab59181
HG
11668
11669(define-public python-setproctitle
11670(package
11671 (name "python-setproctitle")
11672 (version "1.1.10")
11673 (source
11674 (origin
11675 (method url-fetch)
11676 (uri (pypi-uri "setproctitle" version))
11677 (sha256
11678 (base32
11679 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11680 (build-system python-build-system)
11681 (arguments
11682 '(#:phases
11683 (modify-phases %standard-phases
11684 (add-before 'check 'patch-Makefile
11685 ;; Stricly this is only required for the python2 variant.
11686 ;; But adding a phase in an inherited package seems to be
11687 ;; cumbersum. So we patch even for python3.
11688 (lambda _
11689 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11690 (when nose
11691 (substitute* "Makefile"
11692 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11693 (string-append nose "/bin/nosetests "))))
11694 #t)))
11695 (replace 'check
11696 (lambda _
11697 (setenv "PYTHON" (or (which "python3") (which "python")))
11698 (setenv "PYCONFIG" (or (which "python3-config")
11699 (which "python-config")))
11700 (setenv "CC" "gcc")
11701 ;; No need to extend PYTHONPATH to find the built package, since
11702 ;; the Makefile will build anyway
11703 (zero? (system* "make" "check")))))))
11704 (native-inputs
11705 `(("procps" ,procps))) ; required for tests
11706 (home-page
11707 "https://github.com/dvarrazzo/py-setproctitle")
11708 (synopsis
11709 "Setproctitle implementation for Python to customize the process title")
11710 (description "The library allows a process to change its title (as displayed
11711by system tools such as ps and top).
11712
11713Changing the title is mostly useful in multi-process systems, for
11714example when a master process is forked: changing the children's title
11715allows to identify the task each process is busy with. The technique
11716is used by PostgreSQL and the OpenSSH Server for example.")
11717 (license license:bsd-3)
11718 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11719
11720(define-public python2-setproctitle
11721 (let ((base (package-with-python2
11722 (strip-python2-variant python-setproctitle))))
11723 (package
11724 (inherit base)
11725 (native-inputs `(("python2-nose" ,python2-nose)
11726 ,@(package-native-inputs base))))))
162e42d8
HG
11727
11728(define-public python-validictory
11729 (package
11730 (name "python-validictory")
11731 (version "1.0.1")
11732 (source
11733 (origin
11734 (method url-fetch)
11735 (uri (pypi-uri "validictory" version))
11736 (sha256
11737 (base32
11738 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11739 (build-system python-build-system)
11740 (arguments
11741 '(#:phases
11742 (modify-phases %standard-phases
11743 (add-after 'unpack 'bootstrap
11744 ;; Move the tests out of the package directory to avoid
11745 ;; packaging them.
11746 (lambda* _
11747 (rename-file "validictory/tests" "tests")
11748 (delete-file "tests/__init__.py")))
11749 (replace 'check
11750 (lambda _
11751 ;; Extend PYTHONPATH so the built package will be found.
11752 (setenv "PYTHONPATH"
11753 (string-append (getcwd) "/build/lib:"
11754 (getenv "PYTHONPATH")))
11755 (zero? (system* "py.test" "-vv" )))))))
11756 (native-inputs
11757 `(("python-pytest" ,python-pytest)))
11758 (home-page
11759 "https://github.com/jamesturk/validictory")
11760 (synopsis "General purpose Python data validator")
11761 (description "It allows validation of arbitrary Python data structures.
11762
11763The schema format is based on the JSON Schema
11764proposal (http://json-schema.org), so combined with json the library is also
11765useful as a validator for JSON data.")
f210e944 11766 (license license:expat)))
162e42d8
HG
11767
11768(define-public python2-validictory
f210e944 11769 (package-with-python2 python-validictory))
0990edfe
DM
11770
11771(define-public python-aniso8601
11772 (package
11773 (name "python-aniso8601")
11774 (version "1.1.0")
11775 (source
11776 (origin
11777 (method url-fetch)
11778 (uri (pypi-uri "aniso8601" version))
11779 (sha256
11780 (base32
11781 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11782 (build-system python-build-system)
11783 (propagated-inputs
22d7360b 11784 `(("python-dateutil" ,python-dateutil)))
0990edfe
DM
11785 (home-page
11786 "https://bitbucket.org/nielsenb/aniso8601")
11787 (synopsis
11788 "Python library for parsing ISO 8601 strings")
11789 (description
11790 "This package contains a library for parsing ISO 8601 datetime strings.")
11791 (license license:bsd-3)))
999d964d
DM
11792
11793(define-public python-flask-restful
11794 (package
11795 (name "python-flask-restful")
11796 (version "0.3.5")
11797 (source
11798 (origin
11799 (method url-fetch)
11800 (uri (pypi-uri "Flask-RESTful" version))
11801 (sha256
11802 (base32
11803 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11804 (build-system python-build-system)
11805 (propagated-inputs
11806 `(("python-aniso8601" ,python-aniso8601)
11807 ("python-flask" ,python-flask)
11808 ("python-pycrypto" ,python-pycrypto)
11809 ("python-pytz" ,python-pytz)))
11810 (native-inputs
11811 `(;; Optional dependency of Flask. Tests need it.
11812 ("python-blinker" ,python-blinker)
11813 ("python-mock" ,python-mock) ; For tests
11814 ("python-nose" ,python-nose) ; For tests
11815 ("python-sphinx" ,python-sphinx)))
11816 (home-page
11817 "https://www.github.com/flask-restful/flask-restful/")
11818 (synopsis
11819 "Flask module for creating REST APIs")
11820 (description
11821 "This package contains a Flask module for creating REST APIs.")
11822 (license license:bsd-3)))
31288222
DM
11823
11824(define-public python-flask-basicauth
11825 (package
11826 (name "python-flask-basicauth")
11827 (version "0.2.0")
11828 (source
11829 (origin
11830 (method url-fetch)
11831 (uri (pypi-uri "Flask-BasicAuth" version))
11832 (sha256
11833 (base32
11834 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11835 (build-system python-build-system)
11836 (propagated-inputs
11837 `(("python-flask" ,python-flask)))
11838 (home-page
11839 "https://github.com/jpvanhal/flask-basicauth")
11840 (synopsis
11841 "HTTP basic access authentication for Flask")
11842 (description
11843 "This package provides HTTP basic access authentication for Flask.")
11844 (license license:bsd-3)))
903276d0
DM
11845
11846(define-public python-flask-sqlalchemy
11847 (package
11848 (name "python-flask-sqlalchemy")
11849 (version "2.1")
11850 (source
11851 (origin
11852 (method url-fetch)
11853 (uri (pypi-uri "Flask-SQLAlchemy" version))
11854 (sha256
11855 (base32
11856 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11857 (build-system python-build-system)
11858 (propagated-inputs
11859 `(("python-flask" ,python-flask)
11860 ("python-sqlalchemy" ,python-sqlalchemy)))
11861 (home-page
11862 "http://github.com/mitsuhiko/flask-sqlalchemy")
11863 (synopsis
11864 "Module adding SQLAlchemy support to your Flask application")
11865 (description
11866 "This package adds SQLAlchemy support to your Flask application.")
11867 (license license:bsd-3)))
329b4b3b
LF
11868
11869(define-public python-pyev
11870 (package
11871 (name "python-pyev")
11872 (version "0.9.0")
11873 (source
11874 (origin
11875 (method url-fetch)
11876 (uri (pypi-uri "pyev" version))
11877 (sha256
11878 (base32
11879 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11880 (build-system python-build-system)
11881 (arguments
11882 `(#:tests? #f ; no test suite
11883 #:phases
11884 (modify-phases %standard-phases
11885 (add-after 'unpack 'patch
11886 (lambda* (#:key inputs #:allow-other-keys)
11887 (let ((libev (string-append (assoc-ref inputs "libev")
11888 "/lib/libev.so.4")))
11889 (substitute* "setup.py"
11890 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11891 (string-append "libev_dll_name = \"" libev "\"")))))))))
11892 (inputs
11893 `(("libev" ,libev)))
11894 (home-page "http://pythonhosted.org/pyev/")
11895 (synopsis "Python libev interface")
11896 (description "Pyev provides a Python interface to libev.")
11897 (license license:gpl3)))
11898
11899(define-public python2-pyev
11900 (package-with-python2 python-pyev))
45b4f127
DM
11901
11902(define-public python-imagesize
11903 (package
11904 (name "python-imagesize")
11905 (version "0.7.1")
11906 (source
11907 (origin
11908 (method url-fetch)
11909 (uri (pypi-uri "imagesize" version))
11910 (sha256
11911 (base32
11912 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11913 (build-system python-build-system)
9422c98a
LF
11914 (arguments
11915 '(;; Test files are not distributed on PyPi:
11916 ;; https://github.com/shibukawa/imagesize_py/issues/7
11917 #:tests? #f))
45b4f127
DM
11918 (home-page "https://github.com/shibukawa/imagesize_py")
11919 (synopsis "Gets image size of files in variaous formats in Python")
11920 (description
11921 "This package allows determination of image size from
11922PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 11923 (license license:expat)))
45b4f127
DM
11924
11925(define-public python2-imagesize
f210e944 11926 (package-with-python2 python-imagesize))
2f6dd9cd
AI
11927
11928(define-public python-axolotl-curve25519
11929 (package
11930 (name "python-axolotl-curve25519")
11931 (version "0.1")
11932 (source
11933 (origin
11934 (method git-fetch)
11935 (uri (git-reference
11936 (url "git://github.com/tgalal/python-axolotl-curve25519")
11937 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11938 (file-name (string-append name "-" version "-checkout"))
11939 (sha256
11940 (base32
11941 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11942 (build-system python-build-system)
11943 (arguments
11944 `(;; Prevent creation of the egg. This works around
11945 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11946 #:configure-flags '("--root=/")))
2f6dd9cd
AI
11947 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11948 (synopsis "Python wrapper for curve25519 library")
11949 (description "This is a python wrapper for the curve25519 library
11950with ed25519 signatures. The C code was pulled from
11951libaxolotl-android. At the moment this wrapper is meant for use by
11952python-axolotl.")
11953 (license (list license:gpl3 ; Most files
683cdbf5 11954 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
11955
11956(define-public python2-axolotl-curve25519
11957 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
11958
11959(define-public python-axolotl
11960 (package
11961 (name "python-axolotl")
11962 (version "0.1.35")
11963 (source
11964 (origin
11965 (method url-fetch)
11966 (uri (string-append
11967 "https://github.com/tgalal/python-axolotl/archive/"
11968 version ".tar.gz"))
11969 (file-name (string-append name "-" version ".tar.gz"))
11970 (sha256
11971 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11972 (build-system python-build-system)
11973 (arguments
11974 `(#:phases
11975 (modify-phases %standard-phases
11976 ;; Don't install tests
11977 (add-before 'install 'remove-tests
11978 (lambda _
11979 (for-each delete-file-recursively
11980 '("axolotl/tests" "build/lib/axolotl/tests"))
01fb9f66 11981 #t)))))
06ff0837
AI
11982 (propagated-inputs
11983 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11984 ("python-dateutil" ,python-dateutil)
11985 ("python-protobuf" ,python-protobuf)
11986 ("python-pycrypto" ,python-pycrypto)))
11987 (home-page "https://github.com/tgalal/python-axolotl")
11988 (synopsis "Python port of libaxolotl-android")
11989 (description "This is a python port of libaxolotl-android. This
11990is a ratcheting forward secrecy protocol that works in synchronous and
11991asynchronous messaging environments.")
11992 (license license:gpl3)))
11993
11994(define-public python2-axolotl
11995 (package-with-python2 python-axolotl))
e2fca490
DM
11996
11997(define-public python-termstyle
11998 (package
11999 (name "python-termstyle")
12000 (version "0.1.11")
12001 (source
12002 (origin
12003 (method url-fetch)
12004 (uri (pypi-uri "termstyle" version))
12005 (sha256
12006 (base32
12007 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12008 (build-system python-build-system)
7917a135
MB
12009 (arguments
12010 '(#:phases
12011 (modify-phases %standard-phases
12012 (replace 'check
12013 (lambda _
12014 (zero? (system* "python" "test3.py")))))))
e2fca490
DM
12015 (home-page "http://github.com/gfxmonk/termstyle")
12016 (synopsis "Console text coloring for Python")
12017 (description "This package provides console text coloring for Python.")
12018 (license license:bsd-3)))
1e6112d8
DM
12019
12020(define-public python-rednose
12021 (package
12022 (name "python-rednose")
12023 (version "1.2.1")
12024 (source
12025 (origin
12026 (method url-fetch)
12027 (uri (pypi-uri "rednose" version))
12028 (sha256
12029 (base32
12030 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
12031 (build-system python-build-system)
12032 (arguments
12033 `(#:phases
12034 (modify-phases %standard-phases
12035 (add-after 'unpack 'fix-deps
12036 (lambda _
12037 ;; See <https://github.com/JBKahn/rednose/issues/12>
12038 (substitute* "setup.py"
12039 (("python-termstyle") "termstyle"))
12040 #t)))))
12041 (propagated-inputs
12042 `(("python-colorama" ,python-colorama)
12043 ("python-termstyle" ,python-termstyle)))
12044 (native-inputs
12045 `(("python-six" ,python-six)
12046 ("python-nose" ,python-nose)))
12047 (home-page "https://github.com/JBKahn/rednose")
12048 (synopsis "Colored output for Python nosetests")
12049 (description "This package provides colored output for the
12050@command{nosetests} command of the Python Nose unit test framework.")
12051 (license license:bsd-3)))
0a7f17f0
DM
12052
12053(define-public python-flask-restplus
12054 (package
12055 (name "python-flask-restplus")
12056 (version "0.9.2")
12057 (source
12058 (origin
12059 (method url-fetch)
12060 (uri (pypi-uri "flask-restplus" version))
12061 (sha256
12062 (base32
12063 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
12064 (build-system python-build-system)
59f74825
MB
12065 (arguments
12066 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
12067 ;; #:phases
12068 ;; (modify-phases %standard-phases
12069 ;; (replace 'check
12070 ;; (lambda _
12071 ;; (zero? (system* "nosetests")))))))
0a7f17f0
DM
12072 (propagated-inputs
12073 `(("python-aniso8601" ,python-aniso8601)
12074 ("python-flask" ,python-flask)
12075 ("python-jsonschema" ,python-jsonschema)
12076 ("python-pytz" ,python-pytz)
12077 ("python-six" ,python-six)))
12078 (native-inputs
12079 `(("python-tzlocal" ,python-tzlocal)
12080 ("python-blinker" ,python-blinker)
12081 ("python-nose" ,python-nose)
12082 ("python-rednose" ,python-rednose)))
12083 (home-page "https://github.com/noirbizarre/flask-restplus")
12084 (synopsis "Framework for documented API development with Flask")
12085 (description "This package provides a framework for API development with
12086the Flask web framework in Python. It is similar to package
12087@code{python-flask-restful} but supports the @code{python-swagger}
12088documentation builder.")
12089 (license license:expat)))
1ed21519
DM
12090
12091(define-public python-sadisplay
12092 (package
12093 (name "python-sadisplay")
12094 (version "0.4.6")
12095 (source
12096 (origin
12097 (method url-fetch)
12098 (uri (pypi-uri "sadisplay" version))
12099 (sha256
12100 (base32
12101 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
12102 (build-system python-build-system)
12103 (propagated-inputs
12104 `(("python-sqlalchemy" ,python-sqlalchemy)))
12105 (native-inputs
12106 `(("python-nose" ,python-nose)))
12107 (home-page "https://bitbucket.org/estin/sadisplay")
12108 (synopsis "SQLAlchemy schema displayer")
12109 (description "This package provides a program to build Entity
12110Relationship diagrams from a SQLAlchemy model (or directly from the
12111database).")
12112 (license license:bsd-3)))
12113
12114(define-public python2-sadisplay
12115 (package-with-python2 python-sadisplay))
444a79b6
DM
12116
12117(define-public python-flask-restful-swagger
12118 (package
12119 (name "python-flask-restful-swagger")
12120 (version "0.19")
12121 (source
12122 (origin
12123 (method url-fetch)
12124 (uri (pypi-uri "flask-restful-swagger" version))
12125 (sha256
12126 (base32
12127 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
12128 (build-system python-build-system)
12129 (propagated-inputs
12130 `(("python-flask-restful" ,python-flask-restful)))
12131 (home-page "https://github.com/rantav/flask-restful-swagger")
12132 (synopsis "Extract Swagger specs from Flask-Restful projects")
12133 (description "This package lets you extract Swagger API documentation
12134specs from your Flask-Restful projects.")
12135 (license license:expat)))
12136
12137(define-public python2-flask-restful-swagger
12138 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
12139
12140(define-public python-argcomplete
12141 (package
12142 (name "python-argcomplete")
12143 (version "1.7.0")
12144 (source
12145 (origin
12146 (method url-fetch)
12147 (uri (pypi-uri "argcomplete" version))
12148 (sha256
12149 (base32
12150 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
12151 (build-system python-build-system)
12152 (home-page "https://github.com/kislyuk/argcomplete")
12153 (synopsis "Shell tab completion for Python argparse")
12154 (description "argcomplete provides extensible command line tab completion
12155of arguments and options for Python scripts using @code{argparse}. It's
12156particularly useful for programs with many options or sub-parsers that can
12157dynamically suggest completions; for example, when browsing resources over the
12158network.")
12159 (license license:asl2.0)))
12160
12161(define-public python2-argcomplete
12162 (package-with-python2 python-argcomplete))