gnu: python-keystoneclient: Disable tests.
[jackhill/guix/guix.git] / gnu / packages / python.scm
CommitLineData
a01b6da7
NK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
48b311b1 3;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
8e451885 4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
e99f4211 5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
a480bc41 6;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
da6ce3f1 7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
e99f4211 8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
d95a56c6 9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
534db463 10;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
0bdc1671 11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
345f0611 12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
2b2f2fc1 13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
6a44697d 14;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
02a8a187 15;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
b9893908 16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
264ae686 17;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
1872f1bb 18;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
daeeea71 19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
b31fbea5 20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
88bb4197 21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
b8fdbca3 22;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
0de78c95 23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
9250b0f3 24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
47d0b292 25;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
42c4b246 26;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
6eb7af2a 27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
3f641af0 28;;; Copyright © 2016 David Craven <david@craven.ch>
dddcb25c 29;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
4efb9c54 30;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
b04a52a6 31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
ee5fb7ee 32;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
2f6dd9cd 33;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
d3eff97a 34;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
6c2e82bc 35;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
a01b6da7
NK
36;;;
37;;; This file is part of GNU Guix.
38;;;
39;;; GNU Guix is free software; you can redistribute it and/or modify it
40;;; under the terms of the GNU General Public License as published by
41;;; the Free Software Foundation; either version 3 of the License, or (at
42;;; your option) any later version.
43;;;
44;;; GNU Guix is distributed in the hope that it will be useful, but
45;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47;;; GNU General Public License for more details.
48;;;
49;;; You should have received a copy of the GNU General Public License
50;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51
1ffa7090 52(define-module (gnu packages python)
3f641af0 53 #:use-module ((guix licenses) #:prefix license:)
3fdc99da 54 #:use-module (gnu packages)
8e451885 55 #:use-module (gnu packages algebra)
d79a343b 56 #:use-module (gnu packages adns)
89b2e0b0 57 #:use-module (gnu packages attr)
d96034ed 58 #:use-module (gnu packages backup)
3969ca54 59 #:use-module (gnu packages bash)
1ffa7090 60 #:use-module (gnu packages compression)
4ed20663 61 #:use-module (gnu packages databases)
ddc63a56 62 #:use-module (gnu packages django)
5e1c9367 63 #:use-module (gnu packages file)
4ed20663 64 #:use-module (gnu packages fontutils)
4ed20663
AE
65 #:use-module (gnu packages gcc)
66 #:use-module (gnu packages ghostscript)
6eb7af2a 67 #:use-module (gnu packages gl)
4ed20663 68 #:use-module (gnu packages glib)
6eb7af2a 69 #:use-module (gnu packages gstreamer)
4ed20663 70 #:use-module (gnu packages gtk)
421a80a2 71 #:use-module (gnu packages icu4c)
c937562e 72 #:use-module (gnu packages image)
4ed20663 73 #:use-module (gnu packages imagemagick)
d79a343b 74 #:use-module (gnu packages libevent)
b10ab723 75 #:use-module (gnu packages libffi)
89b2e0b0 76 #:use-module (gnu packages linux)
0da98533 77 #:use-module (gnu packages maths)
4ed20663 78 #:use-module (gnu packages multiprecision)
45203542 79 #:use-module (gnu packages networking)
be7134bf 80 #:use-module (gnu packages ncurses)
b04a52a6 81 #:use-module (gnu packages openstack)
d488d5d6 82 #:use-module (gnu packages password-utils)
c9b1b4f9 83 #:use-module (gnu packages pcre)
4ed20663 84 #:use-module (gnu packages perl)
b10ab723 85 #:use-module (gnu packages pkg-config)
06ff0837 86 #:use-module (gnu packages protobuf)
4ed20663 87 #:use-module (gnu packages readline)
6eb7af2a 88 #:use-module (gnu packages sdl)
c9b1b4f9 89 #:use-module (gnu packages statistics)
8f9ac901 90 #:use-module (gnu packages tex)
1c65314c 91 #:use-module (gnu packages texinfo)
cc2b77df 92 #:use-module (gnu packages tls)
e25f0174 93 #:use-module (gnu packages version-control)
02f8f804 94 #:use-module (gnu packages video)
8d12be1e 95 #:use-module (gnu packages web)
ce0614dd 96 #:use-module (gnu packages base)
26b307e2 97 #:use-module (gnu packages xml)
6fa14469 98 #:use-module (gnu packages xorg)
0bdc1671 99 #:use-module (gnu packages xdisorg)
4ed20663 100 #:use-module (gnu packages zip)
afa181ff 101 #:use-module (gnu packages tcl)
63bcec71 102 #:use-module (gnu packages bdw-gc)
a01b6da7
NK
103 #:use-module (guix packages)
104 #:use-module (guix download)
ea5456c8 105 #:use-module (guix git-download)
11bb85a1 106 #:use-module (guix utils)
acc26ff1 107 #:use-module (guix build-system gnu)
d8c4998f 108 #:use-module (guix build-system cmake)
898238b9 109 #:use-module (guix build-system python)
1c65314c
FB
110 #:use-module (guix build-system trivial)
111 #:use-module (srfi srfi-1))
a01b6da7 112
45848023 113(define-public python-2.7
a01b6da7
NK
114 (package
115 (name "python")
f0499100 116 (version "2.7.12")
a01b6da7
NK
117 (source
118 (origin
119 (method url-fetch)
9b43a0ff 120 (uri (string-append "https://www.python.org/ftp/python/"
a01b6da7
NK
121 version "/Python-" version ".tar.xz"))
122 (sha256
123 (base32
f0499100 124 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
c3052d6b
ML
125 (patches (search-patches "python-2.7-search-paths.patch"
126 "python-2-deterministic-build-info.patch"
15e57f57 127 "python-2.7-site-prefixes.patch"
c3052d6b 128 "python-2.7-source-date-epoch.patch"))
10a42aa2
EF
129 (modules '((guix build utils)))
130 ;; suboptimal to delete failing tests here, but if we delete them in the
131 ;; arguments then we need to make sure to strip out that phase when it
132 ;; gets inherited by python and python-minimal.
133 (snippet
134 '(begin
135 (for-each delete-file
136 '("Lib/test/test_compileall.py"
f0499100 137 "Lib/test/test_ctypes.py" ; fails on mips64el
10a42aa2
EF
138 "Lib/test/test_distutils.py"
139 "Lib/test/test_import.py"
140 "Lib/test/test_shutil.py"
141 "Lib/test/test_socket.py"
1bb163b0 142 "Lib/test/test_subprocess.py"))
10a42aa2 143 #t))))
02f0c3b2
LC
144 (outputs '("out"
145 "tk")) ;tkinter; adds 50 MiB to the closure
a01b6da7 146 (build-system gnu-build-system)
3fdc99da 147 (arguments
10a42aa2 148 `(;; 356 tests OK.
e7e7a1eb
EF
149 ;; 6 tests failed:
150 ;; test_compileall test_distutils test_import test_shutil test_socket
151 ;; test_subprocess
152 ;; 39 tests skipped:
ff6f33cf
ED
153 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
154 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
e7e7a1eb
EF
155 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
156 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
157 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
158 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
159 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
160 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
161 ;; test_winreg test_winsound test_zipfile64
162 ;; 4 skips unexpected on linux2:
163 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
af807dea 164 #:test-target "test"
3fdc99da 165 #:configure-flags
6a20289d
LC
166 (list "--enable-shared" ;allow embedding
167 "--with-system-ffi" ;build ctypes
aaf75c89 168 "--with-ensurepip=install" ;install pip and setuptools
6a20289d
LC
169 (string-append "LDFLAGS=-Wl,-rpath="
170 (assoc-ref %outputs "out") "/lib"))
fd982732 171
d2cc9c7c
LC
172 #:modules ((ice-9 ftw) (ice-9 match)
173 (guix build utils) (guix build gnu-build-system))
fd982732 174 #:phases
46472ecd
MW
175 (modify-phases %standard-phases
176 (add-before
177 'configure 'patch-lib-shells
178 (lambda _
179 ;; Filter for existing files, since some may not exist in all
180 ;; versions of python that are built with this recipe.
181 (substitute* (filter file-exists?
182 '("Lib/subprocess.py"
183 "Lib/popen2.py"
184 "Lib/distutils/tests/test_spawn.py"
185 "Lib/test/test_subprocess.py"))
186 (("/bin/sh") (which "sh")))
dedc8320
LC
187
188 ;; Use zero as the timestamp in .pyc files so that builds are
189 ;; deterministic. TODO: Remove it when this variable is set in
190 ;; gnu-build-system.scm.
a665996f 191 (setenv "SOURCE_DATE_EPOCH" "1")
46472ecd 192 #t))
5b4e2791
LC
193 (add-before 'configure 'do-not-record-configure-flags
194 (lambda* (#:key configure-flags #:allow-other-keys)
195 ;; Remove configure flags from the installed '_sysconfigdata.py'
196 ;; and 'Makefile' so we don't end up keeping references to the
197 ;; build tools.
198 ;;
199 ;; Preserve at least '--with-system-ffi' since otherwise the
200 ;; thing tries to build libffi, fails, and we end up with a
201 ;; Python that lacks ctypes.
202 (substitute* "configure"
203 (("^CONFIG_ARGS=.*$")
204 (format #f "CONFIG_ARGS='~a'\n"
205 (if (member "--with-system-ffi" configure-flags)
206 "--with-system-ffi"
207 ""))))
208 #t))
46472ecd
MW
209 (add-before
210 'check 'pre-check
211 (lambda _
212 ;; 'Lib/test/test_site.py' needs a valid $HOME
213 (setenv "HOME" (getcwd))
214 #t))
215 (add-after
216 'unpack 'set-source-file-times-to-1980
217 ;; XXX One of the tests uses a ZIP library to pack up some of the
218 ;; source tree, and fails with "ZIP does not support timestamps
219 ;; before 1980". Work around this by setting the file times in the
220 ;; source tree to sometime in early 1980.
221 (lambda _
222 (let ((circa-1980 (* 10 366 24 60 60)))
223 (ftw "." (lambda (file stat flag)
224 (utime file circa-1980 circa-1980)
225 #t))
02f0c3b2 226 #t)))
9ffe61b0
LC
227 (add-after 'install 'remove-tests
228 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
229 ;; because these files are used by some libraries out there.
230 (lambda* (#:key outputs #:allow-other-keys)
231 (let ((out (assoc-ref outputs "out")))
232 (match (scandir (string-append out "/lib")
233 (lambda (name)
234 (string-prefix? "python" name)))
235 ((pythonX.Y)
236 (let ((testdir (string-append out "/lib/" pythonX.Y
237 "/test")))
238 (with-directory-excursion testdir
239 (for-each delete-file-recursively
240 (scandir testdir
241 (match-lambda
242 ((or "." "..") #f)
243 (file
244 (not
245 (string-prefix? "test_support."
246 file))))))
247 (call-with-output-file "__init__.py" (const #t))
248 #t)))))))
216c283b
LC
249 (add-before 'strip 'make-libraries-writable
250 (lambda* (#:key outputs #:allow-other-keys)
251 ;; Make .so files writable so they can be stripped.
252 (let ((out (assoc-ref outputs "out")))
253 (for-each (lambda (file)
254 (chmod file #o755))
255 (find-files (string-append out "/lib")
256 "\\.so"))
257 #t)))
02f0c3b2
LC
258 (add-after 'install 'move-tk-inter
259 (lambda* (#:key outputs #:allow-other-keys)
260 ;; When Tkinter support is built move it to a separate output so
261 ;; that the main output doesn't contain a reference to Tcl/Tk.
262 (let ((out (assoc-ref outputs "out"))
263 (tk (assoc-ref outputs "tk")))
264 (when tk
265 (match (find-files out "tkinter.*\\.so")
266 ((tkinter.so)
267 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
268 ;; want it under TK/lib/pythonX.Y/site-packages.
269 (let* ((len (string-length out))
270 (target (string-append
271 tk "/"
272 (string-drop
273 (dirname (dirname tkinter.so))
274 len)
275 "/site-packages")))
276 (install-file tkinter.so target)
277 (delete-file tkinter.so)))))
278 #t))))))
a01b6da7 279 (inputs
3fdc99da
CR
280 `(("bzip2" ,bzip2)
281 ("gdbm" ,gdbm)
b10ab723 282 ("libffi" ,libffi) ; for ctypes
b88e1b0a 283 ("sqlite" ,sqlite) ; for sqlite extension
a01b6da7 284 ("openssl" ,openssl)
3fdc99da 285 ("readline" ,readline)
afa181ff
LC
286 ("zlib" ,zlib)
287 ("tcl" ,tcl)
288 ("tk" ,tk))) ; for tkinter
b10ab723
CR
289 (native-inputs
290 `(("pkg-config" ,pkg-config)))
9be8d7c8
LC
291 (native-search-paths
292 (list (search-path-specification
293 (variable "PYTHONPATH")
af070955 294 (files '("lib/python2.7/site-packages")))))
f0499100 295 (home-page "https://www.python.org")
afa181ff 296 (synopsis "High-level, dynamically-typed programming language")
a01b6da7
NK
297 (description
298 "Python is a remarkably powerful dynamic programming language that
299is used in a wide variety of application domains. Some of its key
300distinguishing features include: clear, readable syntax; strong
301introspection capabilities; intuitive object orientation; natural
302expression of procedural code; full modularity, supporting hierarchical
303packages; exception-based error handling; and very high level dynamic
304data types.")
3f641af0 305 (license license:psfl)))
acc26ff1 306
45848023
HG
307;; Current 2.x version.
308(define-public python-2 python-2.7)
309
72df6680 310(define-public python-3.5
b24d1cfc 311 (package (inherit python-2)
72df6680 312 (version "3.5.2")
717003e3
LC
313 (source (origin
314 (method url-fetch)
315 (uri (string-append "https://www.python.org/ftp/python/"
316 version "/Python-" version ".tar.xz"))
fc1adab1
AK
317 (patches (search-patches
318 "python-fix-tests.patch"
72df6680 319 "python-3.5-fix-tests.patch"
fc1adab1
AK
320 "python-3-deterministic-build-info.patch"
321 "python-3-search-paths.patch"))
717003e3
LC
322 (patch-flags '("-p0"))
323 (sha256
324 (base32
72df6680 325 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
1f434457
MW
326 (arguments (substitute-keyword-arguments (package-arguments python-2)
327 ((#:tests? _) #t)))
1aebc0cb
AE
328 (native-search-paths
329 (list (search-path-specification
330 (variable "PYTHONPATH")
0e05d01e
SB
331 (files (list (string-append "lib/python"
332 (version-major+minor version)
333 "/site-packages"))))))))
f26a77ff 334
72df6680
LF
335(define-public python-3.4
336 (package (inherit python-3.5)
337 (version "3.4.5")
338 (source (origin
339 (method url-fetch)
340 (uri (string-append "https://www.python.org/ftp/python/"
341 version "/Python-" version ".tar.xz"))
342 (patches (search-patches
343 "python-fix-tests.patch"
344 "python-3.4-fix-tests.patch"
345 "python-3-deterministic-build-info.patch"
346 "python-3-search-paths.patch"))
347 (patch-flags '("-p0"))
348 (sha256
349 (base32
350 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
351
45848023 352;; Current 3.x version.
72df6680 353(define-public python-3 python-3.5)
45848023
HG
354
355;; Current major version.
356(define-public python python-3)
357
95288fcc
LC
358;; Minimal variants of Python, mostly used to break the cycle between Tk and
359;; Python (Tk -> libxcb -> Python.)
360
361(define-public python2-minimal
362 (package (inherit python-2)
363 (name "python-minimal")
02f0c3b2 364 (outputs '("out"))
95288fcc
LC
365 (arguments
366 (substitute-keyword-arguments (package-arguments python-2)
c5a05e31
LC
367 ((#:configure-flags cf)
368 `(append ,cf '("--without-system-ffi")))))
95288fcc
LC
369 (inputs '()))) ;none of the optional dependencies
370
371(define-public python-minimal
898238b9 372 (package (inherit python)
95288fcc 373 (name "python-minimal")
02f0c3b2 374 (outputs '("out"))
95288fcc 375
d0b73960 376 ;; Build fails due to missing ctypes without libffi.
95288fcc
LC
377 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
378 ;; zlib is required by 'zipimport', used by pip.
d0b73960
CAW
379 (inputs `(("libffi" ,libffi)
380 ("openssl" ,openssl)
95288fcc
LC
381 ("zlib" ,zlib)))))
382
64cb064c
LC
383(define* (wrap-python3 python
384 #:optional
385 (name (string-append (package-name python) "-wrapper")))
898238b9 386 (package (inherit python)
95288fcc 387 (name name)
898238b9
AE
388 (source #f)
389 (build-system trivial-build-system)
02f0c3b2 390 (outputs '("out"))
3969ca54 391 (inputs `(("bash" ,bash)))
3c0f2329 392 (propagated-inputs `(("python" ,python)))
898238b9
AE
393 (arguments
394 `(#:modules ((guix build utils))
395 #:builder
396 (begin
397 (use-modules (guix build utils))
398 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
399 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
400 (mkdir-p bin)
401 (for-each
402 (lambda (old new)
403 (symlink (string-append python old)
404 (string-append bin "/" new)))
3969ca54
SB
405 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
406 `("python" ,"pydoc" ,"idle" ,"pip"))
407 ;; python-config outputs search paths based upon its location,
408 ;; use a bash wrapper to avoid changing its outputs.
409 (let ((bash (string-append (assoc-ref %build-inputs "bash")
410 "/bin/bash"))
411 (old (string-append python "python3-config"))
412 (new (string-append bin "/python-config")))
413 (with-output-to-file new
414 (lambda ()
415 (format #t "#!~a~%" bash)
416 (format #t "exec \"~a\" \"$@\"~%" old)
417 (chmod new #o755)
418 #t)))))))
0d56e3e1
LC
419 (synopsis "Wrapper for the Python 3 commands")
420 (description
421 "This package provides wrappers for the commands of Python@tie{}3.x such
422that they can be invoked under their usual name---e.g., @command{python}
423instead of @command{python3}.")))
424
95288fcc
LC
425(define-public python-wrapper (wrap-python3 python))
426(define-public python-minimal-wrapper (wrap-python3 python-minimal))
898238b9 427
aaf625b8
RW
428(define-public python-psutil
429 (package
430 (name "python-psutil")
88535a44 431 (version "4.3.0")
aaf625b8
RW
432 (source
433 (origin
434 (method url-fetch)
f56777be 435 (uri (pypi-uri "psutil" version))
aaf625b8
RW
436 (sha256
437 (base32
88535a44 438 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
aaf625b8 439 (build-system python-build-system)
fb08c4fe
MB
440 (arguments
441 ;; FIXME: some tests does not return and times out.
442 '(#:tests? #f))
88535a44 443 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
444 (synopsis "Library for retrieving information on running processes")
445 (description
446 "psutil (Python system and process utilities) is a library for retrieving
447information on running processes and system utilization (CPU, memory, disks,
448network) in Python. It is useful mainly for system monitoring, profiling and
449limiting process resources and management of running processes. It implements
450many functionalities offered by command line tools such as: ps, top, lsof,
451netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
452pidof, tty, taskset, pmap.")
3f641af0 453 (license license:bsd-3)))
aaf625b8
RW
454
455(define-public python2-psutil
456 (package-with-python2 python-psutil))
898238b9 457
f9da1d8a
ED
458(define-public python-passlib
459 (package
460 (name "python-passlib")
1c9f78ec 461 (version "1.7.0")
f9da1d8a
ED
462 (source
463 (origin
464 (method url-fetch)
690e8c66 465 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
466 (sha256
467 (base32
1c9f78ec 468 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
f9da1d8a
ED
469 (build-system python-build-system)
470 (native-inputs
f3b98f4f 471 `(("python-nose" ,python-nose)))
f22efa01 472 (propagated-inputs
f9da1d8a
ED
473 `(("python-py-bcrypt" ,python-py-bcrypt)))
474 (arguments
475 `(#:phases
476 (alist-cons-before
477 'check 'set-PYTHON_EGG_CACHE
478 ;; some tests require access to "$HOME/.cython"
479 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
480 %standard-phases)))
481 (home-page "https://bitbucket.org/ecollins/passlib")
482 (synopsis
483 "Comprehensive password hashing framework")
484 (description
485 "Passlib is a password hashing library for Python 2 & 3, which provides
486cross-platform implementations of over 30 password hashing algorithms, as well
487as a framework for managing existing password hashes. It's designed to be
488useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
489to providing full-strength password hashing for multi-user application.")
3f641af0 490 (license license:bsd-3)))
f9da1d8a
ED
491
492(define-public python2-passlib
493 (package-with-python2 python-passlib))
494
feb0d9c3
ED
495(define-public python-py-bcrypt
496 (package
497 (name "python-py-bcrypt")
498 (version "0.4")
499 (source
500 (origin
501 (method url-fetch)
502 (uri (string-append
503 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
504 version
505 ".tar.gz"))
506 (sha256
507 (base32
508 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
509 (build-system python-build-system)
feb0d9c3
ED
510 (home-page "https://code.google.com/p/py-bcrypt")
511 (synopsis
512 "Bcrypt password hashing and key derivation")
513 (description
514 "A python wrapper of OpenBSD's Blowfish password hashing code. This
515system hashes passwords using a version of Bruce Schneier's Blowfish block
516cipher with modifications designed to raise the cost of off-line password
517cracking and frustrate fast hardware implementation. The computation cost of
518the algorithm is parametised, so it can be increased as computers get faster.
519The intent is to make a compromise of a password database less likely to
520result in an attacker gaining knowledge of the plaintext passwords (e.g. using
521John the Ripper).")
522 ;; "sha2.c" is under BSD-3;
523 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
524 ;; the rest is under ISC.
3f641af0 525 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
526
527(define-public python2-py-bcrypt
528 (package-with-python2 python-py-bcrypt))
529
530
429fdea1
ED
531(define-public python-paramiko
532 (package
533 (name "python-paramiko")
81b9bbbd 534 (version "1.16.0")
429fdea1
ED
535 (source
536 (origin
537 (method url-fetch)
81b9bbbd 538 (uri (pypi-uri "paramiko" version))
429fdea1
ED
539 (sha256
540 (base32
81b9bbbd 541 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1 542 (build-system python-build-system)
49910e6a
MB
543 (arguments
544 '(;; FIXME: One test fails with "EOFError not raised by connect".
545 #:tests? #f))
546 ;; #:phases
547 ;; (modify-phases %standard-phases
548 ;; (replace 'check
549 ;; (lambda _
550 ;; (zero? (system* "python" "test.py")))))))
a3fc12da 551 (propagated-inputs
f22efa01
HG
552 `(("python-pycrypto" ,python-pycrypto)
553 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
554 (home-page "http://www.paramiko.org/")
555 (synopsis "SSHv2 protocol library")
556 (description "Paramiko is a python implementation of the SSHv2 protocol,
557providing both client and server functionality. While it leverages a Python C
558extension for low level cryptography (PyCrypto), Paramiko itself is a pure
559Python interface around SSH networking concepts.")
3f641af0 560 (license license:lgpl2.1+)))
429fdea1
ED
561
562(define-public python2-paramiko
563 (package-with-python2 python-paramiko))
564
565
de73dbf6
ED
566(define-public python-httplib2
567 (package
568 (name "python-httplib2")
286f1bac 569 (version "0.9.2")
de73dbf6
ED
570 (source
571 (origin
572 (method url-fetch)
286f1bac 573 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
574 (sha256
575 (base32
286f1bac 576 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 577 (build-system python-build-system)
286f1bac 578 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
579 (synopsis "Comprehensive HTTP client library")
580 (description
581 "A comprehensive HTTP client library supporting many features left out of
582other HTTP libraries.")
583 (license license:expat)))
584
585(define-public python2-httplib2
586 (package-with-python2 python-httplib2))
587
67039875
ED
588(define-public python-ecdsa
589 (package
590 (name "python-ecdsa")
591 (version "0.13")
592 (source
593 (origin
594 (method url-fetch)
595 (uri (string-append
596 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
597 version
598 ".tar.gz"))
599 (sha256
600 (base32
601 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
602 (build-system python-build-system)
67039875
ED
603 (inputs
604 `(("openssl" ,openssl)))
605 (home-page
606 "http://github.com/warner/python-ecdsa")
607 (synopsis
608 "ECDSA cryptographic signature library (pure python)")
609 (description
610 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
611Curve Digital Signature Algorithm), implemented purely in Python. With this
612library, you can quickly create keypairs (signing key and verifying key), sign
613messages, and verify the signatures. The keys and signatures are very short,
614making them easy to handle and incorporate into other protocols.")
615 (license license:expat)))
616
617(define-public python2-ecdsa
618 (package-with-python2 python-ecdsa))
619
52323f32
ED
620(define-public python-ccm
621 (package
622 (name "python-ccm")
db5567f7 623 (version "2.1.6")
52323f32
ED
624 (source
625 (origin
626 (method url-fetch)
db5567f7 627 (uri (pypi-uri "ccm" version))
52323f32
ED
628 (sha256
629 (base32
db5567f7 630 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 631 (build-system python-build-system)
f22efa01 632 (propagated-inputs
52323f32 633 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
634 ;; Not listed in setup.py, but used in ccmlib/node.py for full
635 ;; functionality
636 ("python-psutil" ,python-psutil)
52323f32
ED
637 ("python-six" ,python-six)))
638 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
639 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
640localhost")
641 (description "Cassandra Cluster Manager is a development tool for testing
642local Cassandra clusters. It creates, launches and removes Cassandra clusters
643on localhost.")
3f641af0 644 (license license:asl2.0)))
52323f32
ED
645
646(define-public python2-ccm
647 (package-with-python2 python-ccm))
648
89114f39 649(define-public python-pytz
acc26ff1 650 (package
89114f39 651 (name "python-pytz")
61c9babb 652 (version "2016.3")
acc26ff1
CR
653 (source
654 (origin
655 (method url-fetch)
61c9babb 656 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
657 (sha256
658 (base32
61c9babb 659 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 660 (build-system python-build-system)
8498b8cf 661 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 662 (home-page "http://pythonhosted.org/pytz")
9e771e3b 663 (synopsis "Python timezone library")
acc26ff1
CR
664 (description
665 "This library allows accurate and cross platform timezone calculations
666using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 667 (license license:expat)))
5ace6e2f 668
89114f39 669(define-public python2-pytz
11bb85a1 670 (package-with-python2 python-pytz))
89114f39 671
fc50e9c6 672
89114f39 673(define-public python-babel
5ace6e2f 674 (package
89114f39 675 (name "python-babel")
3f37db6b 676 (version "2.3.2")
5ace6e2f
CR
677 (source
678 (origin
679 (method url-fetch)
b850a6d8 680 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
681 (sha256
682 (base32
3f37db6b 683 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f 684 (build-system python-build-system)
f22efa01 685 (propagated-inputs
f3b98f4f 686 `(("python-pytz" ,python-pytz)))
8498b8cf 687 (arguments `(#:tests? #f)) ; no test target
e1804763 688 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
689 (synopsis
690 "Tools for internationalizing Python applications")
691 (description
692 "Babel is composed of two major parts:
693- tools to build and work with gettext message catalogs
694- a Python interface to the CLDR (Common Locale Data Repository), providing
695access to various locale display names, localized number and date formatting,
696etc. ")
3f641af0 697 (license license:bsd-3)))
89114f39
AE
698
699(define-public python2-babel
11bb85a1 700 (package-with-python2 python-babel))
73adf220 701
ed377cc6
RW
702(define-public python2-backport-ssl-match-hostname
703 (package
704 (name "python2-backport-ssl-match-hostname")
f2d06d46 705 (version "3.5.0.1")
ed377cc6
RW
706 (source
707 (origin
708 (method url-fetch)
709 (uri (string-append
710 "https://pypi.python.org/packages/source/b/"
711 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
712 version ".tar.gz"))
713 (sha256
714 (base32
f2d06d46 715 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 716 (build-system python-build-system)
f2d06d46
EF
717 (arguments
718 `(#:python ,python-2
719 #:tests? #f)) ; no test target
f2d06d46
EF
720 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
721 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
722 (description
723 "This backport brings the ssl.match_hostname() function to users of
724earlier versions of Python. The function checks the hostname in the
725certificate returned by the server to which a connection has been established,
726and verifies that it matches the intended target hostname.")
3f641af0 727 (license license:psfl)))
ed377cc6 728
ef5cbf9b
RW
729(define-public python-h5py
730 (package
731 (name "python-h5py")
fe147c41 732 (version "2.6.0")
ef5cbf9b
RW
733 (source
734 (origin
735 (method url-fetch)
fe147c41 736 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
737 (sha256
738 (base32
fe147c41 739 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 740 (build-system python-build-system)
797e1401
RW
741 (arguments
742 `(#:tests? #f ; no test target
743 #:phases
744 (modify-phases %standard-phases
745 (add-after 'unpack 'fix-hdf5-paths
746 (lambda* (#:key inputs #:allow-other-keys)
747 (let ((prefix (assoc-ref inputs "hdf5")))
748 (substitute* "setup_build.py"
749 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
750 (string-append "['" prefix "/lib" "']"))
751 (("'/opt/local/include', '/usr/local/include'")
752 (string-append "'" prefix "/include" "'")))
753 (substitute* "setup_configure.py"
754 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
755 (string-append "['" prefix "/lib" "']")))
756 #t))))))
3c4010b1 757 (propagated-inputs
69866690
HG
758 `(("python-six" ,python-six)
759 ("python-numpy" ,python-numpy)))
ef5cbf9b 760 (inputs
69866690 761 `(("hdf5" ,hdf5)))
ef5cbf9b 762 (native-inputs
fe147c41
EF
763 `(("python-cython" ,python-cython)
764 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
765 (home-page "http://www.h5py.org/")
766 (synopsis "Read and write HDF5 files from Python")
767 (description
768 "The h5py package provides both a high- and low-level interface to the
769HDF5 library from Python. The low-level interface is intended to be a
770complete wrapping of the HDF5 API, while the high-level component supports
771access to HDF5 files, datasets and groups using established Python and NumPy
772concepts.")
9820a028 773 (license license:bsd-3)))
ef5cbf9b
RW
774
775(define-public python2-h5py
9820a028 776 (package-with-python2 python-h5py))
ef5cbf9b 777
c1448c69
EB
778(define-public python-lockfile
779 (package
780 (name "python-lockfile")
692add53 781 (version "0.12.2")
c1448c69
EB
782 (source
783 (origin
784 (method url-fetch)
785 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
786 "lockfile-" version ".tar.gz"))
787 (sha256
788 (base32
692add53 789 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
790 (build-system python-build-system)
791 (arguments '(#:test-target "check"))
692add53
BW
792 (native-inputs
793 `(("python-pbr" ,python-pbr)))
6a8f26a4 794 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
795 (synopsis "Platform-independent file locking module")
796 (description
797 "The lockfile package exports a LockFile class which provides a simple
798API for locking files.")
f210e944 799 (license license:expat)))
c1448c69
EB
800
801(define-public python2-lockfile
f210e944 802 (package-with-python2 python-lockfile))
c1448c69 803
5a1a4bf6
EB
804(define-public python-mock
805 (package
806 (name "python-mock")
807 (version "1.0.1")
808 (source
809 (origin
810 (method url-fetch)
811 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
812 "mock-" version ".tar.gz"))
813 (sha256
814 (base32
815 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
816 (build-system python-build-system)
817 (arguments '(#:test-target "check"))
07af3e5e 818 (home-page "http://code.google.com/p/mock/")
9e771e3b 819 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
820 (description
821 "Mock is a library for testing in Python. It allows you to replace parts
822of your system under test with mock objects and make assertions about how they
823have been used.")
bd3fa666 824 (license license:expat)))
5a1a4bf6
EB
825
826(define-public python2-mock
827 (package-with-python2 python-mock))
828
fc50e9c6 829
73adf220
AE
830(define-public python-setuptools
831 (package
832 (name "python-setuptools")
d660f7be 833 (version "31.0.0")
73adf220
AE
834 (source
835 (origin
836 (method url-fetch)
d660f7be 837 (uri (pypi-uri "setuptools" version))
73adf220
AE
838 (sha256
839 (base32
d660f7be 840 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
841 (modules '((guix build utils)))
842 (snippet
843 '(begin
844 ;; Remove included binaries which are used to build self-extracting
845 ;; installers for Windows.
846 ;; TODO: Find some way to build them ourself so we can include them.
847 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
848 #t))))
73adf220 849 (build-system python-build-system)
d3d656c5
AE
850 ;; FIXME: Tests require pytest, which itself relies on setuptools.
851 ;; One could bootstrap with an internal untested setuptools.
73adf220 852 (arguments
824af8ca 853 `(#:tests? #f))
73adf220
AE
854 (home-page "https://pypi.python.org/pypi/setuptools")
855 (synopsis
856 "Library designed to facilitate packaging Python projects")
857 (description
858 "Setuptools is a fully-featured, stable library designed to facilitate
859packaging Python projects, where packaging includes:
860Python package and module definitions,
861distribution package metadata,
862test hooks,
863project installation,
864platform-specific details,
865Python 3 support.")
d660f7be
MB
866 ;; TODO: setuptools now bundles the following libraries:
867 ;; packaging, pyparsing, six and appdirs. How to unbundle?
868 (license (list license:psfl ; setuptools itself
869 license:expat ; six, appdirs, pyparsing
870 license:asl2.0 ; packaging is dual ASL2/BSD-2
871 license:bsd-2))))
73adf220
AE
872
873(define-public python2-setuptools
874 (package-with-python2 python-setuptools))
fc50e9c6
AE
875
876
cafc3f5a
EB
877(define-public python-pycrypto
878 (package
879 (name "python-pycrypto")
880 (version "2.6.1")
881 (source
882 (origin
883 (method url-fetch)
884 (uri (string-append "https://pypi.python.org/packages/source/p/"
885 "pycrypto/pycrypto-" version ".tar.gz"))
886 (sha256
887 (base32
888 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
889 (build-system python-build-system)
cafc3f5a
EB
890 (inputs
891 `(("python" ,python)
892 ("gmp" ,gmp)))
893 (arguments
894 `(#:phases
895 (alist-cons-before
896 'build 'set-build-env
897 ;; pycrypto runs an autoconf configure script behind the scenes
898 (lambda _
899 (setenv "CONFIG_SHELL" (which "bash")))
900 %standard-phases)))
901 (home-page "http://www.pycrypto.org/")
902 (synopsis "Cryptographic modules for Python")
903 (description
904 "Pycrypto is a collection of both secure hash functions (such as SHA256
905and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 906etc.). The package is structured to make adding new modules easy.")
3f641af0 907 (license license:public-domain)))
cafc3f5a 908
345f0611 909(define-public python2-pycrypto
1c0059da
EF
910 (let ((pycrypto (package-with-python2 python-pycrypto)))
911 (package (inherit pycrypto)
912 (inputs
913 `(("python" ,python-2)
914 ,@(alist-delete
915 "python"
916 (package-inputs pycrypto)))))))
345f0611 917
cafc3f5a
EB
918(define-public python-keyring
919 (package
920 (name "python-keyring")
13f3ff35 921 (version "8.7")
cafc3f5a
EB
922 (source
923 (origin
924 (method url-fetch)
664e6c3a 925 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
926 (sha256
927 (base32
13f3ff35 928 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
929 (build-system python-build-system)
930 (native-inputs
13f3ff35 931 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 932 (propagated-inputs
cafc3f5a
EB
933 `(("python-pycrypto" ,python-pycrypto)))
934 (arguments
664e6c3a 935 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 936 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
937 (synopsis "Store and access your passwords safely")
938 (description
939 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 940service from python. It can be used in any application that needs safe
cafc3f5a
EB
941password storage.")
942 ;; "MIT" and PSF dual license
f210e944 943 (license license:x11)))
cafc3f5a 944
d7af1069 945(define-public python2-keyring
f210e944 946 (package-with-python2 python-keyring))
d7af1069 947
a480bc41
EB
948(define-public python-six
949 (package
950 (name "python-six")
b6ab89ef 951 (version "1.10.0")
a480bc41
EB
952 (source
953 (origin
954 (method url-fetch)
b6ab89ef 955 (uri (pypi-uri "six" version))
a480bc41
EB
956 (sha256
957 (base32
b6ab89ef 958 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 959 (build-system python-build-system)
4fd129ee
MB
960 (native-inputs
961 `(("python-py" ,python-py)
962 ("python-pytest" ,python-pytest)))
a480bc41
EB
963 (home-page "http://pypi.python.org/pypi/six/")
964 (synopsis "Python 2 and 3 compatibility utilities")
965 (description
35b9e423 966 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
967functions for smoothing over the differences between the Python versions with
968the goal of writing Python code that is compatible on both Python versions.
35b9e423 969Six supports every Python version since 2.5. It is contained in only one
a480bc41 970Python file, so it can be easily copied into your project.")
3f641af0 971 (license license:x11)))
a480bc41 972
0c20025c
AE
973(define-public python2-six
974 (package-with-python2 python-six))
975
cafc3f5a
EB
976(define-public python-dateutil-2
977 (package
978 (name "python-dateutil")
394b8060 979 (version "2.5.2")
cafc3f5a
EB
980 (source
981 (origin
982 (method url-fetch)
394b8060 983 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
984 (sha256
985 (base32
394b8060 986 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a 987 (build-system python-build-system)
f22efa01 988 (propagated-inputs
394b8060 989 `(("python-six" ,python-six)))
b5a5fb19 990 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
991 (synopsis "Extensions to the standard datetime module")
992 (description
993 "The dateutil module provides powerful extensions to the standard
994datetime module, available in Python 2.3+.")
f210e944 995 (license license:bsd-3)))
cafc3f5a
EB
996
997(define-public python2-dateutil-2
f210e944 998 (package-with-python2 python-dateutil-2))
cafc3f5a 999
fc50e9c6
AE
1000(define-public python-dateutil
1001 (package
1002 (name "python-dateutil")
1003 (version "1.5") ; last version for python < 3
1004 (source
1005 (origin
1006 (method url-fetch)
cafc3f5a
EB
1007 (uri (string-append "http://labix.org/download/python-dateutil/"
1008 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
1009 (sha256
1010 (base32
1011 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
1012 (build-system python-build-system)
b5a5fb19 1013 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a 1014 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
1015 (description
1016 "The dateutil module provides powerful extensions to the standard
1017datetime module, available in Python 2.3+.")
3f641af0 1018 (license license:psfl)))
fc50e9c6
AE
1019
1020(define-public python2-dateutil
1021 (package-with-python2 python-dateutil))
1d08c01f 1022
cafc3f5a
EB
1023(define-public python-parsedatetime
1024 (package
1025 (name "python-parsedatetime")
eebf6f01 1026 (version "2.1")
cafc3f5a
EB
1027 (source
1028 (origin
1029 (method url-fetch)
eebf6f01 1030 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1031 (sha256
1032 (base32
eebf6f01 1033 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1034 (build-system python-build-system)
1035 (native-inputs
eebf6f01
EF
1036 `(("python-nose" ,python-nose)
1037 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1038 (home-page "http://github.com/bear/parsedatetime/")
1039 (synopsis
1040 "Parse human-readable date/time text")
1041 (description
e881752c 1042 "Parse human-readable date/time text.")
f210e944 1043 (license license:asl2.0)))
cafc3f5a 1044
38b8f9b2 1045(define-public python2-parsedatetime
f210e944 1046 (package-with-python2 python-parsedatetime))
38b8f9b2 1047
d072efcb
RW
1048(define-public python-pandas
1049 (package
1050 (name "python-pandas")
7d0c3c8d 1051 (version "0.18.1")
d072efcb
RW
1052 (source
1053 (origin
1b96f069 1054 (method url-fetch)
7d0c3c8d
EF
1055 (uri (string-append
1056 "https://pypi.python.org/packages/11/09/"
1057 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1058 "pandas-" version ".tar.gz"))
1b96f069 1059 (sha256
7d0c3c8d 1060 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1061 (build-system python-build-system)
d072efcb 1062 (propagated-inputs
f22efa01
HG
1063 `(("python-numpy" ,python-numpy)
1064 ("python-pytz" ,python-pytz)
d072efcb
RW
1065 ("python-dateutil" ,python-dateutil-2)))
1066 (native-inputs
abcc7a0e
HG
1067 `(("python-nose" ,python-nose)
1068 ("python-cython" ,python-cython)))
d072efcb
RW
1069 (home-page "http://pandas.pydata.org")
1070 (synopsis "Data structures for data analysis, time series, and statistics")
1071 (description
1072 "Pandas is a Python package providing fast, flexible, and expressive data
1073structures designed to make working with structured (tabular,
1074multidimensional, potentially heterogeneous) and time series data both easy
1075and intuitive. It aims to be the fundamental high-level building block for
1076doing practical, real world data analysis in Python.")
f210e944 1077 (license license:bsd-3)))
d072efcb
RW
1078
1079(define-public python2-pandas
f210e944 1080 (package-with-python2 python-pandas))
d072efcb 1081
cafc3f5a
EB
1082(define-public python-tzlocal
1083 (package
1084 (name "python-tzlocal")
ed80839b 1085 (version "1.2.2")
cafc3f5a
EB
1086 (source
1087 (origin
1088 (method url-fetch)
226d3331 1089 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1090 (sha256
1091 (base32
ed80839b 1092 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1093 (build-system python-build-system)
f22efa01
HG
1094 (propagated-inputs
1095 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1096 (home-page "https://github.com/regebro/tzlocal")
1097 (synopsis
35b9e423 1098 "Local timezone information for Python")
cafc3f5a
EB
1099 (description
1100 "Tzlocal returns a tzinfo object with the local timezone information.
1101This module attempts to fix a glaring hole in pytz, that there is no way to
1102get the local timezone information, unless you know the zoneinfo name, and
1103under several distributions that's hard or impossible to figure out.")
3f641af0 1104 (license license:cc0)))
cafc3f5a 1105
1d08c01f
AE
1106(define-public python2-pysqlite
1107 (package
1108 (name "python2-pysqlite")
fe476868 1109 (version "2.8.1")
1d08c01f
AE
1110 (source
1111 (origin
1112 (method url-fetch)
fe476868 1113 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1114 (sha256
1115 (base32
fe476868 1116 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1117 (build-system python-build-system)
1118 (inputs
1119 `(("sqlite" ,sqlite)))
1120 (arguments
1121 `(#:python ,python-2 ; incompatible with Python 3
1122 #:tests? #f)) ; no test target
fe476868 1123 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1124 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1125 (description
1126 "Pysqlite provides SQLite bindings for Python that comply to the
1127Database API 2.0T.")
ed0cdf83 1128 (license license:zlib)))
1d08c01f 1129
2875caf5
AE
1130
1131(define-public python2-mechanize
1132 (package
1133 (name "python2-mechanize")
1134 (version "0.2.5")
1135 (source
1136 (origin
1137 (method url-fetch)
1138 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1139 version ".tar.gz"))
1140 (sha256
1141 (base32
1142 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1143 (build-system python-build-system)
2875caf5
AE
1144 (arguments
1145 `(#:python ,python-2 ; apparently incompatible with Python 3
1146 #:tests? #f))
1147 ;; test fails with message
1148 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1149 ;; (python-3.3.2) or
1150 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1151 ;; (python-2.7.5).
1152 ;; The source code is from March 2011 and probably not up-to-date
1153 ;; with respect to python unit tests.
1154 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1155 (synopsis
1156 "Stateful programmatic web browsing in Python")
1157 (description
1158 "Mechanize implements stateful programmatic web browsing in Python,
1159after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1160 (license (license:non-copyleft
1161 "file://COPYING"
1162 "See COPYING in the distribution."))))
2875caf5 1163
0352532e
AE
1164
1165(define-public python-simplejson
1166 (package
1167 (name "python-simplejson")
b2e6e150 1168 (version "3.10.0")
0352532e
AE
1169 (source
1170 (origin
1171 (method url-fetch)
988d1bad 1172 (uri (pypi-uri "simplejson" version))
0352532e
AE
1173 (sha256
1174 (base32
b2e6e150 1175 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1176 (build-system python-build-system)
1177 (home-page "http://simplejson.readthedocs.org/en/latest/")
1178 (synopsis
1179 "Json library for Python")
1180 (description
e881752c
AK
1181 "JSON (JavaScript Object Notation) is a subset of JavaScript
1182syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1183format.
0352532e
AE
1184
1185Simplejson exposes an API familiar to users of the standard library marshal
1186and pickle modules. It is the externally maintained version of the json
1187library contained in Python 2.6, but maintains compatibility with Python 2.5
1188and (currently) has significant performance advantages, even without using
1189the optional C extension for speedups. Simplejson is also supported on
1190Python 3.3+.")
3f641af0 1191 (license license:x11)))
0352532e
AE
1192
1193(define-public python2-simplejson
1194 (package-with-python2 python-simplejson))
421a80a2
AE
1195
1196
ed07b08d 1197(define-public python-pyicu
421a80a2 1198 (package
ed07b08d 1199 (name "python-pyicu")
d3b29319 1200 (version "1.9.2")
421a80a2
AE
1201 (source
1202 (origin
1203 (method url-fetch)
1204 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1205 version ".tar.gz"))
1206 (sha256
1207 (base32
d3b29319 1208 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1209 (build-system python-build-system)
1210 (inputs
1211 `(("icu4c" ,icu4c)))
421a80a2 1212 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1213 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1214 (description
1215 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1216 (license license:x11)))
ed07b08d
LF
1217
1218(define-public python2-pyicu
f210e944 1219 (package-with-python2 python-pyicu))
cc20a22a
LC
1220
1221(define-public python2-dogtail
1222 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1223 ;; spaces in indentation" with Python 3.
1224 (package
1225 (name "python2-dogtail")
1226 (version "0.8.2")
1227 (source (origin
1228 (method url-fetch)
1229 (uri (string-append
1230 "https://fedorahosted.org/released/dogtail/dogtail-"
1231 version ".tar.gz"))
1232 (sha256
1233 (base32
1234 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1235 (build-system python-build-system)
1236 (arguments `(#:python ,python-2
1237 #:tests? #f)) ; invalid command "test"
1238 (home-page "https://fedorahosted.org/dogtail/")
1239 (synopsis "GUI test tool and automation framework written in ​Python")
1240 (description
35b9e423 1241 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1242It uses Accessibility (a11y) technologies to communicate with desktop
1243applications. dogtail scripts are written in Python and executed like any
1244other Python program.")
3f641af0 1245 (license license:gpl2+)))
515e6878 1246
011b18c3
LC
1247(define-public python2-empy
1248 (package
1249 (name "python2-empy")
1250 (version "3.3")
1251 (source (origin
1252 (method url-fetch)
1253 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1254 version ".tar.gz"))
1255 (sha256
1256 (base32
1257 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1258 (build-system python-build-system)
1259 (arguments
1260 `(#:python ,python-2
1261 #:phases (alist-replace
1262 'check
1263 (lambda _
1264 (zero? (system* "./test.sh")))
1265 %standard-phases)))
1266 (home-page "http://www.alcyone.com/software/empy/")
1267 (synopsis "Templating system for Python")
1268 (description
1269 "EmPy is a system for embedding Python expressions and statements in
1270template text; it takes an EmPy source file, processes it, and produces
1271output. This is accomplished via expansions, which are special signals to the
1cd4027c 1272EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1273EmPy can expand arbitrary Python expressions and statements in this way, as
1274well as a variety of special forms. Textual data not explicitly delimited in
1275this way is sent unaffected to the output, allowing Python to be used in
1276effect as a markup language. Also supported are callbacks via hooks,
1277recording and playback via diversions, and dynamic, chainable filters. The
1278system is highly configurable via command line options and embedded
1279commands.")
3f641af0 1280 (license license:lgpl2.1+)))
011b18c3 1281
8deeda0c
LC
1282(define-public python2-element-tree
1283 (package
1284 (name "python2-element-tree")
1285 (version "1.2.6")
1286 (source (origin
1287 (method url-fetch)
1288 (uri (string-append
1289 "http://effbot.org/media/downloads/elementtree-"
1290 version "-20050316.tar.gz"))
1291 (sha256
1292 (base32
1293 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1294 (build-system python-build-system)
1295 (arguments
1296 `(#:python ,python-2 ; seems to be part of Python 3
1297 #:tests? #f)) ; no 'test' sub-command
1298 (synopsis "Toolkit for XML processing in Python")
1299 (description
1300 "ElementTree is a Python library supporting lightweight XML processing.")
1301 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1302 (license (license:x11-style
1303 "http://docs.python.org/2/license.html"
1304 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1305
1306(define-public python2-pybugz
1307 (package
1308 (name "python2-pybugz")
1309 (version "0.6.11")
1310 (source (origin
1311 (method url-fetch)
1312 (uri (string-append
1313 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1314 version ".tar.gz"))
1315 (sha256
1316 (base32
6f194a1e 1317 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1318 (patches (search-patches "pybugz-stty.patch"
1319 "pybugz-encode-error.patch"))))
8deeda0c
LC
1320 (build-system python-build-system)
1321 (arguments
1322 `(#:python ,python-2 ; SyntaxError with Python 3
1323 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1324 (propagated-inputs
1325 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1326 (synopsis "Python and command-line interface to Bugzilla")
1327 (description
1328 "PyBugz is a Python library and command-line tool to query the Bugzilla
1329bug tracking system. It is meant as an aid to speed up interaction with the
1330bug tracker.")
1331 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1332 (license license:gpl2)))
8deeda0c 1333
a480bc41
EB
1334(define-public python-enum34
1335 (package
1336 (name "python-enum34")
d39ae1e5 1337 (version "1.1.0")
a480bc41
EB
1338 (source
1339 (origin
1340 (method url-fetch)
d39ae1e5 1341 (uri (pypi-uri "enum34" version))
a480bc41
EB
1342 (sha256
1343 (base32
d39ae1e5 1344 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1345 (build-system python-build-system)
a480bc41
EB
1346 (arguments
1347 `(#:phases
1348 (alist-replace
1349 'check
1350 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1351 %standard-phases)))
1352 (home-page "https://pypi.python.org/pypi/enum34")
1353 (synopsis "Backported Python 3.4 Enum")
1354 (description
1355 "Enum34 is the new Python stdlib enum module available in Python 3.4
1356backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1357 (license license:bsd-3)))
a480bc41 1358
820acd1b
LF
1359(define-public python2-enum34
1360 (package-with-python2 python-enum34))
1361
a480bc41
EB
1362(define-public python-parse-type
1363 (package
1364 (name "python-parse-type")
1365 (version "0.3.4")
1366 (source
1367 (origin
1368 (method url-fetch)
1369 (uri (string-append "https://pypi.python.org/packages/source/p/"
1370 "parse_type/parse_type-" version ".tar.gz"))
1371 (sha256
1372 (base32
1373 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1374 (build-system python-build-system)
f22efa01 1375 (propagated-inputs
f3b98f4f 1376 `(("python-six" ,python-six)
68f1cdec 1377 ("python-parse" ,python-parse)))
a480bc41
EB
1378 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1379 (home-page "https://github.com/jenisys/parse_type")
1380 (synopsis "Extended parse module")
1381 (description
1382 "Parse_type extends the python parse module.")
3f641af0 1383 (license license:bsd-3)))
a480bc41
EB
1384
1385(define-public python-parse
1386 (package
1387 (name "python-parse")
eb3d3503 1388 (version "1.6.6")
a480bc41
EB
1389 (source
1390 (origin
1391 (method url-fetch)
eb3d3503 1392 (uri (pypi-uri "parse" version))
a480bc41
EB
1393 (sha256
1394 (base32
aa6c09ed
EF
1395 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1396 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1397 (build-system python-build-system)
1398 (arguments
1399 `(#:phases
f9a65318
EF
1400 (modify-phases %standard-phases
1401 (replace 'check
1402 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1403 (home-page "https://github.com/r1chardj0n3s/parse")
1404 (synopsis "Parse strings")
1405 (description
1406 "Parse strings using a specification based on the Python format()
1407syntax.")
3f641af0 1408 (license license:x11)))
a480bc41 1409
d3eff97a
JL
1410(define-public python-polib
1411 (package
1412 (name "python-polib")
1413 (version "1.0.8")
1414 (source (origin
1415 (method url-fetch)
1416 (uri (pypi-uri "polib" version))
1417 (sha256
1418 (base32
1419 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1420 (build-system python-build-system)
1421 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1422 (synopsis "Manipulate, create and modify gettext files")
1423 (description "Polib can manipulate any gettext format (po, pot and mo)
1424files. It can be used to create po files from scratch or to modify
1425existing ones.")
1426 (license license:expat)))
1427
1428(define-public python2-polib
1429 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1430 (package
1431 (inherit base)
1432 (arguments `(,@(package-arguments base)
1433 ;; Tests don't work with python2.
1434 #:tests? #f)))))
a480bc41 1435
515e6878
LC
1436(define-public scons
1437 (package
1438 (name "scons")
a3f61425 1439 (version "2.3.4")
515e6878
LC
1440 (source (origin
1441 (method url-fetch)
de67e922
LF
1442 (uri (string-append "mirror://sourceforge/scons/scons/" version
1443 "/scons-" version ".tar.gz"))
515e6878
LC
1444 (sha256
1445 (base32
a3f61425 1446 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1447 (build-system python-build-system)
1448 (arguments
1449 ;; With Python 3.x, fails to build with a syntax error.
1450 `(#:python ,python-2
b3e8b4bd 1451 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1452 #:tests? #f)) ; no 'python setup.py test' command
1453 (home-page "http://scons.org/")
1454 (synopsis "Software construction tool written in Python")
1455 (description
1456 "SCons is a software construction tool. Think of SCons as an improved,
1457cross-platform substitute for the classic Make utility with integrated
1458functionality similar to autoconf/automake and compiler caches such as ccache.
1459In short, SCons is an easier, more reliable and faster way to build
1460software.")
3f641af0 1461 (license license:x11)))
011b18c3 1462
c15a5c0e
DT
1463(define-public python-extras
1464 (package
1465 (name "python-extras")
1466 (version "0.0.3")
1467 (source
1468 (origin
1469 (method url-fetch)
1470 (uri (string-append
1471 "https://pypi.python.org/packages/source/e/extras/extras-"
1472 version ".tar.gz"))
1473 (sha256
1474 (base32
1475 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1476 (build-system python-build-system)
c15a5c0e
DT
1477 (arguments
1478 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1479 '(#:tests? #f))
1480 (home-page "https://github.com/testing-cabal/extras")
1481 (synopsis "Useful extensions to the Python standard library")
1482 (description
1483 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1484 (license license:expat)))
c15a5c0e
DT
1485
1486(define-public python2-extras
1487 (package-with-python2 python-extras))
1488
56ea0efd
DT
1489(define-public python-mimeparse
1490 (package
1491 (name "python-mimeparse")
1492 (version "0.1.4")
1493 (source
1494 (origin
1495 (method url-fetch)
1496 (uri (string-append
1497 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1498 version ".tar.gz"))
1499 (sha256
1500 (base32
1501 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1502 (build-system python-build-system)
56ea0efd
DT
1503 (arguments
1504 '(#:tests? #f)) ; no setup.py test command
1505 (home-page
1506 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1507 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1508 (description
1509 "Mimeparse provides basic functions for parsing MIME type names and
1510matching them against a list of media-ranges.")
bd3fa666 1511 (license license:expat)))
56ea0efd
DT
1512
1513(define-public python2-mimeparse
1514 (package-with-python2 python-mimeparse))
1515
4435427e
DT
1516(define-public python-nose
1517 (package
1518 (name "python-nose")
f7cb9841 1519 (version "1.3.7")
4435427e
DT
1520 (source
1521 (origin
1522 (method url-fetch)
f7cb9841 1523 (uri (pypi-uri "nose" version))
4435427e
DT
1524 (sha256
1525 (base32
f7cb9841 1526 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1527 (build-system python-build-system)
4435427e
DT
1528 (arguments
1529 '(#:tests? #f)) ; FIXME: test suite fails
1530 (home-page "http://readthedocs.org/docs/nose/")
1531 (synopsis "Python testing library")
1532 (description
1533 "Nose extends the unittest library to make testing easier.")
3f641af0 1534 (license license:lgpl2.0+)))
4435427e
DT
1535
1536(define-public python2-nose
1537 (package-with-python2 python-nose))
1538
0aea283a
EF
1539(define-public python-nose2
1540 (package
1541 (name "python-nose2")
1542 (version "0.6.5")
1543 (source
1544 (origin
1545 (method url-fetch)
1546 (uri (pypi-uri "nose2" version))
1547 (sha256
1548 (base32
1549 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1550 (build-system python-build-system)
1551 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1552 (propagated-inputs
0aea283a
EF
1553 `(("python-cov-core" ,python-cov-core)
1554 ("python-pytest-cov" ,python-pytest-cov)
1555 ("python-six" ,python-six)))
1556 (home-page "https://github.com/nose-devs/nose2")
1557 (synopsis "Next generation of nicer testing for Python")
1558 (description
1559 "Nose2 is the next generation of nicer testing for Python, based on the
1560plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1561better plugin api, being easier for users to configure, and simplifying internal
1562interfaces and processes.")
1563 (license license:bsd-2)))
1564
1565(define-public python2-nose2
1566 (package-with-python2 python-nose2))
1567
6cd9c356
DT
1568(define-public python-unittest2
1569 (package
1570 (name "python-unittest2")
1571 (version "0.5.1")
1572 (source
1573 (origin
1574 (method url-fetch)
1575 (uri (string-append
1576 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1577 version ".tar.gz"))
1578 (sha256
1579 (base32
1580 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1581 (build-system python-build-system)
6cd9c356
DT
1582 (home-page "http://pypi.python.org/pypi/unittest2")
1583 (synopsis "Python unit testing library")
1584 (description
1585 "Unittest2 is a replacement for the unittest module in the Python
1586standard library.")
3f641af0 1587 (license license:psfl)))
6cd9c356
DT
1588
1589(define-public python2-unittest2
1590 (package (inherit python-unittest2)
1591 (name "python2-unittest2")
1592 (version "0.5.1")
1593 (source
1594 (origin
1595 (method url-fetch)
1596 (uri (string-append
1597 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1598 version ".tar.gz"))
1599 (sha256
1600 (base32
1601 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1602 (arguments
1603 `(#:python ,python-2
1604 #:tests? #f)))) ; no setup.py test command
1605
02f8f804 1606(define-public python-pafy
1607 (package
1608 (name "python-pafy")
1609 (version "0.5.2")
1610 (source
1611 (origin
1612 (method url-fetch)
1613 (uri (pypi-uri "pafy" version))
1614 (sha256
1615 (base32
1616 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1617 (build-system python-build-system)
ed3fee5f 1618 (arguments
1619 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1620 (propagated-inputs
1621 ;; Youtube-dl is a python package which is imported in the file
1622 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1623 `(("youtube-dl" ,youtube-dl)))
1624 (home-page "https://np1.github.io/pafy/")
1625 (synopsis "Retrieve YouTube content and metadata")
1626 (description
1627 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1628 (license license:lgpl3+)))
1629
542ad60f
DT
1630(define-public python-py
1631 (package
1632 (name "python-py")
71c8a804 1633 (version "1.4.31")
542ad60f
DT
1634 (source
1635 (origin
1636 (method url-fetch)
71c8a804 1637 (uri (pypi-uri "py" version))
542ad60f
DT
1638 (sha256
1639 (base32
71c8a804 1640 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f 1641 (build-system python-build-system)
dcb0da7b
MB
1642 (arguments
1643 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1644 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1645 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1646 ;; Is this module globally installed?"
1647 '(#:tests? #f))
542ad60f
DT
1648 (home-page "http://pylib.readthedocs.org/")
1649 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1650 (description
1651 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1652code introspection, and logging.")
bd3fa666 1653 (license license:expat)))
542ad60f
DT
1654
1655(define-public python2-py
1656 (package-with-python2 python-py))
1657
855d4761
DT
1658(define-public python-pytest
1659 (package
1660 (name "python-pytest")
61a4332d 1661 (version "2.7.3")
855d4761
DT
1662 (source
1663 (origin
1664 (method url-fetch)
1665 (uri (string-append
1666 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1667 version ".tar.gz"))
1668 (sha256
1669 (base32
61a4332d 1670 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1671 (modules '((guix build utils)))
1672 (snippet
1673 ;; One of the tests involves the /usr directory, so it fails.
1674 '(substitute* "testing/test_argcomplete.py"
1675 (("def test_remove_dir_prefix\\(self\\):")
1676 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1677 (build-system python-build-system)
482d9591
HG
1678 (propagated-inputs
1679 `(("python-py" ,python-py)))
e7881f3d 1680 (native-inputs
482d9591 1681 `(("python-nose" ,python-nose)
855d4761
DT
1682 ("python-mock" ,python-mock)))
1683 (home-page "http://pytest.org")
1684 (synopsis "Python testing library")
1685 (description
1686 "Pytest is a testing tool that provides auto-discovery of test modules
1687and functions, detailed info on failing assert statements, modular fixtures,
1688and many external plugins.")
bd3fa666 1689 (license license:expat)))
855d4761
DT
1690
1691(define-public python2-pytest
1692 (package-with-python2 python-pytest))
1693
fca4ff35
LF
1694;; This package is used by Borg until we can upgrade all our Python packages to
1695;; use a more recent pytest.
1696(define-public python-pytest-2.9.2
1697 (package
1698 (inherit python-pytest)
1699 (name "python-pytest")
1700 (version "2.9.2")
1701 (source (origin
1702 (method url-fetch)
1703 (uri (pypi-uri "pytest" version))
1704 (sha256
1705 (base32
1706 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1707 (arguments
1708 `(#:phases
1709 (modify-phases %standard-phases
1710 (add-before 'check 'disable-invalid-test
1711 (lambda _
1712 (substitute* "testing/test_argcomplete.py"
1713 (("def test_remove_dir_prefix" line)
1714 (string-append "@pytest.mark.skip"
1715 "(reason=\"Assumes that /usr exists.\")\n "
1716 line)))
1717 #t)))))))
1718
358c3d61
EF
1719(define-public python-pytest-cov
1720 (package
1721 (name "python-pytest-cov")
545f4a1c 1722 (version "2.2.1")
358c3d61
EF
1723 (source
1724 (origin
1725 (method url-fetch)
1726 (uri (pypi-uri "pytest-cov" version))
1727 (sha256
545f4a1c
EF
1728 (base32
1729 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1730 (build-system python-build-system)
ce40b383
HG
1731 (arguments
1732 `(#:phases
1733 (modify-phases %standard-phases
1734 (replace 'check
1735 (lambda _
1736 ;; options taken from tox.ini
1737 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1738 ;; with "Duplicate implicit target name"
1739 (zero? (system* "python" "./setup.py" "check"
1740 "--strict" "--metadata")))))))
f22efa01 1741 (propagated-inputs
10468636
EF
1742 `(("python-coverage" ,python-coverage)
1743 ("python-pytest" ,python-pytest)))
10468636
EF
1744 (home-page "https://github.com/pytest-dev/pytest-cov")
1745 (synopsis "Pytest plugin for measuring coverage")
1746 (description
1747 "Pytest-cov produces coverage reports. It supports centralised testing and
1748distributed testing in both @code{load} and @code{each} modes. It also
1749supports coverage of subprocesses.")
f210e944 1750 (license license:expat)))
358c3d61
EF
1751
1752(define-public python2-pytest-cov
f210e944 1753 (package-with-python2 python-pytest-cov))
358c3d61 1754
6784f2e3
RW
1755(define-public python-pytest-runner
1756 (package
1757 (name "python-pytest-runner")
1758 (version "2.6.2")
1759 (source
1760 (origin
1761 (method url-fetch)
54cd239b 1762 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1763 (sha256
1764 (base32
1765 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1766 (build-system python-build-system)
1767 (arguments
1768 `(#:phases
1769 (modify-phases %standard-phases
1770 ;; The fancy way of setting the version with setuptools_scm does not
1771 ;; seem to work here.
1772 (add-after 'unpack 'set-version
1773 (lambda _
1774 (substitute* "docs/conf.py"
1775 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1776 (string-append "version = \"" ,version "\"")))
1777 #t)))))
1778 (native-inputs
1779 `(("python-pytest" ,python-pytest)
1780 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1781 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1782 (synopsis "Invoke py.test as a distutils command")
1783 (description
1784 "This package provides a @command{pytest-runner} command that
1785@file{setup.py} files can use to run tests.")
f210e944 1786 (license license:expat)))
54cd239b
EF
1787
1788(define-public python2-pytest-runner
f210e944 1789 (package-with-python2 python-pytest-runner))
6784f2e3 1790
44547e51
EF
1791(define-public python-pytest-mock
1792 (package
1793 (name "python-pytest-mock")
1794 (version "1.2")
1795 (source
1796 (origin
1797 (method url-fetch)
1798 (uri (pypi-uri "pytest-mock" version ".zip"))
1799 (sha256
1800 (base32
1801 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1802 (build-system python-build-system)
1803 (native-inputs
1804 `(("unzip" ,unzip)))
f22efa01 1805 (propagated-inputs
d5e41cf2 1806 `(("python-pytest" ,python-pytest)))
44547e51
EF
1807 (home-page "https://github.com/pytest-dev/pytest-mock/")
1808 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1809 (description
1810 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1811around the patching API provided by the @code{mock} package, but with the
1812benefit of not having to worry about undoing patches at the end of a test.
1813The mocker fixture has the same API as @code{mock.patch}, supporting the
1814same arguments.")
1815 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1816 (license license:expat)))
1817
1818(define-public python2-pytest-mock
1819 (let ((base (package-with-python2
1820 (strip-python2-variant python-pytest-mock))))
1821 (package (inherit base)
f22efa01 1822 (propagated-inputs
44547e51 1823 `(("python2-mock" ,python2-mock)
f22efa01 1824 ,@(package-propagated-inputs base))))))
44547e51 1825
8fa58fc9
CAW
1826(define-public python-pytest-xdist
1827 (package
1828 (name "python-pytest-xdist")
1829 (version "1.14")
1830 (source
1831 (origin
1832 (method url-fetch)
1833 (uri (pypi-uri "pytest-xdist" version ".zip"))
1834 (sha256
1835 (base32
de585a7e
HG
1836 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1837 (modules '((guix build utils)))
1838 (snippet
1839 '(begin
1840 ;; Remove pre-compiled .pyc files from source.
1841 (for-each delete-file-recursively
1842 (find-files "." "__pycache__" #:directories? #t))
1843 (for-each delete-file (find-files "." "\\.pyc$"))
1844 #t))))
8fa58fc9
CAW
1845 (build-system python-build-system)
1846 (native-inputs
1847 `(("unzip" ,unzip)
8fa58fc9 1848 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1849 (propagated-inputs
c4516ad2 1850 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
1851 ("python-pytest" ,python-pytest)
1852 ("python-py" ,python-py)))
1853 (home-page
1854 "https://github.com/pytest-dev/pytest-xdist")
1855 (synopsis
1856 "Plugin for py.test with distributed testing and loop-on-failing modes")
1857 (description
1858 "The pytest-xdist plugin extends py.test with some unique test execution
1859modes: parallelization, running tests in boxed subprocesses, the ability
1860to run tests repeatedly when failed, and the ability to run tests on multiple
1861Python interpreters or platforms. It uses rsync to copy the existing
1862program code to a remote location, executes there, and then syncs the
1863result back.")
f210e944 1864 (license license:expat)))
8fa58fc9
CAW
1865
1866(define-public python2-pytest-xdist
f210e944 1867 (package-with-python2 python-pytest-xdist))
8fa58fc9 1868
84d24017
DT
1869(define-public python-scripttest
1870 (package
1871 (name "python-scripttest")
1872 (version "1.3")
1873 (source
1874 (origin
1875 (method url-fetch)
1876 (uri (string-append
1877 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1878 version ".tar.gz"))
1879 (sha256
1880 (base32
1881 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1882 (build-system python-build-system)
521b7772 1883 (native-inputs
f3b98f4f 1884 `(("python-pytest" ,python-pytest)))
84d24017
DT
1885 (home-page "http://pythonpaste.org/scripttest/")
1886 (synopsis "Python library to test command-line scripts")
1887 (description "Scripttest is a Python helper library for testing
1888interactive command-line applications. With it you can run a script in a
1889subprocess and see the output as well as any file modifications.")
bd3fa666 1890 (license license:expat)))
84d24017
DT
1891
1892(define-public python2-scripttest
1893 (package-with-python2 python-scripttest))
1894
d8fa80e1
DT
1895(define-public python-testtools
1896 (package
1897 (name "python-testtools")
1898 (version "1.0.0")
1899 (source
1900 (origin
1901 (method url-fetch)
1902 (uri (string-append
1903 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1904 version ".tar.gz"))
1905 (sha256
1906 (base32
1907 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1908 (build-system python-build-system)
0e88cbf8 1909 (propagated-inputs
f22efa01
HG
1910 `(("python-mimeparse" ,python-mimeparse)
1911 ("python-extras" ,python-extras)))
d8fa80e1
DT
1912 (home-page "https://github.com/testing-cabal/testtools")
1913 (synopsis
1914 "Extensions to the Python standard library unit testing framework")
1915 (description
1916 "Testtools extends the Python standard library unit testing framework to
1917provide matchers, more debugging information, and cross-Python
1918compatibility.")
3f641af0 1919 (license license:psfl)))
d8fa80e1
DT
1920
1921(define-public python2-testtools
1922 (package-with-python2 python-testtools))
1923
5bf3afea
DT
1924(define-public python-testscenarios
1925 (package
1926 (name "python-testscenarios")
1927 (version "0.4")
1928 (source
1929 (origin
1930 (method url-fetch)
1931 (uri (string-append
1932 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1933 version ".tar.gz"))
1934 (sha256
1935 (base32
1936 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1937 (build-system python-build-system)
f22efa01 1938 (propagated-inputs
8e73d3ba 1939 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
1940 (home-page "https://launchpad.net/testscenarios")
1941 (synopsis "Pyunit extension for dependency injection")
1942 (description
1943 "Testscenarios provides clean dependency injection for Python unittest
1944style tests.")
3f641af0 1945 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1946
1947(define-public python2-testscenarios
1948 (package-with-python2 python-testscenarios))
1949
dac79ecc
DT
1950(define-public python-testresources
1951 (package
1952 (name "python-testresources")
1953 (version "0.2.7")
1954 (source
1955 (origin
1956 (method url-fetch)
1957 (uri (string-append
1958 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1959 version ".tar.gz"))
1960 (sha256
1961 (base32
1962 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1963 (build-system python-build-system)
dac79ecc
DT
1964 (home-page "https://launchpad.net/testresources")
1965 (synopsis
1966 "Pyunit extension for managing test resources")
1967 (description
1968 "Testresources is an extension to Python's unittest to allow declarative
1969use of resources by test cases.")
3f641af0 1970 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
1971
1972(define-public python2-testresources
1973 (package-with-python2 python-testresources))
1974
070ab058
DT
1975(define-public python-subunit
1976 (package
1977 (name "python-subunit")
1978 (version "0.0.21")
1979 (source
1980 (origin
1981 (method url-fetch)
1982 (uri (string-append
1983 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1984 version ".tar.gz"))
1985 (sha256
1986 (base32
1987 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1988 (build-system python-build-system)
f22efa01 1989 (propagated-inputs
b52ad371
HG
1990 `(("python-extras" ,python-extras)
1991 ("python-mimeparse" ,python-mimeparse)))
1992 (native-inputs
1993 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
1994 (home-page "http://launchpad.net/subunit")
1995 (synopsis "Python implementation of the subunit protocol")
1996 (description
1997 "Python-subunit is a Python implementation of the subunit test streaming
1998protocol.")
3f641af0 1999 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
2000
2001(define-public python2-subunit
2002 (package-with-python2 python-subunit))
2003
d2a8db92
HG
2004;; Recent versions of python-fixtures and python-testrepository need
2005;; python-pbr for packaging, which itself needs these two packages for
2006;; testing.
2007;; To fix this circular dependency, we use a build of python-pbr, based on the
2008;; same source, just without any test dependencies and with tests disabled.
2009;; python-pbr-minmal is then used to package python-fixtures and
2010;; python-testrepository.
2011;; Strictly speaking we currently could remove the test-requirements from the
2012;; normal python-pbr package (and save this package) since test are disabled
2013;; there anyway. But this may change in future.
2014(define python-pbr-minimal
cd49454b 2015 (package
d2a8db92
HG
2016 (name "python-pbr-minimal")
2017 (version "1.8.1")
7787ef76
CR
2018 (source
2019 (origin
2020 (method url-fetch)
d2a8db92 2021 (uri (pypi-uri "pbr" version))
7787ef76
CR
2022 (sha256
2023 (base32
d2a8db92 2024 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
7787ef76
CR
2025 (build-system python-build-system)
2026 (arguments
d2a8db92
HG
2027 `(#:tests? #f))
2028 (home-page "http://docs.openstack.org/developer/pbr/")
2029 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2030 (description
d2a8db92 2031 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2032 (license license:asl2.0)))
7787ef76 2033
d2a8db92
HG
2034(define python2-pbr-minimal
2035 (package-with-python2 python-pbr-minimal))
7787ef76 2036
1ef09c0c 2037(define-public python-pbr
e25f0174 2038 (package
d2a8db92 2039 (inherit python-pbr-minimal)
e25f0174 2040 (name "python-pbr")
e25f0174
BW
2041 (arguments
2042 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2043 (propagated-inputs
d2a8db92
HG
2044 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2045 (native-inputs
e25f0174 2046 `(("python-fixtures" ,python-fixtures)
d2a8db92 2047 ;; discover, coverage, hacking, subunit
e25f0174 2048 ("python-mock" ,python-mock)
d2a8db92 2049 ("python-six" ,python-six)
e25f0174
BW
2050 ("python-sphinx" ,python-sphinx)
2051 ("python-testrepository" ,python-testrepository)
2052 ("python-testresources" ,python-testresources)
2053 ("python-testscenarios" ,python-testscenarios)
2054 ("python-testtools" ,python-testtools)
2055 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2056 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2057 (description
2058 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2059and sensible default behaviors into your setuptools run. It will set
2060versions, process requirements files and generate AUTHORS and ChangeLog file
2061from git information.
2062")))
1ef09c0c
BW
2063
2064(define-public python2-pbr
e25f0174 2065 (package-with-python2 python-pbr))
1ef09c0c 2066
7787ef76
CR
2067(define-public python-fixtures
2068 (package
2069 (name "python-fixtures")
13fcc6df 2070 (version "1.4.0")
7787ef76
CR
2071 (source
2072 (origin
2073 (method url-fetch)
13fcc6df 2074 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2075 (sha256
2076 (base32
13fcc6df 2077 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76 2078 (build-system python-build-system)
f6c1ef18
MB
2079 (arguments
2080 '(#:phases
2081 (modify-phases %standard-phases
2082 (replace 'check
2083 (lambda _
2084 (zero? (system* "python" "-m" "testtools.run"
2085 "fixtures.test_suite")))))))
7787ef76 2086 (propagated-inputs
ae92cadd 2087 `(("python-six" ,python-six)))
e7881f3d 2088 (native-inputs
f6c1ef18
MB
2089 `(("python-mock" ,python-mock)
2090 ("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2091 ("python-testtools" ,python-testtools)))
7787ef76
CR
2092 (home-page "https://launchpad.net/python-fixtures")
2093 (synopsis "Python test fixture library")
2094 (description
2095 "Fixtures provides a way to create reusable state, useful when writing
2096Python tests.")
3f641af0 2097 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2098
cd49454b
DT
2099(define-public python2-fixtures
2100 (package-with-python2 python-fixtures))
2101
b24a0c00
DT
2102(define-public python-testrepository
2103 (package
2104 (name "python-testrepository")
2105 (version "0.0.20")
2106 (source
2107 (origin
2108 (method url-fetch)
2109 (uri (string-append
2110 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2111 version ".tar.gz"))
2112 (sha256
2113 (base32
2114 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2115 (build-system python-build-system)
90110ef9
MB
2116 (arguments
2117 ;; FIXME: Many tests are failing.
2118 '(#:tests? #f))
05de40c5 2119 (propagated-inputs
b2e66edf
HG
2120 `(("python-fixtures" ,python-fixtures)
2121 ("python-subunit" ,python-subunit)
b52ad371
HG
2122 ("python-testtools" ,python-testtools)))
2123 (native-inputs
2124 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2125 ("python-mimeparse" ,python-mimeparse)))
2126 (home-page "https://launchpad.net/testrepository")
2127 (synopsis "Database for Python test results")
2128 (description "Testrepository provides a database of test results which can
2129be used as part of a developer's workflow to check things such as what tests
2130have failed since the last commit or what tests are currently failing.")
3f641af0 2131 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2132
2133(define-public python2-testrepository
2134 (package-with-python2 python-testrepository))
2135
243a009a
DT
2136(define-public python-coverage
2137 (package
2138 (name "python-coverage")
4d4cf3dd 2139 (version "4.1")
243a009a
DT
2140 (source
2141 (origin
2142 (method url-fetch)
82a3c582 2143 (uri (pypi-uri "coverage" version))
243a009a
DT
2144 (sha256
2145 (base32
4d4cf3dd 2146 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2147 (build-system python-build-system)
bd10e677
MB
2148 (arguments
2149 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2150 '(#:tests? #f))
243a009a
DT
2151 (home-page "http://nedbatchelder.com/code/coverage")
2152 (synopsis "Code coverage measurement for Python")
2153 (description
2154 "Coverage measures code coverage, typically during test execution. It
2155uses the code analysis tools and tracing hooks provided in the Python standard
2156library to determine which lines are executable, and which have been
2157executed.")
3f641af0 2158 (license license:bsd-3)))
243a009a
DT
2159
2160(define-public python2-coverage
2161 (package-with-python2 python-coverage))
2162
12f839fd
EF
2163(define-public python-cov-core
2164 (package
2165 (name "python-cov-core")
2166 (version "1.15.0")
2167 (source
2168 (origin
2169 (method url-fetch)
2170 (uri (pypi-uri "cov-core" version))
2171 (sha256
2172 (base32
2173 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2174 (build-system python-build-system)
f78e1c27 2175 (propagated-inputs
12f839fd
EF
2176 `(("python-coverage" ,python-coverage)))
2177 (home-page "https://github.com/schlamar/cov-core")
2178 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2179 (description
2180 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2181It is useful for developing coverage plugins for these testing frameworks.")
f210e944 2182 (license license:expat)))
12f839fd
EF
2183
2184(define-public python2-cov-core
f210e944 2185 (package-with-python2 python-cov-core))
12f839fd 2186
041358fb
DT
2187(define-public python-discover
2188 (package
2189 (name "python-discover")
2190 (version "0.4.0")
2191 (source
2192 (origin
2193 (method url-fetch)
2194 (uri (string-append
2195 "https://pypi.python.org/packages/source/d/discover/discover-"
2196 version ".tar.gz"))
2197 (sha256
2198 (base32
2199 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2200 (build-system python-build-system)
041358fb
DT
2201 (home-page "http://pypi.python.org/pypi/discover/")
2202 (synopsis
2203 "Python test discovery for unittest")
2204 (description
2205 "Discover provides test discovery for unittest, a feature that has been
e881752c 2206backported from Python 2.7 for Python 2.4+.")
3f641af0 2207 (license license:bsd-3)))
041358fb
DT
2208
2209(define-public python2-discover
2210 (package-with-python2 python-discover))
2211
a480bc41
EB
2212(define-public behave
2213 (package
2214 (name "behave")
287cfd1a 2215 (version "1.2.5")
a480bc41
EB
2216 (source (origin
2217 (method url-fetch)
287cfd1a 2218 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2219 (sha256
2220 (base32
287cfd1a 2221 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2222 (build-system python-build-system)
f22efa01 2223 (propagated-inputs
f3b98f4f 2224 `(("python-six" ,python-six)
a480bc41
EB
2225 ("python-parse" ,python-parse)
2226 ("python-parse-type" ,python-parse-type)))
2227 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2228 ;PyHamcrest>=1.8
2229 (home-page "http://github.com/behave/behave")
2230 (synopsis "Python behavior-driven development")
2231 (description
2232 "Behave is a tool for behavior-driven development in python.
2233Behavior-driven development (or BDD) is an agile software development
2234technique that encourages collaboration between developers, QA and
2235non-technical or business participants in a software project. Behave uses
2236tests written in a natural language style, backed up by Python code.")
3f641af0 2237 (license license:x11)))
c7303d3c
DT
2238
2239(define-public python-exif-read
2240 (package
2241 (name "python-exif-read")
2a2d0981 2242 (version "2.1.2")
c7303d3c
DT
2243 (source (origin
2244 (method url-fetch)
2a2d0981 2245 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2246 (sha256
2247 (base32
2a2d0981 2248 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2249 (build-system python-build-system)
c7303d3c
DT
2250 (arguments `(#:tests? #f)) ; no tests
2251 (home-page "https://github.com/ianare/exif-py")
2252 (synopsis "Python library to extract EXIF data from image files")
2253 (description
2254 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2255files.")
3f641af0 2256 (license license:bsd-3)))
c7303d3c
DT
2257
2258(define-public python2-exif-read
2259 (package-with-python2 python-exif-read))
d5f89b22
DT
2260
2261(define-public python-pyld
2262 (package
2263 (name "python-pyld")
8957af32 2264 (version "0.7.1")
d5f89b22
DT
2265 (source (origin
2266 (method url-fetch)
af1ab773 2267 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2268 (sha256
2269 (base32
8957af32 2270 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2271 (build-system python-build-system)
d5f89b22
DT
2272 (arguments `(#:tests? #f)) ; no tests
2273 (home-page "http://github.com/digitalbazaar/pyld")
2274 (synopsis "Python implementation of the JSON-LD specification")
2275 (description
2276 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2277 (license license:bsd-3)))
d5f89b22
DT
2278
2279(define-public python2-pyld
2280 (package-with-python2 python-pyld))
3a1f9a68
DT
2281
2282(define-public python-certifi
2283 (package
2284 (name "python-certifi")
b2a2232c 2285 (version "2016.8.31")
3a1f9a68
DT
2286 (source (origin
2287 (method url-fetch)
9a41f443 2288 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2289 (sha256
2290 (base32
b2a2232c 2291 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68 2292 (build-system python-build-system)
3a1f9a68
DT
2293 (arguments `(#:tests? #f)) ; no tests
2294 (home-page "http://python-requests.org/")
2295 (synopsis "Python CA certificate bundle")
2296 (description
2297 "Certifi is a Python library that contains a CA certificate bundle, which
2298is used by the Requests library to verify HTTPS requests.")
3f641af0 2299 (license license:asl2.0)))
3a1f9a68
DT
2300
2301(define-public python2-certifi
2302 (package-with-python2 python-certifi))
e6cfbd36 2303
12c270dd
RW
2304(define-public python-click
2305 (package
2306 (name "python-click")
43accb58 2307 (version "6.6")
12c270dd
RW
2308 (source
2309 (origin
2310 (method url-fetch)
375f224b 2311 (uri (pypi-uri "click" version))
12c270dd 2312 (sha256
43accb58
LF
2313 (base32
2314 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2315 (build-system python-build-system)
e2ab5a09
BW
2316 (arguments
2317 `(#:phases
2318 (modify-phases %standard-phases
2319 (add-after 'unpack 'fix-paths
2320 (lambda* (#:key inputs #:allow-other-keys)
2321 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2322 "cross-libc" "libc"))))
2323 (substitute* "click/_unicodefun.py"
2324 (("'locale'")
2325 (string-append "'" glibc "/bin/locale'"))))
97be1bc2
MB
2326 #t))
2327 (replace 'check
2328 (lambda _
2329 (zero? (system* "make" "test")))))))
2330 (native-inputs
2331 `(("python-pytest" ,python-pytest)))
12c270dd
RW
2332 (home-page "http://click.pocoo.org")
2333 (synopsis "Command line library for Python")
2334 (description
2335 "Click is a Python package for creating command line interfaces in a
2336composable way with as little code as necessary. Its name stands for
2337\"Command Line Interface Creation Kit\". It's highly configurable but comes
2338with sensible defaults out of the box.")
3f641af0 2339 (license license:bsd-3)))
12c270dd
RW
2340
2341(define-public python2-click
2342 (package-with-python2 python-click))
2343
addc808d
EF
2344(define-public python-wheel
2345 (package
2346 (name "python-wheel")
40981b5c 2347 (version "0.29.0")
e1ba0749
EF
2348 (source
2349 (origin
2350 (method url-fetch)
2351 (uri (pypi-uri "wheel" version))
2352 (sha256
2353 (base32
40981b5c 2354 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2355 (build-system python-build-system)
2356 (native-inputs
f3b98f4f 2357 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2358 ("python-pytest-cov" ,python-pytest-cov)))
2359 (home-page "https://bitbucket.org/pypa/wheel/")
2360 (synopsis "Format for built Python packages")
2361 (description
2362 "A wheel is a ZIP-format archive with a specially formatted filename and
2363the @code{.whl} extension. It is designed to contain all the files for a PEP
2364376 compatible install in a way that is very close to the on-disk format. Many
2365packages will be properly installed with only the @code{Unpack} step and the
2366unpacked archive preserves enough information to @code{Spread} (copy data and
2367scripts to their final locations) at any later time. Wheel files can be
2368installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2369 (license license:expat)
2370 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2371
2372(define-public python2-wheel
8ad4ae20
LF
2373 (let ((wheel (package-with-python2
2374 (strip-python2-variant python-wheel))))
264ae686 2375 (package (inherit wheel)
8ad4ae20
LF
2376 (native-inputs `(("python2-functools32" ,python2-functools32)
2377 ,@(package-native-inputs wheel))))))
2378
addc808d 2379
ae641128 2380(define-public python-requests
e6cfbd36 2381 (package
ae641128 2382 (name "python-requests")
74a066f9 2383 (version "2.9.1")
e6cfbd36
DT
2384 (source (origin
2385 (method url-fetch)
5d691657 2386 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2387 (sha256
2388 (base32
74a066f9 2389 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
cff0ccf9 2390 ;; TODO: unbundle urllib3 and chardet.
e6cfbd36 2391 (build-system python-build-system)
cff0ccf9
MB
2392 (arguments
2393 ;; FIXME: Some tests require network access.
2394 '(#:tests? #f))
e6cfbd36
DT
2395 (home-page "http://python-requests.org/")
2396 (synopsis "Python HTTP library")
2397 (description
2398 "Requests is a Python HTTP client library. It aims to be easier to use
2399than Python’s urllib2 library.")
3f641af0 2400 (license license:asl2.0)))
864b5211 2401
e9005180
DT
2402;; Some software requires an older version of Requests, notably Docker
2403;; Compose.
2404(define-public python-requests-2.7
2405 (package (inherit python-requests)
2406 (version "2.7.0")
2407 (source (origin
2408 (method url-fetch)
2409 (uri (pypi-uri "requests" version))
2410 (sha256
2411 (base32
2412 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2413
ae641128 2414(define-public python2-requests
8ad4ae20 2415 (package-with-python2 python-requests))
ae641128 2416
ea521b42
DT
2417(define-public python-vcversioner
2418 (package
2419 (name "python-vcversioner")
538fe019 2420 (version "2.16.0.0")
ea521b42
DT
2421 (source
2422 (origin
2423 (method url-fetch)
2424 (uri (pypi-uri "vcversioner" version))
2425 (sha256
2426 (base32
538fe019 2427 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2428 (build-system python-build-system)
ea521b42
DT
2429 (synopsis "Python library for version number discovery")
2430 (description "Vcversioner is a Python library that inspects tagging
2431information in a variety of version control systems in order to discover
2432version numbers.")
2433 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2434 (license license:isc)))
ea521b42
DT
2435
2436(define-public python2-vcversioner
f210e944 2437 (package-with-python2 python-vcversioner))
ae641128 2438
864b5211
DT
2439(define-public python-jsonschema
2440 (package
2441 (name "python-jsonschema")
b3667afb 2442 (version "2.5.1")
864b5211
DT
2443 (source (origin
2444 (method url-fetch)
2445 (uri
2446 (string-append
2447 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2448 version ".tar.gz"))
2449 (sha256
2450 (base32
b3667afb 2451 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2452 (build-system python-build-system)
8bcd6b91
EF
2453 (arguments
2454 '(#:phases
2455 (modify-phases %standard-phases
2456 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2457 (native-inputs
8bcd6b91
EF
2458 `(("python-nose" ,python-nose)
2459 ("python-vcversioner" ,python-vcversioner)))
2460 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2461 (synopsis "Implementation of JSON Schema for Python")
2462 (description
2463 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2464 (license license:expat)
2465 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2466
2467(define-public python2-jsonschema
a14600ec
LF
2468 (let ((jsonschema (package-with-python2
2469 (strip-python2-variant python-jsonschema))))
264ae686 2470 (package (inherit jsonschema)
eaba9d66 2471 (native-inputs
8bcd6b91 2472 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2473 ,@(package-native-inputs jsonschema)))
2474 (propagated-inputs
2475 `(("python2-functools32" ,python2-functools32))))))
850189b8
DT
2476
2477(define-public python-unidecode
2478 (package
2479 (name "python-unidecode")
8925d4f3 2480 (version "0.04.18")
850189b8
DT
2481 (source (origin
2482 (method url-fetch)
8925d4f3 2483 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2484 (sha256
2485 (base32
8925d4f3 2486 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8 2487 (build-system python-build-system)
850189b8
DT
2488 (home-page "https://pypi.python.org/pypi/Unidecode")
2489 (synopsis "ASCII transliterations of Unicode text")
2490 (description
2491 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2492useful when integrating with legacy code that doesn't support Unicode, or for
2493ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2494machine identifiers from human-readable Unicode strings that should still be
2495somewhat intelligeble.")
3f641af0 2496 (license license:gpl2+)))
850189b8
DT
2497
2498(define-public python2-unidecode
2499 (package-with-python2 python-unidecode))
6d45fef4
DT
2500
2501(define-public python-pyjwt
2502 (package
2503 (name "python-pyjwt")
eb31d4b4 2504 (version "1.4.0")
6d45fef4
DT
2505 (source
2506 (origin
2507 (method url-fetch)
eb31d4b4 2508 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2509 (sha256
2510 (base32
eb31d4b4 2511 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2512 (build-system python-build-system)
eb31d4b4 2513 (native-inputs
130fe994
HG
2514 `(("python-pytest" ,python-pytest)
2515 ("python-pytest-cov" ,python-pytest-cov)
2516 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2517 (home-page "http://github.com/progrium/pyjwt")
2518 (synopsis "JSON Web Token implementation in Python")
2519 (description
2520 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2521 (license license:expat)))
6d45fef4
DT
2522
2523(define-public python2-pyjwt
2524 (package-with-python2 python-pyjwt))
2525
2cec1f6f
DT
2526(define-public python-oauthlib
2527 (package
2528 (name "python-oauthlib")
bde2171d 2529 (version "1.0.3")
2cec1f6f
DT
2530 (source (origin
2531 (method url-fetch)
bde2171d 2532 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2533 (sha256
2534 (base32
bde2171d 2535 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2536 (build-system python-build-system)
bde2171d 2537 (native-inputs
bb06aa34 2538 `(("python-nose" ,python-nose)
c616b5d3 2539 ("python-mock" ,python-mock)
bde2171d 2540 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2541 ("python-pyjwt" ,python-pyjwt)
2542 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2543 (home-page "https://github.com/idan/oauthlib")
2544 (synopsis "OAuth implementation for Python")
2545 (description
2546 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2547OAuth request-signing logic.")
3f641af0 2548 (license license:bsd-3)
59f151ec 2549 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2550
2551(define-public python2-oauthlib
59f151ec 2552 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2553 (package
2554 (inherit base)
00e10c6e 2555 (native-inputs `(("python2-unittest2" ,python2-unittest2)
59f151ec 2556 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2557
2558(define-public python-itsdangerous
2559 (package
2560 (name "python-itsdangerous")
2561 (version "0.24")
2562 (source
2563 (origin
2564 (method url-fetch)
2565 (uri (string-append
2566 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2567 version ".tar.gz"))
2568 (sha256
2569 (base32
2570 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2571 (build-system python-build-system)
ec5dbb5c
DT
2572 (home-page "http://github.com/mitsuhiko/itsdangerous")
2573 (synopsis "Python library for passing data to/from untrusted environments")
2574 (description
2575 "Itsdangerous provides various helpers to pass trusted data to untrusted
2576environments and back.")
f210e944 2577 (license license:bsd-3)))
ec5dbb5c
DT
2578
2579(define-public python2-itsdangerous
f210e944 2580 (package-with-python2 python-itsdangerous))
5731cae3 2581
8d12be1e
RW
2582(define-public python-pyyaml
2583 (package
2584 (name "python-pyyaml")
2585 (version "3.11")
2586 (source
2587 (origin
2588 (method url-fetch)
2589 (uri (string-append
2590 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2591 version ".tar.gz"))
2592 (sha256
2593 (base32
2594 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2595 (build-system python-build-system)
2596 (inputs
2597 `(("libyaml" ,libyaml)))
8d12be1e
RW
2598 (home-page "http://pyyaml.org/wiki/PyYAML")
2599 (synopsis "YAML parser and emitter for Python")
2600 (description
2601 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2602complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2603API, and sensible error messages. PyYAML supports standard YAML tags and
2604provides Python-specific tags that allow to represent an arbitrary Python
2605object.")
2606 (license license:expat)))
2607
2608(define-public python2-pyyaml
2609 (package-with-python2 python-pyyaml))
2610
5731cae3
DT
2611(define-public python-virtualenv
2612 (package
2613 (name "python-virtualenv")
58d04dba 2614 (version "15.0.3")
5731cae3
DT
2615 (source
2616 (origin
2617 (method url-fetch)
17804240 2618 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2619 (sha256
2620 (base32
58d04dba 2621 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2622 (build-system python-build-system)
17804240
EF
2623 (arguments
2624 `(#:phases
2625 (modify-phases %standard-phases
58d04dba
RW
2626 (replace 'check
2627 (lambda _
2628 ;; Disable failing test. See upstream bug report
2629 ;; https://github.com/pypa/virtualenv/issues/957
2630 (substitute* "tests/test_virtualenv.py"
2631 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2632 (zero? (system* "py.test")))))))
e7881f3d 2633 (native-inputs
f3b98f4f 2634 `(("python-mock" ,python-mock)
17804240 2635 ("python-pytest" ,python-pytest)))
5731cae3
DT
2636 (home-page "https://virtualenv.pypa.io/")
2637 (synopsis "Virtual Python environment builder")
2638 (description
2639 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2640 (license license:expat)))
5731cae3
DT
2641
2642(define-public python2-virtualenv
2643 (package-with-python2 python-virtualenv))
8176d4d5
DT
2644
2645(define-public python-markupsafe
2646 (package
2647 (name "python-markupsafe")
2648 (version "0.23")
2649 (source
2650 (origin
2651 (method url-fetch)
2652 (uri (string-append
2653 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2654 version ".tar.gz"))
2655 (sha256
2656 (base32
2657 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2658 (build-system python-build-system)
8176d4d5
DT
2659 (home-page "http://github.com/mitsuhiko/markupsafe")
2660 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2661 (description
2662 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2663for Python.")
3f641af0 2664 (license license:bsd-3)))
8176d4d5
DT
2665
2666(define-public python2-markupsafe
2667 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2668
2669(define-public python-jinja2
2670 (package
2671 (name "python-jinja2")
e98149b3 2672 (version "2.8")
fe34f0d1
DT
2673 (source
2674 (origin
2675 (method url-fetch)
e98149b3 2676 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2677 (sha256
2678 (base32
e98149b3 2679 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2680 (build-system python-build-system)
f22efa01 2681 (propagated-inputs
f3b98f4f 2682 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2683 (home-page "http://jinja.pocoo.org/")
2684 (synopsis "Python template engine")
2685 (description
2686 "Jinja2 is a small but fast and easy to use stand-alone template engine
2687written in pure Python.")
3f641af0 2688 (license license:bsd-3)))
fe34f0d1
DT
2689
2690(define-public python2-jinja2
2691 (package-with-python2 python-jinja2))
3580ab8b 2692
f7d17ac7
EE
2693(define-public python-pystache
2694 (package
2695 (name "python-pystache")
2696 (version "0.5.4")
2697 (source (origin
2698 (method url-fetch)
2699 (uri (pypi-uri "pystache" version))
2700 (sha256
2701 (base32
2702 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2703 (build-system python-build-system)
f7d17ac7
EE
2704 (home-page "http://defunkt.io/pystache/")
2705 (synopsis "Python logic-less template engine")
2706 (description
2707 "Pystache is a Python implementation of the framework agnostic,
2708logic-free templating system Mustache.")
2709 (license license:expat)))
2710
2711(define-public python2-pystache
2712 (package-with-python2 python-pystache))
2713
1285119b
RW
2714(define-public python-joblib
2715 (package
2716 (name "python-joblib")
f34ef331 2717 (version "0.10.3")
1285119b
RW
2718 (source (origin
2719 (method url-fetch)
f34ef331 2720 (uri (pypi-uri "joblib" version))
1285119b
RW
2721 (sha256
2722 (base32
6aa5f1ca
HG
2723 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2724 (modules '((guix build utils)))
2725 (snippet
2726 '(begin
2727 ;; Remove pre-compiled .pyc files from source.
2728 (for-each delete-file-recursively
2729 (find-files "." "__pycache__" #:directories? #t))
2730 (for-each delete-file (find-files "." "\\.pyc$"))
2731 #t))))
1285119b 2732 (build-system python-build-system)
a8dd960a
RW
2733 (arguments
2734 `(#:phases
2735 (modify-phases %standard-phases
2736 (add-before 'check 'disable-failing-tests
2737 (lambda _
2738 ;; This numpydoc tests fails for unknown reasons
2739 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2740 ;; This numpydoc test depends on matplotlib, which is not a
2741 ;; required input.
2742 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2743 ;; These tests fail to execute sys.executable
2744 (substitute* "joblib/test/test_parallel.py"
2745 (("import nose" line)
2746 (string-append "from nose.plugins.skip import SkipTest\n" line))
2747 (("def test_nested_parallel_warnings" line)
2748 (string-append "@SkipTest\n" line))
2749 (("def test_parallel_with_interactively_defined_functions" line)
2750 (string-append "@SkipTest\n" line)))
2751 #t)))))
f052ec9a 2752 ;; Provide nose to enable tests command
1285119b 2753 (native-inputs
f3b98f4f 2754 `(("python-nose" ,python-nose)
f34ef331
RW
2755 ("python-sphinx" ,python-sphinx)
2756 ("python-docutils" ,python-docutils)
2757 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2758 (home-page "http://pythonhosted.org/joblib/")
2759 (synopsis "Using Python functions as pipeline jobs")
2760 (description
2761 "Joblib is a set of tools to provide lightweight pipelining in Python.
2762In particular, joblib offers: transparent disk-caching of the output values
2763and lazy re-evaluation (memoize pattern), easy simple parallel computing
2764logging and tracing of the execution.")
3f641af0 2765 (license license:bsd-3)))
1285119b
RW
2766
2767(define-public python2-joblib
2768 (package-with-python2 python-joblib))
2769
3580ab8b
DT
2770(define-public python-docutils
2771 (package
2772 (name "python-docutils")
2773 (version "0.12")
2774 (source
2775 (origin
2776 (method url-fetch)
2777 (uri (string-append
2778 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2779 version ".tar.gz"))
2780 (sha256
2781 (base32
2782 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2783 (build-system python-build-system)
3580ab8b
DT
2784 (arguments
2785 '(#:tests? #f)) ; no setup.py test command
2786 (home-page "http://docutils.sourceforge.net/")
2787 (synopsis "Python Documentation Utilities")
2788 (description
2789 "Docutils is a modular system for processing documentation into useful
2790formats, such as HTML, XML, and LaTeX. For input Docutils supports
2791reStructuredText.")
2792 ;; Most of the source code is public domain, but some source files are
2793 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2794 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2795
2796(define-public python2-docutils
2797 (package-with-python2 python-docutils))
fb35b7c0
DT
2798
2799(define-public python-pygments
2800 (package
2801 (name "python-pygments")
9f442285 2802 (version "2.0.2")
fb35b7c0
DT
2803 (source
2804 (origin
2805 (method url-fetch)
9f442285 2806 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2807 (sha256
2808 (base32
9f442285 2809 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0 2810 (build-system python-build-system)
995cb99e
MB
2811 (arguments
2812 ;; FIXME: Tests require sphinx, which depends on this.
2813 '(#:tests? #f))
fb35b7c0
DT
2814 (home-page "http://pygments.org/")
2815 (synopsis "Syntax highlighting")
2816 (description
2817 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2818 (license license:bsd-2)))
fb35b7c0
DT
2819
2820(define-public python2-pygments
2821 (package-with-python2 python-pygments))
9dd6078d
DT
2822
2823(define-public python-sphinx
2824 (package
2825 (name "python-sphinx")
2826 (version "1.2.3")
2827 (source
2828 (origin
2829 (method url-fetch)
2830 (uri (string-append
2831 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2832 version ".tar.gz"))
2833 (sha256
2834 (base32
2835 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2836 (build-system python-build-system)
03cb5f9e
MB
2837 (arguments
2838 ;; FIXME: Missing dependencies.
2839 '(#:tests? #f))
f22efa01 2840 (propagated-inputs
f3b98f4f 2841 `(("python-jinja2" ,python-jinja2)
9dd6078d
DT
2842 ("python-docutils" ,python-docutils)
2843 ("python-pygments" ,python-pygments)))
2844 (home-page "http://sphinx-doc.org/")
2845 (synopsis "Python documentation generator")
2846 (description "Sphinx is a tool that makes it easy to create documentation
2847for Python projects or other documents consisting of multiple reStructuredText
2848sources.")
3f641af0 2849 (license license:bsd-3)))
9dd6078d
DT
2850
2851(define-public python2-sphinx
2852 (package-with-python2 python-sphinx))
6888830b 2853
ad320b20
RW
2854(define-public python-sphinx-rtd-theme
2855 (package
2856 (name "python-sphinx-rtd-theme")
2857 (version "0.1.6")
2858 (source
2859 (origin
2860 (method url-fetch)
2861 (uri (string-append "https://pypi.python.org/packages/source/s/"
2862 "sphinx_rtd_theme/sphinx_rtd_theme-"
2863 version ".tar.gz"))
2864 (sha256
2865 (base32
2866 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2867 (build-system python-build-system)
9d3a15b4
LF
2868 (propagated-inputs
2869 `(("python-sphinx" ,python-sphinx)))
ad320b20
RW
2870 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2871 (synopsis "ReadTheDocs.org theme for Sphinx")
2872 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2873 (license license:expat)))
ad320b20
RW
2874
2875(define-public python2-sphinx-rtd-theme
2876 (package-with-python2 python-sphinx-rtd-theme))
2877
fe94cf0c
HG
2878(define-public python-rst.linker
2879 (package
2880 (name "python-rst.linker")
2881 (version "1.7")
2882 (source
2883 (origin
2884 (method url-fetch)
2885 (uri (pypi-uri "rst.linker" version))
2886 (sha256
2887 (base32
2888 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2889 (build-system python-build-system)
2890 (propagated-inputs
2891 `(("python-dateutil" ,python-dateutil-2)
2892 ("python-six" ,python-six)))
2893 (native-inputs
2894 `(("python-setuptools-scm" ,python-setuptools-scm)))
2895 ;; Test would require path.py, which would introduce a cyclic dependence.
2896 (arguments `(#:tests? #f))
2897 ;; Note: As of version 1.7 the documentation is not worth building.
2898 (home-page "https://github.com/jaraco/rst.linker")
2899 (synopsis "Sphinx plugin to add links and timestamps")
2900 (description "rst.linker allows to automatically replace text by a
2901reStructuredText external reference or timestamps. It's primary purpose is to
2902augment the changelog, but it can be used for other documents, too.")
2903 (license license:expat)))
2904
2905(define-public python2-rst.linker
2906 (package-with-python2 python-rst.linker))
2907
f4de5b3b
CAW
2908(define-public python-feedgenerator
2909 (package
2910 (name "python-feedgenerator")
f0412aa2 2911 (version "1.8")
f4de5b3b 2912 (source
f4de5b3b 2913 (origin
f0412aa2
EF
2914 (method url-fetch)
2915 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2916 (sha256
2917 (base32
7c88bcf4
HG
2918 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
2919 (modules '((guix build utils)))
2920 (snippet
2921 '(begin
2922 ;; Remove pre-compiled .pyc files from source.
2923 (for-each delete-file-recursively
2924 (find-files "." "__pycache__" #:directories? #t))
2925 (for-each delete-file (find-files "." "\\.pyc$"))
2926 #t))))
f4de5b3b 2927 (build-system python-build-system)
dae73d9b 2928 (propagated-inputs
f3b98f4f 2929 `(("python-pytz" ,python-pytz)
f4de5b3b 2930 ("python-six" ,python-six)))
f0412aa2 2931 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2932 (synopsis
2933 "Standalone version of Django's Atom/RSS feed generator")
2934 (description
2935 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2936which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2937 (license license:bsd-3)))
f4de5b3b
CAW
2938
2939(define-public python2-feedgenerator
2940 (package-with-python2 python-feedgenerator))
2941
59ad30e3
CAW
2942(define-public python-blinker
2943 (package
2944 (name "python-blinker")
7fb9ff4d 2945 (version "1.4")
59ad30e3
CAW
2946 (source
2947 (origin
2948 (method url-fetch)
7fb9ff4d 2949 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2950 (sha256
2951 (base32
7fb9ff4d 2952 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 2953 (build-system python-build-system)
59ad30e3
CAW
2954 (home-page "http://pythonhosted.org/blinker/")
2955 (synopsis "Fast, simple object-to-object and broadcast signaling")
2956 (description
2957 "Blinker provides a fast dispatching system that allows any number of
2958interested parties to subscribe to events, or \"signals\".")
2959 (license license:expat)))
2960
2961(define-public python2-blinker
2962 (package-with-python2 python-blinker))
2963
b8050e71
CAW
2964(define-public pelican
2965 (package
2966 (name "pelican")
11f97c27 2967 (version "3.6.3")
b8050e71
CAW
2968 (source
2969 (origin
2970 (method url-fetch)
11f97c27 2971 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2972 (sha256
2973 (base32
11f97c27 2974 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2975 (build-system python-build-system)
f22efa01 2976 (propagated-inputs
b8050e71
CAW
2977 `(("python-feedgenerator" ,python-feedgenerator)
2978 ("python-jinja2" ,python-jinja2)
2979 ("python-pygments" ,python-pygments)
2980 ("python-docutils" ,python-docutils)
2981 ("python-pytz" ,python-pytz)
2982 ("python-blinker" ,python-blinker)
2983 ("python-unidecode" ,python-unidecode)
2984 ("python-six" ,python-six)
2985 ("python-dateutil-2" ,python-dateutil-2)))
2986 (home-page "http://getpelican.com/")
2987 (arguments
2988 `(;; XXX Requires a lot more packages to do unit tests :P
2989 #:tests? #f
2990 #:phases (modify-phases %standard-phases
2991 (add-before
2992 'install 'adjust-requires
2993 ;; Since feedgenerator is installed from git, it doesn't
2994 ;; conform to the version requirements.
2995 ;;
2996 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2997 ;; version requirement so setuptools doesn't get confused.
2998 (lambda _
2999 (substitute* "setup.py"
3000 (("['\"]feedgenerator.*?['\"]")
3001 "'feedgenerator'")))))))
3002 (synopsis "Python-based static site publishing system")
3003 (description
3004 "Pelican is a tool to generate a static blog from reStructuredText,
3005Markdown input files, and more. Pelican uses Jinja2 for templating
3006and is very extensible.")
3f641af0 3007 (license license:agpl3+)))
b8050e71 3008
240ca4aa
RW
3009(define-public python-scikit-learn
3010 (package
3011 (name "python-scikit-learn")
be0a4c26 3012 (version "0.16.1")
240ca4aa
RW
3013 (source
3014 (origin
3015 (method url-fetch)
3016 (uri (string-append
3017 "https://github.com/scikit-learn/scikit-learn/archive/"
3018 version ".tar.gz"))
7e21b9fb 3019 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
3020 (sha256
3021 (base32
be0a4c26 3022 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
3023 (build-system python-build-system)
3024 (arguments
3025 `(#:phases
3026 (alist-cons-before
2f6b3d2e
RW
3027 'check 'set-HOME
3028 ;; some tests require access to "$HOME"
3029 (lambda _ (setenv "HOME" "/tmp"))
3030 ;; Tests can only be run after the library has been installed and not
3031 ;; within the source directory.
3032 (alist-cons-after
3033 'install 'check
3034 (lambda _
3035 (with-directory-excursion "/tmp"
3036 ;; With Python 3 one test of 3334 fails
3037 ;; (sklearn.tests.test_common.test_transformers); see
3038 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
3039 (system* "nosetests" "-v" "sklearn")))
3040 (alist-delete 'check %standard-phases)))))
240ca4aa 3041 (inputs
328bb95d
HG
3042 `(("openblas" ,openblas)))
3043 (native-inputs
3044 `(("python-nose" ,python-nose)))
240ca4aa
RW
3045 (propagated-inputs
3046 `(("python-numpy" ,python-numpy)
3047 ("python-scipy" ,python-scipy)))
3048 (home-page "http://scikit-learn.org/")
3049 (synopsis "Machine Learning in Python")
3050 (description
3051 "Scikit-learn provides simple and efficient tools for data
3052mining and data analysis.")
1b5241c5 3053 (license license:bsd-3)))
240ca4aa
RW
3054
3055(define-public python2-scikit-learn
1b5241c5 3056 (package-with-python2 python-scikit-learn))
240ca4aa 3057
12f8f9bb
RW
3058(define-public python-scikit-image
3059 (package
3060 (name "python-scikit-image")
3061 (version "0.11.3")
3062 (source
3063 (origin
3064 (method url-fetch)
3065 (uri (string-append
3066 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3067 version ".tar.gz"))
3068 (sha256
3069 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3070 (build-system python-build-system)
9026e689
MB
3071 (arguments
3072 ;; TODO: Some tests require running X11 server. Disable them?
3073 '(#:tests? #f))
b83e2333 3074 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3075 (propagated-inputs
3076 `(("python-matplotlib" ,python-matplotlib)
3077 ("python-networkx" ,python-networkx)
12f8f9bb 3078 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3079 ("python-pillow" ,python-pillow)))
3080 (native-inputs
b83e2333
HG
3081 `(("python-numpy" ,python-numpy)
3082 ("python-cython" ,python-cython)
3083 ("python-six" ,python-six)))
12f8f9bb
RW
3084 (home-page "http://scikit-image.org/")
3085 (synopsis "Image processing in Python")
3086 (description
e881752c 3087 "Scikit-image is a collection of algorithms for image processing.")
12733594 3088 (license license:bsd-3)))
12f8f9bb
RW
3089
3090(define-public python2-scikit-image
12733594 3091 (package-with-python2 python-scikit-image))
12f8f9bb 3092
5394a6a6
RW
3093(define-public python-redis
3094 (package
3095 (name "python-redis")
3096 (version "2.10.3")
3097 (source
3098 (origin
3099 (method url-fetch)
3100 (uri (string-append
3101 "https://pypi.python.org/packages/source/r/redis/redis-"
3102 version ".tar.gz"))
3103 (sha256
3104 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3105 (build-system python-build-system)
3106 ;; Tests require a running Redis server
3107 (arguments '(#:tests? #f))
cf8124b0
HG
3108 ;; As long as we are not running test, we do not need this input :-)
3109 ;;(native-inputs
3110 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3111 (home-page "https://github.com/andymccurdy/redis-py")
3112 (synopsis "Redis Python client")
3113 (description
3114 "This package provides a Python interface to the Redis key-value store.")
3115 (license license:expat)))
3116
3117(define-public python2-redis
3118 (package-with-python2 python-redis))
3119
748cef5b
RW
3120(define-public python-rq
3121 (package
3122 (name "python-rq")
3123 (version "0.5.2")
3124 (source
3125 (origin
3126 (method url-fetch)
3127 (uri (string-append
3128 "https://pypi.python.org/packages/source/r/rq/rq-"
3129 version ".tar.gz"))
3130 (sha256
3131 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3132 (build-system python-build-system)
3133 (propagated-inputs
3134 `(("python-click" ,python-click)
3135 ("python-redis" ,python-redis)))
748cef5b
RW
3136 (home-page "http://python-rq.org/")
3137 (synopsis "Simple job queues for Python")
3138 (description
3139 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3140processing them in the background with workers. It is backed by Redis and it
3141is designed to have a low barrier to entry.")
3f641af0 3142 (license license:bsd-2)))
748cef5b
RW
3143
3144(define-public python2-rq
3145 (package-with-python2 python-rq))
3146
6888830b
FB
3147(define-public python-cython
3148 (package
3149 (name "python-cython")
dd22efef 3150 (version "0.24.1")
6888830b
FB
3151 (source
3152 (origin
3153 (method url-fetch)
56918e26 3154 (uri (pypi-uri "Cython" version))
6888830b
FB
3155 (sha256
3156 (base32
dd22efef 3157 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3158 (build-system python-build-system)
3159 ;; we need the full python package and not just the python-wrapper
3160 ;; because we need libpython3.3m.so
3161 (inputs
3162 `(("python" ,python)))
3163 (arguments
3164 `(#:phases
b92f651b
EF
3165 (modify-phases %standard-phases
3166 (add-before 'check 'set-HOME
3167 ;; some tests require access to "$HOME/.cython"
3168 (lambda _ (setenv "HOME" "/tmp")))
3169 (replace 'check
3170 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3171 (home-page "http://cython.org/")
3172 (synopsis "C extensions for Python")
3173 (description "Cython is an optimising static compiler for both the Python
3174programming language and the extended Cython programming language. It makes
3175writing C extensions for Python as easy as Python itself.")
3f641af0 3176 (license license:asl2.0)
48b311b1 3177 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3178
3179(define-public python2-cython
48b311b1
LC
3180 (package (inherit (package-with-python2
3181 (strip-python2-variant python-cython)))
6888830b
FB
3182 (name "python2-cython")
3183 (inputs
3184 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3185
ee5fb7ee
AV
3186;; The RPython toolchain currently does not support Python 3.
3187(define-public python2-rpython
3188 (package
3189 (name "python2-rpython")
3190 (version "0.1.4")
3191 (source
3192 (origin
3193 (method url-fetch)
3194 (uri (pypi-uri "rpython" version))
3195 (sha256
3196 (base32
3197 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3198 (build-system python-build-system)
3199 (arguments `(#:python ,python-2))
3200 (native-inputs
f3b98f4f 3201 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3202 (home-page "https://rpython.readthedocs.org")
3203 (synopsis "Framework for implementing interpreters and virtual machines")
3204 (description "RPython is a translation and support framework for
3205producing implementations of dynamic languages, emphasizing a clean separation
3206between language specification and implementation aspects.")
3207 (license license:expat)))
3208
0da98533
FB
3209;; This version of numpy is missing the documentation and is only used to
3210;; build matplotlib which is required to build numpy's documentation.
3211(define python-numpy-bootstrap
3212 (package
3213 (name "python-numpy-bootstrap")
ef9b4c04 3214 (version "1.10.4")
0da98533
FB
3215 (source
3216 (origin
3217 (method url-fetch)
de67e922 3218 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3219 "/numpy-" version ".tar.gz"))
3220 (sha256
3221 (base32
ef9b4c04 3222 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3223 (build-system python-build-system)
3224 (inputs
328bb95d 3225 `(("openblas" ,openblas)
cba256f8 3226 ("lapack" ,lapack)))
0da98533 3227 (native-inputs
2efabc55
HG
3228 `(("python-nose" ,python-nose)
3229 ("gfortran" ,gfortran)))
0da98533
FB
3230 (arguments
3231 `(#:phases
2efabc55
HG
3232 (modify-phases %standard-phases
3233 (add-before 'build 'set-environment-variables
3234 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3235 (call-with-output-file "site.cfg"
3236 (lambda (port)
cba256f8
RW
3237 (format port
3238 "[openblas]
dbdfe515
RW
3239libraries = openblas
3240library_dirs = ~a/lib
3241include_dirs = ~a/include
cba256f8 3242
2efabc55
HG
3243# backslash-n to make emacs happy
3244\n[lapack]
cba256f8
RW
3245lapack_libs = lapack
3246library_dirs = ~a/lib
3247include_dirs = ~a/include
3248"
3249 (assoc-ref inputs "openblas")
3250 (assoc-ref inputs "openblas")
3251 (assoc-ref inputs "lapack")
3252 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3253 ;; Use "gcc" executable, not "cc".
3254 (substitute* "numpy/distutils/system_info.py"
3255 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3256 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3257 #t))
6a843168
FB
3258 ;; Tests can only be run after the library has been installed and not
3259 ;; within the source directory.
2efabc55
HG
3260 (delete 'check)
3261 (add-after 'install 'check
3262 (lambda* (#:key outputs inputs #:allow-other-keys)
3263 ;; Make installed package available for running the tests
3264 (add-installed-pythonpath inputs outputs)
6a843168 3265 (with-directory-excursion "/tmp"
89b5c60e 3266 (zero? (system* "python" "-c"
2efabc55 3267 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3268 (home-page "http://www.numpy.org/")
3269 (synopsis "Fundamental package for scientific computing with Python")
3270 (description "NumPy is the fundamental package for scientific computing
e881752c 3271with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3272object, sophisticated (broadcasting) functions, tools for integrating C/C++
3273and Fortran code, useful linear algebra, Fourier transform, and random number
3274capabilities.")
3f641af0 3275 (license license:bsd-3)))
0da98533
FB
3276
3277(define python2-numpy-bootstrap
3278 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3279
3a1bfe18
RW
3280(define-public python2-fastlmm
3281 (package
3282 (name "python2-fastlmm")
b074e7d4 3283 (version "0.2.21")
3a1bfe18
RW
3284 (source
3285 (origin
3286 (method url-fetch)
b074e7d4 3287 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3288 (sha256
3289 (base32
b074e7d4 3290 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3291 (build-system python-build-system)
3292 (arguments
3293 `(#:python ,python-2)) ; only Python 2.7 is supported
3294 (propagated-inputs
3295 `(("python2-numpy" ,python2-numpy)
3296 ("python2-scipy" ,python2-scipy)
3297 ("python2-matplotlib" ,python2-matplotlib)
3298 ("python2-pandas" ,python2-pandas)
3299 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3300 ("python2-pysnptools" ,python2-pysnptools)))
3301 (native-inputs
3302 `(("unzip" ,unzip)
2efabc55 3303 ("python2-cython" ,python2-cython)
1b6d7c3f
MB
3304 ("python2-mock" ,python2-mock)
3305 ("python2-nose" ,python2-nose)))
3a1bfe18
RW
3306 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3307 (synopsis "Perform genome-wide association studies on large data sets")
3308 (description
3309 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3310Models, is a program for performing both single-SNP and SNP-set genome-wide
3311association studies (GWAS) on extremely large data sets.")
3f641af0 3312 (license license:asl2.0)))
3a1bfe18 3313
2ee8869a
FB
3314(define-public python-numpy
3315 (package (inherit python-numpy-bootstrap)
3316 (name "python-numpy")
3317 (outputs '("out" "doc"))
89b5c60e 3318 (inputs
b0aa6ede
HG
3319 `(("which" ,which)
3320 ,@(package-inputs python-numpy-bootstrap)))
2efabc55
HG
3321 (propagated-inputs
3322 `(("python-matplotlib" ,python-matplotlib)
2ee8869a 3323 ("python-pyparsing" ,python-pyparsing)
b0aa6ede 3324 ,@(package-propagated-inputs python-numpy-bootstrap)))
2ee8869a
FB
3325 (native-inputs
3326 `(("pkg-config" ,pkg-config)
2efabc55
HG
3327 ("python-sphinx" ,python-sphinx)
3328 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3329 ("texlive" ,texlive)
3330 ("texinfo" ,texinfo)
3331 ("perl" ,perl)
3332 ,@(package-native-inputs python-numpy-bootstrap)))
3333 (arguments
89b5c60e 3334 `(,@(substitute-keyword-arguments
2ee8869a
FB
3335 (package-arguments python-numpy-bootstrap)
3336 ((#:phases phases)
3337 `(alist-cons-after
3338 'install 'install-doc
2efabc55
HG
3339 (lambda* (#:key inputs outputs #:allow-other-keys)
3340 ;; Make installed package available for building the
3341 ;; documentation
3342 (add-installed-pythonpath inputs outputs)
2ee8869a 3343 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3344 (doc (string-append
3345 data "/doc/" ,name "-"
2ee8869a
FB
3346 ,(package-version python-numpy-bootstrap)))
3347 (info (string-append data "/info"))
3348 (html (string-append doc "/html"))
3349 (pyver ,(string-append "PYVER=")))
3350 (with-directory-excursion "doc"
3351 (mkdir-p html)
3352 (system* "make" "html" pyver)
3353 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3354 (system* "make" "-C" "build/latex"
2ee8869a
FB
3355 "all-pdf" "PAPER=a4" pyver)
3356 ;; FIXME: Generation of the info file fails.
3357 ;; (system* "make" "info" pyver)
3358 ;; (mkdir-p info)
3359 ;; (copy-file "build/texinfo/numpy.info"
3360 ;; (string-append info "/numpy.info"))
3361 (for-each (lambda (file)
3362 (copy-file (string-append "build/latex" file)
3363 (string-append doc file)))
3364 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3365 (with-directory-excursion "build/html"
3366 (for-each (lambda (file)
3367 (let* ((dir (dirname file))
3368 (tgt-dir (string-append html "/" dir)))
3369 (unless (equal? "." dir)
3370 (mkdir-p tgt-dir))
96c46210 3371 (install-file file html)))
2ee8869a
FB
3372 (find-files "." ".*"))))))
3373 ,phases)))))))
3374
764c077b 3375(define-public python2-numpy
57b7b8cd 3376 (package-with-python2 python-numpy))
2ee8869a 3377
15bfe6d6
FB
3378(define-public python-pyparsing
3379 (package
3380 (name "python-pyparsing")
e0669289 3381 (version "2.0.3")
15bfe6d6
FB
3382 (source
3383 (origin
3384 (method url-fetch)
de67e922
LF
3385 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3386 "/pyparsing-" version
15bfe6d6
FB
3387 "/pyparsing-" version ".tar.gz"))
3388 (sha256
3389 (base32
e0669289 3390 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3391 (build-system python-build-system)
3392 (outputs '("out" "doc"))
3393 (arguments
3394 `(#:tests? #f ; no test target
3395 #:modules ((guix build python-build-system)
3396 (guix build utils))
3397 #:phases
3398 (alist-cons-after
3399 'install 'install-doc
3400 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3401 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3402 "/share/doc/" ,name "-" ,version))
3403 (html-doc (string-append doc "/html"))
3404 (examples (string-append doc "/examples")))
3405 (mkdir-p html-doc)
3406 (mkdir-p examples)
89b5c60e 3407 (for-each
15bfe6d6 3408 (lambda (dir tgt)
89b5c60e 3409 (map (lambda (file)
96c46210 3410 (install-file file tgt))
15bfe6d6
FB
3411 (find-files dir ".*")))
3412 (list "docs" "htmldoc" "examples")
3413 (list doc html-doc examples))))
3414 %standard-phases)))
3415 (home-page "http://pyparsing.wikispaces.com")
3416 (synopsis "Python parsing class library")
3417 (description
3418 "The pyparsing module is an alternative approach to creating and
3419executing simple grammars, vs. the traditional lex/yacc approach, or the use
3420of regular expressions. The pyparsing module provides a library of classes
3421that client code uses to construct the grammar directly in Python code.")
bd3fa666 3422 (license license:expat)))
15bfe6d6
FB
3423
3424(define-public python2-pyparsing
3425 (package-with-python2 python-pyparsing))
3426
ec00de35
FB
3427(define-public python-numpydoc
3428 (package
3429 (name "python-numpydoc")
3430 (version "0.5")
3431 (source
3432 (origin
3433 (method url-fetch)
89b5c60e 3434 (uri (string-append
ec00de35
FB
3435 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3436 version ".tar.gz"))
3437 (sha256
3438 (base32
5e4d8f67
AE
3439 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3440 (modules '((guix build utils)))
3441 (snippet
3442 '(begin
3443 ;; Drop a test requiring matplotlib, which we cannot add as an
3444 ;; input since it would create a circular dependency: Extend the
3445 ;; test for Python 3, where it is already dropped, to Python 2.
3446 (substitute* "numpydoc/tests/test_plot_directive.py"
3447 (("3") "2"))))))
ec00de35 3448 (build-system python-build-system)
fe4a8da4 3449 (propagated-inputs
213d1745
HG
3450 `(("python-sphinx" ,python-sphinx)))
3451 (native-inputs
3452 `(("python-nose" ,python-nose)))
ec00de35
FB
3453 (home-page "https://pypi.python.org/pypi/numpydoc")
3454 (synopsis
3455 "Numpy's Sphinx extensions")
3456 (description
3457 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3458 (license license:bsd-2)))
ec00de35
FB
3459
3460(define-public python2-numpydoc
5e4d8f67 3461 (package-with-python2 python-numpydoc))
1c65314c 3462
1e656049
RW
3463(define-public python-numexpr
3464 (package
3465 (name "python-numexpr")
26112c0a 3466 (version "2.6.0")
1e656049
RW
3467 (source
3468 (origin
3469 (method url-fetch)
26112c0a 3470 (uri (pypi-uri "numexpr" version))
1e656049
RW
3471 (sha256
3472 (base32
26112c0a 3473 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3474 (build-system python-build-system)
3475 (arguments `(#:tests? #f)) ; no tests included
3476 (propagated-inputs
3477 `(("python-numpy" ,python-numpy)))
3478 (home-page "https://github.com/pydata/numexpr")
3479 (synopsis "Fast numerical expression evaluator for NumPy")
3480 (description
3481 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3482expressions that operate on arrays are accelerated and use less memory than
3483doing the same calculation in Python. In addition, its multi-threaded
3484capabilities can make use of all your cores, which may accelerate
3485computations, most specially if they are not memory-bounded (e.g. those using
3486transcendental functions).")
f210e944 3487 (license license:expat)))
1e656049
RW
3488
3489(define-public python2-numexpr
f210e944 3490 (package-with-python2 python-numexpr))
1e656049 3491
1c65314c
FB
3492(define-public python-matplotlib
3493 (package
3494 (name "python-matplotlib")
1bbc659f 3495 (version "1.4.3")
1c65314c
FB
3496 (source
3497 (origin
3498 (method url-fetch)
de67e922
LF
3499 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3500 "/matplotlib-" version
1c65314c
FB
3501 "/matplotlib-" version ".tar.gz"))
3502 (sha256
3503 (base32
1bbc659f 3504 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3505 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3506 (build-system python-build-system)
3507 (outputs '("out" "doc"))
25f9a068
FB
3508 (propagated-inputs ; the following packages are all needed at run time
3509 `(("python-pyparsing" ,python-pyparsing)
3510 ("python-pygobject" ,python-pygobject)
3511 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3512 ("python-tkinter" ,python "tk")
ca33a3ad
HG
3513 ("python-dateutil" ,python-dateutil-2)
3514 ("python-numpy" ,python-numpy-bootstrap)
3515 ("python-pillow" ,python-pillow)
3516 ("python-pytz" ,python-pytz)
3517 ("python-six" ,python-six)
25f9a068
FB
3518 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3519 ;; from 'gtk+') provides the required 'typelib' files used by
3520 ;; 'gobject-introspection'. The location of these files is set with the
3521 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3522 ;; is done automatically by a 'native-search-path' procedure. However,
3523 ;; at run-time the user must set this variable as follows:
3524 ;;
3525 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3526 ("gtk+" ,gtk+)
3527 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3528 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3529 ;; object. For this reason we need to import both libraries.
3530 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3531 ("python-pycairo" ,python-pycairo)
3532 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3533 (inputs
ca33a3ad 3534 `(("libpng" ,libpng)
1c65314c
FB
3535 ("imagemagick" ,imagemagick)
3536 ("freetype" ,freetype)
25f9a068
FB
3537 ("cairo" ,cairo)
3538 ("glib" ,glib)
1c65314c 3539 ;; FIXME: Add backends when available.
1c65314c
FB
3540 ;("python-wxpython" ,python-wxpython)
3541 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3542 ("tcl" ,tcl)
3543 ("tk" ,tk)))
1c65314c
FB
3544 (native-inputs
3545 `(("pkg-config" ,pkg-config)
ca33a3ad
HG
3546 ("python-sphinx" ,python-sphinx)
3547 ("python-numpydoc" ,python-numpydoc)
3548 ("python-nose" ,python-nose)
3549 ("python-mock" ,python-mock)
1c65314c
FB
3550 ("texlive" ,texlive)
3551 ("texinfo" ,texinfo)))
3552 (arguments
3553 `(#:phases
25f9a068
FB
3554 (alist-cons-before
3555 'build 'configure-environment
3556 (lambda* (#:key outputs inputs #:allow-other-keys)
3557 (let ((cairo (assoc-ref inputs "cairo"))
3558 (gtk+ (assoc-ref inputs "gtk+")))
3559 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3560 ;; has not effect.
25f9a068
FB
3561 (setenv "LD_LIBRARY_PATH"
3562 (string-append cairo "/lib:" gtk+ "/lib"))
3563 (setenv "HOME" (getcwd))
3564 (call-with-output-file "setup.cfg"
3565 (lambda (port)
1bbc659f
FB
3566 (format port "[directories]~%
3567basedirlist = ~a,~a~%
57b7b8cd 3568 [rc_options]~%
1bbc659f
FB
3569backend = TkAgg~%"
3570 (assoc-ref inputs "tcl")
3571 (assoc-ref inputs "tk"))))))
25f9a068
FB
3572 (alist-cons-after
3573 'install 'install-doc
ca33a3ad 3574 (lambda* (#:key inputs outputs #:allow-other-keys)
25f9a068
FB
3575 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3576 (doc (string-append data "/doc/" ,name "-" ,version))
3577 (info (string-append data "/info"))
3578 (html (string-append doc "/html")))
ca33a3ad
HG
3579 ;; Make installed package available for building the
3580 ;; documentation
3581 (add-installed-pythonpath inputs outputs)
25f9a068 3582 (with-directory-excursion "doc"
25f9a068
FB
3583 ;; Produce pdf in 'A4' format.
3584 (substitute* (find-files "." "conf\\.py")
3585 (("latex_paper_size = 'letter'")
3586 "latex_paper_size = 'a4'"))
3587 (mkdir-p html)
3588 (mkdir-p info)
3589 ;; The doc recommends to run the 'html' target twice.
3590 (system* "python" "make.py" "html")
3591 (system* "python" "make.py" "html")
18b31516 3592 (copy-recursively "build/html" html)
25f9a068
FB
3593 (system* "python" "make.py" "latex")
3594 (system* "python" "make.py" "texinfo")
18b31516
FB
3595 (symlink (string-append html "/_images")
3596 (string-append info "/matplotlib-figures"))
3597 (with-directory-excursion "build/texinfo"
3598 (substitute* "matplotlib.texi"
3599 (("@image\\{([^,]*)" all file)
3600 (string-append "@image{matplotlib-figures/" file)))
3601 (symlink (string-append html "/_images")
3602 "./matplotlib-figures")
3603 (system* "makeinfo" "--no-split"
3604 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3605 (copy-file "build/texinfo/matplotlib.info"
3606 (string-append info "/matplotlib.info"))
3607 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3608 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3609 %standard-phases))))
1c65314c
FB
3610 (home-page "http://matplotlib.org")
3611 (synopsis "2D plotting library for Python")
3612 (description
3613 "Matplotlib is a Python 2D plotting library which produces publication
3614quality figures in a variety of hardcopy formats and interactive environments
3615across platforms. Matplotlib can be used in Python scripts, the python and
3616ipython shell, web application servers, and six graphical user interface
3617toolkits.")
3f641af0 3618 (license license:psfl)
57b7b8cd 3619 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3620
764c077b 3621(define-public python2-matplotlib
57b7b8cd
LC
3622 (let ((matplotlib (package-with-python2
3623 (strip-python2-variant python-matplotlib))))
764c077b 3624 (package (inherit matplotlib)
88c26834
AE
3625 ;; Make sure to use special packages for Python 2 instead
3626 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3627 (propagated-inputs
7ca0dbc3 3628 `(("python2-pycairo" ,python2-pycairo)
764c077b 3629 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3630 ("python2-tkinter" ,python-2 "tk")
3631 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3632 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3633
0dde6232
RW
3634(define-public python2-pysnptools
3635 (package
3636 (name "python2-pysnptools")
a800018e 3637 (version "0.3.9")
0dde6232
RW
3638 (source
3639 (origin
3640 (method url-fetch)
3f2e9675 3641 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3642 (sha256
3643 (base32
a800018e 3644 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3645 (build-system python-build-system)
3646 (arguments
3647 `(#:python ,python-2)) ; only Python 2.7 is supported
3648 (propagated-inputs
3649 `(("python2-numpy" ,python2-numpy)
3650 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
3651 ("python2-pandas" ,python2-pandas)))
3652 (native-inputs
3653 `(("python2-cython" ,python2-cython)))
0dde6232 3654 (native-inputs
f3b98f4f 3655 `(("unzip" ,unzip)))
0dde6232
RW
3656 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3657 (synopsis "Library for reading and manipulating genetic data")
3658 (description
3659 "PySnpTools is a library for reading and manipulating genetic data. It
3660can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3661those files. It can also efficiently manipulate ranges of integers using set
3662operators such as union, intersection, and difference.")
3f641af0 3663 (license license:asl2.0)))
0dde6232 3664
c9b1b4f9
RW
3665(define-public python-rpy2
3666 (package
3667 (name "python-rpy2")
ec3bcbc7 3668 (version "2.7.6")
c9b1b4f9
RW
3669 (source
3670 (origin
3671 (method url-fetch)
ec3bcbc7 3672 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3673 (sha256
3674 (base32
ec3bcbc7 3675 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 3676 (build-system python-build-system)
482d9591
HG
3677 (propagated-inputs
3678 `(("python-six" ,python-six)))
c9b1b4f9 3679 (inputs
482d9591 3680 `(("readline" ,readline)
c9b1b4f9
RW
3681 ("icu4c" ,icu4c)
3682 ("pcre" ,pcre)
3683 ("r" ,r)))
3684 (native-inputs
f3b98f4f 3685 `(("zlib" ,zlib)))
c9b1b4f9
RW
3686 (home-page "http://rpy.sourceforge.net/")
3687 (synopsis "Python interface to the R language")
3688 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3689low-level interface to R from Python, a proposed high-level interface,
3690including wrappers to graphical libraries, as well as R-like structures and
3691functions.")
3f641af0 3692 (license license:gpl3+)))
c9b1b4f9
RW
3693
3694(define-public python2-rpy2
3695 (let ((rpy2 (package-with-python2 python-rpy2)))
3696 (package (inherit rpy2)
3697 (native-inputs
3698 `(("python2-singledispatch" ,python2-singledispatch)
3699 ,@(package-native-inputs rpy2))))))
3700
bb986599
FB
3701(define-public python-scipy
3702 (package
3703 (name "python-scipy")
ba8a0824 3704 (version "0.16.0")
bb986599
FB
3705 (source
3706 (origin
3707 (method url-fetch)
de67e922
LF
3708; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3709 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3710 "/scipy-" version ".tar.xz"))
bb986599
FB
3711 (sha256
3712 (base32
ba8a0824 3713 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3714 (build-system python-build-system)
dd86c0d1 3715 (propagated-inputs
bb986599
FB
3716 `(("python-numpy" ,python-numpy)
3717 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3718 ("python-pyparsing" ,python-pyparsing)))
3719 (inputs
3720 `(("lapack" ,lapack)
719b01c1 3721 ("openblas" ,openblas)))
bb986599 3722 (native-inputs
dd86c0d1
RW
3723 `(("python-nose" ,python-nose)
3724 ("python-sphinx" ,python-sphinx)
5248d49e 3725 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3726 ("gfortran" ,gfortran)
bb986599
FB
3727 ("texlive" ,texlive)
3728 ("perl" ,perl)))
3729 (outputs '("out" "doc"))
3730 (arguments
3731 `(#:phases
3732 (alist-cons-before
719b01c1 3733 'build 'configure-openblas
bb986599 3734 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3735 (call-with-output-file "site.cfg"
3736 (lambda (port)
3737 (format port
3738 "[blas]
3739libraries = openblas
3740library_dirs = ~a/lib
3741include_dirs = ~a/include
d548e6aa
HG
3742
3743# backslash-n to make emacs happy
3744\n[atlas]
719b01c1
RW
3745library_dirs = ~a/lib
3746atlas_libs = openblas
3747"
3748 (assoc-ref inputs "openblas")
3749 (assoc-ref inputs "openblas")
3750 (assoc-ref inputs "openblas"))))
3751 #t)
bb986599
FB
3752 (alist-cons-after
3753 'install 'install-doc
d548e6aa 3754 (lambda* (#:key inputs outputs #:allow-other-keys)
bb986599
FB
3755 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3756 (doc (string-append data "/doc/" ,name "-" ,version))
3757 (html (string-append doc "/html"))
3758 (pyver ,(string-append "PYVER=")))
d548e6aa
HG
3759 ;; Make installed package available for building the
3760 ;; documentation
3761 (add-installed-pythonpath inputs outputs)
bb986599 3762 (with-directory-excursion "doc"
bb986599
FB
3763 ;; Fix generation of images for mathematical expressions.
3764 (substitute* (find-files "source" "conf\\.py")
3765 (("pngmath_use_preview = True")
3766 "pngmath_use_preview = False"))
3767 (mkdir-p html)
3768 (system* "make" "html" pyver)
3769 (system* "make" "latex" "PAPER=a4" pyver)
3770 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3771 (copy-file "build/latex/scipy-ref.pdf"
3772 (string-append doc "/scipy-ref.pdf"))
3773 (with-directory-excursion "build/html"
3774 (for-each (lambda (file)
3775 (let* ((dir (dirname file))
3776 (tgt-dir (string-append html "/" dir)))
96c46210 3777 (install-file file html)))
bb986599
FB
3778 (find-files "." ".*"))))))
3779 ;; Tests can only be run after the library has been installed and not
3780 ;; within the source directory.
3781 (alist-cons-after
3782 'install 'check
89b5c60e 3783 (lambda _
bb986599
FB
3784 (with-directory-excursion "/tmp"
3785 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3786 (alist-delete
3787 'check
4f9ff21e
RW
3788 (alist-cons-after
3789 'unpack 'fix-tests
3790 (lambda _
3791 (substitute* "scipy/integrate/tests/test_quadpack.py"
3792 (("libm.so") "libm.so.6"))
3793 #t)
3794 %standard-phases)))))))
bb986599
FB
3795 (home-page "http://www.scipy.org/")
3796 (synopsis "The Scipy library provides efficient numerical routines")
3797 (description "The SciPy library is one of the core packages that make up
3798the SciPy stack. It provides many user-friendly and efficient numerical
3799routines such as routines for numerical integration and optimization.")
3f641af0 3800 (license license:bsd-3)))
bb986599 3801
764c077b 3802(define-public python2-scipy
57b7b8cd 3803 (package-with-python2 python-scipy))
bb986599 3804
73acc193 3805(define-public python-socksipy-branch
3806 (package
3807 (name "python-socksipy-branch")
3808 (version "1.01")
3809 (source
3810 (origin
3811 (method url-fetch)
3812 (uri (pypi-uri "SocksiPy-branch" version))
3813 (sha256
3814 (base32
3815 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3816 (build-system python-build-system)
3817 (arguments
3818 `(#:tests? #f)) ; There are no tests
3819 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3820 (synopsis "Python SOCKS module")
3821 (description
3822 "SocksiPy - A Python SOCKS client module. It provides a
3823socket-like interface that supports connections to any TCP
3824service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3825The original version was developed by Dan Haim, this is a
3826branch created by Mario Vilas to address some open issues,
3827as the original project seems to have been abandoned circa 2007.")
3828 (license license:bsd-3)))
3829
3830(define-public python2-socksipy-branch
3831 (package-with-python2 python-socksipy-branch))
3832
94914805
EB
3833(define-public python-sqlalchemy
3834 (package
3835 (name "python-sqlalchemy")
a4ba286b 3836 (version "1.0.12")
94914805
EB
3837 (source
3838 (origin
3839 (method url-fetch)
3840 (uri (string-append "https://pypi.python.org/packages/source/S/"
3841 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3842 (sha256
3843 (base32
a4ba286b 3844 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3845 (build-system python-build-system)
3846 (native-inputs
3847 `(("python-cython" ,python-cython) ;for c extensions
3848 ("python-pytest" ,python-pytest)
3849 ("python-mock" ,python-mock))) ;for tests
3850 (arguments
3851 `(#:phases (alist-replace
3852 'check
3853 (lambda _ (zero? (system* "py.test")))
3854 %standard-phases)))
3855 (home-page "http://www.sqlalchemy.org")
3856 (synopsis "Database abstraction library")
3857 (description
3858 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3859gives application developers the full power and flexibility of SQL. It
3860provides a full suite of well known enterprise-level persistence patterns,
3861designed for efficient and high-performing database access, adapted into a
3862simple and Pythonic domain language.")
3f641af0 3863 (license license:x11)))
94914805
EB
3864
3865(define-public python2-sqlalchemy
3866 (package-with-python2 python-sqlalchemy))
c937562e 3867
4a093330
DM
3868(define-public python-pycodestyle
3869 (package
3870 (name "python-pycodestyle")
3871 (version "2.0.0")
3872 (source
3873 (origin
3874 (method url-fetch)
3875 (uri (pypi-uri "pycodestyle" version))
3876 (sha256
3877 (base32
3878 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3879 (build-system python-build-system)
3880 (home-page "https://pycodestyle.readthedocs.io/")
3881 (synopsis "Python style guide checker")
3882 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3883Python code against some of the style conventions in
3884@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 3885 (license license:expat)))
4a093330
DM
3886
3887(define-public python2-pycodestyle
f210e944 3888 (package-with-python2 python-pycodestyle))
b91912c4
DM
3889
3890(define-public python-orderedmultidict
3891 (package
3892 (name "python-orderedmultidict")
3893 (version "0.7.10")
3894 (source
3895 (origin
3896 (method url-fetch)
3897 (uri (pypi-uri "orderedmultidict" version))
3898 (sha256
3899 (base32
3900 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3901 (build-system python-build-system)
3902 (arguments
3903 `(#:phases
3904 (modify-phases %standard-phases
3905 (add-after 'unpack 'fix-tests
3906 (lambda _
3907 ;; The package uses nosetest for running the tests.
3908 ;; Adding this initfile allows to run the test suite
3909 ;; without requiring nosetest.
3910 (zero? (system* "touch" "tests/__init__.py")))))))
3911 (propagated-inputs
3912 `(("python-six" ,python-six)))
3913 (native-inputs
3914 `(("python-pycodestyle" ,python-pycodestyle)))
3915 (home-page "https://github.com/gruns/orderedmultidict")
3916 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3917 (description "This package contains a library for ordered multivalue
3918dictionaries. A multivalue dictionary is a dictionary that can store
3919multiple values for the same key. An ordered multivalue dictionary is a
3920multivalue dictionary that retains the order of insertions and deletions.")
f210e944 3921 (license license:unlicense)))
b91912c4
DM
3922
3923(define-public python2-orderedmultidict
f210e944 3924 (package-with-python2 python-orderedmultidict))
9dede065
DM
3925
3926(define-public python-furl
3927 (package
3928 (name "python-furl")
3929 (version "0.5.6")
3930 (source
3931 (origin
3932 (method url-fetch)
3933 (uri (pypi-uri "furl" version))
3934 (sha256
3935 (base32
3936 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3937 (build-system python-build-system)
3938 (propagated-inputs
3939 `(("python-six" ,python-six)
3940 ("python-orderedmultidict" ,python-orderedmultidict)))
3941 (native-inputs
3942 `(("python-pycodestyle" ,python-pycodestyle)))
3943 (home-page "https://github.com/gruns/furl")
3944 (synopsis "URL manipulation in Python")
3945 (description "Furl provides an easy-to-use alternative to the
3946@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 3947 (license license:unlicense)))
9dede065
DM
3948
3949(define-public python2-furl
f210e944 3950 (package-with-python2 python-furl))
462bf271
DM
3951
3952(define-public python-flask-babel
3953 (package
3954 (name "python-flask-babel")
3955 (version "0.11.1")
3956 (source
3957 (origin
3958 (method url-fetch)
3959 (uri (pypi-uri "Flask-Babel" version))
3960 (sha256
3961 (base32
3962 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3963 (build-system python-build-system)
3964 (propagated-inputs
3965 `(("python-flask" ,python-flask)
3966 ("python-babel" ,python-babel)
3967 ("python-jinja2" ,python-jinja2)
3968 ("python-pytz" ,python-pytz)))
3969 (home-page "https://github.com/python-babel/flask-babel")
3970 (synopsis "Add i18n/l10n support to Flask applications")
3971 (description "This package implements internationalization and localization
3972support for Flask. This is based on the Python babel module as well as pytz -
3973both of which are installed automatically if you install this library.")
f210e944 3974 (license license:bsd-3)))
462bf271
DM
3975
3976(define-public python2-flask-babel
f210e944 3977 (package-with-python2 python-flask-babel))
4a093330 3978
de2966cf
EF
3979(define-public python-sqlalchemy-utils
3980 (package
3981 (name "python-sqlalchemy-utils")
bb4b1706 3982 (version "0.32.11")
de2966cf
EF
3983 (source
3984 (origin
3985 (method url-fetch)
3986 (uri (pypi-uri "SQLAlchemy-Utils" version))
3987 (sha256
3988 (base32
bb4b1706 3989 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
de2966cf 3990 (build-system python-build-system)
c22b4f87 3991 (propagated-inputs
de2966cf
EF
3992 `(("python-six" ,python-six)
3993 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb
DM
3994 (native-inputs
3995 `(("python-pytest" ,python-pytest)))
de2966cf
EF
3996 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3997 (synopsis "Various utility functions for SQLAlchemy")
3998 (description
3999 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
4000for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4001
4002You might also want to install the following optional dependencies:
4003@enumerate
4004@item @code{python-passlib}
4005@item @code{python-babel}
4006@item @code{python-cryptography}
4007@item @code{python-pytz}
4008@item @code{python-psycopg2}
4009@item @code{python-furl}
4010@item @code{python-flask-babel}
4011@end enumerate
4012")
de2966cf
EF
4013 (license license:bsd-3)))
4014
4015(define-public python2-sqlalchemy-utils
f210e944 4016 (package-with-python2 python-sqlalchemy-utils))
de2966cf 4017
af5a4602
CAW
4018(define-public python-alembic
4019 (package
4020 (name "python-alembic")
bb484529 4021 (version "0.8.7")
af5a4602
CAW
4022 (source
4023 (origin
4024 (method url-fetch)
4025 (uri (pypi-uri "alembic" version))
4026 (sha256
4027 (base32
bb484529 4028 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
4029 (build-system python-build-system)
4030 (native-inputs
4031 `(("python-mock" ,python-mock)
4032 ("python-pytest-cov" ,python-pytest-cov)))
4033 (propagated-inputs
4034 `(("python-sqlalchemy" ,python-sqlalchemy)
4035 ("python-mako" ,python-mako)
4036 ("python-editor" ,python-editor)))
4037 (home-page "http://bitbucket.org/zzzeek/alembic")
4038 (synopsis
4039 "Database migration tool for SQLAlchemy")
4040 (description
4041 "Alembic is a lightweight database migration tool for usage with the
4042SQLAlchemy Database Toolkit for Python.")
f210e944 4043 (license license:expat)))
af5a4602
CAW
4044
4045(define-public python2-alembic
f210e944 4046 (package-with-python2 python-alembic))
af5a4602 4047
1671c07c
EB
4048(define-public python-distutils-extra
4049 (package
4050 (name "python-distutils-extra")
4051 (version "2.38")
4052 (source
4053 (origin
4054 (method url-fetch)
4055 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4056 version "/+download/python-distutils-extra-"
4057 version ".tar.gz"))
4058 (sha256
4059 (base32
4060 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4061 (build-system python-build-system)
1671c07c
EB
4062 (home-page "https://launchpad.net/python-distutils-extra/")
4063 (synopsis "Enhancements to Python's distutils")
4064 (description
4065 "The python-distutils-extra module enables you to easily integrate
4066gettext support, themed icons, and scrollkeeper-based documentation into
4067Python's distutils.")
3f641af0 4068 (license license:gpl2)))
1671c07c
EB
4069
4070(define-public python2-distutils-extra
4071 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4072
4073(define-public python2-elib.intl
4074 (package
4075 (name "python2-elib.intl")
4076 (version "0.0.3")
4077 (source
4078 (origin
4079 ;; This project doesn't tag releases or publish tarballs, so we take
4080 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4081 (method git-fetch)
4082 (uri (git-reference
4083 (url "https://github.com/dieterv/elib.intl.git")
4084 (commit "d09997cfef")))
4085 (sha256
4086 (base32
4087 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4088 (build-system python-build-system)
ea5456c8
EB
4089 (arguments
4090 ;; incompatible with Python 3 (exception syntax)
4091 `(#:python ,python-2
b41a05ce 4092 #:tests? #f))
ea5456c8
EB
4093 (home-page "https://github.com/dieterv/elib.intl")
4094 (synopsis "Enhanced internationalization for Python")
4095 (description
4096 "The elib.intl module provides enhanced internationalization (I18N)
4097services for your Python modules and applications.")
3f641af0 4098 (license license:lgpl3+)))
ea5456c8 4099
c937562e
EB
4100(define-public python-pillow
4101 (package
4102 (name "python-pillow")
aba5182c 4103 (version "3.3.3")
c937562e
EB
4104 (source
4105 (origin
4106 (method url-fetch)
f1d9231d 4107 (uri (pypi-uri "Pillow" version))
c937562e
EB
4108 (sha256
4109 (base32
aba5182c 4110 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4111 (build-system python-build-system)
4112 (native-inputs
f3b98f4f 4113 `(("python-nose" ,python-nose)))
c937562e 4114 (inputs
5ff408d9
SB
4115 `(("freetype" ,freetype)
4116 ("lcms" ,lcms)
c937562e
EB
4117 ("zlib" ,zlib)
4118 ("libjpeg" ,libjpeg)
4119 ("openjpeg" ,openjpeg)
5ff408d9
SB
4120 ("libtiff" ,libtiff)
4121 ("libwebp" ,libwebp)))
c937562e 4122 (arguments
e5358a6b 4123 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4124 (add-after
4125 'install 'check-installed
6151120a 4126 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4127 (begin
4128 (setenv "HOME" (getcwd))
6151120a
HG
4129 ;; Make installed package available for running the
4130 ;; tests
4131 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4132 (and (zero? (system* "python" "selftest.py"
4133 "--installed"))
4134 (zero? (system* "python" "test-installed.py"))))))
4135 (delete 'check))))
c937562e
EB
4136 (home-page "https://pypi.python.org/pypi/Pillow")
4137 (synopsis "Fork of the Python Imaging Library")
4138 (description
4139 "The Python Imaging Library adds image processing capabilities to your
4140Python interpreter. This library provides extensive file format support, an
4141efficient internal representation, and fairly powerful image processing
4142capabilities. The core image library is designed for fast access to data
4143stored in a few basic pixel formats. It should provide a solid foundation for
4144a general image processing tool.")
3f641af0 4145 (license (license:x11-style
c937562e
EB
4146 "http://www.pythonware.com/products/pil/license.htm"
4147 "The PIL Software License"))))
4148
4149(define-public python2-pillow
4150 (package-with-python2 python-pillow))
bb986599 4151
a415f036
FB
4152(define-public python-pycparser
4153 (package
4154 (name "python-pycparser")
38eb6919 4155 (version "2.14")
a415f036
FB
4156 (source
4157 (origin
4158 (method url-fetch)
38eb6919 4159 (uri (pypi-uri "pycparser" version))
a415f036
FB
4160 (sha256
4161 (base32
38eb6919 4162 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4163 (outputs '("out" "doc"))
4164 (build-system python-build-system)
4165 (native-inputs
f3b98f4f 4166 `(("pkg-config" ,pkg-config)))
a415f036 4167 (arguments
89b5c60e 4168 `(#:phases
a415f036
FB
4169 (alist-replace
4170 'check
4171 (lambda _
4172 (with-directory-excursion "tests"
4173 (zero? (system* "python" "all_tests.py"))))
4174 (alist-cons-after
4175 'install 'install-doc
4176 (lambda* (#:key outputs #:allow-other-keys)
4177 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4178 (doc (string-append data "/doc/" ,name "-" ,version))
4179 (examples (string-append doc "/examples")))
4180 (mkdir-p examples)
4181 (for-each (lambda (file)
4182 (copy-file (string-append "." file)
4183 (string-append doc file)))
4184 '("/README.rst" "/CHANGES" "/LICENSE"))
4185 (copy-recursively "examples" examples)))
4186 %standard-phases))))
4187 (home-page "https://github.com/eliben/pycparser")
4188 (synopsis "C parser in Python")
4189 (description
4190 "Pycparser is a complete parser of the C language, written in pure Python
4191using the PLY parsing library. It parses C code into an AST and can serve as
4192a front-end for C compilers or analysis tools.")
3f641af0 4193 (license license:bsd-3)))
a415f036
FB
4194
4195(define-public python2-pycparser
4196 (package-with-python2 python-pycparser))
57c3f716
FB
4197
4198(define-public python-cffi
4199 (package
4200 (name "python-cffi")
2d3a437c 4201 (version "1.4.2")
57c3f716
FB
4202 (source
4203 (origin
4204 (method url-fetch)
2d3a437c 4205 (uri (pypi-uri "cffi" version))
89b5c60e 4206 (sha256
2d3a437c 4207 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4208 (build-system python-build-system)
4209 (outputs '("out" "doc"))
4210 (inputs
4211 `(("libffi" ,libffi)))
4212 (propagated-inputs ; required at run-time
4213 `(("python-pycparser" ,python-pycparser)))
4214 (native-inputs
4215 `(("pkg-config" ,pkg-config)
4216 ("python-sphinx" ,python-sphinx)
f3b98f4f 4217 ("python-pytest" ,python-pytest)))
57c3f716 4218 (arguments
4179f952 4219 `(#:phases
57c3f716
FB
4220 (alist-cons-after
4221 'install 'install-doc
4222 (lambda* (#:key outputs #:allow-other-keys)
4223 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4224 (doc (string-append data "/doc/" ,name "-" ,version))
4225 (html (string-append doc "/html")))
4226 (with-directory-excursion "doc"
4227 (system* "make" "html")
4228 (mkdir-p html)
4229 (copy-recursively "build/html" html))
4230 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4231 %standard-phases)))
4232 (home-page "http://cffi.readthedocs.org")
4233 (synopsis "Foreign function interface for Python")
4234 (description
4235 "Foreign Function Interface for Python calling C code.")
bd3fa666 4236 (license license:expat)))
57c3f716
FB
4237
4238(define-public python2-cffi
4239 (package-with-python2 python-cffi))
6fa14469
FB
4240
4241(define-public python-xcffib
4242 (package
4243 (name "python-xcffib")
4244 (version "0.1.9")
4245 (source
4246 (origin
4247 (method url-fetch)
4248 (uri (string-append "https://pypi.python.org/packages/source/x/"
4249 "xcffib/xcffib-" version ".tar.gz"))
4250 (sha256
4251 (base32
4252 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4253 (build-system python-build-system)
4254 (inputs
482d9591 4255 `(("libxcb" ,libxcb)))
6fa14469 4256 (propagated-inputs
482d9591
HG
4257 `(("python-cffi" ,python-cffi) ; used at run time
4258 ("python-six" ,python-six)))
6fa14469 4259 (arguments
e2816ac7
MB
4260 `(;; FIXME: Tests cannot load libxcb.so.1
4261 #:tests? #f
4262 #:phases
c8cd850c
MB
4263 (modify-phases %standard-phases
4264 (add-after 'install 'install-doc
4265 (lambda* (#:key outputs #:allow-other-keys)
4266 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4267 "/doc/" ,name "-" ,version)))
4268 (mkdir-p doc)
4269 (copy-file "README.md"
4270 (string-append doc "/README.md"))
4271 #t))))))
6fa14469
FB
4272 (home-page "https://github.com/tych0/xcffib")
4273 (synopsis "XCB Python bindings")
4274 (description
4275 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4276support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4277 (license license:expat)))
6fa14469
FB
4278
4279(define-public python2-xcffib
4280 (package-with-python2 python-xcffib))
4281
9e099723
FB
4282(define-public python-cairocffi
4283 (package
4284 (name "python-cairocffi")
4285 (version "0.6")
4286 (source
4287 (origin
4288 (method url-fetch)
4289 ;; The archive on pypi is missing the 'utils' directory!
4290 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4291 version ".tar.gz"))
f586c877 4292 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4293 (sha256
4294 (base32
4295 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4296 (build-system python-build-system)
4297 (outputs '("out" "doc"))
4298 (inputs
4299 `(("gdk-pixbuf" ,gdk-pixbuf)
4300 ("cairo" ,cairo)))
4301 (native-inputs
4302 `(("pkg-config" ,pkg-config)
4303 ("python-sphinx" ,python-sphinx)
f3b98f4f 4304 ("python-docutils" ,python-docutils)))
9e099723
FB
4305 (propagated-inputs
4306 `(("python-xcffib" ,python-xcffib))) ; used at run time
4307 (arguments
a792e1aa
MB
4308 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4309 #:tests? #f
4310 #:phases
6734c7ba
MB
4311 (modify-phases %standard-phases
4312 (add-after 'install 'install-doc
4313 (lambda* (#:key inputs outputs #:allow-other-keys)
4314 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4315 (doc (string-append data "/doc/" ,name "-" ,version))
4316 (html (string-append doc "/html")))
4317 (setenv "LD_LIBRARY_PATH"
4318 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4319 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4320 (setenv "LANG" "en_US.UTF-8")
4321 (mkdir-p html)
4322 (for-each (lambda (file)
4323 (copy-file (string-append "." file)
4324 (string-append doc file)))
4325 '("/README.rst" "/CHANGES" "/LICENSE"))
4326 (system* "python" "setup.py" "build_sphinx")
4327 (copy-recursively "docs/_build/html" html)
4328 #t))))))
9e099723
FB
4329 (home-page "https://github.com/SimonSapin/cairocffi")
4330 (synopsis "Python bindings and object-oriented API for Cairo")
4331 (description
4332 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4333Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4334graphics library with support for multiple backends including image buffers,
4335PNG, PostScript, PDF, and SVG file output.")
3f641af0 4336 (license license:bsd-3)))
9e099723
FB
4337
4338(define-public python2-cairocffi
4339 (package-with-python2 python-cairocffi))
4340
3cff95cb
RW
4341(define-public python-decorator
4342 (package
4343 (name "python-decorator")
eb6e2e81 4344 (version "4.0.9")
3cff95cb
RW
4345 (source
4346 (origin
4347 (method url-fetch)
e21338be 4348 (uri (pypi-uri "decorator" version))
3cff95cb 4349 (sha256
eb6e2e81 4350 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4351 (build-system python-build-system)
4352 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4353 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4354 (synopsis "Python module to simplify usage of decorators")
4355 (description
4356 "The aim of the decorator module is to simplify the usage of decorators
4357for the average programmer, and to popularize decorators usage giving examples
4358of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4359etc. The core of this module is a decorator factory.")
4360 (license license:expat)))
4361
4362(define-public python2-decorator
4363 (package-with-python2 python-decorator))
4364
2c0499ad
RW
4365(define-public python-drmaa
4366 (package
4367 (name "python-drmaa")
4368 (version "0.7.6")
4369 (source
4370 (origin
4371 (method url-fetch)
4372 (uri (string-append
4373 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4374 version ".tar.gz"))
4375 (sha256
4376 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4377 (build-system python-build-system)
4378 ;; The test suite requires libdrmaa which is provided by the cluster
4379 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4380 ;; should be set to the path of the libdrmaa library.
4381 (arguments '(#:tests? #f))
4382 (native-inputs
f3b98f4f 4383 `(("python-nose" ,python-nose)))
2c0499ad
RW
4384 (home-page "https://pypi.python.org/pypi/drmaa")
4385 (synopsis "Python bindings for the DRMAA library")
4386 (description
4387 "A Python package for Distributed Resource Management (DRM) job
4388submission and control. This package is an implementation of the DRMAA 1.0
4389Python language binding specification.")
3f641af0 4390 (license license:bsd-3)))
2c0499ad
RW
4391
4392(define-public python2-drmaa
4393 (package-with-python2 python-drmaa))
4394
d05c6da0
RW
4395(define-public python-gridmap
4396 (package
4397 (name "python-gridmap")
4398 (version "0.13.0")
4399 (source
4400 (origin
4401 (method url-fetch)
4402 (uri (string-append
4403 "https://github.com/pygridtools/gridmap/archive/v"
4404 version ".tar.gz"))
4405 (file-name (string-append name "-" version ".tar.gz"))
4406 (sha256
4407 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4408 (build-system python-build-system)
f22efa01 4409 (propagated-inputs
d05c6da0
RW
4410 `(("python-psutil" ,python-psutil)
4411 ("python-drmaa" ,python-drmaa)
4412 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4413 (home-page "https://github.com/pygridtools/gridmap")
4414 (synopsis "Create jobs on a cluster directly from Python")
4415 (description
4416 "Gridmap is a Python package to allow you to easily create jobs on the
4417cluster directly from Python. You can directly map Python functions onto the
4418cluster without needing to write any wrapper code yourself.")
3f641af0 4419 (license license:gpl3+)))
d05c6da0
RW
4420
4421(define-public python2-gridmap
4422 (package-with-python2 python-gridmap))
4423
cb6d5c54
RW
4424(define-public python-pexpect
4425 (package
4426 (name "python-pexpect")
4427 (version "3.3")
4428 (source
4429 (origin
4430 (method url-fetch)
4431 (uri (string-append "https://pypi.python.org/packages/source/p/"
4432 "pexpect/pexpect-" version ".tar.gz"))
4433 (sha256
4434 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4435 (build-system python-build-system)
4436 (arguments
4437 `(#:phases
4438 (modify-phases %standard-phases
4439 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4440 (native-inputs
4441 `(("python-nose" ,python-nose)))
4442 (home-page "http://pexpect.readthedocs.org/")
4443 (synopsis "Controlling interactive console applications")
4444 (description
4445 "Pexpect is a pure Python module for spawning child applications;
4446controlling them; and responding to expected patterns in their output.
4447Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4448child application and control it as if a human were typing commands.")
3f641af0 4449 (license license:isc)))
cb6d5c54
RW
4450
4451(define-public python2-pexpect
4452 (package-with-python2 python-pexpect))
4453
229ad120
RW
4454(define-public python-setuptools-scm
4455 (package
4456 (name "python-setuptools-scm")
42d6d0d0 4457 (version "1.11.1")
229ad120
RW
4458 (source (origin
4459 (method url-fetch)
383af6b0 4460 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4461 (sha256
4462 (base32
42d6d0d0 4463 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120
RW
4464 (build-system python-build-system)
4465 (home-page "https://github.com/pypa/setuptools_scm/")
4466 (synopsis "Manage Python package versions in SCM metadata")
4467 (description
383af6b0 4468 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4469@dfn{software configuration management} (SCM) metadata instead of declaring
4470them as the version argument or in a SCM managed file.")
4471 (license license:expat)))
4472
4473(define-public python2-setuptools-scm
4474 (package-with-python2 python-setuptools-scm))
4475
b74270ee
RW
4476(define-public python-pathpy
4477 (package
4478 (name "python-pathpy")
4479 (version "8.1.1")
4480 (source
4481 (origin
4482 (method url-fetch)
4483 (uri (string-append "https://pypi.python.org/packages/source/p/"
4484 "path.py/path.py-" version ".tar.gz"))
4485 (sha256
4486 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4487 (outputs '("out" "doc"))
b74270ee
RW
4488 (build-system python-build-system)
4489 (propagated-inputs
4490 `(("python-appdirs" ,python-appdirs)))
4491 (native-inputs
f3b98f4f 4492 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4493 ("python-sphinx" ,python-sphinx)
4494 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4495 ("python-pytest" ,python-pytest)
4496 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4497 (arguments
4498 `(#:phases
4499 (modify-phases %standard-phases
4500 (add-after 'build 'build-doc
4501 (lambda _
4502 (setenv "LANG" "en_US.UTF-8")
4503 (zero? (system* "python" "setup.py" "build_sphinx"))))
4504 (add-after 'install 'install-doc
4505 (lambda* (#:key outputs #:allow-other-keys)
4506 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4507 (doc (string-append data "/doc/" ,name "-" ,version))
4508 (html (string-append doc "/html")))
4509 (mkdir-p html)
4510 (for-each (lambda (file)
4511 (copy-file file (string-append doc "/" file)))
4512 '("README.rst" "CHANGES.rst"))
4513 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4514 (home-page "http://github.com/jaraco/path.py")
4515 (synopsis "Python module wrapper for built-in os.path")
4516 (description
4517 "@code{path.py} implements path objects as first-class entities, allowing
4518common operations on files to be invoked on those path objects directly.")
4519 (license license:expat)))
4520
4521(define-public python2-pathpy
4522 (package-with-python2 python-pathpy))
4523
0d34e01b
RW
4524(define-public python-pickleshare
4525 (package
4526 (name "python-pickleshare")
4527 (version "0.5")
4528 (source
4529 (origin
4530 (method url-fetch)
4531 (uri (string-append "https://pypi.python.org/packages/source/p/"
4532 "pickleshare/pickleshare-" version ".tar.gz"))
4533 (sha256
4534 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4535 (build-system python-build-system)
4536 (propagated-inputs
4537 `(("python-pathpy" ,python-pathpy)))
4538 (home-page "https://github.com/vivainio/pickleshare")
4539 (synopsis "Tiny key value database with concurrency support")
4540 (description
4541 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4542Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4543shelve, many processes can access the database simultaneously. Changing a
4544value in database is immediately visible to other processes accessing the same
4545database. Concurrency is possible because the values are stored in separate
4546files. Hence the “database” is a directory where all files are governed by
4547PickleShare.")
4548 (license license:expat)))
4549
4550(define-public python2-pickleshare
4551 (package-with-python2 python-pickleshare))
4552
cd6e5189
RW
4553(define-public python-simplegeneric
4554 (package
4555 (name "python-simplegeneric")
4556 (version "0.8.1")
4557 (source
4558 (origin
4559 (method url-fetch)
4560 (uri (string-append "https://pypi.python.org/packages/source/s/"
4561 "simplegeneric/simplegeneric-" version ".zip"))
4562 (sha256
4563 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4564 (build-system python-build-system)
4565 (native-inputs
f3b98f4f 4566 `(("unzip" ,unzip)))
cd6e5189
RW
4567 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4568 (synopsis "Python module for simple generic functions")
4569 (description
4570 "The simplegeneric module lets you define simple single-dispatch generic
4571functions, akin to Python’s built-in generic functions like @code{len()},
4572@code{iter()} and so on. However, instead of using specially-named methods,
4573these generic functions use simple lookup tables, akin to those used by
4574e.g. @code{pickle.dump()} and other generic functions found in the Python
4575standard library.")
3f641af0 4576 (license license:zpl2.1)))
cd6e5189
RW
4577
4578(define-public python2-simplegeneric
4579 (package-with-python2 python-simplegeneric))
4580
ddc7d8ed 4581(define-public python-ipython-genutils
c4abbac3 4582 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
4583 (package
4584 (name "python-ipython-genutils")
4585 (version "0.1.0")
4586 (source
4587 (origin
4588 (method url-fetch)
4589 (uri (string-append "https://pypi.python.org/packages/source/i/"
4590 "ipython_genutils/ipython_genutils-"
4591 version ".tar.gz"))
4592 (sha256
4593 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4594 (build-system python-build-system)
4595 (arguments `(#:tests? #f)) ; no tests
4596 (home-page "http://ipython.org")
4597 (synopsis "Vestigial utilities from IPython")
4598 (description
c4abbac3
HG
4599 "This package provides retired utilities from IPython. No packages
4600outside IPython/Jupyter should depend on it.
4601
4602This package shouldn't exist. It contains some common utilities shared by
4603Jupyter and IPython projects during The Big Split. As soon as possible, those
4604packages will remove their dependency on this, and this package will go
4605away.")
3f641af0 4606 (license license:bsd-3)))
ddc7d8ed
RW
4607
4608(define-public python2-ipython-genutils
4609 (package-with-python2 python-ipython-genutils))
4610
2b10eb48
RW
4611(define-public python-traitlets
4612 (package
4613 (name "python-traitlets")
a5ba1481 4614 (version "4.2.0")
2b10eb48
RW
4615 (source
4616 (origin
4617 (method url-fetch)
cc0c4fde 4618 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4619 (sha256
4620 (base32
a5ba1481 4621 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4622 (build-system python-build-system)
4623 (arguments
4624 `(#:phases
4625 (modify-phases %standard-phases
4626 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4627 (propagated-inputs
4628 `(("python-ipython-genutils" ,python-ipython-genutils)
4629 ("python-decorator" ,python-decorator)))
4630 (native-inputs
cc0c4fde
EF
4631 `(("python-mock" ,python-mock)
4632 ("python-nose" ,python-nose)))
2b10eb48
RW
4633 (home-page "http://ipython.org")
4634 (synopsis "Configuration system for Python applications")
4635 (description
4636 "Traitlets is a framework that lets Python classes have attributes with
4637type checking, dynamically calculated default values, and ‘on change’
4638callbacks. The package also includes a mechanism to use traitlets for
4639configuration, loading values from files or from command line arguments. This
4640is a distinct layer on top of traitlets, so you can use traitlets in your code
4641without using the configuration machinery.")
3f641af0 4642 (license license:bsd-3)))
2b10eb48
RW
4643
4644(define-public python2-traitlets
4645 (package-with-python2 python-traitlets))
4646
4263b06f
RW
4647(define-public python-jupyter-core
4648 (package
4649 (name "python-jupyter-core")
4650 (version "4.2.0")
4651 (source
4652 (origin
4653 (method url-fetch)
4654 (uri (string-append (pypi-uri "jupyter_core" version)))
4655 (sha256
4656 (base32
4657 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4658 (build-system python-build-system)
4659 ;; FIXME: not sure how to run the tests
4660 (arguments `(#:tests? #f))
4661 (propagated-inputs
4662 `(("python-traitlets" ,python-traitlets)))
4663 (home-page "http://jupyter.org/")
4664 (synopsis "Jupyter base package")
4665 (description
4666 "Jupyter core is the base package on which Jupyter projects rely.")
4667 (license license:bsd-3)))
4668
4669(define-public python2-jupyter-core
4670 (package-with-python2 python-jupyter-core))
4671
9ff01f2d
RW
4672(define-public python-jupyter-client
4673 (package
4674 (name "python-jupyter-client")
4675 (version "4.4.0")
4676 (source
4677 (origin
4678 (method url-fetch)
4679 (uri (pypi-uri "jupyter_client" version))
4680 (sha256
4681 (base32
4682 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4683 (build-system python-build-system)
4684 ;; Tests fail because of missing native python kernel which I assume is
4685 ;; provided by the ipython package, which we cannot use because it would
4686 ;; cause a dependency cycle.
4687 (arguments `(#:tests? #f))
4688 (propagated-inputs
4689 `(("python-pyzmq" ,python-pyzmq)
4690 ("python-traitlets" ,python-traitlets)
4691 ("python-jupyter-core" ,python-jupyter-core)))
4692 (home-page "http://jupyter.org/")
4693 (synopsis "Jupyter protocol implementation and client libraries")
4694 (description
4695 "The @code{jupyter_client} package contains the reference implementation
4696of the Jupyter protocol. It also provides client and kernel management APIs
4697for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4698installing @code{kernelspec}s for use with Jupyter frontends.")
4699 (license license:bsd-3)))
4700
4701(define-public python2-jupyter-client
4702 (package-with-python2 python-jupyter-client))
4703
ab526102
RW
4704(define-public python-ipykernel
4705 (package
4706 (name "python-ipykernel")
4707 (version "4.5.0")
4708 (source
4709 (origin
4710 (method url-fetch)
4711 (uri (pypi-uri "ipykernel" version))
4712 (sha256
4713 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4714 (build-system python-build-system)
4715 ;; The tests load a submodule of IPython. However, IPython itself depends
4716 ;; on ipykernel.
4717 (arguments `(#:tests? #f))
4718 (propagated-inputs
4719 ;; imported at runtime during connect
4720 `(("python-jupyter-client" ,python-jupyter-client)))
4721 (home-page "http://ipython.org")
4722 (synopsis "IPython Kernel for Jupyter")
4723 (description
4724 "This package provides the IPython kernel for Jupyter.")
4725 (license license:bsd-3)))
4726
4727(define-public python2-ipykernel
4728 (package-with-python2 python-ipykernel))
4729
5ff6effc
RW
4730(define-public python-testpath
4731 (package
4732 (name "python-testpath")
4733 (version "0.2")
4734 (source
4735 (origin
4736 (method url-fetch)
4737 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4738 version ".tar.gz"))
4739 (file-name (string-append name "-" version ".tar.gz"))
4740 (sha256
4741 (base32
4742 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4743 (build-system python-build-system)
4744 (arguments
4745 `(#:tests? #f ; this package does not even have a setup.py
4746 #:phases
4747 (modify-phases %standard-phases
4748 (delete 'install)
4749 (replace 'build
4750 (lambda* (#:key inputs outputs #:allow-other-keys)
4751 (let ((dir (string-append
4752 (assoc-ref outputs "out")
4753 "/lib/python"
4754 (string-take (string-take-right
4755 (assoc-ref inputs "python") 5) 3)
4756 "/site-packages/testpath")))
4757 (mkdir-p dir)
4758 (copy-recursively "testpath" dir))
4759 #t)))))
4760 (home-page "https://github.com/takluyver/testpath")
4761 (synopsis "Test utilities for code working with files and commands")
4762 (description
4763 "Testpath is a collection of utilities for Python code working with files
4764and commands. It contains functions to check things on the filesystem, and
4765tools for mocking system commands and recording calls to those.")
4766 (license license:expat)))
4767
4768(define-public python2-testpath
4769 (package-with-python2 python-testpath))
4770
ae1ab9fe
FB
4771(define-public python-ipython
4772 (package
4773 (name "python-ipython")
4dbc8ec4 4774 (version "4.0.3")
ae1ab9fe
FB
4775 (source
4776 (origin
fceac880 4777 (method url-fetch)
accd5f99 4778 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 4779 (sha256
4dbc8ec4 4780 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
ae1ab9fe
FB
4781 (build-system python-build-system)
4782 (outputs '("out" "doc"))
3a0b1b9a
FB
4783 (propagated-inputs
4784 `(("python-pyzmq" ,python-pyzmq)
accd5f99 4785 ("python-terminado" ,python-terminado)
ae1ab9fe 4786 ("python-matplotlib" ,python-matplotlib)
5d26e542 4787 ("python-numpy" ,python-numpy)
ae1ab9fe 4788 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4789 ("python-jinja2" ,python-jinja2)
4790 ("python-mistune" ,python-mistune)
accd5f99
RW
4791 ("python-pexpect" ,python-pexpect)
4792 ("python-pickleshare" ,python-pickleshare)
4793 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 4794 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
4795 ("python-traitlets" ,python-traitlets)
4796 ("python-ipykernel" ,python-ipykernel)
4797 ("python-pygments" ,python-pygments)))
4798 (inputs
4799 `(("readline" ,readline)
4800 ("which" ,which)))
ae1ab9fe
FB
4801 (native-inputs
4802 `(("pkg-config" ,pkg-config)
accd5f99
RW
4803 ("python-requests" ,python-requests) ;; for tests
4804 ("python-testpath" ,python-testpath)
4805 ("python-nose" ,python-nose)
ae1ab9fe
FB
4806 ("python-sphinx" ,python-sphinx)
4807 ("texlive" ,texlive)
f3b98f4f 4808 ("texinfo" ,texinfo)))
ae1ab9fe 4809 (arguments
89b5c60e 4810 `(#:phases
3a0b1b9a
FB
4811 (modify-phases %standard-phases
4812 (add-after
4813 'install 'install-doc
4814 (lambda* (#:key inputs outputs #:allow-other-keys)
4815 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4816 (doc (string-append data "/doc/" ,name "-" ,version))
4817 (html (string-append doc "/html"))
4818 (man1 (string-append data "/man/man1"))
4819 (info (string-append data "/info"))
4820 (examples (string-append doc "/examples")))
afd3d931 4821 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
4822 ;; Make installed package available for running the tests
4823 (add-installed-pythonpath inputs outputs)
3a0b1b9a 4824 (with-directory-excursion "docs"
accd5f99
RW
4825 ;; FIXME: pdf fails to build
4826 ;;(system* "make" "pdf" "PAPER=a4")
4827 (system* "make" "html")
3a0b1b9a
FB
4828 (system* "make" "info"))
4829 (copy-recursively "docs/man" man1)
4830 (copy-recursively "examples" examples)
accd5f99 4831 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
4832 ;; (copy-file "docs/build/latex/ipython.pdf"
4833 ;; (string-append doc "/ipython.pdf"))
4834 (mkdir-p info)
4835 (copy-file "docs/build/texinfo/ipython.info"
4836 (string-append info "/ipython.info"))
4837 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4838 ;; Tests can only be run after the library has been installed and not
4839 ;; within the source directory.
4840 (delete 'check)
4841 (add-after
4842 'install 'check
eee5cd04 4843 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
4844 (if tests?
4845 (with-directory-excursion "/tmp"
eee5cd04
HG
4846 ;; Make installed package available for running the tests
4847 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
4848 (setenv "HOME" "/tmp/") ;; required by a test
4849 (zero? (system* (string-append (assoc-ref outputs "out")
4850 "/bin/iptest"))))
4851 #t)))
4852 (add-before
4853 'install 'fix-tests
4854 (lambda* (#:key inputs #:allow-other-keys)
4855 (substitute* "./IPython/utils/_process_posix.py"
4856 (("/usr/bin/env', 'which") (which "which")))
4857 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4858 (("#!/usr/bin/env python")
4859 (string-append "#!" (which "python"))))
4860 ;; Disable 1 failing test
4861 (substitute* "./IPython/core/tests/test_magic.py"
4862 (("def test_dirops\\(\\):" all)
4863 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4864 (home-page "http://ipython.org")
4865 (synopsis "IPython is a tool for interactive computing in Python")
4866 (description
4867 "IPython provides a rich architecture for interactive computing with:
4868Powerful interactive shells, a browser-based notebook, support for interactive
4869data visualization, embeddable interpreters and tools for parallel
4870computing.")
135ba811
EF
4871 (license license:bsd-3)
4872 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4873
4874(define-public python2-ipython
135ba811 4875 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4876 (package
4877 (inherit ipython)
4878 ;; FIXME: some tests are failing
4879 (arguments
4880 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4881 ;; FIXME: add pyreadline once available.
e62600fe 4882 (native-inputs
135ba811 4883 `(("python2-mock" ,python2-mock)
77a6932a 4884 ,@(package-native-inputs ipython))))))
03411993
AE
4885
4886(define-public python-isodate
4887 (package
4888 (name "python-isodate")
b6785c2e 4889 (version "0.5.4")
03411993
AE
4890 (source
4891 (origin
4892 (method url-fetch)
b6785c2e 4893 (uri (pypi-uri "isodate" version))
03411993
AE
4894 (sha256
4895 (base32
b6785c2e 4896 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 4897 (build-system python-build-system)
03411993
AE
4898 (home-page
4899 "http://cheeseshop.python.org/pypi/isodate")
4900 (synopsis
4901 "Python date parser and formatter")
4902 (description
4903 "Python-isodate is a python module for parsing and formatting
4904ISO 8601 dates, time and duration.")
3f641af0 4905 (license license:bsd-3)))
03411993
AE
4906
4907(define-public python2-isodate
4908 (package-with-python2 python-isodate))
673ab897
AE
4909
4910(define-public python-html5lib
4911 (package
4912 (name "python-html5lib")
a14061aa 4913 (version "1.0b10")
673ab897
AE
4914 (source
4915 (origin
4916 (method url-fetch)
fee04c19 4917 (uri (pypi-uri "html5lib" version))
673ab897
AE
4918 (sha256
4919 (base32
a14061aa 4920 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 4921 (build-system python-build-system)
3dd75476 4922 (propagated-inputs
4eb6ed28
MB
4923 `(("python-six" ,python-six)
4924 ("python-webencodings" ,python-webencodings)))
673ab897
AE
4925 (arguments
4926 `(#:test-target "check"))
4927 (home-page
4928 "https://github.com/html5lib/html5lib-python")
4929 (synopsis
4930 "Python HTML parser based on the WHATWG HTML specifcation")
4931 (description
4932 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4933and written in Python.")
bd3fa666 4934 (license license:expat)))
673ab897
AE
4935
4936(define-public python2-html5lib
4937 (package-with-python2 python-html5lib))
e99f4211 4938
8ee62c97
RW
4939;; Needed for python-bleach, a dependency of python-notebook
4940(define-public python-html5lib-0.9
4941 (package
4942 (inherit python-html5lib)
4943 (version "0.999")
4944 (source
4945 (origin
4946 (method url-fetch)
4947 (uri (pypi-uri "html5lib" version))
4948 (sha256
4949 (base32
4950 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4951
4952(define-public python2-html5lib-0.9
4953 (package-with-python2 python-html5lib-0.9))
4954
adbca19e
MB
4955(define-public python-webencodings
4956 (package
4957 (name "python-webencodings")
4958 (version "0.5")
4959 (source (origin
4960 (method url-fetch)
4961 (uri (pypi-uri "webencodings" version))
4962 (sha256
4963 (base32
4964 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
4965 (build-system python-build-system)
4966 (arguments
4967 '(#:phases
4968 (modify-phases %standard-phases
4969 (replace 'check
4970 (lambda _
4971 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
4972 (native-inputs
4973 `(("python-pytest" ,python-pytest)))
4974 (home-page "https://github.com/SimonSapin/python-webencodings")
4975 (synopsis "Character encoding aliases for legacy web content")
4976 (description
4977 "In order to be compatible with legacy web content when interpreting
4978something like @code{Content-Type: text/html; charset=latin1}, tools need
4979to use a particular set of aliases for encoding labels as well as some
4980overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
4981the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
4982or @code{UTF-16} BOM takes precedence over any other encoding declaration.
4983The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
4984defines all such details so that implementations do not have to
4985reverse-engineer each other.
4986
4987This module implements the Encoding standard and has encoding labels and
4988BOM detection, but the actual implementation for encoders and decoders
4989is Python’s.")
4990 (license license:bsd-3)))
4991
4992(define-public python2-webencodings
4993 (package-with-python2 python-webencodings))
4994
e99f4211
MW
4995(define-public python-urwid
4996 (package
4997 (name "python-urwid")
51ff41f6 4998 (version "1.3.1")
e99f4211
MW
4999 (source
5000 (origin
5001 (method url-fetch)
b97c1bfd 5002 (uri (pypi-uri "urwid" version))
e99f4211
MW
5003 (sha256
5004 (base32
51ff41f6 5005 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 5006 (build-system python-build-system)
b97c1bfd
LF
5007 (arguments
5008 `(#:phases
5009 (modify-phases %standard-phases
5010 ;; Disable failing test. Bug filed upstream:
5011 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 5012 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
5013 (add-after 'unpack 'disable-failing-test
5014 (lambda _
5015 (substitute* "urwid/tests/test_event_loops.py"
5016 (("test_remove_watch_file")
5017 "disable_remove_watch_file")))))))
e99f4211
MW
5018 (home-page "http://urwid.org")
5019 (synopsis "Console user interface library for Python")
5020 (description
5021 "Urwid is a curses-based UI/widget library for Python. It includes many
5022features useful for text console applications.")
3f641af0 5023 (license license:lgpl2.1+)))
e99f4211
MW
5024
5025(define-public python2-urwid
5026 (package-with-python2 python-urwid))
d95a56c6 5027
47d0b292
TS
5028(define-public python-urwidtrees
5029 (package
5030 (name "python-urwidtrees")
37ec4623 5031 (version "1.0.2")
47d0b292
TS
5032 (source
5033 (origin
5034 (method url-fetch)
37ec4623
TS
5035 ;; package author intends on distributing via github rather than pypi:
5036 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5037 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5038 version ".tar.gz"))
5039 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5040 (sha256
5041 (base32
37ec4623 5042 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5043 (build-system python-build-system)
5044 (arguments
5045 '(#:tests? #f)) ; no tests
f22efa01 5046 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5047 (home-page "https://github.com/pazz/urwidtrees")
5048 (synopsis "Tree widgets for urwid")
5049 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5050toolkit. Use it to build trees of widgets.")
3f641af0 5051 (license license:gpl3+)))
47d0b292
TS
5052
5053(define-public python2-urwidtrees
5054 (package-with-python2 python-urwidtrees))
5055
d95a56c6
PAR
5056(define-public python-dbus
5057 (package
5058 (name "python-dbus")
5059 (version "1.2.0")
5060 (source
5061 (origin
5062 (method url-fetch)
5063 (uri (string-append
5cc3096c 5064 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5065 version ".tar.gz"))
5066 (sha256
5067 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5068 (build-system gnu-build-system)
6717c879
SB
5069 (arguments
5070 '(#:phases
5071 (modify-phases %standard-phases
5072 (add-before
5073 'check 'pre-check
5074 (lambda _
5075 ;; XXX: For the missing '/etc/machine-id'.
5076 (substitute* "test/run-test.sh"
5077 (("DBUS_FATAL_WARNINGS=1")
5078 "DBUS_FATAL_WARNINGS=0"))
5079 #t)))))
d95a56c6
PAR
5080 (native-inputs
5081 `(("pkg-config" ,pkg-config)))
5082 (inputs
5083 `(("python" ,python)
2e88d113 5084 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5085 (synopsis "Python bindings for D-bus")
5086 (description "python-dbus provides bindings for libdbus, the reference
5087implementation of D-Bus.")
5088 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5089 (license license:expat)))
b52af02b
MW
5090
5091(define-public python2-dbus
5092 (package (inherit python-dbus)
5093 (name "python2-dbus")
5094 (inputs `(("python" ,python-2)
5095 ,@(alist-delete "python"
5096 (package-inputs python-dbus)
5097 equal?)))
5098 ;; FIXME: on Python 2, the test_utf8 fails with:
5099 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5100 (arguments `(#:tests? #f))))
a6ac8332
AE
5101
5102(define-public python-apsw
5103 (package
5104 (name "python-apsw")
917708c2 5105 (version "3.9.2-r1")
a6ac8332
AE
5106 (source
5107 (origin
5108 (method url-fetch)
917708c2 5109 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5110 (sha256
5111 (base32
917708c2 5112 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5113 (build-system python-build-system)
5114 (inputs
f3b98f4f 5115 `(("sqlite" ,sqlite)))
a6ac8332
AE
5116 (arguments
5117 `(#:phases
5118 ;; swap check and install phases
5119 (alist-cons-after
5120 'install 'check
5121 (assoc-ref %standard-phases 'check)
5122 (alist-delete
5123 'check
5124 %standard-phases))))
5125 (home-page "https://github.com/rogerbinns/apsw/")
5126 (synopsis "Another Python SQLite Wrapper")
5127 (description "APSW is a Python wrapper for the SQLite
5128embedded relational database engine. In contrast to other wrappers such as
5129pysqlite it focuses on being a minimal layer over SQLite attempting just to
5130translate the complete SQLite API into Python.")
abde5f37 5131 (license license:zlib)))
a6ac8332
AE
5132
5133(define-public python2-apsw
5134 (package-with-python2 python-apsw))
26b307e2
AE
5135
5136(define-public python-lxml
5137 (package
5138 (name "python-lxml")
d58a3203 5139 (version "3.6.0")
26b307e2
AE
5140 (source
5141 (origin
5142 (method url-fetch)
97bbc480 5143 (uri (pypi-uri "lxml" version))
26b307e2 5144 (sha256
d58a3203
EF
5145 (base32
5146 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5147 (build-system python-build-system)
5148 (inputs
5149 `(("libxml2" ,libxml2)
f3b98f4f 5150 ("libxslt" ,libxslt)))
26b307e2
AE
5151 (home-page "http://lxml.de/")
5152 (synopsis
5153 "Python XML processing library")
5154 (description
5155 "The lxml XML toolkit is a Pythonic binding for the C libraries
5156libxml2 and libxslt.")
3f641af0 5157 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5158
5159(define-public python2-lxml
5160 (package-with-python2 python-lxml))
4ed20663 5161
b32a1e47
CAW
5162;; beautifulsoup4 has a totally different namespace than 3.x,
5163;; and pypi seems to put it under its own name, so I guess we should too
5164(define-public python-beautifulsoup4
5165 (package
5166 (name "python-beautifulsoup4")
67fd4a12 5167 (version "4.5.1")
b32a1e47
CAW
5168 (source
5169 (origin
5170 (method url-fetch)
5171 (uri (pypi-uri "beautifulsoup4" version))
5172 (sha256
5173 (base32
67fd4a12 5174 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5175 (build-system python-build-system)
5f37f0b6
LF
5176 (arguments
5177 `(#:phases
5178 (modify-phases %standard-phases
5179 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5180 ;; must use this conversion script when building with Python 3. The
5181 ;; conversion script also runs the tests.
5182 ;; For more information, see the file 'convert-py3k' in the source
5183 ;; distribution.
5184 (replace 'check
5185 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5186 (home-page
5187 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5188 (synopsis
5189 "Python screen-scraping library")
5190 (description
5191 "Beautiful Soup is a Python library designed for rapidly setting up
5192screen-scraping projects. It offers Pythonic idioms for navigating,
5193searching, and modifying a parse tree, providing a toolkit for
5194dissecting a document and extracting what you need. It automatically
5195converts incoming documents to Unicode and outgoing documents to UTF-8.")
f210e944 5196 (license license:expat)))
b32a1e47
CAW
5197
5198(define-public python2-beautifulsoup4
5199 (package
5200 (inherit (package-with-python2
5201 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5202 (arguments `(#:python ,python-2))))
b32a1e47 5203
092e86f5
AE
5204(define-public python2-cssutils
5205 (package
5206 (name "python2-cssutils")
58d1d816 5207 (version "1.0.1")
092e86f5
AE
5208 (source
5209 (origin
5210 (method url-fetch)
58d1d816 5211 (uri (pypi-uri "cssutils" version))
092e86f5 5212 (sha256
58d1d816
EF
5213 (base32
5214 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5215 (build-system python-build-system)
5216 (native-inputs
5217 `(("python2-mock" ,python2-mock) ; for the tests
5218 ("unzip" ,unzip))) ; for unpacking the source
092e86f5
AE
5219 (arguments
5220 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5221 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5222 ))
092e86f5
AE
5223 (home-page "http://cthedot.de/cssutils/")
5224 (synopsis
5225 "CSS Cascading Style Sheets library for Python")
5226 (description
5227 "Cssutils is a Python package for parsing and building CSS
5228Cascading Style Sheets. Currently it provides a DOM only and no rendering
5229options.")
3f641af0 5230 (license license:lgpl3+)))
880ff77c
AE
5231
5232(define-public python-cssselect
5233 (package
5234 (name "python-cssselect")
d5ccd9ab 5235 (version "0.9.2")
880ff77c
AE
5236 (source
5237 (origin
5238 (method url-fetch)
d5ccd9ab 5239 (uri (pypi-uri "cssselect" version))
880ff77c 5240 (sha256
d5ccd9ab
EF
5241 (base32
5242 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5243 (build-system python-build-system)
880ff77c
AE
5244 (arguments
5245 ;; tests fail with message
5246 ;; AttributeError: 'module' object has no attribute 'tests'
5247 `(#:tests? #f))
5248 (home-page
5249 "https://pythonhosted.org/cssselect/")
5250 (synopsis
5251 "CSS3 selector parser and translator to XPath 1.0")
5252 (description
5253 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5254them to XPath 1.0 expressions. Such expressions can be used in lxml or
5255another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5256 (license license:bsd-3)))
880ff77c
AE
5257
5258(define-public python2-cssselect
5259 (package-with-python2 python-cssselect))
60357f99
AE
5260
5261(define-public python-netifaces
5262 (package
5263 (name "python-netifaces")
5264 (version "0.10.4")
5265 (source
5266 (origin
5267 (method url-fetch)
5268 (uri (string-append
5269 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5270 version
5271 ".tar.gz"))
5272 (sha256
5273 (base32
5274 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5275 (build-system python-build-system)
60357f99
AE
5276 (home-page
5277 "https://bitbucket.org/al45tair/netifaces")
5278 (synopsis
5279 "Python module for portable network interface information")
5280 (description
5281 "Netifaces is a Python module providing information on network
5282interfaces in an easy and portable manner.")
5283 (license license:expat)))
5284
5285(define-public python2-netifaces
5286 (package-with-python2 python-netifaces))
92cb152b 5287
32f77c04
RW
5288(define-public python-networkx
5289 (package
5290 (name "python-networkx")
a4d9609c 5291 (version "1.11")
32f77c04
RW
5292 (source
5293 (origin
5294 (method url-fetch)
a4d9609c 5295 (uri (pypi-uri "networkx" version))
32f77c04 5296 (sha256
a4d9609c 5297 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5298 (build-system python-build-system)
5299 ;; python-decorator is needed at runtime
5300 (propagated-inputs
5301 `(("python-decorator" ,python-decorator)))
5302 (native-inputs
f3b98f4f 5303 `(("python-nose" ,python-nose)))
32f77c04
RW
5304 (home-page "http://networkx.github.io/")
5305 (synopsis "Python module for creating and manipulating graphs and networks")
5306 (description
5307 "NetworkX is a Python package for the creation, manipulation, and study
5308of the structure, dynamics, and functions of complex networks.")
3f641af0 5309 (license license:bsd-3)))
32f77c04
RW
5310
5311(define-public python2-networkx
5312 (package-with-python2 python-networkx))
5313
92cb152b
RW
5314(define-public snakemake
5315 (package
5316 (name "snakemake")
7b93d866 5317 (version "3.9.0")
92cb152b
RW
5318 (source
5319 (origin
5320 (method url-fetch)
7b93d866 5321 (uri (pypi-uri "snakemake" version))
92cb152b 5322 (sha256
7b93d866 5323 (base32 "1d48ql0010v9ls6mac7fz6j391gm4h74a64hqgw89s0vfqgdyzdl"))))
92cb152b 5324 (build-system python-build-system)
7b93d866
MB
5325 (arguments
5326 ;; TODO: Package missing test dependencies.
5327 '(#:tests? #f))
5328 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
92cb152b
RW
5329 (synopsis "Python-based execution environment for make-like workflows")
5330 (description
5331 "Snakemake aims to reduce the complexity of creating workflows by
5332providing a clean and modern domain specific specification language (DSL) in
5333Python style, together with a fast and comfortable execution environment.")
5334 (license license:expat)))
a1920bc9 5335
35de1fbd
RW
5336(define-public python-seaborn
5337 (package
5338 (name "python-seaborn")
fc899d4f 5339 (version "0.7.0")
35de1fbd
RW
5340 (source
5341 (origin
5342 (method url-fetch)
fc899d4f 5343 (uri (pypi-uri "seaborn" version))
35de1fbd 5344 (sha256
fc899d4f 5345 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
5346 (build-system python-build-system)
5347 (propagated-inputs
5348 `(("python-pandas" ,python-pandas)
5349 ("python-matplotlib" ,python-matplotlib)
5350 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5351 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5352 (synopsis "Statistical data visualization")
5353 (description
5354 "Seaborn is a library for making attractive and informative statistical
5355graphics in Python. It is built on top of matplotlib and tightly integrated
5356with the PyData stack, including support for numpy and pandas data structures
5357and statistical routines from scipy and statsmodels.")
3f641af0 5358 (license license:bsd-3)
fc899d4f 5359 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5360
5361(define-public python2-seaborn
fc899d4f
EF
5362 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5363 (package
5364 (inherit base)
5365 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5366 ,@(package-propagated-inputs base))))))
35de1fbd 5367
90fc547f
RW
5368(define-public python-sympy
5369 (package
5370 (name "python-sympy")
5371 (version "0.7.6")
5372 (source
5373 (origin
5374 (method url-fetch)
5375 (uri (string-append
5376 "https://github.com/sympy/sympy/releases/download/sympy-"
5377 version "/sympy-" version ".tar.gz"))
5378 (sha256
5379 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5380 (build-system python-build-system)
90fc547f
RW
5381 (home-page "http://www.sympy.org/")
5382 (synopsis "Python library for symbolic mathematics")
5383 (description
5384 "SymPy is a Python library for symbolic mathematics. It aims to become a
5385full-featured computer algebra system (CAS) while keeping the code as simple
5386as possible in order to be comprehensible and easily extensible.")
3f641af0 5387 (license license:bsd-3)))
90fc547f
RW
5388
5389(define-public python2-sympy
5390 (package-with-python2 python-sympy))
5391
e8c9b010
SR
5392(define-public python-q
5393 (package
5394 (name "python-q")
5395 (version "2.6")
5396 (source
5397 (origin
5398 (method url-fetch)
5399 (uri (pypi-uri "q" version))
5400 (sha256
5401 (base32
5402 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5403 (build-system python-build-system)
5404 (home-page "https://github.com/zestyping/q")
5405 (synopsis "Quick-and-dirty debugging output for tired programmers")
5406 (description
5407 "q is a Python module for \"print\" style of debugging Python code. It
5408provides convenient short API for print out of values, tracebacks, and
5409falling into the Python interpreter.")
f210e944 5410 (license license:asl2.0)))
e8c9b010
SR
5411
5412(define-public python2-q
f210e944 5413 (package-with-python2 python-q))
e8c9b010 5414
a1920bc9
FB
5415(define-public python-testlib
5416 (package
5417 (name "python-testlib")
5418 (version "0.6.5")
5419 (source
5420 (origin
5421 (method url-fetch)
5422 (uri (string-append
5423 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5424 version ".zip"))
5425 (sha256
5426 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5427 (build-system python-build-system)
a1920bc9 5428 (native-inputs
632735f2 5429 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
5430 (synopsis "Python micro test suite harness")
5431 (description "A micro unittest suite harness for Python.")
5432 (home-page "https://github.com/trentm/testlib")
1cb9c006 5433 (license license:expat)))
a1920bc9
FB
5434
5435(define-public python2-testlib
5436 (package-with-python2 python-testlib))
db62afa5
LC
5437
5438(define-public python2-xlib
5439 (package
5440 (name "python2-xlib")
5441 (version "0.14")
5442 (source (origin
5443 (method url-fetch)
de67e922
LF
5444 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5445 "/" version "/"
db62afa5
LC
5446 "python-xlib-" version ".tar.gz"))
5447 (sha256
5448 (base32
5449 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5450 (build-system python-build-system)
5451 (arguments
5452 `(#:python ,python-2 ;Python 2 only
5453 #:tests? #f)) ;no tests
db62afa5
LC
5454 (home-page "http://python-xlib.sourceforge.net/")
5455 (synopsis "Python X11 client library")
5456 (description
5457 "The Python X Library is intended to be a fully functional X client
5458library for Python programs. It is useful to implement low-level X clients.
5459It is written entirely in Python.")
3f641af0 5460 (license license:gpl2+)))
0234ca06
DT
5461
5462(define-public python-singledispatch
5463 (package
5464 (name "python-singledispatch")
5465 (version "3.4.0.3")
5466 (source
5467 (origin
5468 (method url-fetch)
bdb67d84 5469 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5470 (sha256
5471 (base32
5472 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5473 (build-system python-build-system)
5e1c9d24
HG
5474 (native-inputs
5475 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
5476 (home-page
5477 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5478 (synopsis "Backport of singledispatch feature from Python 3.4")
5479 (description
5480 "This library brings functools.singledispatch from Python 3.4 to Python
54812.6-3.3.")
5482 (license license:expat)))
5483
5484(define-public python2-singledispatch
5485 (package-with-python2 python-singledispatch))
feaae484 5486
310d218f
RW
5487(define-public python-tornado
5488 (package
5489 (name "python-tornado")
a724924b 5490 (version "4.3")
310d218f
RW
5491 (source
5492 (origin
5493 (method url-fetch)
a724924b 5494 (uri (pypi-uri "tornado" version))
310d218f 5495 (sha256
a724924b 5496 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5497 (build-system python-build-system)
3fe2c209
MB
5498 (arguments
5499 '(;; FIXME: Two tests error out with:
5500 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
5501 ;; #:phases
5502 ;; (modify-phases %standard-phases
5503 ;; (replace 'check
5504 ;; (lambda _
5505 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
5506 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
5507 ;; (zero? (system* "python" "-m" "tornado.test")))))
5508 #:tests? #f))
310d218f 5509 (native-inputs
b455439b 5510 `(("python-certifi" ,python-certifi)))
f22efa01 5511 (propagated-inputs
b455439b 5512 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5513 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5514 (synopsis "Python web framework and asynchronous networking library")
5515 (description
5516 "Tornado is a Python web framework and asynchronous networking library,
5517originally developed at FriendFeed. By using non-blocking network I/O,
5518Tornado can scale to tens of thousands of open connections, making it ideal
5519for long polling, WebSockets, and other applications that require a long-lived
5520connection to each user.")
3f641af0 5521 (license license:asl2.0)
b455439b 5522 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5523
5524(define-public python2-tornado
b455439b 5525 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 5526 (package (inherit tornado)
f22efa01 5527 (propagated-inputs
310d218f
RW
5528 `(("python2-backport-ssl-match-hostname"
5529 ,python2-backport-ssl-match-hostname)
b455439b 5530 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 5531 ,@(package-propagated-inputs tornado))))))
310d218f 5532
6b59fc10
EF
5533;; the python- version can be removed with python-3.5
5534(define-public python-backports-abc
5535 (package
5536 (name "python-backports-abc")
5537 (version "0.4")
5538 (source
5539 (origin
5540 (method url-fetch)
5541 (uri (pypi-uri "backports_abc" version))
5542 (sha256
5543 (base32
5544 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5545 (build-system python-build-system)
6b59fc10 5546 (home-page "https://github.com/cython/backports_abc")
66e07664 5547 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5548 (description
5549 "Python-backports-abc provides a backport of additions to the
5550'collections.abc' module in Python-3.5.")
3f641af0 5551 (license license:psfl)))
6b59fc10
EF
5552
5553(define-public python2-backports-abc
5554 (package-with-python2 python-backports-abc))
5555
feaae484
SB
5556(define-public python-waf
5557 (package
5558 (name "python-waf")
7dd55dfe 5559 (version "1.9.5")
feaae484
SB
5560 (source (origin
5561 (method url-fetch)
bae67829 5562 (uri (string-append "https://waf.io/"
feaae484
SB
5563 "waf-" version ".tar.bz2"))
5564 (sha256
5565 (base32
7dd55dfe 5566 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5567 (build-system python-build-system)
5568 (arguments
5569 '(#:phases
5570 (modify-phases %standard-phases
5571 (replace 'build
7dd55dfe
EF
5572 (lambda _
5573 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5574 (replace 'check
7dd55dfe
EF
5575 (lambda _
5576 (zero? (system* "python" "waf" "--version"))))
feaae484 5577 (replace 'install
7dd55dfe
EF
5578 (lambda _
5579 (copy-file "waf" %output))))))
5580 (home-page "http://waf.io/")
feaae484
SB
5581 (synopsis "Python-based build system")
5582 (description
5583 "Waf is a Python-based framework for configuring, compiling and installing
5584applications.")
3f641af0 5585 (license license:bsd-3)))
feaae484
SB
5586
5587(define-public python2-waf
5588 (package-with-python2 python-waf))
45203542
RW
5589
5590(define-public python-pyzmq
5591 (package
5592 (name "python-pyzmq")
3655ee76 5593 (version "15.1.0")
45203542
RW
5594 (source
5595 (origin
5596 (method url-fetch)
3655ee76 5597 (uri (pypi-uri "pyzmq" version))
45203542 5598 (sha256
3655ee76 5599 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5600 (build-system python-build-system)
5601 (arguments
5602 `(#:configure-flags
5603 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5604 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5605 ;; --inplace' for 'python setup.py test' to work.
5606 #:tests? #f))
5607 (inputs
5608 `(("zeromq" ,zeromq)))
5609 (native-inputs
5610 `(("pkg-config" ,pkg-config)
f3b98f4f 5611 ("python-nose" ,python-nose)))
45203542
RW
5612 (home-page "http://github.com/zeromq/pyzmq")
5613 (synopsis "Python bindings for 0MQ")
5614 (description
5615 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5616 (license license:bsd-4)))
45203542
RW
5617
5618(define-public python2-pyzmq
5619 (package-with-python2 python-pyzmq))
d889e6c4
CR
5620
5621(define-public python-pep8
5622 (package
5623 (name "python-pep8")
db251311 5624 (version "1.7.0")
d889e6c4
CR
5625 (source
5626 (origin
5627 (method url-fetch)
db251311 5628 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5629 (sha256
5630 (base32
db251311 5631 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 5632 (build-system python-build-system)
d889e6c4
CR
5633 (home-page "http://pep8.readthedocs.org/")
5634 (synopsis "Python style guide checker")
5635 (description
5636 "This tools checks Python code against some of the style conventions in
5637PEP 8.")
5638 (license license:expat)))
5639
5640(define-public python2-pep8
5641 (package-with-python2 python-pep8))
e31d7f44
CR
5642
5643(define-public python-pyflakes
5644 (package
5645 (name "python-pyflakes")
2abc3972 5646 (version "1.0.0")
e31d7f44
CR
5647 (source
5648 (origin
5649 (method url-fetch)
2abc3972 5650 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5651 (sha256
5652 (base32
2abc3972 5653 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 5654 (build-system python-build-system)
e31d7f44
CR
5655 (home-page
5656 "https://github.com/pyflakes/pyflakes")
5657 (synopsis "Passive checker of Python programs")
5658 (description
5659 "Pyflakes statically checks Python source code for common errors.")
5660 (license license:expat)))
a59e017c 5661
7261d9eb
CR
5662(define-public python2-pyflakes
5663 (package-with-python2 python-pyflakes))
5664
a59e017c
CR
5665(define-public python-mccabe
5666 (package
5667 (name "python-mccabe")
c6ebd40d 5668 (version "0.4.0")
a59e017c
CR
5669 (source
5670 (origin
5671 (method url-fetch)
c6ebd40d 5672 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5673 (sha256
5674 (base32
c6ebd40d 5675 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 5676 (build-system python-build-system)
328bb95d 5677 (native-inputs
c6ebd40d 5678 `(("python-pytest" ,python-pytest)
f3b98f4f 5679 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
5680 (home-page "https://github.com/flintwork/mccabe")
5681 (synopsis "McCabe checker, plugin for flake8")
5682 (description
5683 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5684complexity of Python source code.")
7362371d 5685 (license license:expat)))
a59e017c
CR
5686
5687(define-public python2-mccabe
5688 (package-with-python2 python-mccabe))
e8df8f47 5689
7477fbb1
CR
5690(define-public python-mccabe-0.2.1
5691 (package (inherit python-mccabe)
5692 (version "0.2.1")
5693 (source
5694 (origin
5695 (method url-fetch)
5696 (uri (pypi-uri "mccabe" version))
5697 (sha256
5698 (base32
f3b98f4f 5699 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
5700
5701(define-public python2-mccabe-0.2.1
5702 (package-with-python2 python-mccabe-0.2.1))
5703
e8df8f47
CR
5704;; Flake8 2.4.1 requires an older version of pep8.
5705;; This should be removed ASAP.
5706(define-public python-pep8-1.5.7
5707 (package (inherit python-pep8)
5708 (version "1.5.7")
5709 (source
5710 (origin
5711 (method url-fetch)
5712 (uri (string-append
5713 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5714 version
5715 ".tar.gz"))
5716 (sha256
5717 (base32
73e3060d
MB
5718 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5719 (arguments
5720 ;; XXX Tests not compatible with Python 3.5.
5721 '(#:tests? #f))))
e8df8f47
CR
5722
5723(define-public python2-pep8-1.5.7
5724 (package-with-python2 python-pep8-1.5.7))
5725
5726;; Flake8 2.4.1 requires an older version of pyflakes.
5727;; This should be removed ASAP.
5728(define-public python-pyflakes-0.8.1
5729 (package (inherit python-pyflakes)
5730 (version "0.8.1")
5731 (source
5732 (origin
5733 (method url-fetch)
5734 (uri (string-append
5735 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5736 version
5737 ".tar.gz"))
5738 (sha256
5739 (base32
0d84e1ef
MB
5740 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5741 (arguments
5742 ;; XXX Tests not compatible with Python 3.5.
5743 '(#:tests? #f))))
e8df8f47
CR
5744
5745(define-public python2-pyflakes-0.8.1
7261d9eb 5746 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5747
5748(define-public python-flake8
5749 (package
5750 (name "python-flake8")
43789136 5751 (version "2.5.4")
e8df8f47
CR
5752 (source
5753 (origin
5754 (method url-fetch)
1b995533 5755 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5756 (sha256
5757 (base32
011271c7
HG
5758 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5759 (modules '((guix build utils)))
5760 (snippet
5761 '(begin
5762 ;; Remove pre-compiled .pyc files from source.
5763 (for-each delete-file-recursively
5764 (find-files "." "__pycache__" #:directories? #t))
5765 (for-each delete-file (find-files "." "\\.pyc$"))
5766 #t))))
e8df8f47 5767 (build-system python-build-system)
482d9591 5768 (propagated-inputs
f3b98f4f 5769 `(("python-pep8" ,python-pep8)
43789136 5770 ("python-pyflakes" ,python-pyflakes)
482d9591 5771 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
5772 (native-inputs
5773 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
5774 ("python-nose" ,python-nose)))
5775 (home-page "https://gitlab.com/pycqa/flake8")
5776 (synopsis
5777 "The modular source code checker: pep8, pyflakes and co")
5778 (description
5779 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5780 (license license:expat)))
5781
5782(define-public python2-flake8
5783 (package-with-python2 python-flake8))
61b9ac53 5784
abf21efc
CR
5785;; This will only be needed by the python-hacking package and will not be
5786;; necessary once python-hacking > 0.10.2 is released.
5787(define-public python-flake8-2.2.4
5788 (package (inherit python-flake8)
482d9591 5789 (propagated-inputs
f3b98f4f 5790 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 5791 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 5792 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 5793 (native-inputs
482d9591 5794 `(("python-mock" ,python-mock)
abf21efc
CR
5795 ("python-nose" ,python-nose)))
5796 (version "2.2.4")
5797 (source
5798 (origin
5799 (method url-fetch)
5800 (uri (pypi-uri "flake8" version))
5801 (sha256
5802 (base32
b9c8ccce
HG
5803 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
5804 (modules '((guix build utils)))
5805 (snippet
5806 '(begin
5807 ;; Remove pre-compiled .pyc files from source.
5808 (for-each delete-file-recursively
5809 (find-files "." "__pycache__" #:directories? #t))
5810 (for-each delete-file (find-files "." "\\.pyc$"))
a717e8a6
MB
5811 #t))))
5812 (arguments
5813 ;; XXX Fails with Python 3.5.
5814 '(#:tests? #f))))
abf21efc
CR
5815
5816(define-public python2-flake8-2.2.4
5817 (package-with-python2 python-flake8-2.2.4))
5818
61b9ac53
FB
5819(define-public python-mistune
5820 (package
5821 (name "python-mistune")
5822 (version "0.7")
5823 (source
5824 (origin
5825 (method url-fetch)
5826 (uri (string-append
5827 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5828 version
5829 ".tar.gz"))
5830 (sha256
5831 (base32
5832 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5833 (build-system python-build-system)
328bb95d 5834 (native-inputs
f3b98f4f 5835 `(("python-nose" ,python-nose)
61b9ac53
FB
5836 ("python-cython" ,python-cython)))
5837 (home-page "https://github.com/lepture/mistune")
5838 (synopsis "Markdown parser in pure Python")
5839 (description "This package provides a fast markdown parser in pure
5840Python.")
3f641af0 5841 (license license:bsd-3)))
61b9ac53
FB
5842
5843(define-public python2-mistune
5844 (package-with-python2 python-mistune))
6d992d07 5845
b9893908
EE
5846(define-public python-markdown
5847 (package
5848 (name "python-markdown")
5849 (version "2.6.5")
5850 (source
5851 (origin
5852 (method url-fetch)
5853 (uri (pypi-uri "Markdown" version))
5854 (sha256
5855 (base32
5856 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5857 (build-system python-build-system)
5858 (arguments
5859 `(#:phases
5860 (modify-phases %standard-phases
5861 (replace 'check
5862 (lambda _
5863 (zero? (system* "python" "run-tests.py")))))))
5864 (native-inputs
5865 `(("python-nose" ,python-nose)
5866 ("python-pyyaml" ,python-pyyaml)))
5867 (home-page "https://pythonhosted.org/Markdown/")
5868 (synopsis "Python implementation of Markdown")
5869 (description
5870 "This package provides a Python implementation of John Gruber's
5871Markdown. The library features international input, various Markdown
5872extensions, and several HTML output formats. A command line wrapper
5873markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5874 (license license:bsd-3)))
b9893908
EE
5875
5876(define-public python2-markdown
5877 (package-with-python2 python-markdown))
5878
6d992d07
FB
5879(define-public python-ptyprocess
5880 (package
5881 (name "python-ptyprocess")
5882 (version "0.5")
5883 (source
5884 (origin
5885 (method url-fetch)
5886 (uri (string-append
5887 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5888 version ".tar.gz"))
5889 (sha256
5890 (base32
5891 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5892 (build-system python-build-system)
328bb95d 5893 (native-inputs
f3b98f4f 5894 `(("python-nose" ,python-nose)))
6d992d07
FB
5895 (arguments
5896 `(#:phases
5897 (modify-phases %standard-phases
5898 (replace 'check
5899 (lambda _
5900 (zero? (system* "nosetests")))))))
5901 (home-page "https://github.com/pexpect/ptyprocess")
5902 (synopsis "Run a subprocess in a pseudo terminal")
5903 (description
5904 "This package provides a Python library used to launch a subprocess in a
5905pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5906 (license license:isc)))
6d992d07
FB
5907
5908(define-public python2-ptyprocess
5909 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5910
5911(define-public python-terminado
5912 (package
5913 (name "python-terminado")
783fb0a3 5914 (version "0.6")
4aadb1df
FB
5915 (source
5916 (origin
5917 (method url-fetch)
783fb0a3 5918 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5919 (sha256
5920 (base32
783fb0a3 5921 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5922 (build-system python-build-system)
5923 (propagated-inputs
5924 `(("python-tornado" ,python-tornado)
5925 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5926 (native-inputs
5927 `(("python-nose" ,python-nose)))
4aadb1df
FB
5928 (arguments
5929 `(#:phases
5930 (modify-phases %standard-phases
5931 (replace 'check
5932 (lambda _
5933 (zero? (system* "nosetests")))))))
5934 (home-page "https://github.com/takluyver/terminado")
5935 (synopsis "Terminals served to term.js using Tornado websockets")
5936 (description "This package provides a Tornado websocket backend for the
5937term.js Javascript terminal emulator library.")
3f641af0 5938 (license license:bsd-2)
783fb0a3 5939 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5940
5941(define-public python2-terminado
783fb0a3 5942 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5943 (package (inherit terminado)
783fb0a3
EF
5944 (propagated-inputs
5945 `(("python2-backport-ssl-match-hostname"
5946 ,python2-backport-ssl-match-hostname)
00e10c6e 5947 ,@(package-propagated-inputs terminado))))))
5faa5ce4 5948
d582eaac
SB
5949(define-public python-fonttools
5950 (package
5951 (name "python-fonttools")
5952 (version "2.5")
5953 (source (origin
5954 (method url-fetch)
5955 (uri (string-append
5956 "https://pypi.python.org/packages/source/F/FontTools/"
5957 "fonttools-" version ".tar.gz"))
5958 (sha256
5959 (base32
5960 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5961 (build-system python-build-system)
9e8c6a37
HG
5962 (arguments
5963 '(#:test-target "check"
5964 #:phases
5965 (modify-phases %standard-phases
5966 (add-after 'unpack 'patch-setuppy
5967 ;; Remove the undocumented "extra_path" argument, which adds an
5968 ;; intervening directories between site-packages and the package
5969 ;; directory.
5970 (lambda _
5971 (substitute* "setup.py"
5972 (("^[ \t]*extra_path *= *'FontTools',") ""))
5973 #t)))))
d582eaac
SB
5974 (home-page "http://github.com/behdad/fonttools")
5975 (synopsis "Tools to manipulate font files")
5976 (description
5977 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 5978supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
5979of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5980also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5981from an XML-based format.")
3f641af0
DC
5982 (license (license:non-copyleft
5983 "file://LICENSE.txt"
5984 "See LICENSE.txt in the distribution."))))
d582eaac
SB
5985
5986(define-public python2-fonttools
5987 (package-with-python2 python-fonttools))
75710da6 5988
5faa5ce4
RW
5989(define-public python-ly
5990 (package
5991 (name "python-ly")
5135354f 5992 (version "0.9.4")
5faa5ce4
RW
5993 (source
5994 (origin
5995 (method url-fetch)
5135354f
RW
5996 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5997 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5998 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
5999 (sha256
6000 (base32
5135354f 6001 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 6002 (build-system python-build-system)
972cf9be
MB
6003 (arguments
6004 ;; FIXME: Some tests need network access.
6005 '(#:tests? #f))
5faa5ce4
RW
6006 (synopsis "Tool and library for manipulating LilyPond files")
6007 (description "This package provides a Python library to parse, manipulate
6008or create documents in LilyPond format. A command line program ly is also
6009provided that can be used to do various manipulations with LilyPond files.")
6010 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 6011 (license license:gpl2+)))
7e7b27d9
CR
6012
6013(define-public python-appdirs
6014 (package
6015 (name "python-appdirs")
6016 (version "1.4.0")
6017 (source
6018 (origin
6019 (method url-fetch)
6020 (uri (string-append
6021 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6022 version
6023 ".tar.gz"))
6024 (sha256
6025 (base32
6026 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6027 (build-system python-build-system)
7e7b27d9
CR
6028 (home-page "http://github.com/ActiveState/appdirs")
6029 (synopsis
6030 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6031 (description
6032 "This module provides a portable way of finding out where user data
6033should be stored on various operating systems.")
6034 (license license:expat)))
6035
6036(define-public python2-appdirs
6037 (package-with-python2 python-appdirs))
89b2e0b0
LF
6038
6039(define-public python-llfuse
6040 (package
6041 (name "python-llfuse")
e36ace36 6042 (version "1.1.1")
89b2e0b0
LF
6043 (source (origin
6044 (method url-fetch)
6045 (uri (string-append
6046 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6047 "llfuse-" version ".tar.bz2"))
6048 (sha256
6049 (base32
e36ace36 6050 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6051 (build-system python-build-system)
6052 (inputs
6053 `(("fuse" ,fuse)
6054 ("attr" ,attr)))
6055 (native-inputs
f3b98f4f 6056 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6057 (synopsis "Python bindings for FUSE")
6058 (description
6059 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6060 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6061 (license license:lgpl2.0+)
cd0569c4 6062 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6063
6064(define-public python2-llfuse
cd0569c4
LF
6065 (package (inherit (package-with-python2
6066 (strip-python2-variant python-llfuse)))
6067 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6068
6069;; For attic-0.16
6070(define-public python-llfuse-0.41
6071 (package (inherit python-llfuse)
229b3661 6072 (version "0.41.1")
cd0569c4
LF
6073 (source (origin
6074 (method url-fetch)
6075 (uri (string-append
6076 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6077 "llfuse-" version ".tar.bz2"))
6078 (sha256
6079 (base32
229b3661 6080 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6081 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6082 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6083 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6084
6085(define-public python-msgpack
6086 (package
6087 (name "python-msgpack")
aed625bd 6088 (version "0.4.8")
641c9871
LF
6089 (source (origin
6090 (method url-fetch)
ae831df4 6091 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6092 (sha256
6093 (base32
aed625bd 6094 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6095 (build-system python-build-system)
641c9871
LF
6096 (synopsis "MessagePack (de)serializer")
6097 (description "MessagePack is a fast, compact binary serialization format,
6098suitable for similar data to JSON. This package provides CPython bindings for
6099reading and writing MessagePack data.")
6100 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6101 (license license:asl2.0)))
bd74be7b
LF
6102
6103(define-public python2-msgpack
f210e944 6104 (package-with-python2 python-msgpack))
641c9871 6105
6e5e39f4
CR
6106(define-public python-netaddr
6107 (package
6108 (name "python-netaddr")
6109 (version "0.7.18")
6110 (source
6111 (origin
6112 (method url-fetch)
6113 (uri (string-append
6114 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6115 version
6116 ".tar.gz"))
6117 (sha256
6118 (base32
6119 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6120 (build-system python-build-system)
6121 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6122 (home-page "https://github.com/drkjam/netaddr/")
6123 (synopsis "Pythonic manipulation of network addresses")
6124 (description
6125 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6126and MAC network addresses.")
3f641af0 6127 (license license:bsd-3)))
6e5e39f4
CR
6128
6129(define-public python2-netaddr
6130 (package-with-python2 python-netaddr))
8c692a52
CR
6131
6132(define-public python-wrapt
6133 (package
6134 (name "python-wrapt")
6135 (version "1.10.5")
6136 (source
6137 (origin
6138 (method url-fetch)
6139 (uri (string-append
6140 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6141 version
6142 ".tar.gz"))
6143 (sha256
6144 (base32
6145 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6146 (build-system python-build-system)
6147 (arguments
6148 ;; Tests are not included in the tarball, they are only available in the
6149 ;; git repository.
6150 `(#:tests? #f))
8c692a52
CR
6151 (home-page "https://github.com/GrahamDumpleton/wrapt")
6152 (synopsis "Module for decorators, wrappers and monkey patching")
6153 (description
6154 "The aim of the wrapt module is to provide a transparent object proxy for
6155 Python, which can be used as the basis for the construction of function
6156 wrappers and decorator functions.")
3f641af0 6157 (license license:bsd-2)))
8c692a52
CR
6158
6159(define-public python2-wrapt
6160 (package-with-python2 python-wrapt))
b85c85be
CR
6161
6162(define-public python-iso8601
6163 (package
6164 (name "python-iso8601")
fe84bc9a 6165 (version "0.1.11")
b85c85be
CR
6166 (source
6167 (origin
6168 (method url-fetch)
fe84bc9a 6169 (uri (pypi-uri "iso8601" version))
b85c85be 6170 (sha256
fe84bc9a
EF
6171 (base32
6172 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6173 (build-system python-build-system)
63b02364
MB
6174 (native-inputs
6175 `(("python-pytest" ,python-pytest)))
b85c85be
CR
6176 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6177 (synopsis "Module to parse ISO 8601 dates")
6178 (description
6179 "This module parses the most common forms of ISO 8601 date strings (e.g.
6180@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6181 (license license:expat)))
6182
6183(define-public python2-iso8601
6184 (package-with-python2 python-iso8601))
5e412b63
CR
6185
6186(define-public python-monotonic
6187 (package
6188 (name "python-monotonic")
6189 (version "0.3")
6190 (source
6191 (origin
6192 (method url-fetch)
6193 (uri (string-append
6194 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6195 version
6196 ".tar.gz"))
6197 (sha256
6198 (base32
6199 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6200 (build-system python-build-system)
5e412b63
CR
6201 (home-page "https://github.com/atdt/monotonic")
6202 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6203 (description
6204 "This module provides a monotonic() function which returns the value (in
6205fractional seconds) of a clock which never goes backwards.")
3f641af0 6206 (license license:asl2.0)))
5e412b63
CR
6207
6208(define-public python2-monotonic
6209 (package-with-python2 python-monotonic))
de34afac
CR
6210
6211(define-public python-webob
6212 (package
6213 (name "python-webob")
b8834c21 6214 (version "1.5.1")
de34afac
CR
6215 (source
6216 (origin
6217 (method url-fetch)
b8834c21 6218 (uri (pypi-uri "WebOb" version))
de34afac
CR
6219 (sha256
6220 (base32
b8834c21 6221 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6222 (build-system python-build-system)
328bb95d 6223 (native-inputs
f3b98f4f 6224 `(("python-nose" ,python-nose)))
de34afac
CR
6225 (home-page "http://webob.org/")
6226 (synopsis "WSGI request and response object")
6227 (description
6228 "WebOb provides wrappers around the WSGI request environment, and an
6229object to help create WSGI responses.")
6230 (license license:expat)))
6231
6232(define-public python2-webob
6233 (package-with-python2 python-webob))
350ba0a3 6234
02a8a187
BW
6235(define-public python-xlrd
6236 (package
6237 (name "python-xlrd")
c2ad4d70 6238 (version "1.0.0")
02a8a187
BW
6239 (source (origin
6240 (method url-fetch)
e775f48e 6241 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6242 (sha256
6243 (base32
c2ad4d70 6244 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6245 (build-system python-build-system)
6246 (arguments
6247 `(#:phases
6248 (modify-phases %standard-phases
c2ad4d70 6249 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6250 ;; run tests instead for now.
6251 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6252 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6253 (home-page "http://www.python-excel.org/")
6254 (synopsis "Library for extracting data from Excel files")
6255 (description "This packages provides a library to extract data from
c598e35c 6256spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6257@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6258Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6259 (license license:bsd-3)))
02a8a187
BW
6260
6261(define-public python2-xlrd
6262 (package-with-python2 python-xlrd))
6263
350ba0a3
CR
6264(define-public python-prettytable
6265 (package
6266 (name "python-prettytable")
6267 (version "0.7.2")
6268 (source
6269 (origin
6270 (method url-fetch)
6271 (uri (string-append
6272 "https://pypi.python.org/packages/source/P/PrettyTable/"
6273 "prettytable-" version ".tar.bz2"))
6274 (sha256
6275 (base32
6276 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6277 (build-system python-build-system)
350ba0a3
CR
6278 (home-page "http://code.google.com/p/prettytable/")
6279 (synopsis "Display tabular data in an ASCII table format")
6280 (description
6281 "A library designed to represent tabular data in visually appealing ASCII
6282tables. PrettyTable allows for selection of which columns are to be printed,
6283independent alignment of columns (left or right justified or centred) and
6284printing of sub-tables by specifying a row range.")
3f641af0 6285 (license license:bsd-3)))
350ba0a3
CR
6286
6287(define-public python2-prettytable
6288 (package-with-python2 python-prettytable))
7a8ac75a 6289
9f8ee3fe
RW
6290(define-public python-tables
6291 (package
6292 (name "python-tables")
6293 (version "3.2.2")
6294 (source
6295 (origin
6296 (method url-fetch)
6297 (uri (pypi-uri "tables" version))
6298 (sha256
6299 (base32
bac23672
HG
6300 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6301 (modules '((guix build utils)))
6302 (snippet
6303 '(begin
6304 ;; Remove pre-compiled .pyc files from source.
6305 (for-each delete-file-recursively
6306 (find-files "." "__pycache__" #:directories? #t))
6307 (for-each delete-file (find-files "." "\\.pyc$"))
6308 #t))))
9f8ee3fe
RW
6309 (build-system python-build-system)
6310 (arguments
6311 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6312 ;; or "check", so we must override the build and check phases.
6313 #:phases
6314 (modify-phases %standard-phases
6315 (add-after 'unpack 'use-gcc
6316 (lambda _
6317 (substitute* "setup.py"
6318 (("compiler = new_compiler\\(\\)" line)
6319 (string-append line
6320 "\ncompiler.set_executables(compiler='gcc',"
6321 "compiler_so='gcc',"
6322 "linker_exe='gcc',"
6323 "linker_so='gcc -shared')")))
6324 #t))
6325 (replace 'build
6326 (lambda* (#:key inputs #:allow-other-keys)
6327 (zero? (system* "python" "setup.py" "build"
6328 (string-append "--hdf5="
6329 (assoc-ref inputs "hdf5"))))))
6330 (replace 'check
6331 (lambda* (#:key inputs #:allow-other-keys)
6332 (zero? (system* "python" "setup.py" "check"
6333 (string-append "--hdf5="
6334 (assoc-ref inputs "hdf5")))))))))
6335 (propagated-inputs
6336 `(("python-numexpr" ,python-numexpr)
6337 ("python-numpy" ,python-numpy)))
6338 (native-inputs
f3b98f4f 6339 `(("python-cython" ,python-cython)
9f8ee3fe
RW
6340 ("pkg-config" ,pkg-config)))
6341 (inputs
6342 `(("hdf5" ,hdf5)
6343 ("bzip2" ,bzip2)
6344 ("zlib" ,zlib)))
6345 (home-page "http://www.pytables.org/")
6346 (synopsis "Hierarchical datasets for Python")
6347 (description "PyTables is a package for managing hierarchical datasets and
6348designed to efficently cope with extremely large amounts of data.")
3f641af0 6349 (license license:bsd-3)))
9f8ee3fe
RW
6350
6351(define-public python2-tables
6352 (package-with-python2 python-tables))
6353
7a8ac75a
RW
6354(define-public python-pyasn1
6355 (package
6356 (name "python-pyasn1")
caa0edb3 6357 (version "0.1.9")
7a8ac75a
RW
6358 (source
6359 (origin
6360 (method url-fetch)
caa0edb3 6361 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6362 (sha256
6363 (base32
caa0edb3 6364 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6365 (build-system python-build-system)
6366 (home-page "http://pyasn1.sourceforge.net/")
6367 (synopsis "ASN.1 types and codecs")
6368 (description
6369 "This is an implementation of ASN.1 types and codecs in Python. It is
6370suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6371 (license license:bsd-2)))
7a8ac75a
RW
6372
6373(define-public python2-pyasn1
6374 (package-with-python2 python-pyasn1))
9a49a535 6375
5988c299
EF
6376(define-public python-pyasn1-modules
6377 (package
6378 (name "python-pyasn1-modules")
6379 (version "0.0.8")
6380 (source
6381 (origin
6382 (method url-fetch)
6383 (uri (pypi-uri "pyasn1-modules" version))
6384 (sha256
6385 (base32
6386 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6387 (build-system python-build-system)
5988c299
EF
6388 (propagated-inputs
6389 `(("python-pyasn1" ,python-pyasn1)))
6390 (home-page "http://sourceforge.net/projects/pyasn1/")
6391 (synopsis "ASN.1 codec implementations")
6392 (description
6393 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6394implementations of ASN.1-based codecs and protocols.")
3f641af0 6395 (license license:bsd-3)))
5988c299
EF
6396
6397(define-public python2-pyasn1-modules
6398 (package-with-python2 python-pyasn1-modules))
6399
520af157 6400(define-public python-ipaddress
9a49a535 6401 (package
520af157
DC
6402 (name "python-ipaddress")
6403 (version "1.0.16")
6404 (source (origin
6405 (method url-fetch)
6406 (uri (pypi-uri "ipaddress" version))
6407 (sha256
6408 (base32
6409 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6410 (build-system python-build-system)
9a49a535
RW
6411 (home-page "https://github.com/phihag/ipaddress")
6412 (synopsis "IP address manipulation library")
6413 (description
520af157
DC
6414 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6415 in Python. This library is used to create, poke at, and manipulate IPv4 and
6416 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6417 module to older versions of Python.")
f210e944 6418 (license license:psfl)))
520af157
DC
6419
6420(define-public python2-ipaddress
f210e944 6421 (package-with-python2 python-ipaddress))
3f00e078 6422
4a238186
HG
6423(define-public python2-ipaddr
6424 (package
6425 (name "python2-ipaddr")
6426 (version "2.1.11")
6427 (source
6428 (origin
6429 (method url-fetch)
6430 (uri (pypi-uri "ipaddr" version))
6431 (sha256
6432 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6433 (build-system python-build-system)
6434 (arguments
6435 `(#:python ,python-2 ;version 2 only
6436 #:phases
6437 (modify-phases %standard-phases
6438 (replace 'check
6439 (lambda* _
6440 (zero? (system* "python" "ipaddr_test.py")))))))
6441 (home-page "https://github.com/google/ipaddr-py")
6442 (synopsis "IP address manipulation library")
6443 (description
6444 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6445IPv6 addresses and networks.
6446
6447For new implementations you may prefer to use the standard module
6448@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6449versions of Python.")
3f641af0 6450 (license license:asl2.0)))
4a238186 6451
3f00e078
RW
6452(define-public python-idna
6453 (package
6454 (name "python-idna")
6455 (version "2.0")
6456 (source
6457 (origin
6458 (method url-fetch)
6459 (uri (string-append "https://pypi.python.org/packages/source/i/"
6460 "idna/idna-" version ".tar.gz"))
6461 (sha256
6462 (base32
6463 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6464 (build-system python-build-system)
3f00e078
RW
6465 (home-page "https://github.com/kjd/idna")
6466 (synopsis "Internationalized domain names in applications")
6467 (description
6468 "This is a library to support the Internationalised Domain Names in
6469Applications (IDNA) protocol as specified in RFC 5891. This version of the
6470protocol is often referred to as “IDNA2008” and can produce different results
6471from the earlier standard from 2003. The library is also intended to act as a
6472suitable drop-in replacement for the “encodings.idna” module that comes with
6473the Python standard library but currently only supports the older 2003
6474specification.")
3f641af0 6475 (license license:bsd-4)))
3f00e078
RW
6476
6477(define-public python2-idna
6478 (package-with-python2 python-idna))
36ebf972
RW
6479
6480(define-public python-pretend
6481 (package
6482 (name "python-pretend")
6483 (version "1.0.8")
6484 (source
6485 (origin
6486 (method url-fetch)
6487 (uri (string-append "https://pypi.python.org/packages/source/p/"
6488 "pretend/pretend-" version ".tar.gz"))
6489 (sha256
6490 (base32
6491 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6492 (build-system python-build-system)
36ebf972
RW
6493 (home-page "https://github.com/alex/pretend")
6494 (synopsis "Library for stubbing in Python")
6495 (description
6496 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6497technique for writing tests. You may hear the term mixed up with mocks,
6498fakes, or doubles. Basically, a stub is an object that returns pre-canned
6499responses, rather than doing any computation.")
3f641af0 6500 (license license:bsd-3)))
36ebf972
RW
6501
6502(define-public python2-pretend
6503 (package-with-python2 python-pretend))
aa759a51
RW
6504
6505(define-public python-cryptography-vectors
6506 (package
6507 (name "python-cryptography-vectors")
a6c47905 6508 (version "1.6")
aa759a51
RW
6509 (source
6510 (origin
6511 (method url-fetch)
9c509ca9 6512 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6513 (sha256
6514 (base32
a6c47905 6515 "0xgn3yvlmv5rs92wgjj39qscr6s7mwbbsx7j683sfa6ijmyb1k01"))))
aa759a51 6516 (build-system python-build-system)
aa759a51 6517 (home-page "https://github.com/pyca/cryptography")
66e07664 6518 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6519 (description
6520 "This package contains test vectors for the cryptography package.")
6521 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6522 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6523
6524(define-public python2-cryptography-vectors
6525 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6526
6527(define-public python-cryptography
6528 (package
6529 (name "python-cryptography")
a6c47905 6530 (version "1.6")
88b47cb0
RW
6531 (source
6532 (origin
6533 (method url-fetch)
9c509ca9 6534 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6535 (sha256
6536 (base32
a6c47905 6537 "0gwvmz6w5ml0bjbgmdiscsv5i948lrjd381z7h9qkz6kr398c3ad"))))
88b47cb0 6538 (build-system python-build-system)
470613f9
LF
6539 (arguments
6540 `(#:phases
6541 (modify-phases %standard-phases
6542 (add-before 'check 'disable-failing-test
6543 (lambda _
6544 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6545 ;; versions of python-cryptography:
6546 ;; https://github.com/pyca/cryptography/issues/3196
6547 ;; TODO: Try re-enabling the test when upgrading
6548 ;; python-cryptography.
6549 (substitute* "tests/hazmat/backends/test_openssl.py"
6550 (("def test_numeric_string_x509_name_entry")
6551 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6552 #t)))))
88b47cb0
RW
6553 (inputs
6554 `(("openssl" ,openssl)))
6555 (propagated-inputs
6556 `(("python-cffi" ,python-cffi)
6557 ("python-six" ,python-six)
6558 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6559 ("python-idna" ,python-idna)
6560 ("python-iso8601" ,python-iso8601)))
6561 (native-inputs
6562 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6563 ("python-hypothesis" ,python-hypothesis)
88b47cb0 6564 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6565 ("python-pyasn1" ,python-pyasn1)
6566 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
6567 ("python-pytz" ,python-pytz)
6568 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
6569 (home-page "https://github.com/pyca/cryptography")
6570 (synopsis "Cryptographic recipes and primitives for Python")
6571 (description
6572 "cryptography is a package which provides cryptographic recipes and
6573primitives to Python developers. It aims to be the “cryptographic standard
6574library” for Python. The package includes both high level recipes, and low
6575level interfaces to common cryptographic algorithms such as symmetric ciphers,
6576message digests and key derivation functions.")
6577 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6578 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6579 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6580
6581(define-public python2-cryptography
519e2f4f
LF
6582 (let ((crypto (package-with-python2
6583 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6584 (package (inherit crypto)
6585 (propagated-inputs
6586 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6587 ("python2-backport-ssl-match-hostname"
6588 ,python2-backport-ssl-match-hostname)
68f1cdec 6589 ("python2-enum34" ,python2-enum34)
88b47cb0 6590 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6591
6592(define-public python-pyopenssl
6593 (package
6594 (name "python-pyopenssl")
61684de2 6595 (version "16.2.0")
5af999b8
RW
6596 (source
6597 (origin
6598 (method url-fetch)
eb68d268 6599 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6600 (sha256
6601 (base32
61684de2 6602 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))))
5af999b8 6603 (build-system python-build-system)
30e0229a
MB
6604 (arguments
6605 ;; FIXME: Some tests fail with "NameError: name 'long' is not defined".
6606 '(#:tests? #f))
5af999b8
RW
6607 (propagated-inputs
6608 `(("python-cryptography" ,python-cryptography)
6609 ("python-six" ,python-six)))
6610 (inputs
6611 `(("openssl" ,openssl)))
30e0229a
MB
6612 (native-inputs
6613 `(("python-pytest" ,python-pytest)))
5af999b8
RW
6614 (home-page "https://github.com/pyca/pyopenssl")
6615 (synopsis "Python wrapper module around the OpenSSL library")
6616 (description
6617 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6618library.")
3f641af0 6619 (license license:asl2.0)))
5af999b8
RW
6620
6621(define-public python2-pyopenssl
519e2f4f 6622 (package-with-python2 python-pyopenssl))
643725a1
CR
6623
6624(define-public python-pip
6625 (package
6626 (name "python-pip")
6fb54e3b 6627 (version "8.0.2")
643725a1
CR
6628 (source
6629 (origin
6630 (method url-fetch)
6fb54e3b 6631 (uri (pypi-uri "pip" version))
643725a1
CR
6632 (sha256
6633 (base32
6fb54e3b 6634 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1 6635 (build-system python-build-system)
05e2e4cf
HG
6636 (native-inputs
6637 `(;; Tests
6638 ("python-virtualenv" ,python-virtualenv)
643725a1
CR
6639 ("python-mock" ,python-mock)
6640 ("python-pytest" ,python-pytest)
6641 ("python-scripttest" ,python-scripttest)))
6642 (home-page "https://pip.pypa.io/")
6643 (synopsis
6644 "Package manager for Python software")
6645 (description
6646 "Pip is a package manager for Python software, that finds packages on the
6647Python Package Index (PyPI).")
6648 (license license:expat)))
6649
6650(define-public python2-pip
6651 (package-with-python2 python-pip))
d8c4998f
LC
6652
6653(define-public python-tlsh
6654 (package
6655 (name "python-tlsh")
99b00dc7 6656 (version "3.4.4")
d8c4998f
LC
6657 (home-page "https://github.com/trendmicro/tlsh")
6658 (source (origin
99b00dc7
EF
6659 (method url-fetch)
6660 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6661 version ".tar.gz"))
d8c4998f
LC
6662 (sha256
6663 (base32
99b00dc7
EF
6664 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6665 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6666 (build-system cmake-build-system)
6667 (arguments
6668 '(#:out-of-source? #f
6669 #:phases (modify-phases %standard-phases
6670 (replace
6671 'install
6672 (lambda* (#:key outputs #:allow-other-keys)
6673 ;; Build and install the Python bindings. The underlying
6674 ;; C++ library is apparently not meant to be installed.
6675 (let ((out (assoc-ref outputs "out")))
6676 (with-directory-excursion "py_ext"
6677 (and (system* "python" "setup.py" "build")
6678 (system* "python" "setup.py" "install"
6679 (string-append "--prefix=" out))))))))))
6680 (inputs `(("python" ,python-wrapper))) ;for the bindings
6681 (synopsis "Fuzzy matching library for Python")
6682 (description
6683 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6684Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6685value which can be used for similarity comparisons. Similar objects have
6686similar hash values, which allows for the detection of similar objects by
6687comparing their hash values. The byte stream should have a sufficient amount
6688of complexity; for example, a byte stream of identical bytes will not generate
6689a hash value.")
3f641af0 6690 (license license:asl2.0)))
d8c4998f
LC
6691
6692(define-public python2-tlsh
6693 (package
6694 (inherit python-tlsh)
6695 (name "python2-tlsh")
6696 (inputs `(("python" ,python-2)))))
d96034ed 6697
67f66812
BW
6698(define-public python-termcolor
6699 (package
6700 (name "python-termcolor")
6701 (version "1.1.0")
6702 (source
6703 (origin
6704 (method url-fetch)
6705 (uri (pypi-uri "python-termcolor" version))
6706 (sha256
6707 (base32
6708 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6709 (build-system python-build-system)
6710 (arguments
6711 ;; There are no tests.
6712 `(#:tests? #f))
6713 (home-page "http://pypi.python.org/pypi/termcolor")
6714 (synopsis "ANSII Color formatting for terminal output")
6715 (description
6716 "This package provides ANSII Color formatting for output in terminals.")
6717 (license license:expat)))
6718
6719(define-public python2-termcolor
6720 (package-with-python2 python-termcolor))
6721
d96034ed
LC
6722(define-public python-libarchive-c
6723 (package
6724 (name "python-libarchive-c")
03fd001c 6725 (version "2.2")
d96034ed
LC
6726 (source (origin
6727 (method url-fetch)
03fd001c 6728 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6729 (sha256
6730 (base32
03fd001c 6731 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6732 (build-system python-build-system)
6733 (arguments
6734 '(#:phases (modify-phases %standard-phases
6735 (add-before
6736 'build 'reference-libarchive
6737 (lambda* (#:key inputs #:allow-other-keys)
6738 ;; Retain the absolute file name of libarchive.so.
6739 (let ((libarchive (assoc-ref inputs "libarchive")))
6740 (substitute* "libarchive/ffi.py"
6741 (("find_library\\('archive'\\)")
6742 (string-append "'" libarchive
b41a05ce 6743 "/lib/libarchive.so'")))))))))
d96034ed 6744 (inputs
f3b98f4f 6745 `(("libarchive" ,libarchive)))
d96034ed
LC
6746 (home-page "https://github.com/Changaco/python-libarchive-c")
6747 (synopsis "Python interface to libarchive")
6748 (description
6749 "This package provides Python bindings to libarchive, a C library to
6750access possibly compressed archives in many different formats. It uses
6751Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6752 (license license:lgpl2.0+)))
d96034ed
LC
6753
6754(define-public python2-libarchive-c
6755 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6756
6757(define-public python-file
6758 (package
6759 (inherit file)
6760 (name "python-file")
7ffa5d4a
LF
6761 (source (origin
6762 (inherit (package-source file))
6763 ;; This patch should not be applied to python2-file.
6764 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
6765 (build-system python-build-system)
6766 (arguments
6767 '(#:tests? #f ;no tests
00bf74be 6768 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
6769 #:phases (modify-phases %standard-phases
6770 (add-before 'build 'change-directory
6771 (lambda _
6772 (chdir "python")
6773 #t))
6774 (add-before 'build 'set-library-file-name
6775 (lambda* (#:key inputs #:allow-other-keys)
6776 (let ((file (assoc-ref inputs "file")))
6777 (substitute* "magic.py"
6778 (("find_library\\('magic'\\)")
6779 (string-append "'" file "/lib/libmagic.so'")))
6780 #t))))))
6781 (inputs `(("file" ,file)))
6782 (self-native-input? #f)
daeeea71
CM
6783 (synopsis "Python bindings to the libmagic file type guesser. Note that
6784this module and the python-magic module both provide a \"magic.py\" file;
6785these two modules, which are different and were developed separately, both
f210e944 6786serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6787
6788(define-public python2-file
f210e944 6789 (package-with-python2 python-file))
85d4aeac
LC
6790
6791(define-public python-debian
6792 (package
6793 (name "python-debian")
6794 (version "0.1.23")
6795 (source
6796 (origin
6797 (method url-fetch)
6798 (uri (string-append
6799 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6800 version ".tar.gz"))
6801 (sha256
6802 (base32
6803 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6804 (build-system python-build-system)
f22efa01 6805 (propagated-inputs
85d4aeac 6806 `(("python-six" ,python-six)))
85d4aeac
LC
6807 (home-page "http://packages.debian.org/sid/python-debian")
6808 (synopsis "Debian package related modules")
6809 (description
5c7bdc9a
LC
6810 ;; XXX: Use @enumerate instead of @itemize to work around
6811 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6812 "This package provides Python modules that abstract many formats of
6813Debian-related files, such as:
6814
5c7bdc9a 6815@enumerate
85d4aeac
LC
6816@item Debtags information;
6817@item @file{debian/changelog} files;
6818@item packages files, pdiffs;
6819@item control files of single or multiple RFC822-style paragraphs---e.g.
6820 @file{debian/control}, @file{.changes}, @file{.dsc};
6821@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6822 contained files and meta-information.
5c7bdc9a 6823@end enumerate\n")
85d4aeac
LC
6824
6825 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6826 (license license:gpl3+)))
85d4aeac
LC
6827
6828(define-public python2-debian
6829 (package-with-python2 python-debian))
816a6538 6830
2d321bb2
RW
6831(define-public python-nbformat
6832 (package
6833 (name "python-nbformat")
6834 (version "4.1.0")
6835 (source
6836 (origin
6837 (method url-fetch)
6838 (uri (pypi-uri "nbformat" version))
6839 (sha256
6840 (base32
6841 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6842 (build-system python-build-system)
6843 (arguments `(#:tests? #f)) ; no test target
6844 (propagated-inputs
6845 `(("python-ipython-genutils" ,python-ipython-genutils)
6846 ("python-jsonschema" ,python-jsonschema)
6847 ("python-jupyter-core" ,python-jupyter-core)
6848 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
6849 (home-page "http://jupyter.org")
6850 (synopsis "Jupyter Notebook format")
6851 (description "This package provides the reference implementation of the
6852Jupyter Notebook format and Python APIs for working with notebooks.")
6853 (license license:bsd-3)))
6854
6855(define-public python2-nbformat
6856 (package-with-python2 python-nbformat))
6857
55436048
RW
6858(define-public python-bleach
6859 (package
6860 (name "python-bleach")
6861 (version "1.4.3")
6862 (source
6863 (origin
6864 (method url-fetch)
6865 (uri (pypi-uri "bleach" version))
6866 (sha256
6867 (base32
6868 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6869 (build-system python-build-system)
6870 (propagated-inputs
6871 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
6872 ("python-six" ,python-six)))
6873 (native-inputs
6874 `(("python-nose" ,python-nose)))
6875 (home-page "http://github.com/jsocol/bleach")
6876 (synopsis "Whitelist-based HTML-sanitizing tool")
6877 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6878 (license license:asl2.0)))
6879
6880(define-public python2-bleach
6881 (package-with-python2 python-bleach))
6882
60590a3a
RW
6883(define-public python-entrypoints
6884 (package
6885 (name "python-entrypoints")
6886 (version "0.2.2")
6887 (source
6888 (origin
6889 (method url-fetch)
6890 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6891 version ".tar.gz"))
6892 (file-name (string-append name "-" version ".tar.gz"))
6893 (sha256
6894 (base32
6895 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6896 (build-system python-build-system)
6897 ;; The package does not come with a setup.py file, so we have to generate
6898 ;; one ourselves.
6899 (arguments
6900 `(#:tests? #f
6901 #:phases
6902 (modify-phases %standard-phases
6903 (add-after 'unpack 'create-setup.py
6904 (lambda _
6905 (call-with-output-file "setup.py"
6906 (lambda (port)
6907 (format port "\
6908from setuptools import setup
6909setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6910" ,version))))))))
6911 (home-page "https://github.com/takluyver/entrypoints")
6912 (synopsis "Discover and load entry points from installed Python packages")
6913 (description "Entry points are a way for Python packages to advertise
6914objects with some common interface. The most common examples are
6915@code{console_scripts} entry points, which define shell commands by
6916identifying a Python function to run. The @code{entrypoints} module contains
6917functions to find and load entry points.")
6918 (license license:expat)))
6919
6920(define-public python2-entrypoints
6921 (package-with-python2 python-entrypoints))
6922
c60898a8
RW
6923(define-public python-nbconvert
6924 (package
6925 (name "python-nbconvert")
6926 (version "5.0.0b1")
6927 (source
6928 (origin
6929 (method url-fetch)
6930 (uri (pypi-uri "nbconvert" version))
6931 (sha256
6932 (base32
6933 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6934 (build-system python-build-system)
497355dc
MB
6935 (arguments
6936 `(;; The "bdist_egg" target is disabled by default, causing the installation
6937 ;; to fail.
6938 #:configure-flags (list "bdist_egg")
6939 ;; FIXME: 5 failures, 40 errors.
6940 #:tests? #f))
6941 ;; #:phases
6942 ;; (modify-phases %standard-phases
6943 ;; (replace 'check
6944 ;; (lambda _
6945 ;; (zero? (system* "py.test" "-v")))))
6946 (native-inputs
6947 `(("python-pytest" ,python-pytest)))
c60898a8
RW
6948 (propagated-inputs
6949 `(("python-bleach" ,python-bleach)
6950 ("python-entrypoints" ,python-entrypoints)
6951 ("python-jinja2" ,python-jinja2)
6952 ("python-jupyter-core" ,python-jupyter-core)
6953 ("python-mistune" ,python-mistune)
6954 ("python-nbformat" ,python-nbformat)
6955 ("python-pygments" ,python-pygments)
c60898a8
RW
6956 ("python-traitlets" ,python-traitlets)))
6957 (home-page "http://jupyter.org")
6958 (synopsis "Converting Jupyter Notebooks")
6959 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6960notebooks to various other formats via Jinja templates. It allows you to
6961convert an @code{.ipynb} notebook file into various static formats including:
6962
6963@enumerate
6964@item HTML
6965@item LaTeX
6966@item PDF
6967@item Reveal JS
6968@item Markdown (md)
6969@item ReStructured Text (rst)
6970@item executable script
6971@end enumerate\n")
6972 (license license:bsd-3)))
6973
6974(define-public python2-nbconvert
6975 (package-with-python2 python-nbconvert))
6976
a0d62280
RW
6977(define-public python-notebook
6978 (package
6979 (name "python-notebook")
6980 (version "4.2.3")
6981 (source (origin
6982 (method url-fetch)
6983 (uri (pypi-uri "notebook" version))
6984 (sha256
6985 (base32
6986 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6987 (build-system python-build-system)
6988 (arguments
6989 `(#:phases
6990 (modify-phases %standard-phases
6991 (replace 'check
6992 (lambda _
6993 ;; HOME must be set for tests
6994 (setenv "HOME" "/tmp")
6995 (zero? (system* "nosetests")))))))
6996 (propagated-inputs
6997 `(("python-jupyter-core" ,python-jupyter-core)
6998 ("python-nbformat" ,python-nbformat)
6999 ("python-nbconvert" ,python-nbconvert)
7000 ("python-ipython" ,python-ipython)))
7001 (native-inputs
7002 `(("python-nose" ,python-nose)
7003 ("python-sphinx" ,python-sphinx)
7004 ("python-requests" ,python-requests)))
7005 (home-page "http://jupyter.org/")
7006 (synopsis "Web-based notebook environment for interactive computing")
7007 (description
7008 "The Jupyter HTML notebook is a web-based notebook environment for
7009interactive computing.")
3a735ecf 7010 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
7011 (license license:bsd-3)))
7012
7013(define-public python2-notebook
3a735ecf
HG
7014 (let ((base (package-with-python2
7015 (strip-python2-variant python-notebook))))
7016 (package (inherit base)
7017 (native-inputs
7018 `(("python2-mock" ,python2-mock)
7019 ,@(package-native-inputs base)))
7020 (arguments
7021 (substitute-keyword-arguments (package-arguments base)
7022 ((#:phases phases)
7023 `(modify-phases ,phases
7024 (add-before 'check 'disable-test-case
7025 ;; The test requires network access to localhost. Curiously it
7026 ;; fails with Python 2 only. Simply make the test-case return
7027 ;; immediately.
7028 (lambda _
7029 (substitute*
7030 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7031 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 7032
d55724ed
RW
7033(define-public python-widgetsnbextension
7034 (package
7035 (name "python-widgetsnbextension")
7036 (version "1.2.6")
7037 (source
7038 (origin
7039 (method url-fetch)
7040 (uri (pypi-uri "widgetsnbextension" version))
7041 (sha256
7042 (base32
7043 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7044 (build-system python-build-system)
7045 (propagated-inputs
7046 `(("python-notebook" ,python-notebook)))
7047 (native-inputs
f3b98f4f 7048 `(("python-nose" ,python-nose)))
d55724ed
RW
7049 (home-page "http://ipython.org")
7050 (synopsis "IPython HTML widgets for Jupyter")
7051 (description "This package provides interactive HTML widgets for Jupyter
7052notebooks.")
7053 (license license:bsd-3)))
7054
7055(define-public python2-widgetsnbextension
7056 (package-with-python2 python-widgetsnbextension))
7057
4fe2e344
RW
7058(define-public python-ipywidgets
7059 (package
7060 (name "python-ipywidgets")
7061 (version "5.2.2")
7062 (source
7063 (origin
7064 (method url-fetch)
7065 (uri (pypi-uri "ipywidgets" version))
7066 (sha256
7067 (base32
7068 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7069 (build-system python-build-system)
7070 ;; FIXME: it's not clear how to run the tests.
7071 (arguments `(#:tests? #f))
7072 (propagated-inputs
7073 `(("python-ipykernel" ,python-ipykernel)
7074 ("python-ipython" ,python-ipython)
4fe2e344
RW
7075 ("python-traitlets" ,python-traitlets)
7076 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7077 (home-page "http://ipython.org")
7078 (synopsis "IPython HTML widgets for Jupyter")
7079 (description "Ipywidgets are interactive HTML widgets for Jupyter
7080notebooks and the IPython kernel. Notebooks come alive when interactive
7081widgets are used. Users gain control of their data and can visualize changes
7082in the data.")
7083 (license license:bsd-3)))
7084
7085(define-public python2-ipywidgets
7086 (package-with-python2 python-ipywidgets))
7087
8ceebf8f
RW
7088(define-public python-jupyter-console
7089 (package
7090 (name "python-jupyter-console")
7091 (version "5.0.0")
7092 (source
7093 (origin
7094 (method url-fetch)
7095 (uri (pypi-uri "jupyter_console" version))
7096 (sha256
7097 (base32
7098 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7099 (build-system python-build-system)
7100 ;; FIXME: it's not clear how to run the tests.
7101 (arguments `(#:tests? #f))
7102 (propagated-inputs
7103 `(("python-ipykernel" ,python-ipykernel)
7104 ("python-ipython" ,python-ipython)
7105 ("python-jupyter-client" ,python-jupyter-client)
7106 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7107 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7108 (home-page "https://jupyter.org")
7109 (synopsis "Jupyter terminal console")
7110 (description "This package provides a terminal-based console frontend for
7111Jupyter kernels. It also allows for console-based interaction with non-Python
7112Jupyter kernels such as IJulia and IRKernel.")
7113 (license license:bsd-3)))
7114
7115(define-public python2-jupyter-console
7116 (package-with-python2 python-jupyter-console))
7117
c27ae827
RW
7118(define-public jupyter
7119 (package
7120 (name "jupyter")
7121 (version "1.0.0")
7122 (source
7123 (origin
7124 (method url-fetch)
7125 (uri (pypi-uri "jupyter" version))
7126 (sha256
7127 (base32
7128 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7129 (build-system python-build-system)
7130 ;; FIXME: it's not clear how to run the tests.
7131 (arguments `(#:tests? #f))
7132 (propagated-inputs
7133 `(("python-ipykernel" ,python-ipykernel)
7134 ("python-ipywidgets" ,python-ipywidgets)
7135 ("python-jupyter-console" ,python-jupyter-console)
7136 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7137 ("python-notebook" ,python-notebook)))
c27ae827
RW
7138 (home-page "http://jupyter.org")
7139 (synopsis "Web application for interactive documents")
7140 (description
7141 "The Jupyter Notebook is a web application that allows you to create and
7142share documents that contain live code, equations, visualizations and
7143explanatory text. Uses include: data cleaning and transformation, numerical
7144simulation, statistical modeling, machine learning and much more.")
7145 (license license:bsd-3)))
7146
816a6538
LC
7147(define-public python-chardet
7148 (package
7149 (name "python-chardet")
7150 (version "2.3.0")
7151 (source
7152 (origin
7153 (method url-fetch)
7154 (uri (string-append
7155 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7156 version
7157 ".tar.gz"))
7158 (sha256
7159 (base32
7160 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7161 (build-system python-build-system)
816a6538
LC
7162 (home-page "https://github.com/chardet/chardet")
7163 (synopsis "Universal encoding detector for Python 2 and 3")
7164 (description
7165 "This package provides @code{chardet}, a Python module that can
7166automatically detect a wide range of file encodings.")
3f641af0 7167 (license license:lgpl2.1+)))
816a6538
LC
7168
7169(define-public python2-chardet
7170 (package-with-python2 python-chardet))
2fc5f186 7171
1872f1bb
KM
7172(define-public python-docopt
7173 (package
7174 (name "python-docopt")
7175 (version "0.6.2")
7176 (source
7177 (origin
7178 (method url-fetch)
7179 ;; The release on PyPI does not include tests.
7180 (uri (string-append
7181 "https://github.com/docopt/docopt/archive/"
7182 version ".tar.gz"))
7183 (file-name (string-append name "-" version ".tar.gz"))
7184 (sha256
7185 (base32
7186 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7187 (build-system python-build-system)
7188 (native-inputs
f3b98f4f 7189 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7190 (arguments
7191 `(#:phases (alist-replace
7192 'check
7193 (lambda _ (zero? (system* "py.test")))
7194 %standard-phases)))
7195 (home-page "http://docopt.org")
7196 (synopsis "Command-line interface description language for Python")
7197 (description "This library allows the user to define a command-line
7198interface from a program's help message rather than specifying it
7199programatically with command-line parsers like @code{getopt} and
7200@code{argparse}.")
7201 (license license:expat)))
7202
7203(define-public python2-docopt
7204 (package-with-python2 python-docopt))
7205
2fc5f186
LF
7206(define-public python-zope-event
7207 (package
7208 (name "python-zope-event")
7209 (version "4.1.0")
7210 (source
7211 (origin
7212 (method url-fetch)
7213 (uri (string-append "https://pypi.python.org/packages/source/z"
7214 "/zope.event/zope.event-" version ".tar.gz"))
7215 (sha256
7216 (base32
7217 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7218 (build-system python-build-system)
2fc5f186
LF
7219 (home-page "http://pypi.python.org/pypi/zope.event")
7220 (synopsis "Event publishing system for Python")
7221 (description "Zope.event provides an event publishing API, intended for
7222use by applications which are unaware of any subscribers to their events. It
7223is a simple event-dispatching system on which more sophisticated event
7224dispatching systems can be built.")
3f641af0 7225 (license license:zpl2.1)))
2fc5f186
LF
7226
7227(define-public python2-zope-event
7228 (package-with-python2 python-zope-event))
97abe268
LF
7229
7230(define-public python-zope-interface
7231 (package
7232 (name "python-zope-interface")
7233 (version "4.1.3")
7234 (source
7235 (origin
7236 (method url-fetch)
7237 (uri (string-append "https://pypi.python.org/packages/source/z"
7238 "/zope.interface/zope.interface-" version ".tar.gz"))
7239 (sha256
7240 (base32
7241 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7242 (build-system python-build-system)
38d480a8 7243 (native-inputs
97abe268
LF
7244 `(("python-zope-event" ,python-zope-event)))
7245 (home-page "https://github.com/zopefoundation/zope.interface")
7246 (synopsis "Python implementation of the \"design by contract\"
7247methodology")
7248 (description "Zope.interface provides an implementation of \"object
7249interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7250conforming to a given API or contract.")
3f641af0 7251 (license license:zpl2.1)))
97abe268
LF
7252
7253(define-public python2-zope-interface
7254 (package-with-python2 python-zope-interface))
81f2373c
LF
7255
7256(define-public python-zope-exceptions
7257 (package
7258 (name "python-zope-exceptions")
7259 (version "4.0.8")
7260 (source
7261 (origin
7262 (method url-fetch)
7263 (uri (string-append "https://pypi.python.org/packages/source/z"
7264 "/zope.exceptions/zope.exceptions-"
7265 version ".tar.gz"))
7266 (sha256
7267 (base32
7268 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7269 (build-system python-build-system)
7270 (arguments
7271 '(#:tests? #f)) ; circular dependency with zope.testrunner
7272 (propagated-inputs
7273 `(("python-zope-interface" ,python-zope-interface)))
7274 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7275 (synopsis "Zope exceptions")
7276 (description "Zope.exceptions provides general-purpose exception types
7277that have uses outside of the Zope framework.")
3f641af0 7278 (license license:zpl2.1)))
81f2373c
LF
7279
7280(define-public python2-zope-exceptions
7281 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7282
7283(define-public python-zope-testing
7284 (package
7285 (name "python-zope-testing")
7286 (version "4.5.0")
7287 (source
7288 (origin
7289 (method url-fetch)
7290 (uri (string-append "https://pypi.python.org/packages/source/z"
7291 "/zope.testing/zope.testing-" version ".tar.gz"))
7292 (sha256
7293 (base32
b02f7a21
HG
7294 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7295 (modules '((guix build utils)))
7296 (snippet
7297 '(begin
7298 ;; Remove pre-compiled .pyc files backup files from source.
7299 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7300 #t))))
900e3c0e
LF
7301 (build-system python-build-system)
7302 (native-inputs
7303 `(("python-zope-exceptions" ,python-zope-exceptions)))
7304 (propagated-inputs
7305 `(("python-zope-interface" ,python-zope-interface)))
7306 (home-page "http://pypi.python.org/pypi/zope.testing")
7307 (synopsis "Zope testing helpers")
7308 (description "Zope.testing provides a number of testing utilities for HTML
7309forms, HTTP servers, regular expressions, and more.")
3f641af0 7310 (license license:zpl2.1)))
900e3c0e
LF
7311
7312(define-public python2-zope-testing
7313 (package-with-python2 python-zope-testing))
01614c4f
LF
7314
7315(define-public python-zope-testrunner
7316 (package
7317 (name "python-zope-testrunner")
7318 (version "4.4.9")
7319 (source
7320 (origin
7321 (method url-fetch)
7322 (uri (string-append "https://pypi.python.org/packages/source/z"
7323 "/zope.testrunner/zope.testrunner-"
7324 version ".zip"))
7325 (sha256
7326 (base32
7327 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7328 (build-system python-build-system)
385871e5
MB
7329 (arguments
7330 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
01614c4f
LF
7331 (native-inputs
7332 `(("python-six" ,python-six)
e408ffc3 7333 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
7334 ("python-zope-exceptions" ,python-zope-exceptions)
7335 ("python-zope-testing" ,python-zope-testing)
7336 ("unzip" ,unzip)))
7337 (propagated-inputs
7338 `(("python-zope-interface" ,python-zope-interface)))
7339 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7340 (synopsis "Zope testrunner script")
7341 (description "Zope.testrunner provides a script for running Python
7342tests.")
3f641af0 7343 (license license:zpl2.1)))
01614c4f
LF
7344
7345(define-public python2-zope-testrunner
7346 (let ((base (package-with-python2 python-zope-testrunner)))
7347 (package
7348 (inherit base)
7349 (native-inputs
7350 (append (package-native-inputs base)
7351 `(("python2-subunit" ,python2-subunit)
7352 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7353
7354(define-public python-zope-i18nmessageid
7355 (package
7356 (name "python-zope-i18nmessageid")
7357 (version "4.0.3")
7358 (source
7359 (origin
7360 (method url-fetch)
7361 (uri (string-append
7362 "https://pypi.python.org/packages/source/z"
7363 "/zope.i18nmessageid/zope.i18nmessageid-"
7364 version ".tar.gz"))
7365 (sha256
7366 (base32
7367 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7368 (build-system python-build-system)
6a5c710c
LF
7369 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7370 (synopsis "Message identifiers for internationalization")
7371 (description "Zope.i18nmessageid provides facilities for declaring
7372internationalized messages within program source text.")
3f641af0 7373 (license license:zpl2.1)))
6a5c710c
LF
7374
7375(define-public python2-zope-i18nmessageid
7376 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7377
7378(define-public python-zope-schema
7379 (package
7380 (name "python-zope-schema")
7381 (version "4.4.2")
7382 (source
7383 (origin
7384 (method url-fetch)
7385 (uri (string-append "https://pypi.python.org/packages/source/z"
7386 "/zope.schema/zope.schema-" version ".tar.gz"))
7387 (sha256
7388 (base32
7389 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7390 (build-system python-build-system)
22dba2ef
MB
7391 (arguments
7392 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
71fb09f3
LF
7393 (propagated-inputs
7394 `(("python-zope-event" ,python-zope-event)
2b9e4bea 7395 ("python-zope-exceptions", python-zope-exceptions)
71fb09f3
LF
7396 ("python-zope-interface" ,python-zope-interface)))
7397 (native-inputs
47f77210
HG
7398 `(("python-zope-testing" ,python-zope-testing)
7399 ("python-coverage" ,python-coverage)
7400 ("python-nose" ,python-nose)))
71fb09f3
LF
7401 (home-page "http://pypi.python.org/pypi/zope.schema")
7402 (synopsis "Zope data schemas")
7403 (description "Zope.scheme provides extensions to zope.interface for
7404defining data schemas.")
3f641af0 7405 (license license:zpl2.1)))
71fb09f3
LF
7406
7407(define-public python2-zope-schema
7408 (package-with-python2 python-zope-schema))
fbac9b17
LF
7409
7410(define-public python-zope-configuration
7411 (package
7412 (name "python-zope-configuration")
7413 (version "4.0.3")
7414 (source (origin
7415 (method url-fetch)
7416 (uri (string-append "https://pypi.python.org/packages/source/z"
7417 "/zope.configuration/zope.configuration-"
7418 version ".tar.gz"))
7419 (sha256
7420 (base32
7421 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7422 (build-system python-build-system)
7e8b1bfa
MB
7423 (arguments
7424 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
fbac9b17
LF
7425 (propagated-inputs
7426 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7427 ("python-zope-schema" ,python-zope-schema)))
7428 (home-page "http://pypi.python.org/pypi/zope.configuration")
7429 (synopsis "Zope Configuration Markup Language")
7430 (description "Zope.configuration implements ZCML, the Zope Configuration
7431Markup Language.")
3f641af0 7432 (license license:zpl2.1)))
fbac9b17
LF
7433
7434(define-public python2-zope-configuration
7435 (package-with-python2 python-zope-configuration))
2ad52086
LF
7436
7437(define-public python-zope-proxy
7438 (package
7439 (name "python-zope-proxy")
7440 (version "4.1.6")
7441 (source
7442 (origin
7443 (method url-fetch)
7444 (uri (string-append "https://pypi.python.org/packages/source/z"
7445 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7446 (sha256
7447 (base32
7448 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7449 (build-system python-build-system)
66b3aadb
MB
7450 (arguments
7451 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
2ad52086
LF
7452 (propagated-inputs
7453 `(("python-zope-interface" ,python-zope-interface)))
7454 (home-page "http://pypi.python.org/pypi/zope.proxy")
7455 (synopsis "Generic, transparent proxies")
7456 (description "Zope.proxy provides generic, transparent proxies for Python.
7457Proxies are special objects which serve as mostly-transparent wrappers around
7458another object, intervening in the apparent behavior of the wrapped object
7459only when necessary to apply the policy (e.g., access checking, location
7460brokering, etc.) for which the proxy is responsible.")
3f641af0 7461 (license license:zpl2.1)))
2ad52086
LF
7462
7463(define-public python2-zope-proxy
7464 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7465
7466(define-public python-zope-location
7467 (package
7468 (name "python-zope-location")
7469 (version "4.0.3")
7470 (source
7471 (origin
7472 (method url-fetch)
7473 (uri (string-append "https://pypi.python.org/packages/source/z"
7474 "/zope.location/zope.location-" version ".tar.gz"))
7475 (sha256
7476 (base32
7477 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7478 (build-system python-build-system)
40bb8e07
MB
7479 (arguments
7480 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
d27f176a 7481 (propagated-inputs
f404b5ea
LF
7482 `(("python-zope-proxy" ,python-zope-proxy)
7483 ("python-zope-schema" ,python-zope-schema)))
7484 (home-page "http://pypi.python.org/pypi/zope.location/")
7485 (synopsis "Zope location library")
7486 (description "Zope.location implements the concept of \"locations\" in
7487Zope3, which are are special objects that have a structural location.")
3f641af0 7488 (license license:zpl2.1)))
f404b5ea
LF
7489
7490(define-public python2-zope-location
7491 (package-with-python2 python-zope-location))
d4b77f36
LF
7492
7493(define-public python-zope-security
7494 (package
7495 (name "python-zope-security")
7496 (version "4.0.3")
7497 (source
7498 (origin
7499 (method url-fetch)
7500 (uri (string-append "https://pypi.python.org/packages/source/z"
7501 "/zope.security/zope.security-" version ".tar.gz"))
7502 (sha256
7503 (base32
7504 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7505 (build-system python-build-system)
a74f9b12
MB
7506 (arguments
7507 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
d4b77f36
LF
7508 (propagated-inputs
7509 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 7510 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7 7511 ("python-zope-schema" ,python-zope-schema)))
a74f9b12
MB
7512 (native-inputs
7513 `(("python-six" ,python-six)
7514 ("python-zope-component" ,python-zope-component)
fd8e23b7
HG
7515 ("python-zope-configuration" ,python-zope-configuration)
7516 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
7517 ("python-zope-testrunner" ,python-zope-testrunner)
7518 ("python-zope-testing" ,python-zope-testing)))
7519 (home-page "http://pypi.python.org/pypi/zope.security")
7520 (synopsis "Zope security framework")
7521 (description "Zope.security provides a generic mechanism to implement
7522security policies on Python objects.")
3f641af0 7523 (license license:zpl2.1)))
d4b77f36
LF
7524
7525(define-public python2-zope-security
04417662
EF
7526 (let ((zope-security (package-with-python2 python-zope-security)))
7527 (package (inherit zope-security)
7528 (propagated-inputs
7529 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7530 ,@(alist-delete
7531 "python-zope-testrunner"
7532 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7533
7534(define-public python-zope-component
7535 (package
7536 (name "python-zope-component")
7537 (version "4.2.2")
7538 (source
7539 (origin
7540 (method url-fetch)
7541 (uri (string-append "https://pypi.python.org/packages/source/z"
7542 "/zope.component/zope.component-" version ".tar.gz"))
7543 (sha256
7544 (base32
7545 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7546 (build-system python-build-system)
7547 (arguments
7548 ;; Skip tests due to circular dependency with python-zope-security.
7549 '(#:tests? #f))
7550 (native-inputs
7551 `(("python-zope-testing" ,python-zope-testing)))
7552 (propagated-inputs
7553 `(("python-zope-event" ,python-zope-event)
7554 ("python-zope-interface" ,python-zope-interface)
7555 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7556 ("python-zope-configuration" ,python-zope-configuration)))
7557 (home-page "https://github.com/zopefoundation/zope.component")
7558 (synopsis "Zope Component Architecture")
7559 (description "Zope.component represents the core of the Zope Component
7560Architecture. Together with the zope.interface package, it provides
7561facilities for defining, registering and looking up components.")
3f641af0 7562 (license license:zpl2.1)))
a6b61b27
LF
7563
7564(define-public python2-zope-component
7565 (package-with-python2 python-zope-component))
3859ac12 7566
1ae44b80 7567(define-public python-pythondialog
b5f218be 7568 (package
1ae44b80 7569 (name "python-pythondialog")
42c4b246 7570 (version "3.4.0")
b5f218be
LF
7571 (source
7572 (origin
7573 (method url-fetch)
1ae44b80 7574 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7575 (sha256
7576 (base32
1ae44b80 7577 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7578 (build-system python-build-system)
7579 (arguments
7580 `(#:phases
7581 (modify-phases %standard-phases
7582 (add-after 'unpack 'patch-path
7583 (lambda* (#:key inputs #:allow-other-keys)
7584 (let* ((dialog (assoc-ref inputs "dialog")))
7585 ;; Since this library really wants to grovel the search path, we
7586 ;; must hardcode dialog's store path into it.
7587 (substitute* "dialog.py"
7588 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7589 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7590 #t))))
b5f218be
LF
7591 #:tests? #f)) ; no test suite
7592 (propagated-inputs
7593 `(("dialog" ,dialog)))
7594 (home-page "http://pythondialog.sourceforge.net/")
7595 (synopsis "Python interface to the UNIX dialog utility")
7596 (description "A Python wrapper for the dialog utility. Its purpose is to
7597provide an easy to use, pythonic and comprehensive Python interface to dialog.
7598This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7599 (license license:lgpl2.1)
1ae44b80
LF
7600 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7601
7602(define-public python2-pythondialog
7603 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7604 (package
7605 (inherit base)
7606 (version (package-version python-pythondialog))
7607 (source (origin
7608 (method url-fetch)
7609 (uri (pypi-uri "python2-pythondialog" version))
7610 (sha256
7611 (base32
7612 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7613
3859ac12
LF
7614(define-public python-pyrfc3339
7615 (package
7616 (name "python-pyrfc3339")
d9aa097b 7617 (version "1.0")
3859ac12
LF
7618 (source
7619 (origin
7620 (method url-fetch)
d9aa097b 7621 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7622 (sha256
7623 (base32
d9aa097b 7624 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7625 (build-system python-build-system)
7626 (propagated-inputs
7627 `(("python-pytz" ,python-pytz)))
7628 (native-inputs
f3b98f4f 7629 `(("python-nose" ,python-nose)))
3859ac12
LF
7630 (home-page "https://github.com/kurtraschke/pyRFC3339")
7631 (synopsis "Python timestamp library")
7632 (description "Python library for generating and parsing RFC 3339-compliant
7633timestamps.")
7634 (license license:expat)))
7635
7636(define-public python2-pyrfc3339
7637 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7638
7639(define-public python-werkzeug
7640 (package
7641 (name "python-werkzeug")
0580e383 7642 (version "0.11.11")
5eea2005
LF
7643 (source
7644 (origin
7645 (method url-fetch)
4b47cbfa 7646 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7647 (sha256
7648 (base32
0580e383 7649 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7650 (build-system python-build-system)
7651 (native-inputs
7652 `(("python-pytest" ,python-pytest)))
7653 (home-page "http://werkzeug.pocoo.org/")
7654 (synopsis "Utilities for WSGI applications")
7655 (description "One of the most advanced WSGI utility modules. It includes a
7656powerful debugger, full-featured request and response objects, HTTP utilities to
7657handle entity tags, cache control headers, HTTP dates, cookie handling, file
7658uploads, a powerful URL routing system and a bunch of community-contributed
7659addon modules.")
3f641af0 7660 (license license:x11)))
5eea2005
LF
7661
7662(define-public python2-werkzeug
7663 (package-with-python2 python-werkzeug))
99fffa8a
LF
7664
7665(define-public python-configobj
7666 (package
7667 (name "python-configobj")
7668 (version "5.0.6")
7669 (source (origin
7670 (method url-fetch)
7671 (uri (string-append
7672 "https://pypi.python.org/packages/source/c/configobj/"
7673 "configobj-" version ".tar.gz"))
7674 (sha256
7675 (base32
7676 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7677 ;; Patch setup.py so it looks for python-setuptools, which is
7678 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7679 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 7680 (build-system python-build-system)
861f70c9 7681 (propagated-inputs
f3b98f4f 7682 `(("python-six" ,python-six)))
99fffa8a
LF
7683 (synopsis "Config file reading, writing and validation")
7684 (description "ConfigObj is a simple but powerful config file reader and
7685writer: an ini file round tripper. Its main feature is that it is very easy to
7686use, with a straightforward programmer’s interface and a simple syntax for
7687config files.")
7688 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7689 (license license:bsd-3)))
99fffa8a
LF
7690
7691(define-public python2-configobj
7692 (package-with-python2 python-configobj))
79e8a291
LF
7693
7694(define-public python-configargparse
7695 (package
7696 (name "python-configargparse")
7697 (version "0.10.0")
7698 (source (origin
7699 (method url-fetch)
7700 (uri (string-append
7701 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7702 "ConfigArgParse-" version ".tar.gz"))
7703 (sha256
7704 (base32
7705 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7706 (build-system python-build-system)
7707 (arguments
7708 ;; FIXME: Bug in test suite filed upstream:
7709 ;; https://github.com/bw2/ConfigArgParse/issues/32
7710 '(#:tests? #f))
7711 (synopsis "Replacement for argparse")
7712 (description "A drop-in replacement for argparse that allows options to also
7713be set via config files and/or environment variables.")
7714 (home-page "https://github.com/bw2/ConfigArgParse")
7715 (license license:expat)))
7716
7717(define-public python2-configargparse
7718 (package-with-python2 python-configargparse))
ab41f979
LF
7719
7720(define-public python-ndg-httpsclient
7721 (package
7722 (name "python-ndg-httpsclient")
7723 (version "0.4.0")
7724 (source (origin
7725 (method url-fetch)
7726 (uri (string-append
7727 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7728 "ndg_httpsclient-" version ".tar.gz"))
7729 (sha256
7730 (base32
7731 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7732 (build-system python-build-system)
a39cc016
LF
7733 (arguments
7734 '(;; The tests appear to require networking.
7735 #:tests? #f))
ab41f979
LF
7736 (propagated-inputs
7737 `(("python-pyopenssl" ,python-pyopenssl)))
7738 (synopsis "HTTPS support for Python's httplib and urllib2")
7739 (description "This is a HTTPS client implementation for httplib and urllib2
7740based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7741over the default provided with Python and importantly enables full verification
7742of the SSL peer.")
7743 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7744 (license license:bsd-3)))
ab41f979
LF
7745
7746;; python2-openssl requires special care, so package-with-python2 is
7747;; insufficient.
7748(define-public python2-ndg-httpsclient
7749 (package (inherit python-ndg-httpsclient)
7750 (name "python2-ndg-httpsclient")
7751 (arguments `(#:python ,python-2))
7752 (propagated-inputs
7753 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7754
7755(define-public python-contextlib2
7756 (package
7757 (name "python-contextlib2")
7758 (version "0.4.0")
7759 (source
7760 (origin
7761 (method url-fetch)
7762 (uri (pypi-uri "contextlib2" version))
7763 (sha256
7764 (base32
7765 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7766 (build-system python-build-system)
7767 (arguments
7768 `(#:phases
7769 (modify-phases %standard-phases
7770 (replace 'check
7771 (lambda _ (zero?
7772 (system*
b3546174 7773 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7774 (home-page "http://contextlib2.readthedocs.org/")
7775 (synopsis "Tools for decorators and context managers")
7776 (description "This module is primarily a backport of the Python
77773.2 contextlib to earlier Python versions. Like contextlib, it
7778provides utilities for common tasks involving decorators and context
7779managers. It also contains additional features that are not part of
7780the standard library.")
3f641af0 7781 (license license:psfl)))
03f964a5
CM
7782
7783(define-public python2-contextlib2
7784 (package-with-python2 python-contextlib2))
210bf497
DT
7785
7786(define-public python-texttable
7787 (package
7788 (name "python-texttable")
7789 (version "0.8.4")
7790 (source
7791 (origin
7792 (method url-fetch)
7793 (uri (pypi-uri "texttable" version))
7794 (sha256
7795 (base32
7796 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7797 (build-system python-build-system)
7798 (arguments '(#:tests? #f)) ; no tests
7799 (home-page "https://github.com/foutaise/texttable/")
7800 (synopsis "Python module for creating simple ASCII tables")
7801 (description "Texttable is a Python module for creating simple ASCII
7802tables.")
3f641af0 7803 (license license:lgpl2.1+)))
210bf497
DT
7804
7805(define-public python2-texttable
7806 (package-with-python2 python-texttable))
67c52bb3
DT
7807
7808(define-public python-websocket-client
7809 (package
7810 (name "python-websocket-client")
6b810897 7811 (version "0.37.0")
67c52bb3
DT
7812 (source
7813 (origin
7814 (method url-fetch)
6b810897 7815 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7816 (sha256
7817 (base32
6b810897 7818 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 7819 (build-system python-build-system)
a5333f7c
HG
7820 (propagated-inputs
7821 `(("python-six" ,python-six)))
67c52bb3
DT
7822 (home-page "https://github.com/liris/websocket-client")
7823 (synopsis "WebSocket client for Python")
7824 (description "The Websocket-client module provides the low level APIs for
7825WebSocket usage in Python programs.")
3f641af0 7826 (license license:lgpl2.1+)))
67c52bb3
DT
7827
7828(define-public python2-websocket-client
7829 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7830
7831(define-public python-atomicwrites
7832 (package
7833 (name "python-atomicwrites")
4e92d76a 7834 (version "1.1.0")
5c6eea2a
LF
7835 (source (origin
7836 (method url-fetch)
7837 (uri (pypi-uri "atomicwrites" version))
7838 (sha256
7839 (base32
4e92d76a 7840 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7841 (build-system python-build-system)
7842 (synopsis "Atomic file writes in Python")
7843 (description "Library for atomic file writes using platform dependent tools
8f65585b 7844for atomic file system operations.")
5c6eea2a 7845 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 7846 (license license:expat)))
9bb6d184
LF
7847
7848(define-public python2-atomicwrites
f210e944 7849 (package-with-python2 python-atomicwrites))
561bb3cb
LF
7850
7851(define-public python-requests-toolbelt
7852 (package
7853 (name "python-requests-toolbelt")
c02af1c8 7854 (version "0.6.2")
561bb3cb
LF
7855 (source (origin
7856 (method url-fetch)
c02af1c8
LF
7857 (uri (string-append
7858 "https://pypi.python.org/packages/"
7859 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7860 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7861 (sha256
7862 (base32
c02af1c8 7863 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 7864 (build-system python-build-system)
759aadd4
LF
7865 (native-inputs
7866 `(("python-betamax" ,python-betamax)
7867 ("python-mock" ,python-mock)
7868 ("python-pytest" ,python-pytest)))
561bb3cb
LF
7869 (propagated-inputs
7870 `(("python-requests" ,python-requests)))
7871 (synopsis "Extensions to python-requests")
7872 (description "This is a toolbelt of useful classes and functions to be used
7873with python-requests.")
7874 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7875 (license license:asl2.0)))
d1deb90b
LF
7876
7877(define-public python-click-threading
7878 (package
7879 (name "python-click-threading")
3d2e0dbc 7880 (version "0.2.0")
d1deb90b
LF
7881 (source (origin
7882 (method url-fetch)
3d2e0dbc
LF
7883 (uri (string-append
7884 "https://pypi.python.org/packages/"
7885 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7886 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7887 (sha256
7888 (base32
3d2e0dbc 7889 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7890 (build-system python-build-system)
7891 (propagated-inputs
7892 `(("python-click" ,python-click)))
7893 (synopsis "Utilities for multithreading in Click")
7894 (description "This package provides utilities for multithreading in Click
7895applications.")
7896 (home-page "https://github.com/click-contrib/click-threading")
7897 (license license:expat)))
7b17cab9
LF
7898
7899(define-public python-click-log
7900 (package
7901 (name "python-click-log")
a9da8fec 7902 (version "0.1.3")
7b17cab9
LF
7903 (source (origin
7904 (method url-fetch)
7905 (uri (pypi-uri "click-log" version))
7906 (sha256
7907 (base32
a9da8fec 7908 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7909 (build-system python-build-system)
7910 (propagated-inputs
7911 `(("python-click" ,python-click)))
7912 (synopsis "Logging for click applications")
7913 (description "This package provides a Python library for logging Click
7914applications.")
7915 (home-page "https://github.com/click-contrib/click-log")
7916 (license license:expat)))
7b3a4ee4
LF
7917
7918(define-public python-apipkg
7919 (package
7920 (name "python-apipkg")
7921 (version "1.4")
7922 (source (origin
7923 (method url-fetch)
7924 (uri (pypi-uri "apipkg" version))
7925 (sha256
7926 (base32
7927 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7928 (build-system python-build-system)
328bb95d 7929 (native-inputs
7b3a4ee4
LF
7930 `(("python-pytest" ,python-pytest)))
7931 (synopsis "Namespace control and lazy-import mechanism")
7932 (description "With apipkg you can control the exported namespace of a Python
7933package and greatly reduce the number of imports for your users. It is a small
7934pure Python module that works on virtually all Python versions.")
7935 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 7936 (license license:expat)))
e08739c3
CAW
7937
7938(define-public python2-apipkg
f210e944 7939 (package-with-python2 python-apipkg))
848964fe
LF
7940
7941(define-public python-execnet
7942 (package
7943 (name "python-execnet")
7944 (version "1.4.1")
7945 (source (origin
7946 (method url-fetch)
7947 (uri (pypi-uri "execnet" version))
7948 (sha256
7949 (base32
7950 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7951 (build-system python-build-system)
ca0eee9d
LF
7952 (arguments
7953 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7954 ;; The two test failures are caused by the lack of an `ssh` executable.
7955 ;; The test suite can be run with pytest after the 'install' phase.
7956 #:tests? #f))
848964fe 7957 (native-inputs
ca0eee9d
LF
7958 `(("python-pytest" ,python-pytest)
7959 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 7960 (propagated-inputs
848964fe
LF
7961 `(("python-apipkg" ,python-apipkg)))
7962 (synopsis "Rapid multi-Python deployment")
7963 (description "Execnet provides a share-nothing model with
7964channel-send/receive communication for distributing execution across many
7965Python interpreters across version, platform and network barriers. It has a
7966minimal and fast API targetting the following uses:
7967@enumerate
7968@item distribute tasks to (many) local or remote CPUs
7969@item write and deploy hybrid multi-process applications
7970@item write scripts to administer multiple environments
7971@end enumerate")
7972 (home-page "http://codespeak.net/execnet/")
f210e944 7973 (license license:expat)))
16c84f90
CAW
7974
7975(define-public python2-execnet
f210e944 7976 (package-with-python2 python-execnet))
6720dbb4
LF
7977
7978;;; The software provided by this package was integrated into pytest 2.8.
7979(define-public python-pytest-cache
7980 (package
7981 (name "python-pytest-cache")
7982 (version "1.0")
7983 (source (origin
7984 (method url-fetch)
7985 (uri (pypi-uri "pytest-cache" version))
7986 (sha256
7987 (base32
7988 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7989 (build-system python-build-system)
f22efa01 7990 (propagated-inputs
630d938f
EF
7991 `(("python-apipkg" ,python-apipkg)
7992 ("python-execnet" ,python-execnet)
7993 ("python-py" ,python-py)
7994 ("python-pytest" ,python-pytest)))
6720dbb4
LF
7995 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7996 (description "The pytest-cache plugin provides tools to rerun failures from
7997the last py.test invocation.")
7998 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 7999 (license license:expat)))
0adc21c2
EF
8000
8001(define-public python2-pytest-cache
f210e944 8002 (package-with-python2 python-pytest-cache))
d7e729fe
LF
8003
8004(define-public python-pytest-localserver
8005 (package
8006 (name "python-pytest-localserver")
29f20168 8007 (version "0.3.5")
d7e729fe
LF
8008 (source (origin
8009 (method url-fetch)
29f20168 8010 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
8011 (sha256
8012 (base32
29f20168 8013 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
8014 (build-system python-build-system)
8015 (arguments
8016 `(#:phases (modify-phases %standard-phases
8017 (replace 'check
8018 (lambda _
8019 (zero? (system* "py.test" "--genscript=runtests.py"))
8020 (zero? (system* "py.test")))))))
8021 (native-inputs
d7e729fe
LF
8022 `(("python-pytest" ,python-pytest)
8023 ("python-requests" ,python-requests)
9ba40f05 8024 ("python-six" ,python-six)))
f22efa01 8025 (propagated-inputs
9ba40f05 8026 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
8027 (synopsis "Py.test plugin to test server connections locally")
8028 (description "Pytest-localserver is a plugin for the pytest testing
8029framework which enables you to test server connections locally.")
8030 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8031 (license license:expat)))
28cecbb7
LF
8032
8033(define-public python-wsgi-intercept
8034 (package
8035 (name "python-wsgi-intercept")
909fbd2b 8036 (version "1.2.2")
28cecbb7
LF
8037 (source (origin
8038 (method url-fetch)
909fbd2b
LF
8039 (uri (string-append
8040 "https://pypi.python.org/packages/"
8041 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8042 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
8043 (sha256
8044 (base32
909fbd2b 8045 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 8046 (build-system python-build-system)
b9fc496f
HG
8047 (propagated-inputs
8048 `(("python-six" ,python-six)))
28cecbb7 8049 (native-inputs
9d813ec1 8050 `(("python-pytest" ,python-pytest)
b9fc496f
HG
8051 ("python-httplib2" ,python-httplib2)
8052 ("python-requests" ,python-requests)
8757f050 8053 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
8054 (synopsis "Puts a WSGI application in place of a real URI for testing")
8055 (description "Wsgi_intercept installs a WSGI application in place of a real
8056URI for testing. Testing a WSGI application normally involves starting a
8057server at a local host and port, then pointing your test code to that address.
8058Instead, this library lets you intercept calls to any specific host/port
8059combination and redirect them into a WSGI application importable by your test
8060program. Thus, you can avoid spawning multiple processes or threads to test
8061your Web app.")
8062 (home-page "https://github.com/cdent/wsgi-intercept")
8063 (license license:expat)))
89b8a551
LF
8064
8065(define-public python-pytest-xprocess
8066 (package
8067 (name "python-pytest-xprocess")
8068 (version "0.9.1")
8069 (source (origin
8070 (method url-fetch)
8071 (uri (pypi-uri "pytest-xprocess" version))
8072 (sha256
8073 (base32
8074 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8075 (build-system python-build-system)
8076 (propagated-inputs
8077 `(("python-pytest" ,python-pytest)
8078 ("python-pytest-cache" ,python-pytest-cache)
8079 ("python-psutil" ,python-psutil)))
8080 (synopsis "Pytest plugin to manage external processes across test runs")
8081 (description "Pytest-xprocess is an experimental py.test plugin for managing
8082processes across test runs.")
8083 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8084 (license license:expat)))
5c299bf0
LF
8085
8086(define-public python-icalendar
8087 (package
8088 (name "python-icalendar")
25291aca 8089 (version "3.11")
5c299bf0
LF
8090 (source (origin
8091 (method url-fetch)
8092 (uri (pypi-uri "icalendar" version))
8093 (sha256
8094 (base32
25291aca 8095 "01v2f3swd5s72x65cdihw83dx1z799b4i49a6ncg7vqmcm20wapd"))))
5c299bf0
LF
8096 (build-system python-build-system)
8097 (propagated-inputs
8098 `(("python-dateutil-2" ,python-dateutil-2)
8099 ("python-pytz" ,python-pytz)))
8100 (synopsis "Python library for parsing iCalendar files")
8101 (description "The icalendar package is a parser/generator of iCalendar
8102files for use with Python.")
8103 (home-page "https://github.com/collective/icalendar")
3f641af0 8104 (license license:bsd-2)))
6bbbb53e
LF
8105
8106(define-public python-sphinxcontrib-newsfeed
8107 (package
8108 (name "python-sphinxcontrib-newsfeed")
8109 (version "0.1.4")
8110 (source (origin
8111 (method url-fetch)
8112 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8113 (sha256
8114 (base32
8115 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8116 (build-system python-build-system)
8117 (propagated-inputs
251ed7f2 8118 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8119 (synopsis "News Feed extension for Sphinx")
8120 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8121Blog, News or Announcements section to a Sphinx website.")
8122 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8123 (license license:bsd-2)))
2216e15c
SB
8124
8125(define-public python-args
8126 (package
8127 (name "python-args")
8128 (version "0.1.0")
8129 (source (origin
8130 (method url-fetch)
8131 (uri (pypi-uri "args" version))
8132 (sha256
8133 (base32
8134 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8135 (build-system python-build-system)
2216e15c
SB
8136 (home-page "https://github.com/kennethreitz/args")
8137 (synopsis "Command-line argument parser")
8138 (description
8139 "This library provides a Python module to parse command-line arguments.")
3f641af0 8140 (license license:bsd-3)))
2216e15c
SB
8141
8142(define-public python2-args
8143 (package-with-python2 python-args))
c06a3de9
SB
8144
8145(define-public python-clint
8146 (package
8147 (name "python-clint")
8148 (version "0.5.1")
8149 (source (origin
8150 (method url-fetch)
8151 (uri (pypi-uri "clint" version))
8152 (sha256
8153 (base32
8154 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8155 (build-system python-build-system)
6145b604
MB
8156 (arguments
8157 '(#:phases
8158 (modify-phases %standard-phases
8159 (replace 'check
8160 (lambda _
8161 (zero? (system* "py.test" "-v")))))))
8162 (native-inputs
8163 `(("python-pytest" ,python-pytest)))
f22efa01 8164 (propagated-inputs
f3b98f4f 8165 `(("python-args" ,python-args)))
c06a3de9
SB
8166 (home-page "https://github.com/kennethreitz/clint")
8167 (synopsis "Command-line interface tools")
8168 (description
8169 "Clint is a Python module filled with a set of tools for developing
8170command-line applications, including tools for colored and indented
8171output, progress bar display, and pipes.")
3f641af0 8172 (license license:isc)))
c06a3de9
SB
8173
8174(define-public python2-clint
8175 (package-with-python2 python-clint))
4ecdeef8
SB
8176
8177(define-public python-astor
8178 (package
8179 (name "python-astor")
8180 (version "0.5")
8181 (source (origin
8182 (method url-fetch)
8183 (uri (pypi-uri "astor" version))
8184 (sha256
8185 (base32
8186 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8187 (build-system python-build-system)
4ecdeef8
SB
8188 (home-page "https://github.com/berkerpeksag/astor")
8189 (synopsis "Read and write Python ASTs")
8190 (description
8191 "Astor is designed to allow easy manipulation of Python source via the
8192Abstract Syntax Tree.")
3f641af0 8193 (license license:bsd-3)))
4ecdeef8
SB
8194
8195(define-public python2-astor
8196 (package-with-python2 python-astor))
e224b7d0
SB
8197
8198(define-public python-rply
8199 (package
8200 (name "python-rply")
8201 (version "0.7.4")
8202 (source (origin
8203 (method url-fetch)
8204 (uri (pypi-uri "rply" version))
8205 (sha256
8206 (base32
8207 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8208 (build-system python-build-system)
f22efa01 8209 (propagated-inputs
f3b98f4f 8210 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
8211 (home-page "https://github.com/alex/rply")
8212 (synopsis "Parser generator for Python")
8213 (description
8214 "This package provides a pure Python based parser generator, that also
8215works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8216with a new public API, and RPython support.")
3f641af0 8217 (license license:bsd-3)))
e224b7d0
SB
8218
8219(define-public python2-rply
8220 (package-with-python2 python-rply))
c3e919d7
SB
8221
8222(define-public python-hy
8223 (package
8224 (name "python-hy")
8225 (version "0.11.1")
8226 (source (origin
8227 (method url-fetch)
8228 (uri (pypi-uri "hy" version))
8229 (sha256
8230 (base32
8231 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8232 (build-system python-build-system)
f22efa01 8233 (propagated-inputs
c3e919d7
SB
8234 `(("python-astor" ,python-astor)
8235 ("python-clint" ,python-clint)
f3b98f4f 8236 ("python-rply" ,python-rply)))
c3e919d7
SB
8237 (home-page "http://hylang.org/")
8238 (synopsis "Lisp frontend to Python")
8239 (description
8240 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8241its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8242Python at your fingertips, in Lisp form.")
8243 (license license:expat)))
8244
8245(define-public python2-hy
8246 (package-with-python2 python-hy))
7a5b944e 8247
81f7f297
EF
8248(define-public python-rauth
8249 (package
8250 (name "python-rauth")
8251 (version "0.7.2")
8252 (source
8253 (origin
8254 (method url-fetch)
8255 (uri (pypi-uri "rauth" version))
8256 (sha256
8257 (base32
8258 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8259 (build-system python-build-system)
8260 (arguments
8261 `(#:test-target "check"))
f22efa01 8262 (propagated-inputs
81f7f297
EF
8263 `(("python-requests" ,python-requests)))
8264 (home-page "https://github.com/litl/rauth")
8265 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8266 (description
8267 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8268provides service wrappers for convenient connection initialization and
8269authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8270 (license license:expat)
8271 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8272
8273(define-public python2-rauth
0848d8d3
EF
8274 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8275 (package
8276 (inherit base)
00e10c6e 8277 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 8278 ,@(package-native-inputs base))))))
81f7f297 8279
1abe448d
EF
8280(define-public python2-functools32
8281 (package
8282 (name "python2-functools32")
8283 (version "3.2.3-2")
8284 (source
8285 (origin
8286 (method url-fetch)
8287 (uri (pypi-uri "functools32" version))
8288 (sha256
8289 (base32
8290 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8291 (build-system python-build-system)
8292 (arguments
8293 `(#:python ,python-2
8294 #:tests? #f)) ; no test target
1abe448d
EF
8295 (home-page "https://github.com/MiCHiLU/python-functools32")
8296 (synopsis
8297 "Backport of the functools module from Python 3.2.3")
8298 (description
8299 "This package is a backport of the @code{functools} module from Python
83003.2.3 for use with older versions of Python and PyPy.")
8301 (license license:expat)))
8302
877889f3 8303(define-public python2-futures
7a5b944e 8304 (package
877889f3 8305 (name "python2-futures")
7a5b944e
EF
8306 (version "3.0.3")
8307 (source
8308 (origin
8309 (method url-fetch)
8310 (uri (pypi-uri "futures" version))
8311 (sha256
8312 (base32
8313 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8314 (build-system python-build-system)
877889f3 8315 (arguments `(#:python ,python-2))
7a5b944e
EF
8316 (home-page "https://github.com/agronholm/pythonfutures")
8317 (synopsis
8318 "Backport of the concurrent.futures package from Python 3.2")
8319 (description
8320 "The concurrent.futures module provides a high-level interface for
8321asynchronously executing callables. This package backports the
8322concurrent.futures package from Python 3.2")
3f641af0 8323 (license license:bsd-3)))
7a5b944e 8324
5cb2fe44
EF
8325(define-public python-promise
8326 (package
8327 (name "python-promise")
8328 (version "0.4.2")
8329 (source
8330 (origin
8331 (method url-fetch)
8332 (uri (pypi-uri "promise" version))
8333 (sha256
8334 (base32
8335 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8336 (build-system python-build-system)
8337 ;; Tests wants python-futures, which is a python2 only program, and
8338 ;; can't be found by python-promise at test time.
8339 (arguments `(#:tests? #f))
8340 (home-page "https://github.com/syrusakbary/promise")
8341 (synopsis "Promises/A+ implementation for Python")
8342 (description
8343 "Promises/A+ implementation for Python")
8344 (properties `((python2-variant . ,(delay python2-promise))))
8345 (license license:expat)))
8346
8347(define-public python2-promise
8348 (let ((promise (package-with-python2
8349 (strip-python2-variant python-promise))))
8350 (package (inherit promise)
8351 (arguments (substitute-keyword-arguments (package-arguments promise)
8352 ((#:tests? _) #t)))
8353 (native-inputs
8354 `(("python2-futures" ,python2-futures)
8355 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
8356 ,@(package-native-inputs promise))))))
8357
c18f6368
EF
8358(define-public python-urllib3
8359 (package
8360 (name "python-urllib3")
6178274d 8361 (version "1.18.1")
c18f6368
EF
8362 (source
8363 (origin
8364 (method url-fetch)
8365 (uri (pypi-uri "urllib3" version))
8366 (sha256
8367 (base32
6178274d 8368 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8369 (build-system python-build-system)
8370 (arguments `(#:tests? #f))
8371 (native-inputs
f3b98f4f 8372 `(;; some packages for tests
c18f6368
EF
8373 ("python-nose" ,python-nose)
8374 ("python-mock" ,python-mock)
8375 ("python-tornado" ,python-tornado)))
8376 (propagated-inputs
8322749a 8377 `(;; extra packages for https security
c18f6368
EF
8378 ("python-certifi" ,python-certifi)
8379 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8380 ("python-pyasn1" ,python-pyasn1)
8381 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8382 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8383 (synopsis "HTTP library with thread-safe connection pooling")
8384 (description
8385 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8386can reuse the same socket connection for multiple requests, it can POST files,
8387supports url redirection and retries, and also gzip and deflate decoding.")
8388 (license license:expat)))
8389
8390(define-public python2-urllib3
8391 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8392
8393(define-public python-colorama
8394 (package
8395 (name "python-colorama")
8396 (version "0.3.3")
8397 (source
8398 (origin
8399 (method url-fetch)
8400 (uri (pypi-uri "colorama" version))
8401 (sha256
8402 (base32
8403 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8404 (build-system python-build-system)
2b2f2fc1
DT
8405 (synopsis "colored terminal text rendering for Python")
8406 (description "Colorama is a Python library for rendering colored terminal
8407text.")
8408 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8409 (license license:bsd-3)))
2b2f2fc1
DT
8410
8411(define-public python2-colorama
8412 (package-with-python2 python-colorama))
f5bcec6e
DT
8413
8414(define-public python-rsa
8415 (package
8416 (name "python-rsa")
ecd68c53 8417 (version "3.4.2")
f5bcec6e
DT
8418 (source
8419 (origin
8420 (method url-fetch)
8421 (uri (pypi-uri "rsa" version))
8422 (sha256
8423 (base32
ecd68c53 8424 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 8425 (build-system python-build-system)
f22efa01 8426 (propagated-inputs
f3b98f4f 8427 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
8428 (synopsis "Pure-Python RSA implementation")
8429 (description "Python-RSA is a pure-Python RSA implementation. It supports
8430encryption and decryption, signing and verifying signatures, and key
8431generation according to PKCS#1 version 1.5. It can be used as a Python
8432library as well as on the command line.")
8433 (home-page "http://stuvel.eu/rsa")
3f641af0 8434 (license license:asl2.0)))
f5bcec6e
DT
8435
8436(define-public python2-rsa
8437 (package-with-python2 python-rsa))
c0aacfa5
DT
8438
8439(define-public python-pluggy
8440 (package
8441 (name "python-pluggy")
8442 (version "0.3.1")
8443 (source
8444 (origin
8445 (method url-fetch)
8446 (uri (pypi-uri "pluggy" version))
8447 (sha256
8448 (base32
8449 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8450 (build-system python-build-system)
c0aacfa5
DT
8451 (synopsis "Plugin and hook calling mechanism for Python")
8452 (description "Pluggy is an extraction of the plugin manager as used by
8453Pytest but stripped of Pytest specific details.")
8454 (home-page "https://pypi.python.org/pypi/pluggy")
8455 (license license:expat)))
8456
8457(define-public python2-pluggy
8458 (package-with-python2 python-pluggy))
a4af21ca
DT
8459
8460(define-public python-tox
8461 (package
8462 (name "python-tox")
8463 (version "2.3.1")
8464 (source
8465 (origin
8466 (method url-fetch)
8467 (uri (pypi-uri "tox" version))
8468 (sha256
8469 (base32
8470 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8471 (build-system python-build-system)
8472 (arguments
7ba07edf
HG
8473 ;; FIXME: Tests require pytest-timeout, which itself requires
8474 ;; pytest>=2.8.0 for installation.
a4af21ca 8475 '(#:tests? #f))
482d9591
HG
8476 (propagated-inputs
8477 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 8478 ("python-py" ,python-py)
482d9591 8479 ("python-virtualenv" ,python-virtualenv)))
328bb95d 8480 (native-inputs
7ba07edf
HG
8481 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8482 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
8483 (home-page "http://tox.testrun.org/")
8484 (synopsis "Virtualenv-based automation of test activities")
8485 (description "Tox is a generic virtualenv management and test command line
8486tool. It can be used to check that a package installs correctly with
8487different Python versions and interpreters, or run tests in each type of
8488supported environment, or act as a frontend to continuous integration
8489servers.")
8490 (license license:expat)))
8491
8492(define-public python2-tox
8493 (package-with-python2 python-tox))
ba9da248
DT
8494
8495(define-public python-jmespath
8496 (package
8497 (name "python-jmespath")
8498 (version "0.9.0")
8499 (source
8500 (origin
8501 (method url-fetch)
8502 (uri (pypi-uri "jmespath" version))
8503 (sha256
8504 (base32
8505 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8506 (build-system python-build-system)
52a75a83
MB
8507 (native-inputs
8508 `(("python-nose" ,python-nose)))
ba9da248
DT
8509 (synopsis "JSON Matching Expressions")
8510 (description "JMESPath (pronounced “james path”) is a Python library that
8511allows one to declaratively specify how to extract elements from a JSON
8512document.")
8513 (home-page "https://github.com/jmespath/jmespath.py")
8514 (license license:expat)))
8515
8516(define-public python2-jmespath
8517 (package-with-python2 python-jmespath))
935fcd5c
DT
8518
8519(define-public python-botocore
8520 (package
8521 (name "python-botocore")
e09f952d 8522 (version "1.4.62")
935fcd5c
DT
8523 (source
8524 (origin
8525 (method url-fetch)
8526 (uri (pypi-uri "botocore" version))
8527 (sha256
8528 (base32
e09f952d 8529 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c 8530 (build-system python-build-system)
877fdac9
MB
8531 (arguments
8532 ;; FIXME: Many tests are failing.
8533 '(#:tests? #f))
482d9591 8534 (propagated-inputs
935fcd5c
DT
8535 `(("python-dateutil" ,python-dateutil-2)
8536 ("python-docutils" ,python-docutils)
482d9591 8537 ("python-jmespath" ,python-jmespath)))
8fa6890b 8538 (native-inputs
482d9591 8539 `(("python-mock" ,python-mock)
935fcd5c 8540 ("python-nose" ,python-nose)
482d9591 8541 ("behave" ,behave)
935fcd5c 8542 ("python-tox" ,python-tox)
482d9591 8543 ("python-wheel" ,python-wheel)))
935fcd5c
DT
8544 (home-page "https://github.com/boto/botocore")
8545 (synopsis "Low-level interface to AWS")
8546 (description "Botocore is a Python library that provides a low-level
8547interface to the Amazon Web Services (AWS) API.")
3f641af0 8548 (license license:asl2.0)))
935fcd5c
DT
8549
8550(define-public python2-botocore
8551 (package-with-python2 python-botocore))
f861b8b8
DT
8552
8553(define-public awscli
8554 (package
8555 (name "awscli")
d5ccf71e 8556 (version "1.11.5")
f861b8b8
DT
8557 (source
8558 (origin
8559 (method url-fetch)
d5ccf71e 8560 (uri (pypi-uri name version))
f861b8b8
DT
8561 (sha256
8562 (base32
d5ccf71e 8563 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8 8564 (build-system python-build-system)
482d9591 8565 (propagated-inputs
f861b8b8 8566 `(("python-colorama" ,python-colorama)
482d9591
HG
8567 ("python-botocore" ,python-botocore)
8568 ("python-s3transfer" ,python-s3transfer)
f861b8b8 8569 ("python-docutils" ,python-docutils)
482d9591 8570 ("python-rsa" ,python-rsa)))
d4649177 8571 (native-inputs
482d9591 8572 `(("python-mock" ,python-mock)
f861b8b8 8573 ("python-nose" ,python-nose)
f861b8b8
DT
8574 ("python-sphinx" ,python-sphinx)
8575 ("python-tox" ,python-tox)
482d9591 8576 ("python-wheel" ,python-wheel)))
f861b8b8
DT
8577 (home-page "http://aws.amazon.com/cli/")
8578 (synopsis "Command line client for AWS")
8579 (description "AWS CLI provides a unified command line interface to the
8580Amazon Web Services (AWS) API.")
3f641af0 8581 (license license:asl2.0)))
6a44697d
LF
8582
8583(define-public python-hypothesis
8584 (package
8585 (name "python-hypothesis")
bea6d94d 8586 (version "3.1.0")
6a44697d
LF
8587 (source (origin
8588 (method url-fetch)
8589 (uri (pypi-uri "hypothesis" version))
8590 (sha256
8591 (base32
bea6d94d 8592 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8593 (build-system python-build-system)
bd100c71 8594 (native-inputs
6a44697d
LF
8595 `(("python-flake8" ,python-flake8)
8596 ("python-pytest" ,python-pytest)))
8597 (synopsis "Library for property based testing")
8598 (description "Hypothesis is a library for testing your Python code against a
8599much larger range of examples than you would ever want to write by hand. It’s
8600based on the Haskell library, Quickcheck, and is designed to integrate
8601seamlessly into your existing Python unit testing work flow.")
8602 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8603 (license license:mpl2.0)
6f068e08 8604 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8605
8606(define-public python2-hypothesis
6f068e08
EF
8607 (let ((hypothesis (package-with-python2
8608 (strip-python2-variant python-hypothesis))))
8609 (package (inherit hypothesis)
8610 (native-inputs
bd100c71
MB
8611 `(("python2-enum34" ,python2-enum34)
8612 ,@(package-native-inputs hypothesis))))))
7517e73c
LF
8613
8614(define-public python-pytest-subtesthack
8615 (package
8616 (name "python-pytest-subtesthack")
8617 (version "0.1.1")
8618 (source (origin
8619 (method url-fetch)
8620 (uri (pypi-uri "pytest-subtesthack" version))
8621 (sha256
8622 (base32
8623 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8624 (build-system python-build-system)
7517e73c
LF
8625 (propagated-inputs
8626 `(("python-pytest" ,python-pytest)))
8627 (synopsis "Set-up and tear-down fixtures for unit tests")
8628 (description "This plugin allows you to set up and tear down fixtures within
8629unit test functions that use @code{py.test}. This is useful for using
8630@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8631function multiple times, without setting up or tearing down fixture state as is
8632normally the case.")
8633 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8634 (license license:unlicense)))
7517e73c
LF
8635
8636(define-public python2-pytest-subtesthack
8637 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8638
8639(define-public python2-xdo
8640 (package
8641 (name "python2-xdo")
8642 (version "0.2")
8643 (source (origin
8644 (method url-fetch)
8645 (uri (string-append
8646 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8647 "python-xdo_" version ".orig.tar.gz"))
8648 (sha256
8649 (base32
8650 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8651 (build-system python-build-system)
8652 (arguments
8653 `(#:python ,python-2
8654 #:tests? #f)) ; no tests provided
8655 (inputs
8656 `(("xdotool" ,xdotool)
8657 ("libX11" ,libx11)))
8658 (home-page "https://tracker.debian.org/pkg/python-xdo")
8659 (synopsis "Python library for simulating X11 keyboard/mouse input")
8660 (description "Provides bindings to libxdo for manipulating X11 via simulated
8661input. (Note that this is mostly a legacy library; you may wish to look at
8662python-xdo for newer bindings.)")
3f641af0 8663 (license license:bsd-3)))
0bdc1671 8664
cb34dc6c
CAW
8665(define-public python-wtforms
8666 (package
8667 (name "python-wtforms")
8668 (version "2.1")
8669 (source
8670 (origin
8671 (method url-fetch)
8672 (uri (pypi-uri "WTForms" version ".zip"))
8673 (sha256
8674 (base32
8675 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8676 (build-system python-build-system)
13c4d874
EF
8677 (arguments
8678 '(#:phases
8679 (modify-phases %standard-phases
8680 (add-after 'unpack 'remove-django-test
8681 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8682 (lambda _
8683 (substitute*
8684 "tests/runtests.py"
8685 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8686 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8687 #t)))))
cb34dc6c
CAW
8688 (native-inputs
8689 `(("unzip" ,unzip)))
8690 (home-page "http://wtforms.simplecodes.com/")
8691 (synopsis
8692 "Form validation and rendering library for Python web development")
8693 (description
8694 "WTForms is a flexible forms validation and rendering library
8695for Python web development. It is very similar to the web form API
8696available in Django, but is a standalone package.")
f210e944 8697 (license license:bsd-3)))
cb34dc6c
CAW
8698
8699(define-public python2-wtforms
f210e944 8700 (package-with-python2 python-wtforms))
50aaec25
DT
8701
8702(define-public python-mako
8703 (package
8704 (name "python-mako")
8705 (version "1.0.3")
8706 (source
8707 (origin
8708 (method url-fetch)
8709 (uri (pypi-uri "Mako" version))
8710 (sha256
8711 (base32
8712 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8713 (build-system python-build-system)
482d9591
HG
8714 (propagated-inputs
8715 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 8716 (native-inputs
482d9591 8717 `(("python-mock" ,python-mock)
50aaec25
DT
8718 ("python-nose" ,python-nose)))
8719 (home-page "http://www.makotemplates.org/")
8720 (synopsis "Templating language for Python")
8721 (description "Mako is a templating language for Python that compiles
8722templates into Python modules.")
f210e944 8723 (license license:expat)))
50aaec25
DT
8724
8725(define-public python2-mako
f210e944 8726 (package-with-python2 python-mako))
ae00a41f
CAW
8727
8728(define-public python-waitress
8729 (package
8730 (name "python-waitress")
8731 (version "0.8.10")
8732 (source
8733 (origin
8734 (method url-fetch)
8735 (uri (pypi-uri "waitress" version))
8736 (sha256
8737 (base32
8738 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8739 (build-system python-build-system)
8740 (home-page "https://github.com/Pylons/waitress")
8741 (synopsis "Waitress WSGI server")
8742 (description "Waitress is meant to be a production-quality pure-Python WSGI
8743server with very acceptable performance.")
f210e944 8744 (license license:zpl2.1)))
ae00a41f
CAW
8745
8746(define-public python2-waitress
f210e944 8747 (package-with-python2 python-waitress))
778a284b
CAW
8748
8749(define-public python-wsgiproxy2
8750 (package
8751 (name "python-wsgiproxy2")
8752 (version "0.4.2")
8753 (source
8754 (origin
8755 (method url-fetch)
8756 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8757 (sha256
8758 (base32
8759 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8760 (build-system python-build-system)
e359b31a
LF
8761 (arguments
8762 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8763 ;; support Python 3:
8764 ;; https://github.com/benoitc/restkit/issues/140
8765 #:tests? #f))
778a284b
CAW
8766 (native-inputs
8767 `(("unzip" ,unzip)
8768 ("python-nose" ,python-nose)
8769 ("python-coverage" ,python-coverage)))
8770 (propagated-inputs
8771 `(("python-six" ,python-six)
8772 ("python-webob" ,python-webob)))
8773 (home-page
8774 "https://github.com/gawel/WSGIProxy2/")
8775 (synopsis "WSGI Proxy with various http client backends")
8776 (description "WSGI turns HTTP requests into WSGI function calls.
8777WSGIProxy turns WSGI function calls into HTTP requests.
8778It also includes code to sign requests and pass private data,
8779and to spawn subprocesses to handle requests.")
f210e944 8780 (license license:expat)))
778a284b
CAW
8781
8782(define-public python2-wsgiproxy2
f210e944 8783 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
8784
8785(define-public python-pastedeploy
8786 (package
8787 (name "python-pastedeploy")
8788 (version "1.5.2")
8789 (source
8790 (origin
8791 (method url-fetch)
8792 (uri (pypi-uri "PasteDeploy" version))
8793 (sha256
8794 (base32
8795 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8796 (build-system python-build-system)
8797 (native-inputs
8798 `(("python-nose" ,python-nose)))
bb7518b1
CAW
8799 (home-page "http://pythonpaste.org/deploy/")
8800 (synopsis
8801 "Load, configure, and compose WSGI applications and servers")
8802 (description
8803 "This tool provides code to load WSGI applications and servers from URIs;
8804these URIs can refer to Python Eggs for INI-style configuration files. Paste
8805Script provides commands to serve applications based on this configuration
8806file.")
8807 (license license:expat)))
8808
8809(define-public python2-pastedeploy
8810 (package-with-python2 python-pastedeploy))
1cf53652 8811
c4a7904c
CAW
8812(define-public python-paste
8813 (package
8814 (name "python-paste")
8815 (version "2.0.2")
8816 (source
8817 (origin
8818 (method url-fetch)
8819 (uri (pypi-uri "Paste" version))
8820 (sha256
8821 (base32
8822 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8823 (patches (search-patches "python-paste-remove-website-test.patch"
8824 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8825 (build-system python-build-system)
8826 (native-inputs
8827 `(("python-nose" ,python-nose)))
8828 (propagated-inputs
f3b98f4f 8829 `(("python-six" ,python-six)))
c4a7904c
CAW
8830 (arguments
8831 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8832 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8833 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8834 ;; still... things should be better by the next Paste release.)
8835 #:tests? #f))
8836 (home-page "http://pythonpaste.org")
8837 (synopsis
8838 "Python web development tools, focusing on WSGI")
8839 (description
8840 "Paste provides a variety of web development tools and middleware which
8841can be nested together to build web applications. Paste's design closely
8842follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8843 (license license:expat)
8844 (properties `((python2-variant . ,(delay python2-paste))))))
8845
8846(define-public python2-paste
8847 (let ((paste (package-with-python2
8848 (strip-python2-variant python-paste))))
8849 (package
8850 (inherit paste)
8851 (arguments
8852 ;; Tests are back for Python 2!
8853 `(#:tests? #t
8854 ,@(package-arguments paste))))))
8855
a8f20f63
CAW
8856(define-public python-pastescript
8857 (package
8858 (name "python-pastescript")
8859 (version "2.0.2")
8860 (source
8861 (origin
8862 (method url-fetch)
8863 (uri (pypi-uri "PasteScript" version))
8864 (sha256
8865 (base32
8866 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8867 (build-system python-build-system)
8868 (native-inputs
8869 `(("python-nose" ,python-nose)))
8870 (propagated-inputs
f3b98f4f 8871 `(("python-paste" ,python-paste)
a8f20f63
CAW
8872 ("python-pastedeploy" ,python-pastedeploy)))
8873 (home-page "http://pythonpaste.org/script/")
8874 (arguments
8875 '(;; Unfortunately, this requires the latest unittest2,
8876 ;; but that requires traceback2 which requires linecache2 which requires
8877 ;; unittest2. So we're skipping tests for now.
8878 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8879 ;; so in theory we could get around this situation somehow.)
8880 #:tests? #f))
8881 (synopsis
8882 "Pluggable command line tool for serving web applications and more")
8883 (description
8884 "PasteScript is a plugin-friendly command line tool which provides a
8885variety of features, from launching web applications to bootstrapping project
8886layouts.")
8887 (license license:expat)))
8888
8889(define-public python2-pastescript
8890 (package-with-python2 python-pastescript))
8891
1cf53652
CAW
8892(define-public python-pyquery
8893 (package
8894 (name "python-pyquery")
aab76e80 8895 (version "1.2.13")
1cf53652
CAW
8896 (source
8897 (origin
8898 (method url-fetch)
8899 (uri (pypi-uri "pyquery" version))
8900 (sha256
8901 (base32
aab76e80 8902 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652 8903 (build-system python-build-system)
2ddbfa8c
LF
8904 (native-inputs
8905 `(("python-webob" ,python-webob)
8906 ("python-webtest" ,python-webtest)))
1cf53652
CAW
8907 (propagated-inputs
8908 `(("python-lxml" ,python-lxml)
8909 ("python-cssselect" ,python-cssselect)))
8910 (home-page "https://github.com/gawel/pyquery")
8911 (synopsis "Make jQuery-like queries on xml documents")
8912 (description "pyquery allows you to make jQuery queries on xml documents.
8913The API is as much as possible the similar to jQuery. pyquery uses lxml for
8914fast xml and html manipulation.")
f210e944 8915 (license license:bsd-3)))
1cf53652
CAW
8916
8917(define-public python2-pyquery
f210e944 8918 (package-with-python2 python-pyquery))
aa6313d6
CAW
8919
8920(define-public python-webtest
8921 (package
8922 (name "python-webtest")
8923 (version "2.0.20")
8924 (source
8925 (origin
8926 (method url-fetch)
8927 (uri (pypi-uri "WebTest" version))
8928 (sha256
8929 (base32
8930 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8931 (build-system python-build-system)
8932 (arguments
8933 `(;; Unfortunately we have to disable tests!
8934 ;; This release of WebTest is pinned to python-nose < 1.3,
8935 ;; but older versions of python-nose are plagued with the following
8936 ;; bug(s), which rears its ugly head during test execution:
8937 ;; https://github.com/nose-devs/nose/issues/759
8938 ;; https://github.com/nose-devs/nose/pull/811
8939 #:tests? #f))
8940 ;; Commented out code is no good, but in this case, once tests
8941 ;; are ready to be enabled again, we should put the following
8942 ;; in place:
8943 ;; (native-inputs
8944 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8945 ;; ; but see above comment
8946 ;; ("python-coverage" ,python-coverage)
8947 ;; ("python-mock" ,python-mock)
8948 ;; ("python-pastedeploy" ,python-pastedeploy)
8949 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8950 ;; ("python-pyquery" ,python-pyquery)))
8951 (propagated-inputs
8952 `(("python-waitress" ,python-waitress)
8953 ("python-webob" ,python-webob)
8954 ("python-six" ,python-six)
8955 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8956 (home-page "http://webtest.pythonpaste.org/")
8957 (synopsis "Helper to test WSGI applications")
8958 (description "Webtest allows you to test your Python web applications
8959without starting an HTTP server. It supports anything that supports the
8960minimum of WSGI.")
f210e944 8961 (license license:expat)))
aa6313d6
CAW
8962
8963(define-public python2-webtest
f210e944 8964 (package-with-python2 python-webtest))
4cb122cd
CAW
8965
8966(define-public python-anyjson
8967 (package
8968 (name "python-anyjson")
8969 (version "0.3.3")
8970 (source
8971 (origin
8972 (method url-fetch)
8973 (uri (pypi-uri "anyjson" version))
8974 (sha256
8975 (base32
8976 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8977 (build-system python-build-system)
8978 (arguments
8979 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8980 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8981 ;; whatever) so this transformation needs to be done before the tests
8982 ;; can be run. Maybe we could add a build step to transform beforehand
8983 ;; but it could be annoying/difficult.
8984 ;; We can enable tests for the Python 2 version, though, and do below.
8985 #:tests? #f))
8986 (home-page "http://bitbucket.org/runeh/anyjson/")
8987 (synopsis
8988 "Wraps best available JSON implementation in a common interface")
8989 (description
8990 "Anyjson loads whichever is the fastest JSON module installed
8991and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 8992 (license license:bsd-3)
4cb122cd
CAW
8993 (properties `((python2-variant . ,(delay python2-anyjson))))))
8994
8995(define-public python2-anyjson
8996 (let ((anyjson (package-with-python2
8997 (strip-python2-variant python-anyjson))))
8998 (package
8999 (inherit anyjson)
9000 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9001 #:tests? #t
9002 ,@(package-arguments anyjson)))
00e10c6e 9003 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
9004
9005(define-public python-amqp
9006 (package
9007 (name "python-amqp")
9008 (version "1.4.9")
9009 (source
9010 (origin
9011 (method url-fetch)
9012 (uri (pypi-uri "amqp" version))
9013 (sha256
9014 (base32
9015 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9016 (build-system python-build-system)
9017 (native-inputs
9018 `(("python-nose" ,python-nose)
9019 ("python-mock" ,python-mock)))
9020 (home-page "http://github.com/celery/py-amqp")
9021 (synopsis
9022 "Low-level AMQP client for Python (fork of amqplib)")
9023 (description
9024 "This is a fork of amqplib which was originally written by Barry Pederson.
9025It is maintained by the Celery project, and used by kombu as a pure python
9026alternative when librabbitmq is not available.")
3f641af0 9027 (license license:lgpl2.1+)
8dfceab7
CAW
9028 (properties `((python2-variant . ,(delay python2-amqp))))))
9029
9030(define-public python2-amqp
9031 (let ((amqp (package-with-python2
9032 (strip-python2-variant python-amqp))))
9033 (package
9034 (inherit amqp)
9035 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9036 ;; unmaintained. Weirdly, does not do this on the python 3
9037 ;; version?
9038 #:tests? #f
00e10c6e 9039 ,@(package-arguments amqp))))))
7d387305
CAW
9040
9041(define-public python-kombu
9042 (package
9043 (name "python-kombu")
0cb59822 9044 (version "3.0.37")
7d387305
CAW
9045 (source
9046 (origin
9047 (method url-fetch)
9048 (uri (pypi-uri "kombu" version))
9049 (sha256
9050 (base32
0cb59822 9051 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
9052 (build-system python-build-system)
9053 (native-inputs
9054 `(("python-mock" ,python-mock)
9055 ("python-nose" ,python-nose)))
9056 (propagated-inputs
9057 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
9058 ("python-amqp" ,python-amqp)
9059 ("python-redis" ,python-redis)))
7d387305
CAW
9060 (home-page "http://kombu.readthedocs.org")
9061 (synopsis "Message passing library for Python")
9062 (description "The aim of Kombu is to make messaging in Python as easy as
9063possible by providing an idiomatic high-level interface for the AMQ protocol,
9064and also provide proven and tested solutions to common messaging problems.
9065AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9066message orientation, queuing, routing, reliability and security, for which the
9067RabbitMQ messaging server is the most popular implementation.")
3f641af0 9068 (license license:bsd-3)
7d387305
CAW
9069 (properties `((python2-variant . ,(delay python2-kombu))))))
9070
9071(define-public python2-kombu
9072 (let ((kombu (package-with-python2
9073 (strip-python2-variant python-kombu))))
9074 (package
9075 (inherit kombu)
328bb95d
HG
9076 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9077 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
9078
9079(define-public python-billiard
9080 (package
9081 (name "python-billiard")
a6bb9e44 9082 (version "3.3.0.23")
b6f0b9fb
CAW
9083 (source
9084 (origin
9085 (method url-fetch)
9086 (uri (pypi-uri "billiard" version))
9087 (sha256
9088 (base32
a6bb9e44 9089 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
9090 (build-system python-build-system)
9091 (native-inputs
9092 `(("python-nose" ,python-nose)))
9093 (home-page "http://github.com/celery/billiard")
9094 (synopsis
9095 "Python multiprocessing fork with improvements and bugfixes")
9096 (description
9097 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9098multiprocessing package itself is a renamed and updated version of R Oudkerk's
9099pyprocessing package. This standalone variant is intended to be compatible with
9100Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9101 (license license:bsd-3)
b6f0b9fb
CAW
9102 (properties `((python2-variant . ,(delay python2-billiard))))))
9103
9104(define-public python2-billiard
9105 (let ((billiard (package-with-python2
9106 (strip-python2-variant python-billiard))))
9107 (package
9108 (inherit billiard)
00e10c6e 9109 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9110 ("python2-mock" ,python2-mock)
9111 ,@(package-native-inputs billiard))))))
22df6419
CAW
9112
9113(define-public python-celery
9114 (package
9115 (name "python-celery")
9ebe87fe 9116 (version "3.1.24")
22df6419
CAW
9117 (source
9118 (origin
9119 (method url-fetch)
9120 (uri (pypi-uri "celery" version))
9121 (sha256
9122 (base32
9ebe87fe 9123 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9124 (build-system python-build-system)
9ebe87fe
LF
9125 (arguments
9126 `(#:phases
9127 (modify-phases %standard-phases
9128 ;; These tests break with Python 3.5:
9129 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9130 (replace 'check
9131 (lambda _
9132 (zero?
9133 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9134 (native-inputs
9135 `(("python-nose" ,python-nose)))
f22efa01 9136 (propagated-inputs
22df6419
CAW
9137 `(("python-pytz" ,python-pytz)
9138 ("python-billiard" ,python-billiard)
9139 ("python-kombu" ,python-kombu)))
9140 (home-page "http://celeryproject.org")
9141 (synopsis "Distributed Task Queue")
9142 (description "Celery is an asynchronous task queue/job queue based on
9143distributed message passing. It is focused on real-time operation, but
9144supports scheduling as well. The execution units, called tasks, are executed
9145concurrently on a single or more worker servers using multiprocessing,
9146Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9147synchronously (wait until ready).")
3f641af0 9148 (license license:bsd-3)
22df6419
CAW
9149 (properties `((python2-variant . ,(delay python2-celery))))))
9150
9151(define-public python2-celery
9152 (let ((celery (package-with-python2
9153 (strip-python2-variant python-celery))))
9154 (package
9155 (inherit celery)
00e10c6e 9156 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
9157 ("python2-mock" ,python2-mock)
9158 ,@(package-native-inputs celery))))))
97e32948
CAW
9159
9160(define-public python-translitcodec
9161 (package
9162 (name "python-translitcodec")
9163 (version "0.4.0")
9164 (source
9165 (origin
9166 (method url-fetch)
9167 (uri (pypi-uri "translitcodec" version))
9168 (sha256
9169 (base32
9170 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9171 (build-system python-build-system)
9172 (arguments
9173 `(#:tests? #f)) ; no tests provided
9174 (home-page
9175 "https://github.com/claudep/translitcodec")
9176 (synopsis
9177 "Unicode to 8-bit charset transliteration codec")
9178 (description
9179 "This package contains codecs for transliterating ISO 10646 texts into
9180best-effort representations using smaller coded character sets (ASCII,
9181ISO 8859, etc.).")
f210e944 9182 (license license:expat)))
97e32948
CAW
9183
9184(define-public python2-translitcodec
f210e944 9185 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
9186
9187(define-public python-editor
9188 (package
9189 (name "python-editor")
9190 (version "0.5")
9191 (source
9192 (origin
9193 (method url-fetch)
9194 (uri (pypi-uri "python-editor" version))
9195 (sha256
9196 (base32
9197 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9198 (build-system python-build-system)
9199 (home-page
9200 "https://github.com/fmoo/python-editor")
9201 (synopsis
9202 "Programmatically open an editor, capture the result")
9203 (description
9204 "python-editor is a library that provides the editor module for
9205programmatically interfacing with your system's $EDITOR.")
f210e944 9206 (license license:asl2.0)))
0c3b90d4
CAW
9207
9208(define-public python2-editor
f210e944 9209 (package-with-python2 python-editor))
3276517c
LF
9210
9211(define-public python-sphinxcontrib-programoutput
9212 (package
9213 (name "python-sphinxcontrib-programoutput")
9214 (version "0.8")
9215 (source (origin
9216 (method url-fetch)
9217 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9218 (sha256
9219 (base32
9220 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9221 (build-system python-build-system)
9222 (propagated-inputs
a0a09859 9223 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
9224 (synopsis "Sphinx extension to include program output")
9225 (description "A Sphinx extension to literally insert the output of arbitrary
9226commands into documents, helping you to keep your command examples up to date.")
9227 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 9228 (license license:bsd-2)))
3276517c
LF
9229
9230(define-public python2-sphinxcontrib-programoutput
f210e944 9231 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
9232
9233(define-public python-sphinx-repoze-autointerface
9234 (package
9235 (name "python-sphinx-repoze-autointerface")
328ae341 9236 (version "0.8")
548d7165
LF
9237 (source (origin
9238 (method url-fetch)
9239 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9240 (sha256
9241 (base32
328ae341 9242 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9243 (build-system python-build-system)
9244 (propagated-inputs
47c7dc4a 9245 `(("python-sphinx" ,python-sphinx)
548d7165
LF
9246 ("python-zope-interface" ,python-zope-interface)))
9247 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9248 (description "This package defines an extension for the Sphinx documentation
9249system. The extension allows generation of API documentation by
9250introspection of @code{zope.interface} instances in code.")
9251 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9252 (license license:repoze)))
548d7165
LF
9253
9254(define-public python2-sphinx-repoze-autointerface
9255 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9256
9257(define-public python-psycopg2
9258 (package
9259 (name "python-psycopg2")
9260 (version "2.6.1")
9261 (source
9262 (origin
9263 (method url-fetch)
9264 (uri (pypi-uri "psycopg2" version))
9265 (sha256
9266 (base32
9267 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9268 (build-system python-build-system)
9269 (arguments
9270 ;; Tests would require a postgresql database "psycopg2_test"
9271 ;; and a running postgresql database management service.
9272 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9273 (inputs
9274 `(("postgresql" ,postgresql))) ; libpq
9275 (home-page "http://initd.org/psycopg/")
9276 (synopsis "Python PostgreSQL adapter")
9277 (description
9278 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 9279 (license license:lgpl3+)))
b31fbea5
DM
9280
9281(define-public python2-psycopg2
f210e944 9282 (package-with-python2 python-psycopg2))
eed1a61f
LF
9283
9284(define-public python-vobject
9285 (package
9286 (name "python-vobject")
9bed9b15 9287 (version "0.9.2")
eed1a61f
LF
9288 (source (origin
9289 (method url-fetch)
9290 (uri (pypi-uri "vobject" version))
9291 (sha256
9292 (base32
9bed9b15 9293 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 9294 (build-system python-build-system)
a9871b7b
LF
9295 (arguments
9296 '(;; The test suite relies on some non-portable Windows interfaces.
9297 #:tests? #f))
f22efa01 9298 (propagated-inputs
eed1a61f
LF
9299 `(("python-dateutil-2" ,python-dateutil-2)
9300 ("python-pyicu" ,python-pyicu)))
9301 (synopsis "Parse and generate vCard and vCalendar files")
9302 (description "Vobject is intended to be a full featured Python package for
9303parsing and generating vCard and vCalendar files. Currently, iCalendar files
9304are supported and well tested. vCard 3.0 files are supported, and all data
9305should be imported, but only a few components are understood in a sophisticated
9306way.")
9307 (home-page "http://eventable.github.io/vobject/")
f210e944 9308 (license license:asl2.0)))
eed1a61f
LF
9309
9310(define-public python2-vobject
f210e944 9311 (package-with-python2 python-vobject))
cedac813
LF
9312
9313(define-public python-munkres
9314 (package
9315 (name "python-munkres")
38e81a2c 9316 (version "1.0.8")
cedac813
LF
9317 (source (origin
9318 (method url-fetch)
9319 (uri (pypi-uri "munkres" version))
9320 (sha256
9321 (base32
38e81a2c 9322 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
9323 (build-system python-build-system)
9324 (arguments
9325 '(#:tests? #f)) ; no test suite
9326 (home-page "http://software.clapper.org/munkres/")
9327 (synopsis "Implementation of the Munkres algorithm")
9328 (description "The Munkres module provides an implementation of the Munkres
9329algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9330useful for solving the Assignment Problem.")
3f641af0 9331 (license license:bsd-3)))
cedac813
LF
9332
9333(define-public python2-munkres
9334 (package-with-python2 python-munkres))
f3b3d78f
LF
9335
9336(define-public python-flask
9337 (package
9338 (name "python-flask")
c6c80104 9339 (version "0.11.1")
f3b3d78f
LF
9340 (source (origin
9341 (method url-fetch)
9342 (uri (pypi-uri "Flask" version))
9343 (sha256
9344 (base32
c6c80104 9345 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
9346 (build-system python-build-system)
9347 (propagated-inputs
9348 `(("python-itsdangerous" ,python-itsdangerous)
9349 ("python-jinja2" ,python-jinja2)
8f35c030 9350 ("python-click" ,python-click)
f3b3d78f
LF
9351 ("python-werkzeug" ,python-werkzeug)))
9352 (home-page "https://github.com/mitsuhiko/flask/")
9353 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9354 (description "Flask is a micro web framework based on the Werkzeug toolkit
9355and Jinja2 template engine. It is called a micro framework because it does not
9356presume or force a developer to use a particular tool or library.")
f210e944 9357 (license license:bsd-3)))
f3b3d78f
LF
9358
9359(define-public python2-flask
f210e944 9360 (package-with-python2 python-flask))
603d665b
LF
9361
9362(define-public python-cookies
9363 (package
9364 (name "python-cookies")
9365 (version "2.2.1")
9366 (source (origin
9367 (method url-fetch)
9368 (uri (pypi-uri "cookies" version))
9369 (sha256
9370 (base32
9371 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9372 (build-system python-build-system)
9373 (arguments
9374 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9375 #:tests? #f))
9376 (native-inputs
9377 `(("python-pytest" ,python2-pytest)))
9378 (synopsis "HTTP cookie parser and renderer")
9379 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9380Python.")
9381 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 9382 (license license:expat)))
603d665b
LF
9383
9384(define-public python2-cookies
f210e944 9385 (package-with-python2 python-cookies))
0efde7d6
LF
9386
9387(define-public python-responses
9388 (package
9389 (name "python-responses")
9390 (version "0.5.1")
9391 (source (origin
9392 (method url-fetch)
9393 (uri (pypi-uri "responses" version))
9394 (sha256
9395 (base32
9396 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9397 (build-system python-build-system)
9398 (arguments
9399 `(;; Test suite is not distributed:
9400 ;; https://github.com/getsentry/responses/issues/38
9401 #:tests? #f))
9402 (native-inputs
d8ea5f2f 9403 `(("python-mock" ,python-mock)))
0efde7d6
LF
9404 (propagated-inputs
9405 `(("python-requests" ,python-requests)
d8ea5f2f 9406 ("python-cookies" ,python-cookies)
0efde7d6
LF
9407 ("python-six" ,python-six)))
9408 (home-page "https://github.com/getsentry/responses")
9409 (synopsis "Utility for mocking out the `requests` Python library")
9410 (description "A utility library for mocking out the `requests` Python
9411library.")
f210e944 9412 (license license:asl2.0)))
0efde7d6
LF
9413
9414(define-public python2-responses
f210e944 9415 (package-with-python2 python-responses))
76b94885 9416
b7afd018
RW
9417(define-public python-whoosh
9418 (package
9419 (name "python-whoosh")
9420 (version "2.7.4")
9421 (source
9422 (origin
9423 (method url-fetch)
9424 (uri (pypi-uri "Whoosh" version))
9425 (sha256
9426 (base32
9427 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9428 (build-system python-build-system)
9429 (native-inputs
f3b98f4f 9430 `(("python-pytest" ,python-pytest)))
b7afd018
RW
9431 (home-page "http://bitbucket.org/mchaput/whoosh")
9432 (synopsis "Full text indexing, search, and spell checking library")
9433 (description
9434 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9435checking library.")
9436 (license license:bsd-2)))
9437
9438(define-public python2-whoosh
9439 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9440 (package (inherit whoosh)
9441 (propagated-inputs
9442 `(("python2-backport-ssl-match-hostname"
9443 ,python2-backport-ssl-match-hostname)
9444 ,@(package-propagated-inputs whoosh))))))
9445
76b94885
LF
9446(define-public python-pathlib
9447 (package
9448 (name "python-pathlib")
9449 (version "1.0.1")
9450 (source (origin
9451 (method url-fetch)
9452 (uri (pypi-uri "pathlib" version))
9453 (sha256
9454 (base32
9455 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9456 (build-system python-build-system)
92a312dc
RW
9457 ;; The tests depend on the internal "test" module, which does not provide
9458 ;; a stable interface.
9459 (arguments `(#:tests? #f))
76b94885 9460 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9461 (synopsis "Object-oriented file system paths")
9462 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9463It offers the following advantages over using string objects:
9464
9465@enumerate
9466@item No more cumbersome use of os and os.path functions. Everything can
9467be done easily through operators, attribute accesses, and method calls.
9468@item Embodies the semantics of different path types. For example,
9469comparing Windows paths ignores casing.
9470@item Well-defined semantics, eliminating any inconsistencies or
9471ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9472@end enumerate
9473
9474Note: In Python 3.4, pathlib is now part of the standard library. For other
9475Python versions please consider python-pathlib2 instead, which tracks the
9476standard library module. This module (python-pathlib) isn't maintained
9477anymore.")
76b94885
LF
9478 (license license:expat)))
9479
9480(define-public python2-pathlib
9481 (package-with-python2 python-pathlib))
25a7db0a 9482
b7703c81
HG
9483(define-public python2-pathlib2
9484 (package
9485 (name "python2-pathlib2")
9486 (version "2.1.0")
9487 (source (origin
9488 (method url-fetch)
9489 (uri (pypi-uri "pathlib2" version))
9490 (sha256
9491 (base32
9492 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9493 (build-system python-build-system)
49a531f5
HG
9494 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9495 ;; version is 3.4 which already includes this package as part of the
9496 ;; standard library.
b7703c81
HG
9497 (arguments
9498 `(#:python ,python-2))
9499 (native-inputs
f3b98f4f 9500 `(("python2-six" ,python2-six)))
b7703c81
HG
9501 (home-page "http://pypi.python.org/pypi/pathlib2/")
9502 (synopsis "Object-oriented file system paths - backport of standard
9503pathlib module")
9504 (description "The goal of pathlib2 is to provide a backport of standard
9505pathlib module which tracks the standard library module, so all the newest
9506features of the standard pathlib can be used also on older Python versions.
9507
9508Pathlib offers a set of classes to handle file system paths. It offers the
9509following advantages over using string objects:
9510
9511@enumerate
9512@item No more cumbersome use of os and os.path functions. Everything can
9513be done easily through operators, attribute accesses, and method calls.
9514@item Embodies the semantics of different path types. For example,
9515comparing Windows paths ignores casing.
9516@item Well-defined semantics, eliminating any inconsistencies or
9517ambiguities (forward vs. backward slashes, etc.).
9518@end enumerate")
9519 (license license:expat)))
9520
25a7db0a
LF
9521(define-public python-jellyfish
9522 (package
9523 (name "python-jellyfish")
8c4964dd 9524 (version "0.5.6")
25a7db0a
LF
9525 (source (origin
9526 (method url-fetch)
9527 (uri (pypi-uri "jellyfish" version))
9528 (sha256
9529 (base32
8c4964dd 9530 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
9531 (build-system python-build-system)
9532 (native-inputs
9533 `(("python-pytest" ,python-pytest)))
9534 (home-page "https://github.com/jamesturk/jellyfish")
9535 (synopsis "Approximate and phonetic matching of strings")
9536 (description "Jellyfish uses a variety of string comparison and phonetic
9537encoding algorithms to do fuzzy string matching.")
3f641af0 9538 (license license:bsd-2)
25a7db0a
LF
9539 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9540
9541(define-public python2-jellyfish
9542 (let ((jellyfish (package-with-python2
9543 (strip-python2-variant python-jellyfish))))
9544 (package (inherit jellyfish)
00e10c6e 9545 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 9546 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9547
9548(define-public python2-unicodecsv
9549 (package
9550 (name "python2-unicodecsv")
9551 (version "0.14.1")
9552 (source (origin
9553 (method url-fetch)
9554 ;; The test suite is not included in the PyPi release.
9555 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9556 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9557 "archive/" version ".tar.gz"))
9558 (file-name (string-append name "-" version ".tar.gz"))
9559 (sha256
9560 (base32
9561 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9562 (build-system python-build-system)
9563 (arguments
9564 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9565 #:python ,python-2))
9566 (native-inputs
f3b98f4f 9567 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
9568 (home-page "https://github.com/jdunck/python-unicodecsv")
9569 (synopsis "Unicode CSV module for Python 2")
9570 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9571module, adding support for Unicode strings.")
3f641af0 9572 (license license:bsd-2)))
064503aa
LF
9573
9574(define-public python-rarfile
9575 (package
9576 (name "python-rarfile")
67824447 9577 (version "2.8")
064503aa
LF
9578 (source (origin
9579 (method url-fetch)
9580 (uri (pypi-uri "rarfile" version))
9581 (sha256
9582 (base32
67824447 9583 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
9584 (build-system python-build-system)
9585 (arguments
9586 '(#:phases
9587 (modify-phases %standard-phases
9588 (replace 'check
9589 ;; Many tests fail, but the installation proceeds.
9590 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9591 (native-inputs
9592 `(("which" ,which))) ; required for tests
9593 (propagated-inputs
9594 `(("libarchive" ,libarchive)))
9595 (home-page "https://github.com/markokr/rarfile")
9596 (synopsis "RAR archive reader for Python")
9597 (description "This is Python module for RAR archive reading. The interface
9598is made as zipfile like as possible.")
3f641af0 9599 (license license:isc)))
064503aa
LF
9600
9601(define-public python2-rarfile
9602 (package-with-python2 python-rarfile))
daeeea71
CM
9603
9604(define-public python-magic
9605 (package
9606 (name "python-magic")
9607 (version "0.4.3")
9608 (source
9609 (origin
9610 (method url-fetch)
9611 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9612 version ".tar.gz"))
9613 (sha256
9614 (base32
9615 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9616 (file-name (string-append name "-" version "-checkout"))))
9617 (build-system python-build-system)
9618 (arguments
9619 ;; The tests are unreliable, so don't run them. The tests fail
9620 ;; under Python3 because they were written for Python2 and
9621 ;; contain import statements that do not work in Python3. One of
9622 ;; the tests fails under Python2 because its assertions are
9623 ;; overly stringent; it relies on comparing output strings which
9624 ;; are brittle and can change depending on the version of
9625 ;; libmagic being used and the system on which the test is
9626 ;; running. In my case, under GuixSD 0.10.0, only one test
9627 ;; failed, and it seems to have failed only because the version
9628 ;; of libmagic that is packaged in Guix outputs a slightly
9629 ;; different (but not wrong) string than the one that the test
9630 ;; expected.
9631 '(#:tests? #f
9632 #:phases (modify-phases %standard-phases
9633 ;; Replace a specific method call with a hard-coded
9634 ;; path to the necessary libmagic.so file in the
9635 ;; store. If we don't do this, then the method call
9636 ;; will fail to find the libmagic.so file, which in
9637 ;; turn will cause any application using
9638 ;; python-magic to fail.
9639 (add-before 'build 'hard-code-path-to-libmagic
9640 (lambda* (#:key inputs #:allow-other-keys)
9641 (let ((file (assoc-ref inputs "file")))
9642 (substitute* "magic.py"
9643 (("ctypes.util.find_library\\('magic'\\)")
9644 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9645 #t)))
9646 (add-before 'install 'disable-egg-compression
9647 (lambda _
9648 (let ((port (open-file "setup.cfg" "a")))
9649 (display "\n[easy_install]\nzip_ok = 0\n"
9650 port)
9651 (close-port port)
9652 #t))))))
daeeea71
CM
9653 (inputs
9654 ;; python-magic needs to be able to find libmagic.so.
9655 `(("file" ,file)))
9656 (home-page "https://github.com/ahupp/python-magic")
9657 (synopsis "File type identification using libmagic")
9658 (description
9659 "This module uses ctypes to access the libmagic file type
9660identification library. It makes use of the local magic database and
9661supports both textual and MIME-type output. Note that this module and
9662the python-file module both provide a \"magic.py\" file; these two
9663modules, which are different and were developed separately, both serve
9664the same purpose: to provide Python bindings for libmagic.")
9665 (license license:expat)))
9666
9667(define-public python2-magic
9668 (package-with-python2 python-magic))
12af303f
CM
9669
9670(define-public python2-s3cmd
9671 (package
9672 (name "python2-s3cmd")
9673 (version "1.6.1")
9674 (source
9675 (origin
9676 (method url-fetch)
de67e922 9677 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9678 "s3cmd-" version ".tar.gz"))
9679 (sha256
9680 (base32
9681 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9682 (build-system python-build-system)
9683 (arguments
9684 ;; s3cmd is written for python2 only and contains no tests.
9685 `(#:python ,python-2
9686 #:tests? #f))
f22efa01 9687 (propagated-inputs
12af303f
CM
9688 `(("python2-dateutil" ,python2-dateutil)
9689 ;; The python-file package also provides a magic.py module.
9690 ;; This is an unfortunate state of affairs; however, s3cmd
9691 ;; fails to install if it cannot find specifically the
9692 ;; python-magic package. Thus we include it, instead of using
9693 ;; python-file. Ironically, s3cmd sometimes works better
9694 ;; without libmagic bindings at all:
9695 ;; https://github.com/s3tools/s3cmd/issues/198
9696 ("python2-magic" ,python2-magic)))
9697 (home-page "http://s3tools.org/s3cmd")
9698 (synopsis "Command line tool for S3-compatible storage services")
9699 (description
9700 "S3cmd is a command line tool for uploading, retrieving and managing data
9701in storage services that are compatible with the Amazon Simple Storage
9702Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9703GnuPG encryption, and more. It also supports management of Amazon's
9704CloudFront content delivery network.")
3f641af0 9705 (license license:gpl2+)))
4323a5f0
AE
9706
9707(define-public python-pkgconfig
9708 (package
9709 (name "python-pkgconfig")
9710 (version "1.1.0")
9711 (source
9712 (origin
9713 (method url-fetch)
9714 (uri (pypi-uri "pkgconfig" version))
9715 (sha256
9716 (base32
9717 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9718 (build-system python-build-system)
9719 (native-inputs
f3b98f4f 9720 `(("python-nose" ,python-nose)))
4323a5f0
AE
9721 (inputs
9722 `(("pkg-config" ,pkg-config)))
9723 (arguments
9724 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9725 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9726 #:tests? #f
4323a5f0
AE
9727 ;; Hard-code the path to pkg-config.
9728 #:phases
9729 (modify-phases %standard-phases
9730 (add-before
9731 'build 'patch
9732 (lambda _
9733 (substitute* "pkgconfig/pkgconfig.py"
9734 (("cmd = 'pkg-config")
9735 (string-append "cmd = '" (which "pkg-config"))))
9736 #t)))))
9737 (home-page "http://github.com/matze/pkgconfig")
9738 (synopsis "Python interface for pkg-config")
9739 (description "This module provides a Python interface to pkg-config. It
9740can be used to find all pkg-config packages, check if a package exists,
9741check if a package meets certain version requirements, query CFLAGS and
9742LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9743 (license license:expat)))
4323a5f0
AE
9744
9745(define-public python2-pkgconfig
9746 (package-with-python2 python-pkgconfig))
9747
2e697322
BW
9748(define-public python-bz2file
9749 (package
9750 (name "python-bz2file")
9751 (version "0.98")
9752 (source
9753 (origin
9754 (method url-fetch)
9755 (uri (pypi-uri "bz2file" version))
9756 (sha256
9757 (base32
9758 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9759 (build-system python-build-system)
9760 (arguments
124df723 9761 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9762 (home-page "https://github.com/nvawda/bz2file")
9763 (synopsis "Read and write bzip2-compressed files")
9764 (description
9765 "Bz2file is a Python library for reading and writing bzip2-compressed
9766files. It contains a drop-in replacement for the I/O interface in the
9767standard library's @code{bz2} module, including features from the latest
9768development version of CPython that are not available in older releases.")
3f641af0 9769 (license license:asl2.0)
2e697322
BW
9770 (properties `((python2-variant . ,(delay python2-bz2file))))))
9771
9772(define-public python2-bz2file
9773 (let ((base (package-with-python2
9774 (strip-python2-variant python-bz2file))))
9775 (package
9776 (inherit base)
124df723 9777 (arguments
752bb447
BW
9778 `(#:python ,python-2
9779 #:phases
124df723
BW
9780 (modify-phases %standard-phases
9781 ;; 'python setup.py test' does not work as of 0.98.
9782 ;; There is only the one test file, so we run it directly.
9783 (replace 'check
9784 (lambda _ (zero? (system* "python"
9785 "test_bz2file.py"))))))))))
2e697322 9786
da4ac1aa
BW
9787(define-public python-future
9788 (package
9789 (name "python-future")
9790 (version "0.15.2")
9791 (source
9792 (origin
9793 (method url-fetch)
9794 (uri (pypi-uri "future" version))
9795 (sha256
9796 (base32
9797 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9798 (build-system python-build-system)
9799 ;; Many tests connect to the network or are otherwise flawed.
9800 ;; https://github.com/PythonCharmers/python-future/issues/210
9801 (arguments
9802 `(#:tests? #f))
9803 (home-page "http://python-future.org")
9804 (synopsis "Single-source support for Python 3 and 2")
9805 (description
9806 "@code{python-future} is the missing compatibility layer between Python 2 and
9807Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9808to support both Python 2 and Python 3 with minimal overhead.")
f210e944 9809 (license license:expat)))
da4ac1aa
BW
9810
9811(define-public python2-future
f210e944 9812 (package-with-python2 python-future))
da4ac1aa 9813
8e451885
AE
9814(define-public python-cysignals
9815 (package
9816 (name "python-cysignals")
9817 (version "1.1.0")
9818 (source
9819 (origin
9820 (method url-fetch)
9821 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9822 (sha256
9823 (base32
9824 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9825 (build-system python-build-system)
9826 (native-inputs
9827 `(("python-cython" ,python-cython)
8e451885
AE
9828 ("python-sphinx" ,python-sphinx)))
9829 (inputs
9830 `(("pari-gp" ,pari-gp)))
9831 (arguments
9832 `(#:modules ((guix build python-build-system)
9833 ((guix build gnu-build-system) #:prefix gnu:)
9834 (guix build utils))
9835 ;; FIXME: Tests are executed after installation and currently fail
9836 ;; when not installing into standard locations; the author is working
9837 ;; on a fix.
9838 #:tests? #f
9839 #:phases
9840 (modify-phases %standard-phases
9841 (add-before
9842 'build 'configure
9843 (assoc-ref gnu:%standard-phases 'configure)))))
9844 (home-page
9845 "https://github.com/sagemath/cysignals")
9846 (synopsis
9847 "Handling of interrupts and signals for Cython")
9848 (description
9849 "The cysignals package provides mechanisms to handle interrupts (and
9850other signals and errors) in Cython code, using two related approaches,
9851for mixed Cython/Python code or external C libraries and pure Cython code,
9852respectively.")
3f641af0 9853 (license license:lgpl3+)))
8e451885
AE
9854
9855(define-public python2-cysignals
9856 (package-with-python2 python-cysignals))
9857
63bcec71
DM
9858(define-public python2-shedskin
9859 (package
9860 (name "python2-shedskin")
9861 (version "0.9.4")
9862 (source
9863 (origin
9864 (method url-fetch)
9865 (uri (string-append "https://github.com/shedskin/shedskin/"
9866 "releases/download/v" version
9867 "/shedskin-" version ".tgz"))
9868 (sha256
9869 (base32
9870 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9871 (build-system python-build-system)
9872 (arguments
9873 `(#:python ,python-2
9874 #:phases (modify-phases %standard-phases
9875 (add-after 'unpack 'fix-resulting-include-libs
9876 (lambda* (#:key inputs #:allow-other-keys)
9877 (let ((libgc (assoc-ref inputs "libgc"))
9878 (pcre (assoc-ref inputs "pcre")))
9879 (substitute* "shedskin/makefile.py"
9880 (("variable == 'CCFLAGS':[ ]*")
9881 (string-append "variable == 'CCFLAGS':\n"
9882 " line += ' -I " pcre "/include"
9883 " -I " libgc "/include'"))
9884 (("variable == 'LFLAGS':[ ]*")
9885 (string-append "variable == 'LFLAGS':\n"
9886 " line += ' -L" pcre "/lib"
9887 " -L " libgc "/lib'")))
9888 #t))))))
63bcec71
DM
9889 (inputs `(("pcre" ,pcre)
9890 ("libgc" ,libgc)))
9891 (home-page "https://shedskin.github.io/")
9892 (synopsis "Experimental Python-2 to C++ Compiler")
9893 (description (string-append "This is an experimental compiler for a subset of
9894Python. It generates C++ code and a Makefile."))
3f641af0 9895 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
9896
9897(define-public python2-rope
9898 (package
9899 (name "python2-rope")
9900 (version "0.10.3")
9901 (source
9902 (origin
9903 (method url-fetch)
9904 (uri (pypi-uri "rope" version))
9905 (sha256
9906 (base32
9907 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9908 (arguments
9909 ;; Rope is currently python-2 only.
9910 ;; https://github.com/python-rope/rope/issues/57
9911 `(#:python ,python-2))
9912 (build-system python-build-system)
9913 (native-inputs
f3b98f4f 9914 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
9915 (home-page "https://github.com/python-rope/rope")
9916 (synopsis "Refactoring library for Python")
9917 (description "Rope is a refactoring library for Python. It facilitates
9918the renaming, moving and extracting of attributes, functions, modules, fields
9919and parameters in Python 2 source code. These refactorings can also be applied
9920to occurences in strings and comments.")
3f641af0 9921 (license license:gpl2)))
6ba8ca17
9922
9923(define-public python-py3status
9924 (package
9925 (name "python-py3status")
d2262d70 9926 (version "3.1")
6ba8ca17
9927 (source
9928 (origin
9929 (method url-fetch)
9930 (uri (pypi-uri "py3status" version))
9931 (sha256
9932 (base32
d2262d70 9933 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 9934 (build-system python-build-system)
6ba8ca17
9935 (home-page "https://github.com/ultrabug/py3status")
9936 (synopsis "Extensible i3status wrapper written in Python")
9937 (description "py3status is an i3status wrapper which extends i3status
9938functionality in a modular way, allowing you to extend your panel with your
9939own code, responding to click events and updating clock every second.")
3f641af0 9940 (license license:bsd-3)))
b8fdbca3
HG
9941
9942(define-public python-tblib
9943 (package
9944 (name "python-tblib")
9945 (version "1.3.0")
9946 (source (origin
9947 (method url-fetch)
9948 (uri (pypi-uri "tblib" version))
9949 (sha256 (base32
9950 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9951 (build-system python-build-system)
9952 (arguments
9953 `(#:phases
9954 (modify-phases %standard-phases
9955 (replace 'check
9956 (lambda _
9957 ;; Upstream runs tests after installation and the package itself
9958 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9959 ;; found.
9960 (setenv "PYTHONPATH"
9961 (string-append (getcwd) "/build/lib:"
9962 (getenv "PYTHONPATH")))
9963 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9964 (native-inputs
9965 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
9966 ("python-six" ,python-six)))
9967 (home-page "https://github.com/ionelmc/python-tblib")
9968 (synopsis "Traceback serialization library")
9969 (description
9970 "Traceback serialization allows you to:
9971
9972@enumerate
9973@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9974different processes. This allows better error handling when running code over
9975multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9976
9977@item Parse traceback strings and raise with the parsed tracebacks.
9978@end itemize")
3f641af0 9979 (license license:bsd-3)))
b8fdbca3
HG
9980
9981(define-public python2-tblib
9982 (package-with-python2 python-tblib))
1a024de4
HG
9983
9984(define-public python-sqlparse
9985 (package
9986 (name "python-sqlparse")
9987 (version "0.1.19")
9988 (source (origin
9989 (method url-fetch)
9990 (uri (pypi-uri "sqlparse" version))
9991 (sha256
9992 (base32
9993 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9994 (build-system python-build-system)
9995 (arguments
9996 `(#:phases
9997 (modify-phases %standard-phases
9998 (replace 'check
9999 (lambda* _
10000 ;; setup.py-integrated 2to3 only affects the build files, but
10001 ;; py.test is using the source files. So we need to convert them
10002 ;; manually.
10003 (when (zero? (system* "python3"))
10004 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10005 (zero? (system* "py.test")))))))
10006 (native-inputs
f3b98f4f 10007 `(("python-pytest" ,python-pytest)))
1a024de4
HG
10008 (home-page "https://github.com/andialbrecht/sqlparse")
10009 (synopsis "Non-validating SQL parser")
10010 (description "Sqlparse is a non-validating SQL parser for Python. It
10011provides support for parsing, splitting and formatting SQL statements.")
3f641af0 10012 (license license:bsd-3)))
1a024de4
HG
10013
10014(define-public python2-sqlparse
10015 (package-with-python2 python-sqlparse))
68b9d242
SB
10016
10017(define-public python-greenlet
10018 (package
10019 (name "python-greenlet")
10020 (version "0.4.9")
10021 (source (origin
10022 (method url-fetch)
10023 (uri (pypi-uri "greenlet" version))
10024 (sha256
10025 (base32
10026 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
10027 (build-system python-build-system)
68b9d242
SB
10028 (home-page "https://greenlet.readthedocs.io/")
10029 (synopsis "Lightweight in-process concurrent programming")
10030 (description
10031 "Greenlet package is a spin-off of Stackless, a version of CPython
10032that supports micro-threads called \"tasklets\". Tasklets run
10033pseudo-concurrently (typically in a single or a few OS-level threads) and
10034are synchronized with data exchanges on \"channels\".")
3f641af0 10035 (license (list license:psfl license:expat))))
68b9d242
SB
10036
10037(define-public python2-greenlet
10038 (package-with-python2 python-greenlet))
d79a343b
SB
10039
10040(define-public python-gevent
10041 (package
10042 (name "python-gevent")
10043 (version "1.1.1")
10044 (source (origin
10045 (method url-fetch)
10046 (uri (pypi-uri "gevent" version))
10047 (sha256
10048 (base32
10049 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10050 (modules '((guix build utils)))
10051 (snippet
10052 '(begin
10053 ;; unbunding libev and c-ares
10054 (for-each delete-file-recursively '("libev" "c-ares"))
10055 ;; fixing testsuite
10056 (call-with-output-file "greentest/__init__.py" noop)
10057 (substitute* "greentest/testrunner.py"
10058 (("import util") "from . import util")
10059 (("from util import log") "from .util import log"))))))
10060 (build-system python-build-system)
10061 (propagated-inputs
10062 `(("python-greenlet" ,python-greenlet)))
10063 (native-inputs
f3b98f4f 10064 `(("python-six" ,python-six)))
d79a343b
SB
10065 (inputs
10066 `(("c-ares" ,c-ares)
10067 ("libev" ,libev)))
10068 (home-page "http://www.gevent.org/")
10069 (synopsis "Coroutine-based network library")
10070 (description
10071 "gevent is a coroutine-based Python networking library that uses greenlet
10072to provide a high-level synchronous API on top of the libev event loop.")
10073 (license license:expat)))
10074
10075(define-public python2-gevent
10076 (package-with-python2 python-gevent))
da3aeeb6
SB
10077
10078(define-public python-twisted
10079 (package
10080 (name "python-twisted")
10081 (version "16.2.0")
10082 (source (origin
10083 (method url-fetch)
8ea8e8d3 10084 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
10085 (sha256
10086 (base32
10087 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
10088 (build-system python-build-system)
a960e73f
MB
10089 (arguments
10090 '(#:tests? #f)) ; FIXME: Some tests are failing.
10091 ;; #:phases
10092 ;; (modify-phases %standard-phases
10093 ;; (replace 'check
10094 ;; (lambda _
10095 ;; (zero? (system* "./bin/trial" "twisted")))))
45912170
SB
10096 (propagated-inputs
10097 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
10098 (home-page "https://twistedmatrix.com/")
10099 (synopsis "Asynchronous networking framework written in Python")
10100 (description
10101 "Twisted is an extensible framework for Python programming, with special
10102focus on event-based network programming and multiprotocol integration.")
10103 (license license:expat)))
10104
10105(define-public python2-twisted
10106 (package-with-python2 python-twisted))
d0b6fed6 10107
4d3fa5a4
EF
10108(define-public python-pika
10109 (package
10110 (name "python-pika")
10111 (version "0.10.0")
10112 (source
10113 (origin
10114 (method url-fetch)
10115 (uri (pypi-uri "pika" version))
10116 (sha256
10117 (base32
10118 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10119 (build-system python-build-system)
10120 (native-inputs
269d9172
LF
10121 `(("python-pyev" ,python-pyev)
10122 ("python-tornado" ,python-tornado)
10123 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
10124 (home-page "https://pika.readthedocs.org")
10125 (synopsis "Pure Python AMQP Client Library")
10126 (description
10127 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10128Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10129network support library.")
10130 (license license:bsd-3)))
10131
10132(define-public python2-pika
10133 (package-with-python2 python-pika))
10134
d0b6fed6
DM
10135(define-public python-ply
10136 (package
10137 (name "python-ply")
10138 (version "3.8")
10139 (source
10140 (origin
10141 (method url-fetch)
10142 (uri (string-append
10143 "https://pypi.python.org/packages/"
10144 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
10145 "/ply-" version ".tar.gz"))
10146 (sha256
10147 (base32
10148 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
10149 (build-system python-build-system)
10150 (home-page "http://www.dabeaz.com/ply/")
10151 (synopsis "Python Lex & Yacc")
10152 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10153It uses LR parsing and does extensive error checking.")
f210e944 10154 (license license:bsd-3)))
d0b6fed6
DM
10155
10156(define-public python2-ply
f210e944 10157 (package-with-python2 python-ply))
d951bd54
SB
10158
10159(define-public python-tabulate
10160 (package
10161 (name "python-tabulate")
10162 (version "0.7.5")
10163 (source (origin
10164 (method url-fetch)
10165 (uri (pypi-uri "tabulate" version))
10166 (sha256
10167 (base32
10168 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10169 ;; Fix tests
10170 (modules '((guix build utils)))
10171 (snippet '(substitute* '("test/test_cli.py"
10172 "test/test_input.py"
10173 "test/test_output.py"
10174 "test/test_regression.py")
10175 (("from common") "from nose.tools")))))
10176 (build-system python-build-system)
10177 (native-inputs
f3b98f4f 10178 `(;; For testing
d951bd54
SB
10179 ("python-nose" ,python-nose)))
10180 (home-page "https://bitbucket.org/astanin/python-tabulate")
10181 (synopsis "Pretty-print tabular data")
10182 (description
10183 "Tabulate is a library and command-line utility to pretty-print tabular
10184data in Python.")
10185 (license license:expat)))
10186
10187(define-public python2-tabulate
10188 (package-with-python2 python-tabulate))
1c4c8a33
SB
10189
10190(define-public python-kazoo
10191 (package
10192 (name "python-kazoo")
10193 (version "2.2.1")
10194 (source
10195 (origin
10196 (method url-fetch)
10197 (uri (pypi-uri "kazoo" version))
10198 (sha256
10199 (base32
10200 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10201 (build-system python-build-system)
10202 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
10203 (propagated-inputs
10204 `(("python-six" ,python-six)))
1c4c8a33
SB
10205 (home-page "https://kazoo.readthedocs.org")
10206 (synopsis "High-level Zookeeper client library")
10207 (description
10208 "Kazoo is a Python client library for the Apache Zookeeper distributed
10209application service. It is designed to be easy to use and to avoid common
10210programming errors.")
3f641af0 10211 (license license:asl2.0)))
1c4c8a33
SB
10212
10213(define-public python2-kazoo
10214 (package-with-python2 python-kazoo))
45dda35e
SB
10215
10216(define-public python-pykafka
10217 (package
10218 (name "python-pykafka")
10219 (version "2.4.0")
10220 (source (origin
10221 (method url-fetch)
c6bccf71
EF
10222 (uri (string-append
10223 "https://pypi.python.org/packages/8b/3e/"
10224 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10225 "pykafka-" version ".tar.gz"))
45dda35e
SB
10226 (sha256
10227 (base32
10228 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10229 (build-system python-build-system)
10230 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 10231 (propagated-inputs
45dda35e
SB
10232 `(("python-gevent" ,python-gevent)
10233 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10234 ("python-tabulate" ,python-tabulate)))
10235 (inputs
10236 `(("librdkafka" ,librdkafka)))
10237 (home-page "https://pykafka.readthedocs.io/")
10238 (synopsis "Apache Kafka client for Python")
10239 (description
10240 "PyKafka is a client for the Apache Kafka distributed messaging system.
10241It includes Python implementations of Kafka producers and consumers, which
10242are optionally backed by a C extension built on librdkafka.")
3f641af0 10243 (license license:asl2.0)))
45dda35e
SB
10244
10245(define-public python2-pykafka
10246 (package-with-python2 python-pykafka))
a44fd439
DM
10247
10248(define-public python-wcwidth
10249 (package
10250 (name "python-wcwidth")
10251 (version "0.1.6")
10252 (source
10253 (origin
10254 (method url-fetch)
10255 (uri (string-append
10256 "https://pypi.python.org/packages/"
10257 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10258 "wcwidth-" version ".tar.gz"))
10259 (sha256
10260 (base32
10261 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10262 (build-system python-build-system)
10263 (home-page "https://github.com/jquast/wcwidth")
66e07664 10264 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10265 (description "Wcwidth measures the number of terminal column cells of
10266wide-character codes. It is useful for those implementing a terminal emulator,
10267or programs that carefully produce output to be interpreted by one. It is a
10268Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10269specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 10270 (license license:expat)))
a44fd439
DM
10271
10272(define-public python2-wcwidth
f210e944 10273 (package-with-python2 python-wcwidth))
0de78c95
DP
10274
10275(define-public python2-jsonrpclib
10276 (package
10277 (name "python2-jsonrpclib")
10278 (version "0.1.7")
10279 (source (origin
10280 (method url-fetch)
10281 (uri (string-append
10282 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10283 "jsonrpclib-" version ".tar.gz"))
10284 (sha256
10285 (base32
10286 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10287 (build-system python-build-system)
0de78c95
DP
10288 (arguments
10289 `(#:tests? #f
10290 #:python ,python-2))
10291 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10292 (synopsis "Implementation of JSON-RPC specification for Python")
10293 (description
10294 "This library is an implementation of the JSON-RPC specification.
10295It supports both the original 1.0 specification, as well as the
10296new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10297etc.")
3f641af0 10298 (license license:asl2.0)))
9250b0f3
SB
10299
10300(define-public python-chai
10301 (package
10302 (name "python-chai")
10303 (version "1.1.1")
10304 (source (origin
10305 (method url-fetch)
10306 (uri (pypi-uri "chai" version))
10307 (sha256
10308 (base32
10309 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10310 (build-system python-build-system)
9250b0f3
SB
10311 (home-page "https://github.com/agoragames/chai")
10312 (synopsis "Mocking framework for Python")
10313 (description
10314 "Chai provides an api for mocking, stubbing and spying your python
10315objects, patterned after the Mocha library for Ruby.")
3f641af0 10316 (license license:bsd-3)))
9250b0f3
SB
10317
10318(define-public python2-chai
10319 (package-with-python2 python-chai))
10320
ae43baa8
SB
10321(define-public python-arrow
10322 (package
10323 (name "python-arrow")
10324 (version "0.8.0")
10325 (source (origin
10326 (method url-fetch)
10327 (uri (pypi-uri "arrow" version))
10328 (sha256
10329 (base32
10330 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10331 (build-system python-build-system)
10332 (native-inputs
f3b98f4f 10333 `(;; For testing
ae43baa8
SB
10334 ("python-chai" ,python-chai)
10335 ("python-simplejson" ,python-simplejson)))
36aed736
SB
10336 (propagated-inputs
10337 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
10338 (home-page "https://github.com/crsmithdev/arrow/")
10339 (synopsis "Dates and times for Python")
10340 (description
10341 "Arrow is a Python library to creating, manipulating, formatting and
10342converting dates, times, and timestamps. It implements and updates the
10343datetime type.")
3f641af0 10344 (license license:asl2.0)))
ae43baa8
SB
10345
10346(define-public python2-arrow
10347 (package-with-python2 python-arrow))
10348
1f2b62a4
SB
10349(define-public python-inflection
10350 (package
10351 (name "python-inflection")
10352 (version "0.3.1")
10353 (source
10354 (origin (method url-fetch)
10355 (uri (pypi-uri "inflection" version))
10356 (sha256
10357 (base32
10358 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10359 (build-system python-build-system)
e9127525
MB
10360 (native-inputs
10361 `(("python-pytest" ,python-pytest)))
1f2b62a4
SB
10362 (home-page "http://github.com/jpvanhal/inflection")
10363 (synopsis "Python string transformation library")
10364 (description
10365 "Inflection is a string transformation library. It singularizes
10366and pluralizes English words, and transforms strings from CamelCase to
10367underscored string.")
10368 (license license:expat)))
10369
10370(define-public python2-inflection
10371 (package-with-python2 python-inflection))
10372
18995566
SB
10373(define-public python-pylev
10374 (package
10375 (name "python-pylev")
10376 (version "1.3.0")
10377 (source (origin
10378 (method url-fetch)
10379 (uri (pypi-uri "pylev" version))
10380 (sha256
10381 (base32
10382 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10383 (build-system python-build-system)
18995566
SB
10384 (home-page "http://github.com/toastdriven/pylev")
10385 (synopsis "Levenshtein distance implementation in Python")
10386 (description "Pure Python Levenshtein implementation, based off the
10387Wikipedia code samples at
10388@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10389 (license license:bsd-3)))
18995566
SB
10390
10391(define-public python2-pylev
10392 (package-with-python2 python-pylev))
10393
f5deff7a
SB
10394(define-public python-cleo
10395 (package
10396 (name "python-cleo")
10397 (version "0.4.1")
10398 (source (origin
10399 (method url-fetch)
10400 (uri (pypi-uri "cleo" version))
10401 (sha256
10402 (base32
10403 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10404 (build-system python-build-system)
10405 (native-inputs
f3b98f4f 10406 `(;; For testing
f5deff7a
SB
10407 ("python-mock" ,python-mock)
10408 ("python-pytest" ,python-pytest)))
9403150a
SB
10409 (propagated-inputs
10410 `(("python-psutil" ,python-psutil)
10411 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10412 (home-page "https://github.com/sdispater/cleo")
10413 (synopsis "Command-line arguments library for Python")
10414 (description
10415 "Cleo allows you to create command-line commands with signature in
10416docstring and colored output.")
10417 (license license:expat)))
10418
10419(define-public python2-cleo
10420 (package-with-python2 python-cleo))
10421
77cadb43
SB
10422(define-public python-lazy-object-proxy
10423 (package
10424 (name "python-lazy-object-proxy")
10425 (version "1.2.2")
10426 (source (origin
10427 (method url-fetch)
10428 (uri (pypi-uri "lazy-object-proxy" version))
10429 (sha256
10430 (base32
10431 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10432 (build-system python-build-system)
77cadb43
SB
10433 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10434 (synopsis "Lazy object proxy for python")
10435 (description
10436 "Lazy object proxy is an object that wraps a callable but defers the call
10437until the object is actually required, and caches the result of said call.")
3f641af0 10438 (license license:bsd-2)))
77cadb43
SB
10439
10440(define-public python2-lazy-object-proxy
10441 (package-with-python2 python-lazy-object-proxy))
10442
5477e05f
SB
10443(define-public python-dnspython
10444 (package
10445 (name "python-dnspython")
6c514128 10446 (version "1.15.0")
5477e05f
SB
10447 (source (origin
10448 (method url-fetch)
10449 (uri (string-append "http://www.dnspython.org/kits/"
10450 version "/dnspython-" version ".tar.gz"))
10451 (sha256
10452 (base32
6c514128 10453 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10454 (build-system python-build-system)
10455 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
10456 (home-page "http://www.dnspython.org")
10457 (synopsis "DNS toolkit for Python")
10458 (description
10459 "dnspython is a DNS toolkit for Python. It supports almost all record
10460types. It can be used for queries, zone transfers, and dynamic updates.
10461It supports TSIG authenticated messages and EDNS0.")
10462 (license license:expat)))
10463
10464(define-public python2-dnspython
10465 (package-with-python2 python-dnspython))
10466
22711e25
SB
10467(define-public python-email-validator
10468 (package
10469 (name "python-email-validator")
10470 (version "1.0.1")
10471 (source
10472 (origin (method url-fetch)
10473 (uri (pypi-uri "email_validator" version))
10474 (sha256
10475 (base32
10476 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10477 (build-system python-build-system)
10478 (arguments
10479 '(#:phases
10480 (modify-phases %standard-phases
10481 (add-before 'build 'use-dnspython
10482 (lambda _
10483 (substitute* "setup.py"
10484 (("dnspython3") "dnspython"))
10485 #t)))))
d42560bd 10486 (propagated-inputs
22711e25 10487 `(("python-dnspython" ,python-dnspython)
d42560bd 10488 ("python-idna" ,python-idna)))
22711e25
SB
10489 (home-page "https://github.com/JoshData/python-email-validator")
10490 (synopsis "Email address validation library for Python")
10491 (description
10492 "This library validates email address syntax and deliverability.")
3f641af0 10493 (license license:cc0)))
22711e25
SB
10494
10495(define-public python2-email-validator
10496 (package-with-python2 python-email-validator))
10497
8987d91e
SB
10498(define-public python-ukpostcodeparser
10499 (package
10500 (name "python-ukpostcodeparser")
10501 (version "1.0.3")
10502 (source (origin
10503 (method url-fetch)
10504 (uri (pypi-uri "UkPostcodeParser" version))
10505 (sha256
10506 (base32
10507 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10508 (build-system python-build-system)
8987d91e
SB
10509 (home-page "https://github.com/hamstah/ukpostcodeparser")
10510 (synopsis "UK Postcode parser for Python")
10511 (description
10512 "This library provides the @code{parse_uk_postcode} function for
10513parsing UK postcodes.")
10514 (license license:expat)))
10515
10516(define-public python2-ukpostcodeparser
10517 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10518
10519(define-public python-fake-factory
10520 (package
10521 (name "python-fake-factory")
7adc698f 10522 (version "0.7.2")
ea92ae01
SB
10523 (source (origin
10524 (method url-fetch)
10525 (uri (pypi-uri "fake-factory" version))
10526 (sha256
10527 (base32
7adc698f 10528 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10529 (build-system python-build-system)
b7f3ea95
MB
10530 (arguments
10531 '(#:phases
10532 (modify-phases %standard-phases
10533 (replace 'check
10534 (lambda _
10535 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
ea92ae01 10536 (native-inputs
f3b98f4f 10537 `(;; For testing
ea92ae01
SB
10538 ("python-email-validator" ,python-email-validator)
10539 ("python-mock" ,python-mock)
10540 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
10541 (propagated-inputs
10542 `(("python-dateutil" ,python-dateutil-2)
10543 ("python-six" ,python-six)))
7adc698f 10544 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10545 (synopsis "Python package that generates fake data")
10546 (description
10547 "Faker is a Python package that generates fake data such as names,
10548addresses, and phone numbers.")
10549 (license license:expat)
10550 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10551
10552(define-public python2-fake-factory
10553 (let ((base (package-with-python2 (strip-python2-variant
10554 python-fake-factory))))
10555 (package
10556 (inherit base)
24c9aa18 10557 (propagated-inputs
ea92ae01 10558 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10559 ,@(package-propagated-inputs base))))))
ea92ae01 10560
b49504fd
SB
10561(define-public python-pyaml
10562 (package
10563 (name "python-pyaml")
10564 (version "15.8.2")
10565 (source (origin
10566 (method url-fetch)
10567 (uri (pypi-uri "pyaml" version))
10568 (sha256
10569 (base32
10570 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10571 (build-system python-build-system)
f620311a
MB
10572 (native-inputs
10573 `(("python-unidecode" ,python-unidecode)))
b49504fd
SB
10574 (propagated-inputs
10575 `(("python-pyyaml" ,python-pyyaml)))
10576 (home-page "https://github.com/mk-fg/pretty-yaml")
10577 (synopsis "YAML pretty-print library for Python")
10578 (description
10579 "pyaml is a PyYAML based python module to produce pretty and readable
10580YAML-serialized data.")
3f641af0 10581 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10582
10583(define-public python2-pyaml
10584 (package-with-python2 python-pyaml))
10585
347175a2
SB
10586(define-public python-flexmock
10587 (package
10588 (name "python-flexmock")
10589 (version "0.10.2")
10590 (source (origin
10591 (method url-fetch)
10592 (uri (pypi-uri "flexmock" version))
10593 (sha256
10594 (base32
10595 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10596 (build-system python-build-system)
347175a2
SB
10597 (home-page "https://flexmock.readthedocs.org")
10598 (synopsis "Testing library for Python")
10599 (description
10600 "flexmock is a testing library for Python that makes it easy to create
10601mocks, stubs and fakes.")
3f641af0 10602 (license license:bsd-3)))
347175a2
SB
10603
10604(define-public python2-flexmock
10605 (package-with-python2 python-flexmock))
10606
5a744191
SB
10607(define-public python-orator
10608 (package
10609 (name "python-orator")
10610 (version "0.8.2")
10611 (source (origin
10612 (method url-fetch)
10613 (uri (pypi-uri "orator" version))
10614 (sha256
10615 (base32
10616 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10617 (build-system python-build-system)
10618 (arguments '(#:tests? #f)) ; no tests
b2676030 10619 (propagated-inputs
5a744191
SB
10620 `(("python-arrow" ,python-arrow)
10621 ("python-blinker" ,python-blinker)
10622 ("python-cleo" ,python-cleo)
10623 ("python-fake-factory" ,python-fake-factory)
10624 ("python-inflection" ,python-inflection)
10625 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10626 ("python-pyaml" ,python-pyaml)
5a744191
SB
10627 ("python-simplejson" ,python-simplejson)
10628 ("python-wrapt" ,python-wrapt)))
10629 (home-page "https://orator-orm.com/")
10630 (synopsis "ActiveRecord ORM for Python")
10631 (description
10632 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10633implementation for Python.")
10634 (license license:expat)
10635 (properties `((python2-variant . ,(delay python2-orator))))))
10636
10637(define-public python2-orator
10638 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10639 (package
10640 (inherit base)
06961617 10641 (propagated-inputs
5a744191 10642 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10643 ,@(package-propagated-inputs base))))))
f4155188
DM
10644
10645(define-public python-prompt-toolkit
10646 (package
10647 (name "python-prompt-toolkit")
d15e2ef0 10648 (version "1.0.7")
f4155188
DM
10649 (source
10650 (origin
10651 (method url-fetch)
d15e2ef0 10652 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10653 (sha256
10654 (base32
d15e2ef0 10655 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188 10656 (build-system python-build-system)
bae18710
LF
10657 (arguments
10658 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
10659 (propagated-inputs
10660 `(("python-wcwidth" ,python-wcwidth)
2c199b55 10661 ("python-six" ,python-six)
f22efa01 10662 ("python-pygments" ,python-pygments)))
f4155188
DM
10663 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10664 (synopsis "Library for building command line interfaces in Python")
10665 (description
10666 "Prompt-Toolkit is a library for building interactive command line
10667interfaces in Python. It's like GNU Readline but it also features syntax
10668highlighting while typing, out-of-the-box multi-line input editing, advanced
10669code completion, incremental search, support for Chinese double-width
10670characters, mouse support, and auto suggestions.")
f210e944 10671 (license license:bsd-3)))
f4155188
DM
10672
10673(define-public python2-prompt-toolkit
f210e944 10674 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
10675
10676(define-public python-jedi
10677 (package
10678 (name "python-jedi")
10679 (version "0.9.0")
10680 (source
10681 (origin
10682 (method url-fetch)
10683 (uri (pypi-uri "jedi" version))
10684 (sha256
10685 (base32
10686 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10687 (build-system python-build-system)
bfce8a34
MB
10688 (arguments
10689 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
10690 '(#:tests? #f))
10691 (native-inputs
10692 `(("python-pytest" ,python-pytest)))
a502dfbf
DM
10693 (home-page "https://github.com/davidhalter/jedi")
10694 (synopsis
10695 "Autocompletion for Python that can be used for text editors")
10696 (description
10697 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 10698 (license license:expat)))
a502dfbf
DM
10699
10700(define-public python2-jedi
f210e944 10701 (package-with-python2 python-jedi))
c2f0dc6e
DM
10702
10703(define-public ptpython
10704 (package
10705 (name "ptpython")
10706 (version "0.34")
10707 (source (origin
10708 (method url-fetch)
10709 (uri (pypi-uri "ptpython" version))
10710 (sha256
10711 (base32
10712 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10713 (build-system python-build-system)
f22efa01 10714 (propagated-inputs
c2f0dc6e
DM
10715 `(("python-docopt" ,python-docopt)
10716 ("python-jedi" ,python-jedi)
10717 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 10718 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
10719 (home-page "https://github.com/jonathanslenders/ptpython")
10720 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10721 (description
10722 "ptpython is a Python read-eval-print loop with IDE-like features.
10723It supports syntax highlighting, multiline editing, autocompletion, mouse,
10724color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10725etc.")
3f641af0 10726 (license license:bsd-3)
c2f0dc6e
DM
10727 (properties `((python2-variant . ,(delay ptpython-2))))))
10728
10729(define-public ptpython-2
10730 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10731 (package
10732 (inherit base)
10733 (name "ptpython2"))))
b227f0be 10734
b04a52a6
DJ
10735(define-public python-requests-oauthlib
10736 (package
10737 (name "python-requests-oauthlib")
10738 (version "0.6.2")
10739 (source
10740 (origin
10741 (method url-fetch)
10742 (uri (pypi-uri "requests-oauthlib" version))
10743 (sha256
10744 (base32
10745 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10746 (build-system python-build-system)
10747 (arguments
10748 `(#:phases
10749 (modify-phases %standard-phases
10750 ;; removes tests that require network access
10751 (add-before 'check 'pre-check
10752 (lambda _
10753 (delete-file "tests/test_core.py")
10754 #t)))))
10755 (native-inputs
10756 `(("python-requests-mock" ,python-requests-mock)
10757 ("python-mock" ,python-mock)))
f22efa01 10758 (propagated-inputs
b04a52a6
DJ
10759 `(("python-oauthlib" ,python-oauthlib)
10760 ("python-requests" ,python-requests)))
10761 (home-page
10762 "https://github.com/requests/requests-oauthlib")
10763 (synopsis
10764 "OAuthlib authentication support for Requests")
10765 (description
10766 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10767provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 10768 (license license:isc)))
b04a52a6
DJ
10769
10770(define-public python2-requests-oauthlib
f210e944 10771 (package-with-python2 python-requests-oauthlib))
b04a52a6 10772
b227f0be 10773(define-public python-stem
10774 (package
10775 (name "python-stem")
10776 (version "1.4.1b")
10777 (source
10778 (origin
10779 (method url-fetch)
10780 (uri (pypi-uri "stem" version ".tar.bz2"))
10781 (sha256
10782 (base32
10783 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10784 (build-system python-build-system)
10785 (arguments
10786 `(#:phases
10787 (modify-phases %standard-phases
10788 (replace 'check
10789 (lambda _
10790 (zero? (system* "./run_tests.py" "--unit")))))))
10791 (native-inputs
10792 `(("python-mock" ,python-mock)
10793 ("python-pep8" ,python-pep8)
10794 ("python-pyflakes" ,python-pyflakes)))
f22efa01 10795 (propagated-inputs
b227f0be 10796 `(("python-pycrypto" ,python-pycrypto)))
10797 (home-page "https://stem.torproject.org/")
10798 (synopsis
10799 "Python controller library that allows applications to interact with Tor")
10800 (description
10801 "Stem is a Python controller library for Tor. With it you can use Tor's
10802control protocol to script against the Tor process and read descriptor data
10803relays publish about themselves.")
3f641af0 10804 (license license:lgpl3)))
b227f0be 10805
10806(define-public python2-stem
10807 (package-with-python2 python-stem))
517a6c0c
DM
10808
10809(define-public python-pyserial
10810 (package
10811 (name "python-pyserial")
10812 (version "3.1.1")
10813 (source
10814 (origin
10815 (method url-fetch)
10816 (uri (pypi-uri "pyserial" version))
10817 (sha256
10818 (base32
10819 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10820 (build-system python-build-system)
10821 (home-page
10822 "https://github.com/pyserial/pyserial")
10823 (synopsis "Python Serial Port Bindings")
10824 (description "@code{pyserial} provide serial port bindings for Python. It
10825supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10826and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 10827 (license license:bsd-3)))
517a6c0c
DM
10828
10829(define-public python2-pyserial
f210e944 10830 (package-with-python2 python-pyserial))
6eb7af2a
DJ
10831
10832(define-public python-kivy
10833 (package
10834 (name "python-kivy")
10835 (version "1.9.1")
10836 (source
10837 (origin
10838 (method url-fetch)
10839 (uri (pypi-uri "kivy" version))
10840 (file-name (string-append name "-" version ".tar.gz"))
10841 (sha256
10842 (base32
10843 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10844 (build-system python-build-system)
10845 (arguments
10846 `(#:tests? #f ; Tests require many optional packages
10847 #:phases
10848 (modify-phases %standard-phases
10849 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10850 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10851 (lambda* (#:key inputs #:allow-other-keys)
10852 (setenv "KIVY_SDL2_PATH"
10853 (string-append (assoc-ref inputs "sdl-union")
10854 "/include/SDL2"))
10855 #t)))))
10856 (native-inputs
f2516de2
HG
10857 `(("pkg-config" ,pkg-config)
10858 ("python-cython" ,python-cython)))
6eb7af2a 10859 (inputs
f2516de2 10860 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
10861 ("mesa" ,mesa)
10862 ("sdl-union"
10863 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10864 (home-page "http://kivy.org")
10865 (synopsis
10866 "Multitouch application framework")
10867 (description
10868 "A software library for rapid development of
10869hardware-accelerated multitouch applications.")
10870 (license license:expat)))
10871
10872(define-public python2-kivy
10873 (package-with-python2 python-kivy))
10874
10875(define-public python-kivy-next
10876 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10877 (revision "1"))
10878 (package (inherit python-kivy)
10879 (name "python-kivy-next")
d80a71eb 10880 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
10881 (string-take commit 7)))
10882 (source
10883 (origin
10884 (method git-fetch)
10885 (uri (git-reference
10886 (url "https://github.com/kivy/kivy")
10887 (commit commit)))
10888 (file-name (string-append name "-" version "-checkout"))
10889 (sha256
10890 (base32
10891 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10892
10893(define-public python2-kivy-next
10894 (package-with-python2 python-kivy-next))
8794bd8b
DC
10895
10896(define-public python-binaryornot
10897 (package
10898 (name "python-binaryornot")
10899 (version "0.4.0")
10900 (source (origin
10901 (method url-fetch)
10902 (uri (pypi-uri "binaryornot" version))
10903 (sha256
10904 (base32
10905 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10906 (build-system python-build-system)
f22efa01 10907 (propagated-inputs
8794bd8b
DC
10908 `(("python-chardet" ,python-chardet)
10909 ("python-hypothesis" ,python-hypothesis)))
10910 (home-page "https://github.com/audreyr/binaryornot")
10911 (synopsis "Package to check if a file is binary or text")
10912 (description "Ultra-lightweight pure Python package to check if a file is
10913binary or text.")
10914 (license license:bsd-3)
10915 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10916
10917(define-public python2-binaryornot
10918 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10919 (package (inherit base)
f22efa01 10920 (propagated-inputs
8794bd8b 10921 `(("python2-enum34" ,python2-enum34)
f22efa01 10922 ,@(package-propagated-inputs base))))))
a9ac982a
DC
10923
10924(define-public python-nltk
10925 (package
10926 (name "python-nltk")
10927 (version "3.2.1")
10928 (source (origin
10929 (method url-fetch)
10930 (uri (pypi-uri "nltk" version))
10931 (sha256
10932 (base32
10933 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10934 (build-system python-build-system)
59f12985
LF
10935 (arguments
10936 '(;; The tests require some extra resources to be downloaded.
10937 ;; TODO Try packaging these resources.
10938 #:tests? #f))
a9ac982a
DC
10939 (home-page "http://nltk.org/")
10940 (synopsis "Natural Language Toolkit")
10941 (description "It provides interfaces to over 50 corpora and lexical
10942resources such as WordNet, along with a suite of text processing libraries
10943for classification, tokenization, stemming, tagging, parsing, and semantic
10944reasoning, wrappers for natural language processing libraries.")
f210e944 10945 (license license:asl2.0)))
a9ac982a
DC
10946
10947(define-public python2-nltk
f210e944 10948 (package-with-python2 python-nltk))
691cd90d
DC
10949
10950(define-public python-pymongo
10951 (package
10952 (name "python-pymongo")
10953 (version "3.3.0")
10954 (source (origin
10955 (method url-fetch)
10956 (uri (pypi-uri "pymongo" version))
10957 (sha256
10958 (base32
10959 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10960 (build-system python-build-system)
f22efa01 10961 (propagated-inputs
691cd90d
DC
10962 `(("python-certifi" ,python-certifi)))
10963 (home-page "http://github.com/mongodb/mongo-python-driver")
10964 (synopsis "Python driver for MongoDB")
10965 (description "Python driver for MongoDB.")
f210e944 10966 (license license:asl2.0)))
691cd90d
DC
10967
10968(define-public python2-pymongo
f210e944 10969 (package-with-python2 python-pymongo))
6a6c9d43
DC
10970
10971(define-public python-sh
10972 (package
10973 (name "python-sh")
10974 (version "1.11")
10975 (source (origin
10976 (method url-fetch)
10977 (uri (pypi-uri "sh" version))
10978 (sha256
10979 (base32
10980 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10981 (build-system python-build-system)
10982 (arguments
10983 `(#:tests? #f)) ; no tests
10984 (home-page "https://github.com/amoffat/sh")
10985 (synopsis "Python subprocess interface")
10986 (description "Abstracts process invocation by providing a function
10987interface for programs.")
f210e944 10988 (license license:expat)))
6a6c9d43
DC
10989
10990(define-public python2-sh
f210e944 10991 (package-with-python2 python-sh))
05b59190 10992
25702397
EF
10993(define-public python-consul
10994 (package
10995 (name "python-consul")
10996 (version "0.6.1")
10997 (source
10998 (origin
10999 (method url-fetch)
11000 (uri (pypi-uri "python-consul" version))
11001 (sha256
11002 (base32
11003 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11004 (build-system python-build-system)
11005 (native-inputs
fd1d6de7
HG
11006 `(("python-pytest" ,python-pytest)))
11007 (propagated-inputs
11008 `(("python-requests" ,python-requests)
25702397
EF
11009 ("python-six" ,python-six)))
11010 (home-page "https://github.com/cablehead/python-consul")
11011 (synopsis "Python client for Consul")
11012 (description
11013 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11014discovery, monitoring and configuration.")
11015 (license license:expat)))
11016
11017(define-public python2-consul
f210e944 11018 (package-with-python2 python-consul))
25702397 11019
05b59190
DC
11020(define-public python-schematics
11021 (package
11022 (name "python-schematics")
11023 (version "1.1.1")
11024 (source
11025 (origin
11026 (method url-fetch)
11027 (uri (string-append
11028 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
11029 (file-name (string-append name "-" version ".tar.gz"))
11030 (sha256
11031 (base32
11032 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
11033 (build-system python-build-system)
f22efa01 11034 (propagated-inputs
05b59190
DC
11035 `(("python-six" ,python-six)))
11036 (arguments
11037 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
11038 ; version requirements (eg python-coveralls)
11039 (home-page "https://github.com/schematics/schematics")
11040 (synopsis "Python Data Structures for Humans")
11041 (description "Python Data Structures for Humans.")
f210e944 11042 (license license:bsd-3)))
05b59190
DC
11043
11044(define-public python2-schematics
f210e944 11045 (package-with-python2 python-schematics))
d6907ff7
DC
11046
11047(define-public python-publicsuffix
11048 (package
11049 (name "python-publicsuffix")
11050 (version "1.1.0")
11051 (source (origin
11052 (method url-fetch)
11053 (uri (pypi-uri "publicsuffix" version))
11054 (sha256
11055 (base32
11056 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
11057 (build-system python-build-system)
11058 (arguments
11059 `(#:tests? #f)) ; tests use the internet
11060 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
11061 (synopsis "Get suffix for a domain name")
11062 (description "Get a public suffix for a domain name using the Public Suffix
11063List.")
f210e944 11064 (license license:expat)))
d6907ff7
DC
11065
11066(define-public python2-publicsuffix
f210e944 11067 (package-with-python2 python-publicsuffix))
b2319996
DC
11068
11069(define-public python-publicsuffix2
11070 (package
11071 (name "python-publicsuffix2")
11072 (version "2.20160621")
11073 (source
11074 (origin
11075 (method url-fetch)
11076 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
11077 (sha256
11078 (base32
11079 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
11080 (build-system python-build-system)
10797a0a
LF
11081 (arguments
11082 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
11083 (home-page "https://github.com/pombredanne/python-publicsuffix2")
11084 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
11085 (description "Get a public suffix for a domain name using the Public Suffix
11086List. Forked from and using the same API as the publicsuffix package.")
f210e944 11087 (license (list license:expat license:mpl2.0))))
b2319996
DC
11088
11089(define-public python2-publicsuffix2
f210e944 11090 (package-with-python2 python-publicsuffix2))
81f1515d
DC
11091
11092(define-public python-url
11093 (package
11094 (name "python-url")
11095 (version "0.2.0")
11096 (source (origin
11097 (method url-fetch)
11098 (uri (pypi-uri "url" version))
11099 (sha256
11100 (base32
11101 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
11102 (build-system python-build-system)
f22efa01 11103 (propagated-inputs
81f1515d
DC
11104 `(("python-publicsuffix" ,python-publicsuffix)))
11105 (native-inputs
11106 `(("python-coverage" ,python-coverage)
11107 ("python-nose" ,python-nose)))
11108 (arguments
11109 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
11110 (home-page "http://github.com/seomoz/url-py")
11111 (synopsis "URL Parsing")
11112 (description "Library for parsing urls.")
11113 (license license:expat)
11114 (properties `((python2-variant . ,(delay python2-url))))))
11115
11116(define-public python2-url
11117 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11118 (package (inherit base)
f22efa01 11119 (propagated-inputs
f210e944 11120 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
11121
11122(define-public python-freezegun
11123 (package
11124 (name "python-freezegun")
11125 (version "0.3.7")
11126 (source
11127 (origin
11128 (method url-fetch)
11129 (uri (pypi-uri "freezegun" version))
11130 (sha256
11131 (base32
11132 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
11133 (build-system python-build-system)
11134 (native-inputs
11135 `(("python-mock" ,python-mock)
11136 ("python-nose" ,python-nose)
4e096968 11137 ("python-coverage" ,python-coverage)))
f22efa01 11138 (propagated-inputs
4e096968
HG
11139 `(("python-six" ,python-six)
11140 ("python-dateutil-2" ,python-dateutil-2)))
974ee2c1
TS
11141 (arguments
11142 `(#:phases (modify-phases %standard-phases
11143 ;; The tests are normally executed via `make test`, but the PyPi
11144 ;; package does not include the Makefile.
11145 (replace 'check
11146 (lambda _
11147 (zero? (system* "nosetests" "./tests/")))))))
11148 (home-page "https://github.com/spulec/freezegun")
11149 (synopsis "Test utility for mocking the datetime module")
11150 (description
11151 "FreezeGun is a library that allows your python tests to travel through
11152time by mocking the datetime module.")
11153 (license license:asl2.0)))
11154
11155(define-public python2-freezegun
f210e944
HG
11156 (package-with-python2 python-freezegun))
11157
dddcb25c
MB
11158
11159(define-public python-odfpy
11160 (package
11161 (name "python-odfpy")
11162 (version "1.3.3")
11163 (source (origin
11164 (method url-fetch)
11165 (uri (pypi-uri "odfpy" version))
11166 (sha256
11167 (base32
11168 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11169 (arguments
11170 `(#:modules ((srfi srfi-1)
11171 (guix build python-build-system)
11172 (guix build utils))
11173 #:phases
11174 (modify-phases %standard-phases
11175 (replace 'check
11176 ;; The test runner invokes python2 and python3 for test*.py.
11177 ;; To avoid having both in inputs, we replicate it here.
11178 (lambda _
11179 (every (lambda (test-file)
11180 (zero? (system* "python" test-file)))
11181 (find-files "tests" "^test.*\\.py$")))))))
11182 (build-system python-build-system)
11183 (home-page "https://github.com/eea/odfpy")
11184 (synopsis "Python API and tools to manipulate OpenDocument files")
11185 (description "Collection of libraries and utility programs written in
11186Python to manipulate OpenDocument 1.2 files.")
11187 (license
11188 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11189 ;; number of files with other licenses.
11190 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11191
11192(define-public python2-odfpy
11193 (package-with-python2 python-odfpy))
b30565bd
MB
11194
11195(define-public python-cachecontrol
11196 (package
11197 (name "python-cachecontrol")
11198 (version "0.11.6")
11199 (source
11200 (origin
11201 (method url-fetch)
11202 ;; Pypi does not have tests.
11203 (uri (string-append
11204 "https://github.com/ionrock/cachecontrol/archive/v"
11205 version ".tar.gz"))
11206 (file-name (string-append name "-" version ".tar.gz"))
11207 (sha256
11208 (base32
11209 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11210 (build-system python-build-system)
11211 (arguments
11212 `(#:phases
11213 (modify-phases %standard-phases
11214 (replace 'check
11215 (lambda _
11216 ;; Drop test that requires internet access.
11217 (delete-file "tests/test_regressions.py")
11218 (setenv "PYTHONPATH"
11219 (string-append (getcwd) "/build/lib:"
11220 (getenv "PYTHONPATH")))
11221 (zero? (system* "py.test" "-vv")))))))
11222 (native-inputs
11223 `(("python-pytest" ,python-pytest)
11224 ("python-redis" ,python-redis)
11225 ("python-webtest" ,python-webtest)
11226 ("python-mock" ,python-mock)))
11227 (propagated-inputs
11228 `(("python-requests" ,python-requests)
11229 ("python-lockfile" ,python-lockfile)))
11230 (home-page "https://github.com/ionrock/cachecontrol")
11231 (synopsis "The httplib2 caching algorithms for use with requests")
11232 (description "CacheControl is a port of the caching algorithms in
11233@code{httplib2} for use with @code{requests} session objects.")
f210e944 11234 (license license:asl2.0)))
b30565bd
MB
11235
11236(define-public python2-cachecontrol
f210e944 11237 (package-with-python2 python-cachecontrol))
243db824
DM
11238
11239(define-public python-lit
11240 (package
11241 (name "python-lit")
11242 (version "0.5.0")
11243 (source
11244 (origin
11245 (method url-fetch)
11246 (uri (pypi-uri "lit" version))
11247 (sha256
11248 (base32
11249 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11250 (build-system python-build-system)
11251 (home-page "http://llvm.org/")
11252 (synopsis "LLVM Software Testing Tool")
11253 (description "@code{lit} is a portable tool for executing LLVM and Clang
11254style test suites, summarizing their results, and providing indication of
11255failures.")
f210e944 11256 (license license:ncsa)))
243db824
DM
11257
11258(define-public python2-lit
f210e944 11259 (package-with-python2 python-lit))
66f95b20
MB
11260
11261(define-public python-pytest-pep8
11262 (package
11263 (name "python-pytest-pep8")
11264 (version "1.0.6")
11265 (source (origin
11266 (method url-fetch)
11267 (uri (pypi-uri "pytest-pep8" version))
11268 (sha256
11269 (base32
11270 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11271 (build-system python-build-system)
11272 (arguments
b41a05ce 11273 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
11274 (native-inputs
11275 `(("python-pytest" ,python-pytest)))
11276 (propagated-inputs
11277 `(("python-pep8" ,python-pep8)))
11278 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11279 (synopsis "Py.test plugin to check PEP8 requirements")
11280 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 11281 (license license:expat)))
66f95b20
MB
11282
11283(define-public python2-pytest-pep8
f210e944 11284 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
11285
11286(define-public python-pytest-flakes
11287 (package
11288 (name "python-pytest-flakes")
11289 (version "1.0.1")
11290 (source (origin
11291 (method url-fetch)
11292 (uri (pypi-uri "pytest-flakes" version))
11293 (sha256
11294 (base32
11295 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11296 (build-system python-build-system)
11297 (arguments
b41a05ce 11298 `(#:phases
df94a6b5
MB
11299 (modify-phases %standard-phases
11300 (delete 'check)
11301 (add-after 'install 'check
05c2fd36
HG
11302 (lambda* (#:key outputs inputs #:allow-other-keys)
11303 ;; It's easier to run tests after install.
11304 ;; Make installed package available for running the tests
11305 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
11306 (zero? (system* "py.test" "-vv")))))))
11307 (native-inputs
11308 `(("python-coverage" ,python-coverage)
11309 ("python-pytest" ,python-pytest)
11310 ("python-pytest-cache" ,python-pytest-cache)
11311 ("python-pytest-pep8" ,python-pytest-pep8)))
11312 (propagated-inputs
11313 `(("python-pyflakes" ,python-pyflakes)))
11314 (home-page "https://github.com/fschulze/pytest-flakes")
11315 (synopsis "Py.test plugin to check source code with pyflakes")
11316 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 11317 (license license:expat)))
df94a6b5
MB
11318
11319(define-public python2-pytest-flakes
f210e944 11320 (package-with-python2 python-pytest-flakes))
5467ea62
MB
11321
11322(define-public python-natsort
11323 (package
11324 (name "python-natsort")
11325 (version "5.0.1")
11326 (source (origin
11327 (method url-fetch)
11328 (uri (pypi-uri "natsort" version))
11329 (sha256
11330 (base32
11331 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11332 (build-system python-build-system)
11333 (arguments
11334 `(#:phases
11335 (modify-phases %standard-phases
11336 (add-before 'check 'set-cachedir
11337 ;; Tests require write access to $HOME by default
11338 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11339 (native-inputs
11340 `(("python-hypothesis" ,python-hypothesis)
11341 ("python-pytest-cache" ,python-pytest-cache)
11342 ("python-pytest-cov" ,python-pytest-cov)
11343 ("python-pytest-flakes" ,python-pytest-flakes)
11344 ("python-pytest-pep8" ,python-pytest-pep8)))
11345 (propagated-inputs ; TODO: Add python-fastnumbers.
11346 `(("python-pyicu" ,python-pyicu)))
11347 (home-page "https://github.com/SethMMorton/natsort")
11348 (synopsis "Natural sorting for python and shell")
11349 (description
11350 "Natsort lets you apply natural sorting on lists instead of
11351lexicographical. If you use the built-in @code{sorted} method in python
11352on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11353returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11354function @code{natsorted} that identifies numbers and sorts them separately
11355from strings. It can also sort version numbers, real numbers, mixed types
11356and more, and comes with a shell command @command{natsort} that exposes this
11357functionality in the command line.")
11358 (license license:expat)
11359 (properties `((python2-variant . ,(delay python2-natsort))))))
11360
11361(define-public python2-natsort
11362 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11363 (package (inherit base)
11364 (native-inputs
00e10c6e 11365 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
11366 ("python2-mock" ,python2-mock)
11367 ("python2-enum34" ,python2-enum34)
11368 ,@(package-native-inputs base))))))
4efb9c54
SR
11369
11370(define-public python-glances
11371 (package
11372 (name "python-glances")
11373 (version "2.7.1")
11374 (source
11375 (origin
11376 (method url-fetch)
11377 (uri (pypi-uri "Glances" version))
11378 (sha256
11379 (base32
11380 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11381 (build-system python-build-system)
f22efa01 11382 (propagated-inputs
4efb9c54
SR
11383 `(("python-psutil" ,python-psutil)))
11384 (home-page
11385 "https://github.com/nicolargo/glances")
11386 (synopsis
11387 "A cross-platform curses-based monitoring tool")
11388 (description
11389 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11390Glances uses the PsUtil library to get information from your system. It monitors
11391CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 11392 (license license:lgpl3+)))
4efb9c54
SR
11393
11394(define-public python2-glances
f210e944 11395 (package-with-python2 python-glances))
05b7a593
EF
11396
11397(define-public python-graphql-core
11398 (package
11399 (name "python-graphql-core")
11400 (version "0.5.3")
11401 (source
11402 (origin
11403 (method url-fetch)
11404 (uri (pypi-uri "graphql-core" version))
11405 (sha256
11406 (base32
11407 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11408 (build-system python-build-system)
11409 (arguments
326f8285
LF
11410 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11411 #:phases
05b7a593
EF
11412 (modify-phases %standard-phases
11413 (add-after 'unpack 'patch-hardcoded-version
11414 (lambda _ (substitute*
11415 "setup.py"
11416 (("'gevent==1.1rc1'") "'gevent'"))
11417 #t)))))
11418 (native-inputs
11419 `(("python-gevent" ,python-gevent)
11420 ("python-mock" ,python-mock)
11421 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 11422 (propagated-inputs
05b7a593
EF
11423 `(("python-promise" ,python-promise)
11424 ("python-six" ,python-six)))
11425 (home-page "https://github.com/graphql-python/graphql-core")
11426 (synopsis "GraphQL implementation for Python")
11427 (description
11428 "GraphQL implementation for Python. GraphQL is a data query language and
11429runtime designed and used to request and deliver data to mobile and web apps.
11430This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11431to Python.")
05b7a593
EF
11432 (license license:expat)))
11433
11434(define-public python2-graphql-core
f210e944 11435 (package-with-python2 python-graphql-core))
7ee51575
EF
11436
11437(define-public python-graphql-relay
11438 (package
11439 (name "python-graphql-relay")
11440 (version "0.4.4")
11441 (source
11442 (origin
11443 (method url-fetch)
11444 (uri (pypi-uri "graphql-relay" version))
11445 (sha256
11446 (base32
11447 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11448 (build-system python-build-system)
11449 (native-inputs
11450 `(("python-pytest" ,python-pytest)))
f22efa01 11451 (propagated-inputs
7ee51575
EF
11452 `(("python-graphql-core" ,python-graphql-core)
11453 ("python-promise" ,python-promise)
11454 ("python-six" ,python-six)))
11455 (home-page "https://github.com/graphql-python/graphql-relay-py")
11456 (synopsis "Relay implementation for Python")
11457 (description
11458 "This is a library to allow the easy creation of Relay-compliant servers
11459using the GraphQL Python reference implementation of a GraphQL server. It
11460should be noted that the code is a exact port of the original
11461@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11462from Facebook.")
7ee51575
EF
11463 (license license:expat)))
11464
11465(define-public python2-graphql-relay
f210e944 11466 (package-with-python2 python-graphql-relay))
ddc63a56
EF
11467
11468(define-public python-graphene
11469 (package
11470 (name "python-graphene")
11471 (version "0.10.2")
11472 (source
11473 (origin
11474 (method url-fetch)
11475 (uri (pypi-uri "graphene" version))
11476 (sha256
11477 (base32
11478 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11479 (build-system python-build-system)
11480 (native-inputs
11481 `(("python-django-filter" ,python-django-filter)
11482 ("python-mock" ,python-mock)
11483 ("python-psycopg2" ,python-psycopg2)
11484 ("python-pytest-django" ,python-pytest-django)
11485 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 11486 (propagated-inputs
ddc63a56
EF
11487 `(("python-graphql-core" ,python-graphql-core)
11488 ("python-graphql-relay" ,python-graphql-relay)
11489 ("python-iso8601" ,python-iso8601)
11490 ("python-promise" ,python-promise)
11491 ("python-six" ,python-six)))
11492 (home-page "http://graphene-python.org/")
11493 (synopsis "GraphQL Framework for Python")
11494 (description
11495 "Graphene is a Python library for building GraphQL schemas/types.
11496A GraphQL schema describes your data model, and provides a GraphQL server
11497with an associated set of resolve methods that know how to fetch data.")
11498 (properties `((python2-variant . ,(delay python2-graphene))))
11499 (license license:expat)))
11500
11501(define-public python2-graphene
11502 (let ((base (package-with-python2
11503 (strip-python2-variant python-graphene))))
11504 (package (inherit base)
11505 (native-inputs
00e10c6e 11506 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 11507 ,@(package-native-inputs base))))))
d488d5d6
EF
11508
11509(define-public python-nautilus
11510 (package
11511 (name "python-nautilus")
11512 (version "0.4.9")
11513 (source
11514 (origin
11515 (method url-fetch)
11516 (uri (pypi-uri "nautilus" version))
11517 (sha256
11518 (base32
11519 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11520 (build-system python-build-system)
11521 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 11522 (propagated-inputs
d488d5d6
EF
11523 `(("python-bcrypt" ,python-bcrypt)
11524 ("python-click" ,python-click)
11525 ("python-consul" ,python-consul)
d488d5d6
EF
11526 ("python-graphene" ,python-graphene)
11527 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
11528 ("python-peewee" ,python-peewee)
11529 ("python-pika" ,python-pika)
d488d5d6
EF
11530 ("python-tornado" ,python-tornado)
11531 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
11532 (native-inputs
11533 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
11534 (home-page "https://github.com/AlecAivazis/nautilus")
11535 (synopsis "Library for creating microservice applications")
11536 (description
11537 "Nautilus is a framework for flux based microservices that looks to
11538provide extendible implementations of common aspects of a cloud so that you can
11539focus on building massively scalable web applications.")
11540 (license license:expat)))
94cffc63 11541
66d3f50a
LF
11542(define-public python-betamax
11543 (package
11544 (name "python-betamax")
11545 (version "0.8.0")
11546 (source
11547 (origin
11548 (method url-fetch)
11549 (uri (pypi-uri "betamax" version))
11550 (sha256
11551 (base32
11552 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11553 (build-system python-build-system)
11554 (arguments
11555 '(;; Many tests fail because they require networking.
11556 #:tests? #f))
c415f763 11557 (propagated-inputs
66d3f50a
LF
11558 `(("python-requests" ,python-requests)))
11559 (home-page "https://github.com/sigmavirus24/betamax")
11560 (synopsis "Record HTTP interactions with python-requests")
11561 (description "Betamax will record your test suite's HTTP interactions and
11562replay them during future tests. It is designed to work with python-requests.")
f210e944 11563 (license license:expat)))
66d3f50a
LF
11564
11565(define-public python2-betamax
f210e944 11566 (package-with-python2 python-betamax))
ca0635b4 11567
94cffc63
LF
11568(define-public python-s3transfer
11569 (package
11570 (name "python-s3transfer")
11571 (version "0.1.8")
11572 (source (origin
11573 (method url-fetch)
11574 (uri (pypi-uri "s3transfer" version))
11575 (sha256
11576 (base32
11577 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11578 (build-system python-build-system)
fad8bf97
LF
11579 (arguments
11580 `(#:phases
11581 (modify-phases %standard-phases
11582 (replace 'check
11583 (lambda _
11584 ;; 7 of the 'integration' tests require network access or login
11585 ;; credentials.
11586 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 11587 (native-inputs
fad8bf97
LF
11588 `(("python-docutils" ,python-docutils)
11589 ("python-mock" ,python-mock)
11590 ("python-nose" ,python-nose)))
f22efa01 11591 (propagated-inputs
94cffc63
LF
11592 `(("python-botocore" ,python-botocore)))
11593 (synopsis "Amazon S3 Transfer Manager")
11594 (description "S3transfer is a Python library for managing Amazon S3
11595transfers.")
11596 (home-page "https://github.com/boto/s3transfer")
11597 (license license:asl2.0)
11598 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11599
11600(define-public python2-s3transfer
11601 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11602 (package
11603 (inherit base)
11604 (native-inputs
11605 `(("python2-futures" ,python2-futures)
94cffc63 11606 ,@(package-native-inputs base))))))
8ab59181
HG
11607
11608(define-public python-setproctitle
11609(package
11610 (name "python-setproctitle")
11611 (version "1.1.10")
11612 (source
11613 (origin
11614 (method url-fetch)
11615 (uri (pypi-uri "setproctitle" version))
11616 (sha256
11617 (base32
11618 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11619 (build-system python-build-system)
11620 (arguments
11621 '(#:phases
11622 (modify-phases %standard-phases
11623 (add-before 'check 'patch-Makefile
11624 ;; Stricly this is only required for the python2 variant.
11625 ;; But adding a phase in an inherited package seems to be
11626 ;; cumbersum. So we patch even for python3.
11627 (lambda _
11628 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11629 (when nose
11630 (substitute* "Makefile"
11631 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11632 (string-append nose "/bin/nosetests "))))
11633 #t)))
11634 (replace 'check
11635 (lambda _
11636 (setenv "PYTHON" (or (which "python3") (which "python")))
11637 (setenv "PYCONFIG" (or (which "python3-config")
11638 (which "python-config")))
11639 (setenv "CC" "gcc")
11640 ;; No need to extend PYTHONPATH to find the built package, since
11641 ;; the Makefile will build anyway
11642 (zero? (system* "make" "check")))))))
11643 (native-inputs
11644 `(("procps" ,procps))) ; required for tests
11645 (home-page
11646 "https://github.com/dvarrazzo/py-setproctitle")
11647 (synopsis
11648 "Setproctitle implementation for Python to customize the process title")
11649 (description "The library allows a process to change its title (as displayed
11650by system tools such as ps and top).
11651
11652Changing the title is mostly useful in multi-process systems, for
11653example when a master process is forked: changing the children's title
11654allows to identify the task each process is busy with. The technique
11655is used by PostgreSQL and the OpenSSH Server for example.")
11656 (license license:bsd-3)
11657 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11658
11659(define-public python2-setproctitle
11660 (let ((base (package-with-python2
11661 (strip-python2-variant python-setproctitle))))
11662 (package
11663 (inherit base)
11664 (native-inputs `(("python2-nose" ,python2-nose)
11665 ,@(package-native-inputs base))))))
162e42d8
HG
11666
11667(define-public python-validictory
11668 (package
11669 (name "python-validictory")
11670 (version "1.0.1")
11671 (source
11672 (origin
11673 (method url-fetch)
11674 (uri (pypi-uri "validictory" version))
11675 (sha256
11676 (base32
11677 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11678 (build-system python-build-system)
11679 (arguments
11680 '(#:phases
11681 (modify-phases %standard-phases
11682 (add-after 'unpack 'bootstrap
11683 ;; Move the tests out of the package directory to avoid
11684 ;; packaging them.
11685 (lambda* _
11686 (rename-file "validictory/tests" "tests")
11687 (delete-file "tests/__init__.py")))
11688 (replace 'check
11689 (lambda _
11690 ;; Extend PYTHONPATH so the built package will be found.
11691 (setenv "PYTHONPATH"
11692 (string-append (getcwd) "/build/lib:"
11693 (getenv "PYTHONPATH")))
11694 (zero? (system* "py.test" "-vv" )))))))
11695 (native-inputs
11696 `(("python-pytest" ,python-pytest)))
11697 (home-page
11698 "https://github.com/jamesturk/validictory")
11699 (synopsis "General purpose Python data validator")
11700 (description "It allows validation of arbitrary Python data structures.
11701
11702The schema format is based on the JSON Schema
11703proposal (http://json-schema.org), so combined with json the library is also
11704useful as a validator for JSON data.")
f210e944 11705 (license license:expat)))
162e42d8
HG
11706
11707(define-public python2-validictory
f210e944 11708 (package-with-python2 python-validictory))
0990edfe
DM
11709
11710(define-public python-aniso8601
11711 (package
11712 (name "python-aniso8601")
11713 (version "1.1.0")
11714 (source
11715 (origin
11716 (method url-fetch)
11717 (uri (pypi-uri "aniso8601" version))
11718 (sha256
11719 (base32
11720 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11721 (build-system python-build-system)
11722 (propagated-inputs
11723 `(("python-dateutil-2" ,python-dateutil-2)))
11724 (home-page
11725 "https://bitbucket.org/nielsenb/aniso8601")
11726 (synopsis
11727 "Python library for parsing ISO 8601 strings")
11728 (description
11729 "This package contains a library for parsing ISO 8601 datetime strings.")
11730 (license license:bsd-3)))
999d964d
DM
11731
11732(define-public python-flask-restful
11733 (package
11734 (name "python-flask-restful")
11735 (version "0.3.5")
11736 (source
11737 (origin
11738 (method url-fetch)
11739 (uri (pypi-uri "Flask-RESTful" version))
11740 (sha256
11741 (base32
11742 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11743 (build-system python-build-system)
11744 (propagated-inputs
11745 `(("python-aniso8601" ,python-aniso8601)
11746 ("python-flask" ,python-flask)
11747 ("python-pycrypto" ,python-pycrypto)
11748 ("python-pytz" ,python-pytz)))
11749 (native-inputs
11750 `(;; Optional dependency of Flask. Tests need it.
11751 ("python-blinker" ,python-blinker)
11752 ("python-mock" ,python-mock) ; For tests
11753 ("python-nose" ,python-nose) ; For tests
11754 ("python-sphinx" ,python-sphinx)))
11755 (home-page
11756 "https://www.github.com/flask-restful/flask-restful/")
11757 (synopsis
11758 "Flask module for creating REST APIs")
11759 (description
11760 "This package contains a Flask module for creating REST APIs.")
11761 (license license:bsd-3)))
31288222
DM
11762
11763(define-public python-flask-basicauth
11764 (package
11765 (name "python-flask-basicauth")
11766 (version "0.2.0")
11767 (source
11768 (origin
11769 (method url-fetch)
11770 (uri (pypi-uri "Flask-BasicAuth" version))
11771 (sha256
11772 (base32
11773 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11774 (build-system python-build-system)
11775 (propagated-inputs
11776 `(("python-flask" ,python-flask)))
11777 (home-page
11778 "https://github.com/jpvanhal/flask-basicauth")
11779 (synopsis
11780 "HTTP basic access authentication for Flask")
11781 (description
11782 "This package provides HTTP basic access authentication for Flask.")
11783 (license license:bsd-3)))
903276d0
DM
11784
11785(define-public python-flask-sqlalchemy
11786 (package
11787 (name "python-flask-sqlalchemy")
11788 (version "2.1")
11789 (source
11790 (origin
11791 (method url-fetch)
11792 (uri (pypi-uri "Flask-SQLAlchemy" version))
11793 (sha256
11794 (base32
11795 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11796 (build-system python-build-system)
11797 (propagated-inputs
11798 `(("python-flask" ,python-flask)
11799 ("python-sqlalchemy" ,python-sqlalchemy)))
11800 (home-page
11801 "http://github.com/mitsuhiko/flask-sqlalchemy")
11802 (synopsis
11803 "Module adding SQLAlchemy support to your Flask application")
11804 (description
11805 "This package adds SQLAlchemy support to your Flask application.")
11806 (license license:bsd-3)))
329b4b3b
LF
11807
11808(define-public python-pyev
11809 (package
11810 (name "python-pyev")
11811 (version "0.9.0")
11812 (source
11813 (origin
11814 (method url-fetch)
11815 (uri (pypi-uri "pyev" version))
11816 (sha256
11817 (base32
11818 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11819 (build-system python-build-system)
11820 (arguments
11821 `(#:tests? #f ; no test suite
11822 #:phases
11823 (modify-phases %standard-phases
11824 (add-after 'unpack 'patch
11825 (lambda* (#:key inputs #:allow-other-keys)
11826 (let ((libev (string-append (assoc-ref inputs "libev")
11827 "/lib/libev.so.4")))
11828 (substitute* "setup.py"
11829 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11830 (string-append "libev_dll_name = \"" libev "\"")))))))))
11831 (inputs
11832 `(("libev" ,libev)))
11833 (home-page "http://pythonhosted.org/pyev/")
11834 (synopsis "Python libev interface")
11835 (description "Pyev provides a Python interface to libev.")
11836 (license license:gpl3)))
11837
11838(define-public python2-pyev
11839 (package-with-python2 python-pyev))
45b4f127
DM
11840
11841(define-public python-imagesize
11842 (package
11843 (name "python-imagesize")
11844 (version "0.7.1")
11845 (source
11846 (origin
11847 (method url-fetch)
11848 (uri (pypi-uri "imagesize" version))
11849 (sha256
11850 (base32
11851 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11852 (build-system python-build-system)
9422c98a
LF
11853 (arguments
11854 '(;; Test files are not distributed on PyPi:
11855 ;; https://github.com/shibukawa/imagesize_py/issues/7
11856 #:tests? #f))
45b4f127
DM
11857 (home-page "https://github.com/shibukawa/imagesize_py")
11858 (synopsis "Gets image size of files in variaous formats in Python")
11859 (description
11860 "This package allows determination of image size from
11861PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 11862 (license license:expat)))
45b4f127
DM
11863
11864(define-public python2-imagesize
f210e944 11865 (package-with-python2 python-imagesize))
2f6dd9cd
AI
11866
11867(define-public python-axolotl-curve25519
11868 (package
11869 (name "python-axolotl-curve25519")
11870 (version "0.1")
11871 (source
11872 (origin
11873 (method git-fetch)
11874 (uri (git-reference
11875 (url "git://github.com/tgalal/python-axolotl-curve25519")
11876 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11877 (file-name (string-append name "-" version "-checkout"))
11878 (sha256
11879 (base32
11880 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11881 (build-system python-build-system)
11882 (arguments
11883 `(;; Prevent creation of the egg. This works around
11884 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11885 #:configure-flags '("--root=/")))
2f6dd9cd
AI
11886 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11887 (synopsis "Python wrapper for curve25519 library")
11888 (description "This is a python wrapper for the curve25519 library
11889with ed25519 signatures. The C code was pulled from
11890libaxolotl-android. At the moment this wrapper is meant for use by
11891python-axolotl.")
11892 (license (list license:gpl3 ; Most files
683cdbf5 11893 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
11894
11895(define-public python2-axolotl-curve25519
11896 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
11897
11898(define-public python-axolotl
11899 (package
11900 (name "python-axolotl")
11901 (version "0.1.35")
11902 (source
11903 (origin
11904 (method url-fetch)
11905 (uri (string-append
11906 "https://github.com/tgalal/python-axolotl/archive/"
11907 version ".tar.gz"))
11908 (file-name (string-append name "-" version ".tar.gz"))
11909 (sha256
11910 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11911 (build-system python-build-system)
11912 (arguments
11913 `(#:phases
11914 (modify-phases %standard-phases
11915 ;; Don't install tests
11916 (add-before 'install 'remove-tests
11917 (lambda _
11918 (for-each delete-file-recursively
11919 '("axolotl/tests" "build/lib/axolotl/tests"))
11920 #t)))
11921 ;; Prevent creation of the egg. This works around
11922 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11923 #:configure-flags '("--root=/")))
06ff0837
AI
11924 (propagated-inputs
11925 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11926 ("python-dateutil" ,python-dateutil)
11927 ("python-protobuf" ,python-protobuf)
11928 ("python-pycrypto" ,python-pycrypto)))
11929 (home-page "https://github.com/tgalal/python-axolotl")
11930 (synopsis "Python port of libaxolotl-android")
11931 (description "This is a python port of libaxolotl-android. This
11932is a ratcheting forward secrecy protocol that works in synchronous and
11933asynchronous messaging environments.")
11934 (license license:gpl3)))
11935
11936(define-public python2-axolotl
11937 (package-with-python2 python-axolotl))
e2fca490
DM
11938
11939(define-public python-termstyle
11940 (package
11941 (name "python-termstyle")
11942 (version "0.1.11")
11943 (source
11944 (origin
11945 (method url-fetch)
11946 (uri (pypi-uri "termstyle" version))
11947 (sha256
11948 (base32
11949 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11950 (build-system python-build-system)
7917a135
MB
11951 (arguments
11952 '(#:phases
11953 (modify-phases %standard-phases
11954 (replace 'check
11955 (lambda _
11956 (zero? (system* "python" "test3.py")))))))
e2fca490
DM
11957 (home-page "http://github.com/gfxmonk/termstyle")
11958 (synopsis "Console text coloring for Python")
11959 (description "This package provides console text coloring for Python.")
11960 (license license:bsd-3)))
1e6112d8
DM
11961
11962(define-public python-rednose
11963 (package
11964 (name "python-rednose")
11965 (version "1.2.1")
11966 (source
11967 (origin
11968 (method url-fetch)
11969 (uri (pypi-uri "rednose" version))
11970 (sha256
11971 (base32
11972 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
11973 (build-system python-build-system)
11974 (arguments
11975 `(#:phases
11976 (modify-phases %standard-phases
11977 (add-after 'unpack 'fix-deps
11978 (lambda _
11979 ;; See <https://github.com/JBKahn/rednose/issues/12>
11980 (substitute* "setup.py"
11981 (("python-termstyle") "termstyle"))
11982 #t)))))
11983 (propagated-inputs
11984 `(("python-colorama" ,python-colorama)
11985 ("python-termstyle" ,python-termstyle)))
11986 (native-inputs
11987 `(("python-six" ,python-six)
11988 ("python-nose" ,python-nose)))
11989 (home-page "https://github.com/JBKahn/rednose")
11990 (synopsis "Colored output for Python nosetests")
11991 (description "This package provides colored output for the
11992@command{nosetests} command of the Python Nose unit test framework.")
11993 (license license:bsd-3)))
0a7f17f0
DM
11994
11995(define-public python-flask-restplus
11996 (package
11997 (name "python-flask-restplus")
11998 (version "0.9.2")
11999 (source
12000 (origin
12001 (method url-fetch)
12002 (uri (pypi-uri "flask-restplus" version))
12003 (sha256
12004 (base32
12005 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
12006 (build-system python-build-system)
12007 (propagated-inputs
12008 `(("python-aniso8601" ,python-aniso8601)
12009 ("python-flask" ,python-flask)
12010 ("python-jsonschema" ,python-jsonschema)
12011 ("python-pytz" ,python-pytz)
12012 ("python-six" ,python-six)))
12013 (native-inputs
12014 `(("python-tzlocal" ,python-tzlocal)
12015 ("python-blinker" ,python-blinker)
12016 ("python-nose" ,python-nose)
12017 ("python-rednose" ,python-rednose)))
12018 (home-page "https://github.com/noirbizarre/flask-restplus")
12019 (synopsis "Framework for documented API development with Flask")
12020 (description "This package provides a framework for API development with
12021the Flask web framework in Python. It is similar to package
12022@code{python-flask-restful} but supports the @code{python-swagger}
12023documentation builder.")
12024 (license license:expat)))
1ed21519
DM
12025
12026(define-public python-sadisplay
12027 (package
12028 (name "python-sadisplay")
12029 (version "0.4.6")
12030 (source
12031 (origin
12032 (method url-fetch)
12033 (uri (pypi-uri "sadisplay" version))
12034 (sha256
12035 (base32
12036 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
12037 (build-system python-build-system)
12038 (propagated-inputs
12039 `(("python-sqlalchemy" ,python-sqlalchemy)))
12040 (native-inputs
12041 `(("python-nose" ,python-nose)))
12042 (home-page "https://bitbucket.org/estin/sadisplay")
12043 (synopsis "SQLAlchemy schema displayer")
12044 (description "This package provides a program to build Entity
12045Relationship diagrams from a SQLAlchemy model (or directly from the
12046database).")
12047 (license license:bsd-3)))
12048
12049(define-public python2-sadisplay
12050 (package-with-python2 python-sadisplay))
444a79b6
DM
12051
12052(define-public python-flask-restful-swagger
12053 (package
12054 (name "python-flask-restful-swagger")
12055 (version "0.19")
12056 (source
12057 (origin
12058 (method url-fetch)
12059 (uri (pypi-uri "flask-restful-swagger" version))
12060 (sha256
12061 (base32
12062 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
12063 (build-system python-build-system)
12064 (propagated-inputs
12065 `(("python-flask-restful" ,python-flask-restful)))
12066 (home-page "https://github.com/rantav/flask-restful-swagger")
12067 (synopsis "Extract Swagger specs from Flask-Restful projects")
12068 (description "This package lets you extract Swagger API documentation
12069specs from your Flask-Restful projects.")
12070 (license license:expat)))
12071
12072(define-public python2-flask-restful-swagger
12073 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
12074
12075(define-public python-argcomplete
12076 (package
12077 (name "python-argcomplete")
12078 (version "1.7.0")
12079 (source
12080 (origin
12081 (method url-fetch)
12082 (uri (pypi-uri "argcomplete" version))
12083 (sha256
12084 (base32
12085 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
12086 (build-system python-build-system)
12087 (home-page "https://github.com/kislyuk/argcomplete")
12088 (synopsis "Shell tab completion for Python argparse")
12089 (description "argcomplete provides extensible command line tab completion
12090of arguments and options for Python scripts using @code{argparse}. It's
12091particularly useful for programs with many options or sub-parsers that can
12092dynamically suggest completions; for example, when browsing resources over the
12093network.")
12094 (license license:asl2.0)))
12095
12096(define-public python2-argcomplete
12097 (package-with-python2 python-argcomplete))