gnu: python-tornado: 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)
88535a44 440 (home-page "https://www.github.com/giampaolo/psutil")
aaf625b8
RW
441 (synopsis "Library for retrieving information on running processes")
442 (description
443 "psutil (Python system and process utilities) is a library for retrieving
444information on running processes and system utilization (CPU, memory, disks,
445network) in Python. It is useful mainly for system monitoring, profiling and
446limiting process resources and management of running processes. It implements
447many functionalities offered by command line tools such as: ps, top, lsof,
448netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
449pidof, tty, taskset, pmap.")
3f641af0 450 (license license:bsd-3)))
aaf625b8
RW
451
452(define-public python2-psutil
453 (package-with-python2 python-psutil))
898238b9 454
f9da1d8a
ED
455(define-public python-passlib
456 (package
457 (name "python-passlib")
1c9f78ec 458 (version "1.7.0")
f9da1d8a
ED
459 (source
460 (origin
461 (method url-fetch)
690e8c66 462 (uri (pypi-uri "passlib" version))
f9da1d8a
ED
463 (sha256
464 (base32
1c9f78ec 465 "1vdbqsa1a31s98fxkinl052q8nnpvbxnb83qanxfpi2p6c2zdr0b"))))
f9da1d8a
ED
466 (build-system python-build-system)
467 (native-inputs
f3b98f4f 468 `(("python-nose" ,python-nose)))
f22efa01 469 (propagated-inputs
f9da1d8a
ED
470 `(("python-py-bcrypt" ,python-py-bcrypt)))
471 (arguments
472 `(#:phases
473 (alist-cons-before
474 'check 'set-PYTHON_EGG_CACHE
475 ;; some tests require access to "$HOME/.cython"
476 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
477 %standard-phases)))
478 (home-page "https://bitbucket.org/ecollins/passlib")
479 (synopsis
480 "Comprehensive password hashing framework")
481 (description
482 "Passlib is a password hashing library for Python 2 & 3, which provides
483cross-platform implementations of over 30 password hashing algorithms, as well
484as a framework for managing existing password hashes. It's designed to be
485useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
486to providing full-strength password hashing for multi-user application.")
3f641af0 487 (license license:bsd-3)))
f9da1d8a
ED
488
489(define-public python2-passlib
490 (package-with-python2 python-passlib))
491
feb0d9c3
ED
492(define-public python-py-bcrypt
493 (package
494 (name "python-py-bcrypt")
495 (version "0.4")
496 (source
497 (origin
498 (method url-fetch)
499 (uri (string-append
500 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
501 version
502 ".tar.gz"))
503 (sha256
504 (base32
505 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
506 (build-system python-build-system)
feb0d9c3
ED
507 (home-page "https://code.google.com/p/py-bcrypt")
508 (synopsis
509 "Bcrypt password hashing and key derivation")
510 (description
511 "A python wrapper of OpenBSD's Blowfish password hashing code. This
512system hashes passwords using a version of Bruce Schneier's Blowfish block
513cipher with modifications designed to raise the cost of off-line password
514cracking and frustrate fast hardware implementation. The computation cost of
515the algorithm is parametised, so it can be increased as computers get faster.
516The intent is to make a compromise of a password database less likely to
517result in an attacker gaining knowledge of the plaintext passwords (e.g. using
518John the Ripper).")
519 ;; "sha2.c" is under BSD-3;
520 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
521 ;; the rest is under ISC.
3f641af0 522 (license (list license:isc license:bsd-3 license:bsd-4))))
feb0d9c3
ED
523
524(define-public python2-py-bcrypt
525 (package-with-python2 python-py-bcrypt))
526
527
429fdea1
ED
528(define-public python-paramiko
529 (package
530 (name "python-paramiko")
81b9bbbd 531 (version "1.16.0")
429fdea1
ED
532 (source
533 (origin
534 (method url-fetch)
81b9bbbd 535 (uri (pypi-uri "paramiko" version))
429fdea1
ED
536 (sha256
537 (base32
81b9bbbd 538 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
429fdea1 539 (build-system python-build-system)
a3fc12da 540 (propagated-inputs
f22efa01
HG
541 `(("python-pycrypto" ,python-pycrypto)
542 ("python-ecdsa" ,python-ecdsa)))
429fdea1
ED
543 (home-page "http://www.paramiko.org/")
544 (synopsis "SSHv2 protocol library")
545 (description "Paramiko is a python implementation of the SSHv2 protocol,
546providing both client and server functionality. While it leverages a Python C
547extension for low level cryptography (PyCrypto), Paramiko itself is a pure
548Python interface around SSH networking concepts.")
3f641af0 549 (license license:lgpl2.1+)))
429fdea1
ED
550
551(define-public python2-paramiko
552 (package-with-python2 python-paramiko))
553
554
de73dbf6
ED
555(define-public python-httplib2
556 (package
557 (name "python-httplib2")
286f1bac 558 (version "0.9.2")
de73dbf6
ED
559 (source
560 (origin
561 (method url-fetch)
286f1bac 562 (uri (pypi-uri "httplib2" version))
de73dbf6
ED
563 (sha256
564 (base32
286f1bac 565 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
de73dbf6 566 (build-system python-build-system)
286f1bac 567 (home-page "https://github.com/jcgregorio/httplib2")
de73dbf6
ED
568 (synopsis "Comprehensive HTTP client library")
569 (description
570 "A comprehensive HTTP client library supporting many features left out of
571other HTTP libraries.")
572 (license license:expat)))
573
574(define-public python2-httplib2
575 (package-with-python2 python-httplib2))
576
67039875
ED
577(define-public python-ecdsa
578 (package
579 (name "python-ecdsa")
580 (version "0.13")
581 (source
582 (origin
583 (method url-fetch)
584 (uri (string-append
585 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
586 version
587 ".tar.gz"))
588 (sha256
589 (base32
590 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
591 (build-system python-build-system)
67039875
ED
592 (inputs
593 `(("openssl" ,openssl)))
594 (home-page
595 "http://github.com/warner/python-ecdsa")
596 (synopsis
597 "ECDSA cryptographic signature library (pure python)")
598 (description
599 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
600Curve Digital Signature Algorithm), implemented purely in Python. With this
601library, you can quickly create keypairs (signing key and verifying key), sign
602messages, and verify the signatures. The keys and signatures are very short,
603making them easy to handle and incorporate into other protocols.")
604 (license license:expat)))
605
606(define-public python2-ecdsa
607 (package-with-python2 python-ecdsa))
608
52323f32
ED
609(define-public python-ccm
610 (package
611 (name "python-ccm")
db5567f7 612 (version "2.1.6")
52323f32
ED
613 (source
614 (origin
615 (method url-fetch)
db5567f7 616 (uri (pypi-uri "ccm" version))
52323f32
ED
617 (sha256
618 (base32
db5567f7 619 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
52323f32 620 (build-system python-build-system)
f22efa01 621 (propagated-inputs
52323f32 622 `(("python-pyyaml" ,python-pyyaml)
e165f137
HG
623 ;; Not listed in setup.py, but used in ccmlib/node.py for full
624 ;; functionality
625 ("python-psutil" ,python-psutil)
52323f32
ED
626 ("python-six" ,python-six)))
627 (home-page "https://github.com/pcmanus/ccm")
d9a6e221
HG
628 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
629localhost")
630 (description "Cassandra Cluster Manager is a development tool for testing
631local Cassandra clusters. It creates, launches and removes Cassandra clusters
632on localhost.")
3f641af0 633 (license license:asl2.0)))
52323f32
ED
634
635(define-public python2-ccm
636 (package-with-python2 python-ccm))
637
89114f39 638(define-public python-pytz
acc26ff1 639 (package
89114f39 640 (name "python-pytz")
61c9babb 641 (version "2016.3")
acc26ff1
CR
642 (source
643 (origin
644 (method url-fetch)
61c9babb 645 (uri (pypi-uri "pytz" version ".tar.bz2"))
acc26ff1
CR
646 (sha256
647 (base32
61c9babb 648 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
acc26ff1 649 (build-system python-build-system)
8498b8cf 650 (arguments `(#:tests? #f)) ; no test target
b01bbbcf 651 (home-page "http://pythonhosted.org/pytz")
9e771e3b 652 (synopsis "Python timezone library")
acc26ff1
CR
653 (description
654 "This library allows accurate and cross platform timezone calculations
655using Python 2.4 or higher and provides access to the Olson timezone database.")
b01bbbcf 656 (license license:expat)))
5ace6e2f 657
89114f39 658(define-public python2-pytz
11bb85a1 659 (package-with-python2 python-pytz))
89114f39 660
fc50e9c6 661
89114f39 662(define-public python-babel
5ace6e2f 663 (package
89114f39 664 (name "python-babel")
3f37db6b 665 (version "2.3.2")
5ace6e2f
CR
666 (source
667 (origin
668 (method url-fetch)
b850a6d8 669 (uri (pypi-uri "Babel" version))
5ace6e2f
CR
670 (sha256
671 (base32
3f37db6b 672 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
5ace6e2f 673 (build-system python-build-system)
f22efa01 674 (propagated-inputs
f3b98f4f 675 `(("python-pytz" ,python-pytz)))
8498b8cf 676 (arguments `(#:tests? #f)) ; no test target
e1804763 677 (home-page "http://babel.pocoo.org/")
5ace6e2f
CR
678 (synopsis
679 "Tools for internationalizing Python applications")
680 (description
681 "Babel is composed of two major parts:
682- tools to build and work with gettext message catalogs
683- a Python interface to the CLDR (Common Locale Data Repository), providing
684access to various locale display names, localized number and date formatting,
685etc. ")
3f641af0 686 (license license:bsd-3)))
89114f39
AE
687
688(define-public python2-babel
11bb85a1 689 (package-with-python2 python-babel))
73adf220 690
ed377cc6
RW
691(define-public python2-backport-ssl-match-hostname
692 (package
693 (name "python2-backport-ssl-match-hostname")
f2d06d46 694 (version "3.5.0.1")
ed377cc6
RW
695 (source
696 (origin
697 (method url-fetch)
698 (uri (string-append
699 "https://pypi.python.org/packages/source/b/"
700 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
701 version ".tar.gz"))
702 (sha256
703 (base32
f2d06d46 704 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
ed377cc6 705 (build-system python-build-system)
f2d06d46
EF
706 (arguments
707 `(#:python ,python-2
708 #:tests? #f)) ; no test target
f2d06d46
EF
709 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
710 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
ed377cc6
RW
711 (description
712 "This backport brings the ssl.match_hostname() function to users of
713earlier versions of Python. The function checks the hostname in the
714certificate returned by the server to which a connection has been established,
715and verifies that it matches the intended target hostname.")
3f641af0 716 (license license:psfl)))
ed377cc6 717
ef5cbf9b
RW
718(define-public python-h5py
719 (package
720 (name "python-h5py")
fe147c41 721 (version "2.6.0")
ef5cbf9b
RW
722 (source
723 (origin
724 (method url-fetch)
fe147c41 725 (uri (pypi-uri "h5py" version))
ef5cbf9b
RW
726 (sha256
727 (base32
fe147c41 728 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
ef5cbf9b 729 (build-system python-build-system)
797e1401
RW
730 (arguments
731 `(#:tests? #f ; no test target
732 #:phases
733 (modify-phases %standard-phases
734 (add-after 'unpack 'fix-hdf5-paths
735 (lambda* (#:key inputs #:allow-other-keys)
736 (let ((prefix (assoc-ref inputs "hdf5")))
737 (substitute* "setup_build.py"
738 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
739 (string-append "['" prefix "/lib" "']"))
740 (("'/opt/local/include', '/usr/local/include'")
741 (string-append "'" prefix "/include" "'")))
742 (substitute* "setup_configure.py"
743 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
744 (string-append "['" prefix "/lib" "']")))
745 #t))))))
3c4010b1 746 (propagated-inputs
69866690
HG
747 `(("python-six" ,python-six)
748 ("python-numpy" ,python-numpy)))
ef5cbf9b 749 (inputs
69866690 750 `(("hdf5" ,hdf5)))
ef5cbf9b 751 (native-inputs
fe147c41
EF
752 `(("python-cython" ,python-cython)
753 ("python-pkgconfig" ,python-pkgconfig)))
ef5cbf9b
RW
754 (home-page "http://www.h5py.org/")
755 (synopsis "Read and write HDF5 files from Python")
756 (description
757 "The h5py package provides both a high- and low-level interface to the
758HDF5 library from Python. The low-level interface is intended to be a
759complete wrapping of the HDF5 API, while the high-level component supports
760access to HDF5 files, datasets and groups using established Python and NumPy
761concepts.")
9820a028 762 (license license:bsd-3)))
ef5cbf9b
RW
763
764(define-public python2-h5py
9820a028 765 (package-with-python2 python-h5py))
ef5cbf9b 766
c1448c69
EB
767(define-public python-lockfile
768 (package
769 (name "python-lockfile")
692add53 770 (version "0.12.2")
c1448c69
EB
771 (source
772 (origin
773 (method url-fetch)
774 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
775 "lockfile-" version ".tar.gz"))
776 (sha256
777 (base32
692add53 778 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
c1448c69
EB
779 (build-system python-build-system)
780 (arguments '(#:test-target "check"))
692add53
BW
781 (native-inputs
782 `(("python-pbr" ,python-pbr)))
6a8f26a4 783 (home-page "https://launchpad.net/pylockfile")
c1448c69
EB
784 (synopsis "Platform-independent file locking module")
785 (description
786 "The lockfile package exports a LockFile class which provides a simple
787API for locking files.")
f210e944 788 (license license:expat)))
c1448c69
EB
789
790(define-public python2-lockfile
f210e944 791 (package-with-python2 python-lockfile))
c1448c69 792
5a1a4bf6
EB
793(define-public python-mock
794 (package
795 (name "python-mock")
796 (version "1.0.1")
797 (source
798 (origin
799 (method url-fetch)
800 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
801 "mock-" version ".tar.gz"))
802 (sha256
803 (base32
804 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
805 (build-system python-build-system)
806 (arguments '(#:test-target "check"))
07af3e5e 807 (home-page "http://code.google.com/p/mock/")
9e771e3b 808 (synopsis "Python mocking and patching library for testing")
5a1a4bf6
EB
809 (description
810 "Mock is a library for testing in Python. It allows you to replace parts
811of your system under test with mock objects and make assertions about how they
812have been used.")
bd3fa666 813 (license license:expat)))
5a1a4bf6
EB
814
815(define-public python2-mock
816 (package-with-python2 python-mock))
817
fc50e9c6 818
73adf220
AE
819(define-public python-setuptools
820 (package
821 (name "python-setuptools")
d660f7be 822 (version "31.0.0")
73adf220
AE
823 (source
824 (origin
825 (method url-fetch)
d660f7be 826 (uri (pypi-uri "setuptools" version))
73adf220
AE
827 (sha256
828 (base32
d660f7be 829 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
e0ed4579
HG
830 (modules '((guix build utils)))
831 (snippet
832 '(begin
833 ;; Remove included binaries which are used to build self-extracting
834 ;; installers for Windows.
835 ;; TODO: Find some way to build them ourself so we can include them.
836 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
837 #t))))
73adf220 838 (build-system python-build-system)
d3d656c5
AE
839 ;; FIXME: Tests require pytest, which itself relies on setuptools.
840 ;; One could bootstrap with an internal untested setuptools.
73adf220 841 (arguments
824af8ca 842 `(#:tests? #f))
73adf220
AE
843 (home-page "https://pypi.python.org/pypi/setuptools")
844 (synopsis
845 "Library designed to facilitate packaging Python projects")
846 (description
847 "Setuptools is a fully-featured, stable library designed to facilitate
848packaging Python projects, where packaging includes:
849Python package and module definitions,
850distribution package metadata,
851test hooks,
852project installation,
853platform-specific details,
854Python 3 support.")
d660f7be
MB
855 ;; TODO: setuptools now bundles the following libraries:
856 ;; packaging, pyparsing, six and appdirs. How to unbundle?
857 (license (list license:psfl ; setuptools itself
858 license:expat ; six, appdirs, pyparsing
859 license:asl2.0 ; packaging is dual ASL2/BSD-2
860 license:bsd-2))))
73adf220
AE
861
862(define-public python2-setuptools
863 (package-with-python2 python-setuptools))
fc50e9c6
AE
864
865
cafc3f5a
EB
866(define-public python-pycrypto
867 (package
868 (name "python-pycrypto")
869 (version "2.6.1")
870 (source
871 (origin
872 (method url-fetch)
873 (uri (string-append "https://pypi.python.org/packages/source/p/"
874 "pycrypto/pycrypto-" version ".tar.gz"))
875 (sha256
876 (base32
877 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
878 (build-system python-build-system)
cafc3f5a
EB
879 (inputs
880 `(("python" ,python)
881 ("gmp" ,gmp)))
882 (arguments
883 `(#:phases
884 (alist-cons-before
885 'build 'set-build-env
886 ;; pycrypto runs an autoconf configure script behind the scenes
887 (lambda _
888 (setenv "CONFIG_SHELL" (which "bash")))
889 %standard-phases)))
890 (home-page "http://www.pycrypto.org/")
891 (synopsis "Cryptographic modules for Python")
892 (description
893 "Pycrypto is a collection of both secure hash functions (such as SHA256
894and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
35b9e423 895etc.). The package is structured to make adding new modules easy.")
3f641af0 896 (license license:public-domain)))
cafc3f5a 897
345f0611 898(define-public python2-pycrypto
1c0059da
EF
899 (let ((pycrypto (package-with-python2 python-pycrypto)))
900 (package (inherit pycrypto)
901 (inputs
902 `(("python" ,python-2)
903 ,@(alist-delete
904 "python"
905 (package-inputs pycrypto)))))))
345f0611 906
cafc3f5a
EB
907(define-public python-keyring
908 (package
909 (name "python-keyring")
13f3ff35 910 (version "8.7")
cafc3f5a
EB
911 (source
912 (origin
913 (method url-fetch)
664e6c3a 914 (uri (pypi-uri "keyring" version))
cafc3f5a
EB
915 (sha256
916 (base32
13f3ff35 917 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
cafc3f5a
EB
918 (build-system python-build-system)
919 (native-inputs
13f3ff35 920 `(("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 921 (propagated-inputs
cafc3f5a
EB
922 `(("python-pycrypto" ,python-pycrypto)))
923 (arguments
664e6c3a 924 `(#:tests? #f)) ;TODO: tests require pytest
190ba6c2 925 (home-page "https://github.com/jaraco/keyring")
cafc3f5a
EB
926 (synopsis "Store and access your passwords safely")
927 (description
928 "The Python keyring lib provides a easy way to access the system keyring
35b9e423 929service from python. It can be used in any application that needs safe
cafc3f5a
EB
930password storage.")
931 ;; "MIT" and PSF dual license
f210e944 932 (license license:x11)))
cafc3f5a 933
d7af1069 934(define-public python2-keyring
f210e944 935 (package-with-python2 python-keyring))
d7af1069 936
a480bc41
EB
937(define-public python-six
938 (package
939 (name "python-six")
b6ab89ef 940 (version "1.10.0")
a480bc41
EB
941 (source
942 (origin
943 (method url-fetch)
b6ab89ef 944 (uri (pypi-uri "six" version))
a480bc41
EB
945 (sha256
946 (base32
b6ab89ef 947 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
a480bc41 948 (build-system python-build-system)
4fd129ee
MB
949 (native-inputs
950 `(("python-py" ,python-py)
951 ("python-pytest" ,python-pytest)))
a480bc41
EB
952 (home-page "http://pypi.python.org/pypi/six/")
953 (synopsis "Python 2 and 3 compatibility utilities")
954 (description
35b9e423 955 "Six is a Python 2 and 3 compatibility library. It provides utility
a480bc41
EB
956functions for smoothing over the differences between the Python versions with
957the goal of writing Python code that is compatible on both Python versions.
35b9e423 958Six supports every Python version since 2.5. It is contained in only one
a480bc41 959Python file, so it can be easily copied into your project.")
3f641af0 960 (license license:x11)))
a480bc41 961
0c20025c
AE
962(define-public python2-six
963 (package-with-python2 python-six))
964
cafc3f5a
EB
965(define-public python-dateutil-2
966 (package
967 (name "python-dateutil")
394b8060 968 (version "2.5.2")
cafc3f5a
EB
969 (source
970 (origin
971 (method url-fetch)
394b8060 972 (uri (pypi-uri "python-dateutil" version))
cafc3f5a
EB
973 (sha256
974 (base32
394b8060 975 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
cafc3f5a 976 (build-system python-build-system)
f22efa01 977 (propagated-inputs
394b8060 978 `(("python-six" ,python-six)))
b5a5fb19 979 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a
EB
980 (synopsis "Extensions to the standard datetime module")
981 (description
982 "The dateutil module provides powerful extensions to the standard
983datetime module, available in Python 2.3+.")
f210e944 984 (license license:bsd-3)))
cafc3f5a
EB
985
986(define-public python2-dateutil-2
f210e944 987 (package-with-python2 python-dateutil-2))
cafc3f5a 988
fc50e9c6
AE
989(define-public python-dateutil
990 (package
991 (name "python-dateutil")
992 (version "1.5") ; last version for python < 3
993 (source
994 (origin
995 (method url-fetch)
cafc3f5a
EB
996 (uri (string-append "http://labix.org/download/python-dateutil/"
997 "python-dateutil-" version ".tar.gz"))
fc50e9c6
AE
998 (sha256
999 (base32
1000 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
1001 (build-system python-build-system)
b5a5fb19 1002 (home-page "https://dateutil.readthedocs.io/en/stable/")
cafc3f5a 1003 (synopsis "Extensions to the standard datetime module")
fc50e9c6
AE
1004 (description
1005 "The dateutil module provides powerful extensions to the standard
1006datetime module, available in Python 2.3+.")
3f641af0 1007 (license license:psfl)))
fc50e9c6
AE
1008
1009(define-public python2-dateutil
1010 (package-with-python2 python-dateutil))
1d08c01f 1011
cafc3f5a
EB
1012(define-public python-parsedatetime
1013 (package
1014 (name "python-parsedatetime")
eebf6f01 1015 (version "2.1")
cafc3f5a
EB
1016 (source
1017 (origin
1018 (method url-fetch)
eebf6f01 1019 (uri (pypi-uri "parsedatetime" version))
cafc3f5a
EB
1020 (sha256
1021 (base32
eebf6f01 1022 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
cafc3f5a
EB
1023 (build-system python-build-system)
1024 (native-inputs
eebf6f01
EF
1025 `(("python-nose" ,python-nose)
1026 ("python-pyicu" ,python-pyicu)))
cafc3f5a
EB
1027 (home-page "http://github.com/bear/parsedatetime/")
1028 (synopsis
1029 "Parse human-readable date/time text")
1030 (description
e881752c 1031 "Parse human-readable date/time text.")
f210e944 1032 (license license:asl2.0)))
cafc3f5a 1033
38b8f9b2 1034(define-public python2-parsedatetime
f210e944 1035 (package-with-python2 python-parsedatetime))
38b8f9b2 1036
d072efcb
RW
1037(define-public python-pandas
1038 (package
1039 (name "python-pandas")
7d0c3c8d 1040 (version "0.18.1")
d072efcb
RW
1041 (source
1042 (origin
1b96f069 1043 (method url-fetch)
7d0c3c8d
EF
1044 (uri (string-append
1045 "https://pypi.python.org/packages/11/09/"
1046 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1047 "pandas-" version ".tar.gz"))
1b96f069 1048 (sha256
7d0c3c8d 1049 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
d072efcb 1050 (build-system python-build-system)
d072efcb 1051 (propagated-inputs
f22efa01
HG
1052 `(("python-numpy" ,python-numpy)
1053 ("python-pytz" ,python-pytz)
d072efcb
RW
1054 ("python-dateutil" ,python-dateutil-2)))
1055 (native-inputs
abcc7a0e
HG
1056 `(("python-nose" ,python-nose)
1057 ("python-cython" ,python-cython)))
d072efcb
RW
1058 (home-page "http://pandas.pydata.org")
1059 (synopsis "Data structures for data analysis, time series, and statistics")
1060 (description
1061 "Pandas is a Python package providing fast, flexible, and expressive data
1062structures designed to make working with structured (tabular,
1063multidimensional, potentially heterogeneous) and time series data both easy
1064and intuitive. It aims to be the fundamental high-level building block for
1065doing practical, real world data analysis in Python.")
f210e944 1066 (license license:bsd-3)))
d072efcb
RW
1067
1068(define-public python2-pandas
f210e944 1069 (package-with-python2 python-pandas))
d072efcb 1070
cafc3f5a
EB
1071(define-public python-tzlocal
1072 (package
1073 (name "python-tzlocal")
ed80839b 1074 (version "1.2.2")
cafc3f5a
EB
1075 (source
1076 (origin
1077 (method url-fetch)
226d3331 1078 (uri (pypi-uri "tzlocal" version))
cafc3f5a
EB
1079 (sha256
1080 (base32
ed80839b 1081 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
cafc3f5a 1082 (build-system python-build-system)
f22efa01
HG
1083 (propagated-inputs
1084 `(("python-pytz" ,python-pytz)))
cafc3f5a
EB
1085 (home-page "https://github.com/regebro/tzlocal")
1086 (synopsis
35b9e423 1087 "Local timezone information for Python")
cafc3f5a
EB
1088 (description
1089 "Tzlocal returns a tzinfo object with the local timezone information.
1090This module attempts to fix a glaring hole in pytz, that there is no way to
1091get the local timezone information, unless you know the zoneinfo name, and
1092under several distributions that's hard or impossible to figure out.")
3f641af0 1093 (license license:cc0)))
cafc3f5a 1094
1d08c01f
AE
1095(define-public python2-pysqlite
1096 (package
1097 (name "python2-pysqlite")
fe476868 1098 (version "2.8.1")
1d08c01f
AE
1099 (source
1100 (origin
1101 (method url-fetch)
fe476868 1102 (uri (pypi-uri "pysqlite" version))
1d08c01f
AE
1103 (sha256
1104 (base32
fe476868 1105 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1d08c01f
AE
1106 (build-system python-build-system)
1107 (inputs
1108 `(("sqlite" ,sqlite)))
1109 (arguments
1110 `(#:python ,python-2 ; incompatible with Python 3
1111 #:tests? #f)) ; no test target
fe476868 1112 (home-page "http://github.com/ghaering/pysqlite")
7a03af70 1113 (synopsis "SQLite bindings for Python")
1d08c01f
AE
1114 (description
1115 "Pysqlite provides SQLite bindings for Python that comply to the
1116Database API 2.0T.")
ed0cdf83 1117 (license license:zlib)))
1d08c01f 1118
2875caf5
AE
1119
1120(define-public python2-mechanize
1121 (package
1122 (name "python2-mechanize")
1123 (version "0.2.5")
1124 (source
1125 (origin
1126 (method url-fetch)
1127 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1128 version ".tar.gz"))
1129 (sha256
1130 (base32
1131 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1132 (build-system python-build-system)
2875caf5
AE
1133 (arguments
1134 `(#:python ,python-2 ; apparently incompatible with Python 3
1135 #:tests? #f))
1136 ;; test fails with message
1137 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1138 ;; (python-3.3.2) or
1139 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1140 ;; (python-2.7.5).
1141 ;; The source code is from March 2011 and probably not up-to-date
1142 ;; with respect to python unit tests.
1143 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1144 (synopsis
1145 "Stateful programmatic web browsing in Python")
1146 (description
1147 "Mechanize implements stateful programmatic web browsing in Python,
1148after Andy Lester’s Perl module WWW::Mechanize.")
3f641af0
DC
1149 (license (license:non-copyleft
1150 "file://COPYING"
1151 "See COPYING in the distribution."))))
2875caf5 1152
0352532e
AE
1153
1154(define-public python-simplejson
1155 (package
1156 (name "python-simplejson")
b2e6e150 1157 (version "3.10.0")
0352532e
AE
1158 (source
1159 (origin
1160 (method url-fetch)
988d1bad 1161 (uri (pypi-uri "simplejson" version))
0352532e
AE
1162 (sha256
1163 (base32
b2e6e150 1164 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
0352532e
AE
1165 (build-system python-build-system)
1166 (home-page "http://simplejson.readthedocs.org/en/latest/")
1167 (synopsis
1168 "Json library for Python")
1169 (description
e881752c
AK
1170 "JSON (JavaScript Object Notation) is a subset of JavaScript
1171syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1172format.
0352532e
AE
1173
1174Simplejson exposes an API familiar to users of the standard library marshal
1175and pickle modules. It is the externally maintained version of the json
1176library contained in Python 2.6, but maintains compatibility with Python 2.5
1177and (currently) has significant performance advantages, even without using
1178the optional C extension for speedups. Simplejson is also supported on
1179Python 3.3+.")
3f641af0 1180 (license license:x11)))
0352532e
AE
1181
1182(define-public python2-simplejson
1183 (package-with-python2 python-simplejson))
421a80a2
AE
1184
1185
ed07b08d 1186(define-public python-pyicu
421a80a2 1187 (package
ed07b08d 1188 (name "python-pyicu")
d3b29319 1189 (version "1.9.2")
421a80a2
AE
1190 (source
1191 (origin
1192 (method url-fetch)
1193 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1194 version ".tar.gz"))
1195 (sha256
1196 (base32
d3b29319 1197 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
421a80a2
AE
1198 (build-system python-build-system)
1199 (inputs
1200 `(("icu4c" ,icu4c)))
421a80a2 1201 (home-page "http://pyicu.osafoundation.org/")
9e771e3b 1202 (synopsis "Python extension wrapping the ICU C++ API")
421a80a2
AE
1203 (description
1204 "PyICU is a python extension wrapping the ICU C++ API.")
f210e944 1205 (license license:x11)))
ed07b08d
LF
1206
1207(define-public python2-pyicu
f210e944 1208 (package-with-python2 python-pyicu))
cc20a22a
LC
1209
1210(define-public python2-dogtail
1211 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1212 ;; spaces in indentation" with Python 3.
1213 (package
1214 (name "python2-dogtail")
1215 (version "0.8.2")
1216 (source (origin
1217 (method url-fetch)
1218 (uri (string-append
1219 "https://fedorahosted.org/released/dogtail/dogtail-"
1220 version ".tar.gz"))
1221 (sha256
1222 (base32
1223 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1224 (build-system python-build-system)
1225 (arguments `(#:python ,python-2
1226 #:tests? #f)) ; invalid command "test"
1227 (home-page "https://fedorahosted.org/dogtail/")
1228 (synopsis "GUI test tool and automation framework written in ​Python")
1229 (description
35b9e423 1230 "Dogtail is a GUI test tool and automation framework written in Python.
cc20a22a
LC
1231It uses Accessibility (a11y) technologies to communicate with desktop
1232applications. dogtail scripts are written in Python and executed like any
1233other Python program.")
3f641af0 1234 (license license:gpl2+)))
515e6878 1235
011b18c3
LC
1236(define-public python2-empy
1237 (package
1238 (name "python2-empy")
1239 (version "3.3")
1240 (source (origin
1241 (method url-fetch)
1242 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1243 version ".tar.gz"))
1244 (sha256
1245 (base32
1246 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1247 (build-system python-build-system)
1248 (arguments
1249 `(#:python ,python-2
1250 #:phases (alist-replace
1251 'check
1252 (lambda _
1253 (zero? (system* "./test.sh")))
1254 %standard-phases)))
1255 (home-page "http://www.alcyone.com/software/empy/")
1256 (synopsis "Templating system for Python")
1257 (description
1258 "EmPy is a system for embedding Python expressions and statements in
1259template text; it takes an EmPy source file, processes it, and produces
1260output. This is accomplished via expansions, which are special signals to the
1cd4027c 1261EmPy system and are set off by a special prefix (by default the at sign, @@).
011b18c3
LC
1262EmPy can expand arbitrary Python expressions and statements in this way, as
1263well as a variety of special forms. Textual data not explicitly delimited in
1264this way is sent unaffected to the output, allowing Python to be used in
1265effect as a markup language. Also supported are callbacks via hooks,
1266recording and playback via diversions, and dynamic, chainable filters. The
1267system is highly configurable via command line options and embedded
1268commands.")
3f641af0 1269 (license license:lgpl2.1+)))
011b18c3 1270
8deeda0c
LC
1271(define-public python2-element-tree
1272 (package
1273 (name "python2-element-tree")
1274 (version "1.2.6")
1275 (source (origin
1276 (method url-fetch)
1277 (uri (string-append
1278 "http://effbot.org/media/downloads/elementtree-"
1279 version "-20050316.tar.gz"))
1280 (sha256
1281 (base32
1282 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1283 (build-system python-build-system)
1284 (arguments
1285 `(#:python ,python-2 ; seems to be part of Python 3
1286 #:tests? #f)) ; no 'test' sub-command
1287 (synopsis "Toolkit for XML processing in Python")
1288 (description
1289 "ElementTree is a Python library supporting lightweight XML processing.")
1290 (home-page "http://effbot.org/zone/element-index.htm")
3f641af0
DC
1291 (license (license:x11-style
1292 "http://docs.python.org/2/license.html"
1293 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
8deeda0c
LC
1294
1295(define-public python2-pybugz
1296 (package
1297 (name "python2-pybugz")
1298 (version "0.6.11")
1299 (source (origin
1300 (method url-fetch)
1301 (uri (string-append
1302 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1303 version ".tar.gz"))
1304 (sha256
1305 (base32
6f194a1e 1306 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
fc1adab1
AK
1307 (patches (search-patches "pybugz-stty.patch"
1308 "pybugz-encode-error.patch"))))
8deeda0c
LC
1309 (build-system python-build-system)
1310 (arguments
1311 `(#:python ,python-2 ; SyntaxError with Python 3
1312 #:tests? #f)) ; no 'test' sub-command
f22efa01
HG
1313 (propagated-inputs
1314 `(("element-tree" ,python2-element-tree)))
8deeda0c
LC
1315 (synopsis "Python and command-line interface to Bugzilla")
1316 (description
1317 "PyBugz is a Python library and command-line tool to query the Bugzilla
1318bug tracking system. It is meant as an aid to speed up interaction with the
1319bug tracker.")
1320 (home-page "http://www.liquidx.net/pybugz/")
3f641af0 1321 (license license:gpl2)))
8deeda0c 1322
a480bc41
EB
1323(define-public python-enum34
1324 (package
1325 (name "python-enum34")
d39ae1e5 1326 (version "1.1.0")
a480bc41
EB
1327 (source
1328 (origin
1329 (method url-fetch)
d39ae1e5 1330 (uri (pypi-uri "enum34" version))
a480bc41
EB
1331 (sha256
1332 (base32
d39ae1e5 1333 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
a480bc41 1334 (build-system python-build-system)
a480bc41
EB
1335 (arguments
1336 `(#:phases
1337 (alist-replace
1338 'check
1339 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1340 %standard-phases)))
1341 (home-page "https://pypi.python.org/pypi/enum34")
1342 (synopsis "Backported Python 3.4 Enum")
1343 (description
1344 "Enum34 is the new Python stdlib enum module available in Python 3.4
1345backported for previous versions of Python from 2.4 to 3.3.")
3f641af0 1346 (license license:bsd-3)))
a480bc41 1347
820acd1b
LF
1348(define-public python2-enum34
1349 (package-with-python2 python-enum34))
1350
a480bc41
EB
1351(define-public python-parse-type
1352 (package
1353 (name "python-parse-type")
1354 (version "0.3.4")
1355 (source
1356 (origin
1357 (method url-fetch)
1358 (uri (string-append "https://pypi.python.org/packages/source/p/"
1359 "parse_type/parse_type-" version ".tar.gz"))
1360 (sha256
1361 (base32
1362 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1363 (build-system python-build-system)
f22efa01 1364 (propagated-inputs
f3b98f4f 1365 `(("python-six" ,python-six)
68f1cdec 1366 ("python-parse" ,python-parse)))
a480bc41
EB
1367 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1368 (home-page "https://github.com/jenisys/parse_type")
1369 (synopsis "Extended parse module")
1370 (description
1371 "Parse_type extends the python parse module.")
3f641af0 1372 (license license:bsd-3)))
a480bc41
EB
1373
1374(define-public python-parse
1375 (package
1376 (name "python-parse")
eb3d3503 1377 (version "1.6.6")
a480bc41
EB
1378 (source
1379 (origin
1380 (method url-fetch)
eb3d3503 1381 (uri (pypi-uri "parse" version))
a480bc41
EB
1382 (sha256
1383 (base32
aa6c09ed
EF
1384 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1385 (patches (search-patches "python-parse-too-many-fields.patch"))))
a480bc41
EB
1386 (build-system python-build-system)
1387 (arguments
1388 `(#:phases
f9a65318
EF
1389 (modify-phases %standard-phases
1390 (replace 'check
1391 (lambda _ (zero? (system* "python" "test_parse.py")))))))
a480bc41
EB
1392 (home-page "https://github.com/r1chardj0n3s/parse")
1393 (synopsis "Parse strings")
1394 (description
1395 "Parse strings using a specification based on the Python format()
1396syntax.")
3f641af0 1397 (license license:x11)))
a480bc41 1398
d3eff97a
JL
1399(define-public python-polib
1400 (package
1401 (name "python-polib")
1402 (version "1.0.8")
1403 (source (origin
1404 (method url-fetch)
1405 (uri (pypi-uri "polib" version))
1406 (sha256
1407 (base32
1408 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1409 (build-system python-build-system)
1410 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1411 (synopsis "Manipulate, create and modify gettext files")
1412 (description "Polib can manipulate any gettext format (po, pot and mo)
1413files. It can be used to create po files from scratch or to modify
1414existing ones.")
1415 (license license:expat)))
1416
1417(define-public python2-polib
1418 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1419 (package
1420 (inherit base)
1421 (arguments `(,@(package-arguments base)
1422 ;; Tests don't work with python2.
1423 #:tests? #f)))))
a480bc41 1424
515e6878
LC
1425(define-public scons
1426 (package
1427 (name "scons")
a3f61425 1428 (version "2.3.4")
515e6878
LC
1429 (source (origin
1430 (method url-fetch)
de67e922
LF
1431 (uri (string-append "mirror://sourceforge/scons/scons/" version
1432 "/scons-" version ".tar.gz"))
515e6878
LC
1433 (sha256
1434 (base32
a3f61425 1435 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
515e6878
LC
1436 (build-system python-build-system)
1437 (arguments
1438 ;; With Python 3.x, fails to build with a syntax error.
1439 `(#:python ,python-2
b3e8b4bd 1440 #:use-setuptools? #f ; still relies on distutils
515e6878
LC
1441 #:tests? #f)) ; no 'python setup.py test' command
1442 (home-page "http://scons.org/")
1443 (synopsis "Software construction tool written in Python")
1444 (description
1445 "SCons is a software construction tool. Think of SCons as an improved,
1446cross-platform substitute for the classic Make utility with integrated
1447functionality similar to autoconf/automake and compiler caches such as ccache.
1448In short, SCons is an easier, more reliable and faster way to build
1449software.")
3f641af0 1450 (license license:x11)))
011b18c3 1451
c15a5c0e
DT
1452(define-public python-extras
1453 (package
1454 (name "python-extras")
1455 (version "0.0.3")
1456 (source
1457 (origin
1458 (method url-fetch)
1459 (uri (string-append
1460 "https://pypi.python.org/packages/source/e/extras/extras-"
1461 version ".tar.gz"))
1462 (sha256
1463 (base32
1464 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1465 (build-system python-build-system)
c15a5c0e
DT
1466 (arguments
1467 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1468 '(#:tests? #f))
1469 (home-page "https://github.com/testing-cabal/extras")
1470 (synopsis "Useful extensions to the Python standard library")
1471 (description
1472 "Extras is a set of extensions to the Python standard library.")
bd3fa666 1473 (license license:expat)))
c15a5c0e
DT
1474
1475(define-public python2-extras
1476 (package-with-python2 python-extras))
1477
56ea0efd
DT
1478(define-public python-mimeparse
1479 (package
1480 (name "python-mimeparse")
1481 (version "0.1.4")
1482 (source
1483 (origin
1484 (method url-fetch)
1485 (uri (string-append
1486 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1487 version ".tar.gz"))
1488 (sha256
1489 (base32
1490 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1491 (build-system python-build-system)
56ea0efd
DT
1492 (arguments
1493 '(#:tests? #f)) ; no setup.py test command
1494 (home-page
1495 "https://github.com/dbtsai/python-mimeparse")
9e771e3b 1496 (synopsis "Python library for parsing MIME types")
56ea0efd
DT
1497 (description
1498 "Mimeparse provides basic functions for parsing MIME type names and
1499matching them against a list of media-ranges.")
bd3fa666 1500 (license license:expat)))
56ea0efd
DT
1501
1502(define-public python2-mimeparse
1503 (package-with-python2 python-mimeparse))
1504
4435427e
DT
1505(define-public python-nose
1506 (package
1507 (name "python-nose")
f7cb9841 1508 (version "1.3.7")
4435427e
DT
1509 (source
1510 (origin
1511 (method url-fetch)
f7cb9841 1512 (uri (pypi-uri "nose" version))
4435427e
DT
1513 (sha256
1514 (base32
f7cb9841 1515 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
4435427e 1516 (build-system python-build-system)
4435427e
DT
1517 (arguments
1518 '(#:tests? #f)) ; FIXME: test suite fails
1519 (home-page "http://readthedocs.org/docs/nose/")
1520 (synopsis "Python testing library")
1521 (description
1522 "Nose extends the unittest library to make testing easier.")
3f641af0 1523 (license license:lgpl2.0+)))
4435427e
DT
1524
1525(define-public python2-nose
1526 (package-with-python2 python-nose))
1527
0aea283a
EF
1528(define-public python-nose2
1529 (package
1530 (name "python-nose2")
1531 (version "0.6.5")
1532 (source
1533 (origin
1534 (method url-fetch)
1535 (uri (pypi-uri "nose2" version))
1536 (sha256
1537 (base32
1538 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1539 (build-system python-build-system)
1540 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
f22efa01 1541 (propagated-inputs
0aea283a
EF
1542 `(("python-cov-core" ,python-cov-core)
1543 ("python-pytest-cov" ,python-pytest-cov)
1544 ("python-six" ,python-six)))
1545 (home-page "https://github.com/nose-devs/nose2")
1546 (synopsis "Next generation of nicer testing for Python")
1547 (description
1548 "Nose2 is the next generation of nicer testing for Python, based on the
1549plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1550better plugin api, being easier for users to configure, and simplifying internal
1551interfaces and processes.")
1552 (license license:bsd-2)))
1553
1554(define-public python2-nose2
1555 (package-with-python2 python-nose2))
1556
6cd9c356
DT
1557(define-public python-unittest2
1558 (package
1559 (name "python-unittest2")
1560 (version "0.5.1")
1561 (source
1562 (origin
1563 (method url-fetch)
1564 (uri (string-append
1565 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1566 version ".tar.gz"))
1567 (sha256
1568 (base32
1569 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1570 (build-system python-build-system)
6cd9c356
DT
1571 (home-page "http://pypi.python.org/pypi/unittest2")
1572 (synopsis "Python unit testing library")
1573 (description
1574 "Unittest2 is a replacement for the unittest module in the Python
1575standard library.")
3f641af0 1576 (license license:psfl)))
6cd9c356
DT
1577
1578(define-public python2-unittest2
1579 (package (inherit python-unittest2)
1580 (name "python2-unittest2")
1581 (version "0.5.1")
1582 (source
1583 (origin
1584 (method url-fetch)
1585 (uri (string-append
1586 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1587 version ".tar.gz"))
1588 (sha256
1589 (base32
1590 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
6cd9c356
DT
1591 (arguments
1592 `(#:python ,python-2
1593 #:tests? #f)))) ; no setup.py test command
1594
02f8f804 1595(define-public python-pafy
1596 (package
1597 (name "python-pafy")
1598 (version "0.5.2")
1599 (source
1600 (origin
1601 (method url-fetch)
1602 (uri (pypi-uri "pafy" version))
1603 (sha256
1604 (base32
1605 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1606 (build-system python-build-system)
ed3fee5f 1607 (arguments
1608 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
02f8f804 1609 (propagated-inputs
1610 ;; Youtube-dl is a python package which is imported in the file
1611 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1612 `(("youtube-dl" ,youtube-dl)))
1613 (home-page "https://np1.github.io/pafy/")
1614 (synopsis "Retrieve YouTube content and metadata")
1615 (description
1616 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1617 (license license:lgpl3+)))
1618
542ad60f
DT
1619(define-public python-py
1620 (package
1621 (name "python-py")
71c8a804 1622 (version "1.4.31")
542ad60f
DT
1623 (source
1624 (origin
1625 (method url-fetch)
71c8a804 1626 (uri (pypi-uri "py" version))
542ad60f
DT
1627 (sha256
1628 (base32
71c8a804 1629 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
542ad60f 1630 (build-system python-build-system)
dcb0da7b
MB
1631 (arguments
1632 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1633 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1634 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1635 ;; Is this module globally installed?"
1636 '(#:tests? #f))
542ad60f
DT
1637 (home-page "http://pylib.readthedocs.org/")
1638 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1639 (description
1640 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1641code introspection, and logging.")
bd3fa666 1642 (license license:expat)))
542ad60f
DT
1643
1644(define-public python2-py
1645 (package-with-python2 python-py))
1646
855d4761
DT
1647(define-public python-pytest
1648 (package
1649 (name "python-pytest")
61a4332d 1650 (version "2.7.3")
855d4761
DT
1651 (source
1652 (origin
1653 (method url-fetch)
1654 (uri (string-append
1655 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1656 version ".tar.gz"))
1657 (sha256
1658 (base32
61a4332d 1659 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
855d4761
DT
1660 (modules '((guix build utils)))
1661 (snippet
1662 ;; One of the tests involves the /usr directory, so it fails.
1663 '(substitute* "testing/test_argcomplete.py"
1664 (("def test_remove_dir_prefix\\(self\\):")
1665 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1666 (build-system python-build-system)
482d9591
HG
1667 (propagated-inputs
1668 `(("python-py" ,python-py)))
e7881f3d 1669 (native-inputs
482d9591 1670 `(("python-nose" ,python-nose)
855d4761
DT
1671 ("python-mock" ,python-mock)))
1672 (home-page "http://pytest.org")
1673 (synopsis "Python testing library")
1674 (description
1675 "Pytest is a testing tool that provides auto-discovery of test modules
1676and functions, detailed info on failing assert statements, modular fixtures,
1677and many external plugins.")
bd3fa666 1678 (license license:expat)))
855d4761
DT
1679
1680(define-public python2-pytest
1681 (package-with-python2 python-pytest))
1682
fca4ff35
LF
1683;; This package is used by Borg until we can upgrade all our Python packages to
1684;; use a more recent pytest.
1685(define-public python-pytest-2.9.2
1686 (package
1687 (inherit python-pytest)
1688 (name "python-pytest")
1689 (version "2.9.2")
1690 (source (origin
1691 (method url-fetch)
1692 (uri (pypi-uri "pytest" version))
1693 (sha256
1694 (base32
1695 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1696 (arguments
1697 `(#:phases
1698 (modify-phases %standard-phases
1699 (add-before 'check 'disable-invalid-test
1700 (lambda _
1701 (substitute* "testing/test_argcomplete.py"
1702 (("def test_remove_dir_prefix" line)
1703 (string-append "@pytest.mark.skip"
1704 "(reason=\"Assumes that /usr exists.\")\n "
1705 line)))
1706 #t)))))))
1707
358c3d61
EF
1708(define-public python-pytest-cov
1709 (package
1710 (name "python-pytest-cov")
545f4a1c 1711 (version "2.2.1")
358c3d61
EF
1712 (source
1713 (origin
1714 (method url-fetch)
1715 (uri (pypi-uri "pytest-cov" version))
1716 (sha256
545f4a1c
EF
1717 (base32
1718 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
10468636 1719 (build-system python-build-system)
ce40b383
HG
1720 (arguments
1721 `(#:phases
1722 (modify-phases %standard-phases
1723 (replace 'check
1724 (lambda _
1725 ;; options taken from tox.ini
1726 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1727 ;; with "Duplicate implicit target name"
1728 (zero? (system* "python" "./setup.py" "check"
1729 "--strict" "--metadata")))))))
f22efa01 1730 (propagated-inputs
10468636
EF
1731 `(("python-coverage" ,python-coverage)
1732 ("python-pytest" ,python-pytest)))
10468636
EF
1733 (home-page "https://github.com/pytest-dev/pytest-cov")
1734 (synopsis "Pytest plugin for measuring coverage")
1735 (description
1736 "Pytest-cov produces coverage reports. It supports centralised testing and
1737distributed testing in both @code{load} and @code{each} modes. It also
1738supports coverage of subprocesses.")
f210e944 1739 (license license:expat)))
358c3d61
EF
1740
1741(define-public python2-pytest-cov
f210e944 1742 (package-with-python2 python-pytest-cov))
358c3d61 1743
6784f2e3
RW
1744(define-public python-pytest-runner
1745 (package
1746 (name "python-pytest-runner")
1747 (version "2.6.2")
1748 (source
1749 (origin
1750 (method url-fetch)
54cd239b 1751 (uri (pypi-uri "pytest-runner" version))
6784f2e3
RW
1752 (sha256
1753 (base32
1754 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1755 (build-system python-build-system)
1756 (arguments
1757 `(#:phases
1758 (modify-phases %standard-phases
1759 ;; The fancy way of setting the version with setuptools_scm does not
1760 ;; seem to work here.
1761 (add-after 'unpack 'set-version
1762 (lambda _
1763 (substitute* "docs/conf.py"
1764 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1765 (string-append "version = \"" ,version "\"")))
1766 #t)))))
1767 (native-inputs
1768 `(("python-pytest" ,python-pytest)
1769 ("python-setuptools-scm" ,python-setuptools-scm)))
54cd239b 1770 (home-page "https://github.com/pytest-dev/pytest-runner")
6784f2e3
RW
1771 (synopsis "Invoke py.test as a distutils command")
1772 (description
1773 "This package provides a @command{pytest-runner} command that
1774@file{setup.py} files can use to run tests.")
f210e944 1775 (license license:expat)))
54cd239b
EF
1776
1777(define-public python2-pytest-runner
f210e944 1778 (package-with-python2 python-pytest-runner))
6784f2e3 1779
44547e51
EF
1780(define-public python-pytest-mock
1781 (package
1782 (name "python-pytest-mock")
1783 (version "1.2")
1784 (source
1785 (origin
1786 (method url-fetch)
1787 (uri (pypi-uri "pytest-mock" version ".zip"))
1788 (sha256
1789 (base32
1790 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1791 (build-system python-build-system)
1792 (native-inputs
1793 `(("unzip" ,unzip)))
f22efa01 1794 (propagated-inputs
d5e41cf2 1795 `(("python-pytest" ,python-pytest)))
44547e51
EF
1796 (home-page "https://github.com/pytest-dev/pytest-mock/")
1797 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1798 (description
1799 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1800around the patching API provided by the @code{mock} package, but with the
1801benefit of not having to worry about undoing patches at the end of a test.
1802The mocker fixture has the same API as @code{mock.patch}, supporting the
1803same arguments.")
1804 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1805 (license license:expat)))
1806
1807(define-public python2-pytest-mock
1808 (let ((base (package-with-python2
1809 (strip-python2-variant python-pytest-mock))))
1810 (package (inherit base)
f22efa01 1811 (propagated-inputs
44547e51 1812 `(("python2-mock" ,python2-mock)
f22efa01 1813 ,@(package-propagated-inputs base))))))
44547e51 1814
8fa58fc9
CAW
1815(define-public python-pytest-xdist
1816 (package
1817 (name "python-pytest-xdist")
1818 (version "1.14")
1819 (source
1820 (origin
1821 (method url-fetch)
1822 (uri (pypi-uri "pytest-xdist" version ".zip"))
1823 (sha256
1824 (base32
de585a7e
HG
1825 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1826 (modules '((guix build utils)))
1827 (snippet
1828 '(begin
1829 ;; Remove pre-compiled .pyc files from source.
1830 (for-each delete-file-recursively
1831 (find-files "." "__pycache__" #:directories? #t))
1832 (for-each delete-file (find-files "." "\\.pyc$"))
1833 #t))))
8fa58fc9
CAW
1834 (build-system python-build-system)
1835 (native-inputs
1836 `(("unzip" ,unzip)
8fa58fc9 1837 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 1838 (propagated-inputs
c4516ad2 1839 `(("python-execnet" ,python-execnet)
8fa58fc9
CAW
1840 ("python-pytest" ,python-pytest)
1841 ("python-py" ,python-py)))
1842 (home-page
1843 "https://github.com/pytest-dev/pytest-xdist")
1844 (synopsis
1845 "Plugin for py.test with distributed testing and loop-on-failing modes")
1846 (description
1847 "The pytest-xdist plugin extends py.test with some unique test execution
1848modes: parallelization, running tests in boxed subprocesses, the ability
1849to run tests repeatedly when failed, and the ability to run tests on multiple
1850Python interpreters or platforms. It uses rsync to copy the existing
1851program code to a remote location, executes there, and then syncs the
1852result back.")
f210e944 1853 (license license:expat)))
8fa58fc9
CAW
1854
1855(define-public python2-pytest-xdist
f210e944 1856 (package-with-python2 python-pytest-xdist))
8fa58fc9 1857
84d24017
DT
1858(define-public python-scripttest
1859 (package
1860 (name "python-scripttest")
1861 (version "1.3")
1862 (source
1863 (origin
1864 (method url-fetch)
1865 (uri (string-append
1866 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1867 version ".tar.gz"))
1868 (sha256
1869 (base32
1870 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1871 (build-system python-build-system)
521b7772 1872 (native-inputs
f3b98f4f 1873 `(("python-pytest" ,python-pytest)))
84d24017
DT
1874 (home-page "http://pythonpaste.org/scripttest/")
1875 (synopsis "Python library to test command-line scripts")
1876 (description "Scripttest is a Python helper library for testing
1877interactive command-line applications. With it you can run a script in a
1878subprocess and see the output as well as any file modifications.")
bd3fa666 1879 (license license:expat)))
84d24017
DT
1880
1881(define-public python2-scripttest
1882 (package-with-python2 python-scripttest))
1883
d8fa80e1
DT
1884(define-public python-testtools
1885 (package
1886 (name "python-testtools")
1887 (version "1.0.0")
1888 (source
1889 (origin
1890 (method url-fetch)
1891 (uri (string-append
1892 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1893 version ".tar.gz"))
1894 (sha256
1895 (base32
1896 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1897 (build-system python-build-system)
0e88cbf8 1898 (propagated-inputs
f22efa01
HG
1899 `(("python-mimeparse" ,python-mimeparse)
1900 ("python-extras" ,python-extras)))
d8fa80e1
DT
1901 (home-page "https://github.com/testing-cabal/testtools")
1902 (synopsis
1903 "Extensions to the Python standard library unit testing framework")
1904 (description
1905 "Testtools extends the Python standard library unit testing framework to
1906provide matchers, more debugging information, and cross-Python
1907compatibility.")
3f641af0 1908 (license license:psfl)))
d8fa80e1
DT
1909
1910(define-public python2-testtools
1911 (package-with-python2 python-testtools))
1912
5bf3afea
DT
1913(define-public python-testscenarios
1914 (package
1915 (name "python-testscenarios")
1916 (version "0.4")
1917 (source
1918 (origin
1919 (method url-fetch)
1920 (uri (string-append
1921 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1922 version ".tar.gz"))
1923 (sha256
1924 (base32
1925 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1926 (build-system python-build-system)
f22efa01 1927 (propagated-inputs
8e73d3ba 1928 `(("python-testtools" ,python-testtools)))
5bf3afea
DT
1929 (home-page "https://launchpad.net/testscenarios")
1930 (synopsis "Pyunit extension for dependency injection")
1931 (description
1932 "Testscenarios provides clean dependency injection for Python unittest
1933style tests.")
3f641af0 1934 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
5bf3afea
DT
1935
1936(define-public python2-testscenarios
1937 (package-with-python2 python-testscenarios))
1938
dac79ecc
DT
1939(define-public python-testresources
1940 (package
1941 (name "python-testresources")
1942 (version "0.2.7")
1943 (source
1944 (origin
1945 (method url-fetch)
1946 (uri (string-append
1947 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1948 version ".tar.gz"))
1949 (sha256
1950 (base32
1951 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1952 (build-system python-build-system)
dac79ecc
DT
1953 (home-page "https://launchpad.net/testresources")
1954 (synopsis
1955 "Pyunit extension for managing test resources")
1956 (description
1957 "Testresources is an extension to Python's unittest to allow declarative
1958use of resources by test cases.")
3f641af0 1959 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
dac79ecc
DT
1960
1961(define-public python2-testresources
1962 (package-with-python2 python-testresources))
1963
070ab058
DT
1964(define-public python-subunit
1965 (package
1966 (name "python-subunit")
1967 (version "0.0.21")
1968 (source
1969 (origin
1970 (method url-fetch)
1971 (uri (string-append
1972 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1973 version ".tar.gz"))
1974 (sha256
1975 (base32
1976 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1977 (build-system python-build-system)
f22efa01 1978 (propagated-inputs
b52ad371
HG
1979 `(("python-extras" ,python-extras)
1980 ("python-mimeparse" ,python-mimeparse)))
1981 (native-inputs
1982 `(("python-testscenarios" ,python-testscenarios)))
070ab058
DT
1983 (home-page "http://launchpad.net/subunit")
1984 (synopsis "Python implementation of the subunit protocol")
1985 (description
1986 "Python-subunit is a Python implementation of the subunit test streaming
1987protocol.")
3f641af0 1988 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
070ab058
DT
1989
1990(define-public python2-subunit
1991 (package-with-python2 python-subunit))
1992
d2a8db92
HG
1993;; Recent versions of python-fixtures and python-testrepository need
1994;; python-pbr for packaging, which itself needs these two packages for
1995;; testing.
1996;; To fix this circular dependency, we use a build of python-pbr, based on the
1997;; same source, just without any test dependencies and with tests disabled.
1998;; python-pbr-minmal is then used to package python-fixtures and
1999;; python-testrepository.
2000;; Strictly speaking we currently could remove the test-requirements from the
2001;; normal python-pbr package (and save this package) since test are disabled
2002;; there anyway. But this may change in future.
2003(define python-pbr-minimal
cd49454b 2004 (package
d2a8db92
HG
2005 (name "python-pbr-minimal")
2006 (version "1.8.1")
7787ef76
CR
2007 (source
2008 (origin
2009 (method url-fetch)
d2a8db92 2010 (uri (pypi-uri "pbr" version))
7787ef76
CR
2011 (sha256
2012 (base32
d2a8db92 2013 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
7787ef76
CR
2014 (build-system python-build-system)
2015 (arguments
d2a8db92
HG
2016 `(#:tests? #f))
2017 (home-page "http://docs.openstack.org/developer/pbr/")
2018 (synopsis "Minimal build of python-pbr used for bootstrapping")
7787ef76 2019 (description
d2a8db92 2020 "Used only for bootstrapping python2-pbr, you should not need this.")
3f641af0 2021 (license license:asl2.0)))
7787ef76 2022
d2a8db92
HG
2023(define python2-pbr-minimal
2024 (package-with-python2 python-pbr-minimal))
7787ef76 2025
1ef09c0c 2026(define-public python-pbr
e25f0174 2027 (package
d2a8db92 2028 (inherit python-pbr-minimal)
e25f0174 2029 (name "python-pbr")
e25f0174
BW
2030 (arguments
2031 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2032 (propagated-inputs
d2a8db92
HG
2033 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2034 (native-inputs
e25f0174 2035 `(("python-fixtures" ,python-fixtures)
d2a8db92 2036 ;; discover, coverage, hacking, subunit
e25f0174 2037 ("python-mock" ,python-mock)
d2a8db92 2038 ("python-six" ,python-six)
e25f0174
BW
2039 ("python-sphinx" ,python-sphinx)
2040 ("python-testrepository" ,python-testrepository)
2041 ("python-testresources" ,python-testresources)
2042 ("python-testscenarios" ,python-testscenarios)
2043 ("python-testtools" ,python-testtools)
2044 ("python-virtualenv" ,python-virtualenv)))
d2a8db92 2045 (synopsis "Enhance the default behavior of Python’s setuptools")
e25f0174
BW
2046 (description
2047 "Python Build Reasonableness (PBR) is a library that injects some useful
d2a8db92
HG
2048and sensible default behaviors into your setuptools run. It will set
2049versions, process requirements files and generate AUTHORS and ChangeLog file
2050from git information.
2051")))
1ef09c0c
BW
2052
2053(define-public python2-pbr
e25f0174 2054 (package-with-python2 python-pbr))
1ef09c0c 2055
7787ef76
CR
2056(define-public python-fixtures
2057 (package
2058 (name "python-fixtures")
13fcc6df 2059 (version "1.4.0")
7787ef76
CR
2060 (source
2061 (origin
2062 (method url-fetch)
13fcc6df 2063 (uri (pypi-uri "fixtures" version))
7787ef76
CR
2064 (sha256
2065 (base32
13fcc6df 2066 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
7787ef76
CR
2067 (build-system python-build-system)
2068 (propagated-inputs
ae92cadd 2069 `(("python-six" ,python-six)))
e7881f3d 2070 (native-inputs
d2a8db92 2071 `(("python-pbr-minimal" ,python-pbr-minimal)
7787ef76 2072 ("python-testtools" ,python-testtools)))
7787ef76
CR
2073 (home-page "https://launchpad.net/python-fixtures")
2074 (synopsis "Python test fixture library")
2075 (description
2076 "Fixtures provides a way to create reusable state, useful when writing
2077Python tests.")
3f641af0 2078 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
7787ef76 2079
cd49454b
DT
2080(define-public python2-fixtures
2081 (package-with-python2 python-fixtures))
2082
b24a0c00
DT
2083(define-public python-testrepository
2084 (package
2085 (name "python-testrepository")
2086 (version "0.0.20")
2087 (source
2088 (origin
2089 (method url-fetch)
2090 (uri (string-append
2091 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2092 version ".tar.gz"))
2093 (sha256
2094 (base32
2095 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2096 (build-system python-build-system)
05de40c5 2097 (propagated-inputs
b2e66edf
HG
2098 `(("python-fixtures" ,python-fixtures)
2099 ("python-subunit" ,python-subunit)
b52ad371
HG
2100 ("python-testtools" ,python-testtools)))
2101 (native-inputs
2102 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
b24a0c00
DT
2103 ("python-mimeparse" ,python-mimeparse)))
2104 (home-page "https://launchpad.net/testrepository")
2105 (synopsis "Database for Python test results")
2106 (description "Testrepository provides a database of test results which can
2107be used as part of a developer's workflow to check things such as what tests
2108have failed since the last commit or what tests are currently failing.")
3f641af0 2109 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
b24a0c00
DT
2110
2111(define-public python2-testrepository
2112 (package-with-python2 python-testrepository))
2113
243a009a
DT
2114(define-public python-coverage
2115 (package
2116 (name "python-coverage")
4d4cf3dd 2117 (version "4.1")
243a009a
DT
2118 (source
2119 (origin
2120 (method url-fetch)
82a3c582 2121 (uri (pypi-uri "coverage" version))
243a009a
DT
2122 (sha256
2123 (base32
4d4cf3dd 2124 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
243a009a 2125 (build-system python-build-system)
bd10e677
MB
2126 (arguments
2127 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2128 '(#:tests? #f))
243a009a
DT
2129 (home-page "http://nedbatchelder.com/code/coverage")
2130 (synopsis "Code coverage measurement for Python")
2131 (description
2132 "Coverage measures code coverage, typically during test execution. It
2133uses the code analysis tools and tracing hooks provided in the Python standard
2134library to determine which lines are executable, and which have been
2135executed.")
3f641af0 2136 (license license:bsd-3)))
243a009a
DT
2137
2138(define-public python2-coverage
2139 (package-with-python2 python-coverage))
2140
12f839fd
EF
2141(define-public python-cov-core
2142 (package
2143 (name "python-cov-core")
2144 (version "1.15.0")
2145 (source
2146 (origin
2147 (method url-fetch)
2148 (uri (pypi-uri "cov-core" version))
2149 (sha256
2150 (base32
2151 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2152 (build-system python-build-system)
f78e1c27 2153 (propagated-inputs
12f839fd
EF
2154 `(("python-coverage" ,python-coverage)))
2155 (home-page "https://github.com/schlamar/cov-core")
2156 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2157 (description
2158 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2159It is useful for developing coverage plugins for these testing frameworks.")
f210e944 2160 (license license:expat)))
12f839fd
EF
2161
2162(define-public python2-cov-core
f210e944 2163 (package-with-python2 python-cov-core))
12f839fd 2164
041358fb
DT
2165(define-public python-discover
2166 (package
2167 (name "python-discover")
2168 (version "0.4.0")
2169 (source
2170 (origin
2171 (method url-fetch)
2172 (uri (string-append
2173 "https://pypi.python.org/packages/source/d/discover/discover-"
2174 version ".tar.gz"))
2175 (sha256
2176 (base32
2177 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2178 (build-system python-build-system)
041358fb
DT
2179 (home-page "http://pypi.python.org/pypi/discover/")
2180 (synopsis
2181 "Python test discovery for unittest")
2182 (description
2183 "Discover provides test discovery for unittest, a feature that has been
e881752c 2184backported from Python 2.7 for Python 2.4+.")
3f641af0 2185 (license license:bsd-3)))
041358fb
DT
2186
2187(define-public python2-discover
2188 (package-with-python2 python-discover))
2189
a480bc41
EB
2190(define-public behave
2191 (package
2192 (name "behave")
287cfd1a 2193 (version "1.2.5")
a480bc41
EB
2194 (source (origin
2195 (method url-fetch)
287cfd1a 2196 (uri (pypi-uri "behave" version ".tar.bz2"))
a480bc41
EB
2197 (sha256
2198 (base32
287cfd1a 2199 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
a480bc41 2200 (build-system python-build-system)
f22efa01 2201 (propagated-inputs
f3b98f4f 2202 `(("python-six" ,python-six)
a480bc41
EB
2203 ("python-parse" ,python-parse)
2204 ("python-parse-type" ,python-parse-type)))
2205 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2206 ;PyHamcrest>=1.8
2207 (home-page "http://github.com/behave/behave")
2208 (synopsis "Python behavior-driven development")
2209 (description
2210 "Behave is a tool for behavior-driven development in python.
2211Behavior-driven development (or BDD) is an agile software development
2212technique that encourages collaboration between developers, QA and
2213non-technical or business participants in a software project. Behave uses
2214tests written in a natural language style, backed up by Python code.")
3f641af0 2215 (license license:x11)))
c7303d3c
DT
2216
2217(define-public python-exif-read
2218 (package
2219 (name "python-exif-read")
2a2d0981 2220 (version "2.1.2")
c7303d3c
DT
2221 (source (origin
2222 (method url-fetch)
2a2d0981 2223 (uri (pypi-uri "ExifRead" version))
c7303d3c
DT
2224 (sha256
2225 (base32
2a2d0981 2226 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
c7303d3c 2227 (build-system python-build-system)
c7303d3c
DT
2228 (arguments `(#:tests? #f)) ; no tests
2229 (home-page "https://github.com/ianare/exif-py")
2230 (synopsis "Python library to extract EXIF data from image files")
2231 (description
2232 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2233files.")
3f641af0 2234 (license license:bsd-3)))
c7303d3c
DT
2235
2236(define-public python2-exif-read
2237 (package-with-python2 python-exif-read))
d5f89b22
DT
2238
2239(define-public python-pyld
2240 (package
2241 (name "python-pyld")
8957af32 2242 (version "0.7.1")
d5f89b22
DT
2243 (source (origin
2244 (method url-fetch)
af1ab773 2245 (uri (pypi-uri "PyLD" version))
d5f89b22
DT
2246 (sha256
2247 (base32
8957af32 2248 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
d5f89b22 2249 (build-system python-build-system)
d5f89b22
DT
2250 (arguments `(#:tests? #f)) ; no tests
2251 (home-page "http://github.com/digitalbazaar/pyld")
2252 (synopsis "Python implementation of the JSON-LD specification")
2253 (description
2254 "PyLD is an implementation of the JSON-LD specification.")
3f641af0 2255 (license license:bsd-3)))
d5f89b22
DT
2256
2257(define-public python2-pyld
2258 (package-with-python2 python-pyld))
3a1f9a68
DT
2259
2260(define-public python-certifi
2261 (package
2262 (name "python-certifi")
b2a2232c 2263 (version "2016.8.31")
3a1f9a68
DT
2264 (source (origin
2265 (method url-fetch)
9a41f443 2266 (uri (pypi-uri "certifi" version))
3a1f9a68
DT
2267 (sha256
2268 (base32
b2a2232c 2269 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
3a1f9a68 2270 (build-system python-build-system)
3a1f9a68
DT
2271 (arguments `(#:tests? #f)) ; no tests
2272 (home-page "http://python-requests.org/")
2273 (synopsis "Python CA certificate bundle")
2274 (description
2275 "Certifi is a Python library that contains a CA certificate bundle, which
2276is used by the Requests library to verify HTTPS requests.")
3f641af0 2277 (license license:asl2.0)))
3a1f9a68
DT
2278
2279(define-public python2-certifi
2280 (package-with-python2 python-certifi))
e6cfbd36 2281
12c270dd
RW
2282(define-public python-click
2283 (package
2284 (name "python-click")
43accb58 2285 (version "6.6")
12c270dd
RW
2286 (source
2287 (origin
2288 (method url-fetch)
375f224b 2289 (uri (pypi-uri "click" version))
12c270dd 2290 (sha256
43accb58
LF
2291 (base32
2292 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
12c270dd 2293 (build-system python-build-system)
e2ab5a09
BW
2294 (arguments
2295 `(#:phases
2296 (modify-phases %standard-phases
2297 (add-after 'unpack 'fix-paths
2298 (lambda* (#:key inputs #:allow-other-keys)
2299 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2300 "cross-libc" "libc"))))
2301 (substitute* "click/_unicodefun.py"
2302 (("'locale'")
2303 (string-append "'" glibc "/bin/locale'"))))
2304 #t)))))
12c270dd
RW
2305 (home-page "http://click.pocoo.org")
2306 (synopsis "Command line library for Python")
2307 (description
2308 "Click is a Python package for creating command line interfaces in a
2309composable way with as little code as necessary. Its name stands for
2310\"Command Line Interface Creation Kit\". It's highly configurable but comes
2311with sensible defaults out of the box.")
3f641af0 2312 (license license:bsd-3)))
12c270dd
RW
2313
2314(define-public python2-click
2315 (package-with-python2 python-click))
2316
addc808d
EF
2317(define-public python-wheel
2318 (package
2319 (name "python-wheel")
40981b5c 2320 (version "0.29.0")
e1ba0749
EF
2321 (source
2322 (origin
2323 (method url-fetch)
2324 (uri (pypi-uri "wheel" version))
2325 (sha256
2326 (base32
40981b5c 2327 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
e1ba0749
EF
2328 (build-system python-build-system)
2329 (native-inputs
f3b98f4f 2330 `(("python-jsonschema" ,python-jsonschema)
e1ba0749
EF
2331 ("python-pytest-cov" ,python-pytest-cov)))
2332 (home-page "https://bitbucket.org/pypa/wheel/")
2333 (synopsis "Format for built Python packages")
2334 (description
2335 "A wheel is a ZIP-format archive with a specially formatted filename and
2336the @code{.whl} extension. It is designed to contain all the files for a PEP
2337376 compatible install in a way that is very close to the on-disk format. Many
2338packages will be properly installed with only the @code{Unpack} step and the
2339unpacked archive preserves enough information to @code{Spread} (copy data and
2340scripts to their final locations) at any later time. Wheel files can be
2341installed with a newer @code{pip} or with wheel's own command line utility.")
8ad4ae20
LF
2342 (license license:expat)
2343 (properties `((python2-variant . ,(delay python2-wheel))))))
addc808d
EF
2344
2345(define-public python2-wheel
8ad4ae20
LF
2346 (let ((wheel (package-with-python2
2347 (strip-python2-variant python-wheel))))
264ae686 2348 (package (inherit wheel)
8ad4ae20
LF
2349 (native-inputs `(("python2-functools32" ,python2-functools32)
2350 ,@(package-native-inputs wheel))))))
2351
addc808d 2352
ae641128 2353(define-public python-requests
e6cfbd36 2354 (package
ae641128 2355 (name "python-requests")
74a066f9 2356 (version "2.9.1")
e6cfbd36
DT
2357 (source (origin
2358 (method url-fetch)
5d691657 2359 (uri (pypi-uri "requests" version))
e6cfbd36
DT
2360 (sha256
2361 (base32
74a066f9 2362 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
e6cfbd36 2363 (build-system python-build-system)
5d691657 2364 (native-inputs
f3b98f4f 2365 `(("python-py" ,python-py)
5d691657
EF
2366 ("python-pytest" ,python-pytest)
2367 ("python-pytest-cov" ,python-pytest-cov)
2368 ("python-wheel" ,python-wheel)))
e6cfbd36
DT
2369 (home-page "http://python-requests.org/")
2370 (synopsis "Python HTTP library")
2371 (description
2372 "Requests is a Python HTTP client library. It aims to be easier to use
2373than Python’s urllib2 library.")
3f641af0 2374 (license license:asl2.0)))
864b5211 2375
e9005180
DT
2376;; Some software requires an older version of Requests, notably Docker
2377;; Compose.
2378(define-public python-requests-2.7
2379 (package (inherit python-requests)
2380 (version "2.7.0")
2381 (source (origin
2382 (method url-fetch)
2383 (uri (pypi-uri "requests" version))
2384 (sha256
2385 (base32
2386 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2387
ae641128 2388(define-public python2-requests
8ad4ae20 2389 (package-with-python2 python-requests))
ae641128 2390
ea521b42
DT
2391(define-public python-vcversioner
2392 (package
2393 (name "python-vcversioner")
538fe019 2394 (version "2.16.0.0")
ea521b42
DT
2395 (source
2396 (origin
2397 (method url-fetch)
2398 (uri (pypi-uri "vcversioner" version))
2399 (sha256
2400 (base32
538fe019 2401 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
ea521b42 2402 (build-system python-build-system)
ea521b42
DT
2403 (synopsis "Python library for version number discovery")
2404 (description "Vcversioner is a Python library that inspects tagging
2405information in a variety of version control systems in order to discover
2406version numbers.")
2407 (home-page "https://github.com/habnabit/vcversioner")
f210e944 2408 (license license:isc)))
ea521b42
DT
2409
2410(define-public python2-vcversioner
f210e944 2411 (package-with-python2 python-vcversioner))
ae641128 2412
864b5211
DT
2413(define-public python-jsonschema
2414 (package
2415 (name "python-jsonschema")
b3667afb 2416 (version "2.5.1")
864b5211
DT
2417 (source (origin
2418 (method url-fetch)
2419 (uri
2420 (string-append
2421 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2422 version ".tar.gz"))
2423 (sha256
2424 (base32
b3667afb 2425 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
864b5211 2426 (build-system python-build-system)
8bcd6b91
EF
2427 (arguments
2428 '(#:phases
2429 (modify-phases %standard-phases
2430 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
eaba9d66 2431 (native-inputs
8bcd6b91
EF
2432 `(("python-nose" ,python-nose)
2433 ("python-vcversioner" ,python-vcversioner)))
2434 (home-page "https://github.com/Julian/jsonschema")
864b5211
DT
2435 (synopsis "Implementation of JSON Schema for Python")
2436 (description
2437 "Jsonschema is an implementation of JSON Schema for Python.")
a14600ec
LF
2438 (license license:expat)
2439 (properties `((python2-variant . ,(delay python2-jsonschema))))))
864b5211
DT
2440
2441(define-public python2-jsonschema
a14600ec
LF
2442 (let ((jsonschema (package-with-python2
2443 (strip-python2-variant python-jsonschema))))
264ae686 2444 (package (inherit jsonschema)
eaba9d66 2445 (native-inputs
8bcd6b91 2446 `(("python2-mock" ,python2-mock)
eaba9d66
MB
2447 ,@(package-native-inputs jsonschema)))
2448 (propagated-inputs
2449 `(("python2-functools32" ,python2-functools32))))))
850189b8
DT
2450
2451(define-public python-unidecode
2452 (package
2453 (name "python-unidecode")
8925d4f3 2454 (version "0.04.18")
850189b8
DT
2455 (source (origin
2456 (method url-fetch)
8925d4f3 2457 (uri (pypi-uri "Unidecode" version))
850189b8
DT
2458 (sha256
2459 (base32
8925d4f3 2460 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
850189b8 2461 (build-system python-build-system)
850189b8
DT
2462 (home-page "https://pypi.python.org/pypi/Unidecode")
2463 (synopsis "ASCII transliterations of Unicode text")
2464 (description
2465 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2466useful when integrating with legacy code that doesn't support Unicode, or for
2467ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2468machine identifiers from human-readable Unicode strings that should still be
2469somewhat intelligeble.")
3f641af0 2470 (license license:gpl2+)))
850189b8
DT
2471
2472(define-public python2-unidecode
2473 (package-with-python2 python-unidecode))
6d45fef4
DT
2474
2475(define-public python-pyjwt
2476 (package
2477 (name "python-pyjwt")
eb31d4b4 2478 (version "1.4.0")
6d45fef4
DT
2479 (source
2480 (origin
2481 (method url-fetch)
eb31d4b4 2482 (uri (pypi-uri "PyJWT" version))
6d45fef4
DT
2483 (sha256
2484 (base32
eb31d4b4 2485 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
6d45fef4 2486 (build-system python-build-system)
eb31d4b4 2487 (native-inputs
130fe994
HG
2488 `(("python-pytest" ,python-pytest)
2489 ("python-pytest-cov" ,python-pytest-cov)
2490 ("python-pytest-runner" ,python-pytest-runner)))
6d45fef4
DT
2491 (home-page "http://github.com/progrium/pyjwt")
2492 (synopsis "JSON Web Token implementation in Python")
2493 (description
2494 "PyJWT is a JSON Web Token implementation written in Python.")
bd3fa666 2495 (license license:expat)))
6d45fef4
DT
2496
2497(define-public python2-pyjwt
2498 (package-with-python2 python-pyjwt))
2499
2cec1f6f
DT
2500(define-public python-oauthlib
2501 (package
2502 (name "python-oauthlib")
bde2171d 2503 (version "1.0.3")
2cec1f6f
DT
2504 (source (origin
2505 (method url-fetch)
bde2171d 2506 (uri (pypi-uri "oauthlib" version))
2cec1f6f
DT
2507 (sha256
2508 (base32
bde2171d 2509 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2cec1f6f 2510 (build-system python-build-system)
bde2171d 2511 (native-inputs
bb06aa34 2512 `(("python-nose" ,python-nose)
bde2171d 2513 ("python-cryptography" ,python-cryptography)
bb06aa34
HG
2514 ("python-pyjwt" ,python-pyjwt)
2515 ("python-blinker" ,python-blinker)))
2cec1f6f
DT
2516 (home-page "https://github.com/idan/oauthlib")
2517 (synopsis "OAuth implementation for Python")
2518 (description
2519 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2520OAuth request-signing logic.")
3f641af0 2521 (license license:bsd-3)
59f151ec 2522 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2cec1f6f
DT
2523
2524(define-public python2-oauthlib
59f151ec 2525 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2cec1f6f
DT
2526 (package
2527 (inherit base)
00e10c6e 2528 (native-inputs `(("python2-unittest2" ,python2-unittest2)
bb06aa34 2529 ("python2-mock" ,python2-mock)
59f151ec 2530 ,@(package-native-inputs base))))))
ec5dbb5c
DT
2531
2532(define-public python-itsdangerous
2533 (package
2534 (name "python-itsdangerous")
2535 (version "0.24")
2536 (source
2537 (origin
2538 (method url-fetch)
2539 (uri (string-append
2540 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2541 version ".tar.gz"))
2542 (sha256
2543 (base32
2544 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2545 (build-system python-build-system)
ec5dbb5c
DT
2546 (home-page "http://github.com/mitsuhiko/itsdangerous")
2547 (synopsis "Python library for passing data to/from untrusted environments")
2548 (description
2549 "Itsdangerous provides various helpers to pass trusted data to untrusted
2550environments and back.")
f210e944 2551 (license license:bsd-3)))
ec5dbb5c
DT
2552
2553(define-public python2-itsdangerous
f210e944 2554 (package-with-python2 python-itsdangerous))
5731cae3 2555
8d12be1e
RW
2556(define-public python-pyyaml
2557 (package
2558 (name "python-pyyaml")
2559 (version "3.11")
2560 (source
2561 (origin
2562 (method url-fetch)
2563 (uri (string-append
2564 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2565 version ".tar.gz"))
2566 (sha256
2567 (base32
2568 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2569 (build-system python-build-system)
2570 (inputs
2571 `(("libyaml" ,libyaml)))
8d12be1e
RW
2572 (home-page "http://pyyaml.org/wiki/PyYAML")
2573 (synopsis "YAML parser and emitter for Python")
2574 (description
2575 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2576complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2577API, and sensible error messages. PyYAML supports standard YAML tags and
2578provides Python-specific tags that allow to represent an arbitrary Python
2579object.")
2580 (license license:expat)))
2581
2582(define-public python2-pyyaml
2583 (package-with-python2 python-pyyaml))
2584
5731cae3
DT
2585(define-public python-virtualenv
2586 (package
2587 (name "python-virtualenv")
58d04dba 2588 (version "15.0.3")
5731cae3
DT
2589 (source
2590 (origin
2591 (method url-fetch)
17804240 2592 (uri (pypi-uri "virtualenv" version))
5731cae3
DT
2593 (sha256
2594 (base32
58d04dba 2595 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
5731cae3 2596 (build-system python-build-system)
17804240
EF
2597 (arguments
2598 `(#:phases
2599 (modify-phases %standard-phases
58d04dba
RW
2600 (replace 'check
2601 (lambda _
2602 ;; Disable failing test. See upstream bug report
2603 ;; https://github.com/pypa/virtualenv/issues/957
2604 (substitute* "tests/test_virtualenv.py"
2605 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2606 (zero? (system* "py.test")))))))
e7881f3d 2607 (native-inputs
f3b98f4f 2608 `(("python-mock" ,python-mock)
17804240 2609 ("python-pytest" ,python-pytest)))
5731cae3
DT
2610 (home-page "https://virtualenv.pypa.io/")
2611 (synopsis "Virtual Python environment builder")
2612 (description
2613 "Virtualenv is a tool to create isolated Python environments.")
bd3fa666 2614 (license license:expat)))
5731cae3
DT
2615
2616(define-public python2-virtualenv
2617 (package-with-python2 python-virtualenv))
8176d4d5
DT
2618
2619(define-public python-markupsafe
2620 (package
2621 (name "python-markupsafe")
2622 (version "0.23")
2623 (source
2624 (origin
2625 (method url-fetch)
2626 (uri (string-append
2627 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2628 version ".tar.gz"))
2629 (sha256
2630 (base32
2631 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2632 (build-system python-build-system)
8176d4d5
DT
2633 (home-page "http://github.com/mitsuhiko/markupsafe")
2634 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2635 (description
2636 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2637for Python.")
3f641af0 2638 (license license:bsd-3)))
8176d4d5
DT
2639
2640(define-public python2-markupsafe
2641 (package-with-python2 python-markupsafe))
fe34f0d1
DT
2642
2643(define-public python-jinja2
2644 (package
2645 (name "python-jinja2")
e98149b3 2646 (version "2.8")
fe34f0d1
DT
2647 (source
2648 (origin
2649 (method url-fetch)
e98149b3 2650 (uri (pypi-uri "Jinja2" version))
fe34f0d1
DT
2651 (sha256
2652 (base32
e98149b3 2653 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
fe34f0d1 2654 (build-system python-build-system)
f22efa01 2655 (propagated-inputs
f3b98f4f 2656 `(("python-markupsafe" ,python-markupsafe)))
fe34f0d1
DT
2657 (home-page "http://jinja.pocoo.org/")
2658 (synopsis "Python template engine")
2659 (description
2660 "Jinja2 is a small but fast and easy to use stand-alone template engine
2661written in pure Python.")
3f641af0 2662 (license license:bsd-3)))
fe34f0d1
DT
2663
2664(define-public python2-jinja2
2665 (package-with-python2 python-jinja2))
3580ab8b 2666
f7d17ac7
EE
2667(define-public python-pystache
2668 (package
2669 (name "python-pystache")
2670 (version "0.5.4")
2671 (source (origin
2672 (method url-fetch)
2673 (uri (pypi-uri "pystache" version))
2674 (sha256
2675 (base32
2676 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2677 (build-system python-build-system)
f7d17ac7
EE
2678 (home-page "http://defunkt.io/pystache/")
2679 (synopsis "Python logic-less template engine")
2680 (description
2681 "Pystache is a Python implementation of the framework agnostic,
2682logic-free templating system Mustache.")
2683 (license license:expat)))
2684
2685(define-public python2-pystache
2686 (package-with-python2 python-pystache))
2687
1285119b
RW
2688(define-public python-joblib
2689 (package
2690 (name "python-joblib")
f34ef331 2691 (version "0.10.3")
1285119b
RW
2692 (source (origin
2693 (method url-fetch)
f34ef331 2694 (uri (pypi-uri "joblib" version))
1285119b
RW
2695 (sha256
2696 (base32
6aa5f1ca
HG
2697 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2698 (modules '((guix build utils)))
2699 (snippet
2700 '(begin
2701 ;; Remove pre-compiled .pyc files from source.
2702 (for-each delete-file-recursively
2703 (find-files "." "__pycache__" #:directories? #t))
2704 (for-each delete-file (find-files "." "\\.pyc$"))
2705 #t))))
1285119b 2706 (build-system python-build-system)
a8dd960a
RW
2707 (arguments
2708 `(#:phases
2709 (modify-phases %standard-phases
2710 (add-before 'check 'disable-failing-tests
2711 (lambda _
2712 ;; This numpydoc tests fails for unknown reasons
2713 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2714 ;; This numpydoc test depends on matplotlib, which is not a
2715 ;; required input.
2716 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2717 ;; These tests fail to execute sys.executable
2718 (substitute* "joblib/test/test_parallel.py"
2719 (("import nose" line)
2720 (string-append "from nose.plugins.skip import SkipTest\n" line))
2721 (("def test_nested_parallel_warnings" line)
2722 (string-append "@SkipTest\n" line))
2723 (("def test_parallel_with_interactively_defined_functions" line)
2724 (string-append "@SkipTest\n" line)))
2725 #t)))))
f052ec9a 2726 ;; Provide nose to enable tests command
1285119b 2727 (native-inputs
f3b98f4f 2728 `(("python-nose" ,python-nose)
f34ef331
RW
2729 ("python-sphinx" ,python-sphinx)
2730 ("python-docutils" ,python-docutils)
2731 ("python-numpydoc" ,python-numpydoc)))
1285119b
RW
2732 (home-page "http://pythonhosted.org/joblib/")
2733 (synopsis "Using Python functions as pipeline jobs")
2734 (description
2735 "Joblib is a set of tools to provide lightweight pipelining in Python.
2736In particular, joblib offers: transparent disk-caching of the output values
2737and lazy re-evaluation (memoize pattern), easy simple parallel computing
2738logging and tracing of the execution.")
3f641af0 2739 (license license:bsd-3)))
1285119b
RW
2740
2741(define-public python2-joblib
2742 (package-with-python2 python-joblib))
2743
3580ab8b
DT
2744(define-public python-docutils
2745 (package
2746 (name "python-docutils")
2747 (version "0.12")
2748 (source
2749 (origin
2750 (method url-fetch)
2751 (uri (string-append
2752 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2753 version ".tar.gz"))
2754 (sha256
2755 (base32
2756 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2757 (build-system python-build-system)
3580ab8b
DT
2758 (arguments
2759 '(#:tests? #f)) ; no setup.py test command
2760 (home-page "http://docutils.sourceforge.net/")
2761 (synopsis "Python Documentation Utilities")
2762 (description
2763 "Docutils is a modular system for processing documentation into useful
2764formats, such as HTML, XML, and LaTeX. For input Docutils supports
2765reStructuredText.")
2766 ;; Most of the source code is public domain, but some source files are
2767 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3f641af0 2768 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3580ab8b
DT
2769
2770(define-public python2-docutils
2771 (package-with-python2 python-docutils))
fb35b7c0
DT
2772
2773(define-public python-pygments
2774 (package
2775 (name "python-pygments")
9f442285 2776 (version "2.0.2")
fb35b7c0
DT
2777 (source
2778 (origin
2779 (method url-fetch)
9f442285 2780 (uri (pypi-uri "Pygments" version))
fb35b7c0
DT
2781 (sha256
2782 (base32
9f442285 2783 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
fb35b7c0 2784 (build-system python-build-system)
995cb99e
MB
2785 (arguments
2786 ;; FIXME: Tests require sphinx, which depends on this.
2787 '(#:tests? #f))
fb35b7c0
DT
2788 (home-page "http://pygments.org/")
2789 (synopsis "Syntax highlighting")
2790 (description
2791 "Pygments is a syntax highlighting package written in Python.")
3f641af0 2792 (license license:bsd-2)))
fb35b7c0
DT
2793
2794(define-public python2-pygments
2795 (package-with-python2 python-pygments))
9dd6078d
DT
2796
2797(define-public python-sphinx
2798 (package
2799 (name "python-sphinx")
2800 (version "1.2.3")
2801 (source
2802 (origin
2803 (method url-fetch)
2804 (uri (string-append
2805 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2806 version ".tar.gz"))
2807 (sha256
2808 (base32
2809 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2810 (build-system python-build-system)
03cb5f9e
MB
2811 (arguments
2812 ;; FIXME: Missing dependencies.
2813 '(#:tests? #f))
f22efa01 2814 (propagated-inputs
f3b98f4f 2815 `(("python-jinja2" ,python-jinja2)
9dd6078d
DT
2816 ("python-docutils" ,python-docutils)
2817 ("python-pygments" ,python-pygments)))
2818 (home-page "http://sphinx-doc.org/")
2819 (synopsis "Python documentation generator")
2820 (description "Sphinx is a tool that makes it easy to create documentation
2821for Python projects or other documents consisting of multiple reStructuredText
2822sources.")
3f641af0 2823 (license license:bsd-3)))
9dd6078d
DT
2824
2825(define-public python2-sphinx
2826 (package-with-python2 python-sphinx))
6888830b 2827
ad320b20
RW
2828(define-public python-sphinx-rtd-theme
2829 (package
2830 (name "python-sphinx-rtd-theme")
2831 (version "0.1.6")
2832 (source
2833 (origin
2834 (method url-fetch)
2835 (uri (string-append "https://pypi.python.org/packages/source/s/"
2836 "sphinx_rtd_theme/sphinx_rtd_theme-"
2837 version ".tar.gz"))
2838 (sha256
2839 (base32
2840 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2841 (build-system python-build-system)
ad320b20
RW
2842 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2843 (synopsis "ReadTheDocs.org theme for Sphinx")
2844 (description "A theme for Sphinx used by ReadTheDocs.org.")
bd3fa666 2845 (license license:expat)))
ad320b20
RW
2846
2847(define-public python2-sphinx-rtd-theme
2848 (package-with-python2 python-sphinx-rtd-theme))
2849
fe94cf0c
HG
2850(define-public python-rst.linker
2851 (package
2852 (name "python-rst.linker")
2853 (version "1.7")
2854 (source
2855 (origin
2856 (method url-fetch)
2857 (uri (pypi-uri "rst.linker" version))
2858 (sha256
2859 (base32
2860 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2861 (build-system python-build-system)
2862 (propagated-inputs
2863 `(("python-dateutil" ,python-dateutil-2)
2864 ("python-six" ,python-six)))
2865 (native-inputs
2866 `(("python-setuptools-scm" ,python-setuptools-scm)))
2867 ;; Test would require path.py, which would introduce a cyclic dependence.
2868 (arguments `(#:tests? #f))
2869 ;; Note: As of version 1.7 the documentation is not worth building.
2870 (home-page "https://github.com/jaraco/rst.linker")
2871 (synopsis "Sphinx plugin to add links and timestamps")
2872 (description "rst.linker allows to automatically replace text by a
2873reStructuredText external reference or timestamps. It's primary purpose is to
2874augment the changelog, but it can be used for other documents, too.")
2875 (license license:expat)))
2876
2877(define-public python2-rst.linker
2878 (package-with-python2 python-rst.linker))
2879
f4de5b3b
CAW
2880(define-public python-feedgenerator
2881 (package
2882 (name "python-feedgenerator")
f0412aa2 2883 (version "1.8")
f4de5b3b 2884 (source
f4de5b3b 2885 (origin
f0412aa2
EF
2886 (method url-fetch)
2887 (uri (pypi-uri "feedgenerator" version))
f4de5b3b
CAW
2888 (sha256
2889 (base32
7c88bcf4
HG
2890 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
2891 (modules '((guix build utils)))
2892 (snippet
2893 '(begin
2894 ;; Remove pre-compiled .pyc files from source.
2895 (for-each delete-file-recursively
2896 (find-files "." "__pycache__" #:directories? #t))
2897 (for-each delete-file (find-files "." "\\.pyc$"))
2898 #t))))
f4de5b3b 2899 (build-system python-build-system)
dae73d9b 2900 (propagated-inputs
f3b98f4f 2901 `(("python-pytz" ,python-pytz)
f4de5b3b 2902 ("python-six" ,python-six)))
f0412aa2 2903 (home-page "https://github.com/getpelican/feedgenerator")
f4de5b3b
CAW
2904 (synopsis
2905 "Standalone version of Django's Atom/RSS feed generator")
2906 (description
2907 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2908which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3f641af0 2909 (license license:bsd-3)))
f4de5b3b
CAW
2910
2911(define-public python2-feedgenerator
2912 (package-with-python2 python-feedgenerator))
2913
59ad30e3
CAW
2914(define-public python-blinker
2915 (package
2916 (name "python-blinker")
7fb9ff4d 2917 (version "1.4")
59ad30e3
CAW
2918 (source
2919 (origin
2920 (method url-fetch)
7fb9ff4d 2921 (uri (pypi-uri "blinker" version))
59ad30e3
CAW
2922 (sha256
2923 (base32
7fb9ff4d 2924 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
59ad30e3 2925 (build-system python-build-system)
59ad30e3
CAW
2926 (home-page "http://pythonhosted.org/blinker/")
2927 (synopsis "Fast, simple object-to-object and broadcast signaling")
2928 (description
2929 "Blinker provides a fast dispatching system that allows any number of
2930interested parties to subscribe to events, or \"signals\".")
2931 (license license:expat)))
2932
2933(define-public python2-blinker
2934 (package-with-python2 python-blinker))
2935
b8050e71
CAW
2936(define-public pelican
2937 (package
2938 (name "pelican")
11f97c27 2939 (version "3.6.3")
b8050e71
CAW
2940 (source
2941 (origin
2942 (method url-fetch)
11f97c27 2943 (uri (pypi-uri "pelican" version))
b8050e71
CAW
2944 (sha256
2945 (base32
11f97c27 2946 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
b8050e71 2947 (build-system python-build-system)
f22efa01 2948 (propagated-inputs
b8050e71
CAW
2949 `(("python-feedgenerator" ,python-feedgenerator)
2950 ("python-jinja2" ,python-jinja2)
2951 ("python-pygments" ,python-pygments)
2952 ("python-docutils" ,python-docutils)
2953 ("python-pytz" ,python-pytz)
2954 ("python-blinker" ,python-blinker)
2955 ("python-unidecode" ,python-unidecode)
2956 ("python-six" ,python-six)
2957 ("python-dateutil-2" ,python-dateutil-2)))
2958 (home-page "http://getpelican.com/")
2959 (arguments
2960 `(;; XXX Requires a lot more packages to do unit tests :P
2961 #:tests? #f
2962 #:phases (modify-phases %standard-phases
2963 (add-before
2964 'install 'adjust-requires
2965 ;; Since feedgenerator is installed from git, it doesn't
2966 ;; conform to the version requirements.
2967 ;;
2968 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2969 ;; version requirement so setuptools doesn't get confused.
2970 (lambda _
2971 (substitute* "setup.py"
2972 (("['\"]feedgenerator.*?['\"]")
2973 "'feedgenerator'")))))))
2974 (synopsis "Python-based static site publishing system")
2975 (description
2976 "Pelican is a tool to generate a static blog from reStructuredText,
2977Markdown input files, and more. Pelican uses Jinja2 for templating
2978and is very extensible.")
3f641af0 2979 (license license:agpl3+)))
b8050e71 2980
240ca4aa
RW
2981(define-public python-scikit-learn
2982 (package
2983 (name "python-scikit-learn")
be0a4c26 2984 (version "0.16.1")
240ca4aa
RW
2985 (source
2986 (origin
2987 (method url-fetch)
2988 (uri (string-append
2989 "https://github.com/scikit-learn/scikit-learn/archive/"
2990 version ".tar.gz"))
7e21b9fb 2991 (file-name (string-append name "-" version ".tar.gz"))
240ca4aa
RW
2992 (sha256
2993 (base32
be0a4c26 2994 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
240ca4aa
RW
2995 (build-system python-build-system)
2996 (arguments
2997 `(#:phases
2998 (alist-cons-before
2f6b3d2e
RW
2999 'check 'set-HOME
3000 ;; some tests require access to "$HOME"
3001 (lambda _ (setenv "HOME" "/tmp"))
3002 ;; Tests can only be run after the library has been installed and not
3003 ;; within the source directory.
3004 (alist-cons-after
3005 'install 'check
3006 (lambda _
3007 (with-directory-excursion "/tmp"
3008 ;; With Python 3 one test of 3334 fails
3009 ;; (sklearn.tests.test_common.test_transformers); see
3010 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
3011 (system* "nosetests" "-v" "sklearn")))
3012 (alist-delete 'check %standard-phases)))))
240ca4aa 3013 (inputs
328bb95d
HG
3014 `(("openblas" ,openblas)))
3015 (native-inputs
3016 `(("python-nose" ,python-nose)))
240ca4aa
RW
3017 (propagated-inputs
3018 `(("python-numpy" ,python-numpy)
3019 ("python-scipy" ,python-scipy)))
3020 (home-page "http://scikit-learn.org/")
3021 (synopsis "Machine Learning in Python")
3022 (description
3023 "Scikit-learn provides simple and efficient tools for data
3024mining and data analysis.")
1b5241c5 3025 (license license:bsd-3)))
240ca4aa
RW
3026
3027(define-public python2-scikit-learn
1b5241c5 3028 (package-with-python2 python-scikit-learn))
240ca4aa 3029
12f8f9bb
RW
3030(define-public python-scikit-image
3031 (package
3032 (name "python-scikit-image")
3033 (version "0.11.3")
3034 (source
3035 (origin
3036 (method url-fetch)
3037 (uri (string-append
3038 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3039 version ".tar.gz"))
3040 (sha256
3041 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3042 (build-system python-build-system)
b83e2333 3043 ;; See DEPENDS.txt for the list of build and run time requiremnts
12f8f9bb
RW
3044 (propagated-inputs
3045 `(("python-matplotlib" ,python-matplotlib)
3046 ("python-networkx" ,python-networkx)
12f8f9bb 3047 ("python-scipy" ,python-scipy)
12f8f9bb
RW
3048 ("python-pillow" ,python-pillow)))
3049 (native-inputs
b83e2333
HG
3050 `(("python-numpy" ,python-numpy)
3051 ("python-cython" ,python-cython)
3052 ("python-six" ,python-six)))
12f8f9bb
RW
3053 (home-page "http://scikit-image.org/")
3054 (synopsis "Image processing in Python")
3055 (description
e881752c 3056 "Scikit-image is a collection of algorithms for image processing.")
12733594 3057 (license license:bsd-3)))
12f8f9bb
RW
3058
3059(define-public python2-scikit-image
12733594 3060 (package-with-python2 python-scikit-image))
12f8f9bb 3061
5394a6a6
RW
3062(define-public python-redis
3063 (package
3064 (name "python-redis")
3065 (version "2.10.3")
3066 (source
3067 (origin
3068 (method url-fetch)
3069 (uri (string-append
3070 "https://pypi.python.org/packages/source/r/redis/redis-"
3071 version ".tar.gz"))
3072 (sha256
3073 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3074 (build-system python-build-system)
3075 ;; Tests require a running Redis server
3076 (arguments '(#:tests? #f))
cf8124b0
HG
3077 ;; As long as we are not running test, we do not need this input :-)
3078 ;;(native-inputs
3079 ;; `(("python-pytest" ,python-pytest)))
5394a6a6
RW
3080 (home-page "https://github.com/andymccurdy/redis-py")
3081 (synopsis "Redis Python client")
3082 (description
3083 "This package provides a Python interface to the Redis key-value store.")
3084 (license license:expat)))
3085
3086(define-public python2-redis
3087 (package-with-python2 python-redis))
3088
748cef5b
RW
3089(define-public python-rq
3090 (package
3091 (name "python-rq")
3092 (version "0.5.2")
3093 (source
3094 (origin
3095 (method url-fetch)
3096 (uri (string-append
3097 "https://pypi.python.org/packages/source/r/rq/rq-"
3098 version ".tar.gz"))
3099 (sha256
3100 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3101 (build-system python-build-system)
3102 (propagated-inputs
3103 `(("python-click" ,python-click)
3104 ("python-redis" ,python-redis)))
748cef5b
RW
3105 (home-page "http://python-rq.org/")
3106 (synopsis "Simple job queues for Python")
3107 (description
3108 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3109processing them in the background with workers. It is backed by Redis and it
3110is designed to have a low barrier to entry.")
3f641af0 3111 (license license:bsd-2)))
748cef5b
RW
3112
3113(define-public python2-rq
3114 (package-with-python2 python-rq))
3115
6888830b
FB
3116(define-public python-cython
3117 (package
3118 (name "python-cython")
dd22efef 3119 (version "0.24.1")
6888830b
FB
3120 (source
3121 (origin
3122 (method url-fetch)
56918e26 3123 (uri (pypi-uri "Cython" version))
6888830b
FB
3124 (sha256
3125 (base32
dd22efef 3126 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
6888830b
FB
3127 (build-system python-build-system)
3128 ;; we need the full python package and not just the python-wrapper
3129 ;; because we need libpython3.3m.so
3130 (inputs
3131 `(("python" ,python)))
3132 (arguments
3133 `(#:phases
b92f651b
EF
3134 (modify-phases %standard-phases
3135 (add-before 'check 'set-HOME
3136 ;; some tests require access to "$HOME/.cython"
3137 (lambda _ (setenv "HOME" "/tmp")))
3138 (replace 'check
3139 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
6888830b
FB
3140 (home-page "http://cython.org/")
3141 (synopsis "C extensions for Python")
3142 (description "Cython is an optimising static compiler for both the Python
3143programming language and the extended Cython programming language. It makes
3144writing C extensions for Python as easy as Python itself.")
3f641af0 3145 (license license:asl2.0)
48b311b1 3146 (properties `((python2-variant . ,(delay python2-cython))))))
6888830b
FB
3147
3148(define-public python2-cython
48b311b1
LC
3149 (package (inherit (package-with-python2
3150 (strip-python2-variant python-cython)))
6888830b
FB
3151 (name "python2-cython")
3152 (inputs
3153 `(("python-2" ,python-2))))) ; this is not automatically changed
0da98533 3154
ee5fb7ee
AV
3155;; The RPython toolchain currently does not support Python 3.
3156(define-public python2-rpython
3157 (package
3158 (name "python2-rpython")
3159 (version "0.1.4")
3160 (source
3161 (origin
3162 (method url-fetch)
3163 (uri (pypi-uri "rpython" version))
3164 (sha256
3165 (base32
3166 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3167 (build-system python-build-system)
3168 (arguments `(#:python ,python-2))
3169 (native-inputs
f3b98f4f 3170 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
ee5fb7ee
AV
3171 (home-page "https://rpython.readthedocs.org")
3172 (synopsis "Framework for implementing interpreters and virtual machines")
3173 (description "RPython is a translation and support framework for
3174producing implementations of dynamic languages, emphasizing a clean separation
3175between language specification and implementation aspects.")
3176 (license license:expat)))
3177
0da98533
FB
3178;; This version of numpy is missing the documentation and is only used to
3179;; build matplotlib which is required to build numpy's documentation.
3180(define python-numpy-bootstrap
3181 (package
3182 (name "python-numpy-bootstrap")
ef9b4c04 3183 (version "1.10.4")
0da98533
FB
3184 (source
3185 (origin
3186 (method url-fetch)
de67e922 3187 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
0da98533
FB
3188 "/numpy-" version ".tar.gz"))
3189 (sha256
3190 (base32
ef9b4c04 3191 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
0da98533
FB
3192 (build-system python-build-system)
3193 (inputs
328bb95d 3194 `(("openblas" ,openblas)
cba256f8 3195 ("lapack" ,lapack)))
0da98533 3196 (native-inputs
2efabc55
HG
3197 `(("python-nose" ,python-nose)
3198 ("gfortran" ,gfortran)))
0da98533
FB
3199 (arguments
3200 `(#:phases
2efabc55
HG
3201 (modify-phases %standard-phases
3202 (add-before 'build 'set-environment-variables
3203 (lambda* (#:key inputs #:allow-other-keys)
dbdfe515
RW
3204 (call-with-output-file "site.cfg"
3205 (lambda (port)
cba256f8
RW
3206 (format port
3207 "[openblas]
dbdfe515
RW
3208libraries = openblas
3209library_dirs = ~a/lib
3210include_dirs = ~a/include
cba256f8 3211
2efabc55
HG
3212# backslash-n to make emacs happy
3213\n[lapack]
cba256f8
RW
3214lapack_libs = lapack
3215library_dirs = ~a/lib
3216include_dirs = ~a/include
3217"
3218 (assoc-ref inputs "openblas")
3219 (assoc-ref inputs "openblas")
3220 (assoc-ref inputs "lapack")
3221 (assoc-ref inputs "lapack"))))
dbdfe515
RW
3222 ;; Use "gcc" executable, not "cc".
3223 (substitute* "numpy/distutils/system_info.py"
3224 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3225 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2efabc55 3226 #t))
6a843168
FB
3227 ;; Tests can only be run after the library has been installed and not
3228 ;; within the source directory.
2efabc55
HG
3229 (delete 'check)
3230 (add-after 'install 'check
3231 (lambda* (#:key outputs inputs #:allow-other-keys)
3232 ;; Make installed package available for running the tests
3233 (add-installed-pythonpath inputs outputs)
6a843168 3234 (with-directory-excursion "/tmp"
89b5c60e 3235 (zero? (system* "python" "-c"
2efabc55 3236 "import numpy; numpy.test(verbose=2)"))))))))
0da98533
FB
3237 (home-page "http://www.numpy.org/")
3238 (synopsis "Fundamental package for scientific computing with Python")
3239 (description "NumPy is the fundamental package for scientific computing
e881752c 3240with Python. It contains among other things: a powerful N-dimensional array
0da98533
FB
3241object, sophisticated (broadcasting) functions, tools for integrating C/C++
3242and Fortran code, useful linear algebra, Fourier transform, and random number
3243capabilities.")
3f641af0 3244 (license license:bsd-3)))
0da98533
FB
3245
3246(define python2-numpy-bootstrap
3247 (package-with-python2 python-numpy-bootstrap))
15bfe6d6 3248
3a1bfe18
RW
3249(define-public python2-fastlmm
3250 (package
3251 (name "python2-fastlmm")
b074e7d4 3252 (version "0.2.21")
3a1bfe18
RW
3253 (source
3254 (origin
3255 (method url-fetch)
b074e7d4 3256 (uri (pypi-uri "fastlmm" version ".zip"))
3a1bfe18
RW
3257 (sha256
3258 (base32
b074e7d4 3259 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3a1bfe18
RW
3260 (build-system python-build-system)
3261 (arguments
3262 `(#:python ,python-2)) ; only Python 2.7 is supported
3263 (propagated-inputs
3264 `(("python2-numpy" ,python2-numpy)
3265 ("python2-scipy" ,python2-scipy)
3266 ("python2-matplotlib" ,python2-matplotlib)
3267 ("python2-pandas" ,python2-pandas)
3268 ("python2-scikit-learn" ,python2-scikit-learn)
3a1bfe18
RW
3269 ("python2-pysnptools" ,python2-pysnptools)))
3270 (native-inputs
3271 `(("unzip" ,unzip)
2efabc55 3272 ("python2-cython" ,python2-cython)
f3b98f4f 3273 ("python2-mock" ,python2-mock)))
3a1bfe18
RW
3274 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3275 (synopsis "Perform genome-wide association studies on large data sets")
3276 (description
3277 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3278Models, is a program for performing both single-SNP and SNP-set genome-wide
3279association studies (GWAS) on extremely large data sets.")
3f641af0 3280 (license license:asl2.0)))
3a1bfe18 3281
2ee8869a
FB
3282(define-public python-numpy
3283 (package (inherit python-numpy-bootstrap)
3284 (name "python-numpy")
3285 (outputs '("out" "doc"))
89b5c60e 3286 (inputs
b0aa6ede
HG
3287 `(("which" ,which)
3288 ,@(package-inputs python-numpy-bootstrap)))
2efabc55
HG
3289 (propagated-inputs
3290 `(("python-matplotlib" ,python-matplotlib)
2ee8869a 3291 ("python-pyparsing" ,python-pyparsing)
b0aa6ede 3292 ,@(package-propagated-inputs python-numpy-bootstrap)))
2ee8869a
FB
3293 (native-inputs
3294 `(("pkg-config" ,pkg-config)
2efabc55
HG
3295 ("python-sphinx" ,python-sphinx)
3296 ("python-numpydoc" ,python-numpydoc)
2ee8869a
FB
3297 ("texlive" ,texlive)
3298 ("texinfo" ,texinfo)
3299 ("perl" ,perl)
3300 ,@(package-native-inputs python-numpy-bootstrap)))
3301 (arguments
89b5c60e 3302 `(,@(substitute-keyword-arguments
2ee8869a
FB
3303 (package-arguments python-numpy-bootstrap)
3304 ((#:phases phases)
3305 `(alist-cons-after
3306 'install 'install-doc
2efabc55
HG
3307 (lambda* (#:key inputs outputs #:allow-other-keys)
3308 ;; Make installed package available for building the
3309 ;; documentation
3310 (add-installed-pythonpath inputs outputs)
2ee8869a 3311 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
89b5c60e
AE
3312 (doc (string-append
3313 data "/doc/" ,name "-"
2ee8869a
FB
3314 ,(package-version python-numpy-bootstrap)))
3315 (info (string-append data "/info"))
3316 (html (string-append doc "/html"))
3317 (pyver ,(string-append "PYVER=")))
3318 (with-directory-excursion "doc"
3319 (mkdir-p html)
3320 (system* "make" "html" pyver)
3321 (system* "make" "latex" "PAPER=a4" pyver)
89b5c60e 3322 (system* "make" "-C" "build/latex"
2ee8869a
FB
3323 "all-pdf" "PAPER=a4" pyver)
3324 ;; FIXME: Generation of the info file fails.
3325 ;; (system* "make" "info" pyver)
3326 ;; (mkdir-p info)
3327 ;; (copy-file "build/texinfo/numpy.info"
3328 ;; (string-append info "/numpy.info"))
3329 (for-each (lambda (file)
3330 (copy-file (string-append "build/latex" file)
3331 (string-append doc file)))
3332 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3333 (with-directory-excursion "build/html"
3334 (for-each (lambda (file)
3335 (let* ((dir (dirname file))
3336 (tgt-dir (string-append html "/" dir)))
3337 (unless (equal? "." dir)
3338 (mkdir-p tgt-dir))
96c46210 3339 (install-file file html)))
2ee8869a
FB
3340 (find-files "." ".*"))))))
3341 ,phases)))))))
3342
764c077b 3343(define-public python2-numpy
57b7b8cd 3344 (package-with-python2 python-numpy))
2ee8869a 3345
15bfe6d6
FB
3346(define-public python-pyparsing
3347 (package
3348 (name "python-pyparsing")
e0669289 3349 (version "2.0.3")
15bfe6d6
FB
3350 (source
3351 (origin
3352 (method url-fetch)
de67e922
LF
3353 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3354 "/pyparsing-" version
15bfe6d6
FB
3355 "/pyparsing-" version ".tar.gz"))
3356 (sha256
3357 (base32
e0669289 3358 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
15bfe6d6
FB
3359 (build-system python-build-system)
3360 (outputs '("out" "doc"))
3361 (arguments
3362 `(#:tests? #f ; no test target
3363 #:modules ((guix build python-build-system)
3364 (guix build utils))
3365 #:phases
3366 (alist-cons-after
3367 'install 'install-doc
3368 (lambda* (#:key outputs #:allow-other-keys)
89b5c60e 3369 (let* ((doc (string-append (assoc-ref outputs "doc")
15bfe6d6
FB
3370 "/share/doc/" ,name "-" ,version))
3371 (html-doc (string-append doc "/html"))
3372 (examples (string-append doc "/examples")))
3373 (mkdir-p html-doc)
3374 (mkdir-p examples)
89b5c60e 3375 (for-each
15bfe6d6 3376 (lambda (dir tgt)
89b5c60e 3377 (map (lambda (file)
96c46210 3378 (install-file file tgt))
15bfe6d6
FB
3379 (find-files dir ".*")))
3380 (list "docs" "htmldoc" "examples")
3381 (list doc html-doc examples))))
3382 %standard-phases)))
3383 (home-page "http://pyparsing.wikispaces.com")
3384 (synopsis "Python parsing class library")
3385 (description
3386 "The pyparsing module is an alternative approach to creating and
3387executing simple grammars, vs. the traditional lex/yacc approach, or the use
3388of regular expressions. The pyparsing module provides a library of classes
3389that client code uses to construct the grammar directly in Python code.")
bd3fa666 3390 (license license:expat)))
15bfe6d6
FB
3391
3392(define-public python2-pyparsing
3393 (package-with-python2 python-pyparsing))
3394
ec00de35
FB
3395(define-public python-numpydoc
3396 (package
3397 (name "python-numpydoc")
3398 (version "0.5")
3399 (source
3400 (origin
3401 (method url-fetch)
89b5c60e 3402 (uri (string-append
ec00de35
FB
3403 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3404 version ".tar.gz"))
3405 (sha256
3406 (base32
5e4d8f67
AE
3407 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3408 (modules '((guix build utils)))
3409 (snippet
3410 '(begin
3411 ;; Drop a test requiring matplotlib, which we cannot add as an
3412 ;; input since it would create a circular dependency: Extend the
3413 ;; test for Python 3, where it is already dropped, to Python 2.
3414 (substitute* "numpydoc/tests/test_plot_directive.py"
3415 (("3") "2"))))))
ec00de35 3416 (build-system python-build-system)
fe4a8da4 3417 (propagated-inputs
213d1745
HG
3418 `(("python-sphinx" ,python-sphinx)))
3419 (native-inputs
3420 `(("python-nose" ,python-nose)))
ec00de35
FB
3421 (home-page "https://pypi.python.org/pypi/numpydoc")
3422 (synopsis
3423 "Numpy's Sphinx extensions")
3424 (description
3425 "Sphinx extension to support docstrings in Numpy format.")
3f641af0 3426 (license license:bsd-2)))
ec00de35
FB
3427
3428(define-public python2-numpydoc
5e4d8f67 3429 (package-with-python2 python-numpydoc))
1c65314c 3430
1e656049
RW
3431(define-public python-numexpr
3432 (package
3433 (name "python-numexpr")
26112c0a 3434 (version "2.6.0")
1e656049
RW
3435 (source
3436 (origin
3437 (method url-fetch)
26112c0a 3438 (uri (pypi-uri "numexpr" version))
1e656049
RW
3439 (sha256
3440 (base32
26112c0a 3441 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
1e656049
RW
3442 (build-system python-build-system)
3443 (arguments `(#:tests? #f)) ; no tests included
3444 (propagated-inputs
3445 `(("python-numpy" ,python-numpy)))
3446 (home-page "https://github.com/pydata/numexpr")
3447 (synopsis "Fast numerical expression evaluator for NumPy")
3448 (description
3449 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3450expressions that operate on arrays are accelerated and use less memory than
3451doing the same calculation in Python. In addition, its multi-threaded
3452capabilities can make use of all your cores, which may accelerate
3453computations, most specially if they are not memory-bounded (e.g. those using
3454transcendental functions).")
f210e944 3455 (license license:expat)))
1e656049
RW
3456
3457(define-public python2-numexpr
f210e944 3458 (package-with-python2 python-numexpr))
1e656049 3459
1c65314c
FB
3460(define-public python-matplotlib
3461 (package
3462 (name "python-matplotlib")
1bbc659f 3463 (version "1.4.3")
1c65314c
FB
3464 (source
3465 (origin
3466 (method url-fetch)
de67e922
LF
3467 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3468 "/matplotlib-" version
1c65314c
FB
3469 "/matplotlib-" version ".tar.gz"))
3470 (sha256
3471 (base32
1bbc659f 3472 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
fc1adab1 3473 (patches (search-patches "matplotlib-setupext-tk.patch"))))
1c65314c
FB
3474 (build-system python-build-system)
3475 (outputs '("out" "doc"))
25f9a068
FB
3476 (propagated-inputs ; the following packages are all needed at run time
3477 `(("python-pyparsing" ,python-pyparsing)
3478 ("python-pygobject" ,python-pygobject)
3479 ("gobject-introspection" ,gobject-introspection)
1bbc659f 3480 ("python-tkinter" ,python "tk")
ca33a3ad
HG
3481 ("python-dateutil" ,python-dateutil-2)
3482 ("python-numpy" ,python-numpy-bootstrap)
3483 ("python-pillow" ,python-pillow)
3484 ("python-pytz" ,python-pytz)
3485 ("python-six" ,python-six)
25f9a068
FB
3486 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3487 ;; from 'gtk+') provides the required 'typelib' files used by
3488 ;; 'gobject-introspection'. The location of these files is set with the
3489 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3490 ;; is done automatically by a 'native-search-path' procedure. However,
3491 ;; at run-time the user must set this variable as follows:
3492 ;;
3493 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
25f9a068
FB
3494 ("gtk+" ,gtk+)
3495 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3496 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3497 ;; object. For this reason we need to import both libraries.
3498 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3499 ("python-pycairo" ,python-pycairo)
3500 ("python-cairocffi" ,python-cairocffi)))
1c65314c 3501 (inputs
ca33a3ad 3502 `(("libpng" ,libpng)
1c65314c
FB
3503 ("imagemagick" ,imagemagick)
3504 ("freetype" ,freetype)
25f9a068
FB
3505 ("cairo" ,cairo)
3506 ("glib" ,glib)
1c65314c 3507 ;; FIXME: Add backends when available.
1c65314c
FB
3508 ;("python-wxpython" ,python-wxpython)
3509 ;("python-pyqt" ,python-pyqt)
1bbc659f
FB
3510 ("tcl" ,tcl)
3511 ("tk" ,tk)))
1c65314c
FB
3512 (native-inputs
3513 `(("pkg-config" ,pkg-config)
ca33a3ad
HG
3514 ("python-sphinx" ,python-sphinx)
3515 ("python-numpydoc" ,python-numpydoc)
3516 ("python-nose" ,python-nose)
3517 ("python-mock" ,python-mock)
1c65314c
FB
3518 ("texlive" ,texlive)
3519 ("texinfo" ,texinfo)))
3520 (arguments
3521 `(#:phases
25f9a068
FB
3522 (alist-cons-before
3523 'build 'configure-environment
3524 (lambda* (#:key outputs inputs #:allow-other-keys)
3525 (let ((cairo (assoc-ref inputs "cairo"))
3526 (gtk+ (assoc-ref inputs "gtk+")))
3527 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3528 ;; has not effect.
25f9a068
FB
3529 (setenv "LD_LIBRARY_PATH"
3530 (string-append cairo "/lib:" gtk+ "/lib"))
3531 (setenv "HOME" (getcwd))
3532 (call-with-output-file "setup.cfg"
3533 (lambda (port)
1bbc659f
FB
3534 (format port "[directories]~%
3535basedirlist = ~a,~a~%
57b7b8cd 3536 [rc_options]~%
1bbc659f
FB
3537backend = TkAgg~%"
3538 (assoc-ref inputs "tcl")
3539 (assoc-ref inputs "tk"))))))
25f9a068
FB
3540 (alist-cons-after
3541 'install 'install-doc
ca33a3ad 3542 (lambda* (#:key inputs outputs #:allow-other-keys)
25f9a068
FB
3543 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3544 (doc (string-append data "/doc/" ,name "-" ,version))
3545 (info (string-append data "/info"))
3546 (html (string-append doc "/html")))
ca33a3ad
HG
3547 ;; Make installed package available for building the
3548 ;; documentation
3549 (add-installed-pythonpath inputs outputs)
25f9a068 3550 (with-directory-excursion "doc"
25f9a068
FB
3551 ;; Produce pdf in 'A4' format.
3552 (substitute* (find-files "." "conf\\.py")
3553 (("latex_paper_size = 'letter'")
3554 "latex_paper_size = 'a4'"))
3555 (mkdir-p html)
3556 (mkdir-p info)
3557 ;; The doc recommends to run the 'html' target twice.
3558 (system* "python" "make.py" "html")
3559 (system* "python" "make.py" "html")
18b31516 3560 (copy-recursively "build/html" html)
25f9a068
FB
3561 (system* "python" "make.py" "latex")
3562 (system* "python" "make.py" "texinfo")
18b31516
FB
3563 (symlink (string-append html "/_images")
3564 (string-append info "/matplotlib-figures"))
3565 (with-directory-excursion "build/texinfo"
3566 (substitute* "matplotlib.texi"
3567 (("@image\\{([^,]*)" all file)
3568 (string-append "@image{matplotlib-figures/" file)))
3569 (symlink (string-append html "/_images")
3570 "./matplotlib-figures")
3571 (system* "makeinfo" "--no-split"
3572 "-o" "matplotlib.info" "matplotlib.texi"))
25f9a068
FB
3573 (copy-file "build/texinfo/matplotlib.info"
3574 (string-append info "/matplotlib.info"))
3575 (copy-file "build/latex/Matplotlib.pdf"
18b31516 3576 (string-append doc "/Matplotlib.pdf")))))
25f9a068 3577 %standard-phases))))
1c65314c
FB
3578 (home-page "http://matplotlib.org")
3579 (synopsis "2D plotting library for Python")
3580 (description
3581 "Matplotlib is a Python 2D plotting library which produces publication
3582quality figures in a variety of hardcopy formats and interactive environments
3583across platforms. Matplotlib can be used in Python scripts, the python and
3584ipython shell, web application servers, and six graphical user interface
3585toolkits.")
3f641af0 3586 (license license:psfl)
57b7b8cd 3587 (properties `((python2-variant . ,(delay python2-matplotlib))))))
1c65314c 3588
764c077b 3589(define-public python2-matplotlib
57b7b8cd
LC
3590 (let ((matplotlib (package-with-python2
3591 (strip-python2-variant python-matplotlib))))
764c077b 3592 (package (inherit matplotlib)
88c26834
AE
3593 ;; Make sure to use special packages for Python 2 instead
3594 ;; of those automatically rewritten by package-with-python2.
89b5c60e 3595 (propagated-inputs
7ca0dbc3 3596 `(("python2-pycairo" ,python2-pycairo)
764c077b 3597 ("python2-pygobject-2" ,python2-pygobject-2)
1bbc659f
FB
3598 ("python2-tkinter" ,python-2 "tk")
3599 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3600 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
94914805 3601
0dde6232
RW
3602(define-public python2-pysnptools
3603 (package
3604 (name "python2-pysnptools")
a800018e 3605 (version "0.3.9")
0dde6232
RW
3606 (source
3607 (origin
3608 (method url-fetch)
3f2e9675 3609 (uri (pypi-uri "pysnptools" version ".zip"))
0dde6232
RW
3610 (sha256
3611 (base32
a800018e 3612 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
0dde6232
RW
3613 (build-system python-build-system)
3614 (arguments
3615 `(#:python ,python-2)) ; only Python 2.7 is supported
3616 (propagated-inputs
3617 `(("python2-numpy" ,python2-numpy)
3618 ("python2-scipy" ,python2-scipy)
b72ac1b5
HG
3619 ("python2-pandas" ,python2-pandas)))
3620 (native-inputs
3621 `(("python2-cython" ,python2-cython)))
0dde6232 3622 (native-inputs
f3b98f4f 3623 `(("unzip" ,unzip)))
0dde6232
RW
3624 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3625 (synopsis "Library for reading and manipulating genetic data")
3626 (description
3627 "PySnpTools is a library for reading and manipulating genetic data. It
3628can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3629those files. It can also efficiently manipulate ranges of integers using set
3630operators such as union, intersection, and difference.")
3f641af0 3631 (license license:asl2.0)))
0dde6232 3632
c9b1b4f9
RW
3633(define-public python-rpy2
3634 (package
3635 (name "python-rpy2")
ec3bcbc7 3636 (version "2.7.6")
c9b1b4f9
RW
3637 (source
3638 (origin
3639 (method url-fetch)
ec3bcbc7 3640 (uri (pypi-uri "rpy2" version))
c9b1b4f9
RW
3641 (sha256
3642 (base32
ec3bcbc7 3643 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
c9b1b4f9 3644 (build-system python-build-system)
482d9591
HG
3645 (propagated-inputs
3646 `(("python-six" ,python-six)))
c9b1b4f9 3647 (inputs
482d9591 3648 `(("readline" ,readline)
c9b1b4f9
RW
3649 ("icu4c" ,icu4c)
3650 ("pcre" ,pcre)
3651 ("r" ,r)))
3652 (native-inputs
f3b98f4f 3653 `(("zlib" ,zlib)))
c9b1b4f9
RW
3654 (home-page "http://rpy.sourceforge.net/")
3655 (synopsis "Python interface to the R language")
3656 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3657low-level interface to R from Python, a proposed high-level interface,
3658including wrappers to graphical libraries, as well as R-like structures and
3659functions.")
3f641af0 3660 (license license:gpl3+)))
c9b1b4f9
RW
3661
3662(define-public python2-rpy2
3663 (let ((rpy2 (package-with-python2 python-rpy2)))
3664 (package (inherit rpy2)
3665 (native-inputs
3666 `(("python2-singledispatch" ,python2-singledispatch)
3667 ,@(package-native-inputs rpy2))))))
3668
bb986599
FB
3669(define-public python-scipy
3670 (package
3671 (name "python-scipy")
ba8a0824 3672 (version "0.16.0")
bb986599
FB
3673 (source
3674 (origin
3675 (method url-fetch)
de67e922
LF
3676; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3677 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
da6ce3f1 3678 "/scipy-" version ".tar.xz"))
bb986599
FB
3679 (sha256
3680 (base32
ba8a0824 3681 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
bb986599 3682 (build-system python-build-system)
dd86c0d1 3683 (propagated-inputs
bb986599
FB
3684 `(("python-numpy" ,python-numpy)
3685 ("python-matplotlib" ,python-matplotlib)
dd86c0d1
RW
3686 ("python-pyparsing" ,python-pyparsing)))
3687 (inputs
3688 `(("lapack" ,lapack)
719b01c1 3689 ("openblas" ,openblas)))
bb986599 3690 (native-inputs
dd86c0d1
RW
3691 `(("python-nose" ,python-nose)
3692 ("python-sphinx" ,python-sphinx)
5248d49e 3693 ("python-numpydoc" ,python-numpydoc)
dd86c0d1 3694 ("gfortran" ,gfortran)
bb986599
FB
3695 ("texlive" ,texlive)
3696 ("perl" ,perl)))
3697 (outputs '("out" "doc"))
3698 (arguments
3699 `(#:phases
3700 (alist-cons-before
719b01c1 3701 'build 'configure-openblas
bb986599 3702 (lambda* (#:key inputs #:allow-other-keys)
719b01c1
RW
3703 (call-with-output-file "site.cfg"
3704 (lambda (port)
3705 (format port
3706 "[blas]
3707libraries = openblas
3708library_dirs = ~a/lib
3709include_dirs = ~a/include
d548e6aa
HG
3710
3711# backslash-n to make emacs happy
3712\n[atlas]
719b01c1
RW
3713library_dirs = ~a/lib
3714atlas_libs = openblas
3715"
3716 (assoc-ref inputs "openblas")
3717 (assoc-ref inputs "openblas")
3718 (assoc-ref inputs "openblas"))))
3719 #t)
bb986599
FB
3720 (alist-cons-after
3721 'install 'install-doc
d548e6aa 3722 (lambda* (#:key inputs outputs #:allow-other-keys)
bb986599
FB
3723 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3724 (doc (string-append data "/doc/" ,name "-" ,version))
3725 (html (string-append doc "/html"))
3726 (pyver ,(string-append "PYVER=")))
d548e6aa
HG
3727 ;; Make installed package available for building the
3728 ;; documentation
3729 (add-installed-pythonpath inputs outputs)
bb986599 3730 (with-directory-excursion "doc"
bb986599
FB
3731 ;; Fix generation of images for mathematical expressions.
3732 (substitute* (find-files "source" "conf\\.py")
3733 (("pngmath_use_preview = True")
3734 "pngmath_use_preview = False"))
3735 (mkdir-p html)
3736 (system* "make" "html" pyver)
3737 (system* "make" "latex" "PAPER=a4" pyver)
3738 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3739 (copy-file "build/latex/scipy-ref.pdf"
3740 (string-append doc "/scipy-ref.pdf"))
3741 (with-directory-excursion "build/html"
3742 (for-each (lambda (file)
3743 (let* ((dir (dirname file))
3744 (tgt-dir (string-append html "/" dir)))
96c46210 3745 (install-file file html)))
bb986599
FB
3746 (find-files "." ".*"))))))
3747 ;; Tests can only be run after the library has been installed and not
3748 ;; within the source directory.
3749 (alist-cons-after
3750 'install 'check
89b5c60e 3751 (lambda _
bb986599
FB
3752 (with-directory-excursion "/tmp"
3753 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
89b5c60e
AE
3754 (alist-delete
3755 'check
4f9ff21e
RW
3756 (alist-cons-after
3757 'unpack 'fix-tests
3758 (lambda _
3759 (substitute* "scipy/integrate/tests/test_quadpack.py"
3760 (("libm.so") "libm.so.6"))
3761 #t)
3762 %standard-phases)))))))
bb986599
FB
3763 (home-page "http://www.scipy.org/")
3764 (synopsis "The Scipy library provides efficient numerical routines")
3765 (description "The SciPy library is one of the core packages that make up
3766the SciPy stack. It provides many user-friendly and efficient numerical
3767routines such as routines for numerical integration and optimization.")
3f641af0 3768 (license license:bsd-3)))
bb986599 3769
764c077b 3770(define-public python2-scipy
57b7b8cd 3771 (package-with-python2 python-scipy))
bb986599 3772
73acc193 3773(define-public python-socksipy-branch
3774 (package
3775 (name "python-socksipy-branch")
3776 (version "1.01")
3777 (source
3778 (origin
3779 (method url-fetch)
3780 (uri (pypi-uri "SocksiPy-branch" version))
3781 (sha256
3782 (base32
3783 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3784 (build-system python-build-system)
3785 (arguments
3786 `(#:tests? #f)) ; There are no tests
3787 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3788 (synopsis "Python SOCKS module")
3789 (description
3790 "SocksiPy - A Python SOCKS client module. It provides a
3791socket-like interface that supports connections to any TCP
3792service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3793The original version was developed by Dan Haim, this is a
3794branch created by Mario Vilas to address some open issues,
3795as the original project seems to have been abandoned circa 2007.")
3796 (license license:bsd-3)))
3797
3798(define-public python2-socksipy-branch
3799 (package-with-python2 python-socksipy-branch))
3800
94914805
EB
3801(define-public python-sqlalchemy
3802 (package
3803 (name "python-sqlalchemy")
a4ba286b 3804 (version "1.0.12")
94914805
EB
3805 (source
3806 (origin
3807 (method url-fetch)
3808 (uri (string-append "https://pypi.python.org/packages/source/S/"
3809 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3810 (sha256
3811 (base32
a4ba286b 3812 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
94914805
EB
3813 (build-system python-build-system)
3814 (native-inputs
3815 `(("python-cython" ,python-cython) ;for c extensions
3816 ("python-pytest" ,python-pytest)
3817 ("python-mock" ,python-mock))) ;for tests
3818 (arguments
3819 `(#:phases (alist-replace
3820 'check
3821 (lambda _ (zero? (system* "py.test")))
3822 %standard-phases)))
3823 (home-page "http://www.sqlalchemy.org")
3824 (synopsis "Database abstraction library")
3825 (description
3826 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3827gives application developers the full power and flexibility of SQL. It
3828provides a full suite of well known enterprise-level persistence patterns,
3829designed for efficient and high-performing database access, adapted into a
3830simple and Pythonic domain language.")
3f641af0 3831 (license license:x11)))
94914805
EB
3832
3833(define-public python2-sqlalchemy
3834 (package-with-python2 python-sqlalchemy))
c937562e 3835
4a093330
DM
3836(define-public python-pycodestyle
3837 (package
3838 (name "python-pycodestyle")
3839 (version "2.0.0")
3840 (source
3841 (origin
3842 (method url-fetch)
3843 (uri (pypi-uri "pycodestyle" version))
3844 (sha256
3845 (base32
3846 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3847 (build-system python-build-system)
3848 (home-page "https://pycodestyle.readthedocs.io/")
3849 (synopsis "Python style guide checker")
3850 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3851Python code against some of the style conventions in
3852@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
f210e944 3853 (license license:expat)))
4a093330
DM
3854
3855(define-public python2-pycodestyle
f210e944 3856 (package-with-python2 python-pycodestyle))
b91912c4
DM
3857
3858(define-public python-orderedmultidict
3859 (package
3860 (name "python-orderedmultidict")
3861 (version "0.7.10")
3862 (source
3863 (origin
3864 (method url-fetch)
3865 (uri (pypi-uri "orderedmultidict" version))
3866 (sha256
3867 (base32
3868 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3869 (build-system python-build-system)
3870 (arguments
3871 `(#:phases
3872 (modify-phases %standard-phases
3873 (add-after 'unpack 'fix-tests
3874 (lambda _
3875 ;; The package uses nosetest for running the tests.
3876 ;; Adding this initfile allows to run the test suite
3877 ;; without requiring nosetest.
3878 (zero? (system* "touch" "tests/__init__.py")))))))
3879 (propagated-inputs
3880 `(("python-six" ,python-six)))
3881 (native-inputs
3882 `(("python-pycodestyle" ,python-pycodestyle)))
3883 (home-page "https://github.com/gruns/orderedmultidict")
3884 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3885 (description "This package contains a library for ordered multivalue
3886dictionaries. A multivalue dictionary is a dictionary that can store
3887multiple values for the same key. An ordered multivalue dictionary is a
3888multivalue dictionary that retains the order of insertions and deletions.")
f210e944 3889 (license license:unlicense)))
b91912c4
DM
3890
3891(define-public python2-orderedmultidict
f210e944 3892 (package-with-python2 python-orderedmultidict))
9dede065
DM
3893
3894(define-public python-furl
3895 (package
3896 (name "python-furl")
3897 (version "0.5.6")
3898 (source
3899 (origin
3900 (method url-fetch)
3901 (uri (pypi-uri "furl" version))
3902 (sha256
3903 (base32
3904 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3905 (build-system python-build-system)
3906 (propagated-inputs
3907 `(("python-six" ,python-six)
3908 ("python-orderedmultidict" ,python-orderedmultidict)))
3909 (native-inputs
3910 `(("python-pycodestyle" ,python-pycodestyle)))
3911 (home-page "https://github.com/gruns/furl")
3912 (synopsis "URL manipulation in Python")
3913 (description "Furl provides an easy-to-use alternative to the
3914@code{urllib} and @code{urlparse} modules for manipulating URLs.")
f210e944 3915 (license license:unlicense)))
9dede065
DM
3916
3917(define-public python2-furl
f210e944 3918 (package-with-python2 python-furl))
462bf271
DM
3919
3920(define-public python-flask-babel
3921 (package
3922 (name "python-flask-babel")
3923 (version "0.11.1")
3924 (source
3925 (origin
3926 (method url-fetch)
3927 (uri (pypi-uri "Flask-Babel" version))
3928 (sha256
3929 (base32
3930 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3931 (build-system python-build-system)
3932 (propagated-inputs
3933 `(("python-flask" ,python-flask)
3934 ("python-babel" ,python-babel)
3935 ("python-jinja2" ,python-jinja2)
3936 ("python-pytz" ,python-pytz)))
3937 (home-page "https://github.com/python-babel/flask-babel")
3938 (synopsis "Add i18n/l10n support to Flask applications")
3939 (description "This package implements internationalization and localization
3940support for Flask. This is based on the Python babel module as well as pytz -
3941both of which are installed automatically if you install this library.")
f210e944 3942 (license license:bsd-3)))
462bf271
DM
3943
3944(define-public python2-flask-babel
f210e944 3945 (package-with-python2 python-flask-babel))
4a093330 3946
de2966cf
EF
3947(define-public python-sqlalchemy-utils
3948 (package
3949 (name "python-sqlalchemy-utils")
bb4b1706 3950 (version "0.32.11")
de2966cf
EF
3951 (source
3952 (origin
3953 (method url-fetch)
3954 (uri (pypi-uri "SQLAlchemy-Utils" version))
3955 (sha256
3956 (base32
bb4b1706 3957 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
de2966cf 3958 (build-system python-build-system)
c22b4f87 3959 (propagated-inputs
de2966cf
EF
3960 `(("python-six" ,python-six)
3961 ("python-sqlalchemy" ,python-sqlalchemy)))
26d07efb
DM
3962 (native-inputs
3963 `(("python-pytest" ,python-pytest)))
de2966cf
EF
3964 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3965 (synopsis "Various utility functions for SQLAlchemy")
3966 (description
3967 "SQLAlchemy-utils provides various utility functions and custom data types
6a686b18
DM
3968for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3969
3970You might also want to install the following optional dependencies:
3971@enumerate
3972@item @code{python-passlib}
3973@item @code{python-babel}
3974@item @code{python-cryptography}
3975@item @code{python-pytz}
3976@item @code{python-psycopg2}
3977@item @code{python-furl}
3978@item @code{python-flask-babel}
3979@end enumerate
3980")
de2966cf
EF
3981 (license license:bsd-3)))
3982
3983(define-public python2-sqlalchemy-utils
f210e944 3984 (package-with-python2 python-sqlalchemy-utils))
de2966cf 3985
af5a4602
CAW
3986(define-public python-alembic
3987 (package
3988 (name "python-alembic")
bb484529 3989 (version "0.8.7")
af5a4602
CAW
3990 (source
3991 (origin
3992 (method url-fetch)
3993 (uri (pypi-uri "alembic" version))
3994 (sha256
3995 (base32
bb484529 3996 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
af5a4602
CAW
3997 (build-system python-build-system)
3998 (native-inputs
3999 `(("python-mock" ,python-mock)
4000 ("python-pytest-cov" ,python-pytest-cov)))
4001 (propagated-inputs
4002 `(("python-sqlalchemy" ,python-sqlalchemy)
4003 ("python-mako" ,python-mako)
4004 ("python-editor" ,python-editor)))
4005 (home-page "http://bitbucket.org/zzzeek/alembic")
4006 (synopsis
4007 "Database migration tool for SQLAlchemy")
4008 (description
4009 "Alembic is a lightweight database migration tool for usage with the
4010SQLAlchemy Database Toolkit for Python.")
f210e944 4011 (license license:expat)))
af5a4602
CAW
4012
4013(define-public python2-alembic
f210e944 4014 (package-with-python2 python-alembic))
af5a4602 4015
1671c07c
EB
4016(define-public python-distutils-extra
4017 (package
4018 (name "python-distutils-extra")
4019 (version "2.38")
4020 (source
4021 (origin
4022 (method url-fetch)
4023 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4024 version "/+download/python-distutils-extra-"
4025 version ".tar.gz"))
4026 (sha256
4027 (base32
4028 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4029 (build-system python-build-system)
1671c07c
EB
4030 (home-page "https://launchpad.net/python-distutils-extra/")
4031 (synopsis "Enhancements to Python's distutils")
4032 (description
4033 "The python-distutils-extra module enables you to easily integrate
4034gettext support, themed icons, and scrollkeeper-based documentation into
4035Python's distutils.")
3f641af0 4036 (license license:gpl2)))
1671c07c
EB
4037
4038(define-public python2-distutils-extra
4039 (package-with-python2 python-distutils-extra))
ea5456c8
EB
4040
4041(define-public python2-elib.intl
4042 (package
4043 (name "python2-elib.intl")
4044 (version "0.0.3")
4045 (source
4046 (origin
4047 ;; This project doesn't tag releases or publish tarballs, so we take
4048 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4049 (method git-fetch)
4050 (uri (git-reference
4051 (url "https://github.com/dieterv/elib.intl.git")
4052 (commit "d09997cfef")))
4053 (sha256
4054 (base32
4055 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4056 (build-system python-build-system)
ea5456c8
EB
4057 (arguments
4058 ;; incompatible with Python 3 (exception syntax)
4059 `(#:python ,python-2
b41a05ce 4060 #:tests? #f))
ea5456c8
EB
4061 (home-page "https://github.com/dieterv/elib.intl")
4062 (synopsis "Enhanced internationalization for Python")
4063 (description
4064 "The elib.intl module provides enhanced internationalization (I18N)
4065services for your Python modules and applications.")
3f641af0 4066 (license license:lgpl3+)))
ea5456c8 4067
c937562e
EB
4068(define-public python-pillow
4069 (package
4070 (name "python-pillow")
aba5182c 4071 (version "3.3.3")
c937562e
EB
4072 (source
4073 (origin
4074 (method url-fetch)
f1d9231d 4075 (uri (pypi-uri "Pillow" version))
c937562e
EB
4076 (sha256
4077 (base32
aba5182c 4078 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
c937562e
EB
4079 (build-system python-build-system)
4080 (native-inputs
f3b98f4f 4081 `(("python-nose" ,python-nose)))
c937562e 4082 (inputs
5ff408d9
SB
4083 `(("freetype" ,freetype)
4084 ("lcms" ,lcms)
c937562e
EB
4085 ("zlib" ,zlib)
4086 ("libjpeg" ,libjpeg)
4087 ("openjpeg" ,openjpeg)
5ff408d9
SB
4088 ("libtiff" ,libtiff)
4089 ("libwebp" ,libwebp)))
c937562e 4090 (arguments
e5358a6b 4091 `(#:phases (modify-phases %standard-phases
e5358a6b
LC
4092 (add-after
4093 'install 'check-installed
6151120a 4094 (lambda* (#:key outputs inputs #:allow-other-keys)
e5358a6b
LC
4095 (begin
4096 (setenv "HOME" (getcwd))
6151120a
HG
4097 ;; Make installed package available for running the
4098 ;; tests
4099 (add-installed-pythonpath inputs outputs)
e5358a6b
LC
4100 (and (zero? (system* "python" "selftest.py"
4101 "--installed"))
4102 (zero? (system* "python" "test-installed.py"))))))
4103 (delete 'check))))
c937562e
EB
4104 (home-page "https://pypi.python.org/pypi/Pillow")
4105 (synopsis "Fork of the Python Imaging Library")
4106 (description
4107 "The Python Imaging Library adds image processing capabilities to your
4108Python interpreter. This library provides extensive file format support, an
4109efficient internal representation, and fairly powerful image processing
4110capabilities. The core image library is designed for fast access to data
4111stored in a few basic pixel formats. It should provide a solid foundation for
4112a general image processing tool.")
3f641af0 4113 (license (license:x11-style
c937562e
EB
4114 "http://www.pythonware.com/products/pil/license.htm"
4115 "The PIL Software License"))))
4116
4117(define-public python2-pillow
4118 (package-with-python2 python-pillow))
bb986599 4119
a415f036
FB
4120(define-public python-pycparser
4121 (package
4122 (name "python-pycparser")
38eb6919 4123 (version "2.14")
a415f036
FB
4124 (source
4125 (origin
4126 (method url-fetch)
38eb6919 4127 (uri (pypi-uri "pycparser" version))
a415f036
FB
4128 (sha256
4129 (base32
38eb6919 4130 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
a415f036
FB
4131 (outputs '("out" "doc"))
4132 (build-system python-build-system)
4133 (native-inputs
f3b98f4f 4134 `(("pkg-config" ,pkg-config)))
a415f036 4135 (arguments
89b5c60e 4136 `(#:phases
a415f036
FB
4137 (alist-replace
4138 'check
4139 (lambda _
4140 (with-directory-excursion "tests"
4141 (zero? (system* "python" "all_tests.py"))))
4142 (alist-cons-after
4143 'install 'install-doc
4144 (lambda* (#:key outputs #:allow-other-keys)
4145 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4146 (doc (string-append data "/doc/" ,name "-" ,version))
4147 (examples (string-append doc "/examples")))
4148 (mkdir-p examples)
4149 (for-each (lambda (file)
4150 (copy-file (string-append "." file)
4151 (string-append doc file)))
4152 '("/README.rst" "/CHANGES" "/LICENSE"))
4153 (copy-recursively "examples" examples)))
4154 %standard-phases))))
4155 (home-page "https://github.com/eliben/pycparser")
4156 (synopsis "C parser in Python")
4157 (description
4158 "Pycparser is a complete parser of the C language, written in pure Python
4159using the PLY parsing library. It parses C code into an AST and can serve as
4160a front-end for C compilers or analysis tools.")
3f641af0 4161 (license license:bsd-3)))
a415f036
FB
4162
4163(define-public python2-pycparser
4164 (package-with-python2 python-pycparser))
57c3f716
FB
4165
4166(define-public python-cffi
4167 (package
4168 (name "python-cffi")
2d3a437c 4169 (version "1.4.2")
57c3f716
FB
4170 (source
4171 (origin
4172 (method url-fetch)
2d3a437c 4173 (uri (pypi-uri "cffi" version))
89b5c60e 4174 (sha256
2d3a437c 4175 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
57c3f716
FB
4176 (build-system python-build-system)
4177 (outputs '("out" "doc"))
4178 (inputs
4179 `(("libffi" ,libffi)))
4180 (propagated-inputs ; required at run-time
4181 `(("python-pycparser" ,python-pycparser)))
4182 (native-inputs
4183 `(("pkg-config" ,pkg-config)
4184 ("python-sphinx" ,python-sphinx)
f3b98f4f 4185 ("python-pytest" ,python-pytest)))
57c3f716 4186 (arguments
4179f952 4187 `(#:phases
57c3f716
FB
4188 (alist-cons-after
4189 'install 'install-doc
4190 (lambda* (#:key outputs #:allow-other-keys)
4191 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4192 (doc (string-append data "/doc/" ,name "-" ,version))
4193 (html (string-append doc "/html")))
4194 (with-directory-excursion "doc"
4195 (system* "make" "html")
4196 (mkdir-p html)
4197 (copy-recursively "build/html" html))
4198 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4199 %standard-phases)))
4200 (home-page "http://cffi.readthedocs.org")
4201 (synopsis "Foreign function interface for Python")
4202 (description
4203 "Foreign Function Interface for Python calling C code.")
bd3fa666 4204 (license license:expat)))
57c3f716
FB
4205
4206(define-public python2-cffi
4207 (package-with-python2 python-cffi))
6fa14469
FB
4208
4209(define-public python-xcffib
4210 (package
4211 (name "python-xcffib")
4212 (version "0.1.9")
4213 (source
4214 (origin
4215 (method url-fetch)
4216 (uri (string-append "https://pypi.python.org/packages/source/x/"
4217 "xcffib/xcffib-" version ".tar.gz"))
4218 (sha256
4219 (base32
4220 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4221 (build-system python-build-system)
4222 (inputs
482d9591 4223 `(("libxcb" ,libxcb)))
6fa14469 4224 (propagated-inputs
482d9591
HG
4225 `(("python-cffi" ,python-cffi) ; used at run time
4226 ("python-six" ,python-six)))
6fa14469 4227 (arguments
89b5c60e 4228 `(#:phases
6fa14469
FB
4229 (alist-cons-after
4230 'install 'install-doc
4231 (lambda* (#:key outputs #:allow-other-keys)
4232 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4233 "/doc/" ,name "-" ,version)))
4234 (mkdir-p doc)
4235 (copy-file "README.md"
4236 (string-append doc "/README.md"))))
4237 %standard-phases)))
4238 (home-page "https://github.com/tych0/xcffib")
4239 (synopsis "XCB Python bindings")
4240 (description
4241 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4242support for Python 3 and PyPy. It is based on cffi.")
bd3fa666 4243 (license license:expat)))
6fa14469
FB
4244
4245(define-public python2-xcffib
4246 (package-with-python2 python-xcffib))
4247
9e099723
FB
4248(define-public python-cairocffi
4249 (package
4250 (name "python-cairocffi")
4251 (version "0.6")
4252 (source
4253 (origin
4254 (method url-fetch)
4255 ;; The archive on pypi is missing the 'utils' directory!
4256 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4257 version ".tar.gz"))
f586c877 4258 (file-name (string-append name "-" version ".tar.gz"))
9e099723
FB
4259 (sha256
4260 (base32
4261 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4262 (build-system python-build-system)
4263 (outputs '("out" "doc"))
4264 (inputs
4265 `(("gdk-pixbuf" ,gdk-pixbuf)
4266 ("cairo" ,cairo)))
4267 (native-inputs
4268 `(("pkg-config" ,pkg-config)
4269 ("python-sphinx" ,python-sphinx)
f3b98f4f 4270 ("python-docutils" ,python-docutils)))
9e099723
FB
4271 (propagated-inputs
4272 `(("python-xcffib" ,python-xcffib))) ; used at run time
4273 (arguments
89b5c60e 4274 `(#:phases
9e099723
FB
4275 (alist-cons-after
4276 'install 'install-doc
4277 (lambda* (#:key inputs outputs #:allow-other-keys)
4278 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4279 (doc (string-append data "/doc/" ,name "-" ,version))
4280 (html (string-append doc "/html")))
89b5c60e 4281 (setenv "LD_LIBRARY_PATH"
9e099723
FB
4282 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4283 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4284 (setenv "LANG" "en_US.UTF-8")
4285 (mkdir-p html)
4286 (for-each (lambda (file)
4287 (copy-file (string-append "." file)
4288 (string-append doc file)))
4289 '("/README.rst" "/CHANGES" "/LICENSE"))
4290 (system* "python" "setup.py" "build_sphinx")
4291 (copy-recursively "docs/_build/html" html)))
4292 %standard-phases)))
4293 (home-page "https://github.com/SimonSapin/cairocffi")
4294 (synopsis "Python bindings and object-oriented API for Cairo")
4295 (description
4296 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4297Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4298graphics library with support for multiple backends including image buffers,
4299PNG, PostScript, PDF, and SVG file output.")
3f641af0 4300 (license license:bsd-3)))
9e099723
FB
4301
4302(define-public python2-cairocffi
4303 (package-with-python2 python-cairocffi))
4304
3cff95cb
RW
4305(define-public python-decorator
4306 (package
4307 (name "python-decorator")
eb6e2e81 4308 (version "4.0.9")
3cff95cb
RW
4309 (source
4310 (origin
4311 (method url-fetch)
e21338be 4312 (uri (pypi-uri "decorator" version))
3cff95cb 4313 (sha256
eb6e2e81 4314 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
3cff95cb
RW
4315 (build-system python-build-system)
4316 (arguments '(#:tests? #f)) ; no test target
eb6e2e81 4317 (home-page "https://pypi.python.org/pypi/decorator/")
3cff95cb
RW
4318 (synopsis "Python module to simplify usage of decorators")
4319 (description
4320 "The aim of the decorator module is to simplify the usage of decorators
4321for the average programmer, and to popularize decorators usage giving examples
4322of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4323etc. The core of this module is a decorator factory.")
4324 (license license:expat)))
4325
4326(define-public python2-decorator
4327 (package-with-python2 python-decorator))
4328
2c0499ad
RW
4329(define-public python-drmaa
4330 (package
4331 (name "python-drmaa")
4332 (version "0.7.6")
4333 (source
4334 (origin
4335 (method url-fetch)
4336 (uri (string-append
4337 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4338 version ".tar.gz"))
4339 (sha256
4340 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4341 (build-system python-build-system)
4342 ;; The test suite requires libdrmaa which is provided by the cluster
4343 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4344 ;; should be set to the path of the libdrmaa library.
4345 (arguments '(#:tests? #f))
4346 (native-inputs
f3b98f4f 4347 `(("python-nose" ,python-nose)))
2c0499ad
RW
4348 (home-page "https://pypi.python.org/pypi/drmaa")
4349 (synopsis "Python bindings for the DRMAA library")
4350 (description
4351 "A Python package for Distributed Resource Management (DRM) job
4352submission and control. This package is an implementation of the DRMAA 1.0
4353Python language binding specification.")
3f641af0 4354 (license license:bsd-3)))
2c0499ad
RW
4355
4356(define-public python2-drmaa
4357 (package-with-python2 python-drmaa))
4358
d05c6da0
RW
4359(define-public python-gridmap
4360 (package
4361 (name "python-gridmap")
4362 (version "0.13.0")
4363 (source
4364 (origin
4365 (method url-fetch)
4366 (uri (string-append
4367 "https://github.com/pygridtools/gridmap/archive/v"
4368 version ".tar.gz"))
4369 (file-name (string-append name "-" version ".tar.gz"))
4370 (sha256
4371 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4372 (build-system python-build-system)
f22efa01 4373 (propagated-inputs
d05c6da0
RW
4374 `(("python-psutil" ,python-psutil)
4375 ("python-drmaa" ,python-drmaa)
4376 ("python-pyzmq" ,python-pyzmq)))
d05c6da0
RW
4377 (home-page "https://github.com/pygridtools/gridmap")
4378 (synopsis "Create jobs on a cluster directly from Python")
4379 (description
4380 "Gridmap is a Python package to allow you to easily create jobs on the
4381cluster directly from Python. You can directly map Python functions onto the
4382cluster without needing to write any wrapper code yourself.")
3f641af0 4383 (license license:gpl3+)))
d05c6da0
RW
4384
4385(define-public python2-gridmap
4386 (package-with-python2 python-gridmap))
4387
cb6d5c54
RW
4388(define-public python-pexpect
4389 (package
4390 (name "python-pexpect")
4391 (version "3.3")
4392 (source
4393 (origin
4394 (method url-fetch)
4395 (uri (string-append "https://pypi.python.org/packages/source/p/"
4396 "pexpect/pexpect-" version ".tar.gz"))
4397 (sha256
4398 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4399 (build-system python-build-system)
4400 (arguments
4401 `(#:phases
4402 (modify-phases %standard-phases
4403 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4404 (native-inputs
4405 `(("python-nose" ,python-nose)))
4406 (home-page "http://pexpect.readthedocs.org/")
4407 (synopsis "Controlling interactive console applications")
4408 (description
4409 "Pexpect is a pure Python module for spawning child applications;
4410controlling them; and responding to expected patterns in their output.
4411Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4412child application and control it as if a human were typing commands.")
3f641af0 4413 (license license:isc)))
cb6d5c54
RW
4414
4415(define-public python2-pexpect
4416 (package-with-python2 python-pexpect))
4417
229ad120
RW
4418(define-public python-setuptools-scm
4419 (package
4420 (name "python-setuptools-scm")
42d6d0d0 4421 (version "1.11.1")
229ad120
RW
4422 (source (origin
4423 (method url-fetch)
383af6b0 4424 (uri (pypi-uri "setuptools_scm" version))
229ad120
RW
4425 (sha256
4426 (base32
42d6d0d0 4427 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
229ad120
RW
4428 (build-system python-build-system)
4429 (home-page "https://github.com/pypa/setuptools_scm/")
4430 (synopsis "Manage Python package versions in SCM metadata")
4431 (description
383af6b0 4432 "Setuptools_scm handles managing your Python package versions in
229ad120
RW
4433@dfn{software configuration management} (SCM) metadata instead of declaring
4434them as the version argument or in a SCM managed file.")
4435 (license license:expat)))
4436
4437(define-public python2-setuptools-scm
4438 (package-with-python2 python-setuptools-scm))
4439
b74270ee
RW
4440(define-public python-pathpy
4441 (package
4442 (name "python-pathpy")
4443 (version "8.1.1")
4444 (source
4445 (origin
4446 (method url-fetch)
4447 (uri (string-append "https://pypi.python.org/packages/source/p/"
4448 "path.py/path.py-" version ".tar.gz"))
4449 (sha256
4450 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
2887700e 4451 (outputs '("out" "doc"))
b74270ee
RW
4452 (build-system python-build-system)
4453 (propagated-inputs
4454 `(("python-appdirs" ,python-appdirs)))
4455 (native-inputs
f3b98f4f 4456 `(("python-setuptools-scm" ,python-setuptools-scm)
2887700e
HG
4457 ("python-sphinx" ,python-sphinx)
4458 ("python-rst.linker" ,python-rst.linker)
b74270ee
RW
4459 ("python-pytest" ,python-pytest)
4460 ("python-pytest-runner" ,python-pytest-runner)))
2887700e
HG
4461 (arguments
4462 `(#:phases
4463 (modify-phases %standard-phases
4464 (add-after 'build 'build-doc
4465 (lambda _
4466 (setenv "LANG" "en_US.UTF-8")
4467 (zero? (system* "python" "setup.py" "build_sphinx"))))
4468 (add-after 'install 'install-doc
4469 (lambda* (#:key outputs #:allow-other-keys)
4470 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4471 (doc (string-append data "/doc/" ,name "-" ,version))
4472 (html (string-append doc "/html")))
4473 (mkdir-p html)
4474 (for-each (lambda (file)
4475 (copy-file file (string-append doc "/" file)))
4476 '("README.rst" "CHANGES.rst"))
4477 (copy-recursively "build/sphinx/html" html)))))))
b74270ee
RW
4478 (home-page "http://github.com/jaraco/path.py")
4479 (synopsis "Python module wrapper for built-in os.path")
4480 (description
4481 "@code{path.py} implements path objects as first-class entities, allowing
4482common operations on files to be invoked on those path objects directly.")
4483 (license license:expat)))
4484
4485(define-public python2-pathpy
4486 (package-with-python2 python-pathpy))
4487
0d34e01b
RW
4488(define-public python-pickleshare
4489 (package
4490 (name "python-pickleshare")
4491 (version "0.5")
4492 (source
4493 (origin
4494 (method url-fetch)
4495 (uri (string-append "https://pypi.python.org/packages/source/p/"
4496 "pickleshare/pickleshare-" version ".tar.gz"))
4497 (sha256
4498 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4499 (build-system python-build-system)
4500 (propagated-inputs
4501 `(("python-pathpy" ,python-pathpy)))
4502 (home-page "https://github.com/vivainio/pickleshare")
4503 (synopsis "Tiny key value database with concurrency support")
4504 (description
4505 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4506Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4507shelve, many processes can access the database simultaneously. Changing a
4508value in database is immediately visible to other processes accessing the same
4509database. Concurrency is possible because the values are stored in separate
4510files. Hence the “database” is a directory where all files are governed by
4511PickleShare.")
4512 (license license:expat)))
4513
4514(define-public python2-pickleshare
4515 (package-with-python2 python-pickleshare))
4516
cd6e5189
RW
4517(define-public python-simplegeneric
4518 (package
4519 (name "python-simplegeneric")
4520 (version "0.8.1")
4521 (source
4522 (origin
4523 (method url-fetch)
4524 (uri (string-append "https://pypi.python.org/packages/source/s/"
4525 "simplegeneric/simplegeneric-" version ".zip"))
4526 (sha256
4527 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4528 (build-system python-build-system)
4529 (native-inputs
f3b98f4f 4530 `(("unzip" ,unzip)))
cd6e5189
RW
4531 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4532 (synopsis "Python module for simple generic functions")
4533 (description
4534 "The simplegeneric module lets you define simple single-dispatch generic
4535functions, akin to Python’s built-in generic functions like @code{len()},
4536@code{iter()} and so on. However, instead of using specially-named methods,
4537these generic functions use simple lookup tables, akin to those used by
4538e.g. @code{pickle.dump()} and other generic functions found in the Python
4539standard library.")
3f641af0 4540 (license license:zpl2.1)))
cd6e5189
RW
4541
4542(define-public python2-simplegeneric
4543 (package-with-python2 python-simplegeneric))
4544
ddc7d8ed 4545(define-public python-ipython-genutils
c4abbac3 4546 ;; TODO: This package is retired, check if can be removed, see description.
ddc7d8ed
RW
4547 (package
4548 (name "python-ipython-genutils")
4549 (version "0.1.0")
4550 (source
4551 (origin
4552 (method url-fetch)
4553 (uri (string-append "https://pypi.python.org/packages/source/i/"
4554 "ipython_genutils/ipython_genutils-"
4555 version ".tar.gz"))
4556 (sha256
4557 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4558 (build-system python-build-system)
4559 (arguments `(#:tests? #f)) ; no tests
4560 (home-page "http://ipython.org")
4561 (synopsis "Vestigial utilities from IPython")
4562 (description
c4abbac3
HG
4563 "This package provides retired utilities from IPython. No packages
4564outside IPython/Jupyter should depend on it.
4565
4566This package shouldn't exist. It contains some common utilities shared by
4567Jupyter and IPython projects during The Big Split. As soon as possible, those
4568packages will remove their dependency on this, and this package will go
4569away.")
3f641af0 4570 (license license:bsd-3)))
ddc7d8ed
RW
4571
4572(define-public python2-ipython-genutils
4573 (package-with-python2 python-ipython-genutils))
4574
2b10eb48
RW
4575(define-public python-traitlets
4576 (package
4577 (name "python-traitlets")
a5ba1481 4578 (version "4.2.0")
2b10eb48
RW
4579 (source
4580 (origin
4581 (method url-fetch)
cc0c4fde 4582 (uri (pypi-uri "traitlets" version))
2b10eb48
RW
4583 (sha256
4584 (base32
a5ba1481 4585 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
2b10eb48
RW
4586 (build-system python-build-system)
4587 (arguments
4588 `(#:phases
4589 (modify-phases %standard-phases
4590 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4591 (propagated-inputs
4592 `(("python-ipython-genutils" ,python-ipython-genutils)
4593 ("python-decorator" ,python-decorator)))
4594 (native-inputs
cc0c4fde
EF
4595 `(("python-mock" ,python-mock)
4596 ("python-nose" ,python-nose)))
2b10eb48
RW
4597 (home-page "http://ipython.org")
4598 (synopsis "Configuration system for Python applications")
4599 (description
4600 "Traitlets is a framework that lets Python classes have attributes with
4601type checking, dynamically calculated default values, and ‘on change’
4602callbacks. The package also includes a mechanism to use traitlets for
4603configuration, loading values from files or from command line arguments. This
4604is a distinct layer on top of traitlets, so you can use traitlets in your code
4605without using the configuration machinery.")
3f641af0 4606 (license license:bsd-3)))
2b10eb48
RW
4607
4608(define-public python2-traitlets
4609 (package-with-python2 python-traitlets))
4610
4263b06f
RW
4611(define-public python-jupyter-core
4612 (package
4613 (name "python-jupyter-core")
4614 (version "4.2.0")
4615 (source
4616 (origin
4617 (method url-fetch)
4618 (uri (string-append (pypi-uri "jupyter_core" version)))
4619 (sha256
4620 (base32
4621 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4622 (build-system python-build-system)
4623 ;; FIXME: not sure how to run the tests
4624 (arguments `(#:tests? #f))
4625 (propagated-inputs
4626 `(("python-traitlets" ,python-traitlets)))
4627 (home-page "http://jupyter.org/")
4628 (synopsis "Jupyter base package")
4629 (description
4630 "Jupyter core is the base package on which Jupyter projects rely.")
4631 (license license:bsd-3)))
4632
4633(define-public python2-jupyter-core
4634 (package-with-python2 python-jupyter-core))
4635
9ff01f2d
RW
4636(define-public python-jupyter-client
4637 (package
4638 (name "python-jupyter-client")
4639 (version "4.4.0")
4640 (source
4641 (origin
4642 (method url-fetch)
4643 (uri (pypi-uri "jupyter_client" version))
4644 (sha256
4645 (base32
4646 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4647 (build-system python-build-system)
4648 ;; Tests fail because of missing native python kernel which I assume is
4649 ;; provided by the ipython package, which we cannot use because it would
4650 ;; cause a dependency cycle.
4651 (arguments `(#:tests? #f))
4652 (propagated-inputs
4653 `(("python-pyzmq" ,python-pyzmq)
4654 ("python-traitlets" ,python-traitlets)
4655 ("python-jupyter-core" ,python-jupyter-core)))
4656 (home-page "http://jupyter.org/")
4657 (synopsis "Jupyter protocol implementation and client libraries")
4658 (description
4659 "The @code{jupyter_client} package contains the reference implementation
4660of the Jupyter protocol. It also provides client and kernel management APIs
4661for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4662installing @code{kernelspec}s for use with Jupyter frontends.")
4663 (license license:bsd-3)))
4664
4665(define-public python2-jupyter-client
4666 (package-with-python2 python-jupyter-client))
4667
ab526102
RW
4668(define-public python-ipykernel
4669 (package
4670 (name "python-ipykernel")
4671 (version "4.5.0")
4672 (source
4673 (origin
4674 (method url-fetch)
4675 (uri (pypi-uri "ipykernel" version))
4676 (sha256
4677 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4678 (build-system python-build-system)
4679 ;; The tests load a submodule of IPython. However, IPython itself depends
4680 ;; on ipykernel.
4681 (arguments `(#:tests? #f))
4682 (propagated-inputs
4683 ;; imported at runtime during connect
4684 `(("python-jupyter-client" ,python-jupyter-client)))
4685 (home-page "http://ipython.org")
4686 (synopsis "IPython Kernel for Jupyter")
4687 (description
4688 "This package provides the IPython kernel for Jupyter.")
4689 (license license:bsd-3)))
4690
4691(define-public python2-ipykernel
4692 (package-with-python2 python-ipykernel))
4693
5ff6effc
RW
4694(define-public python-testpath
4695 (package
4696 (name "python-testpath")
4697 (version "0.2")
4698 (source
4699 (origin
4700 (method url-fetch)
4701 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4702 version ".tar.gz"))
4703 (file-name (string-append name "-" version ".tar.gz"))
4704 (sha256
4705 (base32
4706 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4707 (build-system python-build-system)
4708 (arguments
4709 `(#:tests? #f ; this package does not even have a setup.py
4710 #:phases
4711 (modify-phases %standard-phases
4712 (delete 'install)
4713 (replace 'build
4714 (lambda* (#:key inputs outputs #:allow-other-keys)
4715 (let ((dir (string-append
4716 (assoc-ref outputs "out")
4717 "/lib/python"
4718 (string-take (string-take-right
4719 (assoc-ref inputs "python") 5) 3)
4720 "/site-packages/testpath")))
4721 (mkdir-p dir)
4722 (copy-recursively "testpath" dir))
4723 #t)))))
4724 (home-page "https://github.com/takluyver/testpath")
4725 (synopsis "Test utilities for code working with files and commands")
4726 (description
4727 "Testpath is a collection of utilities for Python code working with files
4728and commands. It contains functions to check things on the filesystem, and
4729tools for mocking system commands and recording calls to those.")
4730 (license license:expat)))
4731
4732(define-public python2-testpath
4733 (package-with-python2 python-testpath))
4734
ae1ab9fe
FB
4735(define-public python-ipython
4736 (package
4737 (name "python-ipython")
4dbc8ec4 4738 (version "4.0.3")
ae1ab9fe
FB
4739 (source
4740 (origin
fceac880 4741 (method url-fetch)
accd5f99 4742 (uri (pypi-uri "ipython" version ".tar.gz"))
fceac880 4743 (sha256
4dbc8ec4 4744 (base32 "1h2gp1p06sww9rzfkfzqy489bh47gj3910y2b1wdk3dcx1cqz4is"))))
ae1ab9fe
FB
4745 (build-system python-build-system)
4746 (outputs '("out" "doc"))
3a0b1b9a
FB
4747 (propagated-inputs
4748 `(("python-pyzmq" ,python-pyzmq)
accd5f99 4749 ("python-terminado" ,python-terminado)
ae1ab9fe 4750 ("python-matplotlib" ,python-matplotlib)
5d26e542 4751 ("python-numpy" ,python-numpy)
ae1ab9fe 4752 ("python-numpydoc" ,python-numpydoc)
3a0b1b9a
FB
4753 ("python-jinja2" ,python-jinja2)
4754 ("python-mistune" ,python-mistune)
accd5f99
RW
4755 ("python-pexpect" ,python-pexpect)
4756 ("python-pickleshare" ,python-pickleshare)
4757 ("python-simplegeneric" ,python-simplegeneric)
3a0b1b9a 4758 ("python-jsonschema" ,python-jsonschema)
accd5f99
RW
4759 ("python-traitlets" ,python-traitlets)
4760 ("python-ipykernel" ,python-ipykernel)
4761 ("python-pygments" ,python-pygments)))
4762 (inputs
4763 `(("readline" ,readline)
4764 ("which" ,which)))
ae1ab9fe
FB
4765 (native-inputs
4766 `(("pkg-config" ,pkg-config)
accd5f99
RW
4767 ("python-requests" ,python-requests) ;; for tests
4768 ("python-testpath" ,python-testpath)
4769 ("python-nose" ,python-nose)
ae1ab9fe
FB
4770 ("python-sphinx" ,python-sphinx)
4771 ("texlive" ,texlive)
f3b98f4f 4772 ("texinfo" ,texinfo)))
ae1ab9fe 4773 (arguments
89b5c60e 4774 `(#:phases
3a0b1b9a
FB
4775 (modify-phases %standard-phases
4776 (add-after
4777 'install 'install-doc
4778 (lambda* (#:key inputs outputs #:allow-other-keys)
4779 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4780 (doc (string-append data "/doc/" ,name "-" ,version))
4781 (html (string-append doc "/html"))
4782 (man1 (string-append data "/man/man1"))
4783 (info (string-append data "/info"))
4784 (examples (string-append doc "/examples")))
afd3d931 4785 (setenv "LANG" "en_US.utf8")
eee5cd04
HG
4786 ;; Make installed package available for running the tests
4787 (add-installed-pythonpath inputs outputs)
3a0b1b9a 4788 (with-directory-excursion "docs"
accd5f99
RW
4789 ;; FIXME: pdf fails to build
4790 ;;(system* "make" "pdf" "PAPER=a4")
4791 (system* "make" "html")
3a0b1b9a
FB
4792 (system* "make" "info"))
4793 (copy-recursively "docs/man" man1)
4794 (copy-recursively "examples" examples)
accd5f99 4795 (copy-recursively "docs/build/html" html)
3a0b1b9a
FB
4796 ;; (copy-file "docs/build/latex/ipython.pdf"
4797 ;; (string-append doc "/ipython.pdf"))
4798 (mkdir-p info)
4799 (copy-file "docs/build/texinfo/ipython.info"
4800 (string-append info "/ipython.info"))
4801 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4802 ;; Tests can only be run after the library has been installed and not
4803 ;; within the source directory.
4804 (delete 'check)
4805 (add-after
4806 'install 'check
eee5cd04 4807 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3a0b1b9a
FB
4808 (if tests?
4809 (with-directory-excursion "/tmp"
eee5cd04
HG
4810 ;; Make installed package available for running the tests
4811 (add-installed-pythonpath inputs outputs)
3a0b1b9a
FB
4812 (setenv "HOME" "/tmp/") ;; required by a test
4813 (zero? (system* (string-append (assoc-ref outputs "out")
4814 "/bin/iptest"))))
4815 #t)))
4816 (add-before
4817 'install 'fix-tests
4818 (lambda* (#:key inputs #:allow-other-keys)
4819 (substitute* "./IPython/utils/_process_posix.py"
4820 (("/usr/bin/env', 'which") (which "which")))
4821 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4822 (("#!/usr/bin/env python")
4823 (string-append "#!" (which "python"))))
4824 ;; Disable 1 failing test
4825 (substitute* "./IPython/core/tests/test_magic.py"
4826 (("def test_dirops\\(\\):" all)
4827 (string-append "@dec.skipif(True)\n" all))))))))
ae1ab9fe
FB
4828 (home-page "http://ipython.org")
4829 (synopsis "IPython is a tool for interactive computing in Python")
4830 (description
4831 "IPython provides a rich architecture for interactive computing with:
4832Powerful interactive shells, a browser-based notebook, support for interactive
4833data visualization, embeddable interpreters and tools for parallel
4834computing.")
135ba811
EF
4835 (license license:bsd-3)
4836 (properties `((python2-variant . ,(delay python2-ipython))))))
ae1ab9fe
FB
4837
4838(define-public python2-ipython
135ba811 4839 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
3a0b1b9a
FB
4840 (package
4841 (inherit ipython)
4842 ;; FIXME: some tests are failing
4843 (arguments
4844 `(#:tests? #f ,@(package-arguments ipython)))
3a0b1b9a 4845 ;; FIXME: add pyreadline once available.
e62600fe 4846 (native-inputs
135ba811 4847 `(("python2-mock" ,python2-mock)
77a6932a 4848 ,@(package-native-inputs ipython))))))
03411993
AE
4849
4850(define-public python-isodate
4851 (package
4852 (name "python-isodate")
b6785c2e 4853 (version "0.5.4")
03411993
AE
4854 (source
4855 (origin
4856 (method url-fetch)
b6785c2e 4857 (uri (pypi-uri "isodate" version))
03411993
AE
4858 (sha256
4859 (base32
b6785c2e 4860 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
03411993 4861 (build-system python-build-system)
03411993
AE
4862 (home-page
4863 "http://cheeseshop.python.org/pypi/isodate")
4864 (synopsis
4865 "Python date parser and formatter")
4866 (description
4867 "Python-isodate is a python module for parsing and formatting
4868ISO 8601 dates, time and duration.")
3f641af0 4869 (license license:bsd-3)))
03411993
AE
4870
4871(define-public python2-isodate
4872 (package-with-python2 python-isodate))
673ab897
AE
4873
4874(define-public python-html5lib
4875 (package
4876 (name "python-html5lib")
a14061aa 4877 (version "1.0b10")
673ab897
AE
4878 (source
4879 (origin
4880 (method url-fetch)
fee04c19 4881 (uri (pypi-uri "html5lib" version))
673ab897
AE
4882 (sha256
4883 (base32
a14061aa 4884 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
673ab897 4885 (build-system python-build-system)
3dd75476 4886 (propagated-inputs
4eb6ed28
MB
4887 `(("python-six" ,python-six)
4888 ("python-webencodings" ,python-webencodings)))
673ab897
AE
4889 (arguments
4890 `(#:test-target "check"))
4891 (home-page
4892 "https://github.com/html5lib/html5lib-python")
4893 (synopsis
4894 "Python HTML parser based on the WHATWG HTML specifcation")
4895 (description
4896 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4897and written in Python.")
bd3fa666 4898 (license license:expat)))
673ab897
AE
4899
4900(define-public python2-html5lib
4901 (package-with-python2 python-html5lib))
e99f4211 4902
8ee62c97
RW
4903;; Needed for python-bleach, a dependency of python-notebook
4904(define-public python-html5lib-0.9
4905 (package
4906 (inherit python-html5lib)
4907 (version "0.999")
4908 (source
4909 (origin
4910 (method url-fetch)
4911 (uri (pypi-uri "html5lib" version))
4912 (sha256
4913 (base32
4914 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4915
4916(define-public python2-html5lib-0.9
4917 (package-with-python2 python-html5lib-0.9))
4918
adbca19e
MB
4919(define-public python-webencodings
4920 (package
4921 (name "python-webencodings")
4922 (version "0.5")
4923 (source (origin
4924 (method url-fetch)
4925 (uri (pypi-uri "webencodings" version))
4926 (sha256
4927 (base32
4928 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
4929 (build-system python-build-system)
4930 (arguments
4931 '(#:phases
4932 (modify-phases %standard-phases
4933 (replace 'check
4934 (lambda _
4935 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
4936 (native-inputs
4937 `(("python-pytest" ,python-pytest)))
4938 (home-page "https://github.com/SimonSapin/python-webencodings")
4939 (synopsis "Character encoding aliases for legacy web content")
4940 (description
4941 "In order to be compatible with legacy web content when interpreting
4942something like @code{Content-Type: text/html; charset=latin1}, tools need
4943to use a particular set of aliases for encoding labels as well as some
4944overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
4945the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
4946or @code{UTF-16} BOM takes precedence over any other encoding declaration.
4947The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
4948defines all such details so that implementations do not have to
4949reverse-engineer each other.
4950
4951This module implements the Encoding standard and has encoding labels and
4952BOM detection, but the actual implementation for encoders and decoders
4953is Python’s.")
4954 (license license:bsd-3)))
4955
4956(define-public python2-webencodings
4957 (package-with-python2 python-webencodings))
4958
e99f4211
MW
4959(define-public python-urwid
4960 (package
4961 (name "python-urwid")
51ff41f6 4962 (version "1.3.1")
e99f4211
MW
4963 (source
4964 (origin
4965 (method url-fetch)
b97c1bfd 4966 (uri (pypi-uri "urwid" version))
e99f4211
MW
4967 (sha256
4968 (base32
51ff41f6 4969 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
e99f4211 4970 (build-system python-build-system)
b97c1bfd
LF
4971 (arguments
4972 `(#:phases
4973 (modify-phases %standard-phases
4974 ;; Disable failing test. Bug filed upstream:
4975 ;; https://github.com/wardi/urwid/issues/164
51ff41f6 4976 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
b97c1bfd
LF
4977 (add-after 'unpack 'disable-failing-test
4978 (lambda _
4979 (substitute* "urwid/tests/test_event_loops.py"
4980 (("test_remove_watch_file")
4981 "disable_remove_watch_file")))))))
e99f4211
MW
4982 (home-page "http://urwid.org")
4983 (synopsis "Console user interface library for Python")
4984 (description
4985 "Urwid is a curses-based UI/widget library for Python. It includes many
4986features useful for text console applications.")
3f641af0 4987 (license license:lgpl2.1+)))
e99f4211
MW
4988
4989(define-public python2-urwid
4990 (package-with-python2 python-urwid))
d95a56c6 4991
47d0b292
TS
4992(define-public python-urwidtrees
4993 (package
4994 (name "python-urwidtrees")
37ec4623 4995 (version "1.0.2")
47d0b292
TS
4996 (source
4997 (origin
4998 (method url-fetch)
37ec4623
TS
4999 ;; package author intends on distributing via github rather than pypi:
5000 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5001 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5002 version ".tar.gz"))
5003 (file-name (string-append name "-" version ".tar.gz"))
47d0b292
TS
5004 (sha256
5005 (base32
37ec4623 5006 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
47d0b292
TS
5007 (build-system python-build-system)
5008 (arguments
5009 '(#:tests? #f)) ; no tests
f22efa01 5010 (propagated-inputs `(("python-urwid" ,python-urwid)))
47d0b292
TS
5011 (home-page "https://github.com/pazz/urwidtrees")
5012 (synopsis "Tree widgets for urwid")
5013 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5014toolkit. Use it to build trees of widgets.")
3f641af0 5015 (license license:gpl3+)))
47d0b292
TS
5016
5017(define-public python2-urwidtrees
5018 (package-with-python2 python-urwidtrees))
5019
d95a56c6
PAR
5020(define-public python-dbus
5021 (package
5022 (name "python-dbus")
5023 (version "1.2.0")
5024 (source
5025 (origin
5026 (method url-fetch)
5027 (uri (string-append
5cc3096c 5028 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
d95a56c6
PAR
5029 version ".tar.gz"))
5030 (sha256
5031 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5032 (build-system gnu-build-system)
6717c879
SB
5033 (arguments
5034 '(#:phases
5035 (modify-phases %standard-phases
5036 (add-before
5037 'check 'pre-check
5038 (lambda _
5039 ;; XXX: For the missing '/etc/machine-id'.
5040 (substitute* "test/run-test.sh"
5041 (("DBUS_FATAL_WARNINGS=1")
5042 "DBUS_FATAL_WARNINGS=0"))
5043 #t)))))
d95a56c6
PAR
5044 (native-inputs
5045 `(("pkg-config" ,pkg-config)))
5046 (inputs
5047 `(("python" ,python)
2e88d113 5048 ("dbus-glib" ,dbus-glib)))
d95a56c6
PAR
5049 (synopsis "Python bindings for D-bus")
5050 (description "python-dbus provides bindings for libdbus, the reference
5051implementation of D-Bus.")
5052 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
bd3fa666 5053 (license license:expat)))
b52af02b
MW
5054
5055(define-public python2-dbus
5056 (package (inherit python-dbus)
5057 (name "python2-dbus")
5058 (inputs `(("python" ,python-2)
5059 ,@(alist-delete "python"
5060 (package-inputs python-dbus)
5061 equal?)))
5062 ;; FIXME: on Python 2, the test_utf8 fails with:
5063 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5064 (arguments `(#:tests? #f))))
a6ac8332
AE
5065
5066(define-public python-apsw
5067 (package
5068 (name "python-apsw")
917708c2 5069 (version "3.9.2-r1")
a6ac8332
AE
5070 (source
5071 (origin
5072 (method url-fetch)
917708c2 5073 (uri (pypi-uri "apsw" version))
a6ac8332
AE
5074 (sha256
5075 (base32
917708c2 5076 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
a6ac8332
AE
5077 (build-system python-build-system)
5078 (inputs
f3b98f4f 5079 `(("sqlite" ,sqlite)))
a6ac8332
AE
5080 (arguments
5081 `(#:phases
5082 ;; swap check and install phases
5083 (alist-cons-after
5084 'install 'check
5085 (assoc-ref %standard-phases 'check)
5086 (alist-delete
5087 'check
5088 %standard-phases))))
5089 (home-page "https://github.com/rogerbinns/apsw/")
5090 (synopsis "Another Python SQLite Wrapper")
5091 (description "APSW is a Python wrapper for the SQLite
5092embedded relational database engine. In contrast to other wrappers such as
5093pysqlite it focuses on being a minimal layer over SQLite attempting just to
5094translate the complete SQLite API into Python.")
abde5f37 5095 (license license:zlib)))
a6ac8332
AE
5096
5097(define-public python2-apsw
5098 (package-with-python2 python-apsw))
26b307e2
AE
5099
5100(define-public python-lxml
5101 (package
5102 (name "python-lxml")
d58a3203 5103 (version "3.6.0")
26b307e2
AE
5104 (source
5105 (origin
5106 (method url-fetch)
97bbc480 5107 (uri (pypi-uri "lxml" version))
26b307e2 5108 (sha256
d58a3203
EF
5109 (base32
5110 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
26b307e2
AE
5111 (build-system python-build-system)
5112 (inputs
5113 `(("libxml2" ,libxml2)
f3b98f4f 5114 ("libxslt" ,libxslt)))
26b307e2
AE
5115 (home-page "http://lxml.de/")
5116 (synopsis
5117 "Python XML processing library")
5118 (description
5119 "The lxml XML toolkit is a Pythonic binding for the C libraries
5120libxml2 and libxslt.")
3f641af0 5121 (license license:bsd-3))) ; and a few more, see LICENSES.txt
26b307e2
AE
5122
5123(define-public python2-lxml
5124 (package-with-python2 python-lxml))
4ed20663 5125
b32a1e47
CAW
5126;; beautifulsoup4 has a totally different namespace than 3.x,
5127;; and pypi seems to put it under its own name, so I guess we should too
5128(define-public python-beautifulsoup4
5129 (package
5130 (name "python-beautifulsoup4")
67fd4a12 5131 (version "4.5.1")
b32a1e47
CAW
5132 (source
5133 (origin
5134 (method url-fetch)
5135 (uri (pypi-uri "beautifulsoup4" version))
5136 (sha256
5137 (base32
67fd4a12 5138 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
b32a1e47 5139 (build-system python-build-system)
5f37f0b6
LF
5140 (arguments
5141 `(#:phases
5142 (modify-phases %standard-phases
5143 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5144 ;; must use this conversion script when building with Python 3. The
5145 ;; conversion script also runs the tests.
5146 ;; For more information, see the file 'convert-py3k' in the source
5147 ;; distribution.
5148 (replace 'check
5149 (lambda _ (zero? (system* "./convert-py3k")))))))
b32a1e47
CAW
5150 (home-page
5151 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5152 (synopsis
5153 "Python screen-scraping library")
5154 (description
5155 "Beautiful Soup is a Python library designed for rapidly setting up
5156screen-scraping projects. It offers Pythonic idioms for navigating,
5157searching, and modifying a parse tree, providing a toolkit for
5158dissecting a document and extracting what you need. It automatically
5159converts incoming documents to Unicode and outgoing documents to UTF-8.")
f210e944 5160 (license license:expat)))
b32a1e47
CAW
5161
5162(define-public python2-beautifulsoup4
5163 (package
5164 (inherit (package-with-python2
5165 (strip-python2-variant python-beautifulsoup4)))
5f37f0b6 5166 (arguments `(#:python ,python-2))))
b32a1e47 5167
092e86f5
AE
5168(define-public python2-cssutils
5169 (package
5170 (name "python2-cssutils")
58d1d816 5171 (version "1.0.1")
092e86f5
AE
5172 (source
5173 (origin
5174 (method url-fetch)
58d1d816 5175 (uri (pypi-uri "cssutils" version))
092e86f5 5176 (sha256
58d1d816
EF
5177 (base32
5178 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
092e86f5
AE
5179 (build-system python-build-system)
5180 (native-inputs
5181 `(("python2-mock" ,python2-mock) ; for the tests
5182 ("unzip" ,unzip))) ; for unpacking the source
092e86f5
AE
5183 (arguments
5184 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5185 #:tests? #f ; The tests apparently download an external URL.
da6dd842 5186 ))
092e86f5
AE
5187 (home-page "http://cthedot.de/cssutils/")
5188 (synopsis
5189 "CSS Cascading Style Sheets library for Python")
5190 (description
5191 "Cssutils is a Python package for parsing and building CSS
5192Cascading Style Sheets. Currently it provides a DOM only and no rendering
5193options.")
3f641af0 5194 (license license:lgpl3+)))
880ff77c
AE
5195
5196(define-public python-cssselect
5197 (package
5198 (name "python-cssselect")
d5ccd9ab 5199 (version "0.9.2")
880ff77c
AE
5200 (source
5201 (origin
5202 (method url-fetch)
d5ccd9ab 5203 (uri (pypi-uri "cssselect" version))
880ff77c 5204 (sha256
d5ccd9ab
EF
5205 (base32
5206 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
880ff77c 5207 (build-system python-build-system)
880ff77c
AE
5208 (arguments
5209 ;; tests fail with message
5210 ;; AttributeError: 'module' object has no attribute 'tests'
5211 `(#:tests? #f))
5212 (home-page
5213 "https://pythonhosted.org/cssselect/")
5214 (synopsis
5215 "CSS3 selector parser and translator to XPath 1.0")
5216 (description
5217 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5218them to XPath 1.0 expressions. Such expressions can be used in lxml or
5219another XPath engine to find the matching elements in an XML or HTML document.")
3f641af0 5220 (license license:bsd-3)))
880ff77c
AE
5221
5222(define-public python2-cssselect
5223 (package-with-python2 python-cssselect))
60357f99
AE
5224
5225(define-public python-netifaces
5226 (package
5227 (name "python-netifaces")
5228 (version "0.10.4")
5229 (source
5230 (origin
5231 (method url-fetch)
5232 (uri (string-append
5233 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5234 version
5235 ".tar.gz"))
5236 (sha256
5237 (base32
5238 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5239 (build-system python-build-system)
60357f99
AE
5240 (home-page
5241 "https://bitbucket.org/al45tair/netifaces")
5242 (synopsis
5243 "Python module for portable network interface information")
5244 (description
5245 "Netifaces is a Python module providing information on network
5246interfaces in an easy and portable manner.")
5247 (license license:expat)))
5248
5249(define-public python2-netifaces
5250 (package-with-python2 python-netifaces))
92cb152b 5251
32f77c04
RW
5252(define-public python-networkx
5253 (package
5254 (name "python-networkx")
a4d9609c 5255 (version "1.11")
32f77c04
RW
5256 (source
5257 (origin
5258 (method url-fetch)
a4d9609c 5259 (uri (pypi-uri "networkx" version))
32f77c04 5260 (sha256
a4d9609c 5261 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
32f77c04
RW
5262 (build-system python-build-system)
5263 ;; python-decorator is needed at runtime
5264 (propagated-inputs
5265 `(("python-decorator" ,python-decorator)))
5266 (native-inputs
f3b98f4f 5267 `(("python-nose" ,python-nose)))
32f77c04
RW
5268 (home-page "http://networkx.github.io/")
5269 (synopsis "Python module for creating and manipulating graphs and networks")
5270 (description
5271 "NetworkX is a Python package for the creation, manipulation, and study
5272of the structure, dynamics, and functions of complex networks.")
3f641af0 5273 (license license:bsd-3)))
32f77c04
RW
5274
5275(define-public python2-networkx
5276 (package-with-python2 python-networkx))
5277
92cb152b
RW
5278(define-public snakemake
5279 (package
5280 (name "snakemake")
5281 (version "3.2.1")
5282 (source
5283 (origin
5284 (method url-fetch)
5285 (uri (string-append
5286 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5287 version ".tar.gz"))
5288 (sha256
5289 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5290 (build-system python-build-system)
92cb152b
RW
5291 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5292 (synopsis "Python-based execution environment for make-like workflows")
5293 (description
5294 "Snakemake aims to reduce the complexity of creating workflows by
5295providing a clean and modern domain specific specification language (DSL) in
5296Python style, together with a fast and comfortable execution environment.")
5297 (license license:expat)))
a1920bc9 5298
35de1fbd
RW
5299(define-public python-seaborn
5300 (package
5301 (name "python-seaborn")
fc899d4f 5302 (version "0.7.0")
35de1fbd
RW
5303 (source
5304 (origin
5305 (method url-fetch)
fc899d4f 5306 (uri (pypi-uri "seaborn" version))
35de1fbd 5307 (sha256
fc899d4f 5308 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
35de1fbd
RW
5309 (build-system python-build-system)
5310 (propagated-inputs
5311 `(("python-pandas" ,python-pandas)
5312 ("python-matplotlib" ,python-matplotlib)
5313 ("python-scipy" ,python-scipy)))
35de1fbd
RW
5314 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5315 (synopsis "Statistical data visualization")
5316 (description
5317 "Seaborn is a library for making attractive and informative statistical
5318graphics in Python. It is built on top of matplotlib and tightly integrated
5319with the PyData stack, including support for numpy and pandas data structures
5320and statistical routines from scipy and statsmodels.")
3f641af0 5321 (license license:bsd-3)
fc899d4f 5322 (properties `((python2-variant . ,(delay python2-seaborn))))))
35de1fbd
RW
5323
5324(define-public python2-seaborn
fc899d4f
EF
5325 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5326 (package
5327 (inherit base)
5328 (propagated-inputs `(("python2-pytz" ,python2-pytz)
00e10c6e 5329 ,@(package-propagated-inputs base))))))
35de1fbd 5330
90fc547f
RW
5331(define-public python-sympy
5332 (package
5333 (name "python-sympy")
5334 (version "0.7.6")
5335 (source
5336 (origin
5337 (method url-fetch)
5338 (uri (string-append
5339 "https://github.com/sympy/sympy/releases/download/sympy-"
5340 version "/sympy-" version ".tar.gz"))
5341 (sha256
5342 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5343 (build-system python-build-system)
90fc547f
RW
5344 (home-page "http://www.sympy.org/")
5345 (synopsis "Python library for symbolic mathematics")
5346 (description
5347 "SymPy is a Python library for symbolic mathematics. It aims to become a
5348full-featured computer algebra system (CAS) while keeping the code as simple
5349as possible in order to be comprehensible and easily extensible.")
3f641af0 5350 (license license:bsd-3)))
90fc547f
RW
5351
5352(define-public python2-sympy
5353 (package-with-python2 python-sympy))
5354
e8c9b010
SR
5355(define-public python-q
5356 (package
5357 (name "python-q")
5358 (version "2.6")
5359 (source
5360 (origin
5361 (method url-fetch)
5362 (uri (pypi-uri "q" version))
5363 (sha256
5364 (base32
5365 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5366 (build-system python-build-system)
5367 (home-page "https://github.com/zestyping/q")
5368 (synopsis "Quick-and-dirty debugging output for tired programmers")
5369 (description
5370 "q is a Python module for \"print\" style of debugging Python code. It
5371provides convenient short API for print out of values, tracebacks, and
5372falling into the Python interpreter.")
f210e944 5373 (license license:asl2.0)))
e8c9b010
SR
5374
5375(define-public python2-q
f210e944 5376 (package-with-python2 python-q))
e8c9b010 5377
a1920bc9
FB
5378(define-public python-testlib
5379 (package
5380 (name "python-testlib")
5381 (version "0.6.5")
5382 (source
5383 (origin
5384 (method url-fetch)
5385 (uri (string-append
5386 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5387 version ".zip"))
5388 (sha256
5389 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5390 (build-system python-build-system)
a1920bc9 5391 (native-inputs
632735f2 5392 `(("unzip" ,unzip))) ; for unpacking the source
a1920bc9
FB
5393 (synopsis "Python micro test suite harness")
5394 (description "A micro unittest suite harness for Python.")
5395 (home-page "https://github.com/trentm/testlib")
1cb9c006 5396 (license license:expat)))
a1920bc9
FB
5397
5398(define-public python2-testlib
5399 (package-with-python2 python-testlib))
db62afa5
LC
5400
5401(define-public python2-xlib
5402 (package
5403 (name "python2-xlib")
5404 (version "0.14")
5405 (source (origin
5406 (method url-fetch)
de67e922
LF
5407 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5408 "/" version "/"
db62afa5
LC
5409 "python-xlib-" version ".tar.gz"))
5410 (sha256
5411 (base32
5412 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5413 (build-system python-build-system)
5414 (arguments
5415 `(#:python ,python-2 ;Python 2 only
5416 #:tests? #f)) ;no tests
db62afa5
LC
5417 (home-page "http://python-xlib.sourceforge.net/")
5418 (synopsis "Python X11 client library")
5419 (description
5420 "The Python X Library is intended to be a fully functional X client
5421library for Python programs. It is useful to implement low-level X clients.
5422It is written entirely in Python.")
3f641af0 5423 (license license:gpl2+)))
0234ca06
DT
5424
5425(define-public python-singledispatch
5426 (package
5427 (name "python-singledispatch")
5428 (version "3.4.0.3")
5429 (source
5430 (origin
5431 (method url-fetch)
bdb67d84 5432 (uri (pypi-uri "singledispatch" version))
0234ca06
DT
5433 (sha256
5434 (base32
5435 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5436 (build-system python-build-system)
5e1c9d24
HG
5437 (native-inputs
5438 `(("python-six" ,python-six))) ; required for conversion, not at run-time
0234ca06
DT
5439 (home-page
5440 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5441 (synopsis "Backport of singledispatch feature from Python 3.4")
5442 (description
5443 "This library brings functools.singledispatch from Python 3.4 to Python
54442.6-3.3.")
5445 (license license:expat)))
5446
5447(define-public python2-singledispatch
5448 (package-with-python2 python-singledispatch))
feaae484 5449
310d218f
RW
5450(define-public python-tornado
5451 (package
5452 (name "python-tornado")
a724924b 5453 (version "4.3")
310d218f
RW
5454 (source
5455 (origin
5456 (method url-fetch)
a724924b 5457 (uri (pypi-uri "tornado" version))
310d218f 5458 (sha256
a724924b 5459 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
310d218f 5460 (build-system python-build-system)
3fe2c209
MB
5461 (arguments
5462 '(;; FIXME: Two tests error out with:
5463 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
5464 ;; #:phases
5465 ;; (modify-phases %standard-phases
5466 ;; (replace 'check
5467 ;; (lambda _
5468 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
5469 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
5470 ;; (zero? (system* "python" "-m" "tornado.test")))))
5471 #:tests? #f))
310d218f 5472 (native-inputs
b455439b 5473 `(("python-certifi" ,python-certifi)))
f22efa01 5474 (propagated-inputs
b455439b 5475 `(("python-backports-abc" ,python-backports-abc)))
f4a4a718 5476 (home-page "http://www.tornadoweb.org/")
310d218f
RW
5477 (synopsis "Python web framework and asynchronous networking library")
5478 (description
5479 "Tornado is a Python web framework and asynchronous networking library,
5480originally developed at FriendFeed. By using non-blocking network I/O,
5481Tornado can scale to tens of thousands of open connections, making it ideal
5482for long polling, WebSockets, and other applications that require a long-lived
5483connection to each user.")
3f641af0 5484 (license license:asl2.0)
b455439b 5485 (properties `((python2-variant . ,(delay python2-tornado))))))
310d218f
RW
5486
5487(define-public python2-tornado
b455439b 5488 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
310d218f 5489 (package (inherit tornado)
f22efa01 5490 (propagated-inputs
310d218f
RW
5491 `(("python2-backport-ssl-match-hostname"
5492 ,python2-backport-ssl-match-hostname)
b455439b 5493 ("python2-singledispatch" ,python2-singledispatch)
f22efa01 5494 ,@(package-propagated-inputs tornado))))))
310d218f 5495
6b59fc10
EF
5496;; the python- version can be removed with python-3.5
5497(define-public python-backports-abc
5498 (package
5499 (name "python-backports-abc")
5500 (version "0.4")
5501 (source
5502 (origin
5503 (method url-fetch)
5504 (uri (pypi-uri "backports_abc" version))
5505 (sha256
5506 (base32
5507 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5508 (build-system python-build-system)
6b59fc10 5509 (home-page "https://github.com/cython/backports_abc")
66e07664 5510 (synopsis "Backport of additions to the 'collections.abc' module")
6b59fc10
EF
5511 (description
5512 "Python-backports-abc provides a backport of additions to the
5513'collections.abc' module in Python-3.5.")
3f641af0 5514 (license license:psfl)))
6b59fc10
EF
5515
5516(define-public python2-backports-abc
5517 (package-with-python2 python-backports-abc))
5518
feaae484
SB
5519(define-public python-waf
5520 (package
5521 (name "python-waf")
7dd55dfe 5522 (version "1.9.5")
feaae484
SB
5523 (source (origin
5524 (method url-fetch)
bae67829 5525 (uri (string-append "https://waf.io/"
feaae484
SB
5526 "waf-" version ".tar.bz2"))
5527 (sha256
5528 (base32
7dd55dfe 5529 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
feaae484
SB
5530 (build-system python-build-system)
5531 (arguments
5532 '(#:phases
5533 (modify-phases %standard-phases
5534 (replace 'build
7dd55dfe
EF
5535 (lambda _
5536 (zero? (system* "python" "waf-light" "configure" "build"))))
feaae484 5537 (replace 'check
7dd55dfe
EF
5538 (lambda _
5539 (zero? (system* "python" "waf" "--version"))))
feaae484 5540 (replace 'install
7dd55dfe
EF
5541 (lambda _
5542 (copy-file "waf" %output))))))
5543 (home-page "http://waf.io/")
feaae484
SB
5544 (synopsis "Python-based build system")
5545 (description
5546 "Waf is a Python-based framework for configuring, compiling and installing
5547applications.")
3f641af0 5548 (license license:bsd-3)))
feaae484
SB
5549
5550(define-public python2-waf
5551 (package-with-python2 python-waf))
45203542
RW
5552
5553(define-public python-pyzmq
5554 (package
5555 (name "python-pyzmq")
3655ee76 5556 (version "15.1.0")
45203542
RW
5557 (source
5558 (origin
5559 (method url-fetch)
3655ee76 5560 (uri (pypi-uri "pyzmq" version))
45203542 5561 (sha256
3655ee76 5562 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
45203542
RW
5563 (build-system python-build-system)
5564 (arguments
5565 `(#:configure-flags
5566 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5567 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5568 ;; --inplace' for 'python setup.py test' to work.
5569 #:tests? #f))
5570 (inputs
5571 `(("zeromq" ,zeromq)))
5572 (native-inputs
5573 `(("pkg-config" ,pkg-config)
f3b98f4f 5574 ("python-nose" ,python-nose)))
45203542
RW
5575 (home-page "http://github.com/zeromq/pyzmq")
5576 (synopsis "Python bindings for 0MQ")
5577 (description
5578 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
3f641af0 5579 (license license:bsd-4)))
45203542
RW
5580
5581(define-public python2-pyzmq
5582 (package-with-python2 python-pyzmq))
d889e6c4
CR
5583
5584(define-public python-pep8
5585 (package
5586 (name "python-pep8")
db251311 5587 (version "1.7.0")
d889e6c4
CR
5588 (source
5589 (origin
5590 (method url-fetch)
db251311 5591 (uri (pypi-uri "pep8" version))
d889e6c4
CR
5592 (sha256
5593 (base32
db251311 5594 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
d889e6c4 5595 (build-system python-build-system)
d889e6c4
CR
5596 (home-page "http://pep8.readthedocs.org/")
5597 (synopsis "Python style guide checker")
5598 (description
5599 "This tools checks Python code against some of the style conventions in
5600PEP 8.")
5601 (license license:expat)))
5602
5603(define-public python2-pep8
5604 (package-with-python2 python-pep8))
e31d7f44
CR
5605
5606(define-public python-pyflakes
5607 (package
5608 (name "python-pyflakes")
2abc3972 5609 (version "1.0.0")
e31d7f44
CR
5610 (source
5611 (origin
5612 (method url-fetch)
2abc3972 5613 (uri (pypi-uri "pyflakes" version))
e31d7f44
CR
5614 (sha256
5615 (base32
2abc3972 5616 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
e31d7f44 5617 (build-system python-build-system)
e31d7f44
CR
5618 (home-page
5619 "https://github.com/pyflakes/pyflakes")
5620 (synopsis "Passive checker of Python programs")
5621 (description
5622 "Pyflakes statically checks Python source code for common errors.")
5623 (license license:expat)))
a59e017c 5624
7261d9eb
CR
5625(define-public python2-pyflakes
5626 (package-with-python2 python-pyflakes))
5627
a59e017c
CR
5628(define-public python-mccabe
5629 (package
5630 (name "python-mccabe")
c6ebd40d 5631 (version "0.4.0")
a59e017c
CR
5632 (source
5633 (origin
5634 (method url-fetch)
c6ebd40d 5635 (uri (pypi-uri "mccabe" version))
a59e017c
CR
5636 (sha256
5637 (base32
c6ebd40d 5638 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
a59e017c 5639 (build-system python-build-system)
328bb95d 5640 (native-inputs
c6ebd40d 5641 `(("python-pytest" ,python-pytest)
f3b98f4f 5642 ("python-pytest-runner" ,python-pytest-runner)))
a59e017c
CR
5643 (home-page "https://github.com/flintwork/mccabe")
5644 (synopsis "McCabe checker, plugin for flake8")
5645 (description
5646 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5647complexity of Python source code.")
7362371d 5648 (license license:expat)))
a59e017c
CR
5649
5650(define-public python2-mccabe
5651 (package-with-python2 python-mccabe))
e8df8f47 5652
7477fbb1
CR
5653(define-public python-mccabe-0.2.1
5654 (package (inherit python-mccabe)
5655 (version "0.2.1")
5656 (source
5657 (origin
5658 (method url-fetch)
5659 (uri (pypi-uri "mccabe" version))
5660 (sha256
5661 (base32
f3b98f4f 5662 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7477fbb1
CR
5663
5664(define-public python2-mccabe-0.2.1
5665 (package-with-python2 python-mccabe-0.2.1))
5666
e8df8f47
CR
5667;; Flake8 2.4.1 requires an older version of pep8.
5668;; This should be removed ASAP.
5669(define-public python-pep8-1.5.7
5670 (package (inherit python-pep8)
5671 (version "1.5.7")
5672 (source
5673 (origin
5674 (method url-fetch)
5675 (uri (string-append
5676 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5677 version
5678 ".tar.gz"))
5679 (sha256
5680 (base32
5681 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5682
5683(define-public python2-pep8-1.5.7
5684 (package-with-python2 python-pep8-1.5.7))
5685
5686;; Flake8 2.4.1 requires an older version of pyflakes.
5687;; This should be removed ASAP.
5688(define-public python-pyflakes-0.8.1
5689 (package (inherit python-pyflakes)
5690 (version "0.8.1")
5691 (source
5692 (origin
5693 (method url-fetch)
5694 (uri (string-append
5695 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5696 version
5697 ".tar.gz"))
5698 (sha256
5699 (base32
5700 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5701
5702(define-public python2-pyflakes-0.8.1
7261d9eb 5703 (package-with-python2 python-pyflakes-0.8.1))
e8df8f47
CR
5704
5705(define-public python-flake8
5706 (package
5707 (name "python-flake8")
43789136 5708 (version "2.5.4")
e8df8f47
CR
5709 (source
5710 (origin
5711 (method url-fetch)
1b995533 5712 (uri (pypi-uri "flake8" version))
e8df8f47
CR
5713 (sha256
5714 (base32
011271c7
HG
5715 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5716 (modules '((guix build utils)))
5717 (snippet
5718 '(begin
5719 ;; Remove pre-compiled .pyc files from source.
5720 (for-each delete-file-recursively
5721 (find-files "." "__pycache__" #:directories? #t))
5722 (for-each delete-file (find-files "." "\\.pyc$"))
5723 #t))))
e8df8f47 5724 (build-system python-build-system)
482d9591 5725 (propagated-inputs
f3b98f4f 5726 `(("python-pep8" ,python-pep8)
43789136 5727 ("python-pyflakes" ,python-pyflakes)
482d9591 5728 ("python-mccabe" ,python-mccabe)))
328bb95d
HG
5729 (native-inputs
5730 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
e8df8f47
CR
5731 ("python-nose" ,python-nose)))
5732 (home-page "https://gitlab.com/pycqa/flake8")
5733 (synopsis
5734 "The modular source code checker: pep8, pyflakes and co")
5735 (description
5736 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5737 (license license:expat)))
5738
5739(define-public python2-flake8
5740 (package-with-python2 python-flake8))
61b9ac53 5741
abf21efc
CR
5742;; This will only be needed by the python-hacking package and will not be
5743;; necessary once python-hacking > 0.10.2 is released.
5744(define-public python-flake8-2.2.4
5745 (package (inherit python-flake8)
482d9591 5746 (propagated-inputs
f3b98f4f 5747 `(("python-pep8" ,python-pep8-1.5.7)
abf21efc 5748 ("python-pyflakes" ,python-pyflakes-0.8.1)
482d9591 5749 ("python-mccabe" ,python-mccabe-0.2.1)))
328bb95d 5750 (native-inputs
482d9591 5751 `(("python-mock" ,python-mock)
abf21efc
CR
5752 ("python-nose" ,python-nose)))
5753 (version "2.2.4")
5754 (source
5755 (origin
5756 (method url-fetch)
5757 (uri (pypi-uri "flake8" version))
5758 (sha256
5759 (base32
b9c8ccce
HG
5760 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
5761 (modules '((guix build utils)))
5762 (snippet
5763 '(begin
5764 ;; Remove pre-compiled .pyc files from source.
5765 (for-each delete-file-recursively
5766 (find-files "." "__pycache__" #:directories? #t))
5767 (for-each delete-file (find-files "." "\\.pyc$"))
5768 #t))))))
abf21efc
CR
5769
5770(define-public python2-flake8-2.2.4
5771 (package-with-python2 python-flake8-2.2.4))
5772
61b9ac53
FB
5773(define-public python-mistune
5774 (package
5775 (name "python-mistune")
5776 (version "0.7")
5777 (source
5778 (origin
5779 (method url-fetch)
5780 (uri (string-append
5781 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5782 version
5783 ".tar.gz"))
5784 (sha256
5785 (base32
5786 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5787 (build-system python-build-system)
328bb95d 5788 (native-inputs
f3b98f4f 5789 `(("python-nose" ,python-nose)
61b9ac53
FB
5790 ("python-cython" ,python-cython)))
5791 (home-page "https://github.com/lepture/mistune")
5792 (synopsis "Markdown parser in pure Python")
5793 (description "This package provides a fast markdown parser in pure
5794Python.")
3f641af0 5795 (license license:bsd-3)))
61b9ac53
FB
5796
5797(define-public python2-mistune
5798 (package-with-python2 python-mistune))
6d992d07 5799
b9893908
EE
5800(define-public python-markdown
5801 (package
5802 (name "python-markdown")
5803 (version "2.6.5")
5804 (source
5805 (origin
5806 (method url-fetch)
5807 (uri (pypi-uri "Markdown" version))
5808 (sha256
5809 (base32
5810 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5811 (build-system python-build-system)
5812 (arguments
5813 `(#:phases
5814 (modify-phases %standard-phases
5815 (replace 'check
5816 (lambda _
5817 (zero? (system* "python" "run-tests.py")))))))
5818 (native-inputs
5819 `(("python-nose" ,python-nose)
5820 ("python-pyyaml" ,python-pyyaml)))
5821 (home-page "https://pythonhosted.org/Markdown/")
5822 (synopsis "Python implementation of Markdown")
5823 (description
5824 "This package provides a Python implementation of John Gruber's
5825Markdown. The library features international input, various Markdown
5826extensions, and several HTML output formats. A command line wrapper
5827markdown_py is also provided to convert Markdown files to HTML.")
3f641af0 5828 (license license:bsd-3)))
b9893908
EE
5829
5830(define-public python2-markdown
5831 (package-with-python2 python-markdown))
5832
6d992d07
FB
5833(define-public python-ptyprocess
5834 (package
5835 (name "python-ptyprocess")
5836 (version "0.5")
5837 (source
5838 (origin
5839 (method url-fetch)
5840 (uri (string-append
5841 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5842 version ".tar.gz"))
5843 (sha256
5844 (base32
5845 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5846 (build-system python-build-system)
328bb95d 5847 (native-inputs
f3b98f4f 5848 `(("python-nose" ,python-nose)))
6d992d07
FB
5849 (arguments
5850 `(#:phases
5851 (modify-phases %standard-phases
5852 (replace 'check
5853 (lambda _
5854 (zero? (system* "nosetests")))))))
5855 (home-page "https://github.com/pexpect/ptyprocess")
5856 (synopsis "Run a subprocess in a pseudo terminal")
5857 (description
5858 "This package provides a Python library used to launch a subprocess in a
5859pseudo terminal (pty), and interact with both the process and its pty.")
3f641af0 5860 (license license:isc)))
6d992d07
FB
5861
5862(define-public python2-ptyprocess
5863 (package-with-python2 python-ptyprocess))
4aadb1df
FB
5864
5865(define-public python-terminado
5866 (package
5867 (name "python-terminado")
783fb0a3 5868 (version "0.6")
4aadb1df
FB
5869 (source
5870 (origin
5871 (method url-fetch)
783fb0a3 5872 (uri (pypi-uri "terminado" version))
4aadb1df
FB
5873 (sha256
5874 (base32
783fb0a3 5875 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
4aadb1df
FB
5876 (build-system python-build-system)
5877 (propagated-inputs
5878 `(("python-tornado" ,python-tornado)
5879 ("python-ptyprocess" ,python-ptyprocess)))
783fb0a3
EF
5880 (native-inputs
5881 `(("python-nose" ,python-nose)))
4aadb1df
FB
5882 (arguments
5883 `(#:phases
5884 (modify-phases %standard-phases
5885 (replace 'check
5886 (lambda _
5887 (zero? (system* "nosetests")))))))
5888 (home-page "https://github.com/takluyver/terminado")
5889 (synopsis "Terminals served to term.js using Tornado websockets")
5890 (description "This package provides a Tornado websocket backend for the
5891term.js Javascript terminal emulator library.")
3f641af0 5892 (license license:bsd-2)
783fb0a3 5893 (properties `((python2-variant . ,(delay python2-terminado))))))
4aadb1df
FB
5894
5895(define-public python2-terminado
783fb0a3 5896 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
4aadb1df 5897 (package (inherit terminado)
783fb0a3
EF
5898 (propagated-inputs
5899 `(("python2-backport-ssl-match-hostname"
5900 ,python2-backport-ssl-match-hostname)
00e10c6e 5901 ,@(package-propagated-inputs terminado))))))
5faa5ce4 5902
d582eaac
SB
5903(define-public python-fonttools
5904 (package
5905 (name "python-fonttools")
5906 (version "2.5")
5907 (source (origin
5908 (method url-fetch)
5909 (uri (string-append
5910 "https://pypi.python.org/packages/source/F/FontTools/"
5911 "fonttools-" version ".tar.gz"))
5912 (sha256
5913 (base32
5914 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5915 (build-system python-build-system)
9e8c6a37
HG
5916 (arguments
5917 '(#:test-target "check"
5918 #:phases
5919 (modify-phases %standard-phases
5920 (add-after 'unpack 'patch-setuppy
5921 ;; Remove the undocumented "extra_path" argument, which adds an
5922 ;; intervening directories between site-packages and the package
5923 ;; directory.
5924 (lambda _
5925 (substitute* "setup.py"
5926 (("^[ \t]*extra_path *= *'FontTools',") ""))
5927 #t)))))
d582eaac
SB
5928 (home-page "http://github.com/behdad/fonttools")
5929 (synopsis "Tools to manipulate font files")
5930 (description
5931 "FontTools/TTX is a library to manipulate font files from Python. It
9e8c6a37 5932supports reading and writing of TrueType/OpenType fonts, reading and writing
d582eaac
SB
5933of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5934also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5935from an XML-based format.")
3f641af0
DC
5936 (license (license:non-copyleft
5937 "file://LICENSE.txt"
5938 "See LICENSE.txt in the distribution."))))
d582eaac
SB
5939
5940(define-public python2-fonttools
5941 (package-with-python2 python-fonttools))
75710da6 5942
5faa5ce4
RW
5943(define-public python-ly
5944 (package
5945 (name "python-ly")
5135354f 5946 (version "0.9.4")
5faa5ce4
RW
5947 (source
5948 (origin
5949 (method url-fetch)
5135354f
RW
5950 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5951 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5952 "/python-ly-" version ".tar.gz"))
5faa5ce4
RW
5953 (sha256
5954 (base32
5135354f 5955 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5faa5ce4 5956 (build-system python-build-system)
5faa5ce4
RW
5957 (synopsis "Tool and library for manipulating LilyPond files")
5958 (description "This package provides a Python library to parse, manipulate
5959or create documents in LilyPond format. A command line program ly is also
5960provided that can be used to do various manipulations with LilyPond files.")
5961 (home-page "https://pypi.python.org/pypi/python-ly")
3f641af0 5962 (license license:gpl2+)))
7e7b27d9
CR
5963
5964(define-public python-appdirs
5965 (package
5966 (name "python-appdirs")
5967 (version "1.4.0")
5968 (source
5969 (origin
5970 (method url-fetch)
5971 (uri (string-append
5972 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5973 version
5974 ".tar.gz"))
5975 (sha256
5976 (base32
5977 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5978 (build-system python-build-system)
7e7b27d9
CR
5979 (home-page "http://github.com/ActiveState/appdirs")
5980 (synopsis
5981 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5982 (description
5983 "This module provides a portable way of finding out where user data
5984should be stored on various operating systems.")
5985 (license license:expat)))
5986
5987(define-public python2-appdirs
5988 (package-with-python2 python-appdirs))
89b2e0b0
LF
5989
5990(define-public python-llfuse
5991 (package
5992 (name "python-llfuse")
e36ace36 5993 (version "1.1.1")
89b2e0b0
LF
5994 (source (origin
5995 (method url-fetch)
5996 (uri (string-append
5997 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5998 "llfuse-" version ".tar.bz2"))
5999 (sha256
6000 (base32
e36ace36 6001 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
89b2e0b0
LF
6002 (build-system python-build-system)
6003 (inputs
6004 `(("fuse" ,fuse)
6005 ("attr" ,attr)))
6006 (native-inputs
f3b98f4f 6007 `(("pkg-config" ,pkg-config)))
89b2e0b0
LF
6008 (synopsis "Python bindings for FUSE")
6009 (description
6010 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6011 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
3f641af0 6012 (license license:lgpl2.0+)
cd0569c4 6013 (properties `((python2-variant . ,(delay python2-llfuse))))))
89b2e0b0
LF
6014
6015(define-public python2-llfuse
cd0569c4
LF
6016 (package (inherit (package-with-python2
6017 (strip-python2-variant python-llfuse)))
6018 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6019
6020;; For attic-0.16
6021(define-public python-llfuse-0.41
6022 (package (inherit python-llfuse)
229b3661 6023 (version "0.41.1")
cd0569c4
LF
6024 (source (origin
6025 (method url-fetch)
6026 (uri (string-append
6027 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6028 "llfuse-" version ".tar.bz2"))
6029 (sha256
6030 (base32
229b3661 6031 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
cd0569c4
LF
6032 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6033 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
3f641af0 6034 (license (list license:expat license:lgpl2.0+))))
641c9871
LF
6035
6036(define-public python-msgpack
6037 (package
6038 (name "python-msgpack")
aed625bd 6039 (version "0.4.8")
641c9871
LF
6040 (source (origin
6041 (method url-fetch)
ae831df4 6042 (uri (pypi-uri "msgpack-python" version))
641c9871
LF
6043 (sha256
6044 (base32
aed625bd 6045 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
641c9871 6046 (build-system python-build-system)
641c9871
LF
6047 (synopsis "MessagePack (de)serializer")
6048 (description "MessagePack is a fast, compact binary serialization format,
6049suitable for similar data to JSON. This package provides CPython bindings for
6050reading and writing MessagePack data.")
6051 (home-page "https://pypi.python.org/pypi/msgpack-python/")
f210e944 6052 (license license:asl2.0)))
bd74be7b
LF
6053
6054(define-public python2-msgpack
f210e944 6055 (package-with-python2 python-msgpack))
641c9871 6056
6e5e39f4
CR
6057(define-public python-netaddr
6058 (package
6059 (name "python-netaddr")
6060 (version "0.7.18")
6061 (source
6062 (origin
6063 (method url-fetch)
6064 (uri (string-append
6065 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6066 version
6067 ".tar.gz"))
6068 (sha256
6069 (base32
6070 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6071 (build-system python-build-system)
6072 (arguments `(#:tests? #f)) ;; No tests.
6e5e39f4
CR
6073 (home-page "https://github.com/drkjam/netaddr/")
6074 (synopsis "Pythonic manipulation of network addresses")
6075 (description
6076 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6077and MAC network addresses.")
3f641af0 6078 (license license:bsd-3)))
6e5e39f4
CR
6079
6080(define-public python2-netaddr
6081 (package-with-python2 python-netaddr))
8c692a52
CR
6082
6083(define-public python-wrapt
6084 (package
6085 (name "python-wrapt")
6086 (version "1.10.5")
6087 (source
6088 (origin
6089 (method url-fetch)
6090 (uri (string-append
6091 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6092 version
6093 ".tar.gz"))
6094 (sha256
6095 (base32
6096 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6097 (build-system python-build-system)
6098 (arguments
6099 ;; Tests are not included in the tarball, they are only available in the
6100 ;; git repository.
6101 `(#:tests? #f))
8c692a52
CR
6102 (home-page "https://github.com/GrahamDumpleton/wrapt")
6103 (synopsis "Module for decorators, wrappers and monkey patching")
6104 (description
6105 "The aim of the wrapt module is to provide a transparent object proxy for
6106 Python, which can be used as the basis for the construction of function
6107 wrappers and decorator functions.")
3f641af0 6108 (license license:bsd-2)))
8c692a52
CR
6109
6110(define-public python2-wrapt
6111 (package-with-python2 python-wrapt))
b85c85be
CR
6112
6113(define-public python-iso8601
6114 (package
6115 (name "python-iso8601")
fe84bc9a 6116 (version "0.1.11")
b85c85be
CR
6117 (source
6118 (origin
6119 (method url-fetch)
fe84bc9a 6120 (uri (pypi-uri "iso8601" version))
b85c85be 6121 (sha256
fe84bc9a
EF
6122 (base32
6123 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
b85c85be 6124 (build-system python-build-system)
b85c85be
CR
6125 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6126 (synopsis "Module to parse ISO 8601 dates")
6127 (description
6128 "This module parses the most common forms of ISO 8601 date strings (e.g.
6129@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6130 (license license:expat)))
6131
6132(define-public python2-iso8601
6133 (package-with-python2 python-iso8601))
5e412b63
CR
6134
6135(define-public python-monotonic
6136 (package
6137 (name "python-monotonic")
6138 (version "0.3")
6139 (source
6140 (origin
6141 (method url-fetch)
6142 (uri (string-append
6143 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6144 version
6145 ".tar.gz"))
6146 (sha256
6147 (base32
6148 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6149 (build-system python-build-system)
5e412b63
CR
6150 (home-page "https://github.com/atdt/monotonic")
6151 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6152 (description
6153 "This module provides a monotonic() function which returns the value (in
6154fractional seconds) of a clock which never goes backwards.")
3f641af0 6155 (license license:asl2.0)))
5e412b63
CR
6156
6157(define-public python2-monotonic
6158 (package-with-python2 python-monotonic))
de34afac
CR
6159
6160(define-public python-webob
6161 (package
6162 (name "python-webob")
b8834c21 6163 (version "1.5.1")
de34afac
CR
6164 (source
6165 (origin
6166 (method url-fetch)
b8834c21 6167 (uri (pypi-uri "WebOb" version))
de34afac
CR
6168 (sha256
6169 (base32
b8834c21 6170 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
de34afac 6171 (build-system python-build-system)
328bb95d 6172 (native-inputs
f3b98f4f 6173 `(("python-nose" ,python-nose)))
de34afac
CR
6174 (home-page "http://webob.org/")
6175 (synopsis "WSGI request and response object")
6176 (description
6177 "WebOb provides wrappers around the WSGI request environment, and an
6178object to help create WSGI responses.")
6179 (license license:expat)))
6180
6181(define-public python2-webob
6182 (package-with-python2 python-webob))
350ba0a3 6183
02a8a187
BW
6184(define-public python-xlrd
6185 (package
6186 (name "python-xlrd")
c2ad4d70 6187 (version "1.0.0")
02a8a187
BW
6188 (source (origin
6189 (method url-fetch)
e775f48e 6190 (uri (pypi-uri "xlrd" version))
02a8a187
BW
6191 (sha256
6192 (base32
c2ad4d70 6193 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
02a8a187
BW
6194 (build-system python-build-system)
6195 (arguments
6196 `(#:phases
6197 (modify-phases %standard-phases
c2ad4d70 6198 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
02a8a187
BW
6199 ;; run tests instead for now.
6200 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
f3b98f4f 6201 (native-inputs `(("python-nose" ,python-nose)))
02a8a187
BW
6202 (home-page "http://www.python-excel.org/")
6203 (synopsis "Library for extracting data from Excel files")
6204 (description "This packages provides a library to extract data from
c598e35c 6205spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
02a8a187
BW
6206@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6207Unicode-aware. It is not intended as an end-user tool.")
3f641af0 6208 (license license:bsd-3)))
02a8a187
BW
6209
6210(define-public python2-xlrd
6211 (package-with-python2 python-xlrd))
6212
350ba0a3
CR
6213(define-public python-prettytable
6214 (package
6215 (name "python-prettytable")
6216 (version "0.7.2")
6217 (source
6218 (origin
6219 (method url-fetch)
6220 (uri (string-append
6221 "https://pypi.python.org/packages/source/P/PrettyTable/"
6222 "prettytable-" version ".tar.bz2"))
6223 (sha256
6224 (base32
6225 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6226 (build-system python-build-system)
350ba0a3
CR
6227 (home-page "http://code.google.com/p/prettytable/")
6228 (synopsis "Display tabular data in an ASCII table format")
6229 (description
6230 "A library designed to represent tabular data in visually appealing ASCII
6231tables. PrettyTable allows for selection of which columns are to be printed,
6232independent alignment of columns (left or right justified or centred) and
6233printing of sub-tables by specifying a row range.")
3f641af0 6234 (license license:bsd-3)))
350ba0a3
CR
6235
6236(define-public python2-prettytable
6237 (package-with-python2 python-prettytable))
7a8ac75a 6238
9f8ee3fe
RW
6239(define-public python-tables
6240 (package
6241 (name "python-tables")
6242 (version "3.2.2")
6243 (source
6244 (origin
6245 (method url-fetch)
6246 (uri (pypi-uri "tables" version))
6247 (sha256
6248 (base32
bac23672
HG
6249 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6250 (modules '((guix build utils)))
6251 (snippet
6252 '(begin
6253 ;; Remove pre-compiled .pyc files from source.
6254 (for-each delete-file-recursively
6255 (find-files "." "__pycache__" #:directories? #t))
6256 (for-each delete-file (find-files "." "\\.pyc$"))
6257 #t))))
9f8ee3fe
RW
6258 (build-system python-build-system)
6259 (arguments
6260 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6261 ;; or "check", so we must override the build and check phases.
6262 #:phases
6263 (modify-phases %standard-phases
6264 (add-after 'unpack 'use-gcc
6265 (lambda _
6266 (substitute* "setup.py"
6267 (("compiler = new_compiler\\(\\)" line)
6268 (string-append line
6269 "\ncompiler.set_executables(compiler='gcc',"
6270 "compiler_so='gcc',"
6271 "linker_exe='gcc',"
6272 "linker_so='gcc -shared')")))
6273 #t))
6274 (replace 'build
6275 (lambda* (#:key inputs #:allow-other-keys)
6276 (zero? (system* "python" "setup.py" "build"
6277 (string-append "--hdf5="
6278 (assoc-ref inputs "hdf5"))))))
6279 (replace 'check
6280 (lambda* (#:key inputs #:allow-other-keys)
6281 (zero? (system* "python" "setup.py" "check"
6282 (string-append "--hdf5="
6283 (assoc-ref inputs "hdf5")))))))))
6284 (propagated-inputs
6285 `(("python-numexpr" ,python-numexpr)
6286 ("python-numpy" ,python-numpy)))
6287 (native-inputs
f3b98f4f 6288 `(("python-cython" ,python-cython)
9f8ee3fe
RW
6289 ("pkg-config" ,pkg-config)))
6290 (inputs
6291 `(("hdf5" ,hdf5)
6292 ("bzip2" ,bzip2)
6293 ("zlib" ,zlib)))
6294 (home-page "http://www.pytables.org/")
6295 (synopsis "Hierarchical datasets for Python")
6296 (description "PyTables is a package for managing hierarchical datasets and
6297designed to efficently cope with extremely large amounts of data.")
3f641af0 6298 (license license:bsd-3)))
9f8ee3fe
RW
6299
6300(define-public python2-tables
6301 (package-with-python2 python-tables))
6302
7a8ac75a
RW
6303(define-public python-pyasn1
6304 (package
6305 (name "python-pyasn1")
caa0edb3 6306 (version "0.1.9")
7a8ac75a
RW
6307 (source
6308 (origin
6309 (method url-fetch)
caa0edb3 6310 (uri (pypi-uri "pyasn1" version))
7a8ac75a
RW
6311 (sha256
6312 (base32
caa0edb3 6313 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7a8ac75a
RW
6314 (build-system python-build-system)
6315 (home-page "http://pyasn1.sourceforge.net/")
6316 (synopsis "ASN.1 types and codecs")
6317 (description
6318 "This is an implementation of ASN.1 types and codecs in Python. It is
6319suitable for a wide range of protocols based on the ASN.1 specification.")
3f641af0 6320 (license license:bsd-2)))
7a8ac75a
RW
6321
6322(define-public python2-pyasn1
6323 (package-with-python2 python-pyasn1))
9a49a535 6324
5988c299
EF
6325(define-public python-pyasn1-modules
6326 (package
6327 (name "python-pyasn1-modules")
6328 (version "0.0.8")
6329 (source
6330 (origin
6331 (method url-fetch)
6332 (uri (pypi-uri "pyasn1-modules" version))
6333 (sha256
6334 (base32
6335 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6336 (build-system python-build-system)
5988c299
EF
6337 (propagated-inputs
6338 `(("python-pyasn1" ,python-pyasn1)))
6339 (home-page "http://sourceforge.net/projects/pyasn1/")
6340 (synopsis "ASN.1 codec implementations")
6341 (description
6342 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6343implementations of ASN.1-based codecs and protocols.")
3f641af0 6344 (license license:bsd-3)))
5988c299
EF
6345
6346(define-public python2-pyasn1-modules
6347 (package-with-python2 python-pyasn1-modules))
6348
520af157 6349(define-public python-ipaddress
9a49a535 6350 (package
520af157
DC
6351 (name "python-ipaddress")
6352 (version "1.0.16")
6353 (source (origin
6354 (method url-fetch)
6355 (uri (pypi-uri "ipaddress" version))
6356 (sha256
6357 (base32
6358 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
9a49a535 6359 (build-system python-build-system)
9a49a535
RW
6360 (home-page "https://github.com/phihag/ipaddress")
6361 (synopsis "IP address manipulation library")
6362 (description
520af157
DC
6363 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6364 in Python. This library is used to create, poke at, and manipulate IPv4 and
6365 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6366 module to older versions of Python.")
f210e944 6367 (license license:psfl)))
520af157
DC
6368
6369(define-public python2-ipaddress
f210e944 6370 (package-with-python2 python-ipaddress))
3f00e078 6371
4a238186
HG
6372(define-public python2-ipaddr
6373 (package
6374 (name "python2-ipaddr")
6375 (version "2.1.11")
6376 (source
6377 (origin
6378 (method url-fetch)
6379 (uri (pypi-uri "ipaddr" version))
6380 (sha256
6381 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6382 (build-system python-build-system)
6383 (arguments
6384 `(#:python ,python-2 ;version 2 only
6385 #:phases
6386 (modify-phases %standard-phases
6387 (replace 'check
6388 (lambda* _
6389 (zero? (system* "python" "ipaddr_test.py")))))))
6390 (home-page "https://github.com/google/ipaddr-py")
6391 (synopsis "IP address manipulation library")
6392 (description
6393 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6394IPv6 addresses and networks.
6395
6396For new implementations you may prefer to use the standard module
6397@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6398versions of Python.")
3f641af0 6399 (license license:asl2.0)))
4a238186 6400
3f00e078
RW
6401(define-public python-idna
6402 (package
6403 (name "python-idna")
6404 (version "2.0")
6405 (source
6406 (origin
6407 (method url-fetch)
6408 (uri (string-append "https://pypi.python.org/packages/source/i/"
6409 "idna/idna-" version ".tar.gz"))
6410 (sha256
6411 (base32
6412 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6413 (build-system python-build-system)
3f00e078
RW
6414 (home-page "https://github.com/kjd/idna")
6415 (synopsis "Internationalized domain names in applications")
6416 (description
6417 "This is a library to support the Internationalised Domain Names in
6418Applications (IDNA) protocol as specified in RFC 5891. This version of the
6419protocol is often referred to as “IDNA2008” and can produce different results
6420from the earlier standard from 2003. The library is also intended to act as a
6421suitable drop-in replacement for the “encodings.idna” module that comes with
6422the Python standard library but currently only supports the older 2003
6423specification.")
3f641af0 6424 (license license:bsd-4)))
3f00e078
RW
6425
6426(define-public python2-idna
6427 (package-with-python2 python-idna))
36ebf972
RW
6428
6429(define-public python-pretend
6430 (package
6431 (name "python-pretend")
6432 (version "1.0.8")
6433 (source
6434 (origin
6435 (method url-fetch)
6436 (uri (string-append "https://pypi.python.org/packages/source/p/"
6437 "pretend/pretend-" version ".tar.gz"))
6438 (sha256
6439 (base32
6440 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6441 (build-system python-build-system)
36ebf972
RW
6442 (home-page "https://github.com/alex/pretend")
6443 (synopsis "Library for stubbing in Python")
6444 (description
6445 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6446technique for writing tests. You may hear the term mixed up with mocks,
6447fakes, or doubles. Basically, a stub is an object that returns pre-canned
6448responses, rather than doing any computation.")
3f641af0 6449 (license license:bsd-3)))
36ebf972
RW
6450
6451(define-public python2-pretend
6452 (package-with-python2 python-pretend))
aa759a51
RW
6453
6454(define-public python-cryptography-vectors
6455 (package
6456 (name "python-cryptography-vectors")
a6c47905 6457 (version "1.6")
aa759a51
RW
6458 (source
6459 (origin
6460 (method url-fetch)
9c509ca9 6461 (uri (pypi-uri "cryptography_vectors" version))
aa759a51
RW
6462 (sha256
6463 (base32
a6c47905 6464 "0xgn3yvlmv5rs92wgjj39qscr6s7mwbbsx7j683sfa6ijmyb1k01"))))
aa759a51 6465 (build-system python-build-system)
aa759a51 6466 (home-page "https://github.com/pyca/cryptography")
66e07664 6467 (synopsis "Test vectors for the cryptography package")
aa759a51
RW
6468 (description
6469 "This package contains test vectors for the cryptography package.")
6470 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6471 (license (list license:bsd-3 license:asl2.0))))
aa759a51
RW
6472
6473(define-public python2-cryptography-vectors
6474 (package-with-python2 python-cryptography-vectors))
88b47cb0
RW
6475
6476(define-public python-cryptography
6477 (package
6478 (name "python-cryptography")
a6c47905 6479 (version "1.6")
88b47cb0
RW
6480 (source
6481 (origin
6482 (method url-fetch)
9c509ca9 6483 (uri (pypi-uri "cryptography" version))
88b47cb0
RW
6484 (sha256
6485 (base32
a6c47905 6486 "0gwvmz6w5ml0bjbgmdiscsv5i948lrjd381z7h9qkz6kr398c3ad"))))
88b47cb0 6487 (build-system python-build-system)
470613f9
LF
6488 (arguments
6489 `(#:phases
6490 (modify-phases %standard-phases
6491 (add-before 'check 'disable-failing-test
6492 (lambda _
6493 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6494 ;; versions of python-cryptography:
6495 ;; https://github.com/pyca/cryptography/issues/3196
6496 ;; TODO: Try re-enabling the test when upgrading
6497 ;; python-cryptography.
6498 (substitute* "tests/hazmat/backends/test_openssl.py"
6499 (("def test_numeric_string_x509_name_entry")
6500 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6501 #t)))))
88b47cb0
RW
6502 (inputs
6503 `(("openssl" ,openssl)))
6504 (propagated-inputs
6505 `(("python-cffi" ,python-cffi)
6506 ("python-six" ,python-six)
6507 ("python-pyasn1" ,python-pyasn1)
88b47cb0
RW
6508 ("python-idna" ,python-idna)
6509 ("python-iso8601" ,python-iso8601)))
6510 (native-inputs
6511 `(("python-cryptography-vectors" ,python-cryptography-vectors)
ce6c13ee 6512 ("python-hypothesis" ,python-hypothesis)
88b47cb0 6513 ("python-pretend" ,python-pretend)
ce6c13ee
EF
6514 ("python-pyasn1" ,python-pyasn1)
6515 ("python-pyasn1-modules" ,python-pyasn1-modules)
912dcbad
MB
6516 ("python-pytz" ,python-pytz)
6517 ("python-pytest" ,python-pytest-2.9.2)))
88b47cb0
RW
6518 (home-page "https://github.com/pyca/cryptography")
6519 (synopsis "Cryptographic recipes and primitives for Python")
6520 (description
6521 "cryptography is a package which provides cryptographic recipes and
6522primitives to Python developers. It aims to be the “cryptographic standard
6523library” for Python. The package includes both high level recipes, and low
6524level interfaces to common cryptographic algorithms such as symmetric ciphers,
6525message digests and key derivation functions.")
6526 ;; Distributed under either BSD-3 or ASL2.0
3f641af0 6527 (license (list license:bsd-3 license:asl2.0))
519e2f4f 6528 (properties `((python2-variant . ,(delay python2-cryptography))))))
88b47cb0
RW
6529
6530(define-public python2-cryptography
519e2f4f
LF
6531 (let ((crypto (package-with-python2
6532 (strip-python2-variant python-cryptography))))
88b47cb0
RW
6533 (package (inherit crypto)
6534 (propagated-inputs
6535 `(("python2-ipaddress" ,python2-ipaddress)
ce6c13ee
EF
6536 ("python2-backport-ssl-match-hostname"
6537 ,python2-backport-ssl-match-hostname)
68f1cdec 6538 ("python2-enum34" ,python2-enum34)
88b47cb0 6539 ,@(package-propagated-inputs crypto))))))
5af999b8
RW
6540
6541(define-public python-pyopenssl
6542 (package
6543 (name "python-pyopenssl")
61684de2 6544 (version "16.2.0")
5af999b8
RW
6545 (source
6546 (origin
6547 (method url-fetch)
eb68d268 6548 (uri (pypi-uri "pyOpenSSL" version))
5af999b8
RW
6549 (sha256
6550 (base32
61684de2 6551 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))))
5af999b8 6552 (build-system python-build-system)
5af999b8
RW
6553 (propagated-inputs
6554 `(("python-cryptography" ,python-cryptography)
6555 ("python-six" ,python-six)))
6556 (inputs
6557 `(("openssl" ,openssl)))
5af999b8
RW
6558 (home-page "https://github.com/pyca/pyopenssl")
6559 (synopsis "Python wrapper module around the OpenSSL library")
6560 (description
6561 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6562library.")
3f641af0 6563 (license license:asl2.0)))
5af999b8
RW
6564
6565(define-public python2-pyopenssl
519e2f4f 6566 (package-with-python2 python-pyopenssl))
643725a1
CR
6567
6568(define-public python-pip
6569 (package
6570 (name "python-pip")
6fb54e3b 6571 (version "8.0.2")
643725a1
CR
6572 (source
6573 (origin
6574 (method url-fetch)
6fb54e3b 6575 (uri (pypi-uri "pip" version))
643725a1
CR
6576 (sha256
6577 (base32
6fb54e3b 6578 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
643725a1 6579 (build-system python-build-system)
05e2e4cf
HG
6580 (native-inputs
6581 `(;; Tests
6582 ("python-virtualenv" ,python-virtualenv)
643725a1
CR
6583 ("python-mock" ,python-mock)
6584 ("python-pytest" ,python-pytest)
6585 ("python-scripttest" ,python-scripttest)))
6586 (home-page "https://pip.pypa.io/")
6587 (synopsis
6588 "Package manager for Python software")
6589 (description
6590 "Pip is a package manager for Python software, that finds packages on the
6591Python Package Index (PyPI).")
6592 (license license:expat)))
6593
6594(define-public python2-pip
6595 (package-with-python2 python-pip))
d8c4998f
LC
6596
6597(define-public python-tlsh
6598 (package
6599 (name "python-tlsh")
99b00dc7 6600 (version "3.4.4")
d8c4998f
LC
6601 (home-page "https://github.com/trendmicro/tlsh")
6602 (source (origin
99b00dc7
EF
6603 (method url-fetch)
6604 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6605 version ".tar.gz"))
d8c4998f
LC
6606 (sha256
6607 (base32
99b00dc7
EF
6608 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6609 (file-name (string-append name "-" version ".tar.gz"))))
d8c4998f
LC
6610 (build-system cmake-build-system)
6611 (arguments
6612 '(#:out-of-source? #f
6613 #:phases (modify-phases %standard-phases
6614 (replace
6615 'install
6616 (lambda* (#:key outputs #:allow-other-keys)
6617 ;; Build and install the Python bindings. The underlying
6618 ;; C++ library is apparently not meant to be installed.
6619 (let ((out (assoc-ref outputs "out")))
6620 (with-directory-excursion "py_ext"
6621 (and (system* "python" "setup.py" "build")
6622 (system* "python" "setup.py" "install"
6623 (string-append "--prefix=" out))))))))))
6624 (inputs `(("python" ,python-wrapper))) ;for the bindings
6625 (synopsis "Fuzzy matching library for Python")
6626 (description
6627 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6628Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6629value which can be used for similarity comparisons. Similar objects have
6630similar hash values, which allows for the detection of similar objects by
6631comparing their hash values. The byte stream should have a sufficient amount
6632of complexity; for example, a byte stream of identical bytes will not generate
6633a hash value.")
3f641af0 6634 (license license:asl2.0)))
d8c4998f
LC
6635
6636(define-public python2-tlsh
6637 (package
6638 (inherit python-tlsh)
6639 (name "python2-tlsh")
6640 (inputs `(("python" ,python-2)))))
d96034ed 6641
67f66812
BW
6642(define-public python-termcolor
6643 (package
6644 (name "python-termcolor")
6645 (version "1.1.0")
6646 (source
6647 (origin
6648 (method url-fetch)
6649 (uri (pypi-uri "python-termcolor" version))
6650 (sha256
6651 (base32
6652 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6653 (build-system python-build-system)
6654 (arguments
6655 ;; There are no tests.
6656 `(#:tests? #f))
6657 (home-page "http://pypi.python.org/pypi/termcolor")
6658 (synopsis "ANSII Color formatting for terminal output")
6659 (description
6660 "This package provides ANSII Color formatting for output in terminals.")
6661 (license license:expat)))
6662
6663(define-public python2-termcolor
6664 (package-with-python2 python-termcolor))
6665
d96034ed
LC
6666(define-public python-libarchive-c
6667 (package
6668 (name "python-libarchive-c")
03fd001c 6669 (version "2.2")
d96034ed
LC
6670 (source (origin
6671 (method url-fetch)
03fd001c 6672 (uri (pypi-uri "libarchive-c" version))
d96034ed
LC
6673 (sha256
6674 (base32
03fd001c 6675 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
d96034ed
LC
6676 (build-system python-build-system)
6677 (arguments
6678 '(#:phases (modify-phases %standard-phases
6679 (add-before
6680 'build 'reference-libarchive
6681 (lambda* (#:key inputs #:allow-other-keys)
6682 ;; Retain the absolute file name of libarchive.so.
6683 (let ((libarchive (assoc-ref inputs "libarchive")))
6684 (substitute* "libarchive/ffi.py"
6685 (("find_library\\('archive'\\)")
6686 (string-append "'" libarchive
b41a05ce 6687 "/lib/libarchive.so'")))))))))
d96034ed 6688 (inputs
f3b98f4f 6689 `(("libarchive" ,libarchive)))
d96034ed
LC
6690 (home-page "https://github.com/Changaco/python-libarchive-c")
6691 (synopsis "Python interface to libarchive")
6692 (description
6693 "This package provides Python bindings to libarchive, a C library to
6694access possibly compressed archives in many different formats. It uses
6695Python's @code{ctypes} foreign function interface (FFI).")
3f641af0 6696 (license license:lgpl2.0+)))
d96034ed
LC
6697
6698(define-public python2-libarchive-c
6699 (package-with-python2 python-libarchive-c))
5e1c9367
LC
6700
6701(define-public python-file
6702 (package
6703 (inherit file)
6704 (name "python-file")
7ffa5d4a
LF
6705 (source (origin
6706 (inherit (package-source file))
6707 ;; This patch should not be applied to python2-file.
6708 (patches (search-patches "python-file-double-encoding-bug.patch"))))
5e1c9367
LC
6709 (build-system python-build-system)
6710 (arguments
6711 '(#:tests? #f ;no tests
00bf74be 6712 #:configure-flags '("--single-version-externally-managed" "--root=/")
5e1c9367
LC
6713 #:phases (modify-phases %standard-phases
6714 (add-before 'build 'change-directory
6715 (lambda _
6716 (chdir "python")
6717 #t))
6718 (add-before 'build 'set-library-file-name
6719 (lambda* (#:key inputs #:allow-other-keys)
6720 (let ((file (assoc-ref inputs "file")))
6721 (substitute* "magic.py"
6722 (("find_library\\('magic'\\)")
6723 (string-append "'" file "/lib/libmagic.so'")))
6724 #t))))))
6725 (inputs `(("file" ,file)))
6726 (self-native-input? #f)
daeeea71
CM
6727 (synopsis "Python bindings to the libmagic file type guesser. Note that
6728this module and the python-magic module both provide a \"magic.py\" file;
6729these two modules, which are different and were developed separately, both
f210e944 6730serve the same purpose: provide Python bindings for libmagic.")))
5e1c9367
LC
6731
6732(define-public python2-file
f210e944 6733 (package-with-python2 python-file))
85d4aeac
LC
6734
6735(define-public python-debian
6736 (package
6737 (name "python-debian")
6738 (version "0.1.23")
6739 (source
6740 (origin
6741 (method url-fetch)
6742 (uri (string-append
6743 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6744 version ".tar.gz"))
6745 (sha256
6746 (base32
6747 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6748 (build-system python-build-system)
f22efa01 6749 (propagated-inputs
85d4aeac 6750 `(("python-six" ,python-six)))
85d4aeac
LC
6751 (home-page "http://packages.debian.org/sid/python-debian")
6752 (synopsis "Debian package related modules")
6753 (description
5c7bdc9a
LC
6754 ;; XXX: Use @enumerate instead of @itemize to work around
6755 ;; <http://bugs.gnu.org/21772>.
85d4aeac
LC
6756 "This package provides Python modules that abstract many formats of
6757Debian-related files, such as:
6758
5c7bdc9a 6759@enumerate
85d4aeac
LC
6760@item Debtags information;
6761@item @file{debian/changelog} files;
6762@item packages files, pdiffs;
6763@item control files of single or multiple RFC822-style paragraphs---e.g.
6764 @file{debian/control}, @file{.changes}, @file{.dsc};
6765@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6766 contained files and meta-information.
5c7bdc9a 6767@end enumerate\n")
85d4aeac
LC
6768
6769 ;; Modules are either GPLv2+ or GPLv3+.
3f641af0 6770 (license license:gpl3+)))
85d4aeac
LC
6771
6772(define-public python2-debian
6773 (package-with-python2 python-debian))
816a6538 6774
2d321bb2
RW
6775(define-public python-nbformat
6776 (package
6777 (name "python-nbformat")
6778 (version "4.1.0")
6779 (source
6780 (origin
6781 (method url-fetch)
6782 (uri (pypi-uri "nbformat" version))
6783 (sha256
6784 (base32
6785 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6786 (build-system python-build-system)
6787 (arguments `(#:tests? #f)) ; no test target
6788 (propagated-inputs
6789 `(("python-ipython-genutils" ,python-ipython-genutils)
6790 ("python-jsonschema" ,python-jsonschema)
6791 ("python-jupyter-core" ,python-jupyter-core)
6792 ("python-traitlets" ,python-traitlets)))
2d321bb2
RW
6793 (home-page "http://jupyter.org")
6794 (synopsis "Jupyter Notebook format")
6795 (description "This package provides the reference implementation of the
6796Jupyter Notebook format and Python APIs for working with notebooks.")
6797 (license license:bsd-3)))
6798
6799(define-public python2-nbformat
6800 (package-with-python2 python-nbformat))
6801
55436048
RW
6802(define-public python-bleach
6803 (package
6804 (name "python-bleach")
6805 (version "1.4.3")
6806 (source
6807 (origin
6808 (method url-fetch)
6809 (uri (pypi-uri "bleach" version))
6810 (sha256
6811 (base32
6812 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6813 (build-system python-build-system)
6814 (propagated-inputs
6815 `(("python-html5lib" ,python-html5lib-0.9)
55436048
RW
6816 ("python-six" ,python-six)))
6817 (native-inputs
6818 `(("python-nose" ,python-nose)))
6819 (home-page "http://github.com/jsocol/bleach")
6820 (synopsis "Whitelist-based HTML-sanitizing tool")
6821 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6822 (license license:asl2.0)))
6823
6824(define-public python2-bleach
6825 (package-with-python2 python-bleach))
6826
60590a3a
RW
6827(define-public python-entrypoints
6828 (package
6829 (name "python-entrypoints")
6830 (version "0.2.2")
6831 (source
6832 (origin
6833 (method url-fetch)
6834 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6835 version ".tar.gz"))
6836 (file-name (string-append name "-" version ".tar.gz"))
6837 (sha256
6838 (base32
6839 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6840 (build-system python-build-system)
6841 ;; The package does not come with a setup.py file, so we have to generate
6842 ;; one ourselves.
6843 (arguments
6844 `(#:tests? #f
6845 #:phases
6846 (modify-phases %standard-phases
6847 (add-after 'unpack 'create-setup.py
6848 (lambda _
6849 (call-with-output-file "setup.py"
6850 (lambda (port)
6851 (format port "\
6852from setuptools import setup
6853setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6854" ,version))))))))
6855 (home-page "https://github.com/takluyver/entrypoints")
6856 (synopsis "Discover and load entry points from installed Python packages")
6857 (description "Entry points are a way for Python packages to advertise
6858objects with some common interface. The most common examples are
6859@code{console_scripts} entry points, which define shell commands by
6860identifying a Python function to run. The @code{entrypoints} module contains
6861functions to find and load entry points.")
6862 (license license:expat)))
6863
6864(define-public python2-entrypoints
6865 (package-with-python2 python-entrypoints))
6866
c60898a8
RW
6867(define-public python-nbconvert
6868 (package
6869 (name "python-nbconvert")
6870 (version "5.0.0b1")
6871 (source
6872 (origin
6873 (method url-fetch)
6874 (uri (pypi-uri "nbconvert" version))
6875 (sha256
6876 (base32
6877 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6878 (build-system python-build-system)
6879 ;; The "bdist_egg" target is disabled by default, causing the installation
6880 ;; to fail.
6881 (arguments `(#:configure-flags (list "bdist_egg")))
6882 (propagated-inputs
6883 `(("python-bleach" ,python-bleach)
6884 ("python-entrypoints" ,python-entrypoints)
6885 ("python-jinja2" ,python-jinja2)
6886 ("python-jupyter-core" ,python-jupyter-core)
6887 ("python-mistune" ,python-mistune)
6888 ("python-nbformat" ,python-nbformat)
6889 ("python-pygments" ,python-pygments)
c60898a8
RW
6890 ("python-traitlets" ,python-traitlets)))
6891 (home-page "http://jupyter.org")
6892 (synopsis "Converting Jupyter Notebooks")
6893 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6894notebooks to various other formats via Jinja templates. It allows you to
6895convert an @code{.ipynb} notebook file into various static formats including:
6896
6897@enumerate
6898@item HTML
6899@item LaTeX
6900@item PDF
6901@item Reveal JS
6902@item Markdown (md)
6903@item ReStructured Text (rst)
6904@item executable script
6905@end enumerate\n")
6906 (license license:bsd-3)))
6907
6908(define-public python2-nbconvert
6909 (package-with-python2 python-nbconvert))
6910
a0d62280
RW
6911(define-public python-notebook
6912 (package
6913 (name "python-notebook")
6914 (version "4.2.3")
6915 (source (origin
6916 (method url-fetch)
6917 (uri (pypi-uri "notebook" version))
6918 (sha256
6919 (base32
6920 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6921 (build-system python-build-system)
6922 (arguments
6923 `(#:phases
6924 (modify-phases %standard-phases
6925 (replace 'check
6926 (lambda _
6927 ;; HOME must be set for tests
6928 (setenv "HOME" "/tmp")
6929 (zero? (system* "nosetests")))))))
6930 (propagated-inputs
6931 `(("python-jupyter-core" ,python-jupyter-core)
6932 ("python-nbformat" ,python-nbformat)
6933 ("python-nbconvert" ,python-nbconvert)
6934 ("python-ipython" ,python-ipython)))
6935 (native-inputs
6936 `(("python-nose" ,python-nose)
6937 ("python-sphinx" ,python-sphinx)
6938 ("python-requests" ,python-requests)))
6939 (home-page "http://jupyter.org/")
6940 (synopsis "Web-based notebook environment for interactive computing")
6941 (description
6942 "The Jupyter HTML notebook is a web-based notebook environment for
6943interactive computing.")
3a735ecf 6944 (properties `((python2-variant . ,(delay python2-notebook))))
a0d62280
RW
6945 (license license:bsd-3)))
6946
6947(define-public python2-notebook
3a735ecf
HG
6948 (let ((base (package-with-python2
6949 (strip-python2-variant python-notebook))))
6950 (package (inherit base)
6951 (native-inputs
6952 `(("python2-mock" ,python2-mock)
6953 ,@(package-native-inputs base)))
6954 (arguments
6955 (substitute-keyword-arguments (package-arguments base)
6956 ((#:phases phases)
6957 `(modify-phases ,phases
6958 (add-before 'check 'disable-test-case
6959 ;; The test requires network access to localhost. Curiously it
6960 ;; fails with Python 2 only. Simply make the test-case return
6961 ;; immediately.
6962 (lambda _
6963 (substitute*
6964 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6965 (("formats = self.nbconvert_api") "return #")))))))))))
a0d62280 6966
d55724ed
RW
6967(define-public python-widgetsnbextension
6968 (package
6969 (name "python-widgetsnbextension")
6970 (version "1.2.6")
6971 (source
6972 (origin
6973 (method url-fetch)
6974 (uri (pypi-uri "widgetsnbextension" version))
6975 (sha256
6976 (base32
6977 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6978 (build-system python-build-system)
6979 (propagated-inputs
6980 `(("python-notebook" ,python-notebook)))
6981 (native-inputs
f3b98f4f 6982 `(("python-nose" ,python-nose)))
d55724ed
RW
6983 (home-page "http://ipython.org")
6984 (synopsis "IPython HTML widgets for Jupyter")
6985 (description "This package provides interactive HTML widgets for Jupyter
6986notebooks.")
6987 (license license:bsd-3)))
6988
6989(define-public python2-widgetsnbextension
6990 (package-with-python2 python-widgetsnbextension))
6991
4fe2e344
RW
6992(define-public python-ipywidgets
6993 (package
6994 (name "python-ipywidgets")
6995 (version "5.2.2")
6996 (source
6997 (origin
6998 (method url-fetch)
6999 (uri (pypi-uri "ipywidgets" version))
7000 (sha256
7001 (base32
7002 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7003 (build-system python-build-system)
7004 ;; FIXME: it's not clear how to run the tests.
7005 (arguments `(#:tests? #f))
7006 (propagated-inputs
7007 `(("python-ipykernel" ,python-ipykernel)
7008 ("python-ipython" ,python-ipython)
4fe2e344
RW
7009 ("python-traitlets" ,python-traitlets)
7010 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7011 (home-page "http://ipython.org")
7012 (synopsis "IPython HTML widgets for Jupyter")
7013 (description "Ipywidgets are interactive HTML widgets for Jupyter
7014notebooks and the IPython kernel. Notebooks come alive when interactive
7015widgets are used. Users gain control of their data and can visualize changes
7016in the data.")
7017 (license license:bsd-3)))
7018
7019(define-public python2-ipywidgets
7020 (package-with-python2 python-ipywidgets))
7021
8ceebf8f
RW
7022(define-public python-jupyter-console
7023 (package
7024 (name "python-jupyter-console")
7025 (version "5.0.0")
7026 (source
7027 (origin
7028 (method url-fetch)
7029 (uri (pypi-uri "jupyter_console" version))
7030 (sha256
7031 (base32
7032 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7033 (build-system python-build-system)
7034 ;; FIXME: it's not clear how to run the tests.
7035 (arguments `(#:tests? #f))
7036 (propagated-inputs
7037 `(("python-ipykernel" ,python-ipykernel)
7038 ("python-ipython" ,python-ipython)
7039 ("python-jupyter-client" ,python-jupyter-client)
7040 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 7041 ("python-pygments" ,python-pygments)))
8ceebf8f
RW
7042 (home-page "https://jupyter.org")
7043 (synopsis "Jupyter terminal console")
7044 (description "This package provides a terminal-based console frontend for
7045Jupyter kernels. It also allows for console-based interaction with non-Python
7046Jupyter kernels such as IJulia and IRKernel.")
7047 (license license:bsd-3)))
7048
7049(define-public python2-jupyter-console
7050 (package-with-python2 python-jupyter-console))
7051
c27ae827
RW
7052(define-public jupyter
7053 (package
7054 (name "jupyter")
7055 (version "1.0.0")
7056 (source
7057 (origin
7058 (method url-fetch)
7059 (uri (pypi-uri "jupyter" version))
7060 (sha256
7061 (base32
7062 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7063 (build-system python-build-system)
7064 ;; FIXME: it's not clear how to run the tests.
7065 (arguments `(#:tests? #f))
7066 (propagated-inputs
7067 `(("python-ipykernel" ,python-ipykernel)
7068 ("python-ipywidgets" ,python-ipywidgets)
7069 ("python-jupyter-console" ,python-jupyter-console)
7070 ("python-nbconvert" ,python-nbconvert)
f3b98f4f 7071 ("python-notebook" ,python-notebook)))
c27ae827
RW
7072 (home-page "http://jupyter.org")
7073 (synopsis "Web application for interactive documents")
7074 (description
7075 "The Jupyter Notebook is a web application that allows you to create and
7076share documents that contain live code, equations, visualizations and
7077explanatory text. Uses include: data cleaning and transformation, numerical
7078simulation, statistical modeling, machine learning and much more.")
7079 (license license:bsd-3)))
7080
816a6538
LC
7081(define-public python-chardet
7082 (package
7083 (name "python-chardet")
7084 (version "2.3.0")
7085 (source
7086 (origin
7087 (method url-fetch)
7088 (uri (string-append
7089 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7090 version
7091 ".tar.gz"))
7092 (sha256
7093 (base32
7094 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7095 (build-system python-build-system)
816a6538
LC
7096 (home-page "https://github.com/chardet/chardet")
7097 (synopsis "Universal encoding detector for Python 2 and 3")
7098 (description
7099 "This package provides @code{chardet}, a Python module that can
7100automatically detect a wide range of file encodings.")
3f641af0 7101 (license license:lgpl2.1+)))
816a6538
LC
7102
7103(define-public python2-chardet
7104 (package-with-python2 python-chardet))
2fc5f186 7105
1872f1bb
KM
7106(define-public python-docopt
7107 (package
7108 (name "python-docopt")
7109 (version "0.6.2")
7110 (source
7111 (origin
7112 (method url-fetch)
7113 ;; The release on PyPI does not include tests.
7114 (uri (string-append
7115 "https://github.com/docopt/docopt/archive/"
7116 version ".tar.gz"))
7117 (file-name (string-append name "-" version ".tar.gz"))
7118 (sha256
7119 (base32
7120 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7121 (build-system python-build-system)
7122 (native-inputs
f3b98f4f 7123 `(("python-pytest" ,python-pytest)))
1872f1bb
KM
7124 (arguments
7125 `(#:phases (alist-replace
7126 'check
7127 (lambda _ (zero? (system* "py.test")))
7128 %standard-phases)))
7129 (home-page "http://docopt.org")
7130 (synopsis "Command-line interface description language for Python")
7131 (description "This library allows the user to define a command-line
7132interface from a program's help message rather than specifying it
7133programatically with command-line parsers like @code{getopt} and
7134@code{argparse}.")
7135 (license license:expat)))
7136
7137(define-public python2-docopt
7138 (package-with-python2 python-docopt))
7139
2fc5f186
LF
7140(define-public python-zope-event
7141 (package
7142 (name "python-zope-event")
7143 (version "4.1.0")
7144 (source
7145 (origin
7146 (method url-fetch)
7147 (uri (string-append "https://pypi.python.org/packages/source/z"
7148 "/zope.event/zope.event-" version ".tar.gz"))
7149 (sha256
7150 (base32
7151 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7152 (build-system python-build-system)
2fc5f186
LF
7153 (home-page "http://pypi.python.org/pypi/zope.event")
7154 (synopsis "Event publishing system for Python")
7155 (description "Zope.event provides an event publishing API, intended for
7156use by applications which are unaware of any subscribers to their events. It
7157is a simple event-dispatching system on which more sophisticated event
7158dispatching systems can be built.")
3f641af0 7159 (license license:zpl2.1)))
2fc5f186
LF
7160
7161(define-public python2-zope-event
7162 (package-with-python2 python-zope-event))
97abe268
LF
7163
7164(define-public python-zope-interface
7165 (package
7166 (name "python-zope-interface")
7167 (version "4.1.3")
7168 (source
7169 (origin
7170 (method url-fetch)
7171 (uri (string-append "https://pypi.python.org/packages/source/z"
7172 "/zope.interface/zope.interface-" version ".tar.gz"))
7173 (sha256
7174 (base32
7175 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7176 (build-system python-build-system)
38d480a8 7177 (native-inputs
97abe268
LF
7178 `(("python-zope-event" ,python-zope-event)))
7179 (home-page "https://github.com/zopefoundation/zope.interface")
7180 (synopsis "Python implementation of the \"design by contract\"
7181methodology")
7182 (description "Zope.interface provides an implementation of \"object
7183interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7184conforming to a given API or contract.")
3f641af0 7185 (license license:zpl2.1)))
97abe268
LF
7186
7187(define-public python2-zope-interface
7188 (package-with-python2 python-zope-interface))
81f2373c
LF
7189
7190(define-public python-zope-exceptions
7191 (package
7192 (name "python-zope-exceptions")
7193 (version "4.0.8")
7194 (source
7195 (origin
7196 (method url-fetch)
7197 (uri (string-append "https://pypi.python.org/packages/source/z"
7198 "/zope.exceptions/zope.exceptions-"
7199 version ".tar.gz"))
7200 (sha256
7201 (base32
7202 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7203 (build-system python-build-system)
7204 (arguments
7205 '(#:tests? #f)) ; circular dependency with zope.testrunner
7206 (propagated-inputs
7207 `(("python-zope-interface" ,python-zope-interface)))
7208 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7209 (synopsis "Zope exceptions")
7210 (description "Zope.exceptions provides general-purpose exception types
7211that have uses outside of the Zope framework.")
3f641af0 7212 (license license:zpl2.1)))
81f2373c
LF
7213
7214(define-public python2-zope-exceptions
7215 (package-with-python2 python-zope-exceptions))
900e3c0e
LF
7216
7217(define-public python-zope-testing
7218 (package
7219 (name "python-zope-testing")
7220 (version "4.5.0")
7221 (source
7222 (origin
7223 (method url-fetch)
7224 (uri (string-append "https://pypi.python.org/packages/source/z"
7225 "/zope.testing/zope.testing-" version ".tar.gz"))
7226 (sha256
7227 (base32
b02f7a21
HG
7228 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7229 (modules '((guix build utils)))
7230 (snippet
7231 '(begin
7232 ;; Remove pre-compiled .pyc files backup files from source.
7233 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7234 #t))))
900e3c0e
LF
7235 (build-system python-build-system)
7236 (native-inputs
7237 `(("python-zope-exceptions" ,python-zope-exceptions)))
7238 (propagated-inputs
7239 `(("python-zope-interface" ,python-zope-interface)))
7240 (home-page "http://pypi.python.org/pypi/zope.testing")
7241 (synopsis "Zope testing helpers")
7242 (description "Zope.testing provides a number of testing utilities for HTML
7243forms, HTTP servers, regular expressions, and more.")
3f641af0 7244 (license license:zpl2.1)))
900e3c0e
LF
7245
7246(define-public python2-zope-testing
7247 (package-with-python2 python-zope-testing))
01614c4f
LF
7248
7249(define-public python-zope-testrunner
7250 (package
7251 (name "python-zope-testrunner")
7252 (version "4.4.9")
7253 (source
7254 (origin
7255 (method url-fetch)
7256 (uri (string-append "https://pypi.python.org/packages/source/z"
7257 "/zope.testrunner/zope.testrunner-"
7258 version ".zip"))
7259 (sha256
7260 (base32
7261 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7262 (build-system python-build-system)
7263 (native-inputs
7264 `(("python-six" ,python-six)
e408ffc3 7265 ;("python-zope-interface" ,python-zope-interface)
01614c4f
LF
7266 ("python-zope-exceptions" ,python-zope-exceptions)
7267 ("python-zope-testing" ,python-zope-testing)
7268 ("unzip" ,unzip)))
7269 (propagated-inputs
7270 `(("python-zope-interface" ,python-zope-interface)))
7271 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7272 (synopsis "Zope testrunner script")
7273 (description "Zope.testrunner provides a script for running Python
7274tests.")
3f641af0 7275 (license license:zpl2.1)))
01614c4f
LF
7276
7277(define-public python2-zope-testrunner
7278 (let ((base (package-with-python2 python-zope-testrunner)))
7279 (package
7280 (inherit base)
7281 (native-inputs
7282 (append (package-native-inputs base)
7283 `(("python2-subunit" ,python2-subunit)
7284 ("python2-mimeparse" ,python2-mimeparse)))))))
6a5c710c
LF
7285
7286(define-public python-zope-i18nmessageid
7287 (package
7288 (name "python-zope-i18nmessageid")
7289 (version "4.0.3")
7290 (source
7291 (origin
7292 (method url-fetch)
7293 (uri (string-append
7294 "https://pypi.python.org/packages/source/z"
7295 "/zope.i18nmessageid/zope.i18nmessageid-"
7296 version ".tar.gz"))
7297 (sha256
7298 (base32
7299 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7300 (build-system python-build-system)
6a5c710c
LF
7301 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7302 (synopsis "Message identifiers for internationalization")
7303 (description "Zope.i18nmessageid provides facilities for declaring
7304internationalized messages within program source text.")
3f641af0 7305 (license license:zpl2.1)))
6a5c710c
LF
7306
7307(define-public python2-zope-i18nmessageid
7308 (package-with-python2 python-zope-i18nmessageid))
71fb09f3
LF
7309
7310(define-public python-zope-schema
7311 (package
7312 (name "python-zope-schema")
7313 (version "4.4.2")
7314 (source
7315 (origin
7316 (method url-fetch)
7317 (uri (string-append "https://pypi.python.org/packages/source/z"
7318 "/zope.schema/zope.schema-" version ".tar.gz"))
7319 (sha256
7320 (base32
7321 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7322 (build-system python-build-system)
7323 (propagated-inputs
7324 `(("python-zope-event" ,python-zope-event)
7325 ("python-zope-interface" ,python-zope-interface)))
7326 (native-inputs
47f77210
HG
7327 `(("python-zope-testing" ,python-zope-testing)
7328 ("python-coverage" ,python-coverage)
7329 ("python-nose" ,python-nose)))
71fb09f3
LF
7330 (home-page "http://pypi.python.org/pypi/zope.schema")
7331 (synopsis "Zope data schemas")
7332 (description "Zope.scheme provides extensions to zope.interface for
7333defining data schemas.")
3f641af0 7334 (license license:zpl2.1)))
71fb09f3
LF
7335
7336(define-public python2-zope-schema
7337 (package-with-python2 python-zope-schema))
fbac9b17
LF
7338
7339(define-public python-zope-configuration
7340 (package
7341 (name "python-zope-configuration")
7342 (version "4.0.3")
7343 (source (origin
7344 (method url-fetch)
7345 (uri (string-append "https://pypi.python.org/packages/source/z"
7346 "/zope.configuration/zope.configuration-"
7347 version ".tar.gz"))
7348 (sha256
7349 (base32
7350 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7351 (build-system python-build-system)
7352 (propagated-inputs
7353 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7354 ("python-zope-schema" ,python-zope-schema)))
7355 (home-page "http://pypi.python.org/pypi/zope.configuration")
7356 (synopsis "Zope Configuration Markup Language")
7357 (description "Zope.configuration implements ZCML, the Zope Configuration
7358Markup Language.")
3f641af0 7359 (license license:zpl2.1)))
fbac9b17
LF
7360
7361(define-public python2-zope-configuration
7362 (package-with-python2 python-zope-configuration))
2ad52086
LF
7363
7364(define-public python-zope-proxy
7365 (package
7366 (name "python-zope-proxy")
7367 (version "4.1.6")
7368 (source
7369 (origin
7370 (method url-fetch)
7371 (uri (string-append "https://pypi.python.org/packages/source/z"
7372 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7373 (sha256
7374 (base32
7375 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7376 (build-system python-build-system)
7377 (propagated-inputs
7378 `(("python-zope-interface" ,python-zope-interface)))
7379 (home-page "http://pypi.python.org/pypi/zope.proxy")
7380 (synopsis "Generic, transparent proxies")
7381 (description "Zope.proxy provides generic, transparent proxies for Python.
7382Proxies are special objects which serve as mostly-transparent wrappers around
7383another object, intervening in the apparent behavior of the wrapped object
7384only when necessary to apply the policy (e.g., access checking, location
7385brokering, etc.) for which the proxy is responsible.")
3f641af0 7386 (license license:zpl2.1)))
2ad52086
LF
7387
7388(define-public python2-zope-proxy
7389 (package-with-python2 python-zope-proxy))
f404b5ea
LF
7390
7391(define-public python-zope-location
7392 (package
7393 (name "python-zope-location")
7394 (version "4.0.3")
7395 (source
7396 (origin
7397 (method url-fetch)
7398 (uri (string-append "https://pypi.python.org/packages/source/z"
7399 "/zope.location/zope.location-" version ".tar.gz"))
7400 (sha256
7401 (base32
7402 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7403 (build-system python-build-system)
d27f176a 7404 (propagated-inputs
f404b5ea
LF
7405 `(("python-zope-proxy" ,python-zope-proxy)
7406 ("python-zope-schema" ,python-zope-schema)))
7407 (home-page "http://pypi.python.org/pypi/zope.location/")
7408 (synopsis "Zope location library")
7409 (description "Zope.location implements the concept of \"locations\" in
7410Zope3, which are are special objects that have a structural location.")
3f641af0 7411 (license license:zpl2.1)))
f404b5ea
LF
7412
7413(define-public python2-zope-location
7414 (package-with-python2 python-zope-location))
d4b77f36
LF
7415
7416(define-public python-zope-security
7417 (package
7418 (name "python-zope-security")
7419 (version "4.0.3")
7420 (source
7421 (origin
7422 (method url-fetch)
7423 (uri (string-append "https://pypi.python.org/packages/source/z"
7424 "/zope.security/zope.security-" version ".tar.gz"))
7425 (sha256
7426 (base32
7427 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7428 (build-system python-build-system)
7429 (propagated-inputs
7430 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
d4b77f36 7431 ("python-zope-proxy" ,python-zope-proxy)
fd8e23b7
HG
7432 ("python-zope-schema" ,python-zope-schema)))
7433 (native-inputs
7434 `(("python-zope-component" ,python-zope-component)
7435 ("python-zope-configuration" ,python-zope-configuration)
7436 ("python-zope-location" ,python-zope-location)
d4b77f36
LF
7437 ("python-zope-testrunner" ,python-zope-testrunner)
7438 ("python-zope-testing" ,python-zope-testing)))
7439 (home-page "http://pypi.python.org/pypi/zope.security")
7440 (synopsis "Zope security framework")
7441 (description "Zope.security provides a generic mechanism to implement
7442security policies on Python objects.")
3f641af0 7443 (license license:zpl2.1)))
d4b77f36
LF
7444
7445(define-public python2-zope-security
04417662
EF
7446 (let ((zope-security (package-with-python2 python-zope-security)))
7447 (package (inherit zope-security)
7448 (propagated-inputs
7449 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7450 ,@(alist-delete
7451 "python-zope-testrunner"
7452 (package-propagated-inputs zope-security)))))))
a6b61b27
LF
7453
7454(define-public python-zope-component
7455 (package
7456 (name "python-zope-component")
7457 (version "4.2.2")
7458 (source
7459 (origin
7460 (method url-fetch)
7461 (uri (string-append "https://pypi.python.org/packages/source/z"
7462 "/zope.component/zope.component-" version ".tar.gz"))
7463 (sha256
7464 (base32
7465 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7466 (build-system python-build-system)
7467 (arguments
7468 ;; Skip tests due to circular dependency with python-zope-security.
7469 '(#:tests? #f))
7470 (native-inputs
7471 `(("python-zope-testing" ,python-zope-testing)))
7472 (propagated-inputs
7473 `(("python-zope-event" ,python-zope-event)
7474 ("python-zope-interface" ,python-zope-interface)
7475 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7476 ("python-zope-configuration" ,python-zope-configuration)))
7477 (home-page "https://github.com/zopefoundation/zope.component")
7478 (synopsis "Zope Component Architecture")
7479 (description "Zope.component represents the core of the Zope Component
7480Architecture. Together with the zope.interface package, it provides
7481facilities for defining, registering and looking up components.")
3f641af0 7482 (license license:zpl2.1)))
a6b61b27
LF
7483
7484(define-public python2-zope-component
7485 (package-with-python2 python-zope-component))
3859ac12 7486
1ae44b80 7487(define-public python-pythondialog
b5f218be 7488 (package
1ae44b80 7489 (name "python-pythondialog")
42c4b246 7490 (version "3.4.0")
b5f218be
LF
7491 (source
7492 (origin
7493 (method url-fetch)
1ae44b80 7494 (uri (pypi-uri "pythondialog" version))
b5f218be
LF
7495 (sha256
7496 (base32
1ae44b80 7497 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
b5f218be
LF
7498 (build-system python-build-system)
7499 (arguments
7500 `(#:phases
7501 (modify-phases %standard-phases
7502 (add-after 'unpack 'patch-path
7503 (lambda* (#:key inputs #:allow-other-keys)
7504 (let* ((dialog (assoc-ref inputs "dialog")))
7505 ;; Since this library really wants to grovel the search path, we
7506 ;; must hardcode dialog's store path into it.
7507 (substitute* "dialog.py"
7508 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7509 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7510 #t))))
b5f218be
LF
7511 #:tests? #f)) ; no test suite
7512 (propagated-inputs
7513 `(("dialog" ,dialog)))
7514 (home-page "http://pythondialog.sourceforge.net/")
7515 (synopsis "Python interface to the UNIX dialog utility")
7516 (description "A Python wrapper for the dialog utility. Its purpose is to
7517provide an easy to use, pythonic and comprehensive Python interface to dialog.
7518This allows one to make simple text-mode user interfaces on Unix-like systems")
3f641af0 7519 (license license:lgpl2.1)
1ae44b80
LF
7520 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7521
7522(define-public python2-pythondialog
7523 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7524 (package
7525 (inherit base)
7526 (version (package-version python-pythondialog))
7527 (source (origin
7528 (method url-fetch)
7529 (uri (pypi-uri "python2-pythondialog" version))
7530 (sha256
7531 (base32
7532 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
b5f218be 7533
3859ac12
LF
7534(define-public python-pyrfc3339
7535 (package
7536 (name "python-pyrfc3339")
d9aa097b 7537 (version "1.0")
3859ac12
LF
7538 (source
7539 (origin
7540 (method url-fetch)
d9aa097b 7541 (uri (pypi-uri "pyRFC3339" version))
3859ac12
LF
7542 (sha256
7543 (base32
d9aa097b 7544 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
3859ac12
LF
7545 (build-system python-build-system)
7546 (propagated-inputs
7547 `(("python-pytz" ,python-pytz)))
7548 (native-inputs
f3b98f4f 7549 `(("python-nose" ,python-nose)))
3859ac12
LF
7550 (home-page "https://github.com/kurtraschke/pyRFC3339")
7551 (synopsis "Python timestamp library")
7552 (description "Python library for generating and parsing RFC 3339-compliant
7553timestamps.")
7554 (license license:expat)))
7555
7556(define-public python2-pyrfc3339
7557 (package-with-python2 python-pyrfc3339))
5eea2005
LF
7558
7559(define-public python-werkzeug
7560 (package
7561 (name "python-werkzeug")
0580e383 7562 (version "0.11.11")
5eea2005
LF
7563 (source
7564 (origin
7565 (method url-fetch)
4b47cbfa 7566 (uri (pypi-uri "Werkzeug" version))
5eea2005
LF
7567 (sha256
7568 (base32
0580e383 7569 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
5eea2005
LF
7570 (build-system python-build-system)
7571 (native-inputs
7572 `(("python-pytest" ,python-pytest)))
7573 (home-page "http://werkzeug.pocoo.org/")
7574 (synopsis "Utilities for WSGI applications")
7575 (description "One of the most advanced WSGI utility modules. It includes a
7576powerful debugger, full-featured request and response objects, HTTP utilities to
7577handle entity tags, cache control headers, HTTP dates, cookie handling, file
7578uploads, a powerful URL routing system and a bunch of community-contributed
7579addon modules.")
3f641af0 7580 (license license:x11)))
5eea2005
LF
7581
7582(define-public python2-werkzeug
7583 (package-with-python2 python-werkzeug))
99fffa8a
LF
7584
7585(define-public python-configobj
7586 (package
7587 (name "python-configobj")
7588 (version "5.0.6")
7589 (source (origin
7590 (method url-fetch)
7591 (uri (string-append
7592 "https://pypi.python.org/packages/source/c/configobj/"
7593 "configobj-" version ".tar.gz"))
7594 (sha256
7595 (base32
7596 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7597 ;; Patch setup.py so it looks for python-setuptools, which is
7598 ;; required to parse the keyword 'install_requires' in setup.py.
fc1adab1 7599 (patches (search-patches "python-configobj-setuptools.patch"))))
99fffa8a 7600 (build-system python-build-system)
861f70c9 7601 (propagated-inputs
f3b98f4f 7602 `(("python-six" ,python-six)))
99fffa8a
LF
7603 (synopsis "Config file reading, writing and validation")
7604 (description "ConfigObj is a simple but powerful config file reader and
7605writer: an ini file round tripper. Its main feature is that it is very easy to
7606use, with a straightforward programmer’s interface and a simple syntax for
7607config files.")
7608 (home-page "https://github.com/DiffSK/configobj")
3f641af0 7609 (license license:bsd-3)))
99fffa8a
LF
7610
7611(define-public python2-configobj
7612 (package-with-python2 python-configobj))
79e8a291
LF
7613
7614(define-public python-configargparse
7615 (package
7616 (name "python-configargparse")
7617 (version "0.10.0")
7618 (source (origin
7619 (method url-fetch)
7620 (uri (string-append
7621 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7622 "ConfigArgParse-" version ".tar.gz"))
7623 (sha256
7624 (base32
7625 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7626 (build-system python-build-system)
7627 (arguments
7628 ;; FIXME: Bug in test suite filed upstream:
7629 ;; https://github.com/bw2/ConfigArgParse/issues/32
7630 '(#:tests? #f))
7631 (synopsis "Replacement for argparse")
7632 (description "A drop-in replacement for argparse that allows options to also
7633be set via config files and/or environment variables.")
7634 (home-page "https://github.com/bw2/ConfigArgParse")
7635 (license license:expat)))
7636
7637(define-public python2-configargparse
7638 (package-with-python2 python-configargparse))
ab41f979
LF
7639
7640(define-public python-ndg-httpsclient
7641 (package
7642 (name "python-ndg-httpsclient")
7643 (version "0.4.0")
7644 (source (origin
7645 (method url-fetch)
7646 (uri (string-append
7647 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7648 "ndg_httpsclient-" version ".tar.gz"))
7649 (sha256
7650 (base32
7651 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7652 (build-system python-build-system)
a39cc016
LF
7653 (arguments
7654 '(;; The tests appear to require networking.
7655 #:tests? #f))
ab41f979
LF
7656 (propagated-inputs
7657 `(("python-pyopenssl" ,python-pyopenssl)))
7658 (synopsis "HTTPS support for Python's httplib and urllib2")
7659 (description "This is a HTTPS client implementation for httplib and urllib2
7660based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7661over the default provided with Python and importantly enables full verification
7662of the SSL peer.")
7663 (home-page "https://github.com/cedadev/ndg_httpsclient/")
3f641af0 7664 (license license:bsd-3)))
ab41f979
LF
7665
7666;; python2-openssl requires special care, so package-with-python2 is
7667;; insufficient.
7668(define-public python2-ndg-httpsclient
7669 (package (inherit python-ndg-httpsclient)
7670 (name "python2-ndg-httpsclient")
7671 (arguments `(#:python ,python-2))
7672 (propagated-inputs
7673 `(("python2-pyopenssl" ,python2-pyopenssl)))))
03f964a5
CM
7674
7675(define-public python-contextlib2
7676 (package
7677 (name "python-contextlib2")
7678 (version "0.4.0")
7679 (source
7680 (origin
7681 (method url-fetch)
7682 (uri (pypi-uri "contextlib2" version))
7683 (sha256
7684 (base32
7685 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7686 (build-system python-build-system)
7687 (arguments
7688 `(#:phases
7689 (modify-phases %standard-phases
7690 (replace 'check
7691 (lambda _ (zero?
7692 (system*
b3546174 7693 "python" "test_contextlib2.py" "-v")))))))
03f964a5
CM
7694 (home-page "http://contextlib2.readthedocs.org/")
7695 (synopsis "Tools for decorators and context managers")
7696 (description "This module is primarily a backport of the Python
76973.2 contextlib to earlier Python versions. Like contextlib, it
7698provides utilities for common tasks involving decorators and context
7699managers. It also contains additional features that are not part of
7700the standard library.")
3f641af0 7701 (license license:psfl)))
03f964a5
CM
7702
7703(define-public python2-contextlib2
7704 (package-with-python2 python-contextlib2))
210bf497
DT
7705
7706(define-public python-texttable
7707 (package
7708 (name "python-texttable")
7709 (version "0.8.4")
7710 (source
7711 (origin
7712 (method url-fetch)
7713 (uri (pypi-uri "texttable" version))
7714 (sha256
7715 (base32
7716 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7717 (build-system python-build-system)
7718 (arguments '(#:tests? #f)) ; no tests
7719 (home-page "https://github.com/foutaise/texttable/")
7720 (synopsis "Python module for creating simple ASCII tables")
7721 (description "Texttable is a Python module for creating simple ASCII
7722tables.")
3f641af0 7723 (license license:lgpl2.1+)))
210bf497
DT
7724
7725(define-public python2-texttable
7726 (package-with-python2 python-texttable))
67c52bb3
DT
7727
7728(define-public python-websocket-client
7729 (package
7730 (name "python-websocket-client")
6b810897 7731 (version "0.37.0")
67c52bb3
DT
7732 (source
7733 (origin
7734 (method url-fetch)
6b810897 7735 (uri (pypi-uri "websocket_client" version))
67c52bb3
DT
7736 (sha256
7737 (base32
6b810897 7738 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
67c52bb3 7739 (build-system python-build-system)
a5333f7c
HG
7740 (propagated-inputs
7741 `(("python-six" ,python-six)))
67c52bb3
DT
7742 (home-page "https://github.com/liris/websocket-client")
7743 (synopsis "WebSocket client for Python")
7744 (description "The Websocket-client module provides the low level APIs for
7745WebSocket usage in Python programs.")
3f641af0 7746 (license license:lgpl2.1+)))
67c52bb3
DT
7747
7748(define-public python2-websocket-client
7749 (package-with-python2 python-websocket-client))
5c6eea2a
LF
7750
7751(define-public python-atomicwrites
7752 (package
7753 (name "python-atomicwrites")
4e92d76a 7754 (version "1.1.0")
5c6eea2a
LF
7755 (source (origin
7756 (method url-fetch)
7757 (uri (pypi-uri "atomicwrites" version))
7758 (sha256
7759 (base32
4e92d76a 7760 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
5c6eea2a
LF
7761 (build-system python-build-system)
7762 (synopsis "Atomic file writes in Python")
7763 (description "Library for atomic file writes using platform dependent tools
8f65585b 7764for atomic file system operations.")
5c6eea2a 7765 (home-page "https://github.com/untitaker/python-atomicwrites")
f210e944 7766 (license license:expat)))
9bb6d184
LF
7767
7768(define-public python2-atomicwrites
f210e944 7769 (package-with-python2 python-atomicwrites))
561bb3cb
LF
7770
7771(define-public python-requests-toolbelt
7772 (package
7773 (name "python-requests-toolbelt")
c02af1c8 7774 (version "0.6.2")
561bb3cb
LF
7775 (source (origin
7776 (method url-fetch)
c02af1c8
LF
7777 (uri (string-append
7778 "https://pypi.python.org/packages/"
7779 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7780 "requests-toolbelt-" version ".tar.gz"))
561bb3cb
LF
7781 (sha256
7782 (base32
c02af1c8 7783 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
561bb3cb 7784 (build-system python-build-system)
759aadd4
LF
7785 (native-inputs
7786 `(("python-betamax" ,python-betamax)
7787 ("python-mock" ,python-mock)
7788 ("python-pytest" ,python-pytest)))
561bb3cb
LF
7789 (propagated-inputs
7790 `(("python-requests" ,python-requests)))
7791 (synopsis "Extensions to python-requests")
7792 (description "This is a toolbelt of useful classes and functions to be used
7793with python-requests.")
7794 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
3f641af0 7795 (license license:asl2.0)))
d1deb90b
LF
7796
7797(define-public python-click-threading
7798 (package
7799 (name "python-click-threading")
3d2e0dbc 7800 (version "0.2.0")
d1deb90b
LF
7801 (source (origin
7802 (method url-fetch)
3d2e0dbc
LF
7803 (uri (string-append
7804 "https://pypi.python.org/packages/"
7805 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7806 "click-threading-" version ".tar.gz"))
d1deb90b
LF
7807 (sha256
7808 (base32
3d2e0dbc 7809 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
d1deb90b
LF
7810 (build-system python-build-system)
7811 (propagated-inputs
7812 `(("python-click" ,python-click)))
7813 (synopsis "Utilities for multithreading in Click")
7814 (description "This package provides utilities for multithreading in Click
7815applications.")
7816 (home-page "https://github.com/click-contrib/click-threading")
7817 (license license:expat)))
7b17cab9
LF
7818
7819(define-public python-click-log
7820 (package
7821 (name "python-click-log")
a9da8fec 7822 (version "0.1.3")
7b17cab9
LF
7823 (source (origin
7824 (method url-fetch)
7825 (uri (pypi-uri "click-log" version))
7826 (sha256
7827 (base32
a9da8fec 7828 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7b17cab9
LF
7829 (build-system python-build-system)
7830 (propagated-inputs
7831 `(("python-click" ,python-click)))
7832 (synopsis "Logging for click applications")
7833 (description "This package provides a Python library for logging Click
7834applications.")
7835 (home-page "https://github.com/click-contrib/click-log")
7836 (license license:expat)))
7b3a4ee4
LF
7837
7838(define-public python-apipkg
7839 (package
7840 (name "python-apipkg")
7841 (version "1.4")
7842 (source (origin
7843 (method url-fetch)
7844 (uri (pypi-uri "apipkg" version))
7845 (sha256
7846 (base32
7847 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7848 (build-system python-build-system)
328bb95d 7849 (native-inputs
7b3a4ee4
LF
7850 `(("python-pytest" ,python-pytest)))
7851 (synopsis "Namespace control and lazy-import mechanism")
7852 (description "With apipkg you can control the exported namespace of a Python
7853package and greatly reduce the number of imports for your users. It is a small
7854pure Python module that works on virtually all Python versions.")
7855 (home-page "https://bitbucket.org/hpk42/apipkg")
f210e944 7856 (license license:expat)))
e08739c3
CAW
7857
7858(define-public python2-apipkg
f210e944 7859 (package-with-python2 python-apipkg))
848964fe
LF
7860
7861(define-public python-execnet
7862 (package
7863 (name "python-execnet")
7864 (version "1.4.1")
7865 (source (origin
7866 (method url-fetch)
7867 (uri (pypi-uri "execnet" version))
7868 (sha256
7869 (base32
7870 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7871 (build-system python-build-system)
ca0eee9d
LF
7872 (arguments
7873 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7874 ;; The two test failures are caused by the lack of an `ssh` executable.
7875 ;; The test suite can be run with pytest after the 'install' phase.
7876 #:tests? #f))
848964fe 7877 (native-inputs
ca0eee9d
LF
7878 `(("python-pytest" ,python-pytest)
7879 ("python-setuptools-scm" ,python-setuptools-scm)))
f22efa01 7880 (propagated-inputs
848964fe
LF
7881 `(("python-apipkg" ,python-apipkg)))
7882 (synopsis "Rapid multi-Python deployment")
7883 (description "Execnet provides a share-nothing model with
7884channel-send/receive communication for distributing execution across many
7885Python interpreters across version, platform and network barriers. It has a
7886minimal and fast API targetting the following uses:
7887@enumerate
7888@item distribute tasks to (many) local or remote CPUs
7889@item write and deploy hybrid multi-process applications
7890@item write scripts to administer multiple environments
7891@end enumerate")
7892 (home-page "http://codespeak.net/execnet/")
f210e944 7893 (license license:expat)))
16c84f90
CAW
7894
7895(define-public python2-execnet
f210e944 7896 (package-with-python2 python-execnet))
6720dbb4
LF
7897
7898;;; The software provided by this package was integrated into pytest 2.8.
7899(define-public python-pytest-cache
7900 (package
7901 (name "python-pytest-cache")
7902 (version "1.0")
7903 (source (origin
7904 (method url-fetch)
7905 (uri (pypi-uri "pytest-cache" version))
7906 (sha256
7907 (base32
7908 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7909 (build-system python-build-system)
f22efa01 7910 (propagated-inputs
630d938f
EF
7911 `(("python-apipkg" ,python-apipkg)
7912 ("python-execnet" ,python-execnet)
7913 ("python-py" ,python-py)
7914 ("python-pytest" ,python-pytest)))
6720dbb4
LF
7915 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7916 (description "The pytest-cache plugin provides tools to rerun failures from
7917the last py.test invocation.")
7918 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
f210e944 7919 (license license:expat)))
0adc21c2
EF
7920
7921(define-public python2-pytest-cache
f210e944 7922 (package-with-python2 python-pytest-cache))
d7e729fe
LF
7923
7924(define-public python-pytest-localserver
7925 (package
7926 (name "python-pytest-localserver")
29f20168 7927 (version "0.3.5")
d7e729fe
LF
7928 (source (origin
7929 (method url-fetch)
29f20168 7930 (uri (pypi-uri "pytest-localserver" version))
d7e729fe
LF
7931 (sha256
7932 (base32
29f20168 7933 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
d7e729fe
LF
7934 (build-system python-build-system)
7935 (arguments
7936 `(#:phases (modify-phases %standard-phases
7937 (replace 'check
7938 (lambda _
7939 (zero? (system* "py.test" "--genscript=runtests.py"))
7940 (zero? (system* "py.test")))))))
7941 (native-inputs
d7e729fe
LF
7942 `(("python-pytest" ,python-pytest)
7943 ("python-requests" ,python-requests)
9ba40f05 7944 ("python-six" ,python-six)))
f22efa01 7945 (propagated-inputs
9ba40f05 7946 `(("python-werkzeug" ,python-werkzeug)))
d7e729fe
LF
7947 (synopsis "Py.test plugin to test server connections locally")
7948 (description "Pytest-localserver is a plugin for the pytest testing
7949framework which enables you to test server connections locally.")
7950 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7951 (license license:expat)))
28cecbb7
LF
7952
7953(define-public python-wsgi-intercept
7954 (package
7955 (name "python-wsgi-intercept")
909fbd2b 7956 (version "1.2.2")
28cecbb7
LF
7957 (source (origin
7958 (method url-fetch)
909fbd2b
LF
7959 (uri (string-append
7960 "https://pypi.python.org/packages/"
7961 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7962 "wsgi_intercept-" version ".tar.gz"))
28cecbb7
LF
7963 (sha256
7964 (base32
909fbd2b 7965 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
28cecbb7 7966 (build-system python-build-system)
b9fc496f
HG
7967 (propagated-inputs
7968 `(("python-six" ,python-six)))
28cecbb7 7969 (native-inputs
9d813ec1 7970 `(("python-pytest" ,python-pytest)
b9fc496f
HG
7971 ("python-httplib2" ,python-httplib2)
7972 ("python-requests" ,python-requests)
8757f050 7973 ("python-urllib3" ,python-urllib3)))
28cecbb7
LF
7974 (synopsis "Puts a WSGI application in place of a real URI for testing")
7975 (description "Wsgi_intercept installs a WSGI application in place of a real
7976URI for testing. Testing a WSGI application normally involves starting a
7977server at a local host and port, then pointing your test code to that address.
7978Instead, this library lets you intercept calls to any specific host/port
7979combination and redirect them into a WSGI application importable by your test
7980program. Thus, you can avoid spawning multiple processes or threads to test
7981your Web app.")
7982 (home-page "https://github.com/cdent/wsgi-intercept")
7983 (license license:expat)))
89b8a551
LF
7984
7985(define-public python-pytest-xprocess
7986 (package
7987 (name "python-pytest-xprocess")
7988 (version "0.9.1")
7989 (source (origin
7990 (method url-fetch)
7991 (uri (pypi-uri "pytest-xprocess" version))
7992 (sha256
7993 (base32
7994 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7995 (build-system python-build-system)
7996 (propagated-inputs
7997 `(("python-pytest" ,python-pytest)
7998 ("python-pytest-cache" ,python-pytest-cache)
7999 ("python-psutil" ,python-psutil)))
8000 (synopsis "Pytest plugin to manage external processes across test runs")
8001 (description "Pytest-xprocess is an experimental py.test plugin for managing
8002processes across test runs.")
8003 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8004 (license license:expat)))
5c299bf0
LF
8005
8006(define-public python-icalendar
8007 (package
8008 (name "python-icalendar")
25291aca 8009 (version "3.11")
5c299bf0
LF
8010 (source (origin
8011 (method url-fetch)
8012 (uri (pypi-uri "icalendar" version))
8013 (sha256
8014 (base32
25291aca 8015 "01v2f3swd5s72x65cdihw83dx1z799b4i49a6ncg7vqmcm20wapd"))))
5c299bf0
LF
8016 (build-system python-build-system)
8017 (propagated-inputs
8018 `(("python-dateutil-2" ,python-dateutil-2)
8019 ("python-pytz" ,python-pytz)))
8020 (synopsis "Python library for parsing iCalendar files")
8021 (description "The icalendar package is a parser/generator of iCalendar
8022files for use with Python.")
8023 (home-page "https://github.com/collective/icalendar")
3f641af0 8024 (license license:bsd-2)))
6bbbb53e
LF
8025
8026(define-public python-sphinxcontrib-newsfeed
8027 (package
8028 (name "python-sphinxcontrib-newsfeed")
8029 (version "0.1.4")
8030 (source (origin
8031 (method url-fetch)
8032 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8033 (sha256
8034 (base32
8035 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8036 (build-system python-build-system)
8037 (propagated-inputs
251ed7f2 8038 `(("python-sphinx" ,python-sphinx)))
6bbbb53e
LF
8039 (synopsis "News Feed extension for Sphinx")
8040 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8041Blog, News or Announcements section to a Sphinx website.")
8042 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
3f641af0 8043 (license license:bsd-2)))
2216e15c
SB
8044
8045(define-public python-args
8046 (package
8047 (name "python-args")
8048 (version "0.1.0")
8049 (source (origin
8050 (method url-fetch)
8051 (uri (pypi-uri "args" version))
8052 (sha256
8053 (base32
8054 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8055 (build-system python-build-system)
2216e15c
SB
8056 (home-page "https://github.com/kennethreitz/args")
8057 (synopsis "Command-line argument parser")
8058 (description
8059 "This library provides a Python module to parse command-line arguments.")
3f641af0 8060 (license license:bsd-3)))
2216e15c
SB
8061
8062(define-public python2-args
8063 (package-with-python2 python-args))
c06a3de9
SB
8064
8065(define-public python-clint
8066 (package
8067 (name "python-clint")
8068 (version "0.5.1")
8069 (source (origin
8070 (method url-fetch)
8071 (uri (pypi-uri "clint" version))
8072 (sha256
8073 (base32
8074 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8075 (build-system python-build-system)
f22efa01 8076 (propagated-inputs
f3b98f4f 8077 `(("python-args" ,python-args)))
c06a3de9
SB
8078 (home-page "https://github.com/kennethreitz/clint")
8079 (synopsis "Command-line interface tools")
8080 (description
8081 "Clint is a Python module filled with a set of tools for developing
8082command-line applications, including tools for colored and indented
8083output, progress bar display, and pipes.")
3f641af0 8084 (license license:isc)))
c06a3de9
SB
8085
8086(define-public python2-clint
8087 (package-with-python2 python-clint))
4ecdeef8
SB
8088
8089(define-public python-astor
8090 (package
8091 (name "python-astor")
8092 (version "0.5")
8093 (source (origin
8094 (method url-fetch)
8095 (uri (pypi-uri "astor" version))
8096 (sha256
8097 (base32
8098 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8099 (build-system python-build-system)
4ecdeef8
SB
8100 (home-page "https://github.com/berkerpeksag/astor")
8101 (synopsis "Read and write Python ASTs")
8102 (description
8103 "Astor is designed to allow easy manipulation of Python source via the
8104Abstract Syntax Tree.")
3f641af0 8105 (license license:bsd-3)))
4ecdeef8
SB
8106
8107(define-public python2-astor
8108 (package-with-python2 python-astor))
e224b7d0
SB
8109
8110(define-public python-rply
8111 (package
8112 (name "python-rply")
8113 (version "0.7.4")
8114 (source (origin
8115 (method url-fetch)
8116 (uri (pypi-uri "rply" version))
8117 (sha256
8118 (base32
8119 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8120 (build-system python-build-system)
f22efa01 8121 (propagated-inputs
f3b98f4f 8122 `(("python-appdirs" ,python-appdirs)))
e224b7d0
SB
8123 (home-page "https://github.com/alex/rply")
8124 (synopsis "Parser generator for Python")
8125 (description
8126 "This package provides a pure Python based parser generator, that also
8127works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8128with a new public API, and RPython support.")
3f641af0 8129 (license license:bsd-3)))
e224b7d0
SB
8130
8131(define-public python2-rply
8132 (package-with-python2 python-rply))
c3e919d7
SB
8133
8134(define-public python-hy
8135 (package
8136 (name "python-hy")
8137 (version "0.11.1")
8138 (source (origin
8139 (method url-fetch)
8140 (uri (pypi-uri "hy" version))
8141 (sha256
8142 (base32
8143 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8144 (build-system python-build-system)
f22efa01 8145 (propagated-inputs
c3e919d7
SB
8146 `(("python-astor" ,python-astor)
8147 ("python-clint" ,python-clint)
f3b98f4f 8148 ("python-rply" ,python-rply)))
c3e919d7
SB
8149 (home-page "http://hylang.org/")
8150 (synopsis "Lisp frontend to Python")
8151 (description
8152 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8153its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8154Python at your fingertips, in Lisp form.")
8155 (license license:expat)))
8156
8157(define-public python2-hy
8158 (package-with-python2 python-hy))
7a5b944e 8159
81f7f297
EF
8160(define-public python-rauth
8161 (package
8162 (name "python-rauth")
8163 (version "0.7.2")
8164 (source
8165 (origin
8166 (method url-fetch)
8167 (uri (pypi-uri "rauth" version))
8168 (sha256
8169 (base32
8170 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
8171 (build-system python-build-system)
8172 (arguments
8173 `(#:test-target "check"))
f22efa01 8174 (propagated-inputs
81f7f297
EF
8175 `(("python-requests" ,python-requests)))
8176 (home-page "https://github.com/litl/rauth")
8177 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
8178 (description
8179 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
8180provides service wrappers for convenient connection initialization and
8181authenticated session objects providing things like keep-alive.")
0848d8d3
EF
8182 (license license:expat)
8183 (properties `((python2-variant . ,(delay python2-rauth))))))
81f7f297
EF
8184
8185(define-public python2-rauth
0848d8d3
EF
8186 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
8187 (package
8188 (inherit base)
00e10c6e 8189 (native-inputs `(("python2-unittest2" ,python2-unittest2)
0848d8d3 8190 ,@(package-native-inputs base))))))
81f7f297 8191
1abe448d
EF
8192(define-public python2-functools32
8193 (package
8194 (name "python2-functools32")
8195 (version "3.2.3-2")
8196 (source
8197 (origin
8198 (method url-fetch)
8199 (uri (pypi-uri "functools32" version))
8200 (sha256
8201 (base32
8202 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8203 (build-system python-build-system)
8204 (arguments
8205 `(#:python ,python-2
8206 #:tests? #f)) ; no test target
1abe448d
EF
8207 (home-page "https://github.com/MiCHiLU/python-functools32")
8208 (synopsis
8209 "Backport of the functools module from Python 3.2.3")
8210 (description
8211 "This package is a backport of the @code{functools} module from Python
82123.2.3 for use with older versions of Python and PyPy.")
8213 (license license:expat)))
8214
877889f3 8215(define-public python2-futures
7a5b944e 8216 (package
877889f3 8217 (name "python2-futures")
7a5b944e
EF
8218 (version "3.0.3")
8219 (source
8220 (origin
8221 (method url-fetch)
8222 (uri (pypi-uri "futures" version))
8223 (sha256
8224 (base32
8225 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8226 (build-system python-build-system)
877889f3 8227 (arguments `(#:python ,python-2))
7a5b944e
EF
8228 (home-page "https://github.com/agronholm/pythonfutures")
8229 (synopsis
8230 "Backport of the concurrent.futures package from Python 3.2")
8231 (description
8232 "The concurrent.futures module provides a high-level interface for
8233asynchronously executing callables. This package backports the
8234concurrent.futures package from Python 3.2")
3f641af0 8235 (license license:bsd-3)))
7a5b944e 8236
5cb2fe44
EF
8237(define-public python-promise
8238 (package
8239 (name "python-promise")
8240 (version "0.4.2")
8241 (source
8242 (origin
8243 (method url-fetch)
8244 (uri (pypi-uri "promise" version))
8245 (sha256
8246 (base32
8247 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8248 (build-system python-build-system)
8249 ;; Tests wants python-futures, which is a python2 only program, and
8250 ;; can't be found by python-promise at test time.
8251 (arguments `(#:tests? #f))
8252 (home-page "https://github.com/syrusakbary/promise")
8253 (synopsis "Promises/A+ implementation for Python")
8254 (description
8255 "Promises/A+ implementation for Python")
8256 (properties `((python2-variant . ,(delay python2-promise))))
8257 (license license:expat)))
8258
8259(define-public python2-promise
8260 (let ((promise (package-with-python2
8261 (strip-python2-variant python-promise))))
8262 (package (inherit promise)
8263 (arguments (substitute-keyword-arguments (package-arguments promise)
8264 ((#:tests? _) #t)))
8265 (native-inputs
8266 `(("python2-futures" ,python2-futures)
8267 ("python2-pytest" ,python2-pytest)
5cb2fe44
EF
8268 ,@(package-native-inputs promise))))))
8269
c18f6368
EF
8270(define-public python-urllib3
8271 (package
8272 (name "python-urllib3")
6178274d 8273 (version "1.18.1")
c18f6368
EF
8274 (source
8275 (origin
8276 (method url-fetch)
8277 (uri (pypi-uri "urllib3" version))
8278 (sha256
8279 (base32
6178274d 8280 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
c18f6368
EF
8281 (build-system python-build-system)
8282 (arguments `(#:tests? #f))
8283 (native-inputs
f3b98f4f 8284 `(;; some packages for tests
c18f6368
EF
8285 ("python-nose" ,python-nose)
8286 ("python-mock" ,python-mock)
8287 ("python-tornado" ,python-tornado)))
8288 (propagated-inputs
8322749a 8289 `(;; extra packages for https security
c18f6368
EF
8290 ("python-certifi" ,python-certifi)
8291 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8292 ("python-pyasn1" ,python-pyasn1)
8293 ("python-pyopenssl" ,python-pyopenssl)))
6178274d 8294 (home-page "https://urllib3.readthedocs.org/")
c18f6368
EF
8295 (synopsis "HTTP library with thread-safe connection pooling")
8296 (description
8297 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8298can reuse the same socket connection for multiple requests, it can POST files,
8299supports url redirection and retries, and also gzip and deflate decoding.")
8300 (license license:expat)))
8301
8302(define-public python2-urllib3
8303 (package-with-python2 python-urllib3))
2b2f2fc1
DT
8304
8305(define-public python-colorama
8306 (package
8307 (name "python-colorama")
8308 (version "0.3.3")
8309 (source
8310 (origin
8311 (method url-fetch)
8312 (uri (pypi-uri "colorama" version))
8313 (sha256
8314 (base32
8315 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8316 (build-system python-build-system)
2b2f2fc1
DT
8317 (synopsis "colored terminal text rendering for Python")
8318 (description "Colorama is a Python library for rendering colored terminal
8319text.")
8320 (home-page "https://pypi.python.org/pypi/colorama")
3f641af0 8321 (license license:bsd-3)))
2b2f2fc1
DT
8322
8323(define-public python2-colorama
8324 (package-with-python2 python-colorama))
f5bcec6e
DT
8325
8326(define-public python-rsa
8327 (package
8328 (name "python-rsa")
ecd68c53 8329 (version "3.4.2")
f5bcec6e
DT
8330 (source
8331 (origin
8332 (method url-fetch)
8333 (uri (pypi-uri "rsa" version))
8334 (sha256
8335 (base32
ecd68c53 8336 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
f5bcec6e 8337 (build-system python-build-system)
f22efa01 8338 (propagated-inputs
f3b98f4f 8339 `(("python-pyasn1" ,python-pyasn1)))
f5bcec6e
DT
8340 (synopsis "Pure-Python RSA implementation")
8341 (description "Python-RSA is a pure-Python RSA implementation. It supports
8342encryption and decryption, signing and verifying signatures, and key
8343generation according to PKCS#1 version 1.5. It can be used as a Python
8344library as well as on the command line.")
8345 (home-page "http://stuvel.eu/rsa")
3f641af0 8346 (license license:asl2.0)))
f5bcec6e
DT
8347
8348(define-public python2-rsa
8349 (package-with-python2 python-rsa))
c0aacfa5
DT
8350
8351(define-public python-pluggy
8352 (package
8353 (name "python-pluggy")
8354 (version "0.3.1")
8355 (source
8356 (origin
8357 (method url-fetch)
8358 (uri (pypi-uri "pluggy" version))
8359 (sha256
8360 (base32
8361 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8362 (build-system python-build-system)
c0aacfa5
DT
8363 (synopsis "Plugin and hook calling mechanism for Python")
8364 (description "Pluggy is an extraction of the plugin manager as used by
8365Pytest but stripped of Pytest specific details.")
8366 (home-page "https://pypi.python.org/pypi/pluggy")
8367 (license license:expat)))
8368
8369(define-public python2-pluggy
8370 (package-with-python2 python-pluggy))
a4af21ca
DT
8371
8372(define-public python-tox
8373 (package
8374 (name "python-tox")
8375 (version "2.3.1")
8376 (source
8377 (origin
8378 (method url-fetch)
8379 (uri (pypi-uri "tox" version))
8380 (sha256
8381 (base32
8382 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8383 (build-system python-build-system)
8384 (arguments
7ba07edf
HG
8385 ;; FIXME: Tests require pytest-timeout, which itself requires
8386 ;; pytest>=2.8.0 for installation.
a4af21ca 8387 '(#:tests? #f))
482d9591
HG
8388 (propagated-inputs
8389 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
a4af21ca 8390 ("python-py" ,python-py)
482d9591 8391 ("python-virtualenv" ,python-virtualenv)))
328bb95d 8392 (native-inputs
7ba07edf
HG
8393 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8394 ("python-pytest" ,python-pytest))) ; >= 2.3.5
a4af21ca
DT
8395 (home-page "http://tox.testrun.org/")
8396 (synopsis "Virtualenv-based automation of test activities")
8397 (description "Tox is a generic virtualenv management and test command line
8398tool. It can be used to check that a package installs correctly with
8399different Python versions and interpreters, or run tests in each type of
8400supported environment, or act as a frontend to continuous integration
8401servers.")
8402 (license license:expat)))
8403
8404(define-public python2-tox
8405 (package-with-python2 python-tox))
ba9da248
DT
8406
8407(define-public python-jmespath
8408 (package
8409 (name "python-jmespath")
8410 (version "0.9.0")
8411 (source
8412 (origin
8413 (method url-fetch)
8414 (uri (pypi-uri "jmespath" version))
8415 (sha256
8416 (base32
8417 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8418 (build-system python-build-system)
ba9da248
DT
8419 (synopsis "JSON Matching Expressions")
8420 (description "JMESPath (pronounced “james path”) is a Python library that
8421allows one to declaratively specify how to extract elements from a JSON
8422document.")
8423 (home-page "https://github.com/jmespath/jmespath.py")
8424 (license license:expat)))
8425
8426(define-public python2-jmespath
8427 (package-with-python2 python-jmespath))
935fcd5c
DT
8428
8429(define-public python-botocore
8430 (package
8431 (name "python-botocore")
e09f952d 8432 (version "1.4.62")
935fcd5c
DT
8433 (source
8434 (origin
8435 (method url-fetch)
8436 (uri (pypi-uri "botocore" version))
8437 (sha256
8438 (base32
e09f952d 8439 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
935fcd5c 8440 (build-system python-build-system)
482d9591 8441 (propagated-inputs
935fcd5c
DT
8442 `(("python-dateutil" ,python-dateutil-2)
8443 ("python-docutils" ,python-docutils)
482d9591 8444 ("python-jmespath" ,python-jmespath)))
8fa6890b 8445 (native-inputs
482d9591 8446 `(("python-mock" ,python-mock)
935fcd5c 8447 ("python-nose" ,python-nose)
482d9591 8448 ("behave" ,behave)
935fcd5c 8449 ("python-tox" ,python-tox)
482d9591 8450 ("python-wheel" ,python-wheel)))
935fcd5c
DT
8451 (home-page "https://github.com/boto/botocore")
8452 (synopsis "Low-level interface to AWS")
8453 (description "Botocore is a Python library that provides a low-level
8454interface to the Amazon Web Services (AWS) API.")
3f641af0 8455 (license license:asl2.0)))
935fcd5c
DT
8456
8457(define-public python2-botocore
8458 (package-with-python2 python-botocore))
f861b8b8
DT
8459
8460(define-public awscli
8461 (package
8462 (name "awscli")
d5ccf71e 8463 (version "1.11.5")
f861b8b8
DT
8464 (source
8465 (origin
8466 (method url-fetch)
d5ccf71e 8467 (uri (pypi-uri name version))
f861b8b8
DT
8468 (sha256
8469 (base32
d5ccf71e 8470 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
f861b8b8 8471 (build-system python-build-system)
482d9591 8472 (propagated-inputs
f861b8b8 8473 `(("python-colorama" ,python-colorama)
482d9591
HG
8474 ("python-botocore" ,python-botocore)
8475 ("python-s3transfer" ,python-s3transfer)
f861b8b8 8476 ("python-docutils" ,python-docutils)
482d9591 8477 ("python-rsa" ,python-rsa)))
d4649177 8478 (native-inputs
482d9591 8479 `(("python-mock" ,python-mock)
f861b8b8 8480 ("python-nose" ,python-nose)
f861b8b8
DT
8481 ("python-sphinx" ,python-sphinx)
8482 ("python-tox" ,python-tox)
482d9591 8483 ("python-wheel" ,python-wheel)))
f861b8b8
DT
8484 (home-page "http://aws.amazon.com/cli/")
8485 (synopsis "Command line client for AWS")
8486 (description "AWS CLI provides a unified command line interface to the
8487Amazon Web Services (AWS) API.")
3f641af0 8488 (license license:asl2.0)))
6a44697d
LF
8489
8490(define-public python-hypothesis
8491 (package
8492 (name "python-hypothesis")
bea6d94d 8493 (version "3.1.0")
6a44697d
LF
8494 (source (origin
8495 (method url-fetch)
8496 (uri (pypi-uri "hypothesis" version))
8497 (sha256
8498 (base32
bea6d94d 8499 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
6a44697d 8500 (build-system python-build-system)
6a44697d
LF
8501 (propagated-inputs
8502 `(("python-flake8" ,python-flake8)
8503 ("python-pytest" ,python-pytest)))
8504 (synopsis "Library for property based testing")
8505 (description "Hypothesis is a library for testing your Python code against a
8506much larger range of examples than you would ever want to write by hand. It’s
8507based on the Haskell library, Quickcheck, and is designed to integrate
8508seamlessly into your existing Python unit testing work flow.")
8509 (home-page "https://github.com/DRMacIver/hypothesis")
3f641af0 8510 (license license:mpl2.0)
6f068e08 8511 (properties `((python2-variant . ,(delay python2-hypothesis))))))
6a44697d
LF
8512
8513(define-public python2-hypothesis
6f068e08
EF
8514 (let ((hypothesis (package-with-python2
8515 (strip-python2-variant python-hypothesis))))
8516 (package (inherit hypothesis)
8517 (native-inputs
f3b98f4f 8518 `(("python2-enum34" ,python2-enum34))))))
7517e73c
LF
8519
8520(define-public python-pytest-subtesthack
8521 (package
8522 (name "python-pytest-subtesthack")
8523 (version "0.1.1")
8524 (source (origin
8525 (method url-fetch)
8526 (uri (pypi-uri "pytest-subtesthack" version))
8527 (sha256
8528 (base32
8529 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8530 (build-system python-build-system)
7517e73c
LF
8531 (propagated-inputs
8532 `(("python-pytest" ,python-pytest)))
8533 (synopsis "Set-up and tear-down fixtures for unit tests")
8534 (description "This plugin allows you to set up and tear down fixtures within
8535unit test functions that use @code{py.test}. This is useful for using
8536@command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8537function multiple times, without setting up or tearing down fixture state as is
8538normally the case.")
8539 (home-page "https://github.com/untitaker/pytest-subtesthack/")
3f641af0 8540 (license license:unlicense)))
7517e73c
LF
8541
8542(define-public python2-pytest-subtesthack
8543 (package-with-python2 python-pytest-subtesthack))
0bdc1671
CAW
8544
8545(define-public python2-xdo
8546 (package
8547 (name "python2-xdo")
8548 (version "0.2")
8549 (source (origin
8550 (method url-fetch)
8551 (uri (string-append
8552 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8553 "python-xdo_" version ".orig.tar.gz"))
8554 (sha256
8555 (base32
8556 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8557 (build-system python-build-system)
8558 (arguments
8559 `(#:python ,python-2
8560 #:tests? #f)) ; no tests provided
8561 (inputs
8562 `(("xdotool" ,xdotool)
8563 ("libX11" ,libx11)))
8564 (home-page "https://tracker.debian.org/pkg/python-xdo")
8565 (synopsis "Python library for simulating X11 keyboard/mouse input")
8566 (description "Provides bindings to libxdo for manipulating X11 via simulated
8567input. (Note that this is mostly a legacy library; you may wish to look at
8568python-xdo for newer bindings.)")
3f641af0 8569 (license license:bsd-3)))
0bdc1671 8570
cb34dc6c
CAW
8571(define-public python-wtforms
8572 (package
8573 (name "python-wtforms")
8574 (version "2.1")
8575 (source
8576 (origin
8577 (method url-fetch)
8578 (uri (pypi-uri "WTForms" version ".zip"))
8579 (sha256
8580 (base32
8581 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8582 (build-system python-build-system)
13c4d874
EF
8583 (arguments
8584 '(#:phases
8585 (modify-phases %standard-phases
8586 (add-after 'unpack 'remove-django-test
8587 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8588 (lambda _
8589 (substitute*
8590 "tests/runtests.py"
8591 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8592 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8593 #t)))))
cb34dc6c
CAW
8594 (native-inputs
8595 `(("unzip" ,unzip)))
8596 (home-page "http://wtforms.simplecodes.com/")
8597 (synopsis
8598 "Form validation and rendering library for Python web development")
8599 (description
8600 "WTForms is a flexible forms validation and rendering library
8601for Python web development. It is very similar to the web form API
8602available in Django, but is a standalone package.")
f210e944 8603 (license license:bsd-3)))
cb34dc6c
CAW
8604
8605(define-public python2-wtforms
f210e944 8606 (package-with-python2 python-wtforms))
50aaec25
DT
8607
8608(define-public python-mako
8609 (package
8610 (name "python-mako")
8611 (version "1.0.3")
8612 (source
8613 (origin
8614 (method url-fetch)
8615 (uri (pypi-uri "Mako" version))
8616 (sha256
8617 (base32
8618 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8619 (build-system python-build-system)
482d9591
HG
8620 (propagated-inputs
8621 `(("python-markupsafe" ,python-markupsafe)))
50aaec25 8622 (native-inputs
482d9591 8623 `(("python-mock" ,python-mock)
50aaec25
DT
8624 ("python-nose" ,python-nose)))
8625 (home-page "http://www.makotemplates.org/")
8626 (synopsis "Templating language for Python")
8627 (description "Mako is a templating language for Python that compiles
8628templates into Python modules.")
f210e944 8629 (license license:expat)))
50aaec25
DT
8630
8631(define-public python2-mako
f210e944 8632 (package-with-python2 python-mako))
ae00a41f
CAW
8633
8634(define-public python-waitress
8635 (package
8636 (name "python-waitress")
8637 (version "0.8.10")
8638 (source
8639 (origin
8640 (method url-fetch)
8641 (uri (pypi-uri "waitress" version))
8642 (sha256
8643 (base32
8644 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8645 (build-system python-build-system)
8646 (home-page "https://github.com/Pylons/waitress")
8647 (synopsis "Waitress WSGI server")
8648 (description "Waitress is meant to be a production-quality pure-Python WSGI
8649server with very acceptable performance.")
f210e944 8650 (license license:zpl2.1)))
ae00a41f
CAW
8651
8652(define-public python2-waitress
f210e944 8653 (package-with-python2 python-waitress))
778a284b
CAW
8654
8655(define-public python-wsgiproxy2
8656 (package
8657 (name "python-wsgiproxy2")
8658 (version "0.4.2")
8659 (source
8660 (origin
8661 (method url-fetch)
8662 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8663 (sha256
8664 (base32
8665 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8666 (build-system python-build-system)
e359b31a
LF
8667 (arguments
8668 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8669 ;; support Python 3:
8670 ;; https://github.com/benoitc/restkit/issues/140
8671 #:tests? #f))
778a284b
CAW
8672 (native-inputs
8673 `(("unzip" ,unzip)
8674 ("python-nose" ,python-nose)
8675 ("python-coverage" ,python-coverage)))
8676 (propagated-inputs
8677 `(("python-six" ,python-six)
8678 ("python-webob" ,python-webob)))
8679 (home-page
8680 "https://github.com/gawel/WSGIProxy2/")
8681 (synopsis "WSGI Proxy with various http client backends")
8682 (description "WSGI turns HTTP requests into WSGI function calls.
8683WSGIProxy turns WSGI function calls into HTTP requests.
8684It also includes code to sign requests and pass private data,
8685and to spawn subprocesses to handle requests.")
f210e944 8686 (license license:expat)))
778a284b
CAW
8687
8688(define-public python2-wsgiproxy2
f210e944 8689 (package-with-python2 python-wsgiproxy2))
bb7518b1
CAW
8690
8691(define-public python-pastedeploy
8692 (package
8693 (name "python-pastedeploy")
8694 (version "1.5.2")
8695 (source
8696 (origin
8697 (method url-fetch)
8698 (uri (pypi-uri "PasteDeploy" version))
8699 (sha256
8700 (base32
8701 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8702 (build-system python-build-system)
8703 (native-inputs
8704 `(("python-nose" ,python-nose)))
bb7518b1
CAW
8705 (home-page "http://pythonpaste.org/deploy/")
8706 (synopsis
8707 "Load, configure, and compose WSGI applications and servers")
8708 (description
8709 "This tool provides code to load WSGI applications and servers from URIs;
8710these URIs can refer to Python Eggs for INI-style configuration files. Paste
8711Script provides commands to serve applications based on this configuration
8712file.")
8713 (license license:expat)))
8714
8715(define-public python2-pastedeploy
8716 (package-with-python2 python-pastedeploy))
1cf53652 8717
c4a7904c
CAW
8718(define-public python-paste
8719 (package
8720 (name "python-paste")
8721 (version "2.0.2")
8722 (source
8723 (origin
8724 (method url-fetch)
8725 (uri (pypi-uri "Paste" version))
8726 (sha256
8727 (base32
8728 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
fc1adab1
AK
8729 (patches (search-patches "python-paste-remove-website-test.patch"
8730 "python-paste-remove-timing-test.patch"))))
c4a7904c
CAW
8731 (build-system python-build-system)
8732 (native-inputs
8733 `(("python-nose" ,python-nose)))
8734 (propagated-inputs
f3b98f4f 8735 `(("python-six" ,python-six)))
c4a7904c
CAW
8736 (arguments
8737 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8738 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8739 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8740 ;; still... things should be better by the next Paste release.)
8741 #:tests? #f))
8742 (home-page "http://pythonpaste.org")
8743 (synopsis
8744 "Python web development tools, focusing on WSGI")
8745 (description
8746 "Paste provides a variety of web development tools and middleware which
8747can be nested together to build web applications. Paste's design closely
8748follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8749 (license license:expat)
8750 (properties `((python2-variant . ,(delay python2-paste))))))
8751
8752(define-public python2-paste
8753 (let ((paste (package-with-python2
8754 (strip-python2-variant python-paste))))
8755 (package
8756 (inherit paste)
8757 (arguments
8758 ;; Tests are back for Python 2!
8759 `(#:tests? #t
8760 ,@(package-arguments paste))))))
8761
a8f20f63
CAW
8762(define-public python-pastescript
8763 (package
8764 (name "python-pastescript")
8765 (version "2.0.2")
8766 (source
8767 (origin
8768 (method url-fetch)
8769 (uri (pypi-uri "PasteScript" version))
8770 (sha256
8771 (base32
8772 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8773 (build-system python-build-system)
8774 (native-inputs
8775 `(("python-nose" ,python-nose)))
8776 (propagated-inputs
f3b98f4f 8777 `(("python-paste" ,python-paste)
a8f20f63
CAW
8778 ("python-pastedeploy" ,python-pastedeploy)))
8779 (home-page "http://pythonpaste.org/script/")
8780 (arguments
8781 '(;; Unfortunately, this requires the latest unittest2,
8782 ;; but that requires traceback2 which requires linecache2 which requires
8783 ;; unittest2. So we're skipping tests for now.
8784 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8785 ;; so in theory we could get around this situation somehow.)
8786 #:tests? #f))
8787 (synopsis
8788 "Pluggable command line tool for serving web applications and more")
8789 (description
8790 "PasteScript is a plugin-friendly command line tool which provides a
8791variety of features, from launching web applications to bootstrapping project
8792layouts.")
8793 (license license:expat)))
8794
8795(define-public python2-pastescript
8796 (package-with-python2 python-pastescript))
8797
1cf53652
CAW
8798(define-public python-pyquery
8799 (package
8800 (name "python-pyquery")
aab76e80 8801 (version "1.2.13")
1cf53652
CAW
8802 (source
8803 (origin
8804 (method url-fetch)
8805 (uri (pypi-uri "pyquery" version))
8806 (sha256
8807 (base32
aab76e80 8808 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
1cf53652 8809 (build-system python-build-system)
2ddbfa8c
LF
8810 (native-inputs
8811 `(("python-webob" ,python-webob)
8812 ("python-webtest" ,python-webtest)))
1cf53652
CAW
8813 (propagated-inputs
8814 `(("python-lxml" ,python-lxml)
8815 ("python-cssselect" ,python-cssselect)))
8816 (home-page "https://github.com/gawel/pyquery")
8817 (synopsis "Make jQuery-like queries on xml documents")
8818 (description "pyquery allows you to make jQuery queries on xml documents.
8819The API is as much as possible the similar to jQuery. pyquery uses lxml for
8820fast xml and html manipulation.")
f210e944 8821 (license license:bsd-3)))
1cf53652
CAW
8822
8823(define-public python2-pyquery
f210e944 8824 (package-with-python2 python-pyquery))
aa6313d6
CAW
8825
8826(define-public python-webtest
8827 (package
8828 (name "python-webtest")
8829 (version "2.0.20")
8830 (source
8831 (origin
8832 (method url-fetch)
8833 (uri (pypi-uri "WebTest" version))
8834 (sha256
8835 (base32
8836 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8837 (build-system python-build-system)
8838 (arguments
8839 `(;; Unfortunately we have to disable tests!
8840 ;; This release of WebTest is pinned to python-nose < 1.3,
8841 ;; but older versions of python-nose are plagued with the following
8842 ;; bug(s), which rears its ugly head during test execution:
8843 ;; https://github.com/nose-devs/nose/issues/759
8844 ;; https://github.com/nose-devs/nose/pull/811
8845 #:tests? #f))
8846 ;; Commented out code is no good, but in this case, once tests
8847 ;; are ready to be enabled again, we should put the following
8848 ;; in place:
8849 ;; (native-inputs
8850 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8851 ;; ; but see above comment
8852 ;; ("python-coverage" ,python-coverage)
8853 ;; ("python-mock" ,python-mock)
8854 ;; ("python-pastedeploy" ,python-pastedeploy)
8855 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8856 ;; ("python-pyquery" ,python-pyquery)))
8857 (propagated-inputs
8858 `(("python-waitress" ,python-waitress)
8859 ("python-webob" ,python-webob)
8860 ("python-six" ,python-six)
8861 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8862 (home-page "http://webtest.pythonpaste.org/")
8863 (synopsis "Helper to test WSGI applications")
8864 (description "Webtest allows you to test your Python web applications
8865without starting an HTTP server. It supports anything that supports the
8866minimum of WSGI.")
f210e944 8867 (license license:expat)))
aa6313d6
CAW
8868
8869(define-public python2-webtest
f210e944 8870 (package-with-python2 python-webtest))
4cb122cd
CAW
8871
8872(define-public python-anyjson
8873 (package
8874 (name "python-anyjson")
8875 (version "0.3.3")
8876 (source
8877 (origin
8878 (method url-fetch)
8879 (uri (pypi-uri "anyjson" version))
8880 (sha256
8881 (base32
8882 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8883 (build-system python-build-system)
8884 (arguments
8885 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8886 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8887 ;; whatever) so this transformation needs to be done before the tests
8888 ;; can be run. Maybe we could add a build step to transform beforehand
8889 ;; but it could be annoying/difficult.
8890 ;; We can enable tests for the Python 2 version, though, and do below.
8891 #:tests? #f))
8892 (home-page "http://bitbucket.org/runeh/anyjson/")
8893 (synopsis
8894 "Wraps best available JSON implementation in a common interface")
8895 (description
8896 "Anyjson loads whichever is the fastest JSON module installed
8897and provides a uniform API regardless of which JSON implementation is used.")
3f641af0 8898 (license license:bsd-3)
4cb122cd
CAW
8899 (properties `((python2-variant . ,(delay python2-anyjson))))))
8900
8901(define-public python2-anyjson
8902 (let ((anyjson (package-with-python2
8903 (strip-python2-variant python-anyjson))))
8904 (package
8905 (inherit anyjson)
8906 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8907 #:tests? #t
8908 ,@(package-arguments anyjson)))
00e10c6e 8909 (native-inputs `(("python2-nose" ,python2-nose))))))
8dfceab7
CAW
8910
8911(define-public python-amqp
8912 (package
8913 (name "python-amqp")
8914 (version "1.4.9")
8915 (source
8916 (origin
8917 (method url-fetch)
8918 (uri (pypi-uri "amqp" version))
8919 (sha256
8920 (base32
8921 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8922 (build-system python-build-system)
8923 (native-inputs
8924 `(("python-nose" ,python-nose)
8925 ("python-mock" ,python-mock)))
8926 (home-page "http://github.com/celery/py-amqp")
8927 (synopsis
8928 "Low-level AMQP client for Python (fork of amqplib)")
8929 (description
8930 "This is a fork of amqplib which was originally written by Barry Pederson.
8931It is maintained by the Celery project, and used by kombu as a pure python
8932alternative when librabbitmq is not available.")
3f641af0 8933 (license license:lgpl2.1+)
8dfceab7
CAW
8934 (properties `((python2-variant . ,(delay python2-amqp))))))
8935
8936(define-public python2-amqp
8937 (let ((amqp (package-with-python2
8938 (strip-python2-variant python-amqp))))
8939 (package
8940 (inherit amqp)
8941 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8942 ;; unmaintained. Weirdly, does not do this on the python 3
8943 ;; version?
8944 #:tests? #f
00e10c6e 8945 ,@(package-arguments amqp))))))
7d387305
CAW
8946
8947(define-public python-kombu
8948 (package
8949 (name "python-kombu")
0cb59822 8950 (version "3.0.37")
7d387305
CAW
8951 (source
8952 (origin
8953 (method url-fetch)
8954 (uri (pypi-uri "kombu" version))
8955 (sha256
8956 (base32
0cb59822 8957 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7d387305
CAW
8958 (build-system python-build-system)
8959 (native-inputs
8960 `(("python-mock" ,python-mock)
8961 ("python-nose" ,python-nose)))
8962 (propagated-inputs
8963 `(("python-anyjson" ,python-anyjson)
0cb59822
LF
8964 ("python-amqp" ,python-amqp)
8965 ("python-redis" ,python-redis)))
7d387305
CAW
8966 (home-page "http://kombu.readthedocs.org")
8967 (synopsis "Message passing library for Python")
8968 (description "The aim of Kombu is to make messaging in Python as easy as
8969possible by providing an idiomatic high-level interface for the AMQ protocol,
8970and also provide proven and tested solutions to common messaging problems.
8971AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8972message orientation, queuing, routing, reliability and security, for which the
8973RabbitMQ messaging server is the most popular implementation.")
3f641af0 8974 (license license:bsd-3)
7d387305
CAW
8975 (properties `((python2-variant . ,(delay python2-kombu))))))
8976
8977(define-public python2-kombu
8978 (let ((kombu (package-with-python2
8979 (strip-python2-variant python-kombu))))
8980 (package
8981 (inherit kombu)
328bb95d
HG
8982 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8983 ,@(package-native-inputs kombu))))))
b6f0b9fb
CAW
8984
8985(define-public python-billiard
8986 (package
8987 (name "python-billiard")
a6bb9e44 8988 (version "3.3.0.23")
b6f0b9fb
CAW
8989 (source
8990 (origin
8991 (method url-fetch)
8992 (uri (pypi-uri "billiard" version))
8993 (sha256
8994 (base32
a6bb9e44 8995 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
b6f0b9fb
CAW
8996 (build-system python-build-system)
8997 (native-inputs
8998 `(("python-nose" ,python-nose)))
8999 (home-page "http://github.com/celery/billiard")
9000 (synopsis
9001 "Python multiprocessing fork with improvements and bugfixes")
9002 (description
9003 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9004multiprocessing package itself is a renamed and updated version of R Oudkerk's
9005pyprocessing package. This standalone variant is intended to be compatible with
9006Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
3f641af0 9007 (license license:bsd-3)
b6f0b9fb
CAW
9008 (properties `((python2-variant . ,(delay python2-billiard))))))
9009
9010(define-public python2-billiard
9011 (let ((billiard (package-with-python2
9012 (strip-python2-variant python-billiard))))
9013 (package
9014 (inherit billiard)
00e10c6e 9015 (native-inputs `(("python2-unittest2" ,python2-unittest2)
b6f0b9fb
CAW
9016 ("python2-mock" ,python2-mock)
9017 ,@(package-native-inputs billiard))))))
22df6419
CAW
9018
9019(define-public python-celery
9020 (package
9021 (name "python-celery")
9ebe87fe 9022 (version "3.1.24")
22df6419
CAW
9023 (source
9024 (origin
9025 (method url-fetch)
9026 (uri (pypi-uri "celery" version))
9027 (sha256
9028 (base32
9ebe87fe 9029 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
22df6419 9030 (build-system python-build-system)
9ebe87fe
LF
9031 (arguments
9032 `(#:phases
9033 (modify-phases %standard-phases
9034 ;; These tests break with Python 3.5:
9035 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9036 (replace 'check
9037 (lambda _
9038 (zero?
9039 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
22df6419
CAW
9040 (native-inputs
9041 `(("python-nose" ,python-nose)))
f22efa01 9042 (propagated-inputs
22df6419
CAW
9043 `(("python-pytz" ,python-pytz)
9044 ("python-billiard" ,python-billiard)
9045 ("python-kombu" ,python-kombu)))
9046 (home-page "http://celeryproject.org")
9047 (synopsis "Distributed Task Queue")
9048 (description "Celery is an asynchronous task queue/job queue based on
9049distributed message passing. It is focused on real-time operation, but
9050supports scheduling as well. The execution units, called tasks, are executed
9051concurrently on a single or more worker servers using multiprocessing,
9052Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9053synchronously (wait until ready).")
3f641af0 9054 (license license:bsd-3)
22df6419
CAW
9055 (properties `((python2-variant . ,(delay python2-celery))))))
9056
9057(define-public python2-celery
9058 (let ((celery (package-with-python2
9059 (strip-python2-variant python-celery))))
9060 (package
9061 (inherit celery)
00e10c6e 9062 (native-inputs `(("python2-unittest2" ,python2-unittest2)
22df6419
CAW
9063 ("python2-mock" ,python2-mock)
9064 ,@(package-native-inputs celery))))))
97e32948
CAW
9065
9066(define-public python-translitcodec
9067 (package
9068 (name "python-translitcodec")
9069 (version "0.4.0")
9070 (source
9071 (origin
9072 (method url-fetch)
9073 (uri (pypi-uri "translitcodec" version))
9074 (sha256
9075 (base32
9076 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9077 (build-system python-build-system)
9078 (arguments
9079 `(#:tests? #f)) ; no tests provided
9080 (home-page
9081 "https://github.com/claudep/translitcodec")
9082 (synopsis
9083 "Unicode to 8-bit charset transliteration codec")
9084 (description
9085 "This package contains codecs for transliterating ISO 10646 texts into
9086best-effort representations using smaller coded character sets (ASCII,
9087ISO 8859, etc.).")
f210e944 9088 (license license:expat)))
97e32948
CAW
9089
9090(define-public python2-translitcodec
f210e944 9091 (package-with-python2 python-translitcodec))
0c3b90d4
CAW
9092
9093(define-public python-editor
9094 (package
9095 (name "python-editor")
9096 (version "0.5")
9097 (source
9098 (origin
9099 (method url-fetch)
9100 (uri (pypi-uri "python-editor" version))
9101 (sha256
9102 (base32
9103 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9104 (build-system python-build-system)
9105 (home-page
9106 "https://github.com/fmoo/python-editor")
9107 (synopsis
9108 "Programmatically open an editor, capture the result")
9109 (description
9110 "python-editor is a library that provides the editor module for
9111programmatically interfacing with your system's $EDITOR.")
f210e944 9112 (license license:asl2.0)))
0c3b90d4
CAW
9113
9114(define-public python2-editor
f210e944 9115 (package-with-python2 python-editor))
3276517c
LF
9116
9117(define-public python-sphinxcontrib-programoutput
9118 (package
9119 (name "python-sphinxcontrib-programoutput")
9120 (version "0.8")
9121 (source (origin
9122 (method url-fetch)
9123 (uri (pypi-uri "sphinxcontrib-programoutput" version))
9124 (sha256
9125 (base32
9126 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
9127 (build-system python-build-system)
9128 (propagated-inputs
a0a09859 9129 `(("python-sphinx" ,python-sphinx)))
3276517c
LF
9130 (synopsis "Sphinx extension to include program output")
9131 (description "A Sphinx extension to literally insert the output of arbitrary
9132commands into documents, helping you to keep your command examples up to date.")
9133 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
f210e944 9134 (license license:bsd-2)))
3276517c
LF
9135
9136(define-public python2-sphinxcontrib-programoutput
f210e944 9137 (package-with-python2 python-sphinxcontrib-programoutput))
548d7165
LF
9138
9139(define-public python-sphinx-repoze-autointerface
9140 (package
9141 (name "python-sphinx-repoze-autointerface")
328ae341 9142 (version "0.8")
548d7165
LF
9143 (source (origin
9144 (method url-fetch)
9145 (uri (pypi-uri "repoze.sphinx.autointerface" version))
9146 (sha256
9147 (base32
328ae341 9148 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
548d7165
LF
9149 (build-system python-build-system)
9150 (propagated-inputs
47c7dc4a 9151 `(("python-sphinx" ,python-sphinx)
548d7165
LF
9152 ("python-zope-interface" ,python-zope-interface)))
9153 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
9154 (description "This package defines an extension for the Sphinx documentation
9155system. The extension allows generation of API documentation by
9156introspection of @code{zope.interface} instances in code.")
9157 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
3f641af0 9158 (license license:repoze)))
548d7165
LF
9159
9160(define-public python2-sphinx-repoze-autointerface
9161 (package-with-python2 python-sphinx-repoze-autointerface))
b31fbea5
DM
9162
9163(define-public python-psycopg2
9164 (package
9165 (name "python-psycopg2")
9166 (version "2.6.1")
9167 (source
9168 (origin
9169 (method url-fetch)
9170 (uri (pypi-uri "psycopg2" version))
9171 (sha256
9172 (base32
9173 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
9174 (build-system python-build-system)
9175 (arguments
9176 ;; Tests would require a postgresql database "psycopg2_test"
9177 ;; and a running postgresql database management service.
9178 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
9179 (inputs
9180 `(("postgresql" ,postgresql))) ; libpq
9181 (home-page "http://initd.org/psycopg/")
9182 (synopsis "Python PostgreSQL adapter")
9183 (description
9184 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
f210e944 9185 (license license:lgpl3+)))
b31fbea5
DM
9186
9187(define-public python2-psycopg2
f210e944 9188 (package-with-python2 python-psycopg2))
eed1a61f
LF
9189
9190(define-public python-vobject
9191 (package
9192 (name "python-vobject")
9bed9b15 9193 (version "0.9.2")
eed1a61f
LF
9194 (source (origin
9195 (method url-fetch)
9196 (uri (pypi-uri "vobject" version))
9197 (sha256
9198 (base32
9bed9b15 9199 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
eed1a61f 9200 (build-system python-build-system)
a9871b7b
LF
9201 (arguments
9202 '(;; The test suite relies on some non-portable Windows interfaces.
9203 #:tests? #f))
f22efa01 9204 (propagated-inputs
eed1a61f
LF
9205 `(("python-dateutil-2" ,python-dateutil-2)
9206 ("python-pyicu" ,python-pyicu)))
9207 (synopsis "Parse and generate vCard and vCalendar files")
9208 (description "Vobject is intended to be a full featured Python package for
9209parsing and generating vCard and vCalendar files. Currently, iCalendar files
9210are supported and well tested. vCard 3.0 files are supported, and all data
9211should be imported, but only a few components are understood in a sophisticated
9212way.")
9213 (home-page "http://eventable.github.io/vobject/")
f210e944 9214 (license license:asl2.0)))
eed1a61f
LF
9215
9216(define-public python2-vobject
f210e944 9217 (package-with-python2 python-vobject))
cedac813
LF
9218
9219(define-public python-munkres
9220 (package
9221 (name "python-munkres")
38e81a2c 9222 (version "1.0.8")
cedac813
LF
9223 (source (origin
9224 (method url-fetch)
9225 (uri (pypi-uri "munkres" version))
9226 (sha256
9227 (base32
38e81a2c 9228 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
cedac813
LF
9229 (build-system python-build-system)
9230 (arguments
9231 '(#:tests? #f)) ; no test suite
9232 (home-page "http://software.clapper.org/munkres/")
9233 (synopsis "Implementation of the Munkres algorithm")
9234 (description "The Munkres module provides an implementation of the Munkres
9235algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9236useful for solving the Assignment Problem.")
3f641af0 9237 (license license:bsd-3)))
cedac813
LF
9238
9239(define-public python2-munkres
9240 (package-with-python2 python-munkres))
f3b3d78f
LF
9241
9242(define-public python-flask
9243 (package
9244 (name "python-flask")
c6c80104 9245 (version "0.11.1")
f3b3d78f
LF
9246 (source (origin
9247 (method url-fetch)
9248 (uri (pypi-uri "Flask" version))
9249 (sha256
9250 (base32
c6c80104 9251 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
f3b3d78f
LF
9252 (build-system python-build-system)
9253 (propagated-inputs
9254 `(("python-itsdangerous" ,python-itsdangerous)
9255 ("python-jinja2" ,python-jinja2)
8f35c030 9256 ("python-click" ,python-click)
f3b3d78f
LF
9257 ("python-werkzeug" ,python-werkzeug)))
9258 (home-page "https://github.com/mitsuhiko/flask/")
9259 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9260 (description "Flask is a micro web framework based on the Werkzeug toolkit
9261and Jinja2 template engine. It is called a micro framework because it does not
9262presume or force a developer to use a particular tool or library.")
f210e944 9263 (license license:bsd-3)))
f3b3d78f
LF
9264
9265(define-public python2-flask
f210e944 9266 (package-with-python2 python-flask))
603d665b
LF
9267
9268(define-public python-cookies
9269 (package
9270 (name "python-cookies")
9271 (version "2.2.1")
9272 (source (origin
9273 (method url-fetch)
9274 (uri (pypi-uri "cookies" version))
9275 (sha256
9276 (base32
9277 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9278 (build-system python-build-system)
9279 (arguments
9280 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9281 #:tests? #f))
9282 (native-inputs
9283 `(("python-pytest" ,python2-pytest)))
9284 (synopsis "HTTP cookie parser and renderer")
9285 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9286Python.")
9287 (home-page "https://gitlab.com/sashahart/cookies")
f210e944 9288 (license license:expat)))
603d665b
LF
9289
9290(define-public python2-cookies
f210e944 9291 (package-with-python2 python-cookies))
0efde7d6
LF
9292
9293(define-public python-responses
9294 (package
9295 (name "python-responses")
9296 (version "0.5.1")
9297 (source (origin
9298 (method url-fetch)
9299 (uri (pypi-uri "responses" version))
9300 (sha256
9301 (base32
9302 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9303 (build-system python-build-system)
9304 (arguments
9305 `(;; Test suite is not distributed:
9306 ;; https://github.com/getsentry/responses/issues/38
9307 #:tests? #f))
9308 (native-inputs
d8ea5f2f 9309 `(("python-mock" ,python-mock)))
0efde7d6
LF
9310 (propagated-inputs
9311 `(("python-requests" ,python-requests)
d8ea5f2f 9312 ("python-cookies" ,python-cookies)
0efde7d6
LF
9313 ("python-six" ,python-six)))
9314 (home-page "https://github.com/getsentry/responses")
9315 (synopsis "Utility for mocking out the `requests` Python library")
9316 (description "A utility library for mocking out the `requests` Python
9317library.")
f210e944 9318 (license license:asl2.0)))
0efde7d6
LF
9319
9320(define-public python2-responses
f210e944 9321 (package-with-python2 python-responses))
76b94885 9322
b7afd018
RW
9323(define-public python-whoosh
9324 (package
9325 (name "python-whoosh")
9326 (version "2.7.4")
9327 (source
9328 (origin
9329 (method url-fetch)
9330 (uri (pypi-uri "Whoosh" version))
9331 (sha256
9332 (base32
9333 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9334 (build-system python-build-system)
9335 (native-inputs
f3b98f4f 9336 `(("python-pytest" ,python-pytest)))
b7afd018
RW
9337 (home-page "http://bitbucket.org/mchaput/whoosh")
9338 (synopsis "Full text indexing, search, and spell checking library")
9339 (description
9340 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9341checking library.")
9342 (license license:bsd-2)))
9343
9344(define-public python2-whoosh
9345 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9346 (package (inherit whoosh)
9347 (propagated-inputs
9348 `(("python2-backport-ssl-match-hostname"
9349 ,python2-backport-ssl-match-hostname)
9350 ,@(package-propagated-inputs whoosh))))))
9351
76b94885
LF
9352(define-public python-pathlib
9353 (package
9354 (name "python-pathlib")
9355 (version "1.0.1")
9356 (source (origin
9357 (method url-fetch)
9358 (uri (pypi-uri "pathlib" version))
9359 (sha256
9360 (base32
9361 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9362 (build-system python-build-system)
92a312dc
RW
9363 ;; The tests depend on the internal "test" module, which does not provide
9364 ;; a stable interface.
9365 (arguments `(#:tests? #f))
76b94885 9366 (home-page "https://pathlib.readthedocs.org/")
8f65585b
JD
9367 (synopsis "Object-oriented file system paths")
9368 (description "Pathlib offers a set of classes to handle file system paths.
76b94885
LF
9369It offers the following advantages over using string objects:
9370
9371@enumerate
9372@item No more cumbersome use of os and os.path functions. Everything can
9373be done easily through operators, attribute accesses, and method calls.
9374@item Embodies the semantics of different path types. For example,
9375comparing Windows paths ignores casing.
9376@item Well-defined semantics, eliminating any inconsistencies or
9377ambiguities (forward vs. backward slashes, etc.).
7a8894e8
HG
9378@end enumerate
9379
9380Note: In Python 3.4, pathlib is now part of the standard library. For other
9381Python versions please consider python-pathlib2 instead, which tracks the
9382standard library module. This module (python-pathlib) isn't maintained
9383anymore.")
76b94885
LF
9384 (license license:expat)))
9385
9386(define-public python2-pathlib
9387 (package-with-python2 python-pathlib))
25a7db0a 9388
b7703c81
HG
9389(define-public python2-pathlib2
9390 (package
9391 (name "python2-pathlib2")
9392 (version "2.1.0")
9393 (source (origin
9394 (method url-fetch)
9395 (uri (pypi-uri "pathlib2" version))
9396 (sha256
9397 (base32
9398 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9399 (build-system python-build-system)
49a531f5
HG
9400 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9401 ;; version is 3.4 which already includes this package as part of the
9402 ;; standard library.
b7703c81
HG
9403 (arguments
9404 `(#:python ,python-2))
9405 (native-inputs
f3b98f4f 9406 `(("python2-six" ,python2-six)))
b7703c81
HG
9407 (home-page "http://pypi.python.org/pypi/pathlib2/")
9408 (synopsis "Object-oriented file system paths - backport of standard
9409pathlib module")
9410 (description "The goal of pathlib2 is to provide a backport of standard
9411pathlib module which tracks the standard library module, so all the newest
9412features of the standard pathlib can be used also on older Python versions.
9413
9414Pathlib offers a set of classes to handle file system paths. It offers the
9415following advantages over using string objects:
9416
9417@enumerate
9418@item No more cumbersome use of os and os.path functions. Everything can
9419be done easily through operators, attribute accesses, and method calls.
9420@item Embodies the semantics of different path types. For example,
9421comparing Windows paths ignores casing.
9422@item Well-defined semantics, eliminating any inconsistencies or
9423ambiguities (forward vs. backward slashes, etc.).
9424@end enumerate")
9425 (license license:expat)))
9426
25a7db0a
LF
9427(define-public python-jellyfish
9428 (package
9429 (name "python-jellyfish")
8c4964dd 9430 (version "0.5.6")
25a7db0a
LF
9431 (source (origin
9432 (method url-fetch)
9433 (uri (pypi-uri "jellyfish" version))
9434 (sha256
9435 (base32
8c4964dd 9436 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
25a7db0a
LF
9437 (build-system python-build-system)
9438 (native-inputs
9439 `(("python-pytest" ,python-pytest)))
9440 (home-page "https://github.com/jamesturk/jellyfish")
9441 (synopsis "Approximate and phonetic matching of strings")
9442 (description "Jellyfish uses a variety of string comparison and phonetic
9443encoding algorithms to do fuzzy string matching.")
3f641af0 9444 (license license:bsd-2)
25a7db0a
LF
9445 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9446
9447(define-public python2-jellyfish
9448 (let ((jellyfish (package-with-python2
9449 (strip-python2-variant python-jellyfish))))
9450 (package (inherit jellyfish)
00e10c6e 9451 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
25a7db0a 9452 ,@(package-native-inputs jellyfish))))))
13edb0e5
LF
9453
9454(define-public python2-unicodecsv
9455 (package
9456 (name "python2-unicodecsv")
9457 (version "0.14.1")
9458 (source (origin
9459 (method url-fetch)
9460 ;; The test suite is not included in the PyPi release.
9461 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9462 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9463 "archive/" version ".tar.gz"))
9464 (file-name (string-append name "-" version ".tar.gz"))
9465 (sha256
9466 (base32
9467 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9468 (build-system python-build-system)
9469 (arguments
9470 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9471 #:python ,python-2))
9472 (native-inputs
f3b98f4f 9473 `(("python2-unittest2" ,python2-unittest2)))
13edb0e5
LF
9474 (home-page "https://github.com/jdunck/python-unicodecsv")
9475 (synopsis "Unicode CSV module for Python 2")
9476 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9477module, adding support for Unicode strings.")
3f641af0 9478 (license license:bsd-2)))
064503aa
LF
9479
9480(define-public python-rarfile
9481 (package
9482 (name "python-rarfile")
67824447 9483 (version "2.8")
064503aa
LF
9484 (source (origin
9485 (method url-fetch)
9486 (uri (pypi-uri "rarfile" version))
9487 (sha256
9488 (base32
67824447 9489 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
064503aa
LF
9490 (build-system python-build-system)
9491 (arguments
9492 '(#:phases
9493 (modify-phases %standard-phases
9494 (replace 'check
9495 ;; Many tests fail, but the installation proceeds.
9496 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9497 (native-inputs
9498 `(("which" ,which))) ; required for tests
9499 (propagated-inputs
9500 `(("libarchive" ,libarchive)))
9501 (home-page "https://github.com/markokr/rarfile")
9502 (synopsis "RAR archive reader for Python")
9503 (description "This is Python module for RAR archive reading. The interface
9504is made as zipfile like as possible.")
3f641af0 9505 (license license:isc)))
064503aa
LF
9506
9507(define-public python2-rarfile
9508 (package-with-python2 python-rarfile))
daeeea71
CM
9509
9510(define-public python-magic
9511 (package
9512 (name "python-magic")
9513 (version "0.4.3")
9514 (source
9515 (origin
9516 (method url-fetch)
9517 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9518 version ".tar.gz"))
9519 (sha256
9520 (base32
9521 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9522 (file-name (string-append name "-" version "-checkout"))))
9523 (build-system python-build-system)
9524 (arguments
9525 ;; The tests are unreliable, so don't run them. The tests fail
9526 ;; under Python3 because they were written for Python2 and
9527 ;; contain import statements that do not work in Python3. One of
9528 ;; the tests fails under Python2 because its assertions are
9529 ;; overly stringent; it relies on comparing output strings which
9530 ;; are brittle and can change depending on the version of
9531 ;; libmagic being used and the system on which the test is
9532 ;; running. In my case, under GuixSD 0.10.0, only one test
9533 ;; failed, and it seems to have failed only because the version
9534 ;; of libmagic that is packaged in Guix outputs a slightly
9535 ;; different (but not wrong) string than the one that the test
9536 ;; expected.
9537 '(#:tests? #f
9538 #:phases (modify-phases %standard-phases
9539 ;; Replace a specific method call with a hard-coded
9540 ;; path to the necessary libmagic.so file in the
9541 ;; store. If we don't do this, then the method call
9542 ;; will fail to find the libmagic.so file, which in
9543 ;; turn will cause any application using
9544 ;; python-magic to fail.
9545 (add-before 'build 'hard-code-path-to-libmagic
9546 (lambda* (#:key inputs #:allow-other-keys)
9547 (let ((file (assoc-ref inputs "file")))
9548 (substitute* "magic.py"
9549 (("ctypes.util.find_library\\('magic'\\)")
9550 (string-append "'" file "/lib/libmagic.so'")))
77432686
LF
9551 #t)))
9552 (add-before 'install 'disable-egg-compression
9553 (lambda _
9554 (let ((port (open-file "setup.cfg" "a")))
9555 (display "\n[easy_install]\nzip_ok = 0\n"
9556 port)
9557 (close-port port)
9558 #t))))))
daeeea71
CM
9559 (inputs
9560 ;; python-magic needs to be able to find libmagic.so.
9561 `(("file" ,file)))
9562 (home-page "https://github.com/ahupp/python-magic")
9563 (synopsis "File type identification using libmagic")
9564 (description
9565 "This module uses ctypes to access the libmagic file type
9566identification library. It makes use of the local magic database and
9567supports both textual and MIME-type output. Note that this module and
9568the python-file module both provide a \"magic.py\" file; these two
9569modules, which are different and were developed separately, both serve
9570the same purpose: to provide Python bindings for libmagic.")
9571 (license license:expat)))
9572
9573(define-public python2-magic
9574 (package-with-python2 python-magic))
12af303f
CM
9575
9576(define-public python2-s3cmd
9577 (package
9578 (name "python2-s3cmd")
9579 (version "1.6.1")
9580 (source
9581 (origin
9582 (method url-fetch)
de67e922 9583 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12af303f
CM
9584 "s3cmd-" version ".tar.gz"))
9585 (sha256
9586 (base32
9587 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9588 (build-system python-build-system)
9589 (arguments
9590 ;; s3cmd is written for python2 only and contains no tests.
9591 `(#:python ,python-2
9592 #:tests? #f))
f22efa01 9593 (propagated-inputs
12af303f
CM
9594 `(("python2-dateutil" ,python2-dateutil)
9595 ;; The python-file package also provides a magic.py module.
9596 ;; This is an unfortunate state of affairs; however, s3cmd
9597 ;; fails to install if it cannot find specifically the
9598 ;; python-magic package. Thus we include it, instead of using
9599 ;; python-file. Ironically, s3cmd sometimes works better
9600 ;; without libmagic bindings at all:
9601 ;; https://github.com/s3tools/s3cmd/issues/198
9602 ("python2-magic" ,python2-magic)))
9603 (home-page "http://s3tools.org/s3cmd")
9604 (synopsis "Command line tool for S3-compatible storage services")
9605 (description
9606 "S3cmd is a command line tool for uploading, retrieving and managing data
9607in storage services that are compatible with the Amazon Simple Storage
9608Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9609GnuPG encryption, and more. It also supports management of Amazon's
9610CloudFront content delivery network.")
3f641af0 9611 (license license:gpl2+)))
4323a5f0
AE
9612
9613(define-public python-pkgconfig
9614 (package
9615 (name "python-pkgconfig")
9616 (version "1.1.0")
9617 (source
9618 (origin
9619 (method url-fetch)
9620 (uri (pypi-uri "pkgconfig" version))
9621 (sha256
9622 (base32
9623 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9624 (build-system python-build-system)
9625 (native-inputs
f3b98f4f 9626 `(("python-nose" ,python-nose)))
4323a5f0
AE
9627 (inputs
9628 `(("pkg-config" ,pkg-config)))
9629 (arguments
9630 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9631 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9632 #:tests? #f
4323a5f0
AE
9633 ;; Hard-code the path to pkg-config.
9634 #:phases
9635 (modify-phases %standard-phases
9636 (add-before
9637 'build 'patch
9638 (lambda _
9639 (substitute* "pkgconfig/pkgconfig.py"
9640 (("cmd = 'pkg-config")
9641 (string-append "cmd = '" (which "pkg-config"))))
9642 #t)))))
9643 (home-page "http://github.com/matze/pkgconfig")
9644 (synopsis "Python interface for pkg-config")
9645 (description "This module provides a Python interface to pkg-config. It
9646can be used to find all pkg-config packages, check if a package exists,
9647check if a package meets certain version requirements, query CFLAGS and
9648LDFLAGS and parse the output to build extensions with setup.py.")
a0c6a36b 9649 (license license:expat)))
4323a5f0
AE
9650
9651(define-public python2-pkgconfig
9652 (package-with-python2 python-pkgconfig))
9653
2e697322
BW
9654(define-public python-bz2file
9655 (package
9656 (name "python-bz2file")
9657 (version "0.98")
9658 (source
9659 (origin
9660 (method url-fetch)
9661 (uri (pypi-uri "bz2file" version))
9662 (sha256
9663 (base32
9664 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9665 (build-system python-build-system)
9666 (arguments
124df723 9667 `(#:tests? #f)) ; Tests use deprecated python modules.
2e697322
BW
9668 (home-page "https://github.com/nvawda/bz2file")
9669 (synopsis "Read and write bzip2-compressed files")
9670 (description
9671 "Bz2file is a Python library for reading and writing bzip2-compressed
9672files. It contains a drop-in replacement for the I/O interface in the
9673standard library's @code{bz2} module, including features from the latest
9674development version of CPython that are not available in older releases.")
3f641af0 9675 (license license:asl2.0)
2e697322
BW
9676 (properties `((python2-variant . ,(delay python2-bz2file))))))
9677
9678(define-public python2-bz2file
9679 (let ((base (package-with-python2
9680 (strip-python2-variant python-bz2file))))
9681 (package
9682 (inherit base)
124df723 9683 (arguments
752bb447
BW
9684 `(#:python ,python-2
9685 #:phases
124df723
BW
9686 (modify-phases %standard-phases
9687 ;; 'python setup.py test' does not work as of 0.98.
9688 ;; There is only the one test file, so we run it directly.
9689 (replace 'check
9690 (lambda _ (zero? (system* "python"
9691 "test_bz2file.py"))))))))))
2e697322 9692
da4ac1aa
BW
9693(define-public python-future
9694 (package
9695 (name "python-future")
9696 (version "0.15.2")
9697 (source
9698 (origin
9699 (method url-fetch)
9700 (uri (pypi-uri "future" version))
9701 (sha256
9702 (base32
9703 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9704 (build-system python-build-system)
9705 ;; Many tests connect to the network or are otherwise flawed.
9706 ;; https://github.com/PythonCharmers/python-future/issues/210
9707 (arguments
9708 `(#:tests? #f))
9709 (home-page "http://python-future.org")
9710 (synopsis "Single-source support for Python 3 and 2")
9711 (description
9712 "@code{python-future} is the missing compatibility layer between Python 2 and
9713Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9714to support both Python 2 and Python 3 with minimal overhead.")
f210e944 9715 (license license:expat)))
da4ac1aa
BW
9716
9717(define-public python2-future
f210e944 9718 (package-with-python2 python-future))
da4ac1aa 9719
8e451885
AE
9720(define-public python-cysignals
9721 (package
9722 (name "python-cysignals")
9723 (version "1.1.0")
9724 (source
9725 (origin
9726 (method url-fetch)
9727 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9728 (sha256
9729 (base32
9730 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9731 (build-system python-build-system)
9732 (native-inputs
9733 `(("python-cython" ,python-cython)
8e451885
AE
9734 ("python-sphinx" ,python-sphinx)))
9735 (inputs
9736 `(("pari-gp" ,pari-gp)))
9737 (arguments
9738 `(#:modules ((guix build python-build-system)
9739 ((guix build gnu-build-system) #:prefix gnu:)
9740 (guix build utils))
9741 ;; FIXME: Tests are executed after installation and currently fail
9742 ;; when not installing into standard locations; the author is working
9743 ;; on a fix.
9744 #:tests? #f
9745 #:phases
9746 (modify-phases %standard-phases
9747 (add-before
9748 'build 'configure
9749 (assoc-ref gnu:%standard-phases 'configure)))))
9750 (home-page
9751 "https://github.com/sagemath/cysignals")
9752 (synopsis
9753 "Handling of interrupts and signals for Cython")
9754 (description
9755 "The cysignals package provides mechanisms to handle interrupts (and
9756other signals and errors) in Cython code, using two related approaches,
9757for mixed Cython/Python code or external C libraries and pure Cython code,
9758respectively.")
3f641af0 9759 (license license:lgpl3+)))
8e451885
AE
9760
9761(define-public python2-cysignals
9762 (package-with-python2 python-cysignals))
9763
63bcec71
DM
9764(define-public python2-shedskin
9765 (package
9766 (name "python2-shedskin")
9767 (version "0.9.4")
9768 (source
9769 (origin
9770 (method url-fetch)
9771 (uri (string-append "https://github.com/shedskin/shedskin/"
9772 "releases/download/v" version
9773 "/shedskin-" version ".tgz"))
9774 (sha256
9775 (base32
9776 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9777 (build-system python-build-system)
9778 (arguments
9779 `(#:python ,python-2
9780 #:phases (modify-phases %standard-phases
9781 (add-after 'unpack 'fix-resulting-include-libs
9782 (lambda* (#:key inputs #:allow-other-keys)
9783 (let ((libgc (assoc-ref inputs "libgc"))
9784 (pcre (assoc-ref inputs "pcre")))
9785 (substitute* "shedskin/makefile.py"
9786 (("variable == 'CCFLAGS':[ ]*")
9787 (string-append "variable == 'CCFLAGS':\n"
9788 " line += ' -I " pcre "/include"
9789 " -I " libgc "/include'"))
9790 (("variable == 'LFLAGS':[ ]*")
9791 (string-append "variable == 'LFLAGS':\n"
9792 " line += ' -L" pcre "/lib"
9793 " -L " libgc "/lib'")))
9794 #t))))))
63bcec71
DM
9795 (inputs `(("pcre" ,pcre)
9796 ("libgc" ,libgc)))
9797 (home-page "https://shedskin.github.io/")
9798 (synopsis "Experimental Python-2 to C++ Compiler")
9799 (description (string-append "This is an experimental compiler for a subset of
9800Python. It generates C++ code and a Makefile."))
3f641af0 9801 (license (list license:gpl3 license:bsd-3 license:expat))))
88bb4197
LG
9802
9803(define-public python2-rope
9804 (package
9805 (name "python2-rope")
9806 (version "0.10.3")
9807 (source
9808 (origin
9809 (method url-fetch)
9810 (uri (pypi-uri "rope" version))
9811 (sha256
9812 (base32
9813 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9814 (arguments
9815 ;; Rope is currently python-2 only.
9816 ;; https://github.com/python-rope/rope/issues/57
9817 `(#:python ,python-2))
9818 (build-system python-build-system)
9819 (native-inputs
f3b98f4f 9820 `(("python2-unittest2" ,python2-unittest2)))
88bb4197
LG
9821 (home-page "https://github.com/python-rope/rope")
9822 (synopsis "Refactoring library for Python")
9823 (description "Rope is a refactoring library for Python. It facilitates
9824the renaming, moving and extracting of attributes, functions, modules, fields
9825and parameters in Python 2 source code. These refactorings can also be applied
9826to occurences in strings and comments.")
3f641af0 9827 (license license:gpl2)))
6ba8ca17
9828
9829(define-public python-py3status
9830 (package
9831 (name "python-py3status")
d2262d70 9832 (version "3.1")
6ba8ca17
9833 (source
9834 (origin
9835 (method url-fetch)
9836 (uri (pypi-uri "py3status" version))
9837 (sha256
9838 (base32
d2262d70 9839 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
6ba8ca17 9840 (build-system python-build-system)
6ba8ca17
9841 (home-page "https://github.com/ultrabug/py3status")
9842 (synopsis "Extensible i3status wrapper written in Python")
9843 (description "py3status is an i3status wrapper which extends i3status
9844functionality in a modular way, allowing you to extend your panel with your
9845own code, responding to click events and updating clock every second.")
3f641af0 9846 (license license:bsd-3)))
b8fdbca3
HG
9847
9848(define-public python-tblib
9849 (package
9850 (name "python-tblib")
9851 (version "1.3.0")
9852 (source (origin
9853 (method url-fetch)
9854 (uri (pypi-uri "tblib" version))
9855 (sha256 (base32
9856 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9857 (build-system python-build-system)
9858 (arguments
9859 `(#:phases
9860 (modify-phases %standard-phases
9861 (replace 'check
9862 (lambda _
9863 ;; Upstream runs tests after installation and the package itself
9864 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9865 ;; found.
9866 (setenv "PYTHONPATH"
9867 (string-append (getcwd) "/build/lib:"
9868 (getenv "PYTHONPATH")))
9869 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9870 (native-inputs
9871 `(("python-pytest" ,python-pytest)
b8fdbca3
HG
9872 ("python-six" ,python-six)))
9873 (home-page "https://github.com/ionelmc/python-tblib")
9874 (synopsis "Traceback serialization library")
9875 (description
9876 "Traceback serialization allows you to:
9877
9878@enumerate
9879@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9880different processes. This allows better error handling when running code over
9881multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9882
9883@item Parse traceback strings and raise with the parsed tracebacks.
9884@end itemize")
3f641af0 9885 (license license:bsd-3)))
b8fdbca3
HG
9886
9887(define-public python2-tblib
9888 (package-with-python2 python-tblib))
1a024de4
HG
9889
9890(define-public python-sqlparse
9891 (package
9892 (name "python-sqlparse")
9893 (version "0.1.19")
9894 (source (origin
9895 (method url-fetch)
9896 (uri (pypi-uri "sqlparse" version))
9897 (sha256
9898 (base32
9899 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9900 (build-system python-build-system)
9901 (arguments
9902 `(#:phases
9903 (modify-phases %standard-phases
9904 (replace 'check
9905 (lambda* _
9906 ;; setup.py-integrated 2to3 only affects the build files, but
9907 ;; py.test is using the source files. So we need to convert them
9908 ;; manually.
9909 (when (zero? (system* "python3"))
9910 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9911 (zero? (system* "py.test")))))))
9912 (native-inputs
f3b98f4f 9913 `(("python-pytest" ,python-pytest)))
1a024de4
HG
9914 (home-page "https://github.com/andialbrecht/sqlparse")
9915 (synopsis "Non-validating SQL parser")
9916 (description "Sqlparse is a non-validating SQL parser for Python. It
9917provides support for parsing, splitting and formatting SQL statements.")
3f641af0 9918 (license license:bsd-3)))
1a024de4
HG
9919
9920(define-public python2-sqlparse
9921 (package-with-python2 python-sqlparse))
68b9d242
SB
9922
9923(define-public python-greenlet
9924 (package
9925 (name "python-greenlet")
9926 (version "0.4.9")
9927 (source (origin
9928 (method url-fetch)
9929 (uri (pypi-uri "greenlet" version))
9930 (sha256
9931 (base32
9932 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9933 (build-system python-build-system)
68b9d242
SB
9934 (home-page "https://greenlet.readthedocs.io/")
9935 (synopsis "Lightweight in-process concurrent programming")
9936 (description
9937 "Greenlet package is a spin-off of Stackless, a version of CPython
9938that supports micro-threads called \"tasklets\". Tasklets run
9939pseudo-concurrently (typically in a single or a few OS-level threads) and
9940are synchronized with data exchanges on \"channels\".")
3f641af0 9941 (license (list license:psfl license:expat))))
68b9d242
SB
9942
9943(define-public python2-greenlet
9944 (package-with-python2 python-greenlet))
d79a343b
SB
9945
9946(define-public python-gevent
9947 (package
9948 (name "python-gevent")
9949 (version "1.1.1")
9950 (source (origin
9951 (method url-fetch)
9952 (uri (pypi-uri "gevent" version))
9953 (sha256
9954 (base32
9955 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9956 (modules '((guix build utils)))
9957 (snippet
9958 '(begin
9959 ;; unbunding libev and c-ares
9960 (for-each delete-file-recursively '("libev" "c-ares"))
9961 ;; fixing testsuite
9962 (call-with-output-file "greentest/__init__.py" noop)
9963 (substitute* "greentest/testrunner.py"
9964 (("import util") "from . import util")
9965 (("from util import log") "from .util import log"))))))
9966 (build-system python-build-system)
9967 (propagated-inputs
9968 `(("python-greenlet" ,python-greenlet)))
9969 (native-inputs
f3b98f4f 9970 `(("python-six" ,python-six)))
d79a343b
SB
9971 (inputs
9972 `(("c-ares" ,c-ares)
9973 ("libev" ,libev)))
9974 (home-page "http://www.gevent.org/")
9975 (synopsis "Coroutine-based network library")
9976 (description
9977 "gevent is a coroutine-based Python networking library that uses greenlet
9978to provide a high-level synchronous API on top of the libev event loop.")
9979 (license license:expat)))
9980
9981(define-public python2-gevent
9982 (package-with-python2 python-gevent))
da3aeeb6
SB
9983
9984(define-public python-twisted
9985 (package
9986 (name "python-twisted")
9987 (version "16.2.0")
9988 (source (origin
9989 (method url-fetch)
8ea8e8d3 9990 (uri (pypi-uri "Twisted" version ".tar.bz2"))
da3aeeb6
SB
9991 (sha256
9992 (base32
9993 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9994 (build-system python-build-system)
45912170
SB
9995 (propagated-inputs
9996 `(("python-zope-interface" ,python-zope-interface)))
da3aeeb6
SB
9997 (home-page "https://twistedmatrix.com/")
9998 (synopsis "Asynchronous networking framework written in Python")
9999 (description
10000 "Twisted is an extensible framework for Python programming, with special
10001focus on event-based network programming and multiprotocol integration.")
10002 (license license:expat)))
10003
10004(define-public python2-twisted
10005 (package-with-python2 python-twisted))
d0b6fed6 10006
4d3fa5a4
EF
10007(define-public python-pika
10008 (package
10009 (name "python-pika")
10010 (version "0.10.0")
10011 (source
10012 (origin
10013 (method url-fetch)
10014 (uri (pypi-uri "pika" version))
10015 (sha256
10016 (base32
10017 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
10018 (build-system python-build-system)
10019 (native-inputs
269d9172
LF
10020 `(("python-pyev" ,python-pyev)
10021 ("python-tornado" ,python-tornado)
10022 ("python-twisted" ,python-twisted)))
4d3fa5a4
EF
10023 (home-page "https://pika.readthedocs.org")
10024 (synopsis "Pure Python AMQP Client Library")
10025 (description
10026 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10027Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10028network support library.")
10029 (license license:bsd-3)))
10030
10031(define-public python2-pika
10032 (package-with-python2 python-pika))
10033
d0b6fed6
DM
10034(define-public python-ply
10035 (package
10036 (name "python-ply")
10037 (version "3.8")
10038 (source
10039 (origin
10040 (method url-fetch)
10041 (uri (string-append
10042 "https://pypi.python.org/packages/"
10043 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
10044 "/ply-" version ".tar.gz"))
10045 (sha256
10046 (base32
10047 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
10048 (build-system python-build-system)
10049 (home-page "http://www.dabeaz.com/ply/")
10050 (synopsis "Python Lex & Yacc")
10051 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10052It uses LR parsing and does extensive error checking.")
f210e944 10053 (license license:bsd-3)))
d0b6fed6
DM
10054
10055(define-public python2-ply
f210e944 10056 (package-with-python2 python-ply))
d951bd54
SB
10057
10058(define-public python-tabulate
10059 (package
10060 (name "python-tabulate")
10061 (version "0.7.5")
10062 (source (origin
10063 (method url-fetch)
10064 (uri (pypi-uri "tabulate" version))
10065 (sha256
10066 (base32
10067 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
10068 ;; Fix tests
10069 (modules '((guix build utils)))
10070 (snippet '(substitute* '("test/test_cli.py"
10071 "test/test_input.py"
10072 "test/test_output.py"
10073 "test/test_regression.py")
10074 (("from common") "from nose.tools")))))
10075 (build-system python-build-system)
10076 (native-inputs
f3b98f4f 10077 `(;; For testing
d951bd54
SB
10078 ("python-nose" ,python-nose)))
10079 (home-page "https://bitbucket.org/astanin/python-tabulate")
10080 (synopsis "Pretty-print tabular data")
10081 (description
10082 "Tabulate is a library and command-line utility to pretty-print tabular
10083data in Python.")
10084 (license license:expat)))
10085
10086(define-public python2-tabulate
10087 (package-with-python2 python-tabulate))
1c4c8a33
SB
10088
10089(define-public python-kazoo
10090 (package
10091 (name "python-kazoo")
10092 (version "2.2.1")
10093 (source
10094 (origin
10095 (method url-fetch)
10096 (uri (pypi-uri "kazoo" version))
10097 (sha256
10098 (base32
10099 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
10100 (build-system python-build-system)
10101 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
c18899e8
SB
10102 (propagated-inputs
10103 `(("python-six" ,python-six)))
1c4c8a33
SB
10104 (home-page "https://kazoo.readthedocs.org")
10105 (synopsis "High-level Zookeeper client library")
10106 (description
10107 "Kazoo is a Python client library for the Apache Zookeeper distributed
10108application service. It is designed to be easy to use and to avoid common
10109programming errors.")
3f641af0 10110 (license license:asl2.0)))
1c4c8a33
SB
10111
10112(define-public python2-kazoo
10113 (package-with-python2 python-kazoo))
45dda35e
SB
10114
10115(define-public python-pykafka
10116 (package
10117 (name "python-pykafka")
10118 (version "2.4.0")
10119 (source (origin
10120 (method url-fetch)
c6bccf71
EF
10121 (uri (string-append
10122 "https://pypi.python.org/packages/8b/3e/"
10123 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
10124 "pykafka-" version ".tar.gz"))
45dda35e
SB
10125 (sha256
10126 (base32
10127 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10128 (build-system python-build-system)
10129 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
c8fa3d9b 10130 (propagated-inputs
45dda35e
SB
10131 `(("python-gevent" ,python-gevent)
10132 ("python-kazoo" ,python-kazoo)
45dda35e
SB
10133 ("python-tabulate" ,python-tabulate)))
10134 (inputs
10135 `(("librdkafka" ,librdkafka)))
10136 (home-page "https://pykafka.readthedocs.io/")
10137 (synopsis "Apache Kafka client for Python")
10138 (description
10139 "PyKafka is a client for the Apache Kafka distributed messaging system.
10140It includes Python implementations of Kafka producers and consumers, which
10141are optionally backed by a C extension built on librdkafka.")
3f641af0 10142 (license license:asl2.0)))
45dda35e
SB
10143
10144(define-public python2-pykafka
10145 (package-with-python2 python-pykafka))
a44fd439
DM
10146
10147(define-public python-wcwidth
10148 (package
10149 (name "python-wcwidth")
10150 (version "0.1.6")
10151 (source
10152 (origin
10153 (method url-fetch)
10154 (uri (string-append
10155 "https://pypi.python.org/packages/"
10156 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
10157 "wcwidth-" version ".tar.gz"))
10158 (sha256
10159 (base32
10160 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
10161 (build-system python-build-system)
10162 (home-page "https://github.com/jquast/wcwidth")
66e07664 10163 (synopsis "Measure number of terminal column cells of wide-character codes")
a44fd439
DM
10164 (description "Wcwidth measures the number of terminal column cells of
10165wide-character codes. It is useful for those implementing a terminal emulator,
10166or programs that carefully produce output to be interpreted by one. It is a
10167Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10168specified in POSIX.1-2001 and POSIX.1-2008.")
f210e944 10169 (license license:expat)))
a44fd439
DM
10170
10171(define-public python2-wcwidth
f210e944 10172 (package-with-python2 python-wcwidth))
0de78c95
DP
10173
10174(define-public python2-jsonrpclib
10175 (package
10176 (name "python2-jsonrpclib")
10177 (version "0.1.7")
10178 (source (origin
10179 (method url-fetch)
10180 (uri (string-append
10181 "https://pypi.python.org/packages/source/j/jsonrpclib/"
10182 "jsonrpclib-" version ".tar.gz"))
10183 (sha256
10184 (base32
10185 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10186 (build-system python-build-system)
0de78c95
DP
10187 (arguments
10188 `(#:tests? #f
10189 #:python ,python-2))
10190 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10191 (synopsis "Implementation of JSON-RPC specification for Python")
10192 (description
10193 "This library is an implementation of the JSON-RPC specification.
10194It supports both the original 1.0 specification, as well as the
10195new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10196etc.")
3f641af0 10197 (license license:asl2.0)))
9250b0f3
SB
10198
10199(define-public python-chai
10200 (package
10201 (name "python-chai")
10202 (version "1.1.1")
10203 (source (origin
10204 (method url-fetch)
10205 (uri (pypi-uri "chai" version))
10206 (sha256
10207 (base32
10208 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10209 (build-system python-build-system)
9250b0f3
SB
10210 (home-page "https://github.com/agoragames/chai")
10211 (synopsis "Mocking framework for Python")
10212 (description
10213 "Chai provides an api for mocking, stubbing and spying your python
10214objects, patterned after the Mocha library for Ruby.")
3f641af0 10215 (license license:bsd-3)))
9250b0f3
SB
10216
10217(define-public python2-chai
10218 (package-with-python2 python-chai))
10219
ae43baa8
SB
10220(define-public python-arrow
10221 (package
10222 (name "python-arrow")
10223 (version "0.8.0")
10224 (source (origin
10225 (method url-fetch)
10226 (uri (pypi-uri "arrow" version))
10227 (sha256
10228 (base32
10229 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10230 (build-system python-build-system)
10231 (native-inputs
f3b98f4f 10232 `(;; For testing
ae43baa8
SB
10233 ("python-chai" ,python-chai)
10234 ("python-simplejson" ,python-simplejson)))
36aed736
SB
10235 (propagated-inputs
10236 `(("python-dateutil" ,python-dateutil-2)))
ae43baa8
SB
10237 (home-page "https://github.com/crsmithdev/arrow/")
10238 (synopsis "Dates and times for Python")
10239 (description
10240 "Arrow is a Python library to creating, manipulating, formatting and
10241converting dates, times, and timestamps. It implements and updates the
10242datetime type.")
3f641af0 10243 (license license:asl2.0)))
ae43baa8
SB
10244
10245(define-public python2-arrow
10246 (package-with-python2 python-arrow))
10247
1f2b62a4
SB
10248(define-public python-inflection
10249 (package
10250 (name "python-inflection")
10251 (version "0.3.1")
10252 (source
10253 (origin (method url-fetch)
10254 (uri (pypi-uri "inflection" version))
10255 (sha256
10256 (base32
10257 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10258 (build-system python-build-system)
1f2b62a4
SB
10259 (home-page "http://github.com/jpvanhal/inflection")
10260 (synopsis "Python string transformation library")
10261 (description
10262 "Inflection is a string transformation library. It singularizes
10263and pluralizes English words, and transforms strings from CamelCase to
10264underscored string.")
10265 (license license:expat)))
10266
10267(define-public python2-inflection
10268 (package-with-python2 python-inflection))
10269
18995566
SB
10270(define-public python-pylev
10271 (package
10272 (name "python-pylev")
10273 (version "1.3.0")
10274 (source (origin
10275 (method url-fetch)
10276 (uri (pypi-uri "pylev" version))
10277 (sha256
10278 (base32
10279 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10280 (build-system python-build-system)
18995566
SB
10281 (home-page "http://github.com/toastdriven/pylev")
10282 (synopsis "Levenshtein distance implementation in Python")
10283 (description "Pure Python Levenshtein implementation, based off the
10284Wikipedia code samples at
10285@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
3f641af0 10286 (license license:bsd-3)))
18995566
SB
10287
10288(define-public python2-pylev
10289 (package-with-python2 python-pylev))
10290
f5deff7a
SB
10291(define-public python-cleo
10292 (package
10293 (name "python-cleo")
10294 (version "0.4.1")
10295 (source (origin
10296 (method url-fetch)
10297 (uri (pypi-uri "cleo" version))
10298 (sha256
10299 (base32
10300 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10301 (build-system python-build-system)
10302 (native-inputs
f3b98f4f 10303 `(;; For testing
f5deff7a
SB
10304 ("python-mock" ,python-mock)
10305 ("python-pytest" ,python-pytest)))
9403150a
SB
10306 (propagated-inputs
10307 `(("python-psutil" ,python-psutil)
10308 ("python-pylev" ,python-pylev)))
f5deff7a
SB
10309 (home-page "https://github.com/sdispater/cleo")
10310 (synopsis "Command-line arguments library for Python")
10311 (description
10312 "Cleo allows you to create command-line commands with signature in
10313docstring and colored output.")
10314 (license license:expat)))
10315
10316(define-public python2-cleo
10317 (package-with-python2 python-cleo))
10318
77cadb43
SB
10319(define-public python-lazy-object-proxy
10320 (package
10321 (name "python-lazy-object-proxy")
10322 (version "1.2.2")
10323 (source (origin
10324 (method url-fetch)
10325 (uri (pypi-uri "lazy-object-proxy" version))
10326 (sha256
10327 (base32
10328 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10329 (build-system python-build-system)
77cadb43
SB
10330 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10331 (synopsis "Lazy object proxy for python")
10332 (description
10333 "Lazy object proxy is an object that wraps a callable but defers the call
10334until the object is actually required, and caches the result of said call.")
3f641af0 10335 (license license:bsd-2)))
77cadb43
SB
10336
10337(define-public python2-lazy-object-proxy
10338 (package-with-python2 python-lazy-object-proxy))
10339
5477e05f
SB
10340(define-public python-dnspython
10341 (package
10342 (name "python-dnspython")
6c514128 10343 (version "1.15.0")
5477e05f
SB
10344 (source (origin
10345 (method url-fetch)
10346 (uri (string-append "http://www.dnspython.org/kits/"
10347 version "/dnspython-" version ".tar.gz"))
10348 (sha256
10349 (base32
6c514128 10350 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
5477e05f
SB
10351 (build-system python-build-system)
10352 (arguments '(#:tests? #f)) ; XXX: requires internet access
5477e05f
SB
10353 (home-page "http://www.dnspython.org")
10354 (synopsis "DNS toolkit for Python")
10355 (description
10356 "dnspython is a DNS toolkit for Python. It supports almost all record
10357types. It can be used for queries, zone transfers, and dynamic updates.
10358It supports TSIG authenticated messages and EDNS0.")
10359 (license license:expat)))
10360
10361(define-public python2-dnspython
10362 (package-with-python2 python-dnspython))
10363
22711e25
SB
10364(define-public python-email-validator
10365 (package
10366 (name "python-email-validator")
10367 (version "1.0.1")
10368 (source
10369 (origin (method url-fetch)
10370 (uri (pypi-uri "email_validator" version))
10371 (sha256
10372 (base32
10373 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10374 (build-system python-build-system)
10375 (arguments
10376 '(#:phases
10377 (modify-phases %standard-phases
10378 (add-before 'build 'use-dnspython
10379 (lambda _
10380 (substitute* "setup.py"
10381 (("dnspython3") "dnspython"))
10382 #t)))))
d42560bd 10383 (propagated-inputs
22711e25 10384 `(("python-dnspython" ,python-dnspython)
d42560bd 10385 ("python-idna" ,python-idna)))
22711e25
SB
10386 (home-page "https://github.com/JoshData/python-email-validator")
10387 (synopsis "Email address validation library for Python")
10388 (description
10389 "This library validates email address syntax and deliverability.")
3f641af0 10390 (license license:cc0)))
22711e25
SB
10391
10392(define-public python2-email-validator
10393 (package-with-python2 python-email-validator))
10394
8987d91e
SB
10395(define-public python-ukpostcodeparser
10396 (package
10397 (name "python-ukpostcodeparser")
10398 (version "1.0.3")
10399 (source (origin
10400 (method url-fetch)
10401 (uri (pypi-uri "UkPostcodeParser" version))
10402 (sha256
10403 (base32
10404 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10405 (build-system python-build-system)
8987d91e
SB
10406 (home-page "https://github.com/hamstah/ukpostcodeparser")
10407 (synopsis "UK Postcode parser for Python")
10408 (description
10409 "This library provides the @code{parse_uk_postcode} function for
10410parsing UK postcodes.")
10411 (license license:expat)))
10412
10413(define-public python2-ukpostcodeparser
10414 (package-with-python2 python-ukpostcodeparser))
ea92ae01
SB
10415
10416(define-public python-fake-factory
10417 (package
10418 (name "python-fake-factory")
7adc698f 10419 (version "0.7.2")
ea92ae01
SB
10420 (source (origin
10421 (method url-fetch)
10422 (uri (pypi-uri "fake-factory" version))
10423 (sha256
10424 (base32
7adc698f 10425 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
ea92ae01 10426 (build-system python-build-system)
ea92ae01 10427 (native-inputs
f3b98f4f 10428 `(;; For testing
ea92ae01
SB
10429 ("python-email-validator" ,python-email-validator)
10430 ("python-mock" ,python-mock)
10431 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
bbcd7297
SB
10432 (propagated-inputs
10433 `(("python-dateutil" ,python-dateutil-2)
10434 ("python-six" ,python-six)))
7adc698f 10435 (home-page "https://github.com/joke2k/faker")
ea92ae01
SB
10436 (synopsis "Python package that generates fake data")
10437 (description
10438 "Faker is a Python package that generates fake data such as names,
10439addresses, and phone numbers.")
10440 (license license:expat)
10441 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10442
10443(define-public python2-fake-factory
10444 (let ((base (package-with-python2 (strip-python2-variant
10445 python-fake-factory))))
10446 (package
10447 (inherit base)
24c9aa18 10448 (propagated-inputs
ea92ae01 10449 `(("python2-ipaddress" ,python2-ipaddress)
24c9aa18 10450 ,@(package-propagated-inputs base))))))
ea92ae01 10451
b49504fd
SB
10452(define-public python-pyaml
10453 (package
10454 (name "python-pyaml")
10455 (version "15.8.2")
10456 (source (origin
10457 (method url-fetch)
10458 (uri (pypi-uri "pyaml" version))
10459 (sha256
10460 (base32
10461 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10462 (build-system python-build-system)
b49504fd
SB
10463 (propagated-inputs
10464 `(("python-pyyaml" ,python-pyyaml)))
10465 (home-page "https://github.com/mk-fg/pretty-yaml")
10466 (synopsis "YAML pretty-print library for Python")
10467 (description
10468 "pyaml is a PyYAML based python module to produce pretty and readable
10469YAML-serialized data.")
3f641af0 10470 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
b49504fd
SB
10471
10472(define-public python2-pyaml
10473 (package-with-python2 python-pyaml))
10474
347175a2
SB
10475(define-public python-flexmock
10476 (package
10477 (name "python-flexmock")
10478 (version "0.10.2")
10479 (source (origin
10480 (method url-fetch)
10481 (uri (pypi-uri "flexmock" version))
10482 (sha256
10483 (base32
10484 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10485 (build-system python-build-system)
347175a2
SB
10486 (home-page "https://flexmock.readthedocs.org")
10487 (synopsis "Testing library for Python")
10488 (description
10489 "flexmock is a testing library for Python that makes it easy to create
10490mocks, stubs and fakes.")
3f641af0 10491 (license license:bsd-3)))
347175a2
SB
10492
10493(define-public python2-flexmock
10494 (package-with-python2 python-flexmock))
10495
5a744191
SB
10496(define-public python-orator
10497 (package
10498 (name "python-orator")
10499 (version "0.8.2")
10500 (source (origin
10501 (method url-fetch)
10502 (uri (pypi-uri "orator" version))
10503 (sha256
10504 (base32
10505 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10506 (build-system python-build-system)
10507 (arguments '(#:tests? #f)) ; no tests
b2676030 10508 (propagated-inputs
5a744191
SB
10509 `(("python-arrow" ,python-arrow)
10510 ("python-blinker" ,python-blinker)
10511 ("python-cleo" ,python-cleo)
10512 ("python-fake-factory" ,python-fake-factory)
10513 ("python-inflection" ,python-inflection)
10514 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10515 ("python-pyaml" ,python-pyaml)
5a744191
SB
10516 ("python-simplejson" ,python-simplejson)
10517 ("python-wrapt" ,python-wrapt)))
10518 (home-page "https://orator-orm.com/")
10519 (synopsis "ActiveRecord ORM for Python")
10520 (description
10521 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10522implementation for Python.")
10523 (license license:expat)
10524 (properties `((python2-variant . ,(delay python2-orator))))))
10525
10526(define-public python2-orator
10527 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10528 (package
10529 (inherit base)
06961617 10530 (propagated-inputs
5a744191 10531 `(("python2-ipaddress" ,python2-ipaddress)
06961617 10532 ,@(package-propagated-inputs base))))))
f4155188
DM
10533
10534(define-public python-prompt-toolkit
10535 (package
10536 (name "python-prompt-toolkit")
d15e2ef0 10537 (version "1.0.7")
f4155188
DM
10538 (source
10539 (origin
10540 (method url-fetch)
d15e2ef0 10541 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
f4155188
DM
10542 (sha256
10543 (base32
d15e2ef0 10544 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
f4155188 10545 (build-system python-build-system)
bae18710
LF
10546 (arguments
10547 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
f22efa01
HG
10548 (propagated-inputs
10549 `(("python-wcwidth" ,python-wcwidth)
2c199b55 10550 ("python-six" ,python-six)
f22efa01 10551 ("python-pygments" ,python-pygments)))
f4155188
DM
10552 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10553 (synopsis "Library for building command line interfaces in Python")
10554 (description
10555 "Prompt-Toolkit is a library for building interactive command line
10556interfaces in Python. It's like GNU Readline but it also features syntax
10557highlighting while typing, out-of-the-box multi-line input editing, advanced
10558code completion, incremental search, support for Chinese double-width
10559characters, mouse support, and auto suggestions.")
f210e944 10560 (license license:bsd-3)))
f4155188
DM
10561
10562(define-public python2-prompt-toolkit
f210e944 10563 (package-with-python2 python-prompt-toolkit))
a502dfbf
DM
10564
10565(define-public python-jedi
10566 (package
10567 (name "python-jedi")
10568 (version "0.9.0")
10569 (source
10570 (origin
10571 (method url-fetch)
10572 (uri (pypi-uri "jedi" version))
10573 (sha256
10574 (base32
10575 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10576 (build-system python-build-system)
10577 (home-page "https://github.com/davidhalter/jedi")
10578 (synopsis
10579 "Autocompletion for Python that can be used for text editors")
10580 (description
10581 "Jedi is an autocompletion tool for Python that can be used for text editors.")
f210e944 10582 (license license:expat)))
a502dfbf
DM
10583
10584(define-public python2-jedi
f210e944 10585 (package-with-python2 python-jedi))
c2f0dc6e
DM
10586
10587(define-public ptpython
10588 (package
10589 (name "ptpython")
10590 (version "0.34")
10591 (source (origin
10592 (method url-fetch)
10593 (uri (pypi-uri "ptpython" version))
10594 (sha256
10595 (base32
10596 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10597 (build-system python-build-system)
f22efa01 10598 (propagated-inputs
c2f0dc6e
DM
10599 `(("python-docopt" ,python-docopt)
10600 ("python-jedi" ,python-jedi)
10601 ("python-prompt-toolkit" ,python-prompt-toolkit)
f3b98f4f 10602 ("python-pygments" ,python-pygments)))
c2f0dc6e
DM
10603 (home-page "https://github.com/jonathanslenders/ptpython")
10604 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10605 (description
10606 "ptpython is a Python read-eval-print loop with IDE-like features.
10607It supports syntax highlighting, multiline editing, autocompletion, mouse,
10608color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10609etc.")
3f641af0 10610 (license license:bsd-3)
c2f0dc6e
DM
10611 (properties `((python2-variant . ,(delay ptpython-2))))))
10612
10613(define-public ptpython-2
10614 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10615 (package
10616 (inherit base)
10617 (name "ptpython2"))))
b227f0be 10618
b04a52a6
DJ
10619(define-public python-requests-oauthlib
10620 (package
10621 (name "python-requests-oauthlib")
10622 (version "0.6.2")
10623 (source
10624 (origin
10625 (method url-fetch)
10626 (uri (pypi-uri "requests-oauthlib" version))
10627 (sha256
10628 (base32
10629 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10630 (build-system python-build-system)
10631 (arguments
10632 `(#:phases
10633 (modify-phases %standard-phases
10634 ;; removes tests that require network access
10635 (add-before 'check 'pre-check
10636 (lambda _
10637 (delete-file "tests/test_core.py")
10638 #t)))))
10639 (native-inputs
10640 `(("python-requests-mock" ,python-requests-mock)
10641 ("python-mock" ,python-mock)))
f22efa01 10642 (propagated-inputs
b04a52a6
DJ
10643 `(("python-oauthlib" ,python-oauthlib)
10644 ("python-requests" ,python-requests)))
10645 (home-page
10646 "https://github.com/requests/requests-oauthlib")
10647 (synopsis
10648 "OAuthlib authentication support for Requests")
10649 (description
10650 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10651provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
f210e944 10652 (license license:isc)))
b04a52a6
DJ
10653
10654(define-public python2-requests-oauthlib
f210e944 10655 (package-with-python2 python-requests-oauthlib))
b04a52a6 10656
b227f0be 10657(define-public python-stem
10658 (package
10659 (name "python-stem")
10660 (version "1.4.1b")
10661 (source
10662 (origin
10663 (method url-fetch)
10664 (uri (pypi-uri "stem" version ".tar.bz2"))
10665 (sha256
10666 (base32
10667 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10668 (build-system python-build-system)
10669 (arguments
10670 `(#:phases
10671 (modify-phases %standard-phases
10672 (replace 'check
10673 (lambda _
10674 (zero? (system* "./run_tests.py" "--unit")))))))
10675 (native-inputs
10676 `(("python-mock" ,python-mock)
10677 ("python-pep8" ,python-pep8)
10678 ("python-pyflakes" ,python-pyflakes)))
f22efa01 10679 (propagated-inputs
b227f0be 10680 `(("python-pycrypto" ,python-pycrypto)))
10681 (home-page "https://stem.torproject.org/")
10682 (synopsis
10683 "Python controller library that allows applications to interact with Tor")
10684 (description
10685 "Stem is a Python controller library for Tor. With it you can use Tor's
10686control protocol to script against the Tor process and read descriptor data
10687relays publish about themselves.")
3f641af0 10688 (license license:lgpl3)))
b227f0be 10689
10690(define-public python2-stem
10691 (package-with-python2 python-stem))
517a6c0c
DM
10692
10693(define-public python-pyserial
10694 (package
10695 (name "python-pyserial")
10696 (version "3.1.1")
10697 (source
10698 (origin
10699 (method url-fetch)
10700 (uri (pypi-uri "pyserial" version))
10701 (sha256
10702 (base32
10703 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10704 (build-system python-build-system)
10705 (home-page
10706 "https://github.com/pyserial/pyserial")
10707 (synopsis "Python Serial Port Bindings")
10708 (description "@code{pyserial} provide serial port bindings for Python. It
10709supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10710and/or Xon/Xoff. The port is accessed in RAW mode.")
f210e944 10711 (license license:bsd-3)))
517a6c0c
DM
10712
10713(define-public python2-pyserial
f210e944 10714 (package-with-python2 python-pyserial))
6eb7af2a
DJ
10715
10716(define-public python-kivy
10717 (package
10718 (name "python-kivy")
10719 (version "1.9.1")
10720 (source
10721 (origin
10722 (method url-fetch)
10723 (uri (pypi-uri "kivy" version))
10724 (file-name (string-append name "-" version ".tar.gz"))
10725 (sha256
10726 (base32
10727 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10728 (build-system python-build-system)
10729 (arguments
10730 `(#:tests? #f ; Tests require many optional packages
10731 #:phases
10732 (modify-phases %standard-phases
10733 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10734 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10735 (lambda* (#:key inputs #:allow-other-keys)
10736 (setenv "KIVY_SDL2_PATH"
10737 (string-append (assoc-ref inputs "sdl-union")
10738 "/include/SDL2"))
10739 #t)))))
10740 (native-inputs
f2516de2
HG
10741 `(("pkg-config" ,pkg-config)
10742 ("python-cython" ,python-cython)))
6eb7af2a 10743 (inputs
f2516de2 10744 `(("gstreamer" ,gstreamer)
6eb7af2a
DJ
10745 ("mesa" ,mesa)
10746 ("sdl-union"
10747 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10748 (home-page "http://kivy.org")
10749 (synopsis
10750 "Multitouch application framework")
10751 (description
10752 "A software library for rapid development of
10753hardware-accelerated multitouch applications.")
10754 (license license:expat)))
10755
10756(define-public python2-kivy
10757 (package-with-python2 python-kivy))
10758
10759(define-public python-kivy-next
10760 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10761 (revision "1"))
10762 (package (inherit python-kivy)
10763 (name "python-kivy-next")
d80a71eb 10764 (version (string-append "1.9.1-" revision "."
6eb7af2a
DJ
10765 (string-take commit 7)))
10766 (source
10767 (origin
10768 (method git-fetch)
10769 (uri (git-reference
10770 (url "https://github.com/kivy/kivy")
10771 (commit commit)))
10772 (file-name (string-append name "-" version "-checkout"))
10773 (sha256
10774 (base32
10775 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10776
10777(define-public python2-kivy-next
10778 (package-with-python2 python-kivy-next))
8794bd8b
DC
10779
10780(define-public python-binaryornot
10781 (package
10782 (name "python-binaryornot")
10783 (version "0.4.0")
10784 (source (origin
10785 (method url-fetch)
10786 (uri (pypi-uri "binaryornot" version))
10787 (sha256
10788 (base32
10789 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10790 (build-system python-build-system)
f22efa01 10791 (propagated-inputs
8794bd8b
DC
10792 `(("python-chardet" ,python-chardet)
10793 ("python-hypothesis" ,python-hypothesis)))
10794 (home-page "https://github.com/audreyr/binaryornot")
10795 (synopsis "Package to check if a file is binary or text")
10796 (description "Ultra-lightweight pure Python package to check if a file is
10797binary or text.")
10798 (license license:bsd-3)
10799 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10800
10801(define-public python2-binaryornot
10802 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10803 (package (inherit base)
f22efa01 10804 (propagated-inputs
8794bd8b 10805 `(("python2-enum34" ,python2-enum34)
f22efa01 10806 ,@(package-propagated-inputs base))))))
a9ac982a
DC
10807
10808(define-public python-nltk
10809 (package
10810 (name "python-nltk")
10811 (version "3.2.1")
10812 (source (origin
10813 (method url-fetch)
10814 (uri (pypi-uri "nltk" version))
10815 (sha256
10816 (base32
10817 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10818 (build-system python-build-system)
59f12985
LF
10819 (arguments
10820 '(;; The tests require some extra resources to be downloaded.
10821 ;; TODO Try packaging these resources.
10822 #:tests? #f))
a9ac982a
DC
10823 (home-page "http://nltk.org/")
10824 (synopsis "Natural Language Toolkit")
10825 (description "It provides interfaces to over 50 corpora and lexical
10826resources such as WordNet, along with a suite of text processing libraries
10827for classification, tokenization, stemming, tagging, parsing, and semantic
10828reasoning, wrappers for natural language processing libraries.")
f210e944 10829 (license license:asl2.0)))
a9ac982a
DC
10830
10831(define-public python2-nltk
f210e944 10832 (package-with-python2 python-nltk))
691cd90d
DC
10833
10834(define-public python-pymongo
10835 (package
10836 (name "python-pymongo")
10837 (version "3.3.0")
10838 (source (origin
10839 (method url-fetch)
10840 (uri (pypi-uri "pymongo" version))
10841 (sha256
10842 (base32
10843 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10844 (build-system python-build-system)
f22efa01 10845 (propagated-inputs
691cd90d
DC
10846 `(("python-certifi" ,python-certifi)))
10847 (home-page "http://github.com/mongodb/mongo-python-driver")
10848 (synopsis "Python driver for MongoDB")
10849 (description "Python driver for MongoDB.")
f210e944 10850 (license license:asl2.0)))
691cd90d
DC
10851
10852(define-public python2-pymongo
f210e944 10853 (package-with-python2 python-pymongo))
6a6c9d43
DC
10854
10855(define-public python-sh
10856 (package
10857 (name "python-sh")
10858 (version "1.11")
10859 (source (origin
10860 (method url-fetch)
10861 (uri (pypi-uri "sh" version))
10862 (sha256
10863 (base32
10864 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10865 (build-system python-build-system)
10866 (arguments
10867 `(#:tests? #f)) ; no tests
10868 (home-page "https://github.com/amoffat/sh")
10869 (synopsis "Python subprocess interface")
10870 (description "Abstracts process invocation by providing a function
10871interface for programs.")
f210e944 10872 (license license:expat)))
6a6c9d43
DC
10873
10874(define-public python2-sh
f210e944 10875 (package-with-python2 python-sh))
05b59190 10876
25702397
EF
10877(define-public python-consul
10878 (package
10879 (name "python-consul")
10880 (version "0.6.1")
10881 (source
10882 (origin
10883 (method url-fetch)
10884 (uri (pypi-uri "python-consul" version))
10885 (sha256
10886 (base32
10887 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10888 (build-system python-build-system)
10889 (native-inputs
fd1d6de7
HG
10890 `(("python-pytest" ,python-pytest)))
10891 (propagated-inputs
10892 `(("python-requests" ,python-requests)
25702397
EF
10893 ("python-six" ,python-six)))
10894 (home-page "https://github.com/cablehead/python-consul")
10895 (synopsis "Python client for Consul")
10896 (description
10897 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10898discovery, monitoring and configuration.")
10899 (license license:expat)))
10900
10901(define-public python2-consul
f210e944 10902 (package-with-python2 python-consul))
25702397 10903
05b59190
DC
10904(define-public python-schematics
10905 (package
10906 (name "python-schematics")
10907 (version "1.1.1")
10908 (source
10909 (origin
10910 (method url-fetch)
10911 (uri (string-append
10912 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10913 (file-name (string-append name "-" version ".tar.gz"))
10914 (sha256
10915 (base32
10916 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10917 (build-system python-build-system)
f22efa01 10918 (propagated-inputs
05b59190
DC
10919 `(("python-six" ,python-six)))
10920 (arguments
10921 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10922 ; version requirements (eg python-coveralls)
10923 (home-page "https://github.com/schematics/schematics")
10924 (synopsis "Python Data Structures for Humans")
10925 (description "Python Data Structures for Humans.")
f210e944 10926 (license license:bsd-3)))
05b59190
DC
10927
10928(define-public python2-schematics
f210e944 10929 (package-with-python2 python-schematics))
d6907ff7
DC
10930
10931(define-public python-publicsuffix
10932 (package
10933 (name "python-publicsuffix")
10934 (version "1.1.0")
10935 (source (origin
10936 (method url-fetch)
10937 (uri (pypi-uri "publicsuffix" version))
10938 (sha256
10939 (base32
10940 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10941 (build-system python-build-system)
10942 (arguments
10943 `(#:tests? #f)) ; tests use the internet
10944 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10945 (synopsis "Get suffix for a domain name")
10946 (description "Get a public suffix for a domain name using the Public Suffix
10947List.")
f210e944 10948 (license license:expat)))
d6907ff7
DC
10949
10950(define-public python2-publicsuffix
f210e944 10951 (package-with-python2 python-publicsuffix))
b2319996
DC
10952
10953(define-public python-publicsuffix2
10954 (package
10955 (name "python-publicsuffix2")
10956 (version "2.20160621")
10957 (source
10958 (origin
10959 (method url-fetch)
10960 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10961 (sha256
10962 (base32
10963 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10964 (build-system python-build-system)
10797a0a
LF
10965 (arguments
10966 '(#:tests? #f)) ; The test suite requires network access.
b2319996
DC
10967 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10968 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10969 (description "Get a public suffix for a domain name using the Public Suffix
10970List. Forked from and using the same API as the publicsuffix package.")
f210e944 10971 (license (list license:expat license:mpl2.0))))
b2319996
DC
10972
10973(define-public python2-publicsuffix2
f210e944 10974 (package-with-python2 python-publicsuffix2))
81f1515d
DC
10975
10976(define-public python-url
10977 (package
10978 (name "python-url")
10979 (version "0.2.0")
10980 (source (origin
10981 (method url-fetch)
10982 (uri (pypi-uri "url" version))
10983 (sha256
10984 (base32
10985 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10986 (build-system python-build-system)
f22efa01 10987 (propagated-inputs
81f1515d
DC
10988 `(("python-publicsuffix" ,python-publicsuffix)))
10989 (native-inputs
10990 `(("python-coverage" ,python-coverage)
10991 ("python-nose" ,python-nose)))
10992 (arguments
10993 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10994 (home-page "http://github.com/seomoz/url-py")
10995 (synopsis "URL Parsing")
10996 (description "Library for parsing urls.")
10997 (license license:expat)
10998 (properties `((python2-variant . ,(delay python2-url))))))
10999
11000(define-public python2-url
11001 (let ((base (package-with-python2 (strip-python2-variant python-url))))
11002 (package (inherit base)
f22efa01 11003 (propagated-inputs
f210e944 11004 `(("python2-publicsuffix" ,python2-publicsuffix))))))
974ee2c1
TS
11005
11006(define-public python-freezegun
11007 (package
11008 (name "python-freezegun")
11009 (version "0.3.7")
11010 (source
11011 (origin
11012 (method url-fetch)
11013 (uri (pypi-uri "freezegun" version))
11014 (sha256
11015 (base32
11016 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
11017 (build-system python-build-system)
11018 (native-inputs
11019 `(("python-mock" ,python-mock)
11020 ("python-nose" ,python-nose)
4e096968 11021 ("python-coverage" ,python-coverage)))
f22efa01 11022 (propagated-inputs
4e096968
HG
11023 `(("python-six" ,python-six)
11024 ("python-dateutil-2" ,python-dateutil-2)))
974ee2c1
TS
11025 (arguments
11026 `(#:phases (modify-phases %standard-phases
11027 ;; The tests are normally executed via `make test`, but the PyPi
11028 ;; package does not include the Makefile.
11029 (replace 'check
11030 (lambda _
11031 (zero? (system* "nosetests" "./tests/")))))))
11032 (home-page "https://github.com/spulec/freezegun")
11033 (synopsis "Test utility for mocking the datetime module")
11034 (description
11035 "FreezeGun is a library that allows your python tests to travel through
11036time by mocking the datetime module.")
11037 (license license:asl2.0)))
11038
11039(define-public python2-freezegun
f210e944
HG
11040 (package-with-python2 python-freezegun))
11041
dddcb25c
MB
11042
11043(define-public python-odfpy
11044 (package
11045 (name "python-odfpy")
11046 (version "1.3.3")
11047 (source (origin
11048 (method url-fetch)
11049 (uri (pypi-uri "odfpy" version))
11050 (sha256
11051 (base32
11052 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11053 (arguments
11054 `(#:modules ((srfi srfi-1)
11055 (guix build python-build-system)
11056 (guix build utils))
11057 #:phases
11058 (modify-phases %standard-phases
11059 (replace 'check
11060 ;; The test runner invokes python2 and python3 for test*.py.
11061 ;; To avoid having both in inputs, we replicate it here.
11062 (lambda _
11063 (every (lambda (test-file)
11064 (zero? (system* "python" test-file)))
11065 (find-files "tests" "^test.*\\.py$")))))))
11066 (build-system python-build-system)
11067 (home-page "https://github.com/eea/odfpy")
11068 (synopsis "Python API and tools to manipulate OpenDocument files")
11069 (description "Collection of libraries and utility programs written in
11070Python to manipulate OpenDocument 1.2 files.")
11071 (license
11072 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11073 ;; number of files with other licenses.
11074 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11075
11076(define-public python2-odfpy
11077 (package-with-python2 python-odfpy))
b30565bd
MB
11078
11079(define-public python-cachecontrol
11080 (package
11081 (name "python-cachecontrol")
11082 (version "0.11.6")
11083 (source
11084 (origin
11085 (method url-fetch)
11086 ;; Pypi does not have tests.
11087 (uri (string-append
11088 "https://github.com/ionrock/cachecontrol/archive/v"
11089 version ".tar.gz"))
11090 (file-name (string-append name "-" version ".tar.gz"))
11091 (sha256
11092 (base32
11093 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
11094 (build-system python-build-system)
11095 (arguments
11096 `(#:phases
11097 (modify-phases %standard-phases
11098 (replace 'check
11099 (lambda _
11100 ;; Drop test that requires internet access.
11101 (delete-file "tests/test_regressions.py")
11102 (setenv "PYTHONPATH"
11103 (string-append (getcwd) "/build/lib:"
11104 (getenv "PYTHONPATH")))
11105 (zero? (system* "py.test" "-vv")))))))
11106 (native-inputs
11107 `(("python-pytest" ,python-pytest)
11108 ("python-redis" ,python-redis)
11109 ("python-webtest" ,python-webtest)
11110 ("python-mock" ,python-mock)))
11111 (propagated-inputs
11112 `(("python-requests" ,python-requests)
11113 ("python-lockfile" ,python-lockfile)))
11114 (home-page "https://github.com/ionrock/cachecontrol")
11115 (synopsis "The httplib2 caching algorithms for use with requests")
11116 (description "CacheControl is a port of the caching algorithms in
11117@code{httplib2} for use with @code{requests} session objects.")
f210e944 11118 (license license:asl2.0)))
b30565bd
MB
11119
11120(define-public python2-cachecontrol
f210e944 11121 (package-with-python2 python-cachecontrol))
243db824
DM
11122
11123(define-public python-lit
11124 (package
11125 (name "python-lit")
11126 (version "0.5.0")
11127 (source
11128 (origin
11129 (method url-fetch)
11130 (uri (pypi-uri "lit" version))
11131 (sha256
11132 (base32
11133 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
11134 (build-system python-build-system)
11135 (home-page "http://llvm.org/")
11136 (synopsis "LLVM Software Testing Tool")
11137 (description "@code{lit} is a portable tool for executing LLVM and Clang
11138style test suites, summarizing their results, and providing indication of
11139failures.")
f210e944 11140 (license license:ncsa)))
243db824
DM
11141
11142(define-public python2-lit
f210e944 11143 (package-with-python2 python-lit))
66f95b20
MB
11144
11145(define-public python-pytest-pep8
11146 (package
11147 (name "python-pytest-pep8")
11148 (version "1.0.6")
11149 (source (origin
11150 (method url-fetch)
11151 (uri (pypi-uri "pytest-pep8" version))
11152 (sha256
11153 (base32
11154 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
11155 (build-system python-build-system)
11156 (arguments
b41a05ce 11157 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
66f95b20
MB
11158 (native-inputs
11159 `(("python-pytest" ,python-pytest)))
11160 (propagated-inputs
11161 `(("python-pep8" ,python-pep8)))
11162 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
11163 (synopsis "Py.test plugin to check PEP8 requirements")
11164 (description "Pytest plugin for checking PEP8 compliance.")
f210e944 11165 (license license:expat)))
66f95b20
MB
11166
11167(define-public python2-pytest-pep8
f210e944 11168 (package-with-python2 python-pytest-pep8))
df94a6b5
MB
11169
11170(define-public python-pytest-flakes
11171 (package
11172 (name "python-pytest-flakes")
11173 (version "1.0.1")
11174 (source (origin
11175 (method url-fetch)
11176 (uri (pypi-uri "pytest-flakes" version))
11177 (sha256
11178 (base32
11179 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
11180 (build-system python-build-system)
11181 (arguments
b41a05ce 11182 `(#:phases
df94a6b5
MB
11183 (modify-phases %standard-phases
11184 (delete 'check)
11185 (add-after 'install 'check
05c2fd36
HG
11186 (lambda* (#:key outputs inputs #:allow-other-keys)
11187 ;; It's easier to run tests after install.
11188 ;; Make installed package available for running the tests
11189 (add-installed-pythonpath inputs outputs)
df94a6b5
MB
11190 (zero? (system* "py.test" "-vv")))))))
11191 (native-inputs
11192 `(("python-coverage" ,python-coverage)
11193 ("python-pytest" ,python-pytest)
11194 ("python-pytest-cache" ,python-pytest-cache)
11195 ("python-pytest-pep8" ,python-pytest-pep8)))
11196 (propagated-inputs
11197 `(("python-pyflakes" ,python-pyflakes)))
11198 (home-page "https://github.com/fschulze/pytest-flakes")
11199 (synopsis "Py.test plugin to check source code with pyflakes")
11200 (description "Pytest plugin for checking Python source code with pyflakes.")
f210e944 11201 (license license:expat)))
df94a6b5
MB
11202
11203(define-public python2-pytest-flakes
f210e944 11204 (package-with-python2 python-pytest-flakes))
5467ea62
MB
11205
11206(define-public python-natsort
11207 (package
11208 (name "python-natsort")
11209 (version "5.0.1")
11210 (source (origin
11211 (method url-fetch)
11212 (uri (pypi-uri "natsort" version))
11213 (sha256
11214 (base32
11215 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11216 (build-system python-build-system)
11217 (arguments
11218 `(#:phases
11219 (modify-phases %standard-phases
11220 (add-before 'check 'set-cachedir
11221 ;; Tests require write access to $HOME by default
11222 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11223 (native-inputs
11224 `(("python-hypothesis" ,python-hypothesis)
11225 ("python-pytest-cache" ,python-pytest-cache)
11226 ("python-pytest-cov" ,python-pytest-cov)
11227 ("python-pytest-flakes" ,python-pytest-flakes)
11228 ("python-pytest-pep8" ,python-pytest-pep8)))
11229 (propagated-inputs ; TODO: Add python-fastnumbers.
11230 `(("python-pyicu" ,python-pyicu)))
11231 (home-page "https://github.com/SethMMorton/natsort")
11232 (synopsis "Natural sorting for python and shell")
11233 (description
11234 "Natsort lets you apply natural sorting on lists instead of
11235lexicographical. If you use the built-in @code{sorted} method in python
11236on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11237returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11238function @code{natsorted} that identifies numbers and sorts them separately
11239from strings. It can also sort version numbers, real numbers, mixed types
11240and more, and comes with a shell command @command{natsort} that exposes this
11241functionality in the command line.")
11242 (license license:expat)
11243 (properties `((python2-variant . ,(delay python2-natsort))))))
11244
11245(define-public python2-natsort
11246 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11247 (package (inherit base)
11248 (native-inputs
00e10c6e 11249 `(("python2-pathlib" ,python2-pathlib)
5467ea62
MB
11250 ("python2-mock" ,python2-mock)
11251 ("python2-enum34" ,python2-enum34)
11252 ,@(package-native-inputs base))))))
4efb9c54
SR
11253
11254(define-public python-glances
11255 (package
11256 (name "python-glances")
11257 (version "2.7.1")
11258 (source
11259 (origin
11260 (method url-fetch)
11261 (uri (pypi-uri "Glances" version))
11262 (sha256
11263 (base32
11264 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11265 (build-system python-build-system)
f22efa01 11266 (propagated-inputs
4efb9c54
SR
11267 `(("python-psutil" ,python-psutil)))
11268 (home-page
11269 "https://github.com/nicolargo/glances")
11270 (synopsis
11271 "A cross-platform curses-based monitoring tool")
11272 (description
11273 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11274Glances uses the PsUtil library to get information from your system. It monitors
11275CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
f210e944 11276 (license license:lgpl3+)))
4efb9c54
SR
11277
11278(define-public python2-glances
f210e944 11279 (package-with-python2 python-glances))
05b7a593
EF
11280
11281(define-public python-graphql-core
11282 (package
11283 (name "python-graphql-core")
11284 (version "0.5.3")
11285 (source
11286 (origin
11287 (method url-fetch)
11288 (uri (pypi-uri "graphql-core" version))
11289 (sha256
11290 (base32
11291 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11292 (build-system python-build-system)
11293 (arguments
326f8285
LF
11294 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11295 #:phases
05b7a593
EF
11296 (modify-phases %standard-phases
11297 (add-after 'unpack 'patch-hardcoded-version
11298 (lambda _ (substitute*
11299 "setup.py"
11300 (("'gevent==1.1rc1'") "'gevent'"))
11301 #t)))))
11302 (native-inputs
11303 `(("python-gevent" ,python-gevent)
11304 ("python-mock" ,python-mock)
11305 ("python-pytest-mock" ,python-pytest-mock)))
f22efa01 11306 (propagated-inputs
05b7a593
EF
11307 `(("python-promise" ,python-promise)
11308 ("python-six" ,python-six)))
11309 (home-page "https://github.com/graphql-python/graphql-core")
11310 (synopsis "GraphQL implementation for Python")
11311 (description
11312 "GraphQL implementation for Python. GraphQL is a data query language and
11313runtime designed and used to request and deliver data to mobile and web apps.
11314This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11315to Python.")
05b7a593
EF
11316 (license license:expat)))
11317
11318(define-public python2-graphql-core
f210e944 11319 (package-with-python2 python-graphql-core))
7ee51575
EF
11320
11321(define-public python-graphql-relay
11322 (package
11323 (name "python-graphql-relay")
11324 (version "0.4.4")
11325 (source
11326 (origin
11327 (method url-fetch)
11328 (uri (pypi-uri "graphql-relay" version))
11329 (sha256
11330 (base32
11331 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11332 (build-system python-build-system)
11333 (native-inputs
11334 `(("python-pytest" ,python-pytest)))
f22efa01 11335 (propagated-inputs
7ee51575
EF
11336 `(("python-graphql-core" ,python-graphql-core)
11337 ("python-promise" ,python-promise)
11338 ("python-six" ,python-six)))
11339 (home-page "https://github.com/graphql-python/graphql-relay-py")
11340 (synopsis "Relay implementation for Python")
11341 (description
11342 "This is a library to allow the easy creation of Relay-compliant servers
11343using the GraphQL Python reference implementation of a GraphQL server. It
11344should be noted that the code is a exact port of the original
11345@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11346from Facebook.")
7ee51575
EF
11347 (license license:expat)))
11348
11349(define-public python2-graphql-relay
f210e944 11350 (package-with-python2 python-graphql-relay))
ddc63a56
EF
11351
11352(define-public python-graphene
11353 (package
11354 (name "python-graphene")
11355 (version "0.10.2")
11356 (source
11357 (origin
11358 (method url-fetch)
11359 (uri (pypi-uri "graphene" version))
11360 (sha256
11361 (base32
11362 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11363 (build-system python-build-system)
11364 (native-inputs
11365 `(("python-django-filter" ,python-django-filter)
11366 ("python-mock" ,python-mock)
11367 ("python-psycopg2" ,python-psycopg2)
11368 ("python-pytest-django" ,python-pytest-django)
11369 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
f22efa01 11370 (propagated-inputs
ddc63a56
EF
11371 `(("python-graphql-core" ,python-graphql-core)
11372 ("python-graphql-relay" ,python-graphql-relay)
11373 ("python-iso8601" ,python-iso8601)
11374 ("python-promise" ,python-promise)
11375 ("python-six" ,python-six)))
11376 (home-page "http://graphene-python.org/")
11377 (synopsis "GraphQL Framework for Python")
11378 (description
11379 "Graphene is a Python library for building GraphQL schemas/types.
11380A GraphQL schema describes your data model, and provides a GraphQL server
11381with an associated set of resolve methods that know how to fetch data.")
11382 (properties `((python2-variant . ,(delay python2-graphene))))
11383 (license license:expat)))
11384
11385(define-public python2-graphene
11386 (let ((base (package-with-python2
11387 (strip-python2-variant python-graphene))))
11388 (package (inherit base)
11389 (native-inputs
00e10c6e 11390 `(("python2-sqlalchemy" ,python2-sqlalchemy)
ddc63a56 11391 ,@(package-native-inputs base))))))
d488d5d6
EF
11392
11393(define-public python-nautilus
11394 (package
11395 (name "python-nautilus")
11396 (version "0.4.9")
11397 (source
11398 (origin
11399 (method url-fetch)
11400 (uri (pypi-uri "nautilus" version))
11401 (sha256
11402 (base32
11403 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11404 (build-system python-build-system)
11405 (arguments `(#:tests? #f)) ; fails to import test modules
f22efa01 11406 (propagated-inputs
d488d5d6
EF
11407 `(("python-bcrypt" ,python-bcrypt)
11408 ("python-click" ,python-click)
11409 ("python-consul" ,python-consul)
d488d5d6
EF
11410 ("python-graphene" ,python-graphene)
11411 ("python-jinja2" ,python-jinja2)
d488d5d6
EF
11412 ("python-peewee" ,python-peewee)
11413 ("python-pika" ,python-pika)
d488d5d6
EF
11414 ("python-tornado" ,python-tornado)
11415 ("python-wtforms" ,python-wtforms)))
38ceb106
HG
11416 (native-inputs
11417 `(("python-nose2" ,python-nose2)))
d488d5d6
EF
11418 (home-page "https://github.com/AlecAivazis/nautilus")
11419 (synopsis "Library for creating microservice applications")
11420 (description
11421 "Nautilus is a framework for flux based microservices that looks to
11422provide extendible implementations of common aspects of a cloud so that you can
11423focus on building massively scalable web applications.")
11424 (license license:expat)))
94cffc63 11425
66d3f50a
LF
11426(define-public python-betamax
11427 (package
11428 (name "python-betamax")
11429 (version "0.8.0")
11430 (source
11431 (origin
11432 (method url-fetch)
11433 (uri (pypi-uri "betamax" version))
11434 (sha256
11435 (base32
11436 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11437 (build-system python-build-system)
11438 (arguments
11439 '(;; Many tests fail because they require networking.
11440 #:tests? #f))
c415f763 11441 (propagated-inputs
66d3f50a
LF
11442 `(("python-requests" ,python-requests)))
11443 (home-page "https://github.com/sigmavirus24/betamax")
11444 (synopsis "Record HTTP interactions with python-requests")
11445 (description "Betamax will record your test suite's HTTP interactions and
11446replay them during future tests. It is designed to work with python-requests.")
f210e944 11447 (license license:expat)))
66d3f50a
LF
11448
11449(define-public python2-betamax
f210e944 11450 (package-with-python2 python-betamax))
ca0635b4 11451
94cffc63
LF
11452(define-public python-s3transfer
11453 (package
11454 (name "python-s3transfer")
11455 (version "0.1.8")
11456 (source (origin
11457 (method url-fetch)
11458 (uri (pypi-uri "s3transfer" version))
11459 (sha256
11460 (base32
11461 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11462 (build-system python-build-system)
fad8bf97
LF
11463 (arguments
11464 `(#:phases
11465 (modify-phases %standard-phases
11466 (replace 'check
11467 (lambda _
11468 ;; 7 of the 'integration' tests require network access or login
11469 ;; credentials.
11470 (zero? (system* "nosetests" "--exclude=integration")))))))
94cffc63 11471 (native-inputs
fad8bf97
LF
11472 `(("python-docutils" ,python-docutils)
11473 ("python-mock" ,python-mock)
11474 ("python-nose" ,python-nose)))
f22efa01 11475 (propagated-inputs
94cffc63
LF
11476 `(("python-botocore" ,python-botocore)))
11477 (synopsis "Amazon S3 Transfer Manager")
11478 (description "S3transfer is a Python library for managing Amazon S3
11479transfers.")
11480 (home-page "https://github.com/boto/s3transfer")
11481 (license license:asl2.0)
11482 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11483
11484(define-public python2-s3transfer
11485 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11486 (package
11487 (inherit base)
11488 (native-inputs
11489 `(("python2-futures" ,python2-futures)
94cffc63 11490 ,@(package-native-inputs base))))))
8ab59181
HG
11491
11492(define-public python-setproctitle
11493(package
11494 (name "python-setproctitle")
11495 (version "1.1.10")
11496 (source
11497 (origin
11498 (method url-fetch)
11499 (uri (pypi-uri "setproctitle" version))
11500 (sha256
11501 (base32
11502 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11503 (build-system python-build-system)
11504 (arguments
11505 '(#:phases
11506 (modify-phases %standard-phases
11507 (add-before 'check 'patch-Makefile
11508 ;; Stricly this is only required for the python2 variant.
11509 ;; But adding a phase in an inherited package seems to be
11510 ;; cumbersum. So we patch even for python3.
11511 (lambda _
11512 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11513 (when nose
11514 (substitute* "Makefile"
11515 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11516 (string-append nose "/bin/nosetests "))))
11517 #t)))
11518 (replace 'check
11519 (lambda _
11520 (setenv "PYTHON" (or (which "python3") (which "python")))
11521 (setenv "PYCONFIG" (or (which "python3-config")
11522 (which "python-config")))
11523 (setenv "CC" "gcc")
11524 ;; No need to extend PYTHONPATH to find the built package, since
11525 ;; the Makefile will build anyway
11526 (zero? (system* "make" "check")))))))
11527 (native-inputs
11528 `(("procps" ,procps))) ; required for tests
11529 (home-page
11530 "https://github.com/dvarrazzo/py-setproctitle")
11531 (synopsis
11532 "Setproctitle implementation for Python to customize the process title")
11533 (description "The library allows a process to change its title (as displayed
11534by system tools such as ps and top).
11535
11536Changing the title is mostly useful in multi-process systems, for
11537example when a master process is forked: changing the children's title
11538allows to identify the task each process is busy with. The technique
11539is used by PostgreSQL and the OpenSSH Server for example.")
11540 (license license:bsd-3)
11541 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11542
11543(define-public python2-setproctitle
11544 (let ((base (package-with-python2
11545 (strip-python2-variant python-setproctitle))))
11546 (package
11547 (inherit base)
11548 (native-inputs `(("python2-nose" ,python2-nose)
11549 ,@(package-native-inputs base))))))
162e42d8
HG
11550
11551(define-public python-validictory
11552 (package
11553 (name "python-validictory")
11554 (version "1.0.1")
11555 (source
11556 (origin
11557 (method url-fetch)
11558 (uri (pypi-uri "validictory" version))
11559 (sha256
11560 (base32
11561 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11562 (build-system python-build-system)
11563 (arguments
11564 '(#:phases
11565 (modify-phases %standard-phases
11566 (add-after 'unpack 'bootstrap
11567 ;; Move the tests out of the package directory to avoid
11568 ;; packaging them.
11569 (lambda* _
11570 (rename-file "validictory/tests" "tests")
11571 (delete-file "tests/__init__.py")))
11572 (replace 'check
11573 (lambda _
11574 ;; Extend PYTHONPATH so the built package will be found.
11575 (setenv "PYTHONPATH"
11576 (string-append (getcwd) "/build/lib:"
11577 (getenv "PYTHONPATH")))
11578 (zero? (system* "py.test" "-vv" )))))))
11579 (native-inputs
11580 `(("python-pytest" ,python-pytest)))
11581 (home-page
11582 "https://github.com/jamesturk/validictory")
11583 (synopsis "General purpose Python data validator")
11584 (description "It allows validation of arbitrary Python data structures.
11585
11586The schema format is based on the JSON Schema
11587proposal (http://json-schema.org), so combined with json the library is also
11588useful as a validator for JSON data.")
f210e944 11589 (license license:expat)))
162e42d8
HG
11590
11591(define-public python2-validictory
f210e944 11592 (package-with-python2 python-validictory))
0990edfe
DM
11593
11594(define-public python-aniso8601
11595 (package
11596 (name "python-aniso8601")
11597 (version "1.1.0")
11598 (source
11599 (origin
11600 (method url-fetch)
11601 (uri (pypi-uri "aniso8601" version))
11602 (sha256
11603 (base32
11604 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11605 (build-system python-build-system)
11606 (propagated-inputs
11607 `(("python-dateutil-2" ,python-dateutil-2)))
11608 (home-page
11609 "https://bitbucket.org/nielsenb/aniso8601")
11610 (synopsis
11611 "Python library for parsing ISO 8601 strings")
11612 (description
11613 "This package contains a library for parsing ISO 8601 datetime strings.")
11614 (license license:bsd-3)))
999d964d
DM
11615
11616(define-public python-flask-restful
11617 (package
11618 (name "python-flask-restful")
11619 (version "0.3.5")
11620 (source
11621 (origin
11622 (method url-fetch)
11623 (uri (pypi-uri "Flask-RESTful" version))
11624 (sha256
11625 (base32
11626 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11627 (build-system python-build-system)
11628 (propagated-inputs
11629 `(("python-aniso8601" ,python-aniso8601)
11630 ("python-flask" ,python-flask)
11631 ("python-pycrypto" ,python-pycrypto)
11632 ("python-pytz" ,python-pytz)))
11633 (native-inputs
11634 `(;; Optional dependency of Flask. Tests need it.
11635 ("python-blinker" ,python-blinker)
11636 ("python-mock" ,python-mock) ; For tests
11637 ("python-nose" ,python-nose) ; For tests
11638 ("python-sphinx" ,python-sphinx)))
11639 (home-page
11640 "https://www.github.com/flask-restful/flask-restful/")
11641 (synopsis
11642 "Flask module for creating REST APIs")
11643 (description
11644 "This package contains a Flask module for creating REST APIs.")
11645 (license license:bsd-3)))
31288222
DM
11646
11647(define-public python-flask-basicauth
11648 (package
11649 (name "python-flask-basicauth")
11650 (version "0.2.0")
11651 (source
11652 (origin
11653 (method url-fetch)
11654 (uri (pypi-uri "Flask-BasicAuth" version))
11655 (sha256
11656 (base32
11657 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11658 (build-system python-build-system)
11659 (propagated-inputs
11660 `(("python-flask" ,python-flask)))
11661 (home-page
11662 "https://github.com/jpvanhal/flask-basicauth")
11663 (synopsis
11664 "HTTP basic access authentication for Flask")
11665 (description
11666 "This package provides HTTP basic access authentication for Flask.")
11667 (license license:bsd-3)))
903276d0
DM
11668
11669(define-public python-flask-sqlalchemy
11670 (package
11671 (name "python-flask-sqlalchemy")
11672 (version "2.1")
11673 (source
11674 (origin
11675 (method url-fetch)
11676 (uri (pypi-uri "Flask-SQLAlchemy" version))
11677 (sha256
11678 (base32
11679 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11680 (build-system python-build-system)
11681 (propagated-inputs
11682 `(("python-flask" ,python-flask)
11683 ("python-sqlalchemy" ,python-sqlalchemy)))
11684 (home-page
11685 "http://github.com/mitsuhiko/flask-sqlalchemy")
11686 (synopsis
11687 "Module adding SQLAlchemy support to your Flask application")
11688 (description
11689 "This package adds SQLAlchemy support to your Flask application.")
11690 (license license:bsd-3)))
329b4b3b
LF
11691
11692(define-public python-pyev
11693 (package
11694 (name "python-pyev")
11695 (version "0.9.0")
11696 (source
11697 (origin
11698 (method url-fetch)
11699 (uri (pypi-uri "pyev" version))
11700 (sha256
11701 (base32
11702 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11703 (build-system python-build-system)
11704 (arguments
11705 `(#:tests? #f ; no test suite
11706 #:phases
11707 (modify-phases %standard-phases
11708 (add-after 'unpack 'patch
11709 (lambda* (#:key inputs #:allow-other-keys)
11710 (let ((libev (string-append (assoc-ref inputs "libev")
11711 "/lib/libev.so.4")))
11712 (substitute* "setup.py"
11713 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11714 (string-append "libev_dll_name = \"" libev "\"")))))))))
11715 (inputs
11716 `(("libev" ,libev)))
11717 (home-page "http://pythonhosted.org/pyev/")
11718 (synopsis "Python libev interface")
11719 (description "Pyev provides a Python interface to libev.")
11720 (license license:gpl3)))
11721
11722(define-public python2-pyev
11723 (package-with-python2 python-pyev))
45b4f127
DM
11724
11725(define-public python-imagesize
11726 (package
11727 (name "python-imagesize")
11728 (version "0.7.1")
11729 (source
11730 (origin
11731 (method url-fetch)
11732 (uri (pypi-uri "imagesize" version))
11733 (sha256
11734 (base32
11735 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11736 (build-system python-build-system)
9422c98a
LF
11737 (arguments
11738 '(;; Test files are not distributed on PyPi:
11739 ;; https://github.com/shibukawa/imagesize_py/issues/7
11740 #:tests? #f))
45b4f127
DM
11741 (home-page "https://github.com/shibukawa/imagesize_py")
11742 (synopsis "Gets image size of files in variaous formats in Python")
11743 (description
11744 "This package allows determination of image size from
11745PNG, JPEG, JPEG2000 and GIF files in pure Python.")
f210e944 11746 (license license:expat)))
45b4f127
DM
11747
11748(define-public python2-imagesize
f210e944 11749 (package-with-python2 python-imagesize))
2f6dd9cd
AI
11750
11751(define-public python-axolotl-curve25519
11752 (package
11753 (name "python-axolotl-curve25519")
11754 (version "0.1")
11755 (source
11756 (origin
11757 (method git-fetch)
11758 (uri (git-reference
11759 (url "git://github.com/tgalal/python-axolotl-curve25519")
11760 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11761 (file-name (string-append name "-" version "-checkout"))
11762 (sha256
11763 (base32
11764 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11765 (build-system python-build-system)
11766 (arguments
11767 `(;; Prevent creation of the egg. This works around
11768 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11769 #:configure-flags '("--root=/")))
2f6dd9cd
AI
11770 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11771 (synopsis "Python wrapper for curve25519 library")
11772 (description "This is a python wrapper for the curve25519 library
11773with ed25519 signatures. The C code was pulled from
11774libaxolotl-android. At the moment this wrapper is meant for use by
11775python-axolotl.")
11776 (license (list license:gpl3 ; Most files
683cdbf5 11777 license:bsd-3)))) ; curve/curve25519-donna.c
2f6dd9cd
AI
11778
11779(define-public python2-axolotl-curve25519
11780 (package-with-python2 python-axolotl-curve25519))
06ff0837
AI
11781
11782(define-public python-axolotl
11783 (package
11784 (name "python-axolotl")
11785 (version "0.1.35")
11786 (source
11787 (origin
11788 (method url-fetch)
11789 (uri (string-append
11790 "https://github.com/tgalal/python-axolotl/archive/"
11791 version ".tar.gz"))
11792 (file-name (string-append name "-" version ".tar.gz"))
11793 (sha256
11794 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11795 (build-system python-build-system)
11796 (arguments
11797 `(#:phases
11798 (modify-phases %standard-phases
11799 ;; Don't install tests
11800 (add-before 'install 'remove-tests
11801 (lambda _
11802 (for-each delete-file-recursively
11803 '("axolotl/tests" "build/lib/axolotl/tests"))
11804 #t)))
11805 ;; Prevent creation of the egg. This works around
11806 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11807 #:configure-flags '("--root=/")))
06ff0837
AI
11808 (propagated-inputs
11809 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11810 ("python-dateutil" ,python-dateutil)
11811 ("python-protobuf" ,python-protobuf)
11812 ("python-pycrypto" ,python-pycrypto)))
11813 (home-page "https://github.com/tgalal/python-axolotl")
11814 (synopsis "Python port of libaxolotl-android")
11815 (description "This is a python port of libaxolotl-android. This
11816is a ratcheting forward secrecy protocol that works in synchronous and
11817asynchronous messaging environments.")
11818 (license license:gpl3)))
11819
11820(define-public python2-axolotl
11821 (package-with-python2 python-axolotl))
e2fca490
DM
11822
11823(define-public python-termstyle
11824 (package
11825 (name "python-termstyle")
11826 (version "0.1.11")
11827 (source
11828 (origin
11829 (method url-fetch)
11830 (uri (pypi-uri "termstyle" version))
11831 (sha256
11832 (base32
11833 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11834 (build-system python-build-system)
11835 (home-page "http://github.com/gfxmonk/termstyle")
11836 (synopsis "Console text coloring for Python")
11837 (description "This package provides console text coloring for Python.")
11838 (license license:bsd-3)))
1e6112d8
DM
11839
11840(define-public python-rednose
11841 (package
11842 (name "python-rednose")
11843 (version "1.2.1")
11844 (source
11845 (origin
11846 (method url-fetch)
11847 (uri (pypi-uri "rednose" version))
11848 (sha256
11849 (base32
11850 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
11851 (build-system python-build-system)
11852 (arguments
11853 `(#:phases
11854 (modify-phases %standard-phases
11855 (add-after 'unpack 'fix-deps
11856 (lambda _
11857 ;; See <https://github.com/JBKahn/rednose/issues/12>
11858 (substitute* "setup.py"
11859 (("python-termstyle") "termstyle"))
11860 #t)))))
11861 (propagated-inputs
11862 `(("python-colorama" ,python-colorama)
11863 ("python-termstyle" ,python-termstyle)))
11864 (native-inputs
11865 `(("python-six" ,python-six)
11866 ("python-nose" ,python-nose)))
11867 (home-page "https://github.com/JBKahn/rednose")
11868 (synopsis "Colored output for Python nosetests")
11869 (description "This package provides colored output for the
11870@command{nosetests} command of the Python Nose unit test framework.")
11871 (license license:bsd-3)))
0a7f17f0
DM
11872
11873(define-public python-flask-restplus
11874 (package
11875 (name "python-flask-restplus")
11876 (version "0.9.2")
11877 (source
11878 (origin
11879 (method url-fetch)
11880 (uri (pypi-uri "flask-restplus" version))
11881 (sha256
11882 (base32
11883 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
11884 (build-system python-build-system)
11885 (propagated-inputs
11886 `(("python-aniso8601" ,python-aniso8601)
11887 ("python-flask" ,python-flask)
11888 ("python-jsonschema" ,python-jsonschema)
11889 ("python-pytz" ,python-pytz)
11890 ("python-six" ,python-six)))
11891 (native-inputs
11892 `(("python-tzlocal" ,python-tzlocal)
11893 ("python-blinker" ,python-blinker)
11894 ("python-nose" ,python-nose)
11895 ("python-rednose" ,python-rednose)))
11896 (home-page "https://github.com/noirbizarre/flask-restplus")
11897 (synopsis "Framework for documented API development with Flask")
11898 (description "This package provides a framework for API development with
11899the Flask web framework in Python. It is similar to package
11900@code{python-flask-restful} but supports the @code{python-swagger}
11901documentation builder.")
11902 (license license:expat)))
1ed21519
DM
11903
11904(define-public python-sadisplay
11905 (package
11906 (name "python-sadisplay")
11907 (version "0.4.6")
11908 (source
11909 (origin
11910 (method url-fetch)
11911 (uri (pypi-uri "sadisplay" version))
11912 (sha256
11913 (base32
11914 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
11915 (build-system python-build-system)
11916 (propagated-inputs
11917 `(("python-sqlalchemy" ,python-sqlalchemy)))
11918 (native-inputs
11919 `(("python-nose" ,python-nose)))
11920 (home-page "https://bitbucket.org/estin/sadisplay")
11921 (synopsis "SQLAlchemy schema displayer")
11922 (description "This package provides a program to build Entity
11923Relationship diagrams from a SQLAlchemy model (or directly from the
11924database).")
11925 (license license:bsd-3)))
11926
11927(define-public python2-sadisplay
11928 (package-with-python2 python-sadisplay))
444a79b6
DM
11929
11930(define-public python-flask-restful-swagger
11931 (package
11932 (name "python-flask-restful-swagger")
11933 (version "0.19")
11934 (source
11935 (origin
11936 (method url-fetch)
11937 (uri (pypi-uri "flask-restful-swagger" version))
11938 (sha256
11939 (base32
11940 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
11941 (build-system python-build-system)
11942 (propagated-inputs
11943 `(("python-flask-restful" ,python-flask-restful)))
11944 (home-page "https://github.com/rantav/flask-restful-swagger")
11945 (synopsis "Extract Swagger specs from Flask-Restful projects")
11946 (description "This package lets you extract Swagger API documentation
11947specs from your Flask-Restful projects.")
11948 (license license:expat)))
11949
11950(define-public python2-flask-restful-swagger
11951 (package-with-python2 python-flask-restful-swagger))
6c2e82bc
TGR
11952
11953(define-public python-argcomplete
11954 (package
11955 (name "python-argcomplete")
11956 (version "1.7.0")
11957 (source
11958 (origin
11959 (method url-fetch)
11960 (uri (pypi-uri "argcomplete" version))
11961 (sha256
11962 (base32
11963 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11964 (build-system python-build-system)
11965 (home-page "https://github.com/kislyuk/argcomplete")
11966 (synopsis "Shell tab completion for Python argparse")
11967 (description "argcomplete provides extensible command line tab completion
11968of arguments and options for Python scripts using @code{argparse}. It's
11969particularly useful for programs with many options or sub-parsers that can
11970dynamically suggest completions; for example, when browsing resources over the
11971network.")
11972 (license license:asl2.0)))
11973
11974(define-public python2-argcomplete
11975 (package-with-python2 python-argcomplete))